claude-dev-env 1.93.0 → 1.94.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 (220) hide show
  1. package/_shared/pr-loop/CLAUDE.md +1 -0
  2. package/_shared/pr-loop/audit-contract.md +1 -1
  3. package/_shared/pr-loop/gh-payloads.md +3 -3
  4. package/_shared/pr-loop/post-audit-thread-contract.md +51 -0
  5. package/_shared/pr-loop/scripts/README.md +2 -2
  6. package/_shared/pr-loop/scripts/code_rules_gate.py +127 -13
  7. package/_shared/pr-loop/scripts/fix_hookspath.py +47 -12
  8. package/_shared/pr-loop/scripts/pr_loop_shared_constants/code_rules_gate_constants.py +4 -0
  9. package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +146 -69
  10. package/_shared/pr-loop/scripts/tests/test_fix_hookspath.py +497 -374
  11. package/_shared/pr-loop/state-schema.md +3 -22
  12. package/bin/CLAUDE.md +1 -1
  13. package/bin/install.mjs +2 -7
  14. package/bin/install.test.mjs +10 -4
  15. package/hooks/blocking/CLAUDE.md +2 -0
  16. package/hooks/blocking/pii_commit_command.py +398 -0
  17. package/hooks/blocking/pii_payload_scan.py +133 -0
  18. package/hooks/blocking/pii_prevention_blocker.py +151 -449
  19. package/hooks/blocking/pii_scanner.py +26 -1
  20. package/hooks/blocking/test_code_rules_enforcer_dead_config_field.py +2 -2
  21. package/hooks/blocking/test_pii_prevention_blocker.py +299 -0
  22. package/hooks/blocking/test_pii_scanner.py +27 -2
  23. package/hooks/blocking/test_verdict_directory_write_blocker.py +42 -7
  24. package/hooks/hooks_constants/CLAUDE.md +2 -2
  25. package/hooks/hooks_constants/code_rules_path_utils_constants.py +0 -2
  26. package/hooks/hooks_constants/local_identity.py +65 -15
  27. package/hooks/hooks_constants/pii_prevention_constants.py +20 -8
  28. package/hooks/hooks_constants/pr_description_enforcer_constants.py +1 -1
  29. package/hooks/hooks_constants/test_local_identity.py +68 -0
  30. package/package.json +1 -1
  31. package/scripts/CLAUDE.md +10 -1
  32. package/scripts/Get-SessionAccount.ps1 +210 -0
  33. package/scripts/tests/CLAUDE.md +15 -1
  34. package/scripts/tests/Get-SessionAccount.Tests.ps1 +350 -0
  35. package/skills/CLAUDE.md +3 -25
  36. package/skills/anthropic-plan/SKILL.md +1 -13
  37. package/skills/autoconverge/CLAUDE.md +5 -2
  38. package/skills/autoconverge/SKILL.md +112 -387
  39. package/skills/autoconverge/reference/CLAUDE.md +4 -1
  40. package/skills/autoconverge/reference/closing-report.md +9 -2
  41. package/skills/autoconverge/reference/convergence.md +26 -22
  42. package/skills/autoconverge/reference/headless-safety.md +44 -0
  43. package/skills/autoconverge/reference/multi-pr.md +88 -0
  44. package/skills/autoconverge/reference/self-closing-loop.md +84 -0
  45. package/skills/autoconverge/reference/stop-conditions.md +21 -13
  46. package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +87 -27
  47. package/skills/autoconverge/workflow/converge.contract.test.mjs +40 -10
  48. package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +179 -47
  49. package/skills/autoconverge/workflow/converge.fix-progress.test.mjs +1 -1
  50. package/skills/autoconverge/workflow/converge.mjs +284 -94
  51. package/skills/bugteam/CLAUDE.md +1 -1
  52. package/skills/bugteam/CONSTRAINTS.md +3 -3
  53. package/skills/bugteam/PROMPTS.md +8 -19
  54. package/skills/bugteam/SKILL.md +13 -14
  55. package/skills/bugteam/reference/CLAUDE.md +1 -1
  56. package/skills/bugteam/reference/audit-and-teammates.md +2 -2
  57. package/skills/bugteam/reference/copilot-gap-analysis.md +2 -0
  58. package/skills/bugteam/reference/github-pr-reviews.md +56 -38
  59. package/skills/bugteam/reference/team-setup.md +11 -11
  60. package/skills/bugteam/scripts/CLAUDE.md +6 -6
  61. package/skills/bugteam/scripts/README.md +20 -8
  62. package/skills/bugteam/scripts/bugteam_code_rules_gate.py +13 -1463
  63. package/skills/bugteam/scripts/bugteam_fix_hookspath.py +23 -358
  64. package/skills/bugteam/scripts/bugteam_preflight.py +13 -315
  65. package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +2 -3
  66. package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +34 -1053
  67. package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +30 -347
  68. package/skills/bugteam/scripts/test_bugteam_preflight.py +30 -305
  69. package/skills/copilot-finding-triage/SKILL.md +80 -28
  70. package/skills/copilot-finding-triage/reference/tier-rubric.md +70 -11
  71. package/skills/copilot-finding-triage/templates/notification.md +8 -3
  72. package/skills/everything-search/SKILL.md +1 -2
  73. package/skills/grokify/SKILL.md +58 -0
  74. package/skills/grokify/templates/handoff-template.md +92 -0
  75. package/skills/orchestrator/SKILL.md +12 -8
  76. package/skills/orchestrator-refresh/SKILL.md +3 -3
  77. package/skills/pr-converge/SKILL.md +132 -233
  78. package/skills/pr-converge/reference/convergence-gates.md +102 -66
  79. package/skills/pr-converge/reference/examples.md +37 -25
  80. package/skills/pr-converge/reference/fix-protocol.md +7 -7
  81. package/skills/pr-converge/reference/multi-pr-orchestration.md +10 -4
  82. package/skills/pr-converge/reference/per-tick.md +64 -41
  83. package/skills/pr-converge/reference/state-schema.md +27 -2
  84. package/skills/pr-converge/scripts/CLAUDE.md +8 -0
  85. package/skills/pr-converge/scripts/README.md +4 -3
  86. package/skills/pr-converge/scripts/_pr_converge_path_setup.py +23 -0
  87. package/skills/pr-converge/scripts/check_convergence.py +189 -645
  88. package/skills/pr-converge/scripts/check_convergence_gates.py +235 -0
  89. package/skills/pr-converge/scripts/check_convergence_thread_gates.py +219 -0
  90. package/skills/pr-converge/scripts/conftest.py +8 -0
  91. package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -0
  92. package/skills/pr-converge/scripts/pr_converge_scripts_constants/convergence_gate_constants.py +36 -0
  93. package/skills/pr-converge/scripts/test__pr_converge_path_setup.py +26 -0
  94. package/skills/pr-converge/scripts/test_check_convergence.py +73 -228
  95. package/skills/pr-converge/scripts/test_check_convergence_contract.py +321 -0
  96. package/skills/pr-converge/scripts/test_check_convergence_gates.py +68 -0
  97. package/skills/pr-converge/scripts/test_check_convergence_thread_gates.py +75 -0
  98. package/skills/privacy-hygiene/SKILL.md +8 -7
  99. package/skills/reviewer-gates/SKILL.md +26 -8
  100. package/skills/session-log/SKILL.md +11 -12
  101. package/skills/session-tidy/SKILL.md +40 -30
  102. package/skills/skill-builder/CLAUDE.md +13 -10
  103. package/skills/skill-builder/SKILL.md +31 -31
  104. package/skills/skill-builder/references/CLAUDE.md +10 -6
  105. package/skills/skill-builder/references/delegation-map.md +13 -4
  106. package/skills/skill-builder/references/description-field.md +113 -0
  107. package/skills/skill-builder/references/self-audit-checklist.md +21 -4
  108. package/skills/skill-builder/references/skill-modularity.md +113 -0
  109. package/skills/skill-builder/references/skill-types.md +4 -0
  110. package/skills/skill-builder/templates/CLAUDE.md +4 -4
  111. package/skills/skill-builder/templates/gap-analysis.md +25 -1
  112. package/skills/skill-builder/workflows/CLAUDE.md +6 -4
  113. package/skills/skill-builder/workflows/improve-skill.md +17 -16
  114. package/skills/skill-builder/workflows/new-skill.md +34 -10
  115. package/skills/skill-builder/workflows/polish-skill.md +59 -43
  116. package/skills/usage-pause/SKILL.md +10 -14
  117. package/skills/bdd-protocol/CLAUDE.md +0 -26
  118. package/skills/bdd-protocol/SKILL.md +0 -30
  119. package/skills/bdd-protocol/references/CLAUDE.md +0 -10
  120. package/skills/bdd-protocol/references/anti-patterns.md +0 -26
  121. package/skills/bdd-protocol/references/example-mapping.md +0 -23
  122. package/skills/bg-agent/CLAUDE.md +0 -17
  123. package/skills/bg-agent/SKILL.md +0 -69
  124. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_code_rules_gate_constants.py +0 -55
  125. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_fix_hookspath_constants.py +0 -26
  126. package/skills/bugteam/scripts/bugteam_scripts_constants/bugteam_preflight_constants.py +0 -35
  127. package/skills/caveman/CLAUDE.md +0 -15
  128. package/skills/caveman/SKILL.md +0 -38
  129. package/skills/code/CLAUDE.md +0 -17
  130. package/skills/code/SKILL.md +0 -178
  131. package/skills/deep-research/CLAUDE.md +0 -17
  132. package/skills/deep-research/SKILL.md +0 -80
  133. package/skills/findbugs/CLAUDE.md +0 -20
  134. package/skills/findbugs/SKILL.md +0 -241
  135. package/skills/fixbugs/CLAUDE.md +0 -19
  136. package/skills/fixbugs/SKILL.md +0 -142
  137. package/skills/gh-paginate/CLAUDE.md +0 -18
  138. package/skills/gh-paginate/SKILL.md +0 -84
  139. package/skills/gotcha/CLAUDE.md +0 -33
  140. package/skills/gotcha/SKILL.md +0 -73
  141. package/skills/implement/CLAUDE.md +0 -27
  142. package/skills/implement/SKILL.md +0 -66
  143. package/skills/implement/scripts/CLAUDE.md +0 -22
  144. package/skills/implement/scripts/append_note.py +0 -133
  145. package/skills/implement/scripts/implement_scripts_constants/CLAUDE.md +0 -22
  146. package/skills/implement/scripts/implement_scripts_constants/__init__.py +0 -0
  147. package/skills/implement/scripts/implement_scripts_constants/notes_constants.py +0 -12
  148. package/skills/implement/scripts/test_append_note.py +0 -191
  149. package/skills/log-audit/CLAUDE.md +0 -20
  150. package/skills/log-audit/SKILL.md +0 -66
  151. package/skills/log-audit/reference/CLAUDE.md +0 -9
  152. package/skills/log-audit/reference/charter.md +0 -52
  153. package/skills/log-audit/scripts/CLAUDE.md +0 -27
  154. package/skills/log-audit/scripts/cluster_recurrences.py +0 -261
  155. package/skills/log-audit/scripts/collect_log_window.py +0 -199
  156. package/skills/log-audit/scripts/log_audit_constants/CLAUDE.md +0 -12
  157. package/skills/log-audit/scripts/log_audit_constants/__init__.py +0 -0
  158. package/skills/log-audit/scripts/log_audit_constants/cluster_recurrences_constants.py +0 -23
  159. package/skills/log-audit/scripts/log_audit_constants/collect_log_window_constants.py +0 -24
  160. package/skills/log-audit/scripts/log_audit_constants/mine_copilot_findings_constants.py +0 -49
  161. package/skills/log-audit/scripts/mine_copilot_findings.py +0 -302
  162. package/skills/log-audit/scripts/test_cluster_recurrences.py +0 -160
  163. package/skills/log-audit/scripts/test_collect_log_window.py +0 -111
  164. package/skills/log-audit/scripts/test_mine_copilot_findings.py +0 -126
  165. package/skills/logifix/CLAUDE.md +0 -36
  166. package/skills/logifix/SKILL.md +0 -69
  167. package/skills/logifix/scripts/CLAUDE.md +0 -16
  168. package/skills/logifix/scripts/logifix.ps1 +0 -205
  169. package/skills/monitor-open-prs/CLAUDE.md +0 -34
  170. package/skills/monitor-open-prs/SKILL.md +0 -88
  171. package/skills/monitor-open-prs/scripts/CLAUDE.md +0 -17
  172. package/skills/monitor-open-prs/scripts/discover_open_prs.py +0 -69
  173. package/skills/monitor-open-prs/scripts/test_discover_open_prs.py +0 -149
  174. package/skills/monitor-open-prs/test_skill_contract.py +0 -27
  175. package/skills/post-audit-findings/SKILL.md +0 -80
  176. package/skills/pr-consistency-audit/CLAUDE.md +0 -34
  177. package/skills/pr-consistency-audit/SKILL.md +0 -116
  178. package/skills/pr-consistency-audit/reference/CLAUDE.md +0 -16
  179. package/skills/pr-consistency-audit/reference/detection-rules.md +0 -96
  180. package/skills/pr-consistency-audit/reference/illustrations.md +0 -78
  181. package/skills/pr-fix-protocol/SKILL.md +0 -65
  182. package/skills/pr-review-responder/CLAUDE.md +0 -35
  183. package/skills/pr-review-responder/EXAMPLES.md +0 -590
  184. package/skills/pr-review-responder/PRINCIPLES.md +0 -533
  185. package/skills/pr-review-responder/README.md +0 -168
  186. package/skills/pr-review-responder/SKILL.md +0 -203
  187. package/skills/pr-review-responder/TESTING.md +0 -350
  188. package/skills/pr-scope-resolve/SKILL.md +0 -45
  189. package/skills/pre-compact/CLAUDE.md +0 -24
  190. package/skills/pre-compact/SKILL.md +0 -134
  191. package/skills/qbug/CLAUDE.md +0 -40
  192. package/skills/qbug/SKILL.md +0 -387
  193. package/skills/qbug/test_qbug_skill_audit_schema.py +0 -152
  194. package/skills/qbug/test_qbug_skill_post_fix_audit.py +0 -103
  195. package/skills/refine/CLAUDE.md +0 -44
  196. package/skills/refine/SKILL.md +0 -262
  197. package/skills/refine/templates/CLAUDE.md +0 -17
  198. package/skills/refine/templates/implementation-notes-template.html +0 -56
  199. package/skills/refine/templates/plan-template.md +0 -60
  200. package/skills/research-mode/CLAUDE.md +0 -35
  201. package/skills/research-mode/SKILL.md +0 -53
  202. package/skills/structure-prompt/CLAUDE.md +0 -42
  203. package/skills/structure-prompt/SKILL.md +0 -44
  204. package/skills/structure-prompt/reference/CLAUDE.md +0 -28
  205. package/skills/structure-prompt/reference/adversarial-tuning.md +0 -62
  206. package/skills/structure-prompt/reference/block-classification.md +0 -27
  207. package/skills/structure-prompt/reference/canonical-case.md +0 -48
  208. package/skills/structure-prompt/reference/citation-depth.md +0 -70
  209. package/skills/structure-prompt/reference/cleanup.md +0 -33
  210. package/skills/structure-prompt/reference/constraints.md +0 -33
  211. package/skills/structure-prompt/reference/directives.md +0 -37
  212. package/skills/structure-prompt/reference/examples.md +0 -72
  213. package/skills/structure-prompt/reference/instantiation.md +0 -51
  214. package/skills/structure-prompt/reference/output-contract.md +0 -72
  215. package/skills/structure-prompt/reference/per-category.md +0 -23
  216. package/skills/structure-prompt/reference/persona.md +0 -38
  217. package/skills/structure-prompt/reference/research.md +0 -33
  218. package/skills/structure-prompt/reference/structure.md +0 -28
  219. package/skills/verified-build/CLAUDE.md +0 -33
  220. package/skills/verified-build/SKILL.md +0 -33
@@ -1,203 +0,0 @@
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. [ ] Push — the git pre-push hook (installed via `npx claude-dev-env`) runs automatically
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: `pull_request_read(method="get_review_comments", pullNumber={pr_number}, owner="{owner}", repo="{repo}")`
40
-
41
- **WHY:** Missing comments forces extra review rounds. Default pagination (30) silently drops comments.
42
-
43
- ### Rule 2: TodoWrite Checklist Before Any Fixes
44
-
45
- **NEVER make fixes without a checklist.**
46
-
47
- - [ ] FORBIDDEN: Fixing comments as you read them
48
- - [ ] FORBIDDEN: Bulk-updating todos after fixing multiple items
49
- - [x] REQUIRED: Create TodoWrite with one item per comment BEFORE any fix
50
- - [x] REQUIRED: Include BOTH fix items AND reply items
51
-
52
- **WHY:** Without a checklist, you WILL miss comments.
53
-
54
- Example checklist:
55
- ```
56
- - [ ] Fix: src/views.py:45 - Use shared upload function
57
- - [ ] Fix: src/models.py:23 - Rename user_name to display_name
58
- - [ ] Reply: src/views.py:45 - Post inline response
59
- - [ ] Reply: src/models.py:23 - Post inline response
60
- ```
61
-
62
- ### Rule 3: Fix Systematically
63
-
64
- **NEVER skip ahead or bulk-update.**
65
-
66
- For each comment in TodoWrite:
67
- 1. Read the comment
68
- 2. Make the fix
69
- 3. Mark todo item complete: `[x]`
70
- 4. Verify fix addresses comment
71
- 5. Move to next comment
72
-
73
- ### Rule 4: Draft Replies for User Review
74
-
75
- **NEVER post comments directly. Draft them for user to review and post.**
76
-
77
- Format each draft reply:
78
- ```
79
- DRAFT REPLIES (for user to post):
80
- ================================
81
-
82
- Comment #1 (file.py:45 - "description"):
83
- Reply: Fixed: [specific description of what was changed]
84
-
85
- Comment #2 (file.py:67 - "description"):
86
- Reply: Fixed: [specific description of what was changed]
87
- ```
88
-
89
- **Reply quality rules:**
90
- - Concise: One sentence maximum
91
- - Specific: Say WHAT changed, not just "fixed"
92
- - Actionable: Reviewer can verify the fix
93
-
94
- ### Rule 5: Separate Review Fix Commit
95
-
96
- **NEVER squash review fixes into the original commit.**
97
-
98
- - [ ] FORBIDDEN: Amending the original commit with review fixes
99
- - [ ] FORBIDDEN: Multiple fix commits for the same review round
100
- - [x] REQUIRED: ONE new commit for all review fixes from this round
101
-
102
- **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.
103
-
104
- ```bash
105
- git add [files]
106
- git commit -m "fix: address code review feedback
107
-
108
- - Fixed: [specific change 1]
109
- - Fixed: [specific change 2]
110
-
111
- Addresses review comments from PR #{number}"
112
- ```
113
-
114
- ### Rule 6: Pre-Push Gate Fires Automatically
115
-
116
- **The git pre-push hook (installed via `npx claude-dev-env`) runs automatically on every `git push`.** It covers lint, magic values, boolean naming, imports, and all code-rules enforcer checks — no manual invocation needed.
117
-
118
- - [ ] FORBIDDEN: Pushing without gate passing
119
- - [ ] FORBIDDEN: Manually handling draft conversion
120
- - [x] REQUIRED: Run `git push`; the pre-push hook fires and blocks if any check fails
121
-
122
- Use `/qbug` only when you want a full multi-loop PR audit with subagents after the PR is open — it is NOT a substitute for the pre-push gate and refuses when no PR exists yet.
123
-
124
- **WHY:** The pre-push hook catches ALL patterns reviewers flag: code style, draft status, commit structure. It fires automatically so nothing is missed.
125
-
126
- ### Rule 7: Verify All Drafts Complete
127
-
128
- **NEVER declare success without matching draft count to comment count.**
129
-
130
- - Count of drafts must match count of comments
131
- - Each draft must reference a specific fix
132
- - Present drafts in clear format for user to copy
133
-
134
- ## Common Rationalizations That Mean You're About To Fail
135
-
136
- - **"I know what the comments say, no need to fetch"** -> WRONG. Missing comments forces extra review rounds.
137
- - **"Let me fix this one quickly before making the checklist"** -> WRONG. Without checklist you will miss others.
138
- - **"I'll post the replies myself to save time"** -> WRONG. User controls what gets posted.
139
- - **"This is a small fix, I can squash it"** -> WRONG. Squashing hides the delta from reviewers.
140
- - **"Pre-push review is overkill for review fixes"** -> WRONG. The git pre-push hook catches style issues you introduced while fixing; it fires automatically on every push.
141
-
142
- </EXTREMELY_IMPORTANT>
143
-
144
- ---
145
-
146
- ## Final Report Format
147
-
148
- Only after ALL validations pass:
149
-
150
- ```
151
- PR Review Response Complete
152
-
153
- Fetched: {X} comments (with per_page=100)
154
- Fixed: {X} issues
155
- Pre-push hook: PASSED (fired automatically on git push)
156
- Draft replies: {X} prepared for user
157
- Commits: 2 (original + review fix, NOT squashed)
158
-
159
- TodoWrite checklist: 100% complete
160
-
161
- DRAFT REPLIES FOR USER TO POST:
162
- ================================
163
- [List all draft replies here]
164
-
165
- PR #{number}: {url}
166
-
167
- Ready to push!
168
- ```
169
-
170
- ## Edge Cases
171
-
172
- **No review comments found:**
173
- Report with verification that per_page=100 was used.
174
-
175
- **Comments but no matching changes:**
176
- List the comments and their file locations, ask if fixes were forgotten.
177
-
178
- **PR already merged:**
179
- Cannot add review responses to merged PRs. Report error.
180
-
181
- ## Response Format Rules
182
-
183
- **Good replies:**
184
- - Fixed: Removed wrapper function, using direct storage.upload_file()
185
- - Fixed: Extracted shared logic to utils/view_helpers.py
186
- - Fixed: Renamed user_name to display_name to avoid User.username conflict
187
- - Noted: Will handle in separate PR to avoid scope creep
188
-
189
- **Bad replies:**
190
- - "Fixed" (not specific)
191
- - "Done" (lazy)
192
- - "Addressed your comment" (tells reviewer nothing)
193
-
194
- ## Requirements
195
-
196
- - GitHub MCP server (`plugin:github:github`) authenticated
197
- - Current branch must have an open PR
198
- - Git repository with remote on GitHub
199
- - Write access to repository
200
-
201
- ## Remember
202
-
203
- This protocol prevents repeated review failures. Being systematic is NOT optional. Missing even ONE comment wastes everyone's time.
@@ -1,350 +0,0 @@
1
- # Testing the PR Review Responder Skill
2
-
3
- This document provides testing instructions and expected behavior.
4
-
5
- ## Skill Activation Tests
6
-
7
- ### Should Activate (Expected Triggers)
8
-
9
- Test these queries - skill SHOULD activate:
10
-
11
- 1. **Direct requests**:
12
- - "Respond to PR review comments"
13
- - "Reply to code review feedback"
14
- - "Post responses to reviewer comments"
15
- - "Answer PR review comments before pushing"
16
-
17
- 2. **Workflow mentions**:
18
- - "Before I push, respond to PR comments"
19
- - "I need to respond to review feedback"
20
- - "Help me reply to the PR reviewer"
21
-
22
- 3. **Context mentions**:
23
- - "Address PR feedback and respond to comments"
24
- - "Notify reviewers what I fixed"
25
- - "Post review responses before pushing"
26
-
27
- ### Should NOT Activate (False Positives to Avoid)
28
-
29
- These queries should NOT activate the skill:
30
-
31
- 1. **Different operations**:
32
- - "Create a new PR" → different skill
33
- - "Review this code" → code review skill
34
- - "What do the PR comments say?" → just viewing
35
- - "How do I respond to reviews?" → asking how, not doing
36
-
37
- 2. **Reading/viewing**:
38
- - "Show me PR comments"
39
- - "What feedback did I get?"
40
- - "Read the review comments"
41
-
42
- 3. **Other PR operations**:
43
- - "Merge the PR"
44
- - "Update PR description"
45
- - "Add reviewer to PR"
46
-
47
- ## Functional Tests
48
-
49
- ### Test 1: Happy Path (with PR and comments)
50
-
51
- **Setup**:
52
- ```bash
53
- # Create test PR with review comments
54
- gh pr create --title "Test PR" --body "Testing"
55
- # Have someone leave review comments
56
- # Make changes addressing comments
57
- git add .
58
- git commit -m "fix: address feedback"
59
- ```
60
-
61
- **Test**:
62
- ```
63
- "Respond to PR review comments"
64
- ```
65
-
66
- **Expected behavior**:
67
- 1. Detects PR #N
68
- 2. Finds review comments
69
- 3. Matches comments to changes
70
- 4. Drafts responses
71
- 5. Shows responses for approval
72
- 6. Posts to GitHub after confirmation
73
-
74
- **Validation**:
75
- - Check GitHub PR for posted responses
76
- - Verify response format: `✅ **Fixed**: [description]`
77
- - Confirm responses are on correct comment threads
78
-
79
- ### Test 2: No PR for Branch
80
-
81
- **Setup**:
82
- ```bash
83
- git checkout -b new-feature
84
- # Don't create PR
85
- git commit -m "add feature"
86
- ```
87
-
88
- **Test**:
89
- ```
90
- "Respond to PR review comments"
91
- ```
92
-
93
- **Expected behavior**:
94
- 1. Checks for PR
95
- 2. Finds no PR
96
- 3. Informs user: "No PR found for this branch"
97
- 4. Suggests creating PR first
98
- 5. Exits gracefully
99
-
100
- **Validation**:
101
- - No errors thrown
102
- - Clear message to user
103
- - Suggestion to create PR
104
-
105
- ### Test 3: PR with No Review Comments
106
-
107
- **Setup**:
108
- ```bash
109
- gh pr create --title "Test PR" --body "Testing"
110
- # No one has reviewed yet
111
- git commit -m "update"
112
- ```
113
-
114
- **Test**:
115
- ```
116
- "Respond to PR review comments"
117
- ```
118
-
119
- **Expected behavior**:
120
- 1. Detects PR
121
- 2. Fetches comments
122
- 3. Finds no comments
123
- 4. Informs user: "No review comments found"
124
- 5. Exits gracefully
125
-
126
- **Validation**:
127
- - No errors
128
- - Clear message
129
- - No unnecessary API calls
130
-
131
- ### Test 4: Comments Don't Match Changes
132
-
133
- **Setup**:
134
- ```bash
135
- gh pr create --title "Test PR" --body "Testing"
136
- # Reviewer comments on src/views.py
137
- # You modify src/models.py instead
138
- git add src/models.py
139
- git commit -m "update models"
140
- ```
141
-
142
- **Test**:
143
- ```
144
- "Respond to PR review comments"
145
- ```
146
-
147
- **Expected behavior**:
148
- 1. Detects PR
149
- 2. Finds review comments
150
- 3. Gets changed files
151
- 4. Finds no matches
152
- 5. Shows what comments exist vs what you changed
153
- 6. Exits with explanation
154
-
155
- **Validation**:
156
- - Lists comment locations
157
- - Lists changed files
158
- - Clear mismatch explanation
159
-
160
- ### Test 5: Multiple Comments Addressed
161
-
162
- **Setup**:
163
- ```bash
164
- # PR with 5 review comments across 3 files
165
- # Make changes addressing all 5
166
- git add .
167
- git commit -m "fix: address all feedback"
168
- ```
169
-
170
- **Test**:
171
- ```
172
- "Respond to PR review comments"
173
- ```
174
-
175
- **Expected behavior**:
176
- 1. Detects PR
177
- 2. Finds 5 comments
178
- 3. Matches all 5 to changes
179
- 4. Drafts 5 responses
180
- 5. Shows all for approval
181
- 6. Posts all 5 after confirmation
182
-
183
- **Validation**:
184
- - All 5 responses posted
185
- - Each on correct comment thread
186
- - Consistent format
187
-
188
- ### Test 6: Already Responded Comments Filtered
189
-
190
- **Setup**:
191
- ```bash
192
- # PR with 3 comments
193
- # You already responded to 2 yesterday
194
- # Only 1 new comment unresponded
195
- git commit -m "fix: latest feedback"
196
- ```
197
-
198
- **Test**:
199
- ```
200
- "Respond to PR review comments"
201
- ```
202
-
203
- **Expected behavior**:
204
- 1. Detects PR
205
- 2. Finds 3 comments total
206
- 3. Filters out 2 already-replied
207
- 4. Shows only 1 new comment
208
- 5. Drafts 1 response
209
- 6. Posts 1 response
210
-
211
- **Validation**:
212
- - Only 1 new response posted
213
- - Doesn't duplicate on already-replied comments
214
- - Tracks which were skipped
215
-
216
- ## Edge Cases
217
-
218
- ### Test 9: Authentication Failure
219
-
220
- **Setup**:
221
- - GitHub MCP server authentication is not configured or has expired
222
-
223
- **Test**:
224
- ```
225
- "Respond to PR review comments"
226
- ```
227
-
228
- **Expected behavior**:
229
- - Attempts to fetch PR
230
- - Gets auth error from MCP server
231
- - Shows clear error message
232
- - Suggests re-authenticating the GitHub MCP server
233
-
234
- ### Test 10: Merged PR
235
-
236
- **Setup**:
237
- ```bash
238
- # PR is already merged
239
- # Try to respond to old comments
240
- ```
241
-
242
- **Test**:
243
- ```
244
- "Respond to PR review comments"
245
- ```
246
-
247
- **Expected behavior**:
248
- - Detects PR is merged
249
- - Informs user
250
- - Explains can't add comments to merged PR
251
-
252
- ### Test 11: Permission Denied
253
-
254
- **Setup**:
255
- ```bash
256
- # Readonly access to repo
257
- ```
258
-
259
- **Test**:
260
- ```
261
- "Respond to PR review comments"
262
- ```
263
-
264
- **Expected behavior**:
265
- - Finds comments
266
- - Drafts responses
267
- - Fails to post (permission denied)
268
- - Shows error with suggestion to request access
269
-
270
- ## Performance Tests
271
-
272
- ### Test 12: Large PR with Many Comments
273
-
274
- **Setup**:
275
- - PR with 50+ review comments
276
- - Changes addressing 20+ comments
277
-
278
- **Expected behavior**:
279
- - Handles large number of comments
280
- - Doesn't timeout
281
- - Efficiently matches comments to changes
282
- - Shows progress during processing
283
-
284
- **Validation**:
285
- - Completes in reasonable time (< 30 seconds)
286
- - Correct matches found
287
- - All responses posted
288
-
289
- ## Validation Checklist
290
-
291
- Before considering skill production-ready:
292
-
293
- - [ ] Frontmatter validated (name lowercase, description < 1024 chars)
294
- - [ ] Directory name matches frontmatter name
295
- - [ ] All activation triggers work
296
- - [ ] False positive triggers correctly avoided
297
- - [ ] Happy path works end-to-end
298
- - [ ] Edge cases handled gracefully
299
- - [ ] Error messages are clear and actionable
300
- - [ ] GitHub MCP tools respond correctly for all operations
301
- - [ ] Documentation is comprehensive
302
- - [ ] Examples cover common scenarios
303
-
304
- ## Debugging
305
-
306
- If skill doesn't activate:
307
-
308
- 1. **Check skill loading**:
309
- ```bash
310
- ls ~/.claude/skills/pr-review-responder/SKILL.md
311
- ```
312
-
313
- 2. **Restart Claude Code**:
314
- ```
315
- Exit and restart to reload skills
316
- ```
317
-
318
- 3. **Test with explicit trigger**:
319
- ```
320
- "Use the pr-review-responder skill to respond to PR comments"
321
- ```
322
-
323
- 4. **Check description specificity**:
324
- - Does description mention "PR review", "code review", "feedback"?
325
- - Does it include "respond", "reply", "post"?
326
- - Are trigger words present?
327
-
328
- If MCP calls fail:
329
-
330
- 1. **Check GitHub MCP server**:
331
- - Verify `plugin:github:github` is listed in available MCP servers
332
- - Check authentication status within the MCP server configuration
333
-
334
- 2. **Check git repository**:
335
- ```bash
336
- git remote -v
337
- ```
338
-
339
- ## Success Metrics
340
-
341
- Skill is working correctly if:
342
-
343
- 1. **Activation rate**: Activates on relevant queries (>90%)
344
- 2. **False positive rate**: Doesn't activate on unrelated queries (<5%)
345
- 3. **Matching accuracy**: Correctly matches comments to changes (>85%)
346
- 4. **Response quality**: Drafted responses are specific and concise
347
- 5. **Posting success**: API calls succeed (>95%)
348
- 6. **User satisfaction**: Saves time vs manual responses
349
-
350
- Track these over time to validate skill effectiveness.
@@ -1,45 +0,0 @@
1
- ---
2
- name: pr-scope-resolve
3
- description: >-
4
- Resolves the audit/fix target for a PR-loop skill: owner, repo, PR number,
5
- head and base refs, PR URL, and head SHA, with a canonical refusal when no
6
- target exists. Invoked by PR-loop orchestrators (pr-converge, bugteam, qbug,
7
- findbugs, fixbugs) first; not for general git questions.
8
- ---
9
-
10
- # PR Scope Resolve
11
-
12
- **Core principle:** every PR-loop skill agrees on what it is auditing before any other work. One resolution ladder, one refusal line.
13
-
14
- ## How callers invoke this
15
-
16
- - **Skill-capable contexts** (a lead session with the `Skill` tool): `Skill({skill: "pr-scope-resolve", args: "--skill <caller> [PR URL if the user gave one]"})`.
17
- - **Fallback** (a subagent or teammate without the `Skill` tool): the caller's spawn prompt says "Read `~/.claude/skills/pr-scope-resolve/SKILL.md` and apply the resolution ladder with the parameters below."
18
-
19
- The caller identity fills the refusal template. The resolved scope hands back: `owner`, `repo`, `number`, `head_ref`, `base_ref`, `url`, and `head_sha` (the starting `current_head`).
20
-
21
- ## The resolution ladder
22
-
23
- Match the first rung that holds:
24
-
25
- 1. **A PR URL was given.** Extract `owner`, `repo`, and `number` from the URL, then `pull_request_read(method="get", pullNumber=N, owner=O, repo=R)` for `head.sha`, `head.ref`, `base.ref`, and draft state.
26
- 2. **Open PR for the current branch.** Call `pull_request_read(method="get")` with the PR number from the caller's context. When the number is unknown, recover it with the `search_pull_requests` MCP tool using the current branch name, then fetch as in rung 1.
27
- 3. **No PR, but a remote default branch exists.** The scope is the upstream diff: `git merge-base HEAD origin/<default>` then `git diff <merge-base>...HEAD`. `head_sha` is `git rev-parse HEAD`; there is no PR number or URL, and steps that post to a PR are skipped by the caller.
28
- 4. **Neither.** Respond exactly with the refusal template and stop:
29
-
30
- `No PR or upstream diff. /<caller> needs a target.`
31
-
32
- ## Ground rules
33
-
34
- - **The GitHub MCP is the primary transport** (`pull_request_read`, `search_pull_requests`); raw `gh api` is the fallback. MCP calls behave the same from any worktree, so scope resolution never depends on the working directory.
35
- - **Re-resolve `head_sha` after any push or external wait.** The scope tuple (`owner`, `repo`, `number`) is stable for a run; the head SHA is not.
36
- - **Full-diff scope.** The resolved scope always means the full `origin/<base>...HEAD` diff — every file the PR touches. A caller that narrows to a file list, commit range, or flagged-path subset is out of contract with every convergence gate downstream.
37
-
38
- ## Gotchas
39
-
40
- - **`search_pull_requests` recovers PR numbers from branch names**, but a branch reused across repos returns several hits — filter by repo before trusting the number.
41
- - **A draft-state read belongs to this step.** Callers that need a draft PR (convergence loops that mark ready at the end) check `isDraft` here, on the same `get` call, rather than paying a second fetch later.
42
-
43
- ## Folder map
44
-
45
- - `SKILL.md` — this file; the ladder is MCP- and git-native, so the skill ships no scripts.
@@ -1,24 +0,0 @@
1
- # pre-compact
2
-
3
- Composes the `/compact` focus directive for the current session and copies the full `/compact <directive>` string to the clipboard.
4
-
5
- **Trigger:** `/pre-compact` or any request to "prep for compaction".
6
-
7
- ## Purpose
8
-
9
- `/compact [instructions]` accepts a directive that steers the compaction summarizer toward high-signal content. This skill builds that directive from live session state — validated against the actual git branch, PR, HEAD SHA, and worktree path — and delivers it ready to paste.
10
-
11
- ## Key files
12
-
13
- | File | Purpose |
14
- |---|---|
15
- | `SKILL.md` | The complete skill — five steps (confirm intent, validate live state, write directive, copy to clipboard, hand off). No companion files. |
16
-
17
- ## How the skill runs
18
-
19
- 1. Asks the operator what they plan to work on next (via `AskUserQuestion`).
20
- 2. Reads each identifier live (`git branch --show-current`, `git rev-parse --short HEAD`, `gh pr view`, `pwd`) rather than relying on conversation context.
21
- 3. Produces a `Preserve:` block scoped to what the next task actually needs.
22
- 4. Writes the full `/compact <directive>` string to a temp file, copies it via `pwsh Set-Clipboard`, then cleans up.
23
-
24
- `disable-model-invocation: true` is set — this skill runs without a secondary LLM call; it is pure procedural text assembly.