superpowers-opencode-fork-dev-test 1.0.0 → 1.0.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/.opencode/plugins/superpowers.js +219 -0
- package/README.md +28 -1
- package/package.json +2 -3
- package/skills/brainstorming/SKILL.md +0 -54
- package/skills/dispatching-parallel-agents/SKILL.md +0 -180
- package/skills/executing-plans/SKILL.md +0 -76
- package/skills/finishing-a-development-branch/SKILL.md +0 -200
- package/skills/receiving-code-review/SKILL.md +0 -213
- package/skills/requesting-code-review/SKILL.md +0 -105
- package/skills/requesting-code-review/code-reviewer.md +0 -146
- package/skills/subagent-driven-development/SKILL.md +0 -240
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -20
- package/skills/subagent-driven-development/implementer-prompt.md +0 -78
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -61
- package/skills/systematic-debugging/CREATION-LOG.md +0 -119
- package/skills/systematic-debugging/SKILL.md +0 -296
- package/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/skills/systematic-debugging/condition-based-waiting.md +0 -115
- package/skills/systematic-debugging/defense-in-depth.md +0 -122
- package/skills/systematic-debugging/find-polluter.sh +0 -63
- package/skills/systematic-debugging/root-cause-tracing.md +0 -169
- package/skills/systematic-debugging/test-academic.md +0 -14
- package/skills/systematic-debugging/test-pressure-1.md +0 -58
- package/skills/systematic-debugging/test-pressure-2.md +0 -68
- package/skills/systematic-debugging/test-pressure-3.md +0 -69
- package/skills/test-driven-development/SKILL.md +0 -371
- package/skills/test-driven-development/testing-anti-patterns.md +0 -299
- package/skills/using-git-worktrees/SKILL.md +0 -217
- package/skills/using-superpowers/SKILL.md +0 -87
- package/skills/verification-before-completion/SKILL.md +0 -139
- package/skills/writing-plans/SKILL.md +0 -116
- package/skills/writing-skills/SKILL.md +0 -655
- package/skills/writing-skills/anthropic-best-practices.md +0 -1150
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/skills/writing-skills/graphviz-conventions.dot +0 -172
- package/skills/writing-skills/persuasion-principles.md +0 -187
- package/skills/writing-skills/render-graphs.js +0 -168
- package/skills/writing-skills/testing-skills-with-subagents.md +0 -384
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: finishing-a-development-branch
|
|
3
|
-
description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Finishing a Development Branch
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Guide completion of development work by presenting clear options and handling chosen workflow.
|
|
11
|
-
|
|
12
|
-
**Core principle:** Verify tests → Present options → Execute choice → Clean up.
|
|
13
|
-
|
|
14
|
-
**Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
|
|
15
|
-
|
|
16
|
-
## The Process
|
|
17
|
-
|
|
18
|
-
### Step 1: Verify Tests
|
|
19
|
-
|
|
20
|
-
**Before presenting options, verify tests pass:**
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Run project's test suite
|
|
24
|
-
npm test / cargo test / pytest / go test ./...
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**If tests fail:**
|
|
28
|
-
```
|
|
29
|
-
Tests failing (<N> failures). Must fix before completing:
|
|
30
|
-
|
|
31
|
-
[Show failures]
|
|
32
|
-
|
|
33
|
-
Cannot proceed with merge/PR until tests pass.
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Stop. Don't proceed to Step 2.
|
|
37
|
-
|
|
38
|
-
**If tests pass:** Continue to Step 2.
|
|
39
|
-
|
|
40
|
-
### Step 2: Determine Base Branch
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# Try common base branches
|
|
44
|
-
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Or ask: "This branch split from main - is that correct?"
|
|
48
|
-
|
|
49
|
-
### Step 3: Present Options
|
|
50
|
-
|
|
51
|
-
Present exactly these 4 options:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
Implementation complete. What would you like to do?
|
|
55
|
-
|
|
56
|
-
1. Merge back to <base-branch> locally
|
|
57
|
-
2. Push and create a Pull Request
|
|
58
|
-
3. Keep the branch as-is (I'll handle it later)
|
|
59
|
-
4. Discard this work
|
|
60
|
-
|
|
61
|
-
Which option?
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**Don't add explanation** - keep options concise.
|
|
65
|
-
|
|
66
|
-
### Step 4: Execute Choice
|
|
67
|
-
|
|
68
|
-
#### Option 1: Merge Locally
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Switch to base branch
|
|
72
|
-
git checkout <base-branch>
|
|
73
|
-
|
|
74
|
-
# Pull latest
|
|
75
|
-
git pull
|
|
76
|
-
|
|
77
|
-
# Merge feature branch
|
|
78
|
-
git merge <feature-branch>
|
|
79
|
-
|
|
80
|
-
# Verify tests on merged result
|
|
81
|
-
<test command>
|
|
82
|
-
|
|
83
|
-
# If tests pass
|
|
84
|
-
git branch -d <feature-branch>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Then: Cleanup worktree (Step 5)
|
|
88
|
-
|
|
89
|
-
#### Option 2: Push and Create PR
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
# Push branch
|
|
93
|
-
git push -u origin <feature-branch>
|
|
94
|
-
|
|
95
|
-
# Create PR
|
|
96
|
-
gh pr create --title "<title>" --body "$(cat <<'EOF'
|
|
97
|
-
## Summary
|
|
98
|
-
<2-3 bullets of what changed>
|
|
99
|
-
|
|
100
|
-
## Test Plan
|
|
101
|
-
- [ ] <verification steps>
|
|
102
|
-
EOF
|
|
103
|
-
)"
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Then: Cleanup worktree (Step 5)
|
|
107
|
-
|
|
108
|
-
#### Option 3: Keep As-Is
|
|
109
|
-
|
|
110
|
-
Report: "Keeping branch <name>. Worktree preserved at <path>."
|
|
111
|
-
|
|
112
|
-
**Don't cleanup worktree.**
|
|
113
|
-
|
|
114
|
-
#### Option 4: Discard
|
|
115
|
-
|
|
116
|
-
**Confirm first:**
|
|
117
|
-
```
|
|
118
|
-
This will permanently delete:
|
|
119
|
-
- Branch <name>
|
|
120
|
-
- All commits: <commit-list>
|
|
121
|
-
- Worktree at <path>
|
|
122
|
-
|
|
123
|
-
Type 'discard' to confirm.
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Wait for exact confirmation.
|
|
127
|
-
|
|
128
|
-
If confirmed:
|
|
129
|
-
```bash
|
|
130
|
-
git checkout <base-branch>
|
|
131
|
-
git branch -D <feature-branch>
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Then: Cleanup worktree (Step 5)
|
|
135
|
-
|
|
136
|
-
### Step 5: Cleanup Worktree
|
|
137
|
-
|
|
138
|
-
**For Options 1, 2, 4:**
|
|
139
|
-
|
|
140
|
-
Check if in worktree:
|
|
141
|
-
```bash
|
|
142
|
-
git worktree list | grep $(git branch --show-current)
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
If yes:
|
|
146
|
-
```bash
|
|
147
|
-
git worktree remove <worktree-path>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**For Option 3:** Keep worktree.
|
|
151
|
-
|
|
152
|
-
## Quick Reference
|
|
153
|
-
|
|
154
|
-
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|
|
155
|
-
|--------|-------|------|---------------|----------------|
|
|
156
|
-
| 1. Merge locally | ✓ | - | - | ✓ |
|
|
157
|
-
| 2. Create PR | - | ✓ | ✓ | - |
|
|
158
|
-
| 3. Keep as-is | - | - | ✓ | - |
|
|
159
|
-
| 4. Discard | - | - | - | ✓ (force) |
|
|
160
|
-
|
|
161
|
-
## Common Mistakes
|
|
162
|
-
|
|
163
|
-
**Skipping test verification**
|
|
164
|
-
- **Problem:** Merge broken code, create failing PR
|
|
165
|
-
- **Fix:** Always verify tests before offering options
|
|
166
|
-
|
|
167
|
-
**Open-ended questions**
|
|
168
|
-
- **Problem:** "What should I do next?" → ambiguous
|
|
169
|
-
- **Fix:** Present exactly 4 structured options
|
|
170
|
-
|
|
171
|
-
**Automatic worktree cleanup**
|
|
172
|
-
- **Problem:** Remove worktree when might need it (Option 2, 3)
|
|
173
|
-
- **Fix:** Only cleanup for Options 1 and 4
|
|
174
|
-
|
|
175
|
-
**No confirmation for discard**
|
|
176
|
-
- **Problem:** Accidentally delete work
|
|
177
|
-
- **Fix:** Require typed "discard" confirmation
|
|
178
|
-
|
|
179
|
-
## Red Flags
|
|
180
|
-
|
|
181
|
-
**Never:**
|
|
182
|
-
- Proceed with failing tests
|
|
183
|
-
- Merge without verifying tests on result
|
|
184
|
-
- Delete work without confirmation
|
|
185
|
-
- Force-push without explicit request
|
|
186
|
-
|
|
187
|
-
**Always:**
|
|
188
|
-
- Verify tests before offering options
|
|
189
|
-
- Present exactly 4 options
|
|
190
|
-
- Get typed confirmation for Option 4
|
|
191
|
-
- Clean up worktree for Options 1 & 4 only
|
|
192
|
-
|
|
193
|
-
## Integration
|
|
194
|
-
|
|
195
|
-
**Called by:**
|
|
196
|
-
- **subagent-driven-development** (Step 7) - After all tasks complete
|
|
197
|
-
- **executing-plans** (Step 5) - After all batches complete
|
|
198
|
-
|
|
199
|
-
**Pairs with:**
|
|
200
|
-
- **using-git-worktrees** - Cleans up worktree created by that skill
|
|
@@ -1,213 +0,0 @@
|
|
|
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.
|
|
@@ -1,105 +0,0 @@
|
|
|
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 superpowers: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 code-reviewer subagent:**
|
|
33
|
-
|
|
34
|
-
Use Task tool with superpowers:code-reviewer type, fill template at `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 superpowers: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: requesting-code-review/code-reviewer.md
|
|
@@ -1,146 +0,0 @@
|
|
|
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
|
-
```
|