| name | subagent-driven-development |
| description | Use when executing implementation plans with independent tasks in the current session |
Subagent-Driven Development
Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
Why subagents: You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
Core principle: Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
When to Use
vs. Executing Plans (parallel session):
- Same session (no context switch)
- Fresh subagent per task (no context pollution)
- Two-stage review after each task: spec compliance first, then code quality
- Faster iteration (no human-in-loop between tasks)
The Process
Per-task workflow:
- Dispatch implementer subagent
- If implementer asks questions → answer and provide context
- Implementer: implement, test, commit, self-review
- Dispatch spec compliance reviewer
- Confirm spec match? If issues → implementer fixes spec gaps → re-review
- Dispatch code quality reviewer
- Approves? If issues → implementer fixes → re-review
- Mark task complete → move to next task
Model Selection
Use the least powerful model that can handle each role to conserve cost and increase speed.
Mechanical implementation tasks (isolated functions, clear specs, 1-2 files): use fast, cheap model.
Integration and judgment tasks (multi-file coordination, pattern matching, debugging): use standard model.
Architecture, design, and review tasks: use most capable available model.
Task complexity signals:
- Touches 1-2 files with complete spec → cheap model
- Touches multiple files with integration concerns → standard model
- Requires design judgment or broad codebase understanding → most capable model
Handling Implementer Status
DONE: Proceed to spec compliance review.
DONE_WITH_CONCERNS: Read concerns before proceeding. Address correctness/scope issues before review.
NEEDS_CONTEXT: Provide missing context and re-dispatch.
BLOCKED: Assess the blocker:
- Context problem → provide more context and re-dispatch same model
- Requires more reasoning → re-dispatch with more capable model
- Task too large → break into smaller pieces
- Plan itself wrong → escalate to human
Never ignore escalation or force same model retry without changes.
Prompt Templates
./implementer-prompt.md - Dispatch implementer subagent
./spec-reviewer-prompt.md - Dispatch spec compliance reviewer subagent
./code-quality-reviewer-prompt.md - Dispatch code quality reviewer subagent
Red Flags
Never:
- Start implementation on main/master branch without explicit user consent
- Skip reviews (spec compliance OR code quality)
- Proceed with unfixed issues
- Dispatch multiple implementation subagents in parallel (conflicts)
- Make subagent read plan file (provide full text instead)
- Skip scene-setting context
- Ignore subagent questions
- Accept "close enough" on spec compliance
- Skip review loops
- Let implementer self-review replace actual review
- Start code quality review before spec compliance is ✓
- Move to next task while either review has open issues
If reviewer finds issues:
- Implementer (same subagent) fixes them
- Reviewer reviews again
- Repeat until approved
Integration
Required workflow skills:
- superpowers:using-git-worktrees - REQUIRED: Set up isolated workspace before starting
- superpowers:writing-plans - Creates the plan this skill executes
- superpowers:requesting-code-review - Code review template for reviewer subagents
- superpowers:finishing-a-development-branch - Complete development after all tasks
Subagents should use:
- superpowers:test-driven-development - Subagents follow TDD for each task
Alternative workflow:
- superpowers:executing-plans - Use for parallel session instead of same-session execution