claude-dev-env 1.0.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/LICENSE +21 -0
- package/README.md +219 -0
- package/agents/agent-writer.md +157 -0
- package/agents/clasp-deployment-orchestrator.md +609 -0
- package/agents/clean-coder.md +295 -0
- package/agents/code-quality-agent.md +40 -0
- package/agents/code-standards-agent.md +93 -0
- package/agents/config-centralizer.md +686 -0
- package/agents/config-extraction-agent.md +225 -0
- package/agents/doc-orchestrator.md +47 -0
- package/agents/docs-agent.md +112 -0
- package/agents/docx-agent.md +211 -0
- package/agents/git-commit-crafter.md +100 -0
- package/agents/magic-value-eliminator-agent.md +72 -0
- package/agents/mandatory-agent-workflow-agent.md +88 -0
- package/agents/parallel-workflow-coordinator.md +779 -0
- package/agents/pdf-agent.md +302 -0
- package/agents/plan-executor.md +226 -0
- package/agents/pr-description-writer.md +87 -0
- package/agents/project-context-loader.md +238 -0
- package/agents/project-docs-analyzer.md +54 -0
- package/agents/project-structure-organizer-agent.md +72 -0
- package/agents/readability-review-agent.md +76 -0
- package/agents/refactoring-specialist.md +69 -0
- package/agents/right-sized-engineer.md +129 -0
- package/agents/session-continuity-manager.md +53 -0
- package/agents/skill-to-agent-converter.md +371 -0
- package/agents/skill-writer-agent.md +470 -0
- package/agents/stub-detector-agent.md +140 -0
- package/agents/tdd-test-writer.md +62 -0
- package/agents/test-data-builder.md +68 -0
- package/agents/tooling-builder.md +78 -0
- package/agents/user-docs-writer.md +67 -0
- package/agents/validation-expert.md +71 -0
- package/agents/workflow-visual-documenter.md +82 -0
- package/agents/xlsx-agent.md +169 -0
- package/bin/install.mjs +256 -0
- package/commands/commit.md +28 -0
- package/commands/docupdate.md +322 -0
- package/commands/implement.md +102 -0
- package/commands/initialize.md +91 -0
- package/commands/plan.md +63 -0
- package/commands/pr-comments.md +47 -0
- package/commands/readability-review.md +20 -0
- package/commands/review-plan.md +7 -0
- package/commands/right-size.md +15 -0
- package/commands/stubcheck.md +89 -0
- package/commands/sum.md +30 -0
- package/docs/CODE_RULES.md +186 -0
- package/docs/DJANGO_PATTERNS.md +80 -0
- package/docs/REACT_PATTERNS.md +185 -0
- package/docs/TEST_QUALITY.md +104 -0
- package/hooks/advisory/migration-safety-advisor.py +49 -0
- package/hooks/advisory/refactor-guard.py +205 -0
- package/hooks/blocking/block-main-commit.py +168 -0
- package/hooks/blocking/code-rules-enforcer.py +549 -0
- package/hooks/blocking/destructive-command-blocker.py +107 -0
- package/hooks/blocking/docker-settings-guard.py +44 -0
- package/hooks/blocking/hedging-language-blocker.py +130 -0
- package/hooks/blocking/parallel-task-blocker.py +69 -0
- package/hooks/blocking/pr-description-enforcer.py +87 -0
- package/hooks/blocking/pyautogui-scroll-blocker.py +74 -0
- package/hooks/blocking/sensitive-file-protector.py +70 -0
- package/hooks/blocking/tdd-enforcer.py +62 -0
- package/hooks/blocking/test-preflight-check.py +343 -0
- package/hooks/blocking/write-existing-file-blocker.py +63 -0
- package/hooks/git-hooks/post-commit.py +103 -0
- package/hooks/github-action/test_workflow.py +33 -0
- package/hooks/hooks.json +246 -0
- package/hooks/lifecycle/config-change-guard.py +84 -0
- package/hooks/lifecycle/session-end-cleanup.py +59 -0
- package/hooks/notification/attention-needed-notify.py +63 -0
- package/hooks/notification/claude-notification-handler.py +59 -0
- package/hooks/notification/notification_utils.py +206 -0
- package/hooks/rewrite-plugin-paths.py +116 -0
- package/hooks/session/bulk-edit-reminder.py +30 -0
- package/hooks/session/code-rules-reminder.py +97 -0
- package/hooks/session/compact-context-reinject.py +39 -0
- package/hooks/session/hook-structure-context.py +140 -0
- package/hooks/session/plugin-data-dir-cleanup.py +39 -0
- package/hooks/validation/code-style-validator.py +145 -0
- package/hooks/validation/e2e-test-validator.py +142 -0
- package/hooks/validation/hook-format-validator.py +66 -0
- package/hooks/validation/mypy_validator.py +180 -0
- package/hooks/validators/README.md +125 -0
- package/hooks/validators/VALIDATION_REPORT.md +287 -0
- package/hooks/validators/__init__.py +19 -0
- package/hooks/validators/abbreviation_checks.py +82 -0
- package/hooks/validators/code_quality_checks.py +133 -0
- package/hooks/validators/comment_checks.py +188 -0
- package/hooks/validators/file_structure_checks.py +182 -0
- package/hooks/validators/git_checks.py +107 -0
- package/hooks/validators/health_check.py +214 -0
- package/hooks/validators/magic_value_checks.py +81 -0
- package/hooks/validators/mypy_integration.py +52 -0
- package/hooks/validators/output_formatter.py +266 -0
- package/hooks/validators/pr_reference_checks.py +72 -0
- package/hooks/validators/python_antipattern_checks.py +110 -0
- package/hooks/validators/python_style_checks.py +364 -0
- package/hooks/validators/react_checks.py +90 -0
- package/hooks/validators/ruff_integration.py +80 -0
- package/hooks/validators/run_all_validators.py +772 -0
- package/hooks/validators/security_checks.py +135 -0
- package/hooks/validators/test_abbreviation_checks.py +76 -0
- package/hooks/validators/test_bad.tsx +7 -0
- package/hooks/validators/test_code_quality_checks.py +129 -0
- package/hooks/validators/test_file_structure_checks.py +307 -0
- package/hooks/validators/test_files/01_basic_component.tsx +10 -0
- package/hooks/validators/test_files/02_component_without_react.tsx +10 -0
- package/hooks/validators/test_files/03_pure_component.tsx +10 -0
- package/hooks/validators/test_files/04_pure_component_import.tsx +10 -0
- package/hooks/validators/test_files/05_typescript_generics.tsx +14 -0
- package/hooks/validators/test_files/06_typescript_two_generics.tsx +18 -0
- package/hooks/validators/test_files/07_multiline_declaration.tsx +11 -0
- package/hooks/validators/test_files/08_error_boundary_valid.tsx +14 -0
- package/hooks/validators/test_files/09_error_boundary_with_other_class.tsx +20 -0
- package/hooks/validators/test_files/10_inheritance_chain.tsx +16 -0
- package/hooks/validators/test_files/11_ts_file.ts +10 -0
- package/hooks/validators/test_files/12_non_react_class.tsx +14 -0
- package/hooks/validators/test_files/13_functional_component.tsx +8 -0
- package/hooks/validators/test_files/14_indented_class.tsx +13 -0
- package/hooks/validators/test_files/15_getDerivedStateFromError.tsx +14 -0
- package/hooks/validators/test_files/16_mixed_components.tsx +20 -0
- package/hooks/validators/test_files/EXECUTIVE_SUMMARY.md +175 -0
- package/hooks/validators/test_files/TEST_RESULTS_TABLE.txt +60 -0
- package/hooks/validators/test_files/VALIDATION_REPORT.md +201 -0
- package/hooks/validators/test_files/async_views.py +23 -0
- package/hooks/validators/test_files/async_with_imports.py +14 -0
- package/hooks/validators/test_files/bad_inline_imports.py +37 -0
- package/hooks/validators/test_files/management/commands/cmd_01_no_debug_check.py +10 -0
- package/hooks/validators/test_files/management/commands/cmd_02_proper_debug_check.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_03_debug_check_with_return.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_04_imported_DEBUG.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_05_debug_check_in_helper.py +16 -0
- package/hooks/validators/test_files/management/commands/cmd_06_debug_check_late.py +22 -0
- package/hooks/validators/test_files/management/commands/cmd_07_positive_debug_check.py +15 -0
- package/hooks/validators/test_files/management/commands/cmd_08_debug_with_and.py +14 -0
- package/hooks/validators/test_files/not_management_command.py +10 -0
- package/hooks/validators/test_files/skip_decorators/test_01_simple_skip.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_02_pytest_skipif.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_03_unittest_skipIf.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_04_skip_with_parens.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_05_xfail.py +7 -0
- package/hooks/validators/test_files/skip_decorators/test_06_custom_skip.py +11 -0
- package/hooks/validators/test_files/skip_decorators/test_07_capital_Skip.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_08_skipUnless.py +7 -0
- package/hooks/validators/test_files/skip_decorators/test_09_pytest_mark_skip_simple.py +7 -0
- package/hooks/validators/test_files/test_async_functions.py +45 -0
- package/hooks/validators/test_files/test_purecomponent/PureComponentExample.tsx +7 -0
- package/hooks/validators/test_files/test_purecomponent/ReactPureComponentExample.tsx +7 -0
- package/hooks/validators/test_git_checks.py +295 -0
- package/hooks/validators/test_good.tsx +5 -0
- package/hooks/validators/test_health_check.py +57 -0
- package/hooks/validators/test_magic_value_checks.py +63 -0
- package/hooks/validators/test_mypy_integration.py +27 -0
- package/hooks/validators/test_output_formatter.py +150 -0
- package/hooks/validators/test_pr_reference_checks.py +41 -0
- package/hooks/validators/test_python_antipattern_checks.py +113 -0
- package/hooks/validators/test_python_style_checks.py +439 -0
- package/hooks/validators/test_react_checks.py +213 -0
- package/hooks/validators/test_results.txt +25 -0
- package/hooks/validators/test_ruff_integration.py +27 -0
- package/hooks/validators/test_run_all_validators.py +228 -0
- package/hooks/validators/test_run_all_validators_integration.py +48 -0
- package/hooks/validators/test_safety_checks.py +243 -0
- package/hooks/validators/test_security_checks.py +105 -0
- package/hooks/validators/test_test_safety_checks.py +321 -0
- package/hooks/validators/test_todo_checks.py +39 -0
- package/hooks/validators/test_type_safety_checks.py +85 -0
- package/hooks/validators/test_useless_test_checks.py +55 -0
- package/hooks/validators/test_validator_base.py +26 -0
- package/hooks/validators/test_verify_paths.py +34 -0
- package/hooks/validators/todo_checks.py +59 -0
- package/hooks/validators/type_safety_checks.py +101 -0
- package/hooks/validators/useless_test_checks.py +92 -0
- package/hooks/validators/validator_base.py +19 -0
- package/hooks/validators/verify_paths.py +57 -0
- package/hooks/workflow/auto-formatter.py +114 -0
- package/hooks/workflow/investigation-tracker-reset.py +46 -0
- package/package.json +30 -0
- package/rules/agent-spawn-protocol.md +47 -0
- package/rules/cleanup-temp-files.md +27 -0
- package/rules/code-reviews.md +11 -0
- package/rules/code-standards.md +43 -0
- package/rules/conservative-action.md +20 -0
- package/rules/context7.md +12 -0
- package/rules/explore-thoroughly.md +27 -0
- package/rules/git-workflow.md +42 -0
- package/rules/parallel-tools.md +23 -0
- package/rules/research-mode.md +23 -0
- package/rules/right-sized-engineering.md +28 -0
- package/rules/tdd.md +7 -0
- package/rules/testing.md +12 -0
- package/skills/agent-prompt/SKILL.md +102 -0
- package/skills/anthropic-plan/SKILL.md +107 -0
- package/skills/everything-search/SKILL.md +144 -0
- package/skills/ingest/SKILL.md +40 -0
- package/skills/npm-creator/SKILL.md +183 -0
- package/skills/pr-review-responder/EXAMPLES.md +590 -0
- package/skills/pr-review-responder/PRINCIPLES.md +539 -0
- package/skills/pr-review-responder/README.md +209 -0
- package/skills/pr-review-responder/SKILL.md +202 -0
- package/skills/pr-review-responder/TESTING.md +407 -0
- package/skills/pr-review-responder/scripts/respond_to_reviews.py +376 -0
- package/skills/pr-review-responder/update_skill.py +297 -0
- package/skills/prompt-generator/REFERENCE.md +150 -0
- package/skills/prompt-generator/SKILL.md +154 -0
- package/skills/readability-review/SKILL.md +127 -0
- package/skills/recall/SKILL.md +27 -0
- package/skills/remember/SKILL.md +63 -0
- package/skills/rule-audit/SKILL.md +307 -0
- package/skills/rule-creator/SKILL.md +150 -0
- package/skills/skill-writer/REFERENCE.md +246 -0
- package/skills/skill-writer/SKILL.md +270 -0
- package/skills/tdd-team/SKILL.md +128 -0
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
# PR Review Response Principles
|
|
2
|
+
|
|
3
|
+
Theory and best practices for responding to code review comments.
|
|
4
|
+
|
|
5
|
+
## Why Respond to Review Comments?
|
|
6
|
+
|
|
7
|
+
### Problem: Silent Fixes
|
|
8
|
+
|
|
9
|
+
Common anti-pattern:
|
|
10
|
+
1. Reviewer leaves comments
|
|
11
|
+
2. Developer fixes issues
|
|
12
|
+
3. Developer pushes changes
|
|
13
|
+
4. Reviewer has to re-review entire PR to find what changed
|
|
14
|
+
5. Reviewer doesn't know if comments were addressed
|
|
15
|
+
|
|
16
|
+
Result: **Wasted time, frustrated reviewers, slower feedback loops**
|
|
17
|
+
|
|
18
|
+
### Solution: Explicit Responses
|
|
19
|
+
|
|
20
|
+
Better workflow:
|
|
21
|
+
1. Reviewer leaves comments
|
|
22
|
+
2. Developer fixes issues
|
|
23
|
+
3. Developer responds to each comment: "Fixed: [what changed]"
|
|
24
|
+
4. Developer pushes changes
|
|
25
|
+
5. Reviewer sees responses, knows what to re-check
|
|
26
|
+
6. Faster approval
|
|
27
|
+
|
|
28
|
+
Result: **Clear communication, faster reviews, happy team**
|
|
29
|
+
|
|
30
|
+
## Principles of Good Review Responses
|
|
31
|
+
|
|
32
|
+
### Principle 1: Specificity Over Brevity
|
|
33
|
+
|
|
34
|
+
**Bad**: "Fixed"
|
|
35
|
+
**Good**: "Fixed: Renamed user_name to display_name"
|
|
36
|
+
|
|
37
|
+
**Why**: Reviewer needs to know WHAT changed, not just that something changed.
|
|
38
|
+
|
|
39
|
+
**Rule**: One sentence explaining the specific change made.
|
|
40
|
+
|
|
41
|
+
### Principle 2: Acknowledge, Don't Argue
|
|
42
|
+
|
|
43
|
+
**Bad**: "The wrapper class provides better encapsulation though"
|
|
44
|
+
**Good**: "Fixed: Removed wrapper, using Path().read_bytes()"
|
|
45
|
+
|
|
46
|
+
**Why**: Code review is not a debate. If reviewer requested change, make it or discuss synchronously.
|
|
47
|
+
|
|
48
|
+
**Rule**: Responses are for confirmation, not debate. Save discussions for meetings.
|
|
49
|
+
|
|
50
|
+
### Principle 3: Reviewer Can Verify
|
|
51
|
+
|
|
52
|
+
**Bad**: "Updated the code"
|
|
53
|
+
**Good**: "Fixed: Using select_related('profile') to eliminate N+1 query"
|
|
54
|
+
|
|
55
|
+
**Why**: Reviewer needs to verify the fix. Specific details make this easy.
|
|
56
|
+
|
|
57
|
+
**Rule**: Include enough detail for reviewer to quickly verify without deep code inspection.
|
|
58
|
+
|
|
59
|
+
### Principle 4: One Response Per Comment
|
|
60
|
+
|
|
61
|
+
**Bad**: (One response for 3 different comments)
|
|
62
|
+
**Good**: Individual response on each comment thread
|
|
63
|
+
|
|
64
|
+
**Why**: GitHub organizes by comment threads. Keeps conversation context clear.
|
|
65
|
+
|
|
66
|
+
**Rule**: Never combine responses to multiple comments.
|
|
67
|
+
|
|
68
|
+
### Principle 5: Respond Only to What You Changed
|
|
69
|
+
|
|
70
|
+
**Bad**: Responding "Fixed" to every comment, even ones you didn't address
|
|
71
|
+
**Good**: Only respond to comments where you made changes
|
|
72
|
+
|
|
73
|
+
**Why**: False positives waste reviewer time. They check, find nothing changed, lose trust.
|
|
74
|
+
|
|
75
|
+
**Rule**: Only post response if you actually modified the relevant code.
|
|
76
|
+
|
|
77
|
+
### Principle 6: Acknowledge Good Catches
|
|
78
|
+
|
|
79
|
+
**Bad**: "Fixed: Using shared function"
|
|
80
|
+
**Good**: "Fixed: Good catch! Using shared upload function now"
|
|
81
|
+
|
|
82
|
+
**Why**: Positive reinforcement encourages thorough reviews. Shows gratitude.
|
|
83
|
+
|
|
84
|
+
**Rule**: When reviewer finds a real issue, acknowledge it in your response.
|
|
85
|
+
|
|
86
|
+
### Principle 7: Keep It Short
|
|
87
|
+
|
|
88
|
+
**Bad**: Multi-paragraph explanation of the architectural decision
|
|
89
|
+
**Good**: One sentence stating what changed
|
|
90
|
+
|
|
91
|
+
**Why**: Review responses are for confirmation, not documentation. Save details for code comments.
|
|
92
|
+
|
|
93
|
+
**Rule**: Maximum one sentence. If you need more, the change needs discussion.
|
|
94
|
+
|
|
95
|
+
## Response Format Guide
|
|
96
|
+
|
|
97
|
+
### Standard Format
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
✅ **Fixed**: [concise description of change]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Components**:
|
|
104
|
+
- ✅ checkmark: Visual confirmation, shows positive acknowledgment
|
|
105
|
+
- **Fixed**: Bold keyword, makes it scannable in long threads
|
|
106
|
+
- Concise description: What changed, not why (code/comments explain why)
|
|
107
|
+
|
|
108
|
+
### Variations
|
|
109
|
+
|
|
110
|
+
**Cannot fix now** (rare):
|
|
111
|
+
```
|
|
112
|
+
📝 **Noted**: Will address in separate PR to avoid scope creep
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Needs discussion** (use sparingly):
|
|
116
|
+
```
|
|
117
|
+
❓ **Question**: Should this be async or sync? Happy to discuss synchronously
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Good catch acknowledgment**:
|
|
121
|
+
```
|
|
122
|
+
✅ **Fixed**: Good catch! [what changed]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Clarification needed** (ask, don't respond):
|
|
126
|
+
```
|
|
127
|
+
❓ Which shared function should I use here?
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Anti-Patterns to Avoid
|
|
131
|
+
|
|
132
|
+
### Anti-Pattern 1: Defending Your Original Code
|
|
133
|
+
|
|
134
|
+
**Example**:
|
|
135
|
+
```
|
|
136
|
+
Reviewer: "This wrapper class is unnecessary"
|
|
137
|
+
You: "Actually, it provides better separation of concerns and follows
|
|
138
|
+
the Single Responsibility Principle from SOLID..."
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Why it's bad**:
|
|
142
|
+
- Code review is not the place for architectural debates
|
|
143
|
+
- Reviewer already reviewed and decided it's unnecessary
|
|
144
|
+
- If you disagree, discuss synchronously (call/meeting)
|
|
145
|
+
- Long async debates waste everyone's time
|
|
146
|
+
|
|
147
|
+
**Better approach**:
|
|
148
|
+
```
|
|
149
|
+
✅ **Fixed**: Removed wrapper, using Path().read_bytes()
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If you STRONGLY disagree, discuss in person, then respond with outcome.
|
|
153
|
+
|
|
154
|
+
### Anti-Pattern 2: Vague Acknowledgments
|
|
155
|
+
|
|
156
|
+
**Example**:
|
|
157
|
+
```
|
|
158
|
+
Reviewer: "This causes N+1 queries"
|
|
159
|
+
You: "Fixed"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Why it's bad**:
|
|
163
|
+
- Reviewer doesn't know HOW you fixed it
|
|
164
|
+
- Might have used wrong solution (prefetch vs select_related)
|
|
165
|
+
- Requires re-review to verify
|
|
166
|
+
|
|
167
|
+
**Better approach**:
|
|
168
|
+
```
|
|
169
|
+
✅ **Fixed**: Added select_related('profile') to eliminate N+1 query
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Now reviewer knows exactly what to check.
|
|
173
|
+
|
|
174
|
+
### Anti-Pattern 3: Over-Explaining in Responses
|
|
175
|
+
|
|
176
|
+
**Example**:
|
|
177
|
+
```
|
|
178
|
+
Reviewer: "Use the shared upload function"
|
|
179
|
+
You: "I've refactored this to use the storage.upload_file()
|
|
180
|
+
function which provides versioned filenames, calculates hashes from
|
|
181
|
+
file contents, updates the filename map in storage, and is shared with
|
|
182
|
+
the web upload interface following the DRY principle..."
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Why it's bad**:
|
|
186
|
+
- Too verbose for a review response
|
|
187
|
+
- Details belong in code comments or commit messages
|
|
188
|
+
- Wastes reviewer's time reading
|
|
189
|
+
|
|
190
|
+
**Better approach**:
|
|
191
|
+
```
|
|
192
|
+
✅ **Fixed**: Using storage.upload_file()
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The code and commit message explain the rest.
|
|
196
|
+
|
|
197
|
+
### Anti-Pattern 4: Responding Before Fixing
|
|
198
|
+
|
|
199
|
+
**Example**:
|
|
200
|
+
```
|
|
201
|
+
Reviewer leaves comment → You respond "Will fix" → Days pass → Reviewer asks "Did you fix it?"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Why it's bad**:
|
|
205
|
+
- "Will fix" is noise, not signal
|
|
206
|
+
- Reviewer can't verify anything
|
|
207
|
+
- Creates extra back-and-forth
|
|
208
|
+
|
|
209
|
+
**Better approach**:
|
|
210
|
+
```
|
|
211
|
+
Fix the code → Respond with "Fixed: [what changed]" → Push
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Only respond when done, not when planning.
|
|
215
|
+
|
|
216
|
+
### Anti-Pattern 5: Batch Responses on Unrelated Comments
|
|
217
|
+
|
|
218
|
+
**Example**:
|
|
219
|
+
```
|
|
220
|
+
Reviewer comments on 5 different issues
|
|
221
|
+
You post one response: "Fixed all the issues you mentioned"
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Why it's bad**:
|
|
225
|
+
- Reviewer doesn't know which issues are fixed
|
|
226
|
+
- No connection between comment and fix
|
|
227
|
+
- Makes re-review difficult
|
|
228
|
+
|
|
229
|
+
**Better approach**:
|
|
230
|
+
```
|
|
231
|
+
Individual response on each of the 5 comment threads
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
One-to-one mapping, clear context.
|
|
235
|
+
|
|
236
|
+
## GitHub Review Comment Types
|
|
237
|
+
|
|
238
|
+
### Type 1: Inline Code Comments
|
|
239
|
+
|
|
240
|
+
**What**: Comments on specific lines of code
|
|
241
|
+
|
|
242
|
+
**GitHub location**: File diffs, attached to specific line numbers
|
|
243
|
+
|
|
244
|
+
**How to respond**:
|
|
245
|
+
```bash
|
|
246
|
+
gh api repos/{owner}/{repo}/pulls/comments/{comment_id}/replies \
|
|
247
|
+
-X POST \
|
|
248
|
+
-f body="✅ **Fixed**: [description]"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Skill behavior**: Automatically detects and responds to these
|
|
252
|
+
|
|
253
|
+
### Type 2: General PR Comments
|
|
254
|
+
|
|
255
|
+
**What**: Comments on the PR overall, not tied to code
|
|
256
|
+
|
|
257
|
+
**GitHub location**: PR conversation tab
|
|
258
|
+
|
|
259
|
+
**How to respond**:
|
|
260
|
+
```bash
|
|
261
|
+
gh pr comment {pr_number} -b "✅ **Fixed**: [description]"
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Skill behavior**: Detects but cannot auto-respond (lacks line context)
|
|
265
|
+
|
|
266
|
+
### Type 3: Review Summary Comments
|
|
267
|
+
|
|
268
|
+
**What**: Comments submitted as part of "Review changes" flow
|
|
269
|
+
|
|
270
|
+
**GitHub location**: Part of a review submission
|
|
271
|
+
|
|
272
|
+
**How to respond**: Reply to individual comments in the review
|
|
273
|
+
|
|
274
|
+
**Skill behavior**: Treats these as inline comments
|
|
275
|
+
|
|
276
|
+
### Type 4: Threaded Conversations
|
|
277
|
+
|
|
278
|
+
**What**: Back-and-forth discussion on a comment
|
|
279
|
+
|
|
280
|
+
**GitHub location**: Nested under original comment
|
|
281
|
+
|
|
282
|
+
**How to respond**: Add to the thread (same as inline comments)
|
|
283
|
+
|
|
284
|
+
**Skill behavior**: Adds response at end of thread
|
|
285
|
+
|
|
286
|
+
## Timing and Workflow
|
|
287
|
+
|
|
288
|
+
### When to Respond
|
|
289
|
+
|
|
290
|
+
**Best practice**: After fixing, before pushing
|
|
291
|
+
|
|
292
|
+
**Workflow**:
|
|
293
|
+
```
|
|
294
|
+
1. Receive review feedback
|
|
295
|
+
2. Make code changes addressing feedback
|
|
296
|
+
3. Commit changes
|
|
297
|
+
4. Respond to review comments (this skill)
|
|
298
|
+
5. Push changes
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Why**: Reviewer sees responses immediately when they get push notification.
|
|
302
|
+
|
|
303
|
+
### When NOT to Respond
|
|
304
|
+
|
|
305
|
+
**Don't respond if**:
|
|
306
|
+
- You haven't fixed the issue yet
|
|
307
|
+
- Comment is a question (answer instead)
|
|
308
|
+
- Comment needs discussion (discuss synchronously)
|
|
309
|
+
- You disagree with the feedback (discuss first)
|
|
310
|
+
|
|
311
|
+
### Multiple Commits
|
|
312
|
+
|
|
313
|
+
**Scenario**: Several commits addressing different comments
|
|
314
|
+
|
|
315
|
+
**Approach**: Respond once after all commits
|
|
316
|
+
|
|
317
|
+
**Workflow**:
|
|
318
|
+
```
|
|
319
|
+
commit 1: Fix field names
|
|
320
|
+
commit 2: Extract validation
|
|
321
|
+
commit 3: Add docstrings
|
|
322
|
+
|
|
323
|
+
Then: Respond to all comments at once
|
|
324
|
+
Then: Push all commits
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Why**: One batch of responses, one push notification, cleaner.
|
|
328
|
+
|
|
329
|
+
## Psychology of Review Responses
|
|
330
|
+
|
|
331
|
+
### Reviewer Perspective
|
|
332
|
+
|
|
333
|
+
**What reviewers want**:
|
|
334
|
+
- Clear confirmation of what changed
|
|
335
|
+
- Easy verification (specific details)
|
|
336
|
+
- Acknowledgment of their time investment
|
|
337
|
+
- Fast feedback loop
|
|
338
|
+
|
|
339
|
+
**What reviewers hate**:
|
|
340
|
+
- Guessing if comments were addressed
|
|
341
|
+
- Re-reviewing entire PR to find changes
|
|
342
|
+
- Vague responses requiring follow-up
|
|
343
|
+
- Defensive arguments
|
|
344
|
+
|
|
345
|
+
### Developer Perspective
|
|
346
|
+
|
|
347
|
+
**Benefits of good responses**:
|
|
348
|
+
- Faster PR approvals
|
|
349
|
+
- Less back-and-forth
|
|
350
|
+
- Better reviewer relationships
|
|
351
|
+
- Clearer feedback loops
|
|
352
|
+
|
|
353
|
+
**Costs of poor responses**:
|
|
354
|
+
- Slower reviews
|
|
355
|
+
- Frustrated reviewers
|
|
356
|
+
- Longer PR lifetimes
|
|
357
|
+
- Less thorough future reviews
|
|
358
|
+
|
|
359
|
+
## Cultural Context
|
|
360
|
+
|
|
361
|
+
### High-Trust Teams
|
|
362
|
+
|
|
363
|
+
**Characteristic**: Reviewers trust developers to fix issues
|
|
364
|
+
|
|
365
|
+
**Response style**: Brief confirmations
|
|
366
|
+
```
|
|
367
|
+
✅ **Fixed**: Using shared function
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Low-Trust or New Teams
|
|
371
|
+
|
|
372
|
+
**Characteristic**: Need more detail to build confidence
|
|
373
|
+
|
|
374
|
+
**Response style**: Slightly more detail
|
|
375
|
+
```
|
|
376
|
+
✅ **Fixed**: Using storage.upload_file() instead of boto3 directly
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Open Source
|
|
380
|
+
|
|
381
|
+
**Characteristic**: Reviewers don't know you, need proof
|
|
382
|
+
|
|
383
|
+
**Response style**: More context
|
|
384
|
+
```
|
|
385
|
+
✅ **Fixed**: Replaced custom uploader with storage.upload_file() (DRY)
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
Adjust your response detail to your team's culture.
|
|
389
|
+
|
|
390
|
+
## Automation Benefits
|
|
391
|
+
|
|
392
|
+
### Manual Response Problems
|
|
393
|
+
|
|
394
|
+
- Forget to respond to some comments
|
|
395
|
+
- Inconsistent response format
|
|
396
|
+
- Time-consuming to match comments to changes
|
|
397
|
+
- Easy to miss comments in large PRs
|
|
398
|
+
|
|
399
|
+
### Automated Response Benefits
|
|
400
|
+
|
|
401
|
+
- **Consistency**: Same format every time
|
|
402
|
+
- **Completeness**: Never miss a comment
|
|
403
|
+
- **Speed**: Seconds instead of minutes
|
|
404
|
+
- **Accuracy**: Automatic matching of changes to comments
|
|
405
|
+
|
|
406
|
+
### When to Override Automation
|
|
407
|
+
|
|
408
|
+
**Override if**:
|
|
409
|
+
- Need to add context (unusual fix)
|
|
410
|
+
- Want to acknowledge particularly good feedback
|
|
411
|
+
- Change was complex, needs brief explanation
|
|
412
|
+
- Disagreeing with reviewer (then discuss)
|
|
413
|
+
|
|
414
|
+
## Integration with Development Workflow
|
|
415
|
+
|
|
416
|
+
### TDD + Review Responses
|
|
417
|
+
|
|
418
|
+
**Workflow**:
|
|
419
|
+
```
|
|
420
|
+
1. Write failing test (TDD)
|
|
421
|
+
2. Write minimal code to pass (TDD)
|
|
422
|
+
3. Commit
|
|
423
|
+
4. Create PR
|
|
424
|
+
5. Receive review feedback
|
|
425
|
+
6. Fix issues (maintaining TDD)
|
|
426
|
+
7. Respond to reviews (this skill)
|
|
427
|
+
8. Push
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### CI/CD Integration
|
|
431
|
+
|
|
432
|
+
**Opportunity**: Hook into CI/CD pipeline
|
|
433
|
+
|
|
434
|
+
**Example**:
|
|
435
|
+
```yaml
|
|
436
|
+
# .github/workflows/pr.yml
|
|
437
|
+
on: pull_request_review_comment
|
|
438
|
+
|
|
439
|
+
jobs:
|
|
440
|
+
track-responses:
|
|
441
|
+
runs-on: ubuntu-latest
|
|
442
|
+
steps:
|
|
443
|
+
- name: Check if all comments responded
|
|
444
|
+
run: ./scripts/check_review_responses.sh
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### Metrics
|
|
448
|
+
|
|
449
|
+
**Track**:
|
|
450
|
+
- Time from review to response
|
|
451
|
+
- Percentage of comments with responses
|
|
452
|
+
- Time from response to re-review
|
|
453
|
+
- PR approval time
|
|
454
|
+
|
|
455
|
+
**Goal**: Faster feedback loops, higher quality communication
|
|
456
|
+
|
|
457
|
+
## Advanced: Handling Difficult Situations
|
|
458
|
+
|
|
459
|
+
### Situation 1: Disagree with Reviewer
|
|
460
|
+
|
|
461
|
+
**Wrong**:
|
|
462
|
+
```
|
|
463
|
+
❌ "I disagree, the wrapper provides better encapsulation"
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
**Right**:
|
|
467
|
+
```
|
|
468
|
+
1. Discuss synchronously (call/Slack)
|
|
469
|
+
2. Agree on approach
|
|
470
|
+
3. Respond with: "Discussed offline, using [agreed approach]"
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Situation 2: Can't Fix in This PR
|
|
474
|
+
|
|
475
|
+
**Wrong**:
|
|
476
|
+
```
|
|
477
|
+
❌ "Can't fix this now"
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
**Right**:
|
|
481
|
+
```
|
|
482
|
+
📝 **Noted**: Will address in separate PR #124 (created) to avoid scope creep
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Situation 3: Comment is Actually Wrong
|
|
486
|
+
|
|
487
|
+
**Wrong**:
|
|
488
|
+
```
|
|
489
|
+
❌ "Actually this doesn't cause N+1 queries because..."
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**Right**:
|
|
493
|
+
```
|
|
494
|
+
1. Politely explain in response
|
|
495
|
+
2. If reviewer still wants change, discuss synchronously
|
|
496
|
+
3. Either make the change or reach consensus
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### Situation 4: Massive Refactor Requested
|
|
500
|
+
|
|
501
|
+
**Wrong**:
|
|
502
|
+
```
|
|
503
|
+
❌ "That's a huge change, can't do it now"
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
**Right**:
|
|
507
|
+
```
|
|
508
|
+
📝 **Noted**: Significant refactor, proposing we:
|
|
509
|
+
1. Merge this PR as-is (provides value)
|
|
510
|
+
2. Create issue #125 for refactor
|
|
511
|
+
3. Tackle in dedicated PR next sprint
|
|
512
|
+
|
|
513
|
+
Thoughts?
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Summary
|
|
517
|
+
|
|
518
|
+
**Core principles**:
|
|
519
|
+
1. Be specific (what changed)
|
|
520
|
+
2. Be concise (one sentence)
|
|
521
|
+
3. Acknowledge good feedback
|
|
522
|
+
4. Respond only to what you fixed
|
|
523
|
+
5. Make reviewer's job easy
|
|
524
|
+
|
|
525
|
+
**Format**:
|
|
526
|
+
```
|
|
527
|
+
✅ **Fixed**: [specific change made]
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
**Timing**:
|
|
531
|
+
- After fixing, before pushing
|
|
532
|
+
|
|
533
|
+
**Automation value**:
|
|
534
|
+
- Consistency, completeness, speed
|
|
535
|
+
|
|
536
|
+
**Result**:
|
|
537
|
+
- Faster reviews, happier teams, better code
|
|
538
|
+
|
|
539
|
+
Use the pr-review-responder skill to make this effortless.
|