Coordinators
Four coordinator skills that orchestrate multi-step workflows end to end
Four Coordinators
Each coordinator delegates to subagents -- it never writes code itself.
| Coordinator | Phases | Scope | Model Strategy |
|---|---|---|---|
dx-req | 4 steps | Requirements gathering | Sonnet + Opus (checklist) |
dx-step-all | N steps (dynamic) | Plan execution loop | Sonnet + Opus (fix/heal) + Haiku (test/commit) |
dx-bug-all | 3 steps | Bug triage, verify, fix | Sonnet + Opus (fix planning) |
dx-agent-all | 12 phases (max 13) | Full story to PR pipeline | All tiers |
Common Patterns
Shared design principles across all coordinators.
Coordinator-Only Architecture
All coordinators use disable-model-invocation: true — they NEVER write code themselves.
Every phase is delegated via direct Skill() invocation, keeping the main
context lean (approximately 10 tokens per status update vs approximately 200 for full file reads).
Isolated Context Management
Task tool calls use isolated subagents. Skills invoked via Skill tool have context: fork.
The main orchestrator only sees compact return summaries, never reads spec files.
Prevents context compaction in long-running pipelines.
Idempotent Execution
Every skill checks if its output file already exists and is still valid before regenerating. Steps report one of: created, updated, or skipped.
Convention-Based Data Flow
No data is passed between skills. All skills find each other’s output by predictable filenames
in .ai/specs/<id>-<slug>/.
Self-Healing Architecture
step-fix (first responder): one attempt to fix compilation/test/review failures. step-heal (deep analysis): creates corrective steps after 2 consecutive fix failures. 3-cycle review loop: code review, auto-fix, rebuild, re-review (max 3 cycles). 2 healing cycles max: if healing fails twice, stop for human intervention.
Cross-Repo Delegation
When DX_PIPELINE_MODE is set, code-writing coordinators check if the work targets
another repo. If so, they write delegate.json and STOP — the YAML step reads it
and queues the equivalent pipeline in the target repo.
dx-req
Requirements gathering pipeline -- 4 steps
/dx-req <work-item-id> /dx-req DoR Gate
The DoR step is a gate — if blocking questions exist, the pipeline pauses. The BA checks items
in the ADO comment. Re-running /dx-req reads the checkbox state and re-validates.
Already-completed steps are skipped on re-run.
dx-step-all
Plan execution loop -- dynamic number of steps
/dx-step-all /dx-step /dx-step-fix On Failure: step-fix
If a step fails (compile error, test failure, review rejection), dx-step-fix makes
one attempt to diagnose and fix the issue.
On 2 Consecutive Failures: step-heal
After 2 consecutive fix failures, dx-step-fix escalates to root cause analysis and creates
corrective steps in implement.md. Maximum 2 escalation cycles before stopping for human intervention.
Self-Learning
dx-step-all logs fix patterns to .ai/learning/raw/fixes.jsonl. When a
pattern reaches 3+ successes with 0 failures, it is promoted to
.claude/rules/learned-fix-*.md — auto-loaded on every future run.
dx-bug-all
Bug fix pipeline -- 3 steps
/dx-bug-all <bug-id> /dx-bug-triage /dx-bug-verify /dx-bug-fix Hotspot Detection
dx-bug-all logs bug patterns to .ai/learning/raw/bugs.jsonl. When a
component has 3+ bugs, it warns about a hotspot — helping identify fragile areas in the codebase.
dx-agent-all
The most comprehensive coordinator -- up to 13 phases from ticket to PR
/dx-agent-all <work-item-id> Interactive by default -- pauses after requirements. Add 'autonomous' to skip pauses.
dx-req dx-figma-extract dx-figma-prototype dx-plan dx-step-all dx-step-build dx-step-verify dx-pr-commit aem-verify dx-pr dx-doc-gen Phase Details
Each phase of dx-agent-all explained.
Phase 1: Requirements (dx-req)
Subagent runs the full requirements pipeline: fetch, dor, explain, research, share. Interactive: Pauses for human review of dor-report.md and explain.md. Autonomous: Continues immediately. Fail condition: ADO fetch fails = ABORT.
Phase 1.5a: Cross-Repo Check (pipeline mode only)
Only runs when DX_PIPELINE_MODE is set. Reads research.md for cross-repo scope.
If current repo is not the target: writes delegate.json and STOPS. Skipped in local mode.
Phase 1.5 + 2: Figma (optional)
Scans raw-story.md for Figma URLs. If found, extracts design context (Phase 1.5) and generates a standalone HTML/CSS prototype using 2 parallel Haiku agents for convention discovery (Phase 2). Non-blocking: If Figma MCP fails, continues with a warning.
Phase 2b: Planning
Runs dx-plan, dx-plan-validate, and optionally dx-plan-resolve. Uses Opus with ultrathink for deep reasoning about dependencies. Fail condition: Validation FAIL = STOP.
Phase 3: Execution (dx-step-all)
For each pending step: execute, test, review, commit. Self-healing: step-fix (1 attempt), step-heal (corrective steps, max 2 cycles). Commits deferred to after build verification.
Phase 4: Build Verification
Max 6 fix attempts. One error at a time, minimal fixes. Fail condition: Still broken after 6 = skip review/commit, continue to summary.
Phase 4.5: Full Code Review (dx-step-verify)
6-phase gate: compile, lint, test, secret scan, architecture, code review. Code review uses dx-code-reviewer (Opus, 80%+ confidence). Review-fix loop: max 3 cycles. If FAILED after 3 cycles, step-heal creates corrective steps, rebuilds, and re-reviews (max 2 healing cycles).
Phase 5a + 6: Commit + PR
Only if build AND review passed. Reads auto_commit and auto_pr from config preferences.
Phase 7: Documentation (optional)
Only if PR created. aem-doc-gen runs first (AEM projects), then dx-doc-gen
reads its output and posts wiki page to sprint subfolder.
Model Usage Per Phase
Each phase uses the right model tier for cost and quality.
| Phase | Model | Reasoning |
|---|---|---|
| Requirements (fetch/explain/research) | Sonnet | Execution tasks |
| Requirements (checklist) | Opus | Deep analysis of ambiguities |
| Figma extract | Sonnet | MCP data extraction |
| Figma prototype (conventions) | Haiku | CSS/HTML convention discovery |
| Figma prototype (generation) | Sonnet | Standalone HTML/CSS prototype |
| Planning (plan/validate/resolve) | Opus | Deep reasoning, ultrathink |
| Step execution | Sonnet | Code writing |
| Step testing | Haiku | Simple command execution |
| Step review | Opus | Code quality analysis |
| Step fix / heal | Opus | Root cause analysis, strategy change |
| Step commit | Haiku | Simple git operations |
| Build | Sonnet | Error diagnosis |
| Code review (full) | Opus | Confidence-based quality filter |
| PR creation | Sonnet | Summary writing |
| Documentation | Sonnet | Content generation |
Token Budget Estimate
Typical story without healing or failures.
| Phase | Estimated Tokens | Notes |
|---|---|---|
| req-all | ≈50K | 4 sub-steps, parallel agents |
| plan + validate | ≈80K | Ultrathink, deep codebase analysis |
| step-all (5 steps) | ≈150K | Most expensive phase |
| build | ≈20K | Quick fix loops |
| code review | ≈60K | Full diff review, Opus |
| commit + PR | ≈10K | Lightweight |
| Total | ≈370K | Without healing/fixes |
With Failures
With failures and healing, a story can reach 500K-800K tokens. The self-healing architecture trades tokens for autonomy — most issues resolve without human intervention.
Phase Comparison
Which coordinator covers which phases.
| Phase | dx-req | dx-step-all | dx-bug-all | dx-agent-all |
|---|---|---|---|---|
| Fetch / Triage | fetch | — | triage | req-all |
| Explain | yes | — | — | via req-all |
| Research | yes | — | — | via req-all |
| Figma | — | — | — | optional |
| Planning | — | — | — | plan+validate+resolve |
| Feature Branch | — | yes | — | yes |
| Bug Verify | — | — | browser | — |
| Step Execution | — | loop | via bug-fix | via step-all |
| Build | — | — | via bug-fix | step-build |
| Code Review | — | — | — | step-verify |
| Commit | — | per step | via bug-fix | step-commit |
| PR Creation | — | — | via bug-fix | dx-pr |
| Documentation | — | — | — | doc-gen |
Interactive vs Autonomous
Only dx-agent-all pauses by default.
| Coordinator | Interactive (default) | Autonomous |
|---|---|---|
dx-req | No pauses | No pauses |
dx-step-all | No pauses | No pauses |
dx-bug-all | No pauses | No pauses |
dx-agent-all | Pause after requirements, auto-continue after planning | Straight through |
/dx-agent-all 2416553 autonomous
Superpowers Integration
Optional structured methodology hooks that enhance planning, debugging, and verification.
Design Exploration (Planning)
dx-plan supports an optional pre-planning step that invokes
superpowers:brainstorming to surface alternative approaches before committing
to an implementation strategy. Helps avoid tunnel vision on complex stories.
Verification Gate (Review)
After the review-fix loop concludes, dx-step-verify optionally invokes
superpowers:verification-before-completion for a final cross-cutting check —
confirming all acceptance criteria are met before marking the step done.
Systematic Debugging (Fix)
dx-step-fix optionally invokes superpowers:systematic-debugging
for structured 4-phase diagnosis (Observe, Hypothesize, Test, Fix) when the error is
ambiguous or multi-layered.
Execution Methodology
Before Phase 1 begins, dx-agent-all runs an “Execution Methodology” setup step
that optionally invokes superpowers:executing-plans to bootstrap structured
plan-execution behaviour. All superpowers hooks fall back gracefully when the plugin is not installed.
Extended Thinking / Ultrathink
Deep reasoning modes used in planning and healing phases.
Planning Phase (Opus)
dx-plan and dx-plan-validate use ultrathink mode for deep reasoning
about dependencies, step ordering, and risk assessment. This is the most token-intensive
phase (≈80K tokens) but produces higher-quality plans with fewer downstream failures.
Escalation Phase (Opus)
dx-step-fix escalates to extended thinking for deep root-cause analysis when 2
consecutive fix attempts fail. The escalated fix sees the full error context, previous fix attempts,
and the original step intent to devise a fundamentally different approach.
Token Budget with Healing
The base token budget of ≈370K assumes no failures. With healing and fix cycles, a story can reach 500K-800K tokens. Each healing cycle adds ≈40-80K tokens for deep analysis plus the cost of executing corrective steps. The system trades tokens for autonomy — most issues resolve without human intervention.