Loading...
Loading...
Used when executing implementation plans with independent tasks in the current session
npx skill4agent add jnmetacode/superpowers-zh subagent-driven-developmentdigraph when_to_use {
"有实现计划?" [shape=diamond];
"任务基本独立?" [shape=diamond];
"留在当前会话?" [shape=diamond];
"subagent-driven-development" [shape=box];
"executing-plans" [shape=box];
"手动执行或先头脑风暴" [shape=box];
"有实现计划?" -> "任务基本独立?" [label="是"];
"有实现计划?" -> "手动执行或先头脑风暴" [label="否"];
"任务基本独立?" -> "留在当前会话?" [label="是"];
"任务基本独立?" -> "手动执行或先头脑风暴" [label="否 - 紧密耦合"];
"留在当前会话?" -> "subagent-driven-development" [label="是"];
"留在当前会话?" -> "executing-plans" [label="否 - 并行会话"];
}digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="每个任务";
"Assign Implementation Subagent (./implementer-prompt.md)" [shape=box];
"Does Implementation Subagent have questions?" [shape=diamond];
"Answer questions, provide context" [shape=box];
"Implementation Subagent implements, tests, commits, self-reviews" [shape=box];
"Assign Specification Review Subagent (./spec-reviewer-prompt.md)" [shape=box];
"Does Specification Review Subagent confirm code matches specs?" [shape=diamond];
"Implementation Subagent fixes specification gaps" [shape=box];
"Assign Code Quality Review Subagent (./code-quality-reviewer-prompt.md)" [shape=box];
"Does Code Quality Review Subagent approve?" [shape=diamond];
"Implementation Subagent fixes quality issues" [shape=box];
"Mark task complete in TodoWrite" [shape=box];
}
"Read plan, extract full text of all tasks, record context, create TodoWrite" [shape=box];
"Are there remaining tasks?" [shape=diamond];
"Assign Final Code Review Subagent to review overall implementation" [shape=box];
"Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
"Read plan, extract full text of all tasks, record context, create TodoWrite" -> "Assign Implementation Subagent (./implementer-prompt.md)";
"Assign Implementation Subagent (./implementer-prompt.md)" -> "Does Implementation Subagent have questions?";
"Does Implementation Subagent have questions?" -> "Answer questions, provide context" [label="Yes"];
"Answer questions, provide context" -> "Assign Implementation Subagent (./implementer-prompt.md)";
"Does Implementation Subagent have questions?" -> "Implementation Subagent implements, tests, commits, self-reviews" [label="No"];
"Implementation Subagent implements, tests, commits, self-reviews" -> "Assign Specification Review Subagent (./spec-reviewer-prompt.md)";
"Assign Specification Review Subagent (./spec-reviewer-prompt.md)" -> "Does Specification Review Subagent confirm code matches specs?";
"Does Specification Review Subagent confirm code matches specs?" -> "Implementation Subagent fixes specification gaps" [label="No"];
"Implementation Subagent fixes specification gaps" -> "Assign Specification Review Subagent (./spec-reviewer-prompt.md)" [label="Re-review"];
"Does Specification Review Subagent confirm code matches specs?" -> "Assign Code Quality Review Subagent (./code-quality-reviewer-prompt.md)" [label="Yes"];
"Assign Code Quality Review Subagent (./code-quality-reviewer-prompt.md)" -> "Does Code Quality Review Subagent approve?";
"Does Code Quality Review Subagent approve?" -> "Implementation Subagent fixes quality issues" [label="No"];
"Implementation Subagent fixes quality issues" -> "Assign Code Quality Review Subagent (./code-quality-reviewer-prompt.md)" [label="Re-review"];
"Does Code Quality Review Subagent approve?" -> "Mark task complete in TodoWrite" [label="Yes"];
"Mark task complete in TodoWrite" -> "Are there remaining tasks?";
"Are there remaining tasks?" -> "Assign Implementation Subagent (./implementer-prompt.md)" [label="Yes"];
"Are there remaining tasks?" -> "Assign Final Code Review Subagent to review overall implementation" [label="No"];
"Assign Final Code Review Subagent to review overall implementation" -> "Use superpowers:finishing-a-development-branch";
}./implementer-prompt.md./spec-reviewer-prompt.md./code-quality-reviewer-prompt.mdYou: I'm using subagent-driven development to execute this plan.
[Read plan file once: docs/superpowers/plans/feature-plan.md]
[Extract full text and context for all 5 tasks]
[Create TodoWrite with all tasks]
Task 1: Hook Installation Script
[Get Task 1 text and context (already extracted)]
[Assign Implementation Subagent with full task text + context]
Implementer: "Before I start — should the hook be installed at user level or system level?"
You: "User level (~/.config/superpowers/hooks/)"
Implementer: "Got it. Starting implementation now..."
[Later] Implementer:
- Implemented install-hook command
- Added tests, 5/5 passed
- Self-review: Missing --force parameter, added it
- Committed
[Assign Specification Compliance Review]
Spec Reviewer: ✅ Complies with specs - All requirements met, no extra content
[Get git SHA, assign Code Quality Review]
Code Reviewer: Pros: Good test coverage, clean code. Issues: None. Approved.
[Mark Task 1 complete]
Task 2: Recovery Mode
[Get Task 2 text and context (already extracted)]
[Assign Implementation Subagent with full task text + context]
Implementer: [No questions, starts directly]
Implementer:
- Added verify/repair mode
- 8/8 tests passed
- Self-review: All good
- Committed
[Assign Specification Compliance Review]
Spec Reviewer: ❌ Issues:
- Missing: Progress reporting (spec requires "report every 100 items")
- Extra: Added --json parameter (not requested)
[Implementer fixes issues]
Implementer: Removed --json parameter, added progress reporting
[Spec Reviewer re-reviews]
Spec Reviewer: ✅ Now complies with specs
[Assign Code Quality Review]
Code Reviewer: Pros: Solid. Issue (important): Magic number (100)
[Implementer fixes]
Implementer: Extracted PROGRESS_INTERVAL constant
[Code Reviewer re-reviews]
Code Reviewer: ✅ Approved
[Mark Task 2 complete]
...
[After all tasks are complete]
[Assign Final Code Review]
Final Reviewer: All requirements met, ready for merge
Done!