Developer Edition Only — This content applies to the Developer Edition license.
Understanding how workflows operate helps you build effective extensions.
Core Concepts #
Workflow — A directed acyclic graph (DAG) of phases. Defines the sequence of work for a project.
Phase — A single step in the workflow. Each phase has a type, an assigned role, instructions, and acceptance criteria. Maps to a row in project_phases.
Connection — An edge between phases. Defines execution order and routing (sequential flow, approval paths, rework paths).
Phase Types #
| Type | Purpose |
|---|---|
start | Entry point — every workflow has exactly one |
work | An AI agent executes this phase |
decision | A branching point — routes to different paths based on outcome |
end_completed | Terminal node — workflow is done |
Phase Statuses #
Phases move through these statuses during execution:
| Status | Meaning |
|---|---|
pending | Waiting for predecessor phases to complete |
active | Ready to run — predecessors are all done |
running | An AI agent is currently executing this phase |
completed | Phase finished successfully |
failed | Phase failed (agent crashed or reported failure) |
rework | Phase is being reworked after a QA or review finding |
skipped | Phase was skipped (marked as skippable and a predecessor failed) |
How Phases Execute #
- When all predecessor phases are completed, a phase becomes active
- The system spawns an AI agent for the active phase
- The agent reads its instructions and works on the task
- The agent calls
dmsi_phase_completevia the MCP bridge when done - The system advances the workflow to the next phase(s)
- If the phase fails or needs rework, the workflow routes accordingly
Connection Types #
| Type | Purpose |
|---|---|
flow | Standard sequential connection |
approved | Taken when a decision phase approves |
rework | Taken when rework is needed — routes back to an earlier phase |
Rework #
When a review or QA phase identifies issues, the workflow can route back to an earlier phase for rework. The target phase resets to pending, a new agent is spawned, and execution continues from there.
