name: workflows
description: |-
Load and create repository SOPs via workflows and workflows_create tools. Use proactively when executing repo-specific procedures, documenting repeatable processes, or when <available_workflows> contains matching entries.
Examples: - user: "Release a new version" -> check available_workflows, load matching SOP, follow steps - user: "How do we deploy?" -> call workflows to list, load relevant procedure - user: "Document this process" -> use workflows_create to capture the SOP - user: "Create a migration workflow" -> use workflows_create with structured body - user: "Don't make the same mistake again" -> use workflows_create to the correct workflow
Workflows
Before Executing Repo-Specific Procedures
- Check
<available_workflows>in the system prompt - If a matching workflow exists, call
workflowswith that name - Follow the returned procedure step-by-step
- If you must adapt steps, explain why the deviation is safe
After Completing a Reusable Process
- Identify if the process could be repeated (deployments, migrations, releases, etc.)
- Structure what you learned:
- Prerequisites: What must be true before starting
- Steps: Numbered, with exact commands
- Verification: How to confirm success
- Troubleshooting: What can fail and how to recover
- Call
workflows_createwith:name: Descriptive identifierdescription: 5-10 word summarybody: Markdown with the structured content above
When a Workflow Doesn't Match Reality
If a loaded workflow doesn't match your experience or you discover a new edge case:
- Read the workflow file at
.opencode/workflows/<name>/WORKFLOW.md - Use the Edit tool to surgically update the workflow:
- Add missing steps or prerequisites
- Correct inaccurate commands or outputs
- Document the new edge case in Troubleshooting
- Keep changes minimal and focused on what you learned
Do NOT create duplicate workflows. Always update the existing one.
- MUST check
<available_workflows>before repo-specific procedures - MUST load workflow when a matching entry exists
- MUST create workflow after completing a reusable process
- MUST use Edit tool on
.opencode/workflows/*/WORKFLOW.mdto correct inaccuracies or add edge cases - MUST update existing workflows rather than creating variants
- SHOULD include exact commands and expected outputs in steps
- SHOULD document failure scenarios and recovery steps
- MAY add workflow references to nested
AGENTS.mdfor directory-specific suggestions