@locksmithdon/dons-flow 2.1.1 → 2.2.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 (57) hide show
  1. package/README.md +19 -71
  2. package/docs/conventions.md +1 -2
  3. package/docs/memory/.upstream-last-sync.json +4 -0
  4. package/docs/memory/MEMORY.md +2 -1
  5. package/docs/memory/monitor_upstream_evolution.md +8 -6
  6. package/docs/memory/upstream-sync-2026-06-13.md +61 -0
  7. package/docs/runbooks/monitor-upstream-evolution.md +74 -45
  8. package/package.json +21 -5
  9. package/scripts/sync-upstream.sh +193 -0
  10. package/skills/dons-flow/SKILL.md +9 -11
  11. package/skills/land/SKILL.md +2 -2
  12. package/skills/setup-dons-flow/SKILL.md +24 -102
  13. package/skills/sync-upstream/SKILL.md +94 -0
  14. package/vendor/superpowers/LICENSE +21 -0
  15. package/vendor/superpowers/skills/brainstorming/SKILL.md +164 -0
  16. package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
  17. package/vendor/superpowers/skills/brainstorming/scripts/helper.js +88 -0
  18. package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +354 -0
  19. package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
  20. package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
  21. package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  22. package/vendor/superpowers/skills/brainstorming/visual-companion.md +287 -0
  23. package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
  24. package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
  25. package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
  26. package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
  27. package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +168 -0
  28. package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +279 -0
  29. package/vendor/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
  30. package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
  31. package/vendor/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  32. package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
  33. package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
  34. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  35. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
  36. package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
  37. package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
  38. package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
  39. package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
  40. package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
  41. package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
  42. package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
  43. package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
  44. package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
  45. package/vendor/superpowers/skills/using-superpowers/SKILL.md +117 -0
  46. package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +59 -0
  47. package/vendor/superpowers/skills/using-superpowers/references/copilot-tools.md +42 -0
  48. package/vendor/superpowers/skills/using-superpowers/references/gemini-tools.md +51 -0
  49. package/vendor/superpowers/skills/writing-plans/SKILL.md +152 -0
  50. package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  51. package/vendor/superpowers/skills/writing-skills/SKILL.md +655 -0
  52. package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
  53. package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  54. package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
  55. package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
  56. package/vendor/superpowers/skills/writing-skills/render-graphs.js +168 -0
  57. package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
@@ -0,0 +1,168 @@
1
+ # Code Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a code reviewer subagent.
4
+
5
+ **Purpose:** Review completed work against requirements and code quality standards before it cascades into more work.
6
+
7
+ ```
8
+ Task tool (general-purpose):
9
+ description: "Review code changes"
10
+ prompt: |
11
+ You are a Senior Code Reviewer with expertise in software architecture,
12
+ design patterns, and best practices. Your job is to review completed work
13
+ against its plan or requirements and identify issues before they cascade.
14
+
15
+ ## What Was Implemented
16
+
17
+ {DESCRIPTION}
18
+
19
+ ## Requirements / Plan
20
+
21
+ {PLAN_OR_REQUIREMENTS}
22
+
23
+ ## Git Range to Review
24
+
25
+ **Base:** {BASE_SHA}
26
+ **Head:** {HEAD_SHA}
27
+
28
+ ```bash
29
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
30
+ git diff {BASE_SHA}..{HEAD_SHA}
31
+ ```
32
+
33
+ ## What to Check
34
+
35
+ **Plan alignment:**
36
+ - Does the implementation match the plan / requirements?
37
+ - Are deviations justified improvements, or problematic departures?
38
+ - Is all planned functionality present?
39
+
40
+ **Code quality:**
41
+ - Clean separation of concerns?
42
+ - Proper error handling?
43
+ - Type safety where applicable?
44
+ - DRY without premature abstraction?
45
+ - Edge cases handled?
46
+
47
+ **Architecture:**
48
+ - Sound design decisions?
49
+ - Reasonable scalability and performance?
50
+ - Security concerns?
51
+ - Integrates cleanly with surrounding code?
52
+
53
+ **Testing:**
54
+ - Tests verify real behavior, not mocks?
55
+ - Edge cases covered?
56
+ - Integration tests where they matter?
57
+ - All tests passing?
58
+
59
+ **Production readiness:**
60
+ - Migration strategy if schema changed?
61
+ - Backward compatibility considered?
62
+ - Documentation complete?
63
+ - No obvious bugs?
64
+
65
+ ## Calibration
66
+
67
+ Categorize issues by actual severity. Not everything is Critical.
68
+ Acknowledge what was done well before listing issues — accurate praise
69
+ helps the implementer trust the rest of the feedback.
70
+
71
+ If you find significant deviations from the plan, flag them specifically
72
+ so the implementer can confirm whether the deviation was intentional.
73
+ If you find issues with the plan itself rather than the implementation,
74
+ say so.
75
+
76
+ ## Output Format
77
+
78
+ ### Strengths
79
+ [What's well done? Be specific.]
80
+
81
+ ### Issues
82
+
83
+ #### Critical (Must Fix)
84
+ [Bugs, security issues, data loss risks, broken functionality]
85
+
86
+ #### Important (Should Fix)
87
+ [Architecture problems, missing features, poor error handling, test gaps]
88
+
89
+ #### Minor (Nice to Have)
90
+ [Code style, optimization opportunities, documentation polish]
91
+
92
+ For each issue:
93
+ - File:line reference
94
+ - What's wrong
95
+ - Why it matters
96
+ - How to fix (if not obvious)
97
+
98
+ ### Recommendations
99
+ [Improvements for code quality, architecture, or process]
100
+
101
+ ### Assessment
102
+
103
+ **Ready to merge?** [Yes | No | With fixes]
104
+
105
+ **Reasoning:** [1-2 sentence technical assessment]
106
+
107
+ ## Critical Rules
108
+
109
+ **DO:**
110
+ - Categorize by actual severity
111
+ - Be specific (file:line, not vague)
112
+ - Explain WHY each issue matters
113
+ - Acknowledge strengths
114
+ - Give a clear verdict
115
+
116
+ **DON'T:**
117
+ - Say "looks good" without checking
118
+ - Mark nitpicks as Critical
119
+ - Give feedback on code you didn't actually read
120
+ - Be vague ("improve error handling")
121
+ - Avoid giving a clear verdict
122
+ ```
123
+
124
+ **Placeholders:**
125
+ - `{DESCRIPTION}` — brief summary of what was built
126
+ - `{PLAN_OR_REQUIREMENTS}` — what it should do (plan file path, task text, or requirements)
127
+ - `{BASE_SHA}` — starting commit
128
+ - `{HEAD_SHA}` — ending commit
129
+
130
+ **Reviewer returns:** Strengths, Issues (Critical / Important / Minor), Recommendations, Assessment
131
+
132
+ ## Example Output
133
+
134
+ ```
135
+ ### Strengths
136
+ - Clean database schema with proper migrations (db.ts:15-42)
137
+ - Comprehensive test coverage (18 tests, all edge cases)
138
+ - Good error handling with fallbacks (summarizer.ts:85-92)
139
+
140
+ ### Issues
141
+
142
+ #### Important
143
+ 1. **Missing help text in CLI wrapper**
144
+ - File: index-conversations:1-31
145
+ - Issue: No --help flag, users won't discover --concurrency
146
+ - Fix: Add --help case with usage examples
147
+
148
+ 2. **Date validation missing**
149
+ - File: search.ts:25-27
150
+ - Issue: Invalid dates silently return no results
151
+ - Fix: Validate ISO format, throw error with example
152
+
153
+ #### Minor
154
+ 1. **Progress indicators**
155
+ - File: indexer.ts:130
156
+ - Issue: No "X of Y" counter for long operations
157
+ - Impact: Users don't know how long to wait
158
+
159
+ ### Recommendations
160
+ - Add progress reporting for user experience
161
+ - Consider config file for excluded projects (portability)
162
+
163
+ ### Assessment
164
+
165
+ **Ready to merge: With fixes**
166
+
167
+ **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.
168
+ ```
@@ -0,0 +1,279 @@
1
+ ---
2
+ name: subagent-driven-development
3
+ description: Use when executing implementation plans with independent tasks in the current session
4
+ ---
5
+
6
+ # Subagent-Driven Development
7
+
8
+ Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
9
+
10
+ **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.
11
+
12
+ **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
13
+
14
+ **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.
15
+
16
+ ## When to Use
17
+
18
+ ```dot
19
+ digraph when_to_use {
20
+ "Have implementation plan?" [shape=diamond];
21
+ "Tasks mostly independent?" [shape=diamond];
22
+ "Stay in this session?" [shape=diamond];
23
+ "subagent-driven-development" [shape=box];
24
+ "executing-plans" [shape=box];
25
+ "Manual execution or brainstorm first" [shape=box];
26
+
27
+ "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
28
+ "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
29
+ "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
30
+ "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
31
+ "Stay in this session?" -> "subagent-driven-development" [label="yes"];
32
+ "Stay in this session?" -> "executing-plans" [label="no - parallel session"];
33
+ }
34
+ ```
35
+
36
+ **vs. Executing Plans (parallel session):**
37
+ - Same session (no context switch)
38
+ - Fresh subagent per task (no context pollution)
39
+ - Two-stage review after each task: spec compliance first, then code quality
40
+ - Faster iteration (no human-in-loop between tasks)
41
+
42
+ ## The Process
43
+
44
+ ```dot
45
+ digraph process {
46
+ rankdir=TB;
47
+
48
+ subgraph cluster_per_task {
49
+ label="Per Task";
50
+ "Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
51
+ "Implementer subagent asks questions?" [shape=diamond];
52
+ "Answer questions, provide context" [shape=box];
53
+ "Implementer subagent implements, tests, commits, self-reviews" [shape=box];
54
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [shape=box];
55
+ "Spec reviewer subagent confirms code matches spec?" [shape=diamond];
56
+ "Implementer subagent fixes spec gaps" [shape=box];
57
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [shape=box];
58
+ "Code quality reviewer subagent approves?" [shape=diamond];
59
+ "Implementer subagent fixes quality issues" [shape=box];
60
+ "Mark task complete in TodoWrite" [shape=box];
61
+ }
62
+
63
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
64
+ "More tasks remain?" [shape=diamond];
65
+ "Dispatch final code reviewer subagent for entire implementation" [shape=box];
66
+ "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
67
+
68
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
69
+ "Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
70
+ "Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
71
+ "Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
72
+ "Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
73
+ "Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)";
74
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
75
+ "Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
76
+ "Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [label="re-review"];
77
+ "Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
78
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
79
+ "Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
80
+ "Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="re-review"];
81
+ "Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
82
+ "Mark task complete in TodoWrite" -> "More tasks remain?";
83
+ "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
84
+ "More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
85
+ "Dispatch final code reviewer subagent for entire implementation" -> "Use superpowers:finishing-a-development-branch";
86
+ }
87
+ ```
88
+
89
+ ## Model Selection
90
+
91
+ Use the least powerful model that can handle each role to conserve cost and increase speed.
92
+
93
+ **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.
94
+
95
+ **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
96
+
97
+ **Architecture, design, and review tasks**: use the most capable available model.
98
+
99
+ **Task complexity signals:**
100
+ - Touches 1-2 files with a complete spec → cheap model
101
+ - Touches multiple files with integration concerns → standard model
102
+ - Requires design judgment or broad codebase understanding → most capable model
103
+
104
+ ## Handling Implementer Status
105
+
106
+ Implementer subagents report one of four statuses. Handle each appropriately:
107
+
108
+ **DONE:** Proceed to spec compliance review.
109
+
110
+ **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.
111
+
112
+ **NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
113
+
114
+ **BLOCKED:** The implementer cannot complete the task. Assess the blocker:
115
+ 1. If it's a context problem, provide more context and re-dispatch with the same model
116
+ 2. If the task requires more reasoning, re-dispatch with a more capable model
117
+ 3. If the task is too large, break it into smaller pieces
118
+ 4. If the plan itself is wrong, escalate to the human
119
+
120
+ **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
121
+
122
+ ## Prompt Templates
123
+
124
+ - `./implementer-prompt.md` - Dispatch implementer subagent
125
+ - `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
126
+ - `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
127
+
128
+ ## Example Workflow
129
+
130
+ ```
131
+ You: I'm using Subagent-Driven Development to execute this plan.
132
+
133
+ [Read plan file once: docs/superpowers/plans/feature-plan.md]
134
+ [Extract all 5 tasks with full text and context]
135
+ [Create TodoWrite with all tasks]
136
+
137
+ Task 1: Hook installation script
138
+
139
+ [Get Task 1 text and context (already extracted)]
140
+ [Dispatch implementation subagent with full task text + context]
141
+
142
+ Implementer: "Before I begin - should the hook be installed at user or system level?"
143
+
144
+ You: "User level (~/.config/superpowers/hooks/)"
145
+
146
+ Implementer: "Got it. Implementing now..."
147
+ [Later] Implementer:
148
+ - Implemented install-hook command
149
+ - Added tests, 5/5 passing
150
+ - Self-review: Found I missed --force flag, added it
151
+ - Committed
152
+
153
+ [Dispatch spec compliance reviewer]
154
+ Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
155
+
156
+ [Get git SHAs, dispatch code quality reviewer]
157
+ Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
158
+
159
+ [Mark Task 1 complete]
160
+
161
+ Task 2: Recovery modes
162
+
163
+ [Get Task 2 text and context (already extracted)]
164
+ [Dispatch implementation subagent with full task text + context]
165
+
166
+ Implementer: [No questions, proceeds]
167
+ Implementer:
168
+ - Added verify/repair modes
169
+ - 8/8 tests passing
170
+ - Self-review: All good
171
+ - Committed
172
+
173
+ [Dispatch spec compliance reviewer]
174
+ Spec reviewer: ❌ Issues:
175
+ - Missing: Progress reporting (spec says "report every 100 items")
176
+ - Extra: Added --json flag (not requested)
177
+
178
+ [Implementer fixes issues]
179
+ Implementer: Removed --json flag, added progress reporting
180
+
181
+ [Spec reviewer reviews again]
182
+ Spec reviewer: ✅ Spec compliant now
183
+
184
+ [Dispatch code quality reviewer]
185
+ Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
186
+
187
+ [Implementer fixes]
188
+ Implementer: Extracted PROGRESS_INTERVAL constant
189
+
190
+ [Code reviewer reviews again]
191
+ Code reviewer: ✅ Approved
192
+
193
+ [Mark Task 2 complete]
194
+
195
+ ...
196
+
197
+ [After all tasks]
198
+ [Dispatch final code-reviewer]
199
+ Final reviewer: All requirements met, ready to merge
200
+
201
+ Done!
202
+ ```
203
+
204
+ ## Advantages
205
+
206
+ **vs. Manual execution:**
207
+ - Subagents follow TDD naturally
208
+ - Fresh context per task (no confusion)
209
+ - Parallel-safe (subagents don't interfere)
210
+ - Subagent can ask questions (before AND during work)
211
+
212
+ **vs. Executing Plans:**
213
+ - Same session (no handoff)
214
+ - Continuous progress (no waiting)
215
+ - Review checkpoints automatic
216
+
217
+ **Efficiency gains:**
218
+ - No file reading overhead (controller provides full text)
219
+ - Controller curates exactly what context is needed
220
+ - Subagent gets complete information upfront
221
+ - Questions surfaced before work begins (not after)
222
+
223
+ **Quality gates:**
224
+ - Self-review catches issues before handoff
225
+ - Two-stage review: spec compliance, then code quality
226
+ - Review loops ensure fixes actually work
227
+ - Spec compliance prevents over/under-building
228
+ - Code quality ensures implementation is well-built
229
+
230
+ **Cost:**
231
+ - More subagent invocations (implementer + 2 reviewers per task)
232
+ - Controller does more prep work (extracting all tasks upfront)
233
+ - Review loops add iterations
234
+ - But catches issues early (cheaper than debugging later)
235
+
236
+ ## Red Flags
237
+
238
+ **Never:**
239
+ - Start implementation on main/master branch without explicit user consent
240
+ - Skip reviews (spec compliance OR code quality)
241
+ - Proceed with unfixed issues
242
+ - Dispatch multiple implementation subagents in parallel (conflicts)
243
+ - Make subagent read plan file (provide full text instead)
244
+ - Skip scene-setting context (subagent needs to understand where task fits)
245
+ - Ignore subagent questions (answer before letting them proceed)
246
+ - Accept "close enough" on spec compliance (spec reviewer found issues = not done)
247
+ - Skip review loops (reviewer found issues = implementer fixes = review again)
248
+ - Let implementer self-review replace actual review (both are needed)
249
+ - **Start code quality review before spec compliance is ✅** (wrong order)
250
+ - Move to next task while either review has open issues
251
+
252
+ **If subagent asks questions:**
253
+ - Answer clearly and completely
254
+ - Provide additional context if needed
255
+ - Don't rush them into implementation
256
+
257
+ **If reviewer finds issues:**
258
+ - Implementer (same subagent) fixes them
259
+ - Reviewer reviews again
260
+ - Repeat until approved
261
+ - Don't skip the re-review
262
+
263
+ **If subagent fails task:**
264
+ - Dispatch fix subagent with specific instructions
265
+ - Don't try to fix manually (context pollution)
266
+
267
+ ## Integration
268
+
269
+ **Required workflow skills:**
270
+ - **superpowers:using-git-worktrees** - Ensures isolated workspace (creates one or verifies existing)
271
+ - **superpowers:writing-plans** - Creates the plan this skill executes
272
+ - **superpowers:requesting-code-review** - Code review template for reviewer subagents
273
+ - **superpowers:finishing-a-development-branch** - Complete development after all tasks
274
+
275
+ **Subagents should use:**
276
+ - **superpowers:test-driven-development** - Subagents follow TDD for each task
277
+
278
+ **Alternative workflow:**
279
+ - **superpowers:executing-plans** - Use for parallel session instead of same-session execution
@@ -0,0 +1,25 @@
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 (general-purpose):
11
+ Use template at requesting-code-review/code-reviewer.md
12
+
13
+ DESCRIPTION: [task summary, 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
+ ```
18
+
19
+ **In addition to standard code quality concerns, the reviewer should check:**
20
+ - Does each file have one clear responsibility with a well-defined interface?
21
+ - Are units decomposed so they can be understood and tested independently?
22
+ - Is the implementation following the file structure from the plan?
23
+ - 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.)
24
+
25
+ **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,61 @@
1
+ # Spec Compliance Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a spec compliance reviewer subagent.
4
+
5
+ **Purpose:** Verify implementer built what was requested (nothing more, nothing less)
6
+
7
+ ```
8
+ Task tool (general-purpose):
9
+ description: "Review spec compliance for Task N"
10
+ prompt: |
11
+ You are reviewing whether an implementation matches its specification.
12
+
13
+ ## What Was Requested
14
+
15
+ [FULL TEXT of task requirements]
16
+
17
+ ## What Implementer Claims They Built
18
+
19
+ [From implementer's report]
20
+
21
+ ## CRITICAL: Do Not Trust the Report
22
+
23
+ The implementer finished suspiciously quickly. Their report may be incomplete,
24
+ inaccurate, or optimistic. You MUST verify everything independently.
25
+
26
+ **DO NOT:**
27
+ - Take their word for what they implemented
28
+ - Trust their claims about completeness
29
+ - Accept their interpretation of requirements
30
+
31
+ **DO:**
32
+ - Read the actual code they wrote
33
+ - Compare actual implementation to requirements line by line
34
+ - Check for missing pieces they claimed to implement
35
+ - Look for extra features they didn't mention
36
+
37
+ ## Your Job
38
+
39
+ Read the implementation code and verify:
40
+
41
+ **Missing requirements:**
42
+ - Did they implement everything that was requested?
43
+ - Are there requirements they skipped or missed?
44
+ - Did they claim something works but didn't actually implement it?
45
+
46
+ **Extra/unneeded work:**
47
+ - Did they build things that weren't requested?
48
+ - Did they over-engineer or add unnecessary features?
49
+ - Did they add "nice to haves" that weren't in spec?
50
+
51
+ **Misunderstandings:**
52
+ - Did they interpret requirements differently than intended?
53
+ - Did they solve the wrong problem?
54
+ - Did they implement the right feature but wrong way?
55
+
56
+ **Verify by reading code, not by trusting report.**
57
+
58
+ Report:
59
+ - ✅ Spec compliant (if everything matches after code inspection)
60
+ - ❌ Issues found: [list specifically what's missing or extra, with file:line references]
61
+ ```