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.
Files changed (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +219 -0
  3. package/agents/agent-writer.md +157 -0
  4. package/agents/clasp-deployment-orchestrator.md +609 -0
  5. package/agents/clean-coder.md +295 -0
  6. package/agents/code-quality-agent.md +40 -0
  7. package/agents/code-standards-agent.md +93 -0
  8. package/agents/config-centralizer.md +686 -0
  9. package/agents/config-extraction-agent.md +225 -0
  10. package/agents/doc-orchestrator.md +47 -0
  11. package/agents/docs-agent.md +112 -0
  12. package/agents/docx-agent.md +211 -0
  13. package/agents/git-commit-crafter.md +100 -0
  14. package/agents/magic-value-eliminator-agent.md +72 -0
  15. package/agents/mandatory-agent-workflow-agent.md +88 -0
  16. package/agents/parallel-workflow-coordinator.md +779 -0
  17. package/agents/pdf-agent.md +302 -0
  18. package/agents/plan-executor.md +226 -0
  19. package/agents/pr-description-writer.md +87 -0
  20. package/agents/project-context-loader.md +238 -0
  21. package/agents/project-docs-analyzer.md +54 -0
  22. package/agents/project-structure-organizer-agent.md +72 -0
  23. package/agents/readability-review-agent.md +76 -0
  24. package/agents/refactoring-specialist.md +69 -0
  25. package/agents/right-sized-engineer.md +129 -0
  26. package/agents/session-continuity-manager.md +53 -0
  27. package/agents/skill-to-agent-converter.md +371 -0
  28. package/agents/skill-writer-agent.md +470 -0
  29. package/agents/stub-detector-agent.md +140 -0
  30. package/agents/tdd-test-writer.md +62 -0
  31. package/agents/test-data-builder.md +68 -0
  32. package/agents/tooling-builder.md +78 -0
  33. package/agents/user-docs-writer.md +67 -0
  34. package/agents/validation-expert.md +71 -0
  35. package/agents/workflow-visual-documenter.md +82 -0
  36. package/agents/xlsx-agent.md +169 -0
  37. package/bin/install.mjs +256 -0
  38. package/commands/commit.md +28 -0
  39. package/commands/docupdate.md +322 -0
  40. package/commands/implement.md +102 -0
  41. package/commands/initialize.md +91 -0
  42. package/commands/plan.md +63 -0
  43. package/commands/pr-comments.md +47 -0
  44. package/commands/readability-review.md +20 -0
  45. package/commands/review-plan.md +7 -0
  46. package/commands/right-size.md +15 -0
  47. package/commands/stubcheck.md +89 -0
  48. package/commands/sum.md +30 -0
  49. package/docs/CODE_RULES.md +186 -0
  50. package/docs/DJANGO_PATTERNS.md +80 -0
  51. package/docs/REACT_PATTERNS.md +185 -0
  52. package/docs/TEST_QUALITY.md +104 -0
  53. package/hooks/advisory/migration-safety-advisor.py +49 -0
  54. package/hooks/advisory/refactor-guard.py +205 -0
  55. package/hooks/blocking/block-main-commit.py +168 -0
  56. package/hooks/blocking/code-rules-enforcer.py +549 -0
  57. package/hooks/blocking/destructive-command-blocker.py +107 -0
  58. package/hooks/blocking/docker-settings-guard.py +44 -0
  59. package/hooks/blocking/hedging-language-blocker.py +130 -0
  60. package/hooks/blocking/parallel-task-blocker.py +69 -0
  61. package/hooks/blocking/pr-description-enforcer.py +87 -0
  62. package/hooks/blocking/pyautogui-scroll-blocker.py +74 -0
  63. package/hooks/blocking/sensitive-file-protector.py +70 -0
  64. package/hooks/blocking/tdd-enforcer.py +62 -0
  65. package/hooks/blocking/test-preflight-check.py +343 -0
  66. package/hooks/blocking/write-existing-file-blocker.py +63 -0
  67. package/hooks/git-hooks/post-commit.py +103 -0
  68. package/hooks/github-action/test_workflow.py +33 -0
  69. package/hooks/hooks.json +246 -0
  70. package/hooks/lifecycle/config-change-guard.py +84 -0
  71. package/hooks/lifecycle/session-end-cleanup.py +59 -0
  72. package/hooks/notification/attention-needed-notify.py +63 -0
  73. package/hooks/notification/claude-notification-handler.py +59 -0
  74. package/hooks/notification/notification_utils.py +206 -0
  75. package/hooks/rewrite-plugin-paths.py +116 -0
  76. package/hooks/session/bulk-edit-reminder.py +30 -0
  77. package/hooks/session/code-rules-reminder.py +97 -0
  78. package/hooks/session/compact-context-reinject.py +39 -0
  79. package/hooks/session/hook-structure-context.py +140 -0
  80. package/hooks/session/plugin-data-dir-cleanup.py +39 -0
  81. package/hooks/validation/code-style-validator.py +145 -0
  82. package/hooks/validation/e2e-test-validator.py +142 -0
  83. package/hooks/validation/hook-format-validator.py +66 -0
  84. package/hooks/validation/mypy_validator.py +180 -0
  85. package/hooks/validators/README.md +125 -0
  86. package/hooks/validators/VALIDATION_REPORT.md +287 -0
  87. package/hooks/validators/__init__.py +19 -0
  88. package/hooks/validators/abbreviation_checks.py +82 -0
  89. package/hooks/validators/code_quality_checks.py +133 -0
  90. package/hooks/validators/comment_checks.py +188 -0
  91. package/hooks/validators/file_structure_checks.py +182 -0
  92. package/hooks/validators/git_checks.py +107 -0
  93. package/hooks/validators/health_check.py +214 -0
  94. package/hooks/validators/magic_value_checks.py +81 -0
  95. package/hooks/validators/mypy_integration.py +52 -0
  96. package/hooks/validators/output_formatter.py +266 -0
  97. package/hooks/validators/pr_reference_checks.py +72 -0
  98. package/hooks/validators/python_antipattern_checks.py +110 -0
  99. package/hooks/validators/python_style_checks.py +364 -0
  100. package/hooks/validators/react_checks.py +90 -0
  101. package/hooks/validators/ruff_integration.py +80 -0
  102. package/hooks/validators/run_all_validators.py +772 -0
  103. package/hooks/validators/security_checks.py +135 -0
  104. package/hooks/validators/test_abbreviation_checks.py +76 -0
  105. package/hooks/validators/test_bad.tsx +7 -0
  106. package/hooks/validators/test_code_quality_checks.py +129 -0
  107. package/hooks/validators/test_file_structure_checks.py +307 -0
  108. package/hooks/validators/test_files/01_basic_component.tsx +10 -0
  109. package/hooks/validators/test_files/02_component_without_react.tsx +10 -0
  110. package/hooks/validators/test_files/03_pure_component.tsx +10 -0
  111. package/hooks/validators/test_files/04_pure_component_import.tsx +10 -0
  112. package/hooks/validators/test_files/05_typescript_generics.tsx +14 -0
  113. package/hooks/validators/test_files/06_typescript_two_generics.tsx +18 -0
  114. package/hooks/validators/test_files/07_multiline_declaration.tsx +11 -0
  115. package/hooks/validators/test_files/08_error_boundary_valid.tsx +14 -0
  116. package/hooks/validators/test_files/09_error_boundary_with_other_class.tsx +20 -0
  117. package/hooks/validators/test_files/10_inheritance_chain.tsx +16 -0
  118. package/hooks/validators/test_files/11_ts_file.ts +10 -0
  119. package/hooks/validators/test_files/12_non_react_class.tsx +14 -0
  120. package/hooks/validators/test_files/13_functional_component.tsx +8 -0
  121. package/hooks/validators/test_files/14_indented_class.tsx +13 -0
  122. package/hooks/validators/test_files/15_getDerivedStateFromError.tsx +14 -0
  123. package/hooks/validators/test_files/16_mixed_components.tsx +20 -0
  124. package/hooks/validators/test_files/EXECUTIVE_SUMMARY.md +175 -0
  125. package/hooks/validators/test_files/TEST_RESULTS_TABLE.txt +60 -0
  126. package/hooks/validators/test_files/VALIDATION_REPORT.md +201 -0
  127. package/hooks/validators/test_files/async_views.py +23 -0
  128. package/hooks/validators/test_files/async_with_imports.py +14 -0
  129. package/hooks/validators/test_files/bad_inline_imports.py +37 -0
  130. package/hooks/validators/test_files/management/commands/cmd_01_no_debug_check.py +10 -0
  131. package/hooks/validators/test_files/management/commands/cmd_02_proper_debug_check.py +14 -0
  132. package/hooks/validators/test_files/management/commands/cmd_03_debug_check_with_return.py +14 -0
  133. package/hooks/validators/test_files/management/commands/cmd_04_imported_DEBUG.py +14 -0
  134. package/hooks/validators/test_files/management/commands/cmd_05_debug_check_in_helper.py +16 -0
  135. package/hooks/validators/test_files/management/commands/cmd_06_debug_check_late.py +22 -0
  136. package/hooks/validators/test_files/management/commands/cmd_07_positive_debug_check.py +15 -0
  137. package/hooks/validators/test_files/management/commands/cmd_08_debug_with_and.py +14 -0
  138. package/hooks/validators/test_files/not_management_command.py +10 -0
  139. package/hooks/validators/test_files/skip_decorators/test_01_simple_skip.py +8 -0
  140. package/hooks/validators/test_files/skip_decorators/test_02_pytest_skipif.py +8 -0
  141. package/hooks/validators/test_files/skip_decorators/test_03_unittest_skipIf.py +8 -0
  142. package/hooks/validators/test_files/skip_decorators/test_04_skip_with_parens.py +8 -0
  143. package/hooks/validators/test_files/skip_decorators/test_05_xfail.py +7 -0
  144. package/hooks/validators/test_files/skip_decorators/test_06_custom_skip.py +11 -0
  145. package/hooks/validators/test_files/skip_decorators/test_07_capital_Skip.py +8 -0
  146. package/hooks/validators/test_files/skip_decorators/test_08_skipUnless.py +7 -0
  147. package/hooks/validators/test_files/skip_decorators/test_09_pytest_mark_skip_simple.py +7 -0
  148. package/hooks/validators/test_files/test_async_functions.py +45 -0
  149. package/hooks/validators/test_files/test_purecomponent/PureComponentExample.tsx +7 -0
  150. package/hooks/validators/test_files/test_purecomponent/ReactPureComponentExample.tsx +7 -0
  151. package/hooks/validators/test_git_checks.py +295 -0
  152. package/hooks/validators/test_good.tsx +5 -0
  153. package/hooks/validators/test_health_check.py +57 -0
  154. package/hooks/validators/test_magic_value_checks.py +63 -0
  155. package/hooks/validators/test_mypy_integration.py +27 -0
  156. package/hooks/validators/test_output_formatter.py +150 -0
  157. package/hooks/validators/test_pr_reference_checks.py +41 -0
  158. package/hooks/validators/test_python_antipattern_checks.py +113 -0
  159. package/hooks/validators/test_python_style_checks.py +439 -0
  160. package/hooks/validators/test_react_checks.py +213 -0
  161. package/hooks/validators/test_results.txt +25 -0
  162. package/hooks/validators/test_ruff_integration.py +27 -0
  163. package/hooks/validators/test_run_all_validators.py +228 -0
  164. package/hooks/validators/test_run_all_validators_integration.py +48 -0
  165. package/hooks/validators/test_safety_checks.py +243 -0
  166. package/hooks/validators/test_security_checks.py +105 -0
  167. package/hooks/validators/test_test_safety_checks.py +321 -0
  168. package/hooks/validators/test_todo_checks.py +39 -0
  169. package/hooks/validators/test_type_safety_checks.py +85 -0
  170. package/hooks/validators/test_useless_test_checks.py +55 -0
  171. package/hooks/validators/test_validator_base.py +26 -0
  172. package/hooks/validators/test_verify_paths.py +34 -0
  173. package/hooks/validators/todo_checks.py +59 -0
  174. package/hooks/validators/type_safety_checks.py +101 -0
  175. package/hooks/validators/useless_test_checks.py +92 -0
  176. package/hooks/validators/validator_base.py +19 -0
  177. package/hooks/validators/verify_paths.py +57 -0
  178. package/hooks/workflow/auto-formatter.py +114 -0
  179. package/hooks/workflow/investigation-tracker-reset.py +46 -0
  180. package/package.json +30 -0
  181. package/rules/agent-spawn-protocol.md +47 -0
  182. package/rules/cleanup-temp-files.md +27 -0
  183. package/rules/code-reviews.md +11 -0
  184. package/rules/code-standards.md +43 -0
  185. package/rules/conservative-action.md +20 -0
  186. package/rules/context7.md +12 -0
  187. package/rules/explore-thoroughly.md +27 -0
  188. package/rules/git-workflow.md +42 -0
  189. package/rules/parallel-tools.md +23 -0
  190. package/rules/research-mode.md +23 -0
  191. package/rules/right-sized-engineering.md +28 -0
  192. package/rules/tdd.md +7 -0
  193. package/rules/testing.md +12 -0
  194. package/skills/agent-prompt/SKILL.md +102 -0
  195. package/skills/anthropic-plan/SKILL.md +107 -0
  196. package/skills/everything-search/SKILL.md +144 -0
  197. package/skills/ingest/SKILL.md +40 -0
  198. package/skills/npm-creator/SKILL.md +183 -0
  199. package/skills/pr-review-responder/EXAMPLES.md +590 -0
  200. package/skills/pr-review-responder/PRINCIPLES.md +539 -0
  201. package/skills/pr-review-responder/README.md +209 -0
  202. package/skills/pr-review-responder/SKILL.md +202 -0
  203. package/skills/pr-review-responder/TESTING.md +407 -0
  204. package/skills/pr-review-responder/scripts/respond_to_reviews.py +376 -0
  205. package/skills/pr-review-responder/update_skill.py +297 -0
  206. package/skills/prompt-generator/REFERENCE.md +150 -0
  207. package/skills/prompt-generator/SKILL.md +154 -0
  208. package/skills/readability-review/SKILL.md +127 -0
  209. package/skills/recall/SKILL.md +27 -0
  210. package/skills/remember/SKILL.md +63 -0
  211. package/skills/rule-audit/SKILL.md +307 -0
  212. package/skills/rule-creator/SKILL.md +150 -0
  213. package/skills/skill-writer/REFERENCE.md +246 -0
  214. package/skills/skill-writer/SKILL.md +270 -0
  215. package/skills/tdd-team/SKILL.md +128 -0
@@ -0,0 +1,209 @@
1
+ # PR Review Responder Skill
2
+
3
+ Automatically find and respond to GitHub PR review comments before pushing code.
4
+
5
+ ## What It Does
6
+
7
+ This skill helps you:
8
+ - Detect if your current branch has an open PR
9
+ - Find unresponded review comments from reviewers
10
+ - Match review comments to your recent code changes
11
+ - Draft concise, specific responses (format: `✅ **Fixed**: [what changed]`)
12
+ - Post responses directly to GitHub review comment threads
13
+
14
+ ## When To Use
15
+
16
+ Use this skill:
17
+ - **Before every git push** when addressing PR feedback
18
+ - After committing fixes to reviewer comments
19
+ - When you want to notify reviewers what was addressed
20
+ - To speed up PR review cycles
21
+
22
+ ## Files in This Package
23
+
24
+ - **SKILL.md**: Core instructions and step-by-step workflow for Claude
25
+ - **EXAMPLES.md**: 8 real-world examples with different scenarios
26
+ - **PRINCIPLES.md**: Theory and best practices for PR communication
27
+ - **scripts/respond_to_reviews.py**: Standalone automation script
28
+ - **README.md**: This file
29
+
30
+ ## Quick Start
31
+
32
+ ### Using with Claude
33
+
34
+ ```bash
35
+ # 1. Make changes addressing PR feedback
36
+ git add .
37
+ git commit -m "fix: address PR feedback"
38
+
39
+ # 2. Activate the skill
40
+ "Respond to PR review comments"
41
+
42
+ # 3. Skill finds comments, drafts responses, shows them for approval
43
+ # 4. Confirm and push
44
+ git push
45
+ ```
46
+
47
+ ### Using Standalone Script
48
+
49
+ ```bash
50
+ # Auto-detect PR and respond to comments
51
+ python scripts/respond_to_reviews.py
52
+
53
+ # Specify PR number
54
+ python scripts/respond_to_reviews.py --pr 123
55
+
56
+ # Auto-approve responses (no confirmation)
57
+ python scripts/respond_to_reviews.py --auto-approve
58
+ ```
59
+
60
+ ## Testing
61
+
62
+ Test the skill with these queries:
63
+
64
+ **Should activate**:
65
+ - "Respond to PR review comments"
66
+ - "Reply to code review feedback before pushing"
67
+ - "Find and respond to reviewer comments on my PR"
68
+ - "Post responses to review comments"
69
+
70
+ **Should NOT activate**:
71
+ - "Create a new PR" (different skill)
72
+ - "Review this code" (code review, not response)
73
+ - "What are the PR comments?" (just viewing, not responding)
74
+
75
+ ## Requirements
76
+
77
+ - `gh` CLI installed and authenticated (`gh auth login`)
78
+ - Git repository with GitHub remote
79
+ - Current branch with an open PR
80
+ - Changes committed (not just staged)
81
+ - Python 3.8+ (for standalone script)
82
+
83
+ ## Integration Options
84
+
85
+ ### As Pre-Push Hook
86
+
87
+ Add to `.git/hooks/pre-push`:
88
+ ```bash
89
+ #!/bin/bash
90
+ echo "Checking for PR review comments..."
91
+ python .claude/skills/pr-review-responder/scripts/respond_to_reviews.py
92
+ ```
93
+
94
+ ### As Slash Command
95
+
96
+ Add to `.claude/settings.json`:
97
+ ```json
98
+ {
99
+ "commands": {
100
+ "/respond": "Use pr-review-responder skill to respond to PR comments"
101
+ }
102
+ }
103
+ ```
104
+
105
+ Usage: `/respond`
106
+
107
+ ### As npm Script
108
+
109
+ Add to `package.json`:
110
+ ```json
111
+ {
112
+ "scripts": {
113
+ "respond": "python .claude/skills/pr-review-responder/scripts/respond_to_reviews.py"
114
+ }
115
+ }
116
+ ```
117
+
118
+ Usage: `npm run respond`
119
+
120
+ ## Example Response Format
121
+
122
+ ```
123
+ ✅ **Fixed**: Removed wrapper class, using Path().read_bytes() directly
124
+ ✅ **Fixed**: Extracted upload logic to storage.upload_file()
125
+ ✅ **Fixed**: Moved animation timing from Python context to CSS
126
+ ✅ **Fixed**: Added type hints (int, str, Optional[Dict])
127
+ 📝 **Noted**: Will refactor to service layer in separate PR
128
+ ```
129
+
130
+ ## Troubleshooting
131
+
132
+ **"No PR found for this branch"**:
133
+ - Create PR first: `gh pr create`
134
+ - Or specify PR: `--pr NUMBER`
135
+
136
+ **"No review comments found"**:
137
+ - PR might not have reviews yet
138
+ - Or all comments already responded to
139
+
140
+ **"Permission denied"**:
141
+ - Run: `gh auth refresh -h github.com -s repo`
142
+ - Ensure write access to repository
143
+
144
+ **"Cannot find matching changes"**:
145
+ - Review comments don't match files you modified
146
+ - Check that you committed the changes
147
+ - Comments might be on different files
148
+
149
+ ## Best Practices
150
+
151
+ 1. **Run before every push** - Make it part of your workflow
152
+ 2. **Be specific** - Say what changed, not just "fixed"
153
+ 3. **One response per comment** - Don't combine
154
+ 4. **Acknowledge good catches** - "Good catch! Fixed by..."
155
+ 5. **Keep it concise** - One sentence maximum
156
+
157
+ ## Advanced Usage
158
+
159
+ See [EXAMPLES.md](EXAMPLES.md) for:
160
+ - Multiple commits addressing different comments
161
+ - Partial addressing (some comments fixed, some deferred)
162
+ - Handling conversation threads
163
+ - Custom response editing
164
+
165
+ See [PRINCIPLES.md](PRINCIPLES.md) for:
166
+ - Theory on PR communication
167
+ - Anti-patterns to avoid
168
+ - Cultural context for different teams
169
+ - Psychology of review responses
170
+
171
+ ## Maintenance
172
+
173
+ **Updating the skill**:
174
+ 1. Modify SKILL.md for instruction changes
175
+ 2. Add examples to EXAMPLES.md
176
+ 3. Update principles in PRINCIPLES.md
177
+ 4. Restart Claude Code to reload
178
+
179
+ **Testing changes**:
180
+ ```bash
181
+ # Test skill activation
182
+ "Respond to PR review comments"
183
+
184
+ # Test standalone script
185
+ python scripts/respond_to_reviews.py --help
186
+ ```
187
+
188
+ ## Version History
189
+
190
+ **v1.0.0** (2025-01-14):
191
+ - Initial release
192
+ - Support for inline code review comments
193
+ - Auto-detection of current PR
194
+ - Matching changes to comments
195
+ - Drafting responses with standard format
196
+ - Posting via GitHub API
197
+ - Standalone Python script
198
+
199
+ ## Contributing
200
+
201
+ To improve this skill:
202
+ 1. Add new examples to EXAMPLES.md
203
+ 2. Document anti-patterns in PRINCIPLES.md
204
+ 3. Enhance matching logic in scripts/respond_to_reviews.py
205
+ 4. Test with various PR scenarios
206
+
207
+ ## License
208
+
209
+ Part of the Claude Code skills library.
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: pr-review-responder
3
+ description: MANDATORY systematic protocol for responding to GitHub PR review comments. Use when addressing PR feedback, code review comments, or before pushing PR fixes. Triggers on "address feedback", "fix review comments", "respond to code review", "handle PR feedback", "reply to reviewer".
4
+ ---
5
+ @~/.claude/skills/pr-review-responder/EXAMPLES.md
6
+ @~/.claude/skills/pr-review-responder/PRINCIPLES.md
7
+
8
+ <EXTREMELY_IMPORTANT>
9
+ # PR Review Responder
10
+
11
+ **This skill is MANDATORY when responding to PR review comments.**
12
+
13
+ IF you are addressing PR review feedback, YOU DO NOT HAVE A CHOICE. YOU MUST FOLLOW THIS PROTOCOL.
14
+
15
+ **Why this matters:** A typical multi-commit PR with many review comments is easy to fumble. Missing even one comment forces another review round.
16
+
17
+ ## MANDATORY FIRST RESPONSE PROTOCOL
18
+
19
+ Before doing ANYTHING:
20
+
21
+ 1. [ ] Fetch ALL review comments with `per_page=100` pagination
22
+ 2. [ ] Create TodoWrite checklist with ONE item per comment
23
+ 3. [ ] Fix comments ONE AT A TIME, marking complete as you go
24
+ 4. [ ] Draft reply for EVERY comment (DO NOT post directly)
25
+ 5. [ ] Create ONE review fix commit (DO NOT squash with original)
26
+ 6. [ ] Run pre-push-review skill before pushing
27
+ 7. [ ] Verify ALL draft replies are prepared
28
+
29
+ **Responding WITHOUT completing this checklist = automatic failure.**
30
+
31
+ ## Critical Rules - NO EXCEPTIONS
32
+
33
+ ### Rule 1: Fetch ALL Comments First
34
+
35
+ **NEVER start fixing without fetching every comment.**
36
+
37
+ - [ ] FORBIDDEN: Assuming you know what the comments say
38
+ - [ ] FORBIDDEN: Using default pagination (30 results, causes missed comments)
39
+ - [x] REQUIRED: `gh api repos/{owner}/{repo}/pulls/{pr_number}/comments?per_page=100`
40
+ - [x] REQUIRED: Check for additional pages if 100+ comments
41
+
42
+ **WHY:** Missing comments forces extra review rounds. Default pagination (30) silently drops comments.
43
+
44
+ ### Rule 2: TodoWrite Checklist Before Any Fixes
45
+
46
+ **NEVER make fixes without a checklist.**
47
+
48
+ - [ ] FORBIDDEN: Fixing comments as you read them
49
+ - [ ] FORBIDDEN: Bulk-updating todos after fixing multiple items
50
+ - [x] REQUIRED: Create TodoWrite with one item per comment BEFORE any fix
51
+ - [x] REQUIRED: Include BOTH fix items AND reply items
52
+
53
+ **WHY:** Without a checklist, you WILL miss comments.
54
+
55
+ Example checklist:
56
+ ```
57
+ - [ ] Fix: src/views.py:45 - Use shared upload function
58
+ - [ ] Fix: src/models.py:23 - Rename user_name to display_name
59
+ - [ ] Reply: src/views.py:45 - Post inline response
60
+ - [ ] Reply: src/models.py:23 - Post inline response
61
+ ```
62
+
63
+ ### Rule 3: Fix Systematically
64
+
65
+ **NEVER skip ahead or bulk-update.**
66
+
67
+ For each comment in TodoWrite:
68
+ 1. Read the comment
69
+ 2. Make the fix
70
+ 3. Mark todo item complete: `[x]`
71
+ 4. Verify fix addresses comment
72
+ 5. Move to next comment
73
+
74
+ ### Rule 4: Draft Replies for User Review
75
+
76
+ **NEVER post comments directly. Draft them for user to review and post.**
77
+
78
+ Format each draft reply:
79
+ ```
80
+ DRAFT REPLIES (for user to post):
81
+ ================================
82
+
83
+ Comment #1 (file.py:45 - "description"):
84
+ Reply: Fixed: [specific description of what was changed]
85
+
86
+ Comment #2 (file.py:67 - "description"):
87
+ Reply: Fixed: [specific description of what was changed]
88
+ ```
89
+
90
+ **Reply quality rules:**
91
+ - Concise: One sentence maximum
92
+ - Specific: Say WHAT changed, not just "fixed"
93
+ - Actionable: Reviewer can verify the fix
94
+
95
+ ### Rule 5: Separate Review Fix Commit
96
+
97
+ **NEVER squash review fixes into the original commit.**
98
+
99
+ - [ ] FORBIDDEN: Amending the original commit with review fixes
100
+ - [ ] FORBIDDEN: Multiple fix commits for the same review round
101
+ - [x] REQUIRED: ONE new commit for all review fixes from this round
102
+
103
+ **WHY:** Squashing shows the ENTIRE feature as new on GitHub instead of just the delta. Keeping commits separate lets the reviewer click the second commit to see exactly what changed.
104
+
105
+ ```bash
106
+ git add [files]
107
+ git commit -m "fix: address code review feedback
108
+
109
+ - Fixed: [specific change 1]
110
+ - Fixed: [specific change 2]
111
+
112
+ Addresses review comments from PR #{number}"
113
+ ```
114
+
115
+ ### Rule 6: Run Pre-Push Review
116
+
117
+ **NEVER push without running pre-push-review skill.**
118
+
119
+ - [ ] FORBIDDEN: Pushing without pre-push-review
120
+ - [ ] FORBIDDEN: Manually handling draft conversion
121
+ - [x] REQUIRED: Invoke pre-push-review skill which handles all 24 checks + draft conversion
122
+
123
+ **WHY:** Pre-push-review catches ALL patterns reviewers flag: code style, draft status, commit structure. Delegating to it ensures nothing is missed.
124
+
125
+ ### Rule 7: Verify All Drafts Complete
126
+
127
+ **NEVER declare success without matching draft count to comment count.**
128
+
129
+ - Count of drafts must match count of comments
130
+ - Each draft must reference a specific fix
131
+ - Present drafts in clear format for user to copy
132
+
133
+ ## Common Rationalizations That Mean You're About To Fail
134
+
135
+ - **"I know what the comments say, no need to fetch"** -> WRONG. Missing comments forces extra review rounds.
136
+ - **"Let me fix this one quickly before making the checklist"** -> WRONG. Without checklist you will miss others.
137
+ - **"I'll post the replies myself to save time"** -> WRONG. User controls what gets posted.
138
+ - **"This is a small fix, I can squash it"** -> WRONG. Squashing hides the delta from reviewers.
139
+ - **"Pre-push review is overkill for review fixes"** -> WRONG. It catches style issues you introduced while fixing.
140
+
141
+ </EXTREMELY_IMPORTANT>
142
+
143
+ ---
144
+
145
+ ## Final Report Format
146
+
147
+ Only after ALL validations pass:
148
+
149
+ ```
150
+ PR Review Response Complete
151
+
152
+ Fetched: {X} comments (with per_page=100)
153
+ Fixed: {X} issues
154
+ Pre-push review: PASSED (all 24 checks)
155
+ Draft replies: {X} prepared for user
156
+ Commits: 2 (original + review fix, NOT squashed)
157
+
158
+ TodoWrite checklist: 100% complete
159
+
160
+ DRAFT REPLIES FOR USER TO POST:
161
+ ================================
162
+ [List all draft replies here]
163
+
164
+ PR #{number}: {url}
165
+
166
+ Ready to push!
167
+ ```
168
+
169
+ ## Edge Cases
170
+
171
+ **No review comments found:**
172
+ Report with verification that per_page=100 was used.
173
+
174
+ **Comments but no matching changes:**
175
+ List the comments and their file locations, ask if fixes were forgotten.
176
+
177
+ **PR already merged:**
178
+ Cannot add review responses to merged PRs. Report error.
179
+
180
+ ## Response Format Rules
181
+
182
+ **Good replies:**
183
+ - Fixed: Removed wrapper function, using direct storage.upload_file()
184
+ - Fixed: Extracted shared logic to utils/view_helpers.py
185
+ - Fixed: Renamed user_name to display_name to avoid User.username conflict
186
+ - Noted: Will handle in separate PR to avoid scope creep
187
+
188
+ **Bad replies:**
189
+ - "Fixed" (not specific)
190
+ - "Done" (lazy)
191
+ - "Addressed your comment" (tells reviewer nothing)
192
+
193
+ ## Requirements
194
+
195
+ - `gh` CLI installed and authenticated
196
+ - Current branch must have an open PR
197
+ - Git repository with remote on GitHub
198
+ - Write access to repository
199
+
200
+ ## Remember
201
+
202
+ This protocol prevents repeated review failures. Being systematic is NOT optional. Missing even ONE comment wastes everyone's time.