codingbuddy-rules 4.5.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/.ai-rules/adapters/aider.md +374 -0
  2. package/.ai-rules/adapters/antigravity.md +6 -6
  3. package/.ai-rules/adapters/claude-code.md +68 -4
  4. package/.ai-rules/adapters/codex.md +5 -5
  5. package/.ai-rules/adapters/cursor.md +2 -2
  6. package/.ai-rules/adapters/kiro.md +8 -8
  7. package/.ai-rules/adapters/opencode.md +7 -7
  8. package/.ai-rules/adapters/q.md +2 -2
  9. package/.ai-rules/adapters/windsurf.md +395 -0
  10. package/.ai-rules/agents/README.md +66 -16
  11. package/.ai-rules/agents/accessibility-specialist.json +8 -1
  12. package/.ai-rules/agents/act-mode.json +8 -1
  13. package/.ai-rules/agents/agent-architect.json +14 -7
  14. package/.ai-rules/agents/ai-ml-engineer.json +7 -0
  15. package/.ai-rules/agents/architecture-specialist.json +7 -0
  16. package/.ai-rules/agents/auto-mode.json +10 -2
  17. package/.ai-rules/agents/backend-developer.json +7 -0
  18. package/.ai-rules/agents/code-quality-specialist.json +7 -0
  19. package/.ai-rules/agents/code-reviewer.json +86 -64
  20. package/.ai-rules/agents/data-engineer.json +14 -7
  21. package/.ai-rules/agents/data-scientist.json +16 -9
  22. package/.ai-rules/agents/devops-engineer.json +7 -0
  23. package/.ai-rules/agents/documentation-specialist.json +7 -0
  24. package/.ai-rules/agents/eval-mode.json +30 -19
  25. package/.ai-rules/agents/event-architecture-specialist.json +7 -0
  26. package/.ai-rules/agents/frontend-developer.json +7 -0
  27. package/.ai-rules/agents/i18n-specialist.json +8 -1
  28. package/.ai-rules/agents/integration-specialist.json +7 -0
  29. package/.ai-rules/agents/migration-specialist.json +7 -0
  30. package/.ai-rules/agents/mobile-developer.json +8 -10
  31. package/.ai-rules/agents/observability-specialist.json +7 -0
  32. package/.ai-rules/agents/parallel-orchestrator.json +352 -0
  33. package/.ai-rules/agents/performance-specialist.json +7 -0
  34. package/.ai-rules/agents/plan-mode.json +9 -1
  35. package/.ai-rules/agents/plan-reviewer.json +211 -0
  36. package/.ai-rules/agents/platform-engineer.json +7 -0
  37. package/.ai-rules/agents/security-engineer.json +15 -8
  38. package/.ai-rules/agents/security-specialist.json +8 -1
  39. package/.ai-rules/agents/seo-specialist.json +7 -0
  40. package/.ai-rules/agents/software-engineer.json +7 -0
  41. package/.ai-rules/agents/solution-architect.json +17 -10
  42. package/.ai-rules/agents/systems-developer.json +15 -8
  43. package/.ai-rules/agents/technical-planner.json +17 -10
  44. package/.ai-rules/agents/test-engineer.json +13 -6
  45. package/.ai-rules/agents/test-strategy-specialist.json +7 -0
  46. package/.ai-rules/agents/tooling-engineer.json +10 -3
  47. package/.ai-rules/agents/ui-ux-designer.json +7 -0
  48. package/.ai-rules/keyword-modes.json +4 -4
  49. package/.ai-rules/rules/clarification-guide.md +14 -14
  50. package/.ai-rules/rules/core.md +73 -0
  51. package/.ai-rules/rules/parallel-execution.md +217 -0
  52. package/.ai-rules/schemas/agent.schema.json +38 -0
  53. package/.ai-rules/skills/README.md +29 -1
  54. package/.ai-rules/skills/agent-design/SKILL.md +5 -0
  55. package/.ai-rules/skills/agent-design/examples/agent-template.json +55 -0
  56. package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
  57. package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
  58. package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
  59. package/.ai-rules/skills/api-design/SKILL.md +5 -0
  60. package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
  61. package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
  62. package/.ai-rules/skills/build-fix/SKILL.md +234 -0
  63. package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
  64. package/.ai-rules/skills/context-management/SKILL.md +1 -0
  65. package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
  66. package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
  67. package/.ai-rules/skills/database-migration/SKILL.md +1 -0
  68. package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
  69. package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
  70. package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
  71. package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
  72. package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
  73. package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
  74. package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
  75. package/.ai-rules/skills/git-master/SKILL.md +358 -0
  76. package/.ai-rules/skills/incident-response/SKILL.md +1 -0
  77. package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
  78. package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
  79. package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
  80. package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +198 -0
  81. package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
  82. package/.ai-rules/skills/onboard/SKILL.md +150 -0
  83. package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
  84. package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
  85. package/.ai-rules/skills/plan-to-issues/SKILL.md +318 -0
  86. package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
  87. package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
  88. package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
  89. package/.ai-rules/skills/pr-review/SKILL.md +4 -0
  90. package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
  91. package/.ai-rules/skills/refactoring/SKILL.md +1 -0
  92. package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
  93. package/.ai-rules/skills/retrospective/SKILL.md +192 -0
  94. package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
  95. package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
  96. package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
  97. package/.ai-rules/skills/security-audit/SKILL.md +4 -0
  98. package/.ai-rules/skills/ship/SKILL.md +242 -0
  99. package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
  100. package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
  101. package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
  102. package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
  103. package/.ai-rules/skills/skill-creator/assets/eval_review.html +568 -0
  104. package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
  105. package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
  106. package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
  107. package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
  108. package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
  109. package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
  110. package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
  111. package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
  112. package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
  113. package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
  114. package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
  115. package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
  116. package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
  117. package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
  118. package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
  119. package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
  120. package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
  121. package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
  122. package/bin/cli.js +170 -0
  123. package/lib/init/detect-stack.js +162 -0
  124. package/lib/init/generate-config.js +31 -0
  125. package/lib/init/index.js +86 -0
  126. package/lib/init/prompt.js +60 -0
  127. package/lib/init/scaffold.js +67 -0
  128. package/lib/init/suggest-agent.js +57 -0
  129. package/package.json +10 -2
@@ -42,7 +42,7 @@ The skill uses an interactive 4-step configuration flow:
42
42
  [3/4] PR Language
43
43
  ┌──────────────────────────┐
44
44
  │ PR description language │
45
- │ [English] [한국어] │
45
+ │ [English] [Korean] │
46
46
  │ [Bilingual] (EN + KO) │
47
47
  └──────────────────────────┘
48
48
 
@@ -78,7 +78,7 @@ Selects which issue tracking system is used:
78
78
 
79
79
  Determines the language for PR descriptions:
80
80
  - **English**: PRs written in English only
81
- - **한국어**: PRs written in Korean only
81
+ - **Korean**: PRs written in Korean only
82
82
  - **Bilingual**: PRs include both English and Korean
83
83
 
84
84
  ##### Detailed Language Behavior
@@ -86,7 +86,7 @@ Determines the language for PR descriptions:
86
86
  | Value | PR Title | PR Body | Use Case |
87
87
  |-------|----------|---------|----------|
88
88
  | `en` | English | English only | International teams, open source projects |
89
- | `ko` | 한국어 | 한국어만 | Korean-only teams, internal projects |
89
+ | `ko` | Korean | Korean only | Korean-only teams, internal projects |
90
90
  | `bilingual` | English | English + Korean | Mixed teams, global + local collaboration |
91
91
 
92
92
  ##### Language Examples
@@ -97,14 +97,14 @@ Determines the language for PR descriptions:
97
97
  - Best for: Open source, international collaboration
98
98
 
99
99
  **`ko` (Korean)**:
100
- - Title: `feat: 사용자 인증 추가`
101
- - Body: 한국어만 사용한 설명
102
- - Best for: 한국어 기반 팀, 내부 프로젝트
100
+ - Title: `feat: add user authentication`
101
+ - Body: Korean-only description
102
+ - Best for: Korean-speaking teams, internal projects
103
103
 
104
104
  **`bilingual` (Both)**:
105
105
  - Title: `feat: add user authentication` (English)
106
106
  - Body: English description followed by Korean translation
107
- - Best for: 글로벌 팀과 한국 팀이 함께 협업하는 프로젝트
107
+ - Best for: Projects where global and Korean teams collaborate together
108
108
 
109
109
  #### Step 4: Issue URL Template
110
110
  Optional template for auto-generating issue links in PR bodies. Use `{id}` placeholder for the issue ID.
@@ -4,12 +4,12 @@
4
4
 
5
5
  PR templates are automatically selected based on the `prLanguage` setting:
6
6
 
7
- (PR 템플릿은 `prLanguage` 설정에 따라 자동 선택됩니다)
7
+ (PR templates are automatically selected based on the `prLanguage` setting)
8
8
 
9
9
  | `prLanguage` | Template Used | PR Title | PR Body |
10
10
  |--------------|---------------|----------|---------|
11
11
  | `en` | English Template | English | English only |
12
- | `ko` | Korean Template | 한국어 | 한국어만 |
12
+ | `ko` | Korean Template | Korean | Korean only |
13
13
  | `bilingual` | Bilingual Template | English | English + Korean |
14
14
 
15
15
  ### Selection Flow
@@ -52,19 +52,19 @@ PR templates are automatically selected based on the `prLanguage` setting:
52
52
  {screenshots_section}
53
53
  ```
54
54
 
55
- ### Korean Template (한국어)
55
+ ### Korean Template
56
56
  <!-- Used when `prLanguage: "ko"` - for Korean-only teams -->
57
57
  ```markdown
58
- ## 컨텍스트
58
+ ## Context
59
59
 
60
- **관련 링크:**
61
- - 이슈: [{issue_id}]({issue_url})
60
+ **Related Links:**
61
+ - Issue: [{issue_id}]({issue_url})
62
62
 
63
- **상세 설명:**
63
+ **Description Details:**
64
64
 
65
65
  {description}
66
66
 
67
- ## 스크린샷 또는 비디오
67
+ ## Screenshots or Videos
68
68
 
69
69
  {screenshots_section}
70
70
  ```
@@ -83,7 +83,7 @@ PR templates are automatically selected based on the `prLanguage` setting:
83
83
 
84
84
  ---
85
85
 
86
- **상세 설명:**
86
+ **Description Details (Korean):**
87
87
 
88
88
  {description_ko}
89
89
 
@@ -142,7 +142,7 @@ Added JWT-based authentication with refresh token support. Includes:
142
142
  ## Title Format
143
143
 
144
144
  - English: `{type}: {short description}` (max 70 chars)
145
- - Korean: `{type}: {간단한 설명}` (max 70 chars)
145
+ - Korean: `{type}: {short description}` (max 70 chars)
146
146
 
147
147
  Example: `feat: add user authentication flow`
148
148
 
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: pr-review
3
3
  description: Use when conducting manual PR reviews - provides structured checklist covering security, performance, maintainability, and code quality dimensions with anti-sycophancy principles
4
+ context: fork
5
+ agent: Explore
6
+ allowed-tools: Read, Grep, Glob, Bash(gh:*, git:*)
7
+ argument-hint: [pr-url-or-number]
4
8
  ---
5
9
 
6
10
  # PR Review
@@ -0,0 +1,347 @@
1
+ ---
2
+ name: receiving-code-review
3
+ description: >-
4
+ Use when receiving PR review feedback or code review comments.
5
+ Enforces verification-first response to review feedback with
6
+ anti-sycophancy classification and constructive disagreement protocol.
7
+ allowed-tools: Read, Grep, Glob, Bash(gh:*, git:*)
8
+ argument-hint: [pr-url-or-number]
9
+ ---
10
+
11
+ # Receiving Code Review
12
+
13
+ ## Overview
14
+
15
+ Blind agreement with review feedback is as harmful as ignoring it. Implementing unverified suggestions introduces bugs, degrades architecture, and teaches reviewers that superficial comments get results.
16
+
17
+ **Core principle:** Treat every review comment as a hypothesis to be tested, not an instruction to be followed. Evidence determines your response, not authority or politeness.
18
+
19
+ **Violating the letter of this process is violating the spirit of receiving code review.**
20
+
21
+ ## The Iron Law
22
+
23
+ ```
24
+ VERIFY BEFORE IMPLEMENTING — AGREEMENT WITHOUT EVIDENCE IS SYCOPHANCY
25
+ ```
26
+
27
+ - Reviewer authority does not replace verification. Senior engineers make mistakes too.
28
+ - "Sounds good, fixing now" without reading the referenced code is failure.
29
+ - Implementing a wrong fix is worse than the original code — it adds confusion AND a bug.
30
+
31
+ ## When to Use
32
+
33
+ **Always use for:**
34
+ - PR review comments requesting changes
35
+ - Code review feedback from teammates or AI agents
36
+ - EVAL mode feedback on your implementation
37
+ - Post-merge review comments requiring follow-up
38
+
39
+ **Lighter process acceptable for:**
40
+ - Typo fixes and formatting-only feedback (verify the typo exists, then fix)
41
+ - Documentation wording suggestions (read the suggestion, apply if clearer)
42
+
43
+ **Do NOT use for:**
44
+ - Automated linter/CI feedback (mechanical — just fix or configure)
45
+ - Pair programming feedback (synchronous — different workflow)
46
+ - Architectural review requiring re-planning (use `brainstorming` or `writing-plans` skills)
47
+ - Giving reviews (use `pr-review` skill instead)
48
+
49
+ ## Quick Reference
50
+
51
+ ### Feedback Classification
52
+
53
+ | Classification | Criteria | Verification Required | Action |
54
+ |---------------|----------|----------------------|--------|
55
+ | **Must-Fix** | Bug, crash, security vulnerability, data loss | YES — reproduce the issue | Fix immediately after verification |
56
+ | **Evaluate** | Alternative approach, refactoring, performance | YES — compare approaches | Implement if better, discuss if not |
57
+ | **Preference** | Style, naming, formatting, subjective taste | NO — check project conventions | Accept if convention-aligned, discuss if not |
58
+
59
+ ### Decision Matrix
60
+
61
+ | Verification Result | Classification | Action |
62
+ |--------------------|---------------|--------|
63
+ | Issue reproduced | Must-Fix | Fix and cite the reproduction |
64
+ | Issue NOT reproduced | Must-Fix | Reply with evidence, ask for scenario |
65
+ | Alternative is better | Evaluate | Adopt with acknowledgment |
66
+ | Alternative is equivalent or worse | Evaluate | Decline with evidence and tradeoff analysis |
67
+ | Matches project convention | Preference | Accept silently |
68
+ | Contradicts project convention | Preference | Cite convention, keep current approach |
69
+
70
+ ---
71
+
72
+ ## Phase 1: Triage & Classify
73
+
74
+ **Goal:** Categorize every review comment before acting on any of them.
75
+
76
+ **Process:**
77
+ 1. Read ALL comments before responding to any
78
+ 2. Classify each comment as Must-Fix, Evaluate, or Preference
79
+ 3. Order by priority: Must-Fix first, then Evaluate, then Preference
80
+
81
+ **Classification decision tree:**
82
+
83
+ ```
84
+ Is the reviewer claiming a bug, crash, security issue, or data loss?
85
+ ├── YES → Must-Fix
86
+ └── NO → Is the reviewer suggesting an alternative approach or refactoring?
87
+ ├── YES → Evaluate
88
+ └── NO → Preference
89
+ ```
90
+
91
+ **Watch for misclassification:**
92
+
93
+ | Looks Like | Actually Is | How to Tell |
94
+ |-----------|-------------|-------------|
95
+ | Must-Fix ("this will crash") | Evaluate (edge case that can't happen in context) | Check call sites and input constraints |
96
+ | Preference ("rename this") | Must-Fix (name collision causes shadowing bug) | Check scope for conflicts |
97
+ | Evaluate ("use pattern X") | Preference (both patterns are equivalent here) | Compare actual tradeoffs in this context |
98
+
99
+ **Done when:** Every comment has a classification tag. If unsure, classify UP (Preference → Evaluate, Evaluate → Must-Fix).
100
+
101
+ ---
102
+
103
+ ## Phase 2: Verify
104
+
105
+ **Goal:** Build evidence for each Must-Fix and Evaluate item before acting.
106
+
107
+ ### Verification Matrix
108
+
109
+ | Feedback Type | Verification Method | Evidence |
110
+ |--------------|-------------------|----------|
111
+ | "This will crash/fail on X" | Write a test with input X, run it | Test result (pass/fail) |
112
+ | "N+1 query / performance issue" | Add logging, hit the endpoint, measure | Query count, timing data |
113
+ | "This violates SRP / SOLID" | Evaluate against project conventions and codebase patterns | Convention references, pattern grep results |
114
+ | "Use pattern X instead" | Compare both approaches against existing codebase patterns | `grep` for pattern usage, tradeoff list |
115
+ | "Missing error handling" | Trace call path, check if error can actually reach this code | Call chain analysis |
116
+ | "Race condition possible" | Analyze concurrent access paths | Sequence diagram or test |
117
+ | "Style: rename this variable" | **Skip verification** — this is Preference | Check project conventions only |
118
+
119
+ ### Verification Checklist
120
+
121
+ For each Must-Fix / Evaluate item:
122
+
123
+ - [ ] Read the exact code the reviewer references (not just the comment)
124
+ - [ ] Check if the claimed issue can actually occur given the call context
125
+ - [ ] If a bug claim: write a minimal test to reproduce
126
+ - [ ] If an alternative approach: grep codebase for both patterns
127
+ - [ ] If a convention claim: check `.ai-rules/` or project style guide
128
+ - [ ] Record the evidence (test output, grep results, or analysis)
129
+
130
+ **Done when:** Every Must-Fix and Evaluate item has a verification result: `reproduced`, `not reproduced`, or `tradeoff analyzed`.
131
+
132
+ **Guard against over-verification:** Preference items do NOT need verification. If you catch yourself writing a test for a variable rename, stop — you are stalling.
133
+
134
+ ---
135
+
136
+ ## Phase 3: Respond
137
+
138
+ **Goal:** Act on each item based on classification AND verification evidence.
139
+
140
+ ### Processing Order
141
+
142
+ 1. **Must-Fix items** (process first — they may invalidate other comments)
143
+ 2. **Evaluate items** (some may become moot after Must-Fix changes)
144
+ 3. **Preference items** (batch these for efficiency)
145
+
146
+ ### Response Templates
147
+
148
+ **Must-Fix — Verified:**
149
+ > Confirmed. Reproduced with [test/scenario]. Fixed in [commit]. Added regression test.
150
+
151
+ **Must-Fix — Cannot Reproduce:**
152
+ > Attempted to reproduce with [specific steps]. Test passes with [input]. Could you share the exact scenario you're seeing? Here's what I tested: [evidence].
153
+
154
+ **Evaluate — Adopted:**
155
+ > Good point. Adopted [approach] because [evidence it's better in this context]. [Brief tradeoff acknowledged].
156
+
157
+ **Evaluate — Declined:**
158
+ > Considered this. Staying with current approach because [concrete evidence]. The tradeoff: [their approach advantage] vs [current approach advantage]. In this context, [reason current wins].
159
+
160
+ **Evaluate — Partial Agreement:**
161
+ > You're right about [the problem]. However, [proposed solution] would [issue]. Instead, I [alternative fix] which addresses the concern while [preserving X].
162
+
163
+ **Preference — Accepted:**
164
+ > Updated.
165
+
166
+ **Preference — Convention Conflict:**
167
+ > Project convention uses [X pattern] per [rule reference]. Keeping for consistency. Happy to discuss changing the convention project-wide if you'd like.
168
+
169
+ ### Tone Calibration
170
+
171
+ | Reviewer | Tone | Example |
172
+ |---------|------|---------|
173
+ | Peer | Direct and evidence-based | "Tested this — passes with null input. What scenario triggers the crash?" |
174
+ | Senior / Tech Lead | Respectful but still evidence-based | "Great catch on [valid point]. For [other point], I verified with [test] and it passes — could you clarify the scenario?" |
175
+ | External Contributor | Welcoming but factual | "Thanks for the review! I checked [claim] and found [evidence]. Here's my reasoning: [explanation]." |
176
+
177
+ **Key principle:** Deference is not compliance. You can respect someone's expertise while still requiring evidence for their claims.
178
+
179
+ **Done when:** Every comment has a response: implemented (with commit reference), declined (with evidence), or discussed (with question).
180
+
181
+ ---
182
+
183
+ ## Phase 4: Re-request Review
184
+
185
+ **Goal:** Close the feedback loop cleanly.
186
+
187
+ **Checklist:**
188
+ - [ ] All Must-Fix items resolved (implemented or discussed with evidence)
189
+ - [ ] All Evaluate items resolved (adopted, declined with reasoning, or discussed)
190
+ - [ ] All Preference items addressed (accepted or convention-cited)
191
+ - [ ] Tests pass after all changes
192
+ - [ ] No unrelated changes mixed into fix commits
193
+ - [ ] Summary comment posted listing what was changed and what was discussed
194
+
195
+ **Summary comment template:**
196
+ ```
197
+ Changes made:
198
+ - [Must-Fix] Fixed [issue] — added regression test (commit abc123)
199
+ - [Evaluate] Adopted [suggestion] for [reason] (commit def456)
200
+ - [Preference] Updated [items] (commit ghi789)
201
+
202
+ Discussed (no change):
203
+ - [item]: [brief reason with evidence link]
204
+
205
+ Ready for re-review.
206
+ ```
207
+
208
+ ---
209
+
210
+ ## Disagreement Protocol
211
+
212
+ When you believe the reviewer is wrong, follow this escalation:
213
+
214
+ ### Step 1: Lead with Evidence
215
+
216
+ ```
217
+ Bad: "I disagree with this suggestion."
218
+ Good: "I tested with [input] and it passes. The null case can't reach
219
+ this code path because [caller] validates at line 42. Here's the test: [link]."
220
+ ```
221
+
222
+ ### Step 2: Acknowledge the Tradeoff
223
+
224
+ ```
225
+ Bad: "My approach is better."
226
+ Good: "Your approach has [advantage]. Mine has [advantage]. In this context,
227
+ [mine/yours] fits better because [specific reason]."
228
+ ```
229
+
230
+ ### Step 3: Offer Alternatives
231
+
232
+ ```
233
+ Bad: "No, I won't change this."
234
+ Good: "Instead of [their suggestion], what about [alternative] which
235
+ addresses your concern about [X] while preserving [Y]?"
236
+ ```
237
+
238
+ ### Step 4: Escalate Appropriately
239
+
240
+ If you cannot reach agreement after evidence exchange:
241
+ - Tag a third reviewer for a tiebreaker
242
+ - Reference project conventions or architectural decisions
243
+ - Accept and document: "Implementing as requested. Noting that [tradeoff] for future reference."
244
+
245
+ ### When to Accept Despite Disagreement
246
+
247
+ - Reviewer has project-specific context you lack (institutional knowledge)
248
+ - The difference is genuinely marginal and not worth the discussion cost
249
+ - Project convention sides with the reviewer (convention trumps preference)
250
+ - You've been going back and forth for 3+ rounds (diminishing returns)
251
+
252
+ ---
253
+
254
+ ## Anti-Sycophancy Guide
255
+
256
+ ### Prohibited Responses
257
+
258
+ | Don't Say | Why It's Harmful |
259
+ |-----------|-----------------|
260
+ | "Great catch! Fixing now." (without verifying) | You don't know if it's actually a catch |
261
+ | "You're absolutely right, I should have caught that." | You're performing contrition, not engineering |
262
+ | "Sounds good, will update." (without reading code) | Agreeing to changes you haven't evaluated |
263
+ | "Thanks for the thorough review!" (as the only response) | Politeness is not a substitute for engagement |
264
+ | "I'll fix all of these." (batch-agreeing) | Each comment needs individual evaluation |
265
+
266
+ ### Anti-Patterns
267
+
268
+ | Anti-Pattern | What Happens | Instead |
269
+ |-------------|-------------|---------|
270
+ | **Apologetic capitulation** | "You're right, sorry" → implement unverified change | Verify first, then respond with evidence |
271
+ | **Scope creep acceptance** | "While you're at it, also refactor X" → silent addition | Acknowledge, create separate issue/PR |
272
+ | **Authority-driven compliance** | Senior said it → must be right → implement blindly | Seniors deserve evidence-based responses too |
273
+ | **Fix-then-justify** | Implement first, rationalize after | Evaluate BEFORE implementing |
274
+ | **Cherry-picking easy wins** | Fix trivial items, ignore hard critical feedback | Process Must-Fix items FIRST |
275
+ | **Silent disagreement** | Disagree privately, implement anyway | State your concern on the review thread |
276
+ | **Over-verification stalling** | "I need to verify" as excuse to avoid valid feedback | Preference items don't need verification |
277
+ | **Conflating preference with defect** | Treating style feedback as a bug fix | Classify correctly, respond accordingly |
278
+ | **Performative agreement** | Agreeing enthusiastically to avoid conflict | Evidence determines response, not comfort |
279
+
280
+ ---
281
+
282
+ ## Red Flags — STOP
283
+
284
+ These thoughts mean you are about to violate the Iron Law:
285
+
286
+ | Thought | Reality |
287
+ |---------|---------|
288
+ | "I'll just fix it, it's faster" | Faster than what? You haven't verified it's broken. |
289
+ | "The reviewer is senior, they must be right" | Seniority is not evidence. Verify. |
290
+ | "It's just a small change, no need to verify" | Small unverified changes compound into big problems. |
291
+ | "I don't want to seem argumentative" | Evidence-based responses are not arguments. |
292
+ | "They clearly know more about this" | They might. Verify and find out. |
293
+ | "I'll verify later after implementing" | That's fix-then-justify. Evaluate BEFORE implementing. |
294
+ | "All their other comments were valid, so this one must be too" | Each comment stands on its own evidence. |
295
+ | "Pushing back will delay the PR" | Implementing wrong changes delays it more. |
296
+
297
+ ## Common Rationalizations
298
+
299
+ | Rationalization | Counter |
300
+ |----------------|---------|
301
+ | "Verifying takes too long" | Implementing a wrong fix takes longer. Reverting takes even longer. |
302
+ | "I trust this reviewer" | Trust is not a verification method. Even trusted reviewers make mistakes. |
303
+ | "It's not worth the discussion" | If it's not worth discussing, it's not worth implementing either. |
304
+ | "The reviewer will be annoyed if I push back" | Professional reviewers respect evidence-based responses. |
305
+ | "I already know they're right" | Then verification will be quick. Do it anyway. |
306
+ | "This is just bikeshedding" | If so, classify as Preference and handle accordingly. |
307
+
308
+ ---
309
+
310
+ ## Handling Edge Cases
311
+
312
+ ### Conflicting Reviews
313
+
314
+ When multiple reviewers give contradictory feedback:
315
+ 1. Surface the conflict explicitly in a comment tagging both reviewers
316
+ 2. Present both positions with your analysis
317
+ 3. Do NOT silently pick one — let the reviewers resolve the conflict
318
+ 4. If unresolved, defer to project convention or escalate to tech lead
319
+
320
+ ### Vague Feedback
321
+
322
+ When feedback lacks specifics ("this feels wrong", "not clean enough"):
323
+ 1. Do NOT guess what the reviewer means
324
+ 2. Ask a specific clarifying question: "Could you point to the specific part that concerns you? Is it the [data flow / naming / structure]?"
325
+ 3. Wait for clarification before acting
326
+
327
+ ### Feedback on Framework-Mandated Code
328
+
329
+ When the reviewer suggests changing code required by the framework:
330
+ 1. Explain the constraint: "This pattern is required by [framework] — see [docs link]"
331
+ 2. Offer alternatives within the framework's constraints if they exist
332
+
333
+ ### Review of Test Code
334
+
335
+ Apply higher scrutiny to suggestions that weaken tests:
336
+ - Removing edge case tests → challenge firmly with coverage data
337
+ - Simplifying assertions → verify the simplified version still catches regressions
338
+ - "This test is unnecessary" → check if it covers a unique code path
339
+
340
+ ---
341
+
342
+ ## Related Skills
343
+
344
+ - **`pr-review`** — For conducting reviews (the giving side of this skill)
345
+ - **`systematic-debugging`** — For investigating issues found during verification
346
+ - **`test-driven-development`** — For writing verification tests in Phase 2
347
+ - **`writing-plans`** — For re-planning when architectural review feedback requires redesign
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: refactoring
3
3
  description: Use when improving code structure without changing behavior, cleaning up technical debt, or preparing code for new features
4
+ allowed-tools: Read, Write, Edit, Grep, Glob, Bash
4
5
  ---
5
6
 
6
7
  # Refactoring