@locksmithdon/dons-flow 2.1.2 → 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.
- package/README.md +19 -71
- package/docs/conventions.md +1 -2
- package/docs/memory/.upstream-last-sync.json +4 -0
- package/docs/memory/MEMORY.md +2 -1
- package/docs/memory/monitor_upstream_evolution.md +8 -6
- package/docs/memory/upstream-sync-2026-06-13.md +61 -0
- package/docs/runbooks/monitor-upstream-evolution.md +74 -45
- package/package.json +21 -5
- package/scripts/sync-upstream.sh +193 -0
- package/skills/dons-flow/SKILL.md +9 -11
- package/skills/land/SKILL.md +2 -2
- package/skills/setup-dons-flow/SKILL.md +24 -120
- package/skills/sync-upstream/SKILL.md +94 -0
- package/vendor/superpowers/LICENSE +21 -0
- package/vendor/superpowers/skills/brainstorming/SKILL.md +164 -0
- package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +214 -0
- package/vendor/superpowers/skills/brainstorming/scripts/helper.js +88 -0
- package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +354 -0
- package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +148 -0
- package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/vendor/superpowers/skills/brainstorming/visual-companion.md +287 -0
- package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/vendor/superpowers/skills/executing-plans/SKILL.md +70 -0
- package/vendor/superpowers/skills/receiving-code-review/SKILL.md +213 -0
- package/vendor/superpowers/skills/requesting-code-review/SKILL.md +103 -0
- package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +168 -0
- package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +279 -0
- package/vendor/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
- package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/vendor/superpowers/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/vendor/superpowers/skills/systematic-debugging/SKILL.md +296 -0
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +63 -0
- package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/vendor/superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/vendor/superpowers/skills/test-driven-development/SKILL.md +371 -0
- package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/vendor/superpowers/skills/using-superpowers/SKILL.md +117 -0
- package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +59 -0
- package/vendor/superpowers/skills/using-superpowers/references/copilot-tools.md +42 -0
- package/vendor/superpowers/skills/using-superpowers/references/gemini-tools.md +51 -0
- package/vendor/superpowers/skills/writing-plans/SKILL.md +152 -0
- package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/vendor/superpowers/skills/writing-skills/SKILL.md +655 -0
- package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/vendor/superpowers/skills/writing-skills/render-graphs.js +168 -0
- package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatching-parallel-agents
|
|
3
|
+
description: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dispatching Parallel Agents
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
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
|
+
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
|
|
13
|
+
|
|
14
|
+
**Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
```dot
|
|
19
|
+
digraph when_to_use {
|
|
20
|
+
"Multiple failures?" [shape=diamond];
|
|
21
|
+
"Are they independent?" [shape=diamond];
|
|
22
|
+
"Single agent investigates all" [shape=box];
|
|
23
|
+
"One agent per problem domain" [shape=box];
|
|
24
|
+
"Can they work in parallel?" [shape=diamond];
|
|
25
|
+
"Sequential agents" [shape=box];
|
|
26
|
+
"Parallel dispatch" [shape=box];
|
|
27
|
+
|
|
28
|
+
"Multiple failures?" -> "Are they independent?" [label="yes"];
|
|
29
|
+
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
|
|
30
|
+
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
|
|
31
|
+
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
|
|
32
|
+
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Use when:**
|
|
37
|
+
- 3+ test files failing with different root causes
|
|
38
|
+
- Multiple subsystems broken independently
|
|
39
|
+
- Each problem can be understood without context from others
|
|
40
|
+
- No shared state between investigations
|
|
41
|
+
|
|
42
|
+
**Don't use when:**
|
|
43
|
+
- Failures are related (fix one might fix others)
|
|
44
|
+
- Need to understand full system state
|
|
45
|
+
- Agents would interfere with each other
|
|
46
|
+
|
|
47
|
+
## The Pattern
|
|
48
|
+
|
|
49
|
+
### 1. Identify Independent Domains
|
|
50
|
+
|
|
51
|
+
Group failures by what's broken:
|
|
52
|
+
- File A tests: Tool approval flow
|
|
53
|
+
- File B tests: Batch completion behavior
|
|
54
|
+
- File C tests: Abort functionality
|
|
55
|
+
|
|
56
|
+
Each domain is independent - fixing tool approval doesn't affect abort tests.
|
|
57
|
+
|
|
58
|
+
### 2. Create Focused Agent Tasks
|
|
59
|
+
|
|
60
|
+
Each agent gets:
|
|
61
|
+
- **Specific scope:** One test file or subsystem
|
|
62
|
+
- **Clear goal:** Make these tests pass
|
|
63
|
+
- **Constraints:** Don't change other code
|
|
64
|
+
- **Expected output:** Summary of what you found and fixed
|
|
65
|
+
|
|
66
|
+
### 3. Dispatch in Parallel
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// In Claude Code / AI environment
|
|
70
|
+
Task("Fix agent-tool-abort.test.ts failures")
|
|
71
|
+
Task("Fix batch-completion-behavior.test.ts failures")
|
|
72
|
+
Task("Fix tool-approval-race-conditions.test.ts failures")
|
|
73
|
+
// All three run concurrently
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Review and Integrate
|
|
77
|
+
|
|
78
|
+
When agents return:
|
|
79
|
+
- Read each summary
|
|
80
|
+
- Verify fixes don't conflict
|
|
81
|
+
- Run full test suite
|
|
82
|
+
- Integrate all changes
|
|
83
|
+
|
|
84
|
+
## Agent Prompt Structure
|
|
85
|
+
|
|
86
|
+
Good agent prompts are:
|
|
87
|
+
1. **Focused** - One clear problem domain
|
|
88
|
+
2. **Self-contained** - All context needed to understand the problem
|
|
89
|
+
3. **Specific about output** - What should the agent return?
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
|
|
93
|
+
|
|
94
|
+
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
|
|
95
|
+
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
|
|
96
|
+
3. "should properly track pendingToolCount" - expects 3 results but gets 0
|
|
97
|
+
|
|
98
|
+
These are timing/race condition issues. Your task:
|
|
99
|
+
|
|
100
|
+
1. Read the test file and understand what each test verifies
|
|
101
|
+
2. Identify root cause - timing issues or actual bugs?
|
|
102
|
+
3. Fix by:
|
|
103
|
+
- Replacing arbitrary timeouts with event-based waiting
|
|
104
|
+
- Fixing bugs in abort implementation if found
|
|
105
|
+
- Adjusting test expectations if testing changed behavior
|
|
106
|
+
|
|
107
|
+
Do NOT just increase timeouts - find the real issue.
|
|
108
|
+
|
|
109
|
+
Return: Summary of what you found and what you fixed.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Common Mistakes
|
|
113
|
+
|
|
114
|
+
**❌ Too broad:** "Fix all the tests" - agent gets lost
|
|
115
|
+
**✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
|
|
116
|
+
|
|
117
|
+
**❌ No context:** "Fix the race condition" - agent doesn't know where
|
|
118
|
+
**✅ Context:** Paste the error messages and test names
|
|
119
|
+
|
|
120
|
+
**❌ No constraints:** Agent might refactor everything
|
|
121
|
+
**✅ Constraints:** "Do NOT change production code" or "Fix tests only"
|
|
122
|
+
|
|
123
|
+
**❌ Vague output:** "Fix it" - you don't know what changed
|
|
124
|
+
**✅ Specific:** "Return summary of root cause and changes"
|
|
125
|
+
|
|
126
|
+
## When NOT to Use
|
|
127
|
+
|
|
128
|
+
**Related failures:** Fixing one might fix others - investigate together first
|
|
129
|
+
**Need full context:** Understanding requires seeing entire system
|
|
130
|
+
**Exploratory debugging:** You don't know what's broken yet
|
|
131
|
+
**Shared state:** Agents would interfere (editing same files, using same resources)
|
|
132
|
+
|
|
133
|
+
## Real Example from Session
|
|
134
|
+
|
|
135
|
+
**Scenario:** 6 test failures across 3 files after major refactoring
|
|
136
|
+
|
|
137
|
+
**Failures:**
|
|
138
|
+
- agent-tool-abort.test.ts: 3 failures (timing issues)
|
|
139
|
+
- batch-completion-behavior.test.ts: 2 failures (tools not executing)
|
|
140
|
+
- tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)
|
|
141
|
+
|
|
142
|
+
**Decision:** Independent domains - abort logic separate from batch completion separate from race conditions
|
|
143
|
+
|
|
144
|
+
**Dispatch:**
|
|
145
|
+
```
|
|
146
|
+
Agent 1 → Fix agent-tool-abort.test.ts
|
|
147
|
+
Agent 2 → Fix batch-completion-behavior.test.ts
|
|
148
|
+
Agent 3 → Fix tool-approval-race-conditions.test.ts
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Results:**
|
|
152
|
+
- Agent 1: Replaced timeouts with event-based waiting
|
|
153
|
+
- Agent 2: Fixed event structure bug (threadId in wrong place)
|
|
154
|
+
- Agent 3: Added wait for async tool execution to complete
|
|
155
|
+
|
|
156
|
+
**Integration:** All fixes independent, no conflicts, full suite green
|
|
157
|
+
|
|
158
|
+
**Time saved:** 3 problems solved in parallel vs sequentially
|
|
159
|
+
|
|
160
|
+
## Key Benefits
|
|
161
|
+
|
|
162
|
+
1. **Parallelization** - Multiple investigations happen simultaneously
|
|
163
|
+
2. **Focus** - Each agent has narrow scope, less context to track
|
|
164
|
+
3. **Independence** - Agents don't interfere with each other
|
|
165
|
+
4. **Speed** - 3 problems solved in time of 1
|
|
166
|
+
|
|
167
|
+
## Verification
|
|
168
|
+
|
|
169
|
+
After agents return:
|
|
170
|
+
1. **Review each summary** - Understand what changed
|
|
171
|
+
2. **Check for conflicts** - Did agents edit same code?
|
|
172
|
+
3. **Run full suite** - Verify all fixes work together
|
|
173
|
+
4. **Spot check** - Agents can make systematic errors
|
|
174
|
+
|
|
175
|
+
## Real-World Impact
|
|
176
|
+
|
|
177
|
+
From debugging session (2025-10-03):
|
|
178
|
+
- 6 failures across 3 files
|
|
179
|
+
- 3 agents dispatched in parallel
|
|
180
|
+
- All investigations completed concurrently
|
|
181
|
+
- All fixes integrated successfully
|
|
182
|
+
- Zero conflicts between agent changes
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: executing-plans
|
|
3
|
+
description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Executing Plans
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Load plan, review critically, execute all tasks, report when complete.
|
|
11
|
+
|
|
12
|
+
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
|
|
13
|
+
|
|
14
|
+
**Note:** Tell your human partner that Superpowers works much better with access to subagents. The quality of its work will be significantly higher if run on a platform with subagent support (such as Claude Code or Codex). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
|
|
15
|
+
|
|
16
|
+
## The Process
|
|
17
|
+
|
|
18
|
+
### Step 1: Load and Review Plan
|
|
19
|
+
1. Read plan file
|
|
20
|
+
2. Review critically - identify any questions or concerns about the plan
|
|
21
|
+
3. If concerns: Raise them with your human partner before starting
|
|
22
|
+
4. If no concerns: Create TodoWrite and proceed
|
|
23
|
+
|
|
24
|
+
### Step 2: Execute Tasks
|
|
25
|
+
|
|
26
|
+
For each task:
|
|
27
|
+
1. Mark as in_progress
|
|
28
|
+
2. Follow each step exactly (plan has bite-sized steps)
|
|
29
|
+
3. Run verifications as specified
|
|
30
|
+
4. Mark as completed
|
|
31
|
+
|
|
32
|
+
### Step 3: Complete Development
|
|
33
|
+
|
|
34
|
+
After all tasks complete and verified:
|
|
35
|
+
- Announce: "I'm using the finishing-a-development-branch skill to complete this work."
|
|
36
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
|
|
37
|
+
- Follow that skill to verify tests, present options, execute choice
|
|
38
|
+
|
|
39
|
+
## When to Stop and Ask for Help
|
|
40
|
+
|
|
41
|
+
**STOP executing immediately when:**
|
|
42
|
+
- Hit a blocker (missing dependency, test fails, instruction unclear)
|
|
43
|
+
- Plan has critical gaps preventing starting
|
|
44
|
+
- You don't understand an instruction
|
|
45
|
+
- Verification fails repeatedly
|
|
46
|
+
|
|
47
|
+
**Ask for clarification rather than guessing.**
|
|
48
|
+
|
|
49
|
+
## When to Revisit Earlier Steps
|
|
50
|
+
|
|
51
|
+
**Return to Review (Step 1) when:**
|
|
52
|
+
- Partner updates the plan based on your feedback
|
|
53
|
+
- Fundamental approach needs rethinking
|
|
54
|
+
|
|
55
|
+
**Don't force through blockers** - stop and ask.
|
|
56
|
+
|
|
57
|
+
## Remember
|
|
58
|
+
- Review plan critically first
|
|
59
|
+
- Follow plan steps exactly
|
|
60
|
+
- Don't skip verifications
|
|
61
|
+
- Reference skills when plan says to
|
|
62
|
+
- Stop when blocked, don't guess
|
|
63
|
+
- Never start implementation on main/master branch without explicit user consent
|
|
64
|
+
|
|
65
|
+
## Integration
|
|
66
|
+
|
|
67
|
+
**Required workflow skills:**
|
|
68
|
+
- **superpowers:using-git-worktrees** - Ensures isolated workspace (creates one or verifies existing)
|
|
69
|
+
- **superpowers:writing-plans** - Creates the plan this skill executes
|
|
70
|
+
- **superpowers:finishing-a-development-branch** - Complete development after all tasks
|
|
@@ -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,103 @@
|
|
|
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 a code reviewer subagent to catch issues before they cascade. The reviewer gets precisely crafted context for evaluation — never your session's history. This keeps the reviewer focused on the work product, not your thought process, and preserves your own context for continued work.
|
|
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 `general-purpose` type, fill template at `code-reviewer.md`
|
|
35
|
+
|
|
36
|
+
**Placeholders:**
|
|
37
|
+
- `{DESCRIPTION}` - Brief summary of what you built
|
|
38
|
+
- `{PLAN_OR_REQUIREMENTS}` - What it should do
|
|
39
|
+
- `{BASE_SHA}` - Starting commit
|
|
40
|
+
- `{HEAD_SHA}` - Ending commit
|
|
41
|
+
|
|
42
|
+
**3. Act on feedback:**
|
|
43
|
+
- Fix Critical issues immediately
|
|
44
|
+
- Fix Important issues before proceeding
|
|
45
|
+
- Note Minor issues for later
|
|
46
|
+
- Push back if reviewer is wrong (with reasoning)
|
|
47
|
+
|
|
48
|
+
## Example
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
[Just completed Task 2: Add verification function]
|
|
52
|
+
|
|
53
|
+
You: Let me request code review before proceeding.
|
|
54
|
+
|
|
55
|
+
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
|
|
56
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
57
|
+
|
|
58
|
+
[Dispatch code reviewer subagent]
|
|
59
|
+
DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
|
|
60
|
+
PLAN_OR_REQUIREMENTS: Task 2 from docs/superpowers/plans/deployment-plan.md
|
|
61
|
+
BASE_SHA: a7981ec
|
|
62
|
+
HEAD_SHA: 3df7661
|
|
63
|
+
|
|
64
|
+
[Subagent returns]:
|
|
65
|
+
Strengths: Clean architecture, real tests
|
|
66
|
+
Issues:
|
|
67
|
+
Important: Missing progress indicators
|
|
68
|
+
Minor: Magic number (100) for reporting interval
|
|
69
|
+
Assessment: Ready to proceed
|
|
70
|
+
|
|
71
|
+
You: [Fix progress indicators]
|
|
72
|
+
[Continue to Task 3]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Integration with Workflows
|
|
76
|
+
|
|
77
|
+
**Subagent-Driven Development:**
|
|
78
|
+
- Review after EACH task
|
|
79
|
+
- Catch issues before they compound
|
|
80
|
+
- Fix before moving to next task
|
|
81
|
+
|
|
82
|
+
**Executing Plans:**
|
|
83
|
+
- Review after each task or at natural checkpoints
|
|
84
|
+
- Get feedback, apply, continue
|
|
85
|
+
|
|
86
|
+
**Ad-Hoc Development:**
|
|
87
|
+
- Review before merge
|
|
88
|
+
- Review when stuck
|
|
89
|
+
|
|
90
|
+
## Red Flags
|
|
91
|
+
|
|
92
|
+
**Never:**
|
|
93
|
+
- Skip review because "it's simple"
|
|
94
|
+
- Ignore Critical issues
|
|
95
|
+
- Proceed with unfixed Important issues
|
|
96
|
+
- Argue with valid technical feedback
|
|
97
|
+
|
|
98
|
+
**If reviewer wrong:**
|
|
99
|
+
- Push back with technical reasoning
|
|
100
|
+
- Show code/tests that prove it works
|
|
101
|
+
- Request clarification
|
|
102
|
+
|
|
103
|
+
See template at: requesting-code-review/code-reviewer.md
|