$npx -y skills add obra/superpowers --skill subagent-driven-developmentUse when executing implementation plans with independent tasks in the current session
| 1 | # Subagent-Driven Development |
| 2 | |
| 3 | Execute plan by dispatching a fresh implementer subagent per task, a task review (spec compliance + code quality) after each, and a broad whole-branch review at the end. |
| 4 | |
| 5 | **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. |
| 6 | |
| 7 | **Core principle:** Fresh subagent per task + task review (spec + quality) + broad final review = high quality, fast iteration |
| 8 | |
| 9 | **Narration:** between tool calls, narrate at most one short line — the |
| 10 | ledger and the tool results carry the record. |
| 11 | |
| 12 | **Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it. |
| 13 | |
| 14 | ## When to Use |
| 15 | |
| 16 | ```dot |
| 17 | digraph when_to_use { |
| 18 | "Have implementation plan?" [shape=diamond]; |
| 19 | "Tasks mostly independent?" [shape=diamond]; |
| 20 | "Stay in this session?" [shape=diamond]; |
| 21 | "subagent-driven-development" [shape=box]; |
| 22 | "executing-plans" [shape=box]; |
| 23 | "Manual execution or brainstorm first" [shape=box]; |
| 24 | |
| 25 | "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"]; |
| 26 | "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"]; |
| 27 | "Tasks mostly independent?" -> "Stay in this session?" [label="yes"]; |
| 28 | "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"]; |
| 29 | "Stay in this session?" -> "subagent-driven-development" [label="yes"]; |
| 30 | "Stay in this session?" -> "executing-plans" [label="no - parallel session"]; |
| 31 | } |
| 32 | ``` |
| 33 | |
| 34 | **vs. Executing Plans (parallel session):** |
| 35 | - Same session (no context switch) |
| 36 | - Fresh subagent per task (no context pollution) |
| 37 | - Review after each task (spec compliance + code quality), broad review at the end |
| 38 | - Faster iteration (no human-in-loop between tasks) |
| 39 | |
| 40 | ## The Process |
| 41 | |
| 42 | ```dot |
| 43 | digraph process { |
| 44 | rankdir=TB; |
| 45 | |
| 46 | subgraph cluster_per_task { |
| 47 | label="Per Task"; |
| 48 | "Dispatch implementer subagent (./implementer-prompt.md)" [shape=box]; |
| 49 | "Implementer subagent asks questions?" [shape=diamond]; |
| 50 | "Answer questions, provide context" [shape=box]; |
| 51 | "Implementer subagent implements, tests, commits, self-reviews" [shape=box]; |
| 52 | "Write diff file, dispatch task reviewer subagent (./task-reviewer-prompt.md)" [shape=box]; |
| 53 | "Task reviewer reports spec ✅ and quality approved?" [shape=diamond]; |
| 54 | "Dispatch fix subagent for Critical/Important findings" [shape=box]; |
| 55 | "Mark task complete in todo list and progress ledger" [shape=box]; |
| 56 | } |
| 57 | |
| 58 | "Read plan, note context and global constraints, create todos" [shape=box]; |
| 59 | "More tasks remain?" [shape=diamond]; |
| 60 | "Dispatch final code reviewer subagent (../requesting-code-review/code-reviewer.md)" [shape=box]; |
| 61 | "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen]; |
| 62 | |
| 63 | "Read plan, note context and global constraints, create todos" -> "Dispatch implementer subagent (./implementer-prompt.md)"; |
| 64 | "Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?"; |
| 65 | "Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"]; |
| 66 | "Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)"; |
| 67 | "Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"]; |
| 68 | "Implementer subagent implements, tests, commits, self-reviews" -> "Write diff file, dispatch task reviewer subagent (./task-reviewer-prompt.md)"; |
| 69 | "Write diff file, dispatch task reviewer subagent (./task-reviewer-prompt.md)" -> "Task reviewer reports spec ✅ and quality approved?"; |
| 70 | "Task reviewer reports spec ✅ and quality approved?" -> "Dispatch fix subagent for Critical/Important findings" [label="no"]; |
| 71 | "Dispatch fix subagent for Critical/Important findings" -> "Write diff file, dispatch task reviewer subagent (./task-reviewer-prompt.md)" [label="re-review"]; |
| 72 | "Task reviewer reports spec ✅ and quality approved?" -> "Mark task complete in todo list and progress ledger" [label="yes"]; |
| 73 | "Mark task complete in todo list and progress ledger" -> "More tasks remain?"; |
| 74 | "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"]; |
| 75 | "More tasks remain?" -> "Dispatch fin |