| name | workflow-run |
| description | Execute a stored workflow with step-by-step orchestration |
| user_invocable | true |
/workflow-run — Execute a Stored Workflow
Execute a previously created workflow with step-by-step orchestration, tracking progress through MinnsDB's graph.
Usage
When the user invokes /workflow-run <workflow_id>:
Execution Loop
-
Load workflow state:
minns workflow status <workflow_id>
This shows all steps, their current states, roles, tasks, and dependencies.
-
Identify ready steps: Steps whose dependencies are all completed and whose own state is pending or ready.
-
For each ready step, transition it to running:
minns workflow step-transition <workflow_id> <step_id> --state running
-
Execute the step based on its role:
code — Read relevant files, make changes, write code
architect / design — Analyze codebase, produce design decisions
test — Write tests, run them via Bash
review — Use the Explore agent to analyze changes
research — Use the Explore agent for investigation
ops — Run infrastructure/deployment commands
-
Report completion:
minns workflow step-transition <workflow_id> <step_id> --state completed --result "<summary of what was done>"
Or on failure:
minns workflow step-transition <workflow_id> <step_id> --state failed --result "<what went wrong>"
-
Repeat — check status again and process newly ready steps until all steps are completed or a failure requires intervention.
-
Capture outcome:
minns learn "Workflow completed: <summary>" --category workflow_result --tags workflow
Parallel Execution
Steps that are independent (no shared dependencies) can be executed in parallel using subagents:
- Launch an Agent for each ready step
- Wait for all to complete
- Report results
Error Handling
When a step fails:
- Report the failure via
step-transition --state failed
- Present the error to the user
- Offer options:
- Retry — transition back to
running and try again
- Skip — mark as
completed with a note and continue
- Abort — stop the workflow
- Modify — update the workflow definition and retry
Examples
/workflow-run 42
/workflow-run 1337