all-for-claudecode 2.12.0 → 2.13.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +2 -0
- package/package.json +1 -1
- package/scripts/afc-user-prompt-submit.sh +5 -1
- package/skills/issue/SKILL.md +216 -0
- package/skills/resolve/SKILL.md +245 -0
- package/skills/setup/SKILL.md +2 -0
- package/skills/spec/SKILL.md +5 -4
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Automated pipeline for Claude Code — spec → plan → implement → review → clean",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.13.0"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "afc",
|
|
14
14
|
"source": "./",
|
|
15
15
|
"description": "Automated pipeline for Claude Code. Automates the full development cycle: spec → plan → implement → review → clean.",
|
|
16
|
-
"version": "2.
|
|
16
|
+
"version": "2.13.0",
|
|
17
17
|
"category": "automation",
|
|
18
18
|
"tags": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"]
|
|
19
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "afc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "Automated pipeline for Claude Code. Automates the full development cycle: spec → plan → implement → review → clean.",
|
|
5
5
|
"author": { "name": "jhlee0409", "email": "relee6203@gmail.com" },
|
|
6
6
|
"homepage": "https://github.com/jhlee0409/all-for-claudecode",
|
package/README.md
CHANGED
|
@@ -132,6 +132,8 @@ Performance: ✓ no N+1 queries
|
|
|
132
132
|
| `/afc:qa` | Project quality audit — test confidence, error resilience, code health |
|
|
133
133
|
| `/afc:consult` | Expert consultation (backend, infra, PM, design, marketing) |
|
|
134
134
|
| `/afc:triage` | Analyze open PRs and issues in parallel |
|
|
135
|
+
| `/afc:issue` | Analyze a single GitHub issue and create actionable document |
|
|
136
|
+
| `/afc:resolve` | Analyze and address LLM bot review comments on a PR |
|
|
135
137
|
| `/afc:pr-comment` | Generate structured PR review comments |
|
|
136
138
|
| `/afc:release-notes` | Generate release notes from git history |
|
|
137
139
|
| `/afc:learner` | Review and promote learned patterns to project rules |
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ if ! afc_state_is_active; then
|
|
|
42
42
|
LOWER=$(printf '%s' "$USER_TEXT" | tr '[:upper:]' '[:lower:]' | cut -c1-500)
|
|
43
43
|
|
|
44
44
|
# Compact skill catalog: injected when regex misses, so the model classifies semantically
|
|
45
|
-
FALLBACK_HINT="[afc] Route via Skill tool if applicable — debug(bug/에러/수정/fix) | review(코드검토/리뷰/PR) | test(테스트/coverage) | spec(요구사항/스펙) | plan(설계/계획) | implement(구현/리팩터) | auto(새기능/feature) | consult(조언/상의/discuss) | analyze(분석/trace) | research(조사/리서치) | security(보안/취약점) | architect(아키텍처/설계) | qa(품질감사) | launch(릴리스/배포) | triage(PR정리/이슈분류) | clean(정리/cleanup) | ideate(아이디어/brainstorm) | doctor(진단/health) | release-notes(변경이력)"
|
|
45
|
+
FALLBACK_HINT="[afc] Route via Skill tool if applicable — debug(bug/에러/수정/fix) | review(코드검토/리뷰/PR) | test(테스트/coverage) | spec(요구사항/스펙) | plan(설계/계획) | implement(구현/리팩터) | auto(새기능/feature) | consult(조언/상의/discuss) | analyze(분석/trace) | research(조사/리서치) | security(보안/취약점) | architect(아키텍처/설계) | qa(품질감사) | launch(릴리스/배포) | triage(PR정리/이슈분류) | issue(이슈분석) | resolve(LLM리뷰대응) | clean(정리/cleanup) | ideate(아이디어/brainstorm) | doctor(진단/health) | release-notes(변경이력)"
|
|
46
46
|
|
|
47
47
|
# Early exit for empty prompts (context-only messages, malformed JSON)
|
|
48
48
|
if [ -z "$LOWER" ]; then
|
|
@@ -83,6 +83,10 @@ if ! afc_state_is_active; then
|
|
|
83
83
|
SKILL="afc:launch"
|
|
84
84
|
elif printf '%s' "$LOWER" | grep -qE '(triage|pr.?정리|이슈.?정리|백로그.?정리|pr.?분류|이슈.?분류)' 2>/dev/null; then
|
|
85
85
|
SKILL="afc:triage"
|
|
86
|
+
elif printf '%s' "$LOWER" | grep -qE '(issue.*분석|이슈.*분석|analyze.*issue|issue.*#[0-9]|이슈.*#[0-9])' 2>/dev/null; then
|
|
87
|
+
SKILL="afc:issue"
|
|
88
|
+
elif printf '%s' "$LOWER" | grep -qE '(review.*comment|resolve.*comment|coderabbit|copilot.*review|리뷰.*코멘트|봇.*리뷰|bot.*review.*fix)' 2>/dev/null; then
|
|
89
|
+
SKILL="afc:resolve"
|
|
86
90
|
# Medium confidence: still distinctive but broader
|
|
87
91
|
elif printf '%s' "$LOWER" | grep -qE '(specification|requirements|acceptance criteria|요구.?사항|기능.?정의|인수.?조건)' 2>/dev/null; then
|
|
88
92
|
SKILL="afc:spec"
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afc:issue
|
|
3
|
+
description: "Analyze GitHub issue and create actionable document — use when the user asks to analyze a GitHub issue, understand an issue, or inspect a specific issue number"
|
|
4
|
+
argument-hint: "<GitHub issue URL, owner/repo#number, #number, or number>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
- WebFetch
|
|
11
|
+
- Write
|
|
12
|
+
model: sonnet
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# /afc:issue — GitHub Issue Analysis
|
|
16
|
+
|
|
17
|
+
> Analyzes a single GitHub issue (title, body, labels, comments, attached images) and produces a structured analysis document.
|
|
18
|
+
> Searches the codebase for related files and suggests the appropriate next afc skill (debug, spec, or auto).
|
|
19
|
+
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
- `$ARGUMENTS` — (required) One of:
|
|
23
|
+
- Issue number: `123` or `#123`
|
|
24
|
+
- GitHub URL: `https://github.com/owner/repo/issues/123`
|
|
25
|
+
- Cross-repo: `owner/repo#123`
|
|
26
|
+
|
|
27
|
+
## Execution Steps
|
|
28
|
+
|
|
29
|
+
### 1. Prerequisites Check
|
|
30
|
+
|
|
31
|
+
Verify `gh` CLI is available and authenticated:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
gh --version >/dev/null 2>&1 && gh auth status >/dev/null 2>&1
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If either check fails:
|
|
38
|
+
- Output: `[afc:issue] Error: GitHub CLI (gh) is not installed or not authenticated. Install from https://cli.github.com/ and run 'gh auth login'.`
|
|
39
|
+
- **Abort immediately.**
|
|
40
|
+
|
|
41
|
+
### 2. Parse Input
|
|
42
|
+
|
|
43
|
+
Determine the input format and extract owner, repo, and issue number:
|
|
44
|
+
|
|
45
|
+
1. **GitHub URL** (`https://github.com/{owner}/{repo}/issues/{number}`):
|
|
46
|
+
- Extract owner, repo, number from URL path segments
|
|
47
|
+
- Set `GH_REPO_FLAG="--repo {owner}/{repo}"`
|
|
48
|
+
|
|
49
|
+
2. **Cross-repo** (`{owner}/{repo}#{number}`):
|
|
50
|
+
- Split on `#` — left part is `owner/repo`, right part is number
|
|
51
|
+
- Set `GH_REPO_FLAG="--repo {owner}/{repo}"`
|
|
52
|
+
|
|
53
|
+
3. **Local number** (`123` or `#123`):
|
|
54
|
+
- Strip leading `#` if present
|
|
55
|
+
- Set `GH_REPO_FLAG=""` (use current repo from git remote)
|
|
56
|
+
|
|
57
|
+
### 3. Collect Issue Data
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
gh issue view {number} {GH_REPO_FLAG} --json number,title,body,labels,author,comments,createdAt,state,url
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If the command fails:
|
|
64
|
+
- `Issue #{number} not found` → output error and **abort**
|
|
65
|
+
- Other errors → output the gh error message and **abort**
|
|
66
|
+
|
|
67
|
+
Parse the JSON response and extract:
|
|
68
|
+
- `TITLE`, `BODY`, `LABELS`, `AUTHOR`, `COMMENTS`, `CREATED_AT`, `STATE`, `URL`
|
|
69
|
+
|
|
70
|
+
### 4. Analyze Attached Images
|
|
71
|
+
|
|
72
|
+
Extract image URLs from the issue body:
|
|
73
|
+
- Markdown images: ``
|
|
74
|
+
- HTML images: `<img src="{url}">`
|
|
75
|
+
- **Skip** images inside code blocks (` ``` ` fences)
|
|
76
|
+
|
|
77
|
+
For each extracted image URL:
|
|
78
|
+
1. Attempt to fetch with WebFetch
|
|
79
|
+
2. If successful: analyze the image content (error messages, UI screenshots, console output, stack traces)
|
|
80
|
+
3. If fetch fails: record `[Image unavailable: {url}]`
|
|
81
|
+
|
|
82
|
+
Tag all image analysis results with `[Image Analysis]` to indicate AI interpretation.
|
|
83
|
+
|
|
84
|
+
If no images found: note `No attached media found.`
|
|
85
|
+
|
|
86
|
+
### 5. Analyze Comments
|
|
87
|
+
|
|
88
|
+
If comments exist:
|
|
89
|
+
- If more than 20 comments: analyze only the **most recent 20** and note `"Analyzed 20 of {N} comments (most recent)"`
|
|
90
|
+
- Extract additional context from comments: reproduction steps, error logs, workarounds, maintainer responses, related issue/PR references
|
|
91
|
+
|
|
92
|
+
### 6. Search Codebase
|
|
93
|
+
|
|
94
|
+
Extract keywords from the issue title, body, and comments:
|
|
95
|
+
- Error messages (quoted strings, stack trace patterns)
|
|
96
|
+
- Function/class/module names
|
|
97
|
+
- File paths mentioned
|
|
98
|
+
- Technical terms specific to the project
|
|
99
|
+
|
|
100
|
+
For each keyword, search the codebase using Grep and Glob:
|
|
101
|
+
- Record matching files with line numbers and relevance reason
|
|
102
|
+
- If no matches found: note `No related code found in current codebase.`
|
|
103
|
+
|
|
104
|
+
### 7. Classify Issue
|
|
105
|
+
|
|
106
|
+
Based on the analysis, classify the issue:
|
|
107
|
+
|
|
108
|
+
| Signal | Classification |
|
|
109
|
+
|--------|---------------|
|
|
110
|
+
| Error messages, stack traces, reproduction steps, "doesn't work", "broken" | **Bug Report** |
|
|
111
|
+
| "Add", "support", "new feature", "would be nice", "enhancement" | **Feature Request** |
|
|
112
|
+
| "How to", "is it possible", "what is", "documentation" | **Question** |
|
|
113
|
+
| "Improve", "refactor", "better", "optimize", existing feature modification | **Enhancement** |
|
|
114
|
+
|
|
115
|
+
Assess severity:
|
|
116
|
+
- **Critical**: Data loss, security vulnerability, crash, blocks usage
|
|
117
|
+
- **High**: Major functionality broken, no workaround
|
|
118
|
+
- **Medium**: Functionality issue with workaround, or significant UX problem
|
|
119
|
+
- **Low**: Minor issue, cosmetic, or nice-to-have improvement
|
|
120
|
+
|
|
121
|
+
Estimate scope:
|
|
122
|
+
- **Small** (1-2 files): Typo, config change, simple bug fix
|
|
123
|
+
- **Medium** (3-5 files): Feature addition, moderate refactor
|
|
124
|
+
- **Large** (6+ files): Cross-cutting concern, architectural change
|
|
125
|
+
|
|
126
|
+
### 8. Determine Next Step
|
|
127
|
+
|
|
128
|
+
Based on classification:
|
|
129
|
+
|
|
130
|
+
| Type | Suggested Next Step |
|
|
131
|
+
|------|-------------------|
|
|
132
|
+
| Bug Report | `/afc:debug "{issue title summary}"` |
|
|
133
|
+
| Feature Request | `/afc:spec "{feature description}"` or `/afc:auto "{feature description}"` |
|
|
134
|
+
| Question | `Reply to issue — provide answer or point to documentation` |
|
|
135
|
+
| Enhancement | `/afc:spec "{enhancement description}"` |
|
|
136
|
+
| Insufficient info | `Reply to issue — request: {specific missing information}` |
|
|
137
|
+
|
|
138
|
+
### 9. Save Analysis Document
|
|
139
|
+
|
|
140
|
+
Create directory if needed:
|
|
141
|
+
```bash
|
|
142
|
+
mkdir -p .claude/afc/issues
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Check for existing analysis:
|
|
146
|
+
- If `.claude/afc/issues/{number}-*.md` exists → ask user: "Overwrite existing analysis for issue #{number}?"
|
|
147
|
+
|
|
148
|
+
Generate slug from title: lowercase, replace non-alphanumeric with `-`, truncate to 40 chars.
|
|
149
|
+
|
|
150
|
+
Write to `.claude/afc/issues/{number}-{slug}.md`:
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
# Issue #{number}: {title}
|
|
154
|
+
|
|
155
|
+
> Analyzed: {YYYY-MM-DD}
|
|
156
|
+
> Source: {url}
|
|
157
|
+
> Labels: {labels, comma-separated}
|
|
158
|
+
> Author: {author}
|
|
159
|
+
> State: {Open/Closed}
|
|
160
|
+
|
|
161
|
+
## Summary
|
|
162
|
+
|
|
163
|
+
{2-4 sentence summary of what the issue is about and what it requires.
|
|
164
|
+
Not just a restatement of the title — include context from body, comments, and images.}
|
|
165
|
+
|
|
166
|
+
## Attached Media Analysis
|
|
167
|
+
|
|
168
|
+
{If images exist:}
|
|
169
|
+
> [Image Analysis] Below is AI interpretation of attached media.
|
|
170
|
+
|
|
171
|
+
- **Image 1** ({filename or "screenshot"}): {description of what the image shows — error messages, UI state, console output}
|
|
172
|
+
- **Image 2**: ...
|
|
173
|
+
|
|
174
|
+
{If no images:}
|
|
175
|
+
No attached media found.
|
|
176
|
+
|
|
177
|
+
## Codebase Impact
|
|
178
|
+
|
|
179
|
+
{If related files found:}
|
|
180
|
+
- `{path}:{line}` — {why this file is related}
|
|
181
|
+
- `{path}:{line}` — {why this file is related}
|
|
182
|
+
|
|
183
|
+
{If no related files:}
|
|
184
|
+
No related code found in current codebase.
|
|
185
|
+
|
|
186
|
+
## Classification
|
|
187
|
+
|
|
188
|
+
- **Type**: {Bug Report | Feature Request | Question | Enhancement}
|
|
189
|
+
- **Severity**: {Critical | High | Medium | Low}
|
|
190
|
+
- **Estimated Scope**: {Small (1-2 files) | Medium (3-5) | Large (6+)}
|
|
191
|
+
|
|
192
|
+
## Suggested Next Step
|
|
193
|
+
|
|
194
|
+
- [ ] {Primary suggestion with full command} — {reason}
|
|
195
|
+
- [ ] {Secondary suggestion if applicable} — {reason}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 10. Output Summary
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Issue analyzed
|
|
202
|
+
├─ Issue: #{number} — {title}
|
|
203
|
+
├─ Type: {classification}
|
|
204
|
+
├─ Severity: {severity}
|
|
205
|
+
├─ Related files: {count}
|
|
206
|
+
├─ Document: .claude/afc/issues/{number}-{slug}.md
|
|
207
|
+
└─ Next step: {primary suggestion}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Notes
|
|
211
|
+
|
|
212
|
+
- **Read-only**: This skill does not modify any code. It only creates an analysis document.
|
|
213
|
+
- **Image analysis is best-effort**: AI interpretation of screenshots may not be 100% accurate. The `[Image Analysis]` tag makes this explicit.
|
|
214
|
+
- **Not part of auto pipeline**: This is a standalone skill invoked manually.
|
|
215
|
+
- **Relationship to triage**: `afc:triage` handles bulk PR/issue analysis. `afc:issue` handles deep individual issue analysis. They are complementary.
|
|
216
|
+
- **Comment limit**: Max 20 comments analyzed to keep context manageable. Most recent comments are prioritized as they often contain the most relevant information.
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afc:resolve
|
|
3
|
+
description: "Analyze and address LLM review comments on PR — use when the user asks to resolve, fix, or respond to bot review comments (CodeRabbit, Copilot, Codex) on a pull request"
|
|
4
|
+
argument-hint: "<PR URL, owner/repo#number, #number, or number>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
- Edit
|
|
11
|
+
- Write
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
model: sonnet
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# /afc:resolve — LLM Review Comment Resolution
|
|
17
|
+
|
|
18
|
+
> Collects LLM bot review comments (CodeRabbit, Copilot, Codex, etc.) from a PR, classifies each as VALID/NOISE/DISCUSS, applies fixes for VALID items, and asks the user about DISCUSS items.
|
|
19
|
+
> Creates a single commit with all fixes and outputs a summary report.
|
|
20
|
+
|
|
21
|
+
## Arguments
|
|
22
|
+
|
|
23
|
+
- `$ARGUMENTS` — (required) One of:
|
|
24
|
+
- PR number: `456` or `#456`
|
|
25
|
+
- GitHub URL: `https://github.com/owner/repo/pull/456`
|
|
26
|
+
- Cross-repo: `owner/repo#456`
|
|
27
|
+
|
|
28
|
+
## Execution Steps
|
|
29
|
+
|
|
30
|
+
### 1. Prerequisites Check
|
|
31
|
+
|
|
32
|
+
Verify `gh` CLI is available and authenticated:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
gh --version >/dev/null 2>&1 && gh auth status >/dev/null 2>&1
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If either check fails:
|
|
39
|
+
- Output: `[afc:resolve] Error: GitHub CLI (gh) is not installed or not authenticated. Install from https://cli.github.com/ and run 'gh auth login'.`
|
|
40
|
+
- **Abort immediately.**
|
|
41
|
+
|
|
42
|
+
### 2. Parse Input
|
|
43
|
+
|
|
44
|
+
Determine the input format and extract owner, repo, and PR number:
|
|
45
|
+
|
|
46
|
+
1. **GitHub URL** (`https://github.com/{owner}/{repo}/pull/{number}`):
|
|
47
|
+
- Extract owner, repo, number from URL path segments
|
|
48
|
+
- Set `GH_REPO_FLAG="--repo {owner}/{repo}"`
|
|
49
|
+
|
|
50
|
+
2. **Cross-repo** (`{owner}/{repo}#{number}`):
|
|
51
|
+
- Split on `#` — left part is `owner/repo`, right part is number
|
|
52
|
+
- Set `GH_REPO_FLAG="--repo {owner}/{repo}"`
|
|
53
|
+
|
|
54
|
+
3. **Local number** (`456` or `#456`):
|
|
55
|
+
- Strip leading `#` if present
|
|
56
|
+
- Set `GH_REPO_FLAG=""` (use current repo from git remote)
|
|
57
|
+
|
|
58
|
+
### 3. Collect Review Comments
|
|
59
|
+
|
|
60
|
+
Collect all review comments from the PR:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
gh pr view {number} {GH_REPO_FLAG} --json reviews,comments,url,title,headRefName
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Additionally, collect inline review comments:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If `--repo` flag was not used, derive owner/repo from `gh repo view --json owner,name`.
|
|
73
|
+
|
|
74
|
+
If API call fails → output the error and **abort**.
|
|
75
|
+
|
|
76
|
+
### 4. Filter Bot Comments
|
|
77
|
+
|
|
78
|
+
Identify LLM bot comments by checking the comment author's login:
|
|
79
|
+
|
|
80
|
+
**Known bot patterns**:
|
|
81
|
+
- `coderabbitai[bot]` — CodeRabbit
|
|
82
|
+
- `copilot[bot]` or `github-copilot[bot]` — GitHub Copilot
|
|
83
|
+
- `codex[bot]` — Codex
|
|
84
|
+
- Any login ending with `[bot]` — generic bot detection
|
|
85
|
+
|
|
86
|
+
**Filter rules**:
|
|
87
|
+
- Keep only comments where the author matches a bot pattern
|
|
88
|
+
- Discard all human reviewer comments (MVP scope)
|
|
89
|
+
- If an inline comment is marked as `outdated` by GitHub → tag as `[OUTDATED]`
|
|
90
|
+
|
|
91
|
+
If 0 bot comments found:
|
|
92
|
+
- Output: `No LLM bot review comments found on PR #{number}.`
|
|
93
|
+
- **Exit gracefully** (success, not error).
|
|
94
|
+
|
|
95
|
+
### 5. Classify Each Comment
|
|
96
|
+
|
|
97
|
+
For each bot comment, analyze the content and classify:
|
|
98
|
+
|
|
99
|
+
| Classification | Criteria | Action |
|
|
100
|
+
|---------------|----------|--------|
|
|
101
|
+
| **VALID** | Real bug, security issue, clear improvement, correct suggestion with code context | Auto-fix |
|
|
102
|
+
| **NOISE** | Style preference difference, intentional design choice, false positive, already addressed | Skip |
|
|
103
|
+
| **DISCUSS** | Architecture decision needed, tradeoff exists, multiple valid approaches, no code `path`/`position` (non-code feedback) | Ask user |
|
|
104
|
+
|
|
105
|
+
**Classification guidelines**:
|
|
106
|
+
- If the comment points to a concrete bug (null check, off-by-one, resource leak) → **VALID**
|
|
107
|
+
- If the comment is about naming convention or style that differs from project rules → **NOISE**
|
|
108
|
+
- If the comment suggests a refactor with pros/cons → **DISCUSS**
|
|
109
|
+
- If multiple bots give conflicting advice on the same line → **DISCUSS**
|
|
110
|
+
- If the comment is on an `[OUTDATED]` diff → **NOISE** (code already changed)
|
|
111
|
+
|
|
112
|
+
Also collect from each comment:
|
|
113
|
+
- `file_path`: the file the comment targets
|
|
114
|
+
- `line`: the line number (if available)
|
|
115
|
+
- `suggestion`: the suggested change (if available)
|
|
116
|
+
- `body`: the full comment text
|
|
117
|
+
|
|
118
|
+
### 6. Present Classification Summary
|
|
119
|
+
|
|
120
|
+
Before making any changes, present the classification to the user:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
PR #{number}: {title}
|
|
124
|
+
Branch: {headRefName}
|
|
125
|
+
|
|
126
|
+
Bot comments: {total_count} ({bot_names})
|
|
127
|
+
|
|
128
|
+
VALID ({count}):
|
|
129
|
+
1. [{bot}] {file}:{line} — {1-line summary of issue}
|
|
130
|
+
2. [{bot}] {file}:{line} — {1-line summary of issue}
|
|
131
|
+
|
|
132
|
+
NOISE ({count}):
|
|
133
|
+
1. [{bot}] {file}:{line} — {reason for skipping}
|
|
134
|
+
|
|
135
|
+
DISCUSS ({count}):
|
|
136
|
+
1. [{bot}] {file}:{line} — {question for user}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 7. Handle DISCUSS Items
|
|
140
|
+
|
|
141
|
+
For each DISCUSS item, present to the user:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
[DISCUSS #{n}] {bot_name} on {file}:{line}
|
|
145
|
+
|
|
146
|
+
Comment:
|
|
147
|
+
> {original comment text, truncated to 500 chars}
|
|
148
|
+
|
|
149
|
+
Target code:
|
|
150
|
+
> {relevant code snippet, 5 lines context}
|
|
151
|
+
|
|
152
|
+
If applied: {description of what would change}
|
|
153
|
+
Tradeoff: {why this is not a clear-cut decision}
|
|
154
|
+
|
|
155
|
+
Options:
|
|
156
|
+
1. Apply — treat as VALID, fix the code
|
|
157
|
+
2. Skip — treat as NOISE, record skip reason
|
|
158
|
+
3. Defer — skip for now, revisit later
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Wait for user response. Reclassify based on choice:
|
|
162
|
+
- `Apply` → move to VALID list
|
|
163
|
+
- `Skip` → move to NOISE list with user's reason
|
|
164
|
+
- `Defer` → keep as DISCUSS in report
|
|
165
|
+
|
|
166
|
+
### 8. Apply VALID Fixes
|
|
167
|
+
|
|
168
|
+
For each VALID comment (including user-accepted DISCUSS items):
|
|
169
|
+
|
|
170
|
+
1. **Read the target file** before modifying
|
|
171
|
+
2. **Identify the exact location** from the comment's `file_path` and `line`
|
|
172
|
+
3. **Apply the fix** using Edit tool:
|
|
173
|
+
- If the bot provided a specific code suggestion → apply it
|
|
174
|
+
- If the bot described the issue without a suggestion → implement the fix based on the description
|
|
175
|
+
4. **Verify** the fix doesn't break the immediate surrounding code context
|
|
176
|
+
|
|
177
|
+
If the target file is in a dirty state (uncommitted changes unrelated to this PR):
|
|
178
|
+
- Warn user: `{file} has uncommitted changes not related to this PR. Proceed?`
|
|
179
|
+
- If user declines → skip this fix, note in report
|
|
180
|
+
|
|
181
|
+
If the target file was deleted in the PR branch:
|
|
182
|
+
- Skip, note `[FILE DELETED]` in report
|
|
183
|
+
|
|
184
|
+
### 9. Commit Changes
|
|
185
|
+
|
|
186
|
+
**Before committing**, show the user a summary of all changes:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
Changes to commit:
|
|
190
|
+
{file1}: {description of change}
|
|
191
|
+
{file2}: {description of change}
|
|
192
|
+
Total: {N} files changed
|
|
193
|
+
|
|
194
|
+
Proceed with commit? (y/n)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Wait for user confirmation** before committing. This is a safety requirement.
|
|
198
|
+
|
|
199
|
+
**Commit strategy**:
|
|
200
|
+
- If VALID items ≤ 9: single commit
|
|
201
|
+
- If VALID items ≥ 10: group by file/module into 2-3 commits
|
|
202
|
+
|
|
203
|
+
**Commit message format** (single commit):
|
|
204
|
+
```
|
|
205
|
+
resolve LLM review comments on #{number}
|
|
206
|
+
|
|
207
|
+
- fix: {description} ({bot_name})
|
|
208
|
+
- fix: {description} ({bot_name})
|
|
209
|
+
- skip: {reason} (NOISE, {count} items)
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Do **NOT** push automatically. The user decides when to push.
|
|
213
|
+
|
|
214
|
+
### 10. Output Report
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
Resolve complete
|
|
218
|
+
├─ PR: #{number} — {title}
|
|
219
|
+
├─ Bot comments: {total} ({bot_names})
|
|
220
|
+
├─ VALID: {count} (applied)
|
|
221
|
+
├─ NOISE: {count} (skipped)
|
|
222
|
+
├─ DISCUSS: {count} (applied: {n}, skipped: {n}, deferred: {n})
|
|
223
|
+
├─ Commit: {hash} ({files_changed} files, +{additions}/-{deletions})
|
|
224
|
+
└─ Push: not pushed (run 'git push' when ready)
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If no VALID items were found (all NOISE/DISCUSS-skipped):
|
|
228
|
+
```
|
|
229
|
+
Resolve complete
|
|
230
|
+
├─ PR: #{number} — {title}
|
|
231
|
+
├─ Bot comments: {total} ({bot_names})
|
|
232
|
+
├─ VALID: 0
|
|
233
|
+
├─ NOISE: {count}
|
|
234
|
+
├─ DISCUSS: {count} (all skipped/deferred)
|
|
235
|
+
└─ No changes made
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Notes
|
|
239
|
+
|
|
240
|
+
- **MVP scope**: Only bot comments are analyzed. Human reviewer comments are ignored. Use `afc:review` for human-initiated code review.
|
|
241
|
+
- **No auto-push**: Changes are committed but never pushed automatically. The user controls when to push.
|
|
242
|
+
- **User confirmation required**: All code changes must be confirmed by the user before committing (NFR-003 safety requirement).
|
|
243
|
+
- **Not part of auto pipeline**: This is a standalone skill invoked manually.
|
|
244
|
+
- **Idempotency**: Re-running on the same PR will skip comments that have already been addressed (the code diff won't match the bot's original concern).
|
|
245
|
+
- **Relationship to other skills**: `afc:review` does full code review. `afc:pr-comment` posts review comments. `afc:resolve` addresses existing bot comments. They are complementary.
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -163,6 +163,8 @@ User-only (not auto-triggered — when user invokes directly via `/afc:X`, execu
|
|
|
163
163
|
- `afc:principles` — project principles management
|
|
164
164
|
- `afc:clean` — pipeline cleanup (artifact cleanup, dead code scan, pipeline flag release)
|
|
165
165
|
- `afc:triage` — parallel PR/issue triage
|
|
166
|
+
- `afc:issue` — analyze a single GitHub issue
|
|
167
|
+
- `afc:resolve` — address LLM bot review comments on a PR
|
|
166
168
|
- `afc:learner` — pattern learning or rule promotion
|
|
167
169
|
- `afc:pr-comment` — post PR review comments to GitHub
|
|
168
170
|
- `afc:release-notes` — generate release notes from git history
|
package/skills/spec/SKILL.md
CHANGED
|
@@ -41,7 +41,8 @@ If config file is missing:
|
|
|
41
41
|
2. Determine **feature name**:
|
|
42
42
|
- Extract 2-3 key keywords from `$ARGUMENTS`
|
|
43
43
|
- Convert to kebab-case (e.g., "add user authentication" → `user-auth`)
|
|
44
|
-
|
|
44
|
+
- Prepend today's date in `YYYY-MM-DD` format (e.g., `2026-03-13-user-auth`)
|
|
45
|
+
3. **Create directory**: `.claude/afc/specs/{YYYY-MM-DD}-{feature-name}/` (create parent `.claude/afc/specs/` directory if it does not exist)
|
|
45
46
|
4. If already exists, confirm with user: "Overwrite existing spec?"
|
|
46
47
|
|
|
47
48
|
### 2. Explore Codebase
|
|
@@ -67,7 +68,7 @@ Detect whether `$ARGUMENTS` references external libraries, APIs, or technologies
|
|
|
67
68
|
4. **If external references detected**:
|
|
68
69
|
- For each unknown reference, run a focused WebSearch query: `"{library/API name} latest stable version usage guide {current year}"`
|
|
69
70
|
- Optionally use Context7 (`mcp__context7__resolve-library-id` → `mcp__context7__query-docs`) for library-specific documentation
|
|
70
|
-
- Record findings to `.claude/afc/specs/{feature-name}/research-notes.md` (lightweight spec-scoped notes; distinct from plan phase's `research.md` which covers deep technical research)
|
|
71
|
+
- Record findings to `.claude/afc/specs/{YYYY-MM-DD}-{feature-name}/research-notes.md` (lightweight spec-scoped notes; distinct from plan phase's `research.md` which covers deep technical research)
|
|
71
72
|
- Also use findings inline as context for spec writing
|
|
72
73
|
- Tag each researched item in spec with `[RESEARCHED]` for traceability
|
|
73
74
|
|
|
@@ -75,7 +76,7 @@ Detect whether `$ARGUMENTS` references external libraries, APIs, or technologies
|
|
|
75
76
|
|
|
76
77
|
### 3. Write Spec
|
|
77
78
|
|
|
78
|
-
Create `.claude/afc/specs/{feature-name}/spec.md` following the template in `${CLAUDE_SKILL_DIR}/spec-template.md`. Read it first, then generate the spec using that structure.
|
|
79
|
+
Create `.claude/afc/specs/{YYYY-MM-DD}-{feature-name}/spec.md` following the template in `${CLAUDE_SKILL_DIR}/spec-template.md`. Read it first, then generate the spec using that structure.
|
|
79
80
|
|
|
80
81
|
### 3.5. Inline Clarification (standalone mode only)
|
|
81
82
|
|
|
@@ -127,7 +128,7 @@ When not running inside `/afc:auto`, save progress for `/afc:resume`:
|
|
|
127
128
|
|
|
128
129
|
```
|
|
129
130
|
Spec generated
|
|
130
|
-
├─ .claude/afc/specs/{feature-name}/spec.md
|
|
131
|
+
├─ .claude/afc/specs/{YYYY-MM-DD}-{feature-name}/spec.md
|
|
131
132
|
├─ User Stories: {count}
|
|
132
133
|
├─ Requirements: FR {count}, NFR {count}
|
|
133
134
|
├─ Research: {N} external references researched / skipped (all internal)
|