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,407 @@
|
|
|
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
|
+
## Standalone Script Tests
|
|
217
|
+
|
|
218
|
+
### Test 7: Script with Auto-Approve
|
|
219
|
+
|
|
220
|
+
**Setup**:
|
|
221
|
+
```bash
|
|
222
|
+
# PR with review comments
|
|
223
|
+
# Changes committed
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Test**:
|
|
227
|
+
```bash
|
|
228
|
+
python scripts/respond_to_reviews.py --auto-approve
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Expected behavior**:
|
|
232
|
+
- Finds comments
|
|
233
|
+
- Drafts responses
|
|
234
|
+
- Posts WITHOUT asking for confirmation
|
|
235
|
+
- Shows success report
|
|
236
|
+
|
|
237
|
+
**Validation**:
|
|
238
|
+
- No interactive prompts
|
|
239
|
+
- Responses posted automatically
|
|
240
|
+
- Exit code 0
|
|
241
|
+
|
|
242
|
+
### Test 8: Script with Specific PR Number
|
|
243
|
+
|
|
244
|
+
**Setup**:
|
|
245
|
+
```bash
|
|
246
|
+
# Multiple PRs open
|
|
247
|
+
# Specify which one
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Test**:
|
|
251
|
+
```bash
|
|
252
|
+
python scripts/respond_to_reviews.py --pr 123
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Expected behavior**:
|
|
256
|
+
- Uses PR #123 (not auto-detect)
|
|
257
|
+
- Processes that PR's comments
|
|
258
|
+
- Posts responses
|
|
259
|
+
|
|
260
|
+
**Validation**:
|
|
261
|
+
- Correct PR processed
|
|
262
|
+
- Doesn't use current branch's PR
|
|
263
|
+
|
|
264
|
+
## Edge Cases
|
|
265
|
+
|
|
266
|
+
### Test 9: Authentication Failure
|
|
267
|
+
|
|
268
|
+
**Setup**:
|
|
269
|
+
```bash
|
|
270
|
+
gh auth logout
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**Test**:
|
|
274
|
+
```
|
|
275
|
+
"Respond to PR review comments"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Expected behavior**:
|
|
279
|
+
- Attempts to fetch PR
|
|
280
|
+
- Gets auth error
|
|
281
|
+
- Shows clear error message
|
|
282
|
+
- Suggests: `gh auth login`
|
|
283
|
+
|
|
284
|
+
### Test 10: Merged PR
|
|
285
|
+
|
|
286
|
+
**Setup**:
|
|
287
|
+
```bash
|
|
288
|
+
# PR is already merged
|
|
289
|
+
# Try to respond to old comments
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Test**:
|
|
293
|
+
```
|
|
294
|
+
"Respond to PR review comments"
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Expected behavior**:
|
|
298
|
+
- Detects PR is merged
|
|
299
|
+
- Informs user
|
|
300
|
+
- Explains can't add comments to merged PR
|
|
301
|
+
|
|
302
|
+
### Test 11: Permission Denied
|
|
303
|
+
|
|
304
|
+
**Setup**:
|
|
305
|
+
```bash
|
|
306
|
+
# Readonly access to repo
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Test**:
|
|
310
|
+
```
|
|
311
|
+
"Respond to PR review comments"
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Expected behavior**:
|
|
315
|
+
- Finds comments
|
|
316
|
+
- Drafts responses
|
|
317
|
+
- Fails to post (permission denied)
|
|
318
|
+
- Shows error with suggestion to request access
|
|
319
|
+
|
|
320
|
+
## Performance Tests
|
|
321
|
+
|
|
322
|
+
### Test 12: Large PR with Many Comments
|
|
323
|
+
|
|
324
|
+
**Setup**:
|
|
325
|
+
- PR with 50+ review comments
|
|
326
|
+
- Changes addressing 20+ comments
|
|
327
|
+
|
|
328
|
+
**Expected behavior**:
|
|
329
|
+
- Handles large number of comments
|
|
330
|
+
- Doesn't timeout
|
|
331
|
+
- Efficiently matches comments to changes
|
|
332
|
+
- Shows progress during processing
|
|
333
|
+
|
|
334
|
+
**Validation**:
|
|
335
|
+
- Completes in reasonable time (< 30 seconds)
|
|
336
|
+
- Correct matches found
|
|
337
|
+
- All responses posted
|
|
338
|
+
|
|
339
|
+
## Validation Checklist
|
|
340
|
+
|
|
341
|
+
Before considering skill production-ready:
|
|
342
|
+
|
|
343
|
+
- [ ] Frontmatter validated (name lowercase, description < 1024 chars)
|
|
344
|
+
- [ ] Directory name matches frontmatter name
|
|
345
|
+
- [ ] All activation triggers work
|
|
346
|
+
- [ ] False positive triggers correctly avoided
|
|
347
|
+
- [ ] Happy path works end-to-end
|
|
348
|
+
- [ ] Edge cases handled gracefully
|
|
349
|
+
- [ ] Error messages are clear and actionable
|
|
350
|
+
- [ ] Standalone script works independently
|
|
351
|
+
- [ ] Documentation is comprehensive
|
|
352
|
+
- [ ] Examples cover common scenarios
|
|
353
|
+
|
|
354
|
+
## Debugging
|
|
355
|
+
|
|
356
|
+
If skill doesn't activate:
|
|
357
|
+
|
|
358
|
+
1. **Check skill loading**:
|
|
359
|
+
```bash
|
|
360
|
+
ls ~/.claude/skills/pr-review-responder/SKILL.md
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
2. **Restart Claude Code**:
|
|
364
|
+
```
|
|
365
|
+
Exit and restart to reload skills
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
3. **Test with explicit trigger**:
|
|
369
|
+
```
|
|
370
|
+
"Use the pr-review-responder skill to respond to PR comments"
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
4. **Check description specificity**:
|
|
374
|
+
- Does description mention "PR review", "code review", "feedback"?
|
|
375
|
+
- Does it include "respond", "reply", "post"?
|
|
376
|
+
- Are trigger words present?
|
|
377
|
+
|
|
378
|
+
If script fails:
|
|
379
|
+
|
|
380
|
+
1. **Check gh CLI**:
|
|
381
|
+
```bash
|
|
382
|
+
gh --version
|
|
383
|
+
gh auth status
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
2. **Check git repository**:
|
|
387
|
+
```bash
|
|
388
|
+
git remote -v
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
3. **Run with error output**:
|
|
392
|
+
```bash
|
|
393
|
+
python scripts/respond_to_reviews.py 2>&1 | tee debug.log
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## Success Metrics
|
|
397
|
+
|
|
398
|
+
Skill is working correctly if:
|
|
399
|
+
|
|
400
|
+
1. **Activation rate**: Activates on relevant queries (>90%)
|
|
401
|
+
2. **False positive rate**: Doesn't activate on unrelated queries (<5%)
|
|
402
|
+
3. **Matching accuracy**: Correctly matches comments to changes (>85%)
|
|
403
|
+
4. **Response quality**: Drafted responses are specific and concise
|
|
404
|
+
5. **Posting success**: API calls succeed (>95%)
|
|
405
|
+
6. **User satisfaction**: Saves time vs manual responses
|
|
406
|
+
|
|
407
|
+
Track these over time to validate skill effectiveness.
|