@complexthings/superpowers-agent 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/.agents/docs/SUPERPOWERS.md +108 -0
  2. package/.agents/prompts/001-copilot-tool-mapping-do/001-copilot-tool-mapping-do.md +116 -0
  3. package/.agents/prompts/001-copilot-tool-mapping-do/SUMMARY.md +72 -0
  4. package/.agents/prompts/001-copilot-tool-mapping-do/copilot-tool-mapping-do-output.md +83 -0
  5. package/.agents/prompts/001-release-management-do/001-release-management-do.md +161 -0
  6. package/.agents/prompts/001-release-management-do/SUMMARY.md +19 -0
  7. package/.agents/prompts/001-release-management-do/completed/001-release-management-do.md +161 -0
  8. package/.agents/prompts/002-pull-command-do/SUMMARY.md +28 -0
  9. package/.agents/prompts/002-pull-command-do/completed/002-pull-command-do.md +122 -0
  10. package/.agents/prompts/002-pull-command-do/pull-command-do-output.md +174 -0
  11. package/.agents/prompts/command_updates_prompt.md +69 -0
  12. package/.agents/prompts/current_prompt.md +8 -0
  13. package/.agents/prompts/refactor.prompt.md +57 -0
  14. package/.agents/skills/.gitkeep +0 -0
  15. package/.agents/superpowers-agent +355 -0
  16. package/.agents/superpowers-bootstrap.md +42 -0
  17. package/.agents/templates/AGENTS.md.template +40 -0
  18. package/.agents/templates/SUPERPOWERS.md.template +108 -0
  19. package/.agents/templates/TOOLS.md.template +15 -0
  20. package/.github/workflows/main.yaml +32 -0
  21. package/AGENTS.md +60 -0
  22. package/LICENSE +21 -0
  23. package/README.md +724 -0
  24. package/hooks/hooks.json +15 -0
  25. package/hooks/session-start.sh +27 -0
  26. package/package.json +51 -0
  27. package/skills/architecture/ABOUT.md +20 -0
  28. package/skills/architecture/preserving-productive-tensions/SKILL.md +146 -0
  29. package/skills/architecture/preserving-productive-tensions/skill.json +9 -0
  30. package/skills/collaboration/brainstorming/SKILL.md +166 -0
  31. package/skills/collaboration/brainstorming/skill.json +9 -0
  32. package/skills/collaboration/brainstorming/spec-document-reviewer-prompt.md +50 -0
  33. package/skills/collaboration/brainstorming/visual-companion.md +277 -0
  34. package/skills/collaboration/dispatching-parallel-agents/SKILL.md +174 -0
  35. package/skills/collaboration/dispatching-parallel-agents/skill.json +9 -0
  36. package/skills/collaboration/executing-plans/SKILL.md +130 -0
  37. package/skills/collaboration/executing-plans/skill.json +9 -0
  38. package/skills/collaboration/finishing-a-development-branch/SKILL.md +261 -0
  39. package/skills/collaboration/finishing-a-development-branch/skill.json +9 -0
  40. package/skills/collaboration/leveraging-cli-tools/SKILL.md +132 -0
  41. package/skills/collaboration/leveraging-cli-tools/skill.json +9 -0
  42. package/skills/collaboration/receiving-code-review/SKILL.md +233 -0
  43. package/skills/collaboration/receiving-code-review/skill.json +9 -0
  44. package/skills/collaboration/requesting-code-review/SKILL.md +110 -0
  45. package/skills/collaboration/requesting-code-review/code-reviewer.md +146 -0
  46. package/skills/collaboration/requesting-code-review/skill.json +12 -0
  47. package/skills/collaboration/subagent-driven-development/SKILL.md +255 -0
  48. package/skills/collaboration/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  49. package/skills/collaboration/subagent-driven-development/implementer-prompt.md +113 -0
  50. package/skills/collaboration/subagent-driven-development/skill.json +15 -0
  51. package/skills/collaboration/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  52. package/skills/collaboration/using-git-worktrees/SKILL.md +366 -0
  53. package/skills/collaboration/using-git-worktrees/skill.json +9 -0
  54. package/skills/collaboration/writing-plans/SKILL.md +121 -0
  55. package/skills/collaboration/writing-plans/plan-document-reviewer-prompt.md +52 -0
  56. package/skills/collaboration/writing-plans/skill.json +9 -0
  57. package/skills/debugging/defense-in-depth/SKILL.md +380 -0
  58. package/skills/debugging/defense-in-depth/skill.json +9 -0
  59. package/skills/debugging/root-cause-tracing/SKILL.md +361 -0
  60. package/skills/debugging/root-cause-tracing/find-polluter.sh +63 -0
  61. package/skills/debugging/root-cause-tracing/skill.json +12 -0
  62. package/skills/debugging/systematic-debugging/SKILL.md +299 -0
  63. package/skills/debugging/systematic-debugging/condition-based-waiting-example.ts +158 -0
  64. package/skills/debugging/systematic-debugging/condition-based-waiting.md +115 -0
  65. package/skills/debugging/systematic-debugging/defense-in-depth.md +122 -0
  66. package/skills/debugging/systematic-debugging/find-polluter.sh +63 -0
  67. package/skills/debugging/systematic-debugging/root-cause-tracing.md +169 -0
  68. package/skills/debugging/systematic-debugging/skill.json +9 -0
  69. package/skills/debugging/systematic-debugging/test-academic.md +14 -0
  70. package/skills/debugging/systematic-debugging/test-pressure-1.md +58 -0
  71. package/skills/debugging/systematic-debugging/test-pressure-2.md +68 -0
  72. package/skills/debugging/systematic-debugging/test-pressure-3.md +69 -0
  73. package/skills/debugging/verification-before-completion/SKILL.md +143 -0
  74. package/skills/debugging/verification-before-completion/skill.json +9 -0
  75. package/skills/finding-skills/SKILL.md +101 -0
  76. package/skills/finding-skills/skill.json +8 -0
  77. package/skills/meta/create-skill-json/SKILL.md +370 -0
  78. package/skills/meta/create-skill-json/skill.json +9 -0
  79. package/skills/meta/create-skill-json/test-scenarios.md +29 -0
  80. package/skills/meta/creating-prompts/SKILL.md +349 -0
  81. package/skills/meta/creating-prompts/examples/do-example.md +65 -0
  82. package/skills/meta/creating-prompts/examples/plan-example.md +75 -0
  83. package/skills/meta/creating-prompts/examples/refine-example.md +65 -0
  84. package/skills/meta/creating-prompts/examples/research-example.md +63 -0
  85. package/skills/meta/creating-prompts/scripts/get-next-number.sh +27 -0
  86. package/skills/meta/creating-prompts/skill.json +20 -0
  87. package/skills/meta/creating-prompts/templates/do-template.md +59 -0
  88. package/skills/meta/creating-prompts/templates/plan-template.md +58 -0
  89. package/skills/meta/creating-prompts/templates/refine-template.md +54 -0
  90. package/skills/meta/creating-prompts/templates/research-template.md +56 -0
  91. package/skills/meta/using-superpowers/SKILL.md +122 -0
  92. package/skills/meta/using-superpowers/skill.json +5 -0
  93. package/skills/meta/writing-prompts/SKILL.md +345 -0
  94. package/skills/meta/writing-prompts/skill.json +9 -0
  95. package/skills/problem-solving/ABOUT.md +40 -0
  96. package/skills/problem-solving/collision-zone-thinking/SKILL.md +188 -0
  97. package/skills/problem-solving/collision-zone-thinking/references/historical-examples.md +393 -0
  98. package/skills/problem-solving/collision-zone-thinking/skill.json +9 -0
  99. package/skills/problem-solving/inversion-exercise/SKILL.md +174 -0
  100. package/skills/problem-solving/inversion-exercise/skill.json +9 -0
  101. package/skills/problem-solving/meta-pattern-recognition/SKILL.md +116 -0
  102. package/skills/problem-solving/meta-pattern-recognition/skill.json +9 -0
  103. package/skills/problem-solving/scale-game/SKILL.md +222 -0
  104. package/skills/problem-solving/scale-game/skill.json +9 -0
  105. package/skills/problem-solving/simplification-cascades/SKILL.md +113 -0
  106. package/skills/problem-solving/simplification-cascades/skill.json +9 -0
  107. package/skills/problem-solving/when-stuck/SKILL.md +69 -0
  108. package/skills/problem-solving/when-stuck/skill.json +9 -0
  109. package/skills/research/ABOUT.md +20 -0
  110. package/skills/research/tracing-knowledge-lineages/SKILL.md +241 -0
  111. package/skills/research/tracing-knowledge-lineages/skill.json +9 -0
  112. package/skills/setup-skills/SKILL.md +47 -0
  113. package/skills/testing/condition-based-waiting/SKILL.md +359 -0
  114. package/skills/testing/condition-based-waiting/example.ts +158 -0
  115. package/skills/testing/condition-based-waiting/skill.json +12 -0
  116. package/skills/testing/test-driven-development/SKILL.md +434 -0
  117. package/skills/testing/test-driven-development/skill.json +9 -0
  118. package/skills/testing/testing-anti-patterns/SKILL.md +298 -0
  119. package/skills/testing/testing-anti-patterns/skill.json +9 -0
  120. package/skills/testing/verification-before-completion/SKILL.md +246 -0
  121. package/skills/testing/verification-before-completion/skill.json +10 -0
  122. package/skills/using-a-skill/SKILL.md +101 -0
  123. package/skills/using-a-skill/skill.json +8 -0
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: requesting-code-review
3
+ description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements. Also use when stuck on a problem (fresh perspective), before refactoring (baseline check), or after fixing a complex bug. If you just finished building something and haven't reviewed it yet, use this skill.
4
+ metadata:
5
+ when_to_use: when completing tasks, implementing major features, or before merging, to verify work meets requirements
6
+ version: 1.2.0
7
+ ---
8
+
9
+ # Requesting Code Review
10
+
11
+ Dispatch a code-reviewer subagent to catch issues before they cascade. The reviewer gets precisely crafted context for evaluation — never your session's history. This keeps the reviewer focused on the work product, not your thought process, and preserves your own context for continued work.
12
+
13
+ **Core principle:** Review early, review often.
14
+
15
+ ## When to Request Review
16
+
17
+ **Mandatory:**
18
+ - After each task in subagent-driven development
19
+ - After completing major feature
20
+ - Before merge to main
21
+
22
+ **Optional but valuable:**
23
+ - When stuck (fresh perspective)
24
+ - Before refactoring (baseline check)
25
+ - After fixing complex bug
26
+
27
+ ## How to Request
28
+
29
+ **1. Get git SHAs:**
30
+ ```bash
31
+ BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
32
+ HEAD_SHA=$(git rev-parse HEAD)
33
+ ```
34
+
35
+ **2. Dispatch code-reviewer subagent:**
36
+
37
+ Use the `task` tool with subagent type `general`. Provide the prompt from `code-reviewer.md` with these placeholders filled in:
38
+
39
+ **Placeholders:**
40
+ - `{WHAT_WAS_IMPLEMENTED}` - What you just built
41
+ - `{PLAN_OR_REQUIREMENTS}` - What it should do (link to plan/spec if available)
42
+ - `{BASE_SHA}` - Starting commit SHA
43
+ - `{HEAD_SHA}` - Ending commit SHA
44
+ - `{DESCRIPTION}` - Brief summary of changes
45
+
46
+ **3. Act on feedback:**
47
+ - Fix **Critical** issues immediately — do not proceed until resolved
48
+ - Fix **Important** issues before moving to the next task
49
+ - Note **Minor** issues for later (log in comments or TODO)
50
+ - Push back if reviewer is wrong (with technical reasoning and evidence)
51
+
52
+ ## Example
53
+
54
+ ```
55
+ [Just completed Task 2: Add verification function]
56
+
57
+ You: Let me request code review before proceeding.
58
+
59
+ BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
60
+ HEAD_SHA=$(git rev-parse HEAD)
61
+
62
+ [Dispatch code-reviewer subagent via task tool]
63
+ WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
64
+ PLAN_OR_REQUIREMENTS: Task 2 from .agents/specs/deployment-plan.md
65
+ BASE_SHA: a7981ec
66
+ HEAD_SHA: 3df7661
67
+ DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
68
+
69
+ [Subagent returns]:
70
+ Strengths: Clean architecture, real tests
71
+ Issues:
72
+ Important: Missing progress indicators
73
+ Minor: Magic number (100) for reporting interval
74
+ Assessment: Ready to proceed with fixes
75
+
76
+ You: [Fix progress indicators]
77
+ [Continue to Task 3]
78
+ ```
79
+
80
+ ## Integration with Workflows
81
+
82
+ **Subagent-Driven Development:**
83
+ - Review after EACH task
84
+ - Catch issues before they compound
85
+ - Fix before moving to next task
86
+
87
+ **Executing Plans:**
88
+ - Review after each batch (3 tasks)
89
+ - Get feedback, apply, continue
90
+
91
+ **Ad-Hoc Development:**
92
+ - Review before merge
93
+ - Review when stuck
94
+
95
+ ## Red Flags
96
+
97
+ **Never:**
98
+ - Skip review because "it's simple"
99
+ - Ignore Critical issues
100
+ - Proceed with unfixed Important issues
101
+ - Argue with valid technical feedback
102
+
103
+ **If reviewer wrong:**
104
+ - Push back with technical reasoning
105
+ - Show code/tests that prove it works
106
+ - Request clarification on the specific concern
107
+
108
+ ## Reviewer Template
109
+
110
+ Read `code-reviewer.md` (in the same directory as this skill) to get the full prompt to send to the subagent. Fill in all placeholders before dispatching.
@@ -0,0 +1,146 @@
1
+ # Code Review Agent
2
+
3
+ You are reviewing code changes for production readiness.
4
+
5
+ **Your task:**
6
+ 1. Review {WHAT_WAS_IMPLEMENTED}
7
+ 2. Compare against {PLAN_OR_REQUIREMENTS}
8
+ 3. Check code quality, architecture, testing
9
+ 4. Categorize issues by severity
10
+ 5. Assess production readiness
11
+
12
+ ## What Was Implemented
13
+
14
+ {DESCRIPTION}
15
+
16
+ ## Requirements/Plan
17
+
18
+ {PLAN_REFERENCE}
19
+
20
+ ## Git Range to Review
21
+
22
+ **Base:** {BASE_SHA}
23
+ **Head:** {HEAD_SHA}
24
+
25
+ ```bash
26
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
27
+ git diff {BASE_SHA}..{HEAD_SHA}
28
+ ```
29
+
30
+ ## Review Checklist
31
+
32
+ **Code Quality:**
33
+ - Clean separation of concerns?
34
+ - Proper error handling?
35
+ - Type safety (if applicable)?
36
+ - DRY principle followed?
37
+ - Edge cases handled?
38
+
39
+ **Architecture:**
40
+ - Sound design decisions?
41
+ - Scalability considerations?
42
+ - Performance implications?
43
+ - Security concerns?
44
+
45
+ **Testing:**
46
+ - Tests actually test logic (not mocks)?
47
+ - Edge cases covered?
48
+ - Integration tests where needed?
49
+ - All tests passing?
50
+
51
+ **Requirements:**
52
+ - All plan requirements met?
53
+ - Implementation matches spec?
54
+ - No scope creep?
55
+ - Breaking changes documented?
56
+
57
+ **Production Readiness:**
58
+ - Migration strategy (if schema changes)?
59
+ - Backward compatibility considered?
60
+ - Documentation complete?
61
+ - No obvious bugs?
62
+
63
+ ## Output Format
64
+
65
+ ### Strengths
66
+ [What's well done? Be specific.]
67
+
68
+ ### Issues
69
+
70
+ #### Critical (Must Fix)
71
+ [Bugs, security issues, data loss risks, broken functionality]
72
+
73
+ #### Important (Should Fix)
74
+ [Architecture problems, missing features, poor error handling, test gaps]
75
+
76
+ #### Minor (Nice to Have)
77
+ [Code style, optimization opportunities, documentation improvements]
78
+
79
+ **For each issue:**
80
+ - File:line reference
81
+ - What's wrong
82
+ - Why it matters
83
+ - How to fix (if not obvious)
84
+
85
+ ### Recommendations
86
+ [Improvements for code quality, architecture, or process]
87
+
88
+ ### Assessment
89
+
90
+ **Ready to merge?** [Yes/No/With fixes]
91
+
92
+ **Reasoning:** [Technical assessment in 1-2 sentences]
93
+
94
+ ## Critical Rules
95
+
96
+ **DO:**
97
+ - Categorize by actual severity (not everything is Critical)
98
+ - Be specific (file:line, not vague)
99
+ - Explain WHY issues matter
100
+ - Acknowledge strengths
101
+ - Give clear verdict
102
+
103
+ **DON'T:**
104
+ - Say "looks good" without checking
105
+ - Mark nitpicks as Critical
106
+ - Give feedback on code you didn't review
107
+ - Be vague ("improve error handling")
108
+ - Avoid giving a clear verdict
109
+
110
+ ## Example Output
111
+
112
+ ```
113
+ ### Strengths
114
+ - Clean database schema with proper migrations (db.ts:15-42)
115
+ - Comprehensive test coverage (18 tests, all edge cases)
116
+ - Good error handling with fallbacks (summarizer.ts:85-92)
117
+
118
+ ### Issues
119
+
120
+ #### Important
121
+ 1. **Missing help text in CLI wrapper**
122
+ - File: index-conversations:1-31
123
+ - Issue: No --help flag, users won't discover --concurrency
124
+ - Fix: Add --help case with usage examples
125
+
126
+ 2. **Date validation missing**
127
+ - File: search.ts:25-27
128
+ - Issue: Invalid dates silently return no results
129
+ - Fix: Validate ISO format, throw error with example
130
+
131
+ #### Minor
132
+ 1. **Progress indicators**
133
+ - File: indexer.ts:130
134
+ - Issue: No "X of Y" counter for long operations
135
+ - Impact: Users don't know how long to wait
136
+
137
+ ### Recommendations
138
+ - Add progress reporting for user experience
139
+ - Consider config file for excluded projects (portability)
140
+
141
+ ### Assessment
142
+
143
+ **Ready to merge: With fixes**
144
+
145
+ **Reasoning:** Core implementation is solid with good architecture and tests. Important issues (help text, date validation) are easily fixed and don't affect core functionality.
146
+ ```
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "1.1.0",
3
+ "name": "superpowers:collaboration/requesting-code-review",
4
+ "title": "Requesting Code Review",
5
+ "helpers": [
6
+ "code-reviewer.md"
7
+ ],
8
+ "aliases": [
9
+ "requesting-code-review",
10
+ "collaboration/requesting-code-review"
11
+ ]
12
+ }
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: subagent-driven-development
3
+ description: Use when executing implementation plans with independent tasks in the current session
4
+ metadata:
5
+ when_to_use: when executing implementation plans with independent tasks in the current session, using fresh subagents with review gates
6
+ version: 2.2.0
7
+ ---
8
+
9
+ # Subagent-Driven Development
10
+
11
+ Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
12
+
13
+ **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.
14
+
15
+ **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
16
+
17
+ ## When to Use
18
+
19
+ ```mermaid
20
+ flowchart TD
21
+ A{Have implementation plan?} -->|yes| B{Tasks mostly independent?}
22
+ A -->|no| C[Manual execution or brainstorm first]
23
+ B -->|yes| D{Stay in this session?}
24
+ B -->|no - tightly coupled| C
25
+ D -->|yes| E[subagent-driven-development]
26
+ D -->|no - parallel session| F[executing-plans]
27
+ ```
28
+
29
+ **vs. Executing Plans (parallel session):**
30
+ - Same session (no context switch)
31
+ - Fresh subagent per task (no context pollution)
32
+ - Two-stage review after each task: spec compliance first, then code quality
33
+ - Faster iteration (no human-in-loop between tasks)
34
+
35
+ ## The Process
36
+
37
+ ```mermaid
38
+ flowchart TD
39
+ PLAN[Read plan, extract tasks, create TodoWrite] --> IMPL[Dispatch implementer subagent]
40
+
41
+ subgraph PER_TASK [Per Task]
42
+ IMPL --> QUESTIONS{Implementer asks questions?}
43
+ QUESTIONS -->|yes| ANSWER[Answer questions, provide context]
44
+ ANSWER --> IMPL
45
+ QUESTIONS -->|no| WORK[Implementer implements, tests, commits, self-reviews]
46
+ WORK --> SPEC[Dispatch spec reviewer subagent]
47
+ SPEC --> SPEC_OK{Code matches spec?}
48
+ SPEC_OK -->|no| SPEC_FIX[Implementer fixes spec gaps]
49
+ SPEC_FIX -->|re-review| SPEC
50
+ SPEC_OK -->|yes| QUALITY[Dispatch code quality reviewer subagent]
51
+ QUALITY --> QUAL_OK{Quality reviewer approves?}
52
+ QUAL_OK -->|no| QUAL_FIX[Implementer fixes quality issues]
53
+ QUAL_FIX -->|re-review| QUALITY
54
+ QUAL_OK -->|yes| DONE_TASK[Mark task complete in TodoWrite]
55
+ end
56
+
57
+ DONE_TASK --> MORE{More tasks remain?}
58
+ MORE -->|yes| IMPL
59
+ MORE -->|no| FINAL[Dispatch final code reviewer for entire implementation]
60
+ FINAL --> FINISH[Use finishing-a-development-branch skill]
61
+ ```
62
+
63
+ ## Model Selection
64
+
65
+ Use the least powerful model that can handle each role to conserve cost and increase speed.
66
+
67
+ **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.
68
+
69
+ **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
70
+
71
+ **Architecture, design, and review tasks**: use the most capable available model.
72
+
73
+ **Task complexity signals:**
74
+ - Touches 1-2 files with a complete spec → cheap model
75
+ - Touches multiple files with integration concerns → standard model
76
+ - Requires design judgment or broad codebase understanding → most capable model
77
+
78
+ ## Handling Implementer Status
79
+
80
+ Implementer subagents report one of four statuses. Handle each appropriately:
81
+
82
+ **DONE:** Proceed to spec compliance review.
83
+
84
+ **DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
85
+
86
+ **NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
87
+
88
+ **BLOCKED:** The implementer cannot complete the task. Assess the blocker:
89
+ 1. If it's a context problem, provide more context and re-dispatch with the same model
90
+ 2. If the task requires more reasoning, re-dispatch with a more capable model
91
+ 3. If the task is too large, break it into smaller pieces
92
+ 4. If the plan itself is wrong, escalate to the human
93
+
94
+ **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
95
+
96
+ ## Prompt Templates
97
+
98
+ - `./implementer-prompt.md` - Dispatch implementer subagent
99
+ - `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
100
+ - `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
101
+
102
+ ## Example Workflow
103
+
104
+ ```
105
+ You: I'm using Subagent-Driven Development to execute this plan.
106
+
107
+ [Read plan file once: .agents/superpowers/specs/YYYY-MM-DD-<topic>-design.md]
108
+ [Extract all 5 tasks with full text and context]
109
+ [Create TodoWrite with all tasks]
110
+
111
+ Task 1: Hook installation script
112
+
113
+ [Get Task 1 text and context (already extracted)]
114
+ [Dispatch implementation subagent with full task text + context]
115
+
116
+ Implementer: "Before I begin - should the hook be installed at user or system level?"
117
+
118
+ You: "User level (~/.config/superpowers/hooks/)"
119
+
120
+ Implementer: "Got it. Implementing now..."
121
+ [Later] Implementer:
122
+ - Implemented install-hook command
123
+ - Added tests, 5/5 passing
124
+ - Self-review: Found I missed --force flag, added it
125
+ - Committed
126
+
127
+ [Dispatch spec compliance reviewer]
128
+ Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
129
+
130
+ [Get git SHAs, dispatch code quality reviewer]
131
+ Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
132
+
133
+ [Mark Task 1 complete]
134
+
135
+ Task 2: Recovery modes
136
+
137
+ [Get Task 2 text and context (already extracted)]
138
+ [Dispatch implementation subagent with full task text + context]
139
+
140
+ Implementer: [No questions, proceeds]
141
+ Implementer:
142
+ - Added verify/repair modes
143
+ - 8/8 tests passing
144
+ - Self-review: All good
145
+ - Committed
146
+
147
+ [Dispatch spec compliance reviewer]
148
+ Spec reviewer: ❌ Issues:
149
+ - Missing: Progress reporting (spec says "report every 100 items")
150
+ - Extra: Added --json flag (not requested)
151
+
152
+ [Implementer fixes issues]
153
+ Implementer: Removed --json flag, added progress reporting
154
+
155
+ [Spec reviewer reviews again]
156
+ Spec reviewer: ✅ Spec compliant now
157
+
158
+ [Dispatch code quality reviewer]
159
+ Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
160
+
161
+ [Implementer fixes]
162
+ Implementer: Extracted PROGRESS_INTERVAL constant
163
+
164
+ [Code reviewer reviews again]
165
+ Code reviewer: ✅ Approved
166
+
167
+ [Mark Task 2 complete]
168
+
169
+ ...
170
+
171
+ [After all tasks]
172
+ [Dispatch final code-reviewer]
173
+ Final reviewer: All requirements met, ready to merge
174
+
175
+ Done!
176
+ ```
177
+
178
+ ## Advantages
179
+
180
+ **vs. Manual execution:**
181
+ - Subagents follow TDD naturally
182
+ - Fresh context per task (no confusion)
183
+ - Parallel-safe (subagents don't interfere)
184
+ - Subagent can ask questions (before AND during work)
185
+
186
+ **vs. Executing Plans:**
187
+ - Same session (no handoff)
188
+ - Continuous progress (no waiting)
189
+ - Review checkpoints automatic
190
+
191
+ **Efficiency gains:**
192
+ - No file reading overhead (controller provides full text)
193
+ - Controller curates exactly what context is needed
194
+ - Subagent gets complete information upfront
195
+ - Questions surfaced before work begins (not after)
196
+
197
+ **Quality gates:**
198
+ - Self-review catches issues before handoff
199
+ - Two-stage review: spec compliance, then code quality
200
+ - Review loops ensure fixes actually work
201
+ - Spec compliance prevents over/under-building
202
+ - Code quality ensures implementation is well-built
203
+
204
+ **Cost:**
205
+ - More subagent invocations (implementer + 2 reviewers per task)
206
+ - Controller does more prep work (extracting all tasks upfront)
207
+ - Review loops add iterations
208
+ - But catches issues early (cheaper than debugging later)
209
+
210
+ ## Red Flags
211
+
212
+ **Never:**
213
+ - Start implementation on main/master branch without explicit user consent
214
+ - Skip reviews (spec compliance OR code quality)
215
+ - Proceed with unfixed issues
216
+ - Dispatch multiple implementation subagents in parallel (conflicts)
217
+ - Make subagent read plan file (provide full text instead)
218
+ - Skip scene-setting context (subagent needs to understand where task fits)
219
+ - Ignore subagent questions (answer before letting them proceed)
220
+ - Accept "close enough" on spec compliance (spec reviewer found issues = not done)
221
+ - Skip review loops (reviewer found issues = implementer fixes = review again)
222
+ - Let implementer self-review replace actual review (both are needed)
223
+ - **Start code quality review before spec compliance is ✅** (wrong order)
224
+ - Move to next task while either review has open issues
225
+
226
+ **If subagent asks questions:**
227
+ - Answer clearly and completely
228
+ - Provide additional context if needed
229
+ - Don't rush them into implementation
230
+
231
+ **If reviewer finds issues:**
232
+ - Dispatch the implementer subagent again with reviewer feedback and the original task text
233
+ - Ask it to fix the specific issues found
234
+ - Reviewer reviews again
235
+ - Repeat until approved
236
+ - Don't skip the re-review
237
+
238
+ **If subagent reports BLOCKED or cannot complete the task:**
239
+ - Dispatch a new fix subagent with specific, targeted instructions
240
+ - Don't try to fix manually (context pollution)
241
+ - See "Handling Implementer Status" for escalation options
242
+
243
+ ## Integration
244
+
245
+ **Required workflow skills:**
246
+ - **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
247
+ - **superpowers:writing-plans** - Creates the plan this skill executes
248
+ - **superpowers:requesting-code-review** - Code review template for reviewer subagents
249
+ - **superpowers:finishing-a-development-branch** - Complete development after all tasks
250
+
251
+ **Subagents should use:**
252
+ - **superpowers:test-driven-development** - Subagents follow TDD for each task
253
+
254
+ **Alternative workflow:**
255
+ - **superpowers:executing-plans** - Use for parallel session instead of same-session execution
@@ -0,0 +1,26 @@
1
+ # Code Quality Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a code quality reviewer subagent.
4
+
5
+ **Purpose:** Verify implementation is well-built (clean, tested, maintainable)
6
+
7
+ **Only dispatch after spec compliance review passes.**
8
+
9
+ ```
10
+ Task tool (superpowers:code-reviewer):
11
+ Use template at requesting-code-review/code-reviewer.md
12
+
13
+ WHAT_WAS_IMPLEMENTED: [from implementer's report]
14
+ PLAN_OR_REQUIREMENTS: Task N from [plan-file]
15
+ BASE_SHA: [commit before task]
16
+ HEAD_SHA: [current commit]
17
+ DESCRIPTION: [task summary]
18
+ ```
19
+
20
+ **In addition to standard code quality concerns, the reviewer should check:**
21
+ - Does each file have one clear responsibility with a well-defined interface?
22
+ - Are units decomposed so they can be understood and tested independently?
23
+ - Is the implementation following the file structure from the plan?
24
+ - Did this implementation create new files that are already large, or significantly grow existing files? (Don't flag pre-existing file sizes — focus on what this change contributed.)
25
+
26
+ **Code reviewer returns:** Strengths, Issues (Critical/Important/Minor), Assessment
@@ -0,0 +1,113 @@
1
+ # Implementer Subagent Prompt Template
2
+
3
+ Use this template when dispatching an implementer subagent.
4
+
5
+ ```
6
+ Task tool (general-purpose):
7
+ description: "Implement Task N: [task name]"
8
+ prompt: |
9
+ You are implementing Task N: [task name]
10
+
11
+ ## Task Description
12
+
13
+ [FULL TEXT of task from plan - paste it here, don't make subagent read file]
14
+
15
+ ## Context
16
+
17
+ [Scene-setting: where this fits, dependencies, architectural context]
18
+
19
+ ## Before You Begin
20
+
21
+ If you have questions about:
22
+ - The requirements or acceptance criteria
23
+ - The approach or implementation strategy
24
+ - Dependencies or assumptions
25
+ - Anything unclear in the task description
26
+
27
+ **Ask them now.** Raise any concerns before starting work.
28
+
29
+ ## Your Job
30
+
31
+ Once you're clear on requirements:
32
+ 1. Implement exactly what the task specifies
33
+ 2. Write tests (following TDD if task says to)
34
+ 3. Verify implementation works
35
+ 4. Commit your work
36
+ 5. Self-review (see below)
37
+ 6. Report back
38
+
39
+ Work from: [directory]
40
+
41
+ **While you work:** If you encounter something unexpected or unclear, **ask questions**.
42
+ It's always OK to pause and clarify. Don't guess or make assumptions.
43
+
44
+ ## Code Organization
45
+
46
+ You reason best about code you can hold in context at once, and your edits are more
47
+ reliable when files are focused. Keep this in mind:
48
+ - Follow the file structure defined in the plan
49
+ - Each file should have one clear responsibility with a well-defined interface
50
+ - If a file you're creating is growing beyond the plan's intent, stop and report
51
+ it as DONE_WITH_CONCERNS — don't split files on your own without plan guidance
52
+ - If an existing file you're modifying is already large or tangled, work carefully
53
+ and note it as a concern in your report
54
+ - In existing codebases, follow established patterns. Improve code you're touching
55
+ the way a good developer would, but don't restructure things outside your task.
56
+
57
+ ## When You're in Over Your Head
58
+
59
+ It is always OK to stop and say "this is too hard for me." Bad work is worse than
60
+ no work. You will not be penalized for escalating.
61
+
62
+ **STOP and escalate when:**
63
+ - The task requires architectural decisions with multiple valid approaches
64
+ - You need to understand code beyond what was provided and can't find clarity
65
+ - You feel uncertain about whether your approach is correct
66
+ - The task involves restructuring existing code in ways the plan didn't anticipate
67
+ - You've been reading file after file trying to understand the system without progress
68
+
69
+ **How to escalate:** Report back with status BLOCKED or NEEDS_CONTEXT. Describe
70
+ specifically what you're stuck on, what you've tried, and what kind of help you need.
71
+ The controller can provide more context, re-dispatch with a more capable model,
72
+ or break the task into smaller pieces.
73
+
74
+ ## Before Reporting Back: Self-Review
75
+
76
+ Review your work with fresh eyes. Ask yourself:
77
+
78
+ **Completeness:**
79
+ - Did I fully implement everything in the spec?
80
+ - Did I miss any requirements?
81
+ - Are there edge cases I didn't handle?
82
+
83
+ **Quality:**
84
+ - Is this my best work?
85
+ - Are names clear and accurate (match what things do, not how they work)?
86
+ - Is the code clean and maintainable?
87
+
88
+ **Discipline:**
89
+ - Did I avoid overbuilding (YAGNI)?
90
+ - Did I only build what was requested?
91
+ - Did I follow existing patterns in the codebase?
92
+
93
+ **Testing:**
94
+ - Do tests actually verify behavior (not just mock behavior)?
95
+ - Did I follow TDD if required?
96
+ - Are tests comprehensive?
97
+
98
+ If you find issues during self-review, fix them now before reporting.
99
+
100
+ ## Report Format
101
+
102
+ When done, report:
103
+ - **Status:** DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
104
+ - What you implemented (or what you attempted, if blocked)
105
+ - What you tested and test results
106
+ - Files changed
107
+ - Self-review findings (if any)
108
+ - Any issues or concerns
109
+
110
+ Use DONE_WITH_CONCERNS if you completed the work but have doubts about correctness.
111
+ Use BLOCKED if you cannot complete the task. Use NEEDS_CONTEXT if you need
112
+ information that wasn't provided. Never silently produce work you're unsure about.
113
+ ```
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "name": "superpowers:collaboration/subagent-driven-development",
4
+ "title": "Subagent-Driven Development",
5
+ "helpers": [
6
+ "implementer-prompt.md",
7
+ "spec-reviewer-prompt.md",
8
+ "code-quality-reviewer-prompt.md"
9
+ ],
10
+ "aliases": [
11
+ "subagent-driven-development",
12
+ "collaboration/subagent-driven-development",
13
+ "sdd"
14
+ ]
15
+ }