This page documents the subagent-driven-development skill, which executes implementation plans by dispatching fresh subagents per task with two-stage review. This skill enables autonomous execution of independent tasks in the current session, with automated quality gates ensuring both spec compliance and code quality.
For writing the plans that this skill executes, see Writing Implementation Plans. For batch execution with human checkpoints instead, see Executing Plans in Batches. For the overall workflow context, see Complete Workflow Pipeline.
Sources: skills/subagent-driven-development/SKILL.md1-10 README.md11-15
Subagent-driven development is an execution mode that prioritizes speed and quality through a controller-subagent architecture. The controlling agent reads the implementation plan once, extracts all tasks, then dispatches fresh subagents for each task. After each task completes, two reviewer subagents verify the work: one checks spec compliance, the other checks code quality.
Core principle: Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration.
This approach differs fundamentally from traditional execution:
Sources: skills/subagent-driven-development/SKILL.md1-11 README.md11-15
Use subagent-driven-development when:
writing-plans)Use executing-plans instead when:
Don't use either when:
Sources: skills/subagent-driven-development/SKILL.md12-38
Key architectural decisions:
Controller reads plan once: The controller agent loads the plan file at the start and extracts all tasks. This avoids repeated file reading overhead in subagents.
Controller provides full task text: When dispatching subagents, the controller includes the complete task specification plus relevant context. Subagents never read the plan file directly.
Fresh subagent per task: Each implementation task gets a new subagent with clean context. This prevents confusion from previous tasks' implementations.
Separate reviewer subagents: Spec and quality reviews use distinct subagents, each focused on a single concern. This prevents conflating "does it match the spec?" with "is it well-built?"
Review loops: If a reviewer finds issues, the same implementer subagent fixes them (maintaining context), then the reviewer reviews again. This loop continues until approved.
Sources: skills/subagent-driven-development/SKILL.md39-82 skills/subagent-driven-development/SKILL.md167-197
1. Setup Phase
TodoWrite with all tasks for tracking2. Per-Task Execution
test-driven-development skill3. Two-Stage Review
Stage 1: Spec Compliance - Dispatch spec reviewer subagent with ./spec-reviewer-prompt.md
Stage 2: Code Quality - Dispatch quality reviewer subagent with ./code-quality-reviewer-prompt.md
4. Task Completion
TodoWrite5. Finishing
finishing-a-development-branch skillSources: skills/subagent-driven-development/SKILL.md39-82 skills/subagent-driven-development/SKILL.md91-165
The skill includes three prompt template files that define how subagents are dispatched:
| Template File | Role | Dispatched When | Focus |
|---|---|---|---|
./implementer-prompt.md | Implementation subagent | At start of each task | Write code, follow TDD, self-review |
./spec-reviewer-prompt.md | Spec compliance reviewer | After implementation complete | Verify code matches spec exactly |
./code-quality-reviewer-prompt.md | Code quality reviewer | After spec review passes | Check best practices, patterns, quality |
Prompt file to dispatch mapping (per task):
Sources: skills/subagent-driven-development/implementer-prompt.md1-79 skills/subagent-driven-development/spec-reviewer-prompt.md1-62 skills/subagent-driven-development/code-quality-reviewer-prompt.md1-19
Controller dispatches subagent:
Implementer subagent may ask questions:
Review dispatch includes git context:
Review loops:
Sources: skills/subagent-driven-development/SKILL.md85-90 skills/subagent-driven-development/SKILL.md100-165
The two-stage review architecture separates two distinct concerns that often conflict:
Spec Compliance Review: "Does this code do exactly what was requested?"
Code Quality Review: "Is this code well-built?"
Why this order matters: Checking quality before spec compliance wastes effort. If code doesn't match the spec, quality doesn't matter yet. Fix spec compliance first, then ensure quality.
Spec reviewer focuses on:
Common spec issues:
Sources: skills/subagent-driven-development/SKILL.md116-145
Quality reviewer focuses on:
Common quality issues:
Issue severity levels:
Sources: skills/subagent-driven-development/SKILL.md145-156
Both review types follow the same loop pattern:
Critical constraint: Code quality review MUST NOT start until spec compliance is approved. Checking quality before spec wastes effort on code that might need to be rewritten or removed.
Sources: skills/subagent-driven-development/SKILL.md67-77 skills/subagent-driven-development/SKILL.md186-191
The skill explicitly prohibits several patterns that cause problems:
Process violations:
main or master branch without explicit user consentContext pollution:
Review shortcuts:
Question handling:
Sources: skills/subagent-driven-development/SKILL.md199-229
These skills MUST be used as part of the subagent-driven-development workflow:
| Skill | When Used | Purpose |
|---|---|---|
using-git-worktrees | Before starting | Set up isolated workspace on separate branch |
writing-plans | Before starting | Create the implementation plan to execute |
finishing-a-development-branch | After all tasks | Complete development, choose merge/PR/keep/discard |
Sources: skills/subagent-driven-development/SKILL.md230-237
Subagents automatically use these skills during their work:
| Skill | Used By | Purpose |
|---|---|---|
test-driven-development | Implementer subagents | Enforce RED-GREEN-REFACTOR cycle |
requesting-code-review | Reviewer subagents | Code review template and structure |
Sources: skills/subagent-driven-development/SKILL.md238-240
| Skill | When to Use Instead | Key Difference |
|---|---|---|
executing-plans | Parallel session or human checkpoints needed | Batch execution with manual review vs automated review |
For detailed comparison, see Executing Plans in Batches.
Sources: skills/subagent-driven-development/SKILL.md241-243
Fresh context per task:
Natural TDD adherence:
test-driven-development naturallyQuestion surfacing:
Sources: skills/subagent-driven-development/SKILL.md167-174
Same session execution:
Automated quality gates:
Efficiency gains:
Sources: skills/subagent-driven-development/SKILL.md175-185
Self-review catches early issues:
Two-stage review prevents conflation:
Review loops ensure fixes work:
Sources: skills/subagent-driven-development/SKILL.md186-191
Higher upfront cost:
Lower overall cost:
Sources: skills/subagent-driven-development/SKILL.md192-198 README.md13-15
skills/subagent-driven-development/
├── SKILL.md # Main skill documentation
├── implementer-prompt.md # Prompt for implementation subagent
├── spec-reviewer-prompt.md # Prompt for spec compliance reviewer
└── code-quality-reviewer-prompt.md # Prompt for quality reviewer
Sources: skills/subagent-driven-development/SKILL.md85-90
The skill is purely documentation-based, but it integrates with several code systems:
Platform-native tools used:
TodoWrite tool (or platform equivalent) for task trackingTask tool (or @mention on OpenCode, spawn_agent on Codex) for subagent dispatchSkill tool for loading prompt templatesPlatform-specific mappings:
| Abstract Tool | Claude Code | OpenCode | Codex |
|---|---|---|---|
| TodoWrite | Native TodoWrite | update_plan | update_plan |
| Task | Native Task (subagent system) | @mention | spawn_agent |
| Skill | Native Skill | Native skill | CLI use-skill |
For tool mapping details, see Tool Mapping Layer.
Workflow tool usage map (concept → code entity):
Sources: skills/subagent-driven-development/SKILL.md85-90 skills/subagent-driven-development/SKILL.md230-243 skills/subagent-driven-development/code-quality-reviewer-prompt.md10-18
Sources: skills/subagent-driven-development/SKILL.md1-243
Before using this skill:
brainstorming - design must be approvedusing-git-worktrees - isolated workspace must be set upwriting-plans - implementation plan must existDuring use:
test-driven-developmentrequesting-code-review templateAfter completion:
finishing-a-development-branch - verify tests, choose completion optionSources: skills/subagent-driven-development/SKILL.md230-243 README.md80-94
The skill documentation includes a complete example showing the full controller-subagent interaction:
Setup:
[Read plan file once: docs/plans/feature-plan.md]
[Extract all 5 tasks with full text and context]
[Create TodoWrite with all tasks]
Task 1: Successful first-pass:
[Dispatch implementer with full task text]
Implementer: "Before I begin - should hook be user or system level?"
Controller: "User level (~/.config/superpowers/hooks/)"
Implementer: Implements, tests (5/5 passing), self-reviews, commits
[Dispatch spec reviewer]
Spec reviewer: ✅ Spec compliant
[Dispatch quality reviewer]
Quality reviewer: Approved
Task 2: Review loops:
[Dispatch implementer]
Implementer: Implements, 8/8 tests passing, commits
[Dispatch spec reviewer]
Spec reviewer: ❌ Issues:
- Missing: Progress reporting (spec required)
- Extra: --json flag (not requested)
[Implementer fixes, commits]
[Spec reviewer reviews again]
Spec reviewer: ✅ Spec compliant now
[Dispatch quality reviewer]
Quality reviewer: Issues (Important): Magic number (100)
[Implementer fixes, extracts PROGRESS_INTERVAL constant]
[Quality reviewer reviews again]
Quality reviewer: ✅ Approved
Full trace at skills/subagent-driven-development/SKILL.md91-165
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.