@juho0719/cckit 0.1.1
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.
- package/assets/agents/architect.md +211 -0
- package/assets/agents/build-error-resolver.md +114 -0
- package/assets/agents/ccwin-code-reviewer.md +224 -0
- package/assets/agents/database-reviewer.md +91 -0
- package/assets/agents/doc-updater.md +107 -0
- package/assets/agents/e2e-runner.md +107 -0
- package/assets/agents/planner.md +212 -0
- package/assets/agents/python-reviewer.md +98 -0
- package/assets/agents/refactor-cleaner.md +85 -0
- package/assets/agents/security-reviewer.md +108 -0
- package/assets/agents/superpower-code-reviewer.md +48 -0
- package/assets/agents/tdd-guide.md +80 -0
- package/assets/commands/build-fix.md +62 -0
- package/assets/commands/checkpoint.md +74 -0
- package/assets/commands/code-review.md +40 -0
- package/assets/commands/e2e.md +362 -0
- package/assets/commands/eval.md +120 -0
- package/assets/commands/orchestrate.md +172 -0
- package/assets/commands/plan.md +113 -0
- package/assets/commands/python-review.md +297 -0
- package/assets/commands/refactor-clean.md +80 -0
- package/assets/commands/sessions.md +305 -0
- package/assets/commands/tdd.md +326 -0
- package/assets/commands/test-coverage.md +69 -0
- package/assets/commands/update-codemaps.md +72 -0
- package/assets/commands/update-docs.md +84 -0
- package/assets/commands/verify.md +59 -0
- package/assets/hooks/post-edit-format.js +49 -0
- package/assets/hooks/post-edit-typecheck.js +96 -0
- package/assets/mcps/mcp-servers.json +92 -0
- package/assets/rules/common/agents.md +49 -0
- package/assets/rules/common/coding-style.md +48 -0
- package/assets/rules/common/git-workflow.md +45 -0
- package/assets/rules/common/hooks.md +30 -0
- package/assets/rules/common/patterns.md +31 -0
- package/assets/rules/common/performance.md +55 -0
- package/assets/rules/common/security.md +29 -0
- package/assets/rules/common/testing.md +29 -0
- package/assets/rules/python/coding-style.md +42 -0
- package/assets/rules/python/hooks.md +19 -0
- package/assets/rules/python/patterns.md +39 -0
- package/assets/rules/python/security.md +30 -0
- package/assets/rules/python/testing.md +38 -0
- package/assets/rules/typescript/coding-style.md +18 -0
- package/assets/rules/typescript/hooks.md +19 -0
- package/assets/rules/typescript/patterns.md +39 -0
- package/assets/rules/typescript/security.md +30 -0
- package/assets/rules/typescript/testing.md +38 -0
- package/assets/skills/api-design/SKILL.md +522 -0
- package/assets/skills/backend-patterns/SKILL.md +597 -0
- package/assets/skills/brainstorming/SKILL.md +96 -0
- package/assets/skills/coding-standards/SKILL.md +529 -0
- package/assets/skills/database-migrations/SKILL.md +334 -0
- package/assets/skills/deployment-patterns/SKILL.md +426 -0
- package/assets/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/assets/skills/docker-patterns/SKILL.md +363 -0
- package/assets/skills/e2e-testing/SKILL.md +325 -0
- package/assets/skills/eval-harness/SKILL.md +235 -0
- package/assets/skills/executing-plans/SKILL.md +84 -0
- package/assets/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/assets/skills/frontend-patterns/SKILL.md +641 -0
- package/assets/skills/iterative-retrieval/SKILL.md +210 -0
- package/assets/skills/postgres-patterns/SKILL.md +145 -0
- package/assets/skills/python-patterns/SKILL.md +749 -0
- package/assets/skills/python-testing/SKILL.md +815 -0
- package/assets/skills/receiving-code-review/SKILL.md +213 -0
- package/assets/skills/requesting-code-review/SKILL.md +105 -0
- package/assets/skills/requesting-code-review/code-reviewer-template.md +146 -0
- package/assets/skills/subagent-driven-development/SKILL.md +242 -0
- package/assets/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/assets/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/assets/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/assets/skills/systematic-debugging/CREATION-LOG.md +114 -0
- package/assets/skills/systematic-debugging/SKILL.md +296 -0
- package/assets/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/assets/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/assets/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/assets/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/assets/skills/systematic-debugging/scripts/find-polluter.sh +63 -0
- package/assets/skills/systematic-debugging/test-academic.md +14 -0
- package/assets/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/assets/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/assets/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/assets/skills/tdd-workflow/SKILL.md +409 -0
- package/assets/skills/test-driven-development/SKILL.md +371 -0
- package/assets/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/assets/skills/using-git-worktrees/SKILL.md +218 -0
- package/assets/skills/verification-before-completion/SKILL.md +139 -0
- package/assets/skills/verification-loop/SKILL.md +125 -0
- package/assets/skills/writing-plans/SKILL.md +116 -0
- package/dist/agents-AEKT67A6.js +9 -0
- package/dist/chunk-3GUKEMND.js +28 -0
- package/dist/chunk-3UNN3IBE.js +54 -0
- package/dist/chunk-3Y26YU4R.js +27 -0
- package/dist/chunk-5XOKKPAA.js +21 -0
- package/dist/chunk-6B46AIFM.js +136 -0
- package/dist/chunk-EYY2IZ7N.js +27 -0
- package/dist/chunk-K25UZZVG.js +17 -0
- package/dist/chunk-KEENFBLL.js +24 -0
- package/dist/chunk-RMUKD7CW.js +44 -0
- package/dist/chunk-W63UKEIT.js +50 -0
- package/dist/cli-VZRGF733.js +238 -0
- package/dist/commands-P5LILVZ5.js +9 -0
- package/dist/hooks-IIG2XK4I.js +9 -0
- package/dist/index.js +131 -0
- package/dist/mcps-67Q7TBGW.js +6 -0
- package/dist/paths-FT6KBIRD.js +10 -0
- package/dist/registry-EGXWYWWK.js +17 -0
- package/dist/rules-2CPBVNNJ.js +7 -0
- package/dist/skills-ULMW3UCM.js +8 -0
- package/package.json +36 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: receiving-code-review
|
|
3
|
+
description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Reception
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Code review requires technical evaluation, not emotional performance.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
|
|
13
|
+
|
|
14
|
+
## The Response Pattern
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
WHEN receiving code review feedback:
|
|
18
|
+
|
|
19
|
+
1. READ: Complete feedback without reacting
|
|
20
|
+
2. UNDERSTAND: Restate requirement in own words (or ask)
|
|
21
|
+
3. VERIFY: Check against codebase reality
|
|
22
|
+
4. EVALUATE: Technically sound for THIS codebase?
|
|
23
|
+
5. RESPOND: Technical acknowledgment or reasoned pushback
|
|
24
|
+
6. IMPLEMENT: One item at a time, test each
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Forbidden Responses
|
|
28
|
+
|
|
29
|
+
**NEVER:**
|
|
30
|
+
- "You're absolutely right!" (explicit CLAUDE.md violation)
|
|
31
|
+
- "Great point!" / "Excellent feedback!" (performative)
|
|
32
|
+
- "Let me implement that now" (before verification)
|
|
33
|
+
|
|
34
|
+
**INSTEAD:**
|
|
35
|
+
- Restate the technical requirement
|
|
36
|
+
- Ask clarifying questions
|
|
37
|
+
- Push back with technical reasoning if wrong
|
|
38
|
+
- Just start working (actions > words)
|
|
39
|
+
|
|
40
|
+
## Handling Unclear Feedback
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
IF any item is unclear:
|
|
44
|
+
STOP - do not implement anything yet
|
|
45
|
+
ASK for clarification on unclear items
|
|
46
|
+
|
|
47
|
+
WHY: Items may be related. Partial understanding = wrong implementation.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
```
|
|
52
|
+
your human partner: "Fix 1-6"
|
|
53
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
54
|
+
|
|
55
|
+
❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
|
|
56
|
+
✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Source-Specific Handling
|
|
60
|
+
|
|
61
|
+
### From your human partner
|
|
62
|
+
- **Trusted** - implement after understanding
|
|
63
|
+
- **Still ask** if scope unclear
|
|
64
|
+
- **No performative agreement**
|
|
65
|
+
- **Skip to action** or technical acknowledgment
|
|
66
|
+
|
|
67
|
+
### From External Reviewers
|
|
68
|
+
```
|
|
69
|
+
BEFORE implementing:
|
|
70
|
+
1. Check: Technically correct for THIS codebase?
|
|
71
|
+
2. Check: Breaks existing functionality?
|
|
72
|
+
3. Check: Reason for current implementation?
|
|
73
|
+
4. Check: Works on all platforms/versions?
|
|
74
|
+
5. Check: Does reviewer understand full context?
|
|
75
|
+
|
|
76
|
+
IF suggestion seems wrong:
|
|
77
|
+
Push back with technical reasoning
|
|
78
|
+
|
|
79
|
+
IF can't easily verify:
|
|
80
|
+
Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
|
|
81
|
+
|
|
82
|
+
IF conflicts with your human partner's prior decisions:
|
|
83
|
+
Stop and discuss with your human partner first
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**your human partner's rule:** "External feedback - be skeptical, but check carefully"
|
|
87
|
+
|
|
88
|
+
## YAGNI Check for "Professional" Features
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
IF reviewer suggests "implementing properly":
|
|
92
|
+
grep codebase for actual usage
|
|
93
|
+
|
|
94
|
+
IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
|
|
95
|
+
IF used: Then implement properly
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
|
|
99
|
+
|
|
100
|
+
## Implementation Order
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
FOR multi-item feedback:
|
|
104
|
+
1. Clarify anything unclear FIRST
|
|
105
|
+
2. Then implement in this order:
|
|
106
|
+
- Blocking issues (breaks, security)
|
|
107
|
+
- Simple fixes (typos, imports)
|
|
108
|
+
- Complex fixes (refactoring, logic)
|
|
109
|
+
3. Test each fix individually
|
|
110
|
+
4. Verify no regressions
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## When To Push Back
|
|
114
|
+
|
|
115
|
+
Push back when:
|
|
116
|
+
- Suggestion breaks existing functionality
|
|
117
|
+
- Reviewer lacks full context
|
|
118
|
+
- Violates YAGNI (unused feature)
|
|
119
|
+
- Technically incorrect for this stack
|
|
120
|
+
- Legacy/compatibility reasons exist
|
|
121
|
+
- Conflicts with your human partner's architectural decisions
|
|
122
|
+
|
|
123
|
+
**How to push back:**
|
|
124
|
+
- Use technical reasoning, not defensiveness
|
|
125
|
+
- Ask specific questions
|
|
126
|
+
- Reference working tests/code
|
|
127
|
+
- Involve your human partner if architectural
|
|
128
|
+
|
|
129
|
+
**Signal if uncomfortable pushing back out loud:** "Strange things are afoot at the Circle K"
|
|
130
|
+
|
|
131
|
+
## Acknowledging Correct Feedback
|
|
132
|
+
|
|
133
|
+
When feedback IS correct:
|
|
134
|
+
```
|
|
135
|
+
✅ "Fixed. [Brief description of what changed]"
|
|
136
|
+
✅ "Good catch - [specific issue]. Fixed in [location]."
|
|
137
|
+
✅ [Just fix it and show in the code]
|
|
138
|
+
|
|
139
|
+
❌ "You're absolutely right!"
|
|
140
|
+
❌ "Great point!"
|
|
141
|
+
❌ "Thanks for catching that!"
|
|
142
|
+
❌ "Thanks for [anything]"
|
|
143
|
+
❌ ANY gratitude expression
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
|
|
147
|
+
|
|
148
|
+
**If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
|
|
149
|
+
|
|
150
|
+
## Gracefully Correcting Your Pushback
|
|
151
|
+
|
|
152
|
+
If you pushed back and were wrong:
|
|
153
|
+
```
|
|
154
|
+
✅ "You were right - I checked [X] and it does [Y]. Implementing now."
|
|
155
|
+
✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
|
|
156
|
+
|
|
157
|
+
❌ Long apology
|
|
158
|
+
❌ Defending why you pushed back
|
|
159
|
+
❌ Over-explaining
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
State the correction factually and move on.
|
|
163
|
+
|
|
164
|
+
## Common Mistakes
|
|
165
|
+
|
|
166
|
+
| Mistake | Fix |
|
|
167
|
+
|---------|-----|
|
|
168
|
+
| Performative agreement | State requirement or just act |
|
|
169
|
+
| Blind implementation | Verify against codebase first |
|
|
170
|
+
| Batch without testing | One at a time, test each |
|
|
171
|
+
| Assuming reviewer is right | Check if breaks things |
|
|
172
|
+
| Avoiding pushback | Technical correctness > comfort |
|
|
173
|
+
| Partial implementation | Clarify all items first |
|
|
174
|
+
| Can't verify, proceed anyway | State limitation, ask for direction |
|
|
175
|
+
|
|
176
|
+
## Real Examples
|
|
177
|
+
|
|
178
|
+
**Performative Agreement (Bad):**
|
|
179
|
+
```
|
|
180
|
+
Reviewer: "Remove legacy code"
|
|
181
|
+
❌ "You're absolutely right! Let me remove that..."
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Technical Verification (Good):**
|
|
185
|
+
```
|
|
186
|
+
Reviewer: "Remove legacy code"
|
|
187
|
+
✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**YAGNI (Good):**
|
|
191
|
+
```
|
|
192
|
+
Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
|
|
193
|
+
✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Unclear Item (Good):**
|
|
197
|
+
```
|
|
198
|
+
your human partner: "Fix items 1-6"
|
|
199
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
200
|
+
✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## GitHub Thread Replies
|
|
204
|
+
|
|
205
|
+
When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
|
|
206
|
+
|
|
207
|
+
## The Bottom Line
|
|
208
|
+
|
|
209
|
+
**External feedback = suggestions to evaluate, not orders to follow.**
|
|
210
|
+
|
|
211
|
+
Verify. Question. Then implement.
|
|
212
|
+
|
|
213
|
+
No performative agreement. Technical rigor always.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: requesting-code-review
|
|
3
|
+
description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Requesting Code Review
|
|
7
|
+
|
|
8
|
+
Dispatch superpower-code-reviewer subagent to catch issues before they cascade.
|
|
9
|
+
|
|
10
|
+
**Core principle:** Review early, review often.
|
|
11
|
+
|
|
12
|
+
## When to Request Review
|
|
13
|
+
|
|
14
|
+
**Mandatory:**
|
|
15
|
+
- After each task in subagent-driven development
|
|
16
|
+
- After completing major feature
|
|
17
|
+
- Before merge to main
|
|
18
|
+
|
|
19
|
+
**Optional but valuable:**
|
|
20
|
+
- When stuck (fresh perspective)
|
|
21
|
+
- Before refactoring (baseline check)
|
|
22
|
+
- After fixing complex bug
|
|
23
|
+
|
|
24
|
+
## How to Request
|
|
25
|
+
|
|
26
|
+
**1. Get git SHAs:**
|
|
27
|
+
```bash
|
|
28
|
+
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
|
|
29
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**2. Dispatch superpower-code-reviewer subagent:**
|
|
33
|
+
|
|
34
|
+
Use Task tool with csuperpower-ode-reviewer type, fill template at `superpower-code-reviewer.md`
|
|
35
|
+
|
|
36
|
+
**Placeholders:**
|
|
37
|
+
- `{WHAT_WAS_IMPLEMENTED}` - What you just built
|
|
38
|
+
- `{PLAN_OR_REQUIREMENTS}` - What it should do
|
|
39
|
+
- `{BASE_SHA}` - Starting commit
|
|
40
|
+
- `{HEAD_SHA}` - Ending commit
|
|
41
|
+
- `{DESCRIPTION}` - Brief summary
|
|
42
|
+
|
|
43
|
+
**3. Act on feedback:**
|
|
44
|
+
- Fix Critical issues immediately
|
|
45
|
+
- Fix Important issues before proceeding
|
|
46
|
+
- Note Minor issues for later
|
|
47
|
+
- Push back if reviewer is wrong (with reasoning)
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
[Just completed Task 2: Add verification function]
|
|
53
|
+
|
|
54
|
+
You: Let me request code review before proceeding.
|
|
55
|
+
|
|
56
|
+
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
|
|
57
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
58
|
+
|
|
59
|
+
[Dispatch superpower-code-reviewer subagent]
|
|
60
|
+
WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
|
|
61
|
+
PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
|
|
62
|
+
BASE_SHA: a7981ec
|
|
63
|
+
HEAD_SHA: 3df7661
|
|
64
|
+
DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
|
|
65
|
+
|
|
66
|
+
[Subagent returns]:
|
|
67
|
+
Strengths: Clean architecture, real tests
|
|
68
|
+
Issues:
|
|
69
|
+
Important: Missing progress indicators
|
|
70
|
+
Minor: Magic number (100) for reporting interval
|
|
71
|
+
Assessment: Ready to proceed
|
|
72
|
+
|
|
73
|
+
You: [Fix progress indicators]
|
|
74
|
+
[Continue to Task 3]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Integration with Workflows
|
|
78
|
+
|
|
79
|
+
**Subagent-Driven Development:**
|
|
80
|
+
- Review after EACH task
|
|
81
|
+
- Catch issues before they compound
|
|
82
|
+
- Fix before moving to next task
|
|
83
|
+
|
|
84
|
+
**Executing Plans:**
|
|
85
|
+
- Review after each batch (3 tasks)
|
|
86
|
+
- Get feedback, apply, continue
|
|
87
|
+
|
|
88
|
+
**Ad-Hoc Development:**
|
|
89
|
+
- Review before merge
|
|
90
|
+
- Review when stuck
|
|
91
|
+
|
|
92
|
+
## Red Flags
|
|
93
|
+
|
|
94
|
+
**Never:**
|
|
95
|
+
- Skip review because "it's simple"
|
|
96
|
+
- Ignore Critical issues
|
|
97
|
+
- Proceed with unfixed Important issues
|
|
98
|
+
- Argue with valid technical feedback
|
|
99
|
+
|
|
100
|
+
**If reviewer wrong:**
|
|
101
|
+
- Push back with technical reasoning
|
|
102
|
+
- Show code/tests that prove it works
|
|
103
|
+
- Request clarification
|
|
104
|
+
|
|
105
|
+
See template at: code-reviewer-template.md
|
|
@@ -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,242 @@
|
|
|
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
|
+
**Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
```dot
|
|
15
|
+
digraph when_to_use {
|
|
16
|
+
"Have implementation plan?" [shape=diamond];
|
|
17
|
+
"Tasks mostly independent?" [shape=diamond];
|
|
18
|
+
"Stay in this session?" [shape=diamond];
|
|
19
|
+
"subagent-driven-development" [shape=box];
|
|
20
|
+
"executing-plans" [shape=box];
|
|
21
|
+
"Manual execution or brainstorm first" [shape=box];
|
|
22
|
+
|
|
23
|
+
"Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
|
|
24
|
+
"Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
|
|
25
|
+
"Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
|
|
26
|
+
"Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
|
|
27
|
+
"Stay in this session?" -> "subagent-driven-development" [label="yes"];
|
|
28
|
+
"Stay in this session?" -> "executing-plans" [label="no - parallel session"];
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**vs. Executing Plans (parallel session):**
|
|
33
|
+
- Same session (no context switch)
|
|
34
|
+
- Fresh subagent per task (no context pollution)
|
|
35
|
+
- Two-stage review after each task: spec compliance first, then code quality
|
|
36
|
+
- Faster iteration (no human-in-loop between tasks)
|
|
37
|
+
|
|
38
|
+
## The Process
|
|
39
|
+
|
|
40
|
+
```dot
|
|
41
|
+
digraph process {
|
|
42
|
+
rankdir=TB;
|
|
43
|
+
|
|
44
|
+
subgraph cluster_per_task {
|
|
45
|
+
label="Per Task";
|
|
46
|
+
"Dispatch implementer subagent (./references/implementer-prompt.md)" [shape=box];
|
|
47
|
+
"Implementer subagent asks questions?" [shape=diamond];
|
|
48
|
+
"Answer questions, provide context" [shape=box];
|
|
49
|
+
"Implementer subagent implements, tests, commits, self-reviews" [shape=box];
|
|
50
|
+
"Dispatch spec reviewer subagent (./references/spec-reviewer-prompt.md)" [shape=box];
|
|
51
|
+
"Spec reviewer subagent confirms code matches spec?" [shape=diamond];
|
|
52
|
+
"Implementer subagent fixes spec gaps" [shape=box];
|
|
53
|
+
"Dispatch code quality reviewer subagent (./references/code-quality-reviewer-prompt.md)" [shape=box];
|
|
54
|
+
"Code quality reviewer subagent approves?" [shape=diamond];
|
|
55
|
+
"Implementer subagent fixes quality issues" [shape=box];
|
|
56
|
+
"Mark task complete in TodoWrite" [shape=box];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
"Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
|
|
60
|
+
"More tasks remain?" [shape=diamond];
|
|
61
|
+
"Dispatch final code reviewer subagent for entire implementation" [shape=box];
|
|
62
|
+
"Use finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
|
|
63
|
+
|
|
64
|
+
"Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./references/implementer-prompt.md)";
|
|
65
|
+
"Dispatch implementer subagent (./references/implementer-prompt.md)" -> "Implementer subagent asks questions?";
|
|
66
|
+
"Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
|
|
67
|
+
"Answer questions, provide context" -> "Dispatch implementer subagent (./references/implementer-prompt.md)";
|
|
68
|
+
"Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
|
|
69
|
+
"Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./references/spec-reviewer-prompt.md)";
|
|
70
|
+
"Dispatch spec reviewer subagent (./references/spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
|
|
71
|
+
"Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
|
|
72
|
+
"Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer subagent (./references/spec-reviewer-prompt.md)" [label="re-review"];
|
|
73
|
+
"Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./references/code-quality-reviewer-prompt.md)" [label="yes"];
|
|
74
|
+
"Dispatch code quality reviewer subagent (./references/code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
|
|
75
|
+
"Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
|
|
76
|
+
"Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer subagent (./references/code-quality-reviewer-prompt.md)" [label="re-review"];
|
|
77
|
+
"Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
|
|
78
|
+
"Mark task complete in TodoWrite" -> "More tasks remain?";
|
|
79
|
+
"More tasks remain?" -> "Dispatch implementer subagent (./references/implementer-prompt.md)" [label="yes"];
|
|
80
|
+
"More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
|
|
81
|
+
"Dispatch final code reviewer subagent for entire implementation" -> "Use finishing-a-development-branch";
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Prompt Templates
|
|
86
|
+
|
|
87
|
+
- `./references/implementer-prompt.md` - Dispatch implementer subagent
|
|
88
|
+
- `./references/spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
|
|
89
|
+
- `./references/code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
|
|
90
|
+
|
|
91
|
+
## Example Workflow
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
You: I'm using Subagent-Driven Development to execute this plan.
|
|
95
|
+
|
|
96
|
+
[Read plan file once: docs/plans/feature-plan.md]
|
|
97
|
+
[Extract all 5 tasks with full text and context]
|
|
98
|
+
[Create TodoWrite with all tasks]
|
|
99
|
+
|
|
100
|
+
Task 1: Hook installation script
|
|
101
|
+
|
|
102
|
+
[Get Task 1 text and context (already extracted)]
|
|
103
|
+
[Dispatch implementation subagent with full task text + context]
|
|
104
|
+
|
|
105
|
+
Implementer: "Before I begin - should the hook be installed at user or system level?"
|
|
106
|
+
|
|
107
|
+
You: "User level (~/.claude/hooks/)"
|
|
108
|
+
|
|
109
|
+
Implementer: "Got it. Implementing now..."
|
|
110
|
+
[Later] Implementer:
|
|
111
|
+
- Implemented install-hook command
|
|
112
|
+
- Added tests, 5/5 passing
|
|
113
|
+
- Self-review: Found I missed --force flag, added it
|
|
114
|
+
- Committed
|
|
115
|
+
|
|
116
|
+
[Dispatch spec compliance reviewer]
|
|
117
|
+
Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
|
|
118
|
+
|
|
119
|
+
[Get git SHAs, dispatch code quality reviewer]
|
|
120
|
+
Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
|
|
121
|
+
|
|
122
|
+
[Mark Task 1 complete]
|
|
123
|
+
|
|
124
|
+
Task 2: Recovery modes
|
|
125
|
+
|
|
126
|
+
[Get Task 2 text and context (already extracted)]
|
|
127
|
+
[Dispatch implementation subagent with full task text + context]
|
|
128
|
+
|
|
129
|
+
Implementer: [No questions, proceeds]
|
|
130
|
+
Implementer:
|
|
131
|
+
- Added verify/repair modes
|
|
132
|
+
- 8/8 tests passing
|
|
133
|
+
- Self-review: All good
|
|
134
|
+
- Committed
|
|
135
|
+
|
|
136
|
+
[Dispatch spec compliance reviewer]
|
|
137
|
+
Spec reviewer: ❌ Issues:
|
|
138
|
+
- Missing: Progress reporting (spec says "report every 100 items")
|
|
139
|
+
- Extra: Added --json flag (not requested)
|
|
140
|
+
|
|
141
|
+
[Implementer fixes issues]
|
|
142
|
+
Implementer: Removed --json flag, added progress reporting
|
|
143
|
+
|
|
144
|
+
[Spec reviewer reviews again]
|
|
145
|
+
Spec reviewer: ✅ Spec compliant now
|
|
146
|
+
|
|
147
|
+
[Dispatch code quality reviewer]
|
|
148
|
+
Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
|
|
149
|
+
|
|
150
|
+
[Implementer fixes]
|
|
151
|
+
Implementer: Extracted PROGRESS_INTERVAL constant
|
|
152
|
+
|
|
153
|
+
[Code reviewer reviews again]
|
|
154
|
+
Code reviewer: ✅ Approved
|
|
155
|
+
|
|
156
|
+
[Mark Task 2 complete]
|
|
157
|
+
|
|
158
|
+
...
|
|
159
|
+
|
|
160
|
+
[After all tasks]
|
|
161
|
+
[Dispatch final superpower-code-reviewer]
|
|
162
|
+
Final reviewer: All requirements met, ready to merge
|
|
163
|
+
|
|
164
|
+
Done!
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Advantages
|
|
168
|
+
|
|
169
|
+
**vs. Manual execution:**
|
|
170
|
+
- Subagents follow TDD naturally
|
|
171
|
+
- Fresh context per task (no confusion)
|
|
172
|
+
- Parallel-safe (subagents don't interfere)
|
|
173
|
+
- Subagent can ask questions (before AND during work)
|
|
174
|
+
|
|
175
|
+
**vs. Executing Plans:**
|
|
176
|
+
- Same session (no handoff)
|
|
177
|
+
- Continuous progress (no waiting)
|
|
178
|
+
- Review checkpoints automatic
|
|
179
|
+
|
|
180
|
+
**Efficiency gains:**
|
|
181
|
+
- No file reading overhead (controller provides full text)
|
|
182
|
+
- Controller curates exactly what context is needed
|
|
183
|
+
- Subagent gets complete information upfront
|
|
184
|
+
- Questions surfaced before work begins (not after)
|
|
185
|
+
|
|
186
|
+
**Quality gates:**
|
|
187
|
+
- Self-review catches issues before handoff
|
|
188
|
+
- Two-stage review: spec compliance, then code quality
|
|
189
|
+
- Review loops ensure fixes actually work
|
|
190
|
+
- Spec compliance prevents over/under-building
|
|
191
|
+
- Code quality ensures implementation is well-built
|
|
192
|
+
|
|
193
|
+
**Cost:**
|
|
194
|
+
- More subagent invocations (implementer + 2 reviewers per task)
|
|
195
|
+
- Controller does more prep work (extracting all tasks upfront)
|
|
196
|
+
- Review loops add iterations
|
|
197
|
+
- But catches issues early (cheaper than debugging later)
|
|
198
|
+
|
|
199
|
+
## Red Flags
|
|
200
|
+
|
|
201
|
+
**Never:**
|
|
202
|
+
- Start implementation on main/master branch without explicit user consent
|
|
203
|
+
- Skip reviews (spec compliance OR code quality)
|
|
204
|
+
- Proceed with unfixed issues
|
|
205
|
+
- Dispatch multiple implementation subagents in parallel (conflicts)
|
|
206
|
+
- Make subagent read plan file (provide full text instead)
|
|
207
|
+
- Skip scene-setting context (subagent needs to understand where task fits)
|
|
208
|
+
- Ignore subagent questions (answer before letting them proceed)
|
|
209
|
+
- Accept "close enough" on spec compliance (spec reviewer found issues = not done)
|
|
210
|
+
- Skip review loops (reviewer found issues = implementer fixes = review again)
|
|
211
|
+
- Let implementer self-review replace actual review (both are needed)
|
|
212
|
+
- **Start code quality review before spec compliance is ✅** (wrong order)
|
|
213
|
+
- Move to next task while either review has open issues
|
|
214
|
+
|
|
215
|
+
**If subagent asks questions:**
|
|
216
|
+
- Answer clearly and completely
|
|
217
|
+
- Provide additional context if needed
|
|
218
|
+
- Don't rush them into implementation
|
|
219
|
+
|
|
220
|
+
**If reviewer finds issues:**
|
|
221
|
+
- Implementer (same subagent) fixes them
|
|
222
|
+
- Reviewer reviews again
|
|
223
|
+
- Repeat until approved
|
|
224
|
+
- Don't skip the re-review
|
|
225
|
+
|
|
226
|
+
**If subagent fails task:**
|
|
227
|
+
- Dispatch fix subagent with specific instructions
|
|
228
|
+
- Don't try to fix manually (context pollution)
|
|
229
|
+
|
|
230
|
+
## Integration
|
|
231
|
+
|
|
232
|
+
**Required workflow skills:**
|
|
233
|
+
- **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
|
|
234
|
+
- **superpowers:writing-plans** - Creates the plan this skill executes
|
|
235
|
+
- **superpowers:requesting-code-review** - Code review template for reviewer subagents
|
|
236
|
+
- **superpowers:finishing-a-development-branch** - Complete development after all tasks
|
|
237
|
+
|
|
238
|
+
**Subagents should use:**
|
|
239
|
+
- **superpowers:test-driven-development** - Subagents follow TDD for each task
|
|
240
|
+
|
|
241
|
+
**Alternative workflow:**
|
|
242
|
+
- **superpowers:executing-plans** - Use for parallel session instead of same-session execution
|