@kurokeita/add-skill 2.6.1 → 3.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.
Files changed (140) hide show
  1. package/README.md +43 -64
  2. package/dist/bin/cli.js +270 -478
  3. package/dist/skills/statusline-setup/.claude-plugin/plugin.json +1 -1
  4. package/dist/skills/statusline-setup/SKILL.md +48 -448
  5. package/dist/skills/statusline-setup/mod/hooks/register.tsx +93 -103
  6. package/dist/skills/statusline-setup/mod/tests/work.test.ts +28 -10
  7. package/dist/skills/statusline-setup/mod/types/index.d.ts +2 -1
  8. package/dist/skills/universalize-agents/reference/mapping.md +3 -2
  9. package/package.json +3 -3
  10. package/dist/agents/backend-specialist.md +0 -277
  11. package/dist/agents/code-archaeologist.md +0 -114
  12. package/dist/agents/database-architect.md +0 -238
  13. package/dist/agents/debugger.md +0 -231
  14. package/dist/agents/devops-engineer.md +0 -242
  15. package/dist/agents/documentation-writer.md +0 -104
  16. package/dist/agents/explorer-agent.md +0 -79
  17. package/dist/agents/frontend-specialist.md +0 -594
  18. package/dist/agents/game-developer.md +0 -162
  19. package/dist/agents/mobile-developer.md +0 -383
  20. package/dist/agents/orchestrator.md +0 -435
  21. package/dist/agents/penetration-tester.md +0 -188
  22. package/dist/agents/performance-optimizer.md +0 -191
  23. package/dist/agents/product-manager.md +0 -122
  24. package/dist/agents/product-owner.md +0 -106
  25. package/dist/agents/project-planner.md +0 -408
  26. package/dist/agents/qa-automation-engineer.md +0 -109
  27. package/dist/agents/security-auditor.md +0 -171
  28. package/dist/agents/test-engineer.md +0 -158
  29. package/dist/skills/agent-identifier/SKILL.md +0 -431
  30. package/dist/skills/agent-identifier/examples/agent-creation-prompt.md +0 -247
  31. package/dist/skills/agent-identifier/examples/complete-agent-examples.md +0 -432
  32. package/dist/skills/agent-identifier/references/agent-creation-system-prompt.md +0 -215
  33. package/dist/skills/agent-identifier/references/system-prompt-design.md +0 -419
  34. package/dist/skills/agent-identifier/references/triggering-examples.md +0 -508
  35. package/dist/skills/agent-identifier/scripts/validate-agent.sh +0 -217
  36. package/dist/skills/code-review-excellence/SKILL.md +0 -525
  37. package/dist/skills/component-refactoring/SKILL.md +0 -492
  38. package/dist/skills/component-refactoring/references/complexity-patterns.md +0 -493
  39. package/dist/skills/component-refactoring/references/component-splitting.md +0 -477
  40. package/dist/skills/component-refactoring/references/hook-extraction.md +0 -317
  41. package/dist/skills/context7-guidelines/SKILL.md +0 -31
  42. package/dist/skills/feature-design-assistant/SKILL.md +0 -371
  43. package/dist/skills/find-bugs/SKILL.md +0 -75
  44. package/dist/skills/frontend-design/SKILL.md +0 -45
  45. package/dist/skills/go-concurrency-patterns/SKILL.md +0 -657
  46. package/dist/skills/grill-me/SKILL.md +0 -9
  47. package/dist/skills/handoff/SKILL.md +0 -16
  48. package/dist/skills/koreader-plugin-development/SKILL.md +0 -141
  49. package/dist/skills/koreader-plugin-development/examples/2-example-patch.lua +0 -17
  50. package/dist/skills/koreader-plugin-development/examples/_meta.lua +0 -6
  51. package/dist/skills/koreader-plugin-development/examples/helloworld.lua +0 -36
  52. package/dist/skills/koreader-plugin-development/references/debugging.md +0 -92
  53. package/dist/skills/koreader-plugin-development/references/events-and-widgets.md +0 -102
  54. package/dist/skills/koreader-plugin-development/references/patches.md +0 -118
  55. package/dist/skills/koreader-plugin-development/references/plugin-anatomy.md +0 -97
  56. package/dist/skills/make-instruction/SKILL.md +0 -68
  57. package/dist/skills/make-prompt/SKILL.md +0 -70
  58. package/dist/skills/make-skill/SKILL.md +0 -147
  59. package/dist/skills/prd-to-tasks/SKILL.md +0 -164
  60. package/dist/skills/react-native-async-patterns/SKILL.md +0 -256
  61. package/dist/skills/react-native-performance/SKILL.md +0 -425
  62. package/dist/skills/react-native-testing/SKILL.md +0 -458
  63. package/dist/skills/react-native-zustand-patterns/SKILL.md +0 -343
  64. package/dist/skills/skill-creator/SKILL.md +0 -385
  65. package/dist/skills/skill-creator/scripts/init_skill.cjs +0 -235
  66. package/dist/skills/skill-creator/scripts/package_skill.cjs +0 -84
  67. package/dist/skills/skill-creator/scripts/validate_skill.cjs +0 -127
  68. package/dist/skills/skill-development/SKILL.md +0 -676
  69. package/dist/skills/skill-development/references/skill-creator-original.md +0 -210
  70. package/dist/skills/sql-optimization-patterns/SKILL.md +0 -509
  71. package/dist/skills/test-driven-development/SKILL.md +0 -114
  72. package/dist/skills/test-driven-development/deep-modules.md +0 -33
  73. package/dist/skills/test-driven-development/interface-design.md +0 -35
  74. package/dist/skills/test-driven-development/mocking.md +0 -68
  75. package/dist/skills/test-driven-development/refactoring.md +0 -10
  76. package/dist/skills/test-driven-development/tests.md +0 -61
  77. package/dist/skills/vercel-react-best-practices/AGENTS.md +0 -2410
  78. package/dist/skills/vercel-react-best-practices/SKILL.md +0 -127
  79. package/dist/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  80. package/dist/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -49
  81. package/dist/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
  82. package/dist/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
  83. package/dist/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -36
  84. package/dist/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
  85. package/dist/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
  86. package/dist/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
  87. package/dist/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
  88. package/dist/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
  89. package/dist/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  90. package/dist/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
  91. package/dist/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
  92. package/dist/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
  93. package/dist/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
  94. package/dist/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
  95. package/dist/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -82
  96. package/dist/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
  97. package/dist/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
  98. package/dist/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
  99. package/dist/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
  100. package/dist/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
  101. package/dist/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
  102. package/dist/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
  103. package/dist/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -50
  104. package/dist/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
  105. package/dist/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
  106. package/dist/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
  107. package/dist/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
  108. package/dist/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  109. package/dist/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
  110. package/dist/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
  111. package/dist/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  112. package/dist/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  113. package/dist/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
  114. package/dist/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
  115. package/dist/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
  116. package/dist/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
  117. package/dist/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
  118. package/dist/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  119. package/dist/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
  120. package/dist/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
  121. package/dist/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
  122. package/dist/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
  123. package/dist/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
  124. package/dist/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
  125. package/dist/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
  126. package/dist/skills/web-design-guidelines/SKILL.md +0 -40
  127. package/dist/skills/workflow-patterns/SKILL.md +0 -623
  128. package/dist/skills/write-prd/SKILL.md +0 -162
  129. package/dist/workflows/brainstorm.md +0 -113
  130. package/dist/workflows/create.md +0 -60
  131. package/dist/workflows/debug.md +0 -107
  132. package/dist/workflows/deploy.md +0 -178
  133. package/dist/workflows/enhance.md +0 -64
  134. package/dist/workflows/github-pull-request-create.md +0 -134
  135. package/dist/workflows/orchestrate.md +0 -246
  136. package/dist/workflows/plan.md +0 -90
  137. package/dist/workflows/preview.md +0 -83
  138. package/dist/workflows/status.md +0 -87
  139. package/dist/workflows/test.md +0 -144
  140. package/dist/workflows/ui-ux-pro-max.md +0 -315
@@ -1,525 +0,0 @@
1
- ---
2
- name: code-review-excellence
3
- description: Master effective code review practices to provide constructive feedback, catch bugs early, and foster knowledge sharing while maintaining team morale. Use when reviewing pull requests, establishing review standards, or mentoring developers.
4
- ---
5
-
6
- # Code Review Excellence
7
-
8
- Transform code reviews from gatekeeping to knowledge sharing through constructive feedback, systematic analysis, and collaborative improvement.
9
-
10
- ## When to Use This Skill
11
-
12
- - Reviewing pull requests and code changes
13
- - Establishing code review standards for teams
14
- - Mentoring junior developers through reviews
15
- - Conducting architecture reviews
16
- - Creating review checklists and guidelines
17
- - Improving team collaboration
18
- - Reducing code review cycle time
19
- - Maintaining code quality standards
20
-
21
- ## Core Principles
22
-
23
- ### 1. The Review Mindset
24
-
25
- **Goals of Code Review:**
26
-
27
- - Catch bugs and edge cases
28
- - Ensure code maintainability
29
- - Share knowledge across team
30
- - Enforce coding standards
31
- - Improve design and architecture
32
- - Build team culture
33
-
34
- **Not the Goals:**
35
-
36
- - Show off knowledge
37
- - Nitpick formatting (use linters)
38
- - Block progress unnecessarily
39
- - Rewrite to your preference
40
-
41
- ### 2. Effective Feedback
42
-
43
- **Good Feedback is:**
44
-
45
- - Specific and actionable
46
- - Educational, not judgmental
47
- - Focused on the code, not the person
48
- - Balanced (praise good work too)
49
- - Prioritized (critical vs nice-to-have)
50
-
51
- ```markdown
52
- ❌ Bad: "This is wrong."
53
- ✅ Good: "This could cause a race condition when multiple users
54
- access simultaneously. Consider using a mutex here."
55
-
56
- ❌ Bad: "Why didn't you use X pattern?"
57
- ✅ Good: "Have you considered the Repository pattern? It would
58
- make this easier to test. Here's an example: [link]"
59
-
60
- ❌ Bad: "Rename this variable."
61
- ✅ Good: "[nit] Consider `userCount` instead of `uc` for
62
- clarity. Not blocking if you prefer to keep it."
63
- ```
64
-
65
- ### 3. Review Scope
66
-
67
- **What to Review:**
68
-
69
- - Logic correctness and edge cases
70
- - Security vulnerabilities
71
- - Performance implications
72
- - Test coverage and quality
73
- - Error handling
74
- - Documentation and comments
75
- - API design and naming
76
- - Architectural fit
77
-
78
- **What Not to Review Manually:**
79
-
80
- - Code formatting (use Prettier, Black, etc.)
81
- - Import organization
82
- - Linting violations
83
- - Simple typos
84
-
85
- ## Review Process
86
-
87
- ### Phase 1: Context Gathering (2-3 minutes)
88
-
89
- ```markdown
90
- Before diving into code, understand:
91
-
92
- 1. Read PR description and linked issue
93
- 2. Check PR size (>400 lines? Ask to split)
94
- 3. Review CI/CD status (tests passing?)
95
- 4. Understand the business requirement
96
- 5. Note any relevant architectural decisions
97
- ```
98
-
99
- ### Phase 2: High-Level Review (5-10 minutes)
100
-
101
- ```markdown
102
- 1. **Architecture & Design**
103
- - Does the solution fit the problem?
104
- - Are there simpler approaches?
105
- - Is it consistent with existing patterns?
106
- - Will it scale?
107
-
108
- 2. **File Organization**
109
- - Are new files in the right places?
110
- - Is code grouped logically?
111
- - Are there duplicate files?
112
-
113
- 3. **Testing Strategy**
114
- - Are there tests?
115
- - Do tests cover edge cases?
116
- - Are tests readable?
117
- ```
118
-
119
- ### Phase 3: Line-by-Line Review (10-20 minutes)
120
-
121
- ```markdown
122
- For each file:
123
-
124
- 1. **Logic & Correctness**
125
- - Edge cases handled?
126
- - Off-by-one errors?
127
- - Null/undefined checks?
128
- - Race conditions?
129
-
130
- 2. **Security**
131
- - Input validation?
132
- - SQL injection risks?
133
- - XSS vulnerabilities?
134
- - Sensitive data exposure?
135
-
136
- 3. **Performance**
137
- - N+1 queries?
138
- - Unnecessary loops?
139
- - Memory leaks?
140
- - Blocking operations?
141
-
142
- 4. **Maintainability**
143
- - Clear variable names?
144
- - Functions doing one thing?
145
- - Complex code commented?
146
- - Magic numbers extracted?
147
- ```
148
-
149
- ### Phase 4: Summary & Decision (2-3 minutes)
150
-
151
- ```markdown
152
- 1. Summarize key concerns
153
- 2. Highlight what you liked
154
- 3. Make clear decision:
155
- - ✅ Approve
156
- - 💬 Comment (minor suggestions)
157
- - 🔄 Request Changes (must address)
158
- 4. Offer to pair if complex
159
- ```
160
-
161
- ## Review Techniques
162
-
163
- ### Technique 1: The Checklist Method
164
-
165
- ```markdown
166
- ## Security Checklist
167
- - [ ] User input validated and sanitized
168
- - [ ] SQL queries use parameterization
169
- - [ ] Authentication/authorization checked
170
- - [ ] Secrets not hardcoded
171
- - [ ] Error messages don't leak info
172
-
173
- ## Performance Checklist
174
- - [ ] No N+1 queries
175
- - [ ] Database queries indexed
176
- - [ ] Large lists paginated
177
- - [ ] Expensive operations cached
178
- - [ ] No blocking I/O in hot paths
179
-
180
- ## Testing Checklist
181
- - [ ] Happy path tested
182
- - [ ] Edge cases covered
183
- - [ ] Error cases tested
184
- - [ ] Test names are descriptive
185
- - [ ] Tests are deterministic
186
- ```
187
-
188
- ### Technique 2: The Question Approach
189
-
190
- Instead of stating problems, ask questions to encourage thinking:
191
-
192
- ```markdown
193
- ❌ "This will fail if the list is empty."
194
- ✅ "What happens if `items` is an empty array?"
195
-
196
- ❌ "You need error handling here."
197
- ✅ "How should this behave if the API call fails?"
198
-
199
- ❌ "This is inefficient."
200
- ✅ "I see this loops through all users. Have we considered
201
- the performance impact with 100k users?"
202
- ```
203
-
204
- ### Technique 3: Suggest, Don't Command
205
-
206
- ```markdown
207
- ## Use Collaborative Language
208
-
209
- ❌ "You must change this to use async/await"
210
- ✅ "Suggestion: async/await might make this more readable:
211
- ```typescript
212
- async function fetchUser(id: string) {
213
- const user = await db.query('SELECT * FROM users WHERE id = ?', id);
214
- return user;
215
- }
216
- ```
217
- What do you think?"
218
-
219
- ❌ "Extract this into a function"
220
- ✅ "This logic appears in 3 places. Would it make sense to
221
- extract it into a shared utility function?"
222
- ```
223
-
224
- ### Technique 4: Differentiate Severity
225
-
226
- ```markdown
227
- Use labels to indicate priority:
228
-
229
- 🔴 [blocking] - Must fix before merge
230
- 🟡 [important] - Should fix, discuss if disagree
231
- 🟢 [nit] - Nice to have, not blocking
232
- 💡 [suggestion] - Alternative approach to consider
233
- 📚 [learning] - Educational comment, no action needed
234
- 🎉 [praise] - Good work, keep it up!
235
-
236
- Example:
237
- "🔴 [blocking] This SQL query is vulnerable to injection.
238
- Please use parameterized queries."
239
-
240
- "🟢 [nit] Consider renaming `data` to `userData` for clarity."
241
-
242
- "🎉 [praise] Excellent test coverage! This will catch edge cases."
243
- ```
244
-
245
- ## Language-Specific Patterns
246
-
247
- ### Python Code Review
248
-
249
- ```python
250
- # Check for Python-specific issues
251
-
252
- # ❌ Mutable default arguments
253
- def add_item(item, items=[]): # Bug! Shared across calls
254
- items.append(item)
255
- return items
256
-
257
- # ✅ Use None as default
258
- def add_item(item, items=None):
259
- if items is None:
260
- items = []
261
- items.append(item)
262
- return items
263
-
264
- # ❌ Catching too broad
265
- try:
266
- result = risky_operation()
267
- except: # Catches everything, even KeyboardInterrupt!
268
- pass
269
-
270
- # ✅ Catch specific exceptions
271
- try:
272
- result = risky_operation()
273
- except ValueError as e:
274
- logger.error(f"Invalid value: {e}")
275
- raise
276
-
277
- # ❌ Using mutable class attributes
278
- class User:
279
- permissions = [] # Shared across all instances!
280
-
281
- # ✅ Initialize in __init__
282
- class User:
283
- def __init__(self):
284
- self.permissions = []
285
- ```
286
-
287
- ### TypeScript/JavaScript Code Review
288
-
289
- ```typescript
290
- // Check for TypeScript-specific issues
291
-
292
- // ❌ Using any defeats type safety
293
- function processData(data: any) { // Avoid any
294
- return data.value;
295
- }
296
-
297
- // ✅ Use proper types
298
- interface DataPayload {
299
- value: string;
300
- }
301
- function processData(data: DataPayload) {
302
- return data.value;
303
- }
304
-
305
- // ❌ Not handling async errors
306
- async function fetchUser(id: string) {
307
- const response = await fetch(`/api/users/${id}`);
308
- return response.json(); // What if network fails?
309
- }
310
-
311
- // ✅ Handle errors properly
312
- async function fetchUser(id: string): Promise<User> {
313
- try {
314
- const response = await fetch(`/api/users/${id}`);
315
- if (!response.ok) {
316
- throw new Error(`HTTP ${response.status}`);
317
- }
318
- return await response.json();
319
- } catch (error) {
320
- console.error('Failed to fetch user:', error);
321
- throw error;
322
- }
323
- }
324
-
325
- // ❌ Mutation of props
326
- function UserProfile({ user }: Props) {
327
- user.lastViewed = new Date(); // Mutating prop!
328
- return <div>{user.name}</div>;
329
- }
330
-
331
- // ✅ Don't mutate props
332
- function UserProfile({ user, onView }: Props) {
333
- useEffect(() => {
334
- onView(user.id); // Notify parent to update
335
- }, [user.id]);
336
- return <div>{user.name}</div>;
337
- }
338
- ```
339
-
340
- ## Advanced Review Patterns
341
-
342
- ### Pattern 1: Architectural Review
343
-
344
- ```markdown
345
- When reviewing significant changes:
346
-
347
- 1. **Design Document First**
348
- - For large features, request design doc before code
349
- - Review design with team before implementation
350
- - Agree on approach to avoid rework
351
-
352
- 2. **Review in Stages**
353
- - First PR: Core abstractions and interfaces
354
- - Second PR: Implementation
355
- - Third PR: Integration and tests
356
- - Easier to review, faster to iterate
357
-
358
- 3. **Consider Alternatives**
359
- - "Have we considered using [pattern/library]?"
360
- - "What's the tradeoff vs. the simpler approach?"
361
- - "How will this evolve as requirements change?"
362
- ```
363
-
364
- ### Pattern 2: Test Quality Review
365
-
366
- ```typescript
367
- // ❌ Poor test: Implementation detail testing
368
- test('increments counter variable', () => {
369
- const component = render(<Counter />);
370
- const button = component.getByRole('button');
371
- fireEvent.click(button);
372
- expect(component.state.counter).toBe(1); // Testing internal state
373
- });
374
-
375
- // ✅ Good test: Behavior testing
376
- test('displays incremented count when clicked', () => {
377
- render(<Counter />);
378
- const button = screen.getByRole('button', { name: /increment/i });
379
- fireEvent.click(button);
380
- expect(screen.getByText('Count: 1')).toBeInTheDocument();
381
- });
382
-
383
- // Review questions for tests:
384
- // - Do tests describe behavior, not implementation?
385
- // - Are test names clear and descriptive?
386
- // - Do tests cover edge cases?
387
- // - Are tests independent (no shared state)?
388
- // - Can tests run in any order?
389
- ```
390
-
391
- ### Pattern 3: Security Review
392
-
393
- ```markdown
394
- ## Security Review Checklist
395
-
396
- ### Authentication & Authorization
397
- - [ ] Is authentication required where needed?
398
- - [ ] Are authorization checks before every action?
399
- - [ ] Is JWT validation proper (signature, expiry)?
400
- - [ ] Are API keys/secrets properly secured?
401
-
402
- ### Input Validation
403
- - [ ] All user inputs validated?
404
- - [ ] File uploads restricted (size, type)?
405
- - [ ] SQL queries parameterized?
406
- - [ ] XSS protection (escape output)?
407
-
408
- ### Data Protection
409
- - [ ] Passwords hashed (bcrypt/argon2)?
410
- - [ ] Sensitive data encrypted at rest?
411
- - [ ] HTTPS enforced for sensitive data?
412
- - [ ] PII handled according to regulations?
413
-
414
- ### Common Vulnerabilities
415
- - [ ] No eval() or similar dynamic execution?
416
- - [ ] No hardcoded secrets?
417
- - [ ] CSRF protection for state-changing operations?
418
- - [ ] Rate limiting on public endpoints?
419
- ```
420
-
421
- ## Giving Difficult Feedback
422
-
423
- ### Pattern: The Sandwich Method (Modified)
424
-
425
- ```markdown
426
- Traditional: Praise + Criticism + Praise (feels fake)
427
-
428
- Better: Context + Specific Issue + Helpful Solution
429
-
430
- Example:
431
- "I noticed the payment processing logic is inline in the
432
- controller. This makes it harder to test and reuse.
433
-
434
- [Specific Issue]
435
- The calculateTotal() function mixes tax calculation,
436
- discount logic, and database queries, making it difficult
437
- to unit test and reason about.
438
-
439
- [Helpful Solution]
440
- Could we extract this into a PaymentService class? That
441
- would make it testable and reusable. I can pair with you
442
- on this if helpful."
443
- ```
444
-
445
- ### Handling Disagreements
446
-
447
- ```markdown
448
- When author disagrees with your feedback:
449
-
450
- 1. **Seek to Understand**
451
- "Help me understand your approach. What led you to
452
- choose this pattern?"
453
-
454
- 2. **Acknowledge Valid Points**
455
- "That's a good point about X. I hadn't considered that."
456
-
457
- 3. **Provide Data**
458
- "I'm concerned about performance. Can we add a benchmark
459
- to validate the approach?"
460
-
461
- 4. **Escalate if Needed**
462
- "Let's get [architect/senior dev] to weigh in on this."
463
-
464
- 5. **Know When to Let Go**
465
- If it's working and not a critical issue, approve it.
466
- Perfection is the enemy of progress.
467
- ```
468
-
469
- ## Best Practices
470
-
471
- 1. **Review Promptly**: Within 24 hours, ideally same day
472
- 2. **Limit PR Size**: 200-400 lines max for effective review
473
- 3. **Review in Time Blocks**: 60 minutes max, take breaks
474
- 4. **Use Review Tools**: GitHub, GitLab, or dedicated tools
475
- 5. **Automate What You Can**: Linters, formatters, security scans
476
- 6. **Build Rapport**: Emoji, praise, and empathy matter
477
- 7. **Be Available**: Offer to pair on complex issues
478
- 8. **Learn from Others**: Review others' review comments
479
-
480
- ## Common Pitfalls
481
-
482
- - **Perfectionism**: Blocking PRs for minor style preferences
483
- - **Scope Creep**: "While you're at it, can you also..."
484
- - **Inconsistency**: Different standards for different people
485
- - **Delayed Reviews**: Letting PRs sit for days
486
- - **Ghosting**: Requesting changes then disappearing
487
- - **Rubber Stamping**: Approving without actually reviewing
488
- - **Bike Shedding**: Debating trivial details extensively
489
-
490
- ## Templates
491
-
492
- ### PR Review Comment Template
493
-
494
- ```markdown
495
- ## Summary
496
- [Brief overview of what was reviewed]
497
-
498
- ## Strengths
499
- - [What was done well]
500
- - [Good patterns or approaches]
501
-
502
- ## Required Changes
503
- 🔴 [Blocking issue 1]
504
- 🔴 [Blocking issue 2]
505
-
506
- ## Suggestions
507
- 💡 [Improvement 1]
508
- 💡 [Improvement 2]
509
-
510
- ## Questions
511
- ❓ [Clarification needed on X]
512
- ❓ [Alternative approach consideration]
513
-
514
- ## Verdict
515
- ✅ Approve after addressing required changes
516
- ```
517
-
518
- ## Resources
519
-
520
- - **references/code-review-best-practices.md**: Comprehensive review guidelines
521
- - **references/common-bugs-checklist.md**: Language-specific bugs to watch for
522
- - **references/security-review-guide.md**: Security-focused review checklist
523
- - **assets/pr-review-template.md**: Standard review comment template
524
- - **assets/review-checklist.md**: Quick reference checklist
525
- - **scripts/pr-analyzer.py**: Analyze PR complexity and suggest reviewers