Skip to content

Commit 722f423

Browse files
aRustyDevclaude
andauthored
feat(commands): add /review-skill-issue slash command (#805)
### Added - components/commands/review-skill-issue.md - Slash command for working Backlog skill review issues - 8-phase workflow: discovery, claim, worktree, analysis, implementation, validation, PR submission, cleanup - GitHub Project integration with status transitions - Integration with /refine-skill and /validate-lang-conversion-skill commands - Decision points for edge cases and prioritization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b366b7e commit 722f423

1 file changed

Lines changed: 251 additions & 0 deletions

File tree

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
---
2+
description: Work an open issue with 'review' and 'skills' labels from Backlog - analyze, fix, and submit PR
3+
---
4+
5+
# Review Skill Issue
6+
7+
Work an open issue from `aRustyDev/ai` that has both the `review` and `skills` labels AND is in the **Backlog** status of the AI Components project.
8+
9+
## Phase 1: Issue Discovery
10+
11+
1. Find issues with `review` AND `skills` labels that are in **Backlog** status:
12+
```bash
13+
# List issues with review+skills labels
14+
gh issue list --repo aRustyDev/ai --label review --label skills --state open --json number,title,createdAt
15+
```
16+
17+
2. For each candidate issue, check if it's in Backlog status:
18+
```bash
19+
# Get project item ID and status for an issue
20+
gh api graphql -f query='
21+
query($owner: String!, $repo: String!, $issueNumber: Int!) {
22+
repository(owner: $owner, name: $repo) {
23+
issue(number: $issueNumber) {
24+
projectItems(first: 10) {
25+
nodes {
26+
id
27+
project { title number }
28+
fieldValueByName(name: "Status") {
29+
... on ProjectV2ItemFieldSingleSelectValue {
30+
name
31+
optionId
32+
}
33+
}
34+
}
35+
}
36+
}
37+
}
38+
}' -f owner=aRustyDev -f repo=ai -F issueNumber=<ISSUE_NUMBER>
39+
```
40+
41+
3. Select ONE issue that is in **Backlog** status (prefer older issues)
42+
43+
4. Read the full issue to understand:
44+
- Which skill needs refinement
45+
- What specific gaps/problems were identified
46+
- Any linked issues or PRs
47+
48+
## Phase 2: Claim Issue (Set to In Progress)
49+
50+
1. **Immediately update project status to "In progress"**:
51+
```bash
52+
# Get the project item ID from Phase 1, then update status
53+
gh api graphql -f query='
54+
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
55+
updateProjectV2ItemFieldValue(input: {
56+
projectId: $projectId
57+
itemId: $itemId
58+
fieldId: $fieldId
59+
value: { singleSelectOptionId: $optionId }
60+
}) {
61+
projectV2Item { id }
62+
}
63+
}' \
64+
-f projectId="PVT_kwHOAiotK84BLoKg" \
65+
-f itemId="<PROJECT_ITEM_ID>" \
66+
-f fieldId="PVTSSF_lAHOAiotK84BLoKgzg7JRok" \
67+
-f optionId="47fc9ee4"
68+
```
69+
70+
Note: Status option IDs:
71+
- Backlog: `f75ad846`
72+
- Ready: `e18bf179`
73+
- In progress: `47fc9ee4`
74+
- In review: `aba860b9`
75+
- Done: `98236657`
76+
77+
2. Add a comment to the issue claiming it:
78+
```markdown
79+
🤖 Starting work on this issue.
80+
81+
**Plan:**
82+
- [ ] Create worktree for isolated work
83+
- [ ] Run /refine-skill analysis
84+
- [ ] Run /validate-lang-conversion-skill (if applicable)
85+
- [ ] Apply fixes
86+
- [ ] Submit PR
87+
```
88+
89+
## Phase 3: Setup Worktree
90+
91+
1. Create a feature branch in a worktree:
92+
```bash
93+
ISSUE_NUM=<issue-number>
94+
SKILL_NAME=<skill-name-from-issue>
95+
git -C /Users/arustydev/repos/configs/ai worktree add \
96+
/private/tmp/ai-worktrees/review-${SKILL_NAME}-${ISSUE_NUM} \
97+
-b feat/review-${SKILL_NAME}-${ISSUE_NUM}
98+
```
99+
100+
2. Change working context to the worktree (read files from there)
101+
102+
## Phase 4: Analysis
103+
104+
1. **Run /refine-skill** against the identified skill:
105+
- Analyze token budget (< 500 lines pass)
106+
- Check description quality for trigger words
107+
- Validate progressive disclosure pattern
108+
- Review directory structure
109+
- Generate improvement recommendations
110+
111+
2. **If skill is `convert-*` or `lang-*-dev`**, also run /validate-lang-conversion-skill:
112+
- Check 8-pillar coverage
113+
- Validate cross-references
114+
- Check bidirectional consistency (if reverse skill exists)
115+
116+
3. **Update the issue** with analysis findings:
117+
```markdown
118+
## Analysis Complete
119+
120+
### /refine-skill Results
121+
- Token budget: X/500 lines [PASS/WARN/FAIL]
122+
- Description quality: [GOOD/NEEDS IMPROVEMENT]
123+
- Progressive disclosure: [YES/NO]
124+
125+
### /validate-lang-conversion-skill Results (if applicable)
126+
- Pillar coverage: X/8
127+
- Missing pillars: [list]
128+
- Cross-references: [VALID/MISSING]
129+
130+
### Planned Fixes
131+
1. [Fix 1]
132+
2. [Fix 2]
133+
...
134+
```
135+
136+
## Phase 5: Implementation
137+
138+
1. Apply fixes identified in analysis:
139+
- Expand missing sections
140+
- Fix structural issues
141+
- Add missing cross-references
142+
- Improve examples
143+
144+
2. For each significant change, use atomic commits:
145+
```bash
146+
git -C <worktree-path> add <files>
147+
git -C <worktree-path> commit -m "fix(skills): <description>"
148+
```
149+
150+
3. **Update the issue** with implementation progress as you work
151+
152+
## Phase 6: Validation
153+
154+
1. Re-run /refine-skill to confirm improvements
155+
2. Re-run /validate-lang-conversion-skill (if applicable)
156+
3. Verify all checklist items from original issue are addressed
157+
158+
## Phase 7: Submit PR & Set to In Review
159+
160+
1. Push the branch:
161+
```bash
162+
git -C <worktree-path> push -u origin feat/review-${SKILL_NAME}-${ISSUE_NUM}
163+
```
164+
165+
2. Create PR with:
166+
- Title: `fix(skills): address review feedback for ${SKILL_NAME}`
167+
- Body: Summary of changes, link to issue with "Closes #X"
168+
- Reference the analysis and validation results
169+
170+
3. **Update project status to "In review"**:
171+
```bash
172+
gh api graphql -f query='
173+
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
174+
updateProjectV2ItemFieldValue(input: {
175+
projectId: $projectId
176+
itemId: $itemId
177+
fieldId: $fieldId
178+
value: { singleSelectOptionId: $optionId }
179+
}) {
180+
projectV2Item { id }
181+
}
182+
}' \
183+
-f projectId="PVT_kwHOAiotK84BLoKg" \
184+
-f itemId="<PROJECT_ITEM_ID>" \
185+
-f fieldId="PVTSSF_lAHOAiotK84BLoKgzg7JRok" \
186+
-f optionId="aba860b9"
187+
```
188+
189+
4. **Add final comment to issue**:
190+
```markdown
191+
## Work Complete
192+
193+
PR submitted: #XXX
194+
195+
### Changes Made
196+
- [Change 1]
197+
- [Change 2]
198+
199+
### Validation Results
200+
- /refine-skill: PASS
201+
- /validate-lang-conversion-skill: X/8 pillars
202+
203+
This issue will be closed when the PR is merged.
204+
```
205+
206+
## Phase 8: Cleanup
207+
208+
1. After PR is created, note the worktree location for later cleanup:
209+
```bash
210+
# After PR merge, run:
211+
git -C /Users/arustydev/repos/configs/ai worktree remove /private/tmp/ai-worktrees/review-${SKILL_NAME}-${ISSUE_NUM}
212+
```
213+
214+
## Project Status Reference
215+
216+
| Status | Option ID | When to Set |
217+
|--------|-----------|-------------|
218+
| Backlog | `f75ad846` | Issue waiting to be worked |
219+
| Ready | `e18bf179` | Issue prepared, not started |
220+
| In progress | `47fc9ee4` | **Set immediately when claiming** |
221+
| In review | `aba860b9` | **Set when PR is submitted** |
222+
| Done | `98236657` | Set automatically when PR merges |
223+
224+
## Decision Points
225+
226+
**If no issues are in Backlog:**
227+
- Check Ready status issues as alternatives
228+
- Report that no Backlog issues are available
229+
230+
**If multiple Backlog issues exist:**
231+
- Prioritize by age (oldest first)
232+
- Prioritize by blocking status (check if other issues reference it)
233+
- Prioritize `lang-*-dev` skills over `convert-*` skills (foundational)
234+
235+
**If /refine-skill identifies many issues:**
236+
- Focus on Critical and Warning items first
237+
- Suggestions can be deferred to follow-up issues
238+
- Document deferred items in the PR
239+
240+
**If skill has severe structural problems:**
241+
- Consider whether a full rewrite is needed
242+
- If so, update the issue with recommendation and ask for user input before proceeding
243+
244+
## Do NOT
245+
246+
- Work multiple issues in parallel (focus on one)
247+
- Skip the analysis phase
248+
- Forget to update the issue with progress
249+
- Create commits directly on main
250+
- Close issues manually (use "Closes #X" in PR)
251+
- **Forget to update project status at start and end**

0 commit comments

Comments
 (0)