Subagent-Driven Development
When to Use
Activate when a plan has 3+ independent tasks that can be implemented and reviewed separately. Do NOT use for single-task or tightly-coupled work.
Per-Task Loop
For each task in the plan:
- Dispatch Implementer — Fresh subagent with task context (see
references/implementer-prompt.md) - Spec Review — Fresh subagent verifies code matches spec (see
references/spec-reviewer-prompt.md) - Quality Review — Fresh subagent reviews code quality (see
references/code-quality-reviewer-prompt.md) - Fix Loop — If either review fails: fix → re-review (max 3 iterations)
- Mark Done — Update plan TODO, move to next task
Two-Stage Review
Every task gets TWO independent reviews, in order:
Stage 1: Spec Compliance
- Does the code do what the spec says?
- Line-by-line comparison against requirements
- Output: ✅ matches / ❌ deviates with file:line
Stage 2: Code Quality
- Is the code well-written?
- Security, performance, maintainability
- Only runs AFTER spec compliance passes
Rules
- Never start work on main/master without user consent
- Never skip either review stage
- Never dispatch parallel implementation subagents (serial only — one task at a time)
- Each subagent gets a FRESH context (no stale state)
- Max 3 fix-review iterations per task; escalate to user after 3
Task Dispatch Order
- Foundation tasks first (shared utilities, types, config)
- Independent features in plan order
- Integration tasks last (wire components together)
Prompt Templates
references/implementer-prompt.md— Task context and self-review checklistreferences/spec-reviewer-prompt.md— Skeptical spec comparisonreferences/code-quality-reviewer-prompt.md— Quality review after spec passes
Related Skills
verification-before-completion— Verify each task before marking donecode-review— Quality review patternsplan— Plan structure that feeds task dispatch