all-for-claudecode 2.11.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/MIGRATION.md +2 -2
- package/README.md +10 -4
- package/bin/cli.mjs +1 -0
- package/package.json +1 -1
- package/scripts/afc-consistency-check.sh +6 -6
- package/scripts/afc-doctor.sh +18 -4
- package/scripts/afc-user-prompt-submit.sh +5 -1
- package/scripts/session-start-context.sh +1 -1
- package/skills/architect/SKILL.md +1 -1
- package/skills/auto/SKILL.md +24 -24
- package/skills/clean/SKILL.md +3 -3
- package/skills/debug/SKILL.md +1 -1
- package/skills/doctor/SKILL.md +23 -19
- package/skills/implement/SKILL.md +8 -8
- package/skills/init/SKILL.md +19 -176
- package/skills/issue/SKILL.md +216 -0
- package/skills/plan/SKILL.md +1 -1
- package/skills/qa/SKILL.md +1 -1
- package/skills/resolve/SKILL.md +245 -0
- package/skills/review/SKILL.md +1 -1
- package/skills/setup/SKILL.md +219 -0
- package/skills/spec/SKILL.md +6 -5
- package/skills/tasks/SKILL.md +4 -4
- package/skills/test/SKILL.md +1 -1
- package/skills/triage/SKILL.md +1 -1
package/skills/init/SKILL.md
CHANGED
|
@@ -12,8 +12,16 @@ model: sonnet
|
|
|
12
12
|
|
|
13
13
|
# /afc:init — Project Initial Setup
|
|
14
14
|
|
|
15
|
-
> Creates
|
|
16
|
-
>
|
|
15
|
+
> Creates project-local configuration files for the all-for-claudecode plugin.
|
|
16
|
+
> Analyzes the project structure and generates config, rules, and profile.
|
|
17
|
+
> This is a **project-local** operation — it only creates files under `.claude/`.
|
|
18
|
+
> For global `~/.claude/CLAUDE.md` setup, use `/afc:setup` instead.
|
|
19
|
+
|
|
20
|
+
## Important
|
|
21
|
+
|
|
22
|
+
This skill is a **prompt-only skill** — there is NO `afc-init.sh` script.
|
|
23
|
+
All steps below are instructions for the LLM to execute directly using its allowed tools (Read, Write, Bash, Glob).
|
|
24
|
+
Do NOT attempt to run a shell script for this skill.
|
|
17
25
|
|
|
18
26
|
## Arguments
|
|
19
27
|
|
|
@@ -124,7 +132,7 @@ Generate `.claude/afc.config.md` in **free-form markdown** format:
|
|
|
124
132
|
3. **Code Style** section: describe detected language, strictness, naming conventions, lint rules in free-form prose/lists
|
|
125
133
|
4. **Project Context** section: describe framework, state management, styling, testing, DB/ORM, risks, and any other relevant project characteristics in free-form prose/lists
|
|
126
134
|
|
|
127
|
-
Reference `${
|
|
135
|
+
Reference `${CLAUDE_SKILL_DIR}/../../templates/afc.config.template.md` for the section structure.
|
|
128
136
|
Write sections as natural descriptions — **no YAML code blocks** except for CI Commands.
|
|
129
137
|
For items that cannot be inferred: note `TODO: Adjust for your project` inline.
|
|
130
138
|
Save to `.claude/afc.config.md`.
|
|
@@ -137,7 +145,7 @@ Generate `.claude/rules/afc-project.md` — a concise summary of project rules t
|
|
|
137
145
|
2. If `.claude/rules/afc-project.md` already exists:
|
|
138
146
|
- If it contains `<!-- afc:auto-generated` marker: overwrite silently (auto-generated file, safe to regenerate)
|
|
139
147
|
- If it does NOT contain the marker: ask user "Project rules file exists (user-managed). Overwrite with auto-generated version?" — skip if declined
|
|
140
|
-
3. Reference `${
|
|
148
|
+
3. Reference `${CLAUDE_SKILL_DIR}/../../templates/afc-project.template.md` for section structure
|
|
141
149
|
4. Fill in from the analysis performed in Step 3:
|
|
142
150
|
- **Architecture**: pattern, key layers, import rules, path alias — concise bullet points
|
|
143
151
|
- **Code Style**: language, naming conventions, lint rules — concise bullet points
|
|
@@ -153,195 +161,30 @@ Generate `.claude/afc/project-profile.md` for expert consultation agents:
|
|
|
153
161
|
|
|
154
162
|
1. Create `.claude/afc/` directory if it does not exist
|
|
155
163
|
2. If `.claude/afc/project-profile.md` already exists: skip (do not overwrite)
|
|
156
|
-
3. If not exists: generate from the detected project information using `${
|
|
164
|
+
3. If not exists: generate from the detected project information using `${CLAUDE_SKILL_DIR}/../../templates/project-profile.template.md` as the structure
|
|
157
165
|
- Fill in Stack, Architecture, and Domain fields from the analysis in Step 3
|
|
158
166
|
- Leave Team, Scale, and Constraints as template placeholders for user to fill
|
|
159
167
|
4. Print: `Project profile: .claude/afc/project-profile.md (review and adjust team/scale/domain fields)`
|
|
160
168
|
|
|
161
|
-
### 5.
|
|
162
|
-
|
|
163
|
-
Read `~/.claude/CLAUDE.md` and analyze in the following order.
|
|
164
|
-
|
|
165
|
-
#### Step 1. Check for Existing all-for-claudecode or Legacy SELFISH Block
|
|
166
|
-
|
|
167
|
-
Check for presence of `<!-- AFC:START -->` or `<!-- SELFISH:START -->` marker.
|
|
168
|
-
- If `<!-- AFC:START -->` found: replace with latest version (proceed to Step 3)
|
|
169
|
-
- If `<!-- SELFISH:START -->` found (legacy v1.x): remove the entire `SELFISH:START` ~ `SELFISH:END` block, then proceed to inject new all-for-claudecode block at Step 4. Print: `Migrated: SELFISH block → all-for-claudecode block in ~/.claude/CLAUDE.md`
|
|
170
|
-
- If neither found: proceed to Step 2
|
|
171
|
-
|
|
172
|
-
#### Step 2. Conflict Pattern Scan
|
|
173
|
-
|
|
174
|
-
Search CLAUDE.md for the patterns below. **IMPORTANT: EXCLUDE content inside any marker blocks (`<!-- *:START -->` ~ `<!-- *:END -->`). Only scan unguarded content outside marker blocks.** Other tools (OMC, etc.) manage their own blocks — their internal agent names are not conflicts.
|
|
175
|
-
|
|
176
|
-
**A. Marker Block Detection**
|
|
177
|
-
- Regex: `<!-- ([A-Z0-9_-]+):START -->` ~ `<!-- \1:END -->`
|
|
178
|
-
- Record all found block names and line ranges
|
|
179
|
-
- **Strip these ranges from the scan target** — only scan lines NOT inside any marker block
|
|
180
|
-
|
|
181
|
-
**B. Agent Routing Conflict Detection**
|
|
182
|
-
In the **unguarded** (non-marker-block) content only, find directives containing these keywords:
|
|
183
|
-
- `executor`, `deep-executor` — conflicts with afc:implement
|
|
184
|
-
- `code-reviewer`, `quality-reviewer`, `style-reviewer`, `api-reviewer`, `security-reviewer`, `performance-reviewer` — conflicts with afc:review
|
|
185
|
-
- `debugger` (in agent routing context) — conflicts with afc:debug
|
|
186
|
-
- `planner` (in agent routing context) — conflicts with afc:plan
|
|
187
|
-
- `analyst`, `verifier` — conflicts with afc:validate
|
|
188
|
-
- `test-engineer` — conflicts with afc:test
|
|
189
|
-
|
|
190
|
-
**C. Skill Routing Conflict Detection**
|
|
191
|
-
In the **unguarded** content only, find these patterns:
|
|
192
|
-
- Another tool's skill trigger table (e.g., tables like `| situation | skill |`)
|
|
193
|
-
- `delegate to`, `route to`, `always use` + agent name combinations
|
|
194
|
-
- Directives related to `auto-trigger`, `intent detection`, `intent-based routing`
|
|
195
|
-
|
|
196
|
-
**D. Legacy Block Detection**
|
|
197
|
-
Previous versions without markers or with old branding:
|
|
198
|
-
- `## all-for-claudecode Auto-Trigger Rules`
|
|
199
|
-
- `## all-for-claudecode Integration`
|
|
200
|
-
- `<!-- SELFISH:START -->` ~ `<!-- SELFISH:END -->` (v1.x block — should have been caught in Step 1, but double-check here)
|
|
201
|
-
- `<selfish-pipeline>` / `</selfish-pipeline>` XML tags
|
|
202
|
-
|
|
203
|
-
#### Step 3. Report Conflicts and User Choice
|
|
204
|
-
|
|
205
|
-
**No conflicts found** → proceed directly to Step 4
|
|
206
|
-
|
|
207
|
-
**Conflicts found** → report to user and present options:
|
|
208
|
-
|
|
209
|
-
```
|
|
210
|
-
📋 CLAUDE.md Scan Results
|
|
211
|
-
├─ Tool blocks found: {block name list} (lines {range})
|
|
212
|
-
├─ Agent routing conflicts: {conflict count}
|
|
213
|
-
│ e.g., "executor" (line XX) ↔ afc:implement
|
|
214
|
-
│ e.g., "code-reviewer" (line XX) ↔ afc:review
|
|
215
|
-
└─ Skill routing conflicts: {conflict count}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
Ask user:
|
|
219
|
-
|
|
220
|
-
> "Directives overlapping with afc were found. How would you like to proceed?"
|
|
221
|
-
>
|
|
222
|
-
> 1. **afc-exclusive mode** — Adds afc override comments to conflicting agent routing directives.
|
|
223
|
-
> Does not modify other tools' marker block contents; covers them with override rules in the all-for-claudecode block.
|
|
224
|
-
> 2. **coexistence mode** — Ignores conflicts and adds only the afc block.
|
|
225
|
-
> Since it's at the end of the file, afc directives will likely take priority, but may be non-deterministic on conflict.
|
|
226
|
-
> 3. **manual cleanup** — Shows only the current conflict list and stops.
|
|
227
|
-
> User manually cleans up CLAUDE.md then runs init again.
|
|
228
|
-
|
|
229
|
-
Based on choice:
|
|
230
|
-
- **Option 1**: all-for-claudecode block includes explicit override rules (activates `<conflict-overrides>` section from base template)
|
|
231
|
-
- **Option 2**: all-for-claudecode block added without overrides (base template as-is)
|
|
232
|
-
- **Option 3**: Print conflict list only and abort without modifying CLAUDE.md
|
|
233
|
-
|
|
234
|
-
#### Step 4. Inject all-for-claudecode Block
|
|
235
|
-
|
|
236
|
-
**Version resolution**: Read `${CLAUDE_PLUGIN_ROOT}/package.json` and extract the `"version"` field. Use this value as `{PLUGIN_VERSION}` in the template below.
|
|
237
|
-
|
|
238
|
-
Add the following block at the **very end** of the file (later-positioned directives have higher priority).
|
|
239
|
-
|
|
240
|
-
Replace existing all-for-claudecode block if present, otherwise append.
|
|
241
|
-
If legacy block (`## all-for-claudecode Auto-Trigger Rules` etc.) exists, remove it then append.
|
|
242
|
-
|
|
243
|
-
```markdown
|
|
244
|
-
<!-- AFC:START -->
|
|
245
|
-
<!-- AFC:VERSION:{PLUGIN_VERSION} -->
|
|
246
|
-
<afc-pipeline>
|
|
247
|
-
IMPORTANT: For requests matching the afc skill routing table below, always invoke the corresponding skill via the Skill tool. Do not substitute with other agents or tools.
|
|
248
|
-
|
|
249
|
-
## Skill Routing
|
|
250
|
-
|
|
251
|
-
Classify the user's intent and route to the matching skill. Use semantic understanding — not keyword matching.
|
|
252
|
-
|
|
253
|
-
| User Intent | Skill | Route When |
|
|
254
|
-
|-------------|-------|------------|
|
|
255
|
-
| Full lifecycle | `afc:auto` | User wants end-to-end feature development, or the request is a non-trivial new feature without an existing plan |
|
|
256
|
-
| Specification | `afc:spec` | User wants to define or write requirements, acceptance criteria, or success conditions |
|
|
257
|
-
| Design/Plan | `afc:plan` | User wants to plan HOW to implement before coding — approach, architecture decisions, design |
|
|
258
|
-
| Implement | `afc:implement` | User wants specific code changes with a clear scope: add feature, refactor, modify. Requires existing plan or precise instructions |
|
|
259
|
-
| Review | `afc:review` | User wants code review, PR review, or quality check on existing/changed code |
|
|
260
|
-
| Debug/Fix | `afc:debug` | User reports a bug, error, or broken behavior and wants diagnosis and fix |
|
|
261
|
-
| Test | `afc:test` | User wants to write tests, improve coverage, or verify behavior |
|
|
262
|
-
| Validate | `afc:validate` | User wants to check consistency or validate existing pipeline artifacts |
|
|
263
|
-
| Analyze | `afc:analyze` | User wants to understand, explore, or audit existing code without modifying it |
|
|
264
|
-
| QA Audit | `afc:qa` | User wants project quality audit, test confidence check, or runtime quality gaps |
|
|
265
|
-
| Research | `afc:research` | User wants deep investigation of external tools, libraries, APIs, or technical concepts |
|
|
266
|
-
| Ideate | `afc:ideate` | User wants to brainstorm ideas, explore possibilities, or draft a product brief |
|
|
267
|
-
| Consult | `afc:consult` | User wants expert advice on a decision: library choice, architecture direction, legal/security/infra guidance |
|
|
268
|
-
| Launch | `afc:launch` | User wants to prepare a release — generate changelog, release notes, version bump, or tag |
|
|
269
|
-
| Tasks | `afc:tasks` | User explicitly wants to decompose work into a task breakdown |
|
|
270
|
-
| Ambiguous | `afc:clarify` | User's request is too vague or underspecified to route confidently |
|
|
271
|
-
|
|
272
|
-
### Routing Rules
|
|
273
|
-
|
|
274
|
-
1. **Auto vs Implement**: A new feature request without an existing plan routes to `afc:auto`. Only use `afc:implement` when the user has a clear, scoped task or an existing plan/spec.
|
|
275
|
-
2. **Compound intents**: Route to the primary intent. The pipeline handles sequencing internally.
|
|
276
|
-
3. **Design-first**: When scope is non-trivial (multiple files, architectural decisions needed), prefer `afc:auto` or `afc:plan` over direct `afc:implement`.
|
|
277
|
-
|
|
278
|
-
User-only (not auto-triggered — when user invokes directly via `/afc:X`, execute the skill immediately):
|
|
279
|
-
- `afc:doctor` — plugin health check
|
|
280
|
-
- `afc:architect` — architecture review
|
|
281
|
-
- `afc:security` — security scan
|
|
282
|
-
- `afc:checkpoint` — session save
|
|
283
|
-
- `afc:resume` — session restore
|
|
284
|
-
- `afc:principles` — project principles management
|
|
285
|
-
- `afc:clean` — pipeline cleanup (artifact cleanup, dead code scan, pipeline flag release)
|
|
286
|
-
- `afc:triage` — parallel PR/issue triage
|
|
287
|
-
- `afc:learner` — pattern learning or rule promotion
|
|
288
|
-
- `afc:pr-comment` — post PR review comments to GitHub
|
|
289
|
-
- `afc:release-notes` — generate release notes from git history
|
|
290
|
-
|
|
291
|
-
## Pipeline
|
|
292
|
-
|
|
293
|
-
spec → plan → implement → review → clean
|
|
294
|
-
|
|
295
|
-
## Override Rules
|
|
296
|
-
|
|
297
|
-
NEVER use executor, deep-executor, debugger, planner, analyst, verifier, test-engineer, code-reviewer, quality-reviewer, style-reviewer, api-reviewer, security-reviewer, performance-reviewer for tasks that an afc skill covers above. ALWAYS invoke the afc skill instead.
|
|
298
|
-
|
|
299
|
-
## Source Verification
|
|
300
|
-
|
|
301
|
-
When analyzing or making claims about external systems, APIs, SDKs, or third-party tools:
|
|
302
|
-
- Verify against official documentation, NOT project-internal docs
|
|
303
|
-
- Do not hardcode reference data when delegating to sub-agents — instruct them to look up primary sources
|
|
304
|
-
- Cross-verify high-severity findings before reporting
|
|
305
|
-
</afc-pipeline>
|
|
306
|
-
<!-- AFC:END -->
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**When Option 1 (afc-exclusive mode) is selected**, the following `<conflict-overrides>` section is added:
|
|
310
|
-
|
|
311
|
-
Add the following directly below the Override Rules:
|
|
312
|
-
|
|
313
|
-
```markdown
|
|
314
|
-
## Detected Conflicts
|
|
315
|
-
|
|
316
|
-
This environment has other agent routing tools that overlap with afc.
|
|
317
|
-
The following rules were auto-generated to resolve conflicts:
|
|
318
|
-
- The Skill Routing table above always takes priority over the agent routing directives of {detected tool blocks}
|
|
319
|
-
- This block is at the end of the file and therefore has the highest priority
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### 6. Final Output
|
|
169
|
+
### 5. Final Output
|
|
323
170
|
|
|
324
171
|
```
|
|
325
|
-
all-for-claudecode
|
|
172
|
+
all-for-claudecode project init complete
|
|
326
173
|
├─ Config: .claude/afc.config.md
|
|
327
174
|
├─ Rules: .claude/rules/afc-project.md (auto-loaded)
|
|
175
|
+
├─ Profile: .claude/afc/project-profile.md
|
|
328
176
|
├─ Framework: {detected framework}
|
|
329
177
|
├─ Architecture: {detected style}
|
|
330
178
|
├─ Package Manager: {detected manager}
|
|
331
179
|
├─ Auto-inferred: {inferred item count}
|
|
332
180
|
├─ TODO: {items requiring manual review}
|
|
333
|
-
|
|
334
|
-
│ {if conflicts found} └─ Conflict resolution: {afc-exclusive|coexistence|user cleanup}
|
|
335
|
-
└─ Next step: /afc:spec or /afc:auto
|
|
181
|
+
└─ Next step: /afc:setup (global routing) or /afc:auto (start building)
|
|
336
182
|
```
|
|
337
183
|
|
|
338
184
|
## Notes
|
|
339
185
|
|
|
186
|
+
- **Idempotent**: safe to run multiple times. Existing config prompts for overwrite confirmation; auto-generated rules are silently regenerated.
|
|
187
|
+
- **Project-local only**: this skill only creates files under `.claude/`. It never touches `~/.claude/CLAUDE.md`. For global routing setup, use `/afc:setup`.
|
|
340
188
|
- **Overwrite caution**: If config file already exists, always confirm with user.
|
|
341
189
|
- **Inference limits**: Auto-inference is best-effort. User may need to review and adjust.
|
|
342
190
|
- **`.claude/` directory**: Created automatically if it does not exist.
|
|
343
|
-
- **Global CLAUDE.md principles**:
|
|
344
|
-
- Never modify content outside the `<!-- AFC:START/END -->` markers (the `AFC` prefix in markers is a compact technical identifier)
|
|
345
|
-
- Never modify content inside other tools' marker blocks (`<!-- *:START/END -->`)
|
|
346
|
-
- Always place the all-for-claudecode block at the very end of the file (ensures priority)
|
|
347
|
-
- Conflict resolution is handled only via override rules (do not delete or modify other blocks)
|
|
@@ -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.
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -119,7 +119,7 @@ After writing plan.md, verify all paths in the File Change Map:
|
|
|
119
119
|
|
|
120
120
|
### 5. Critic Loop
|
|
121
121
|
|
|
122
|
-
> **Always** read `${
|
|
122
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
123
123
|
|
|
124
124
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
125
125
|
|
package/skills/qa/SKILL.md
CHANGED
|
@@ -128,7 +128,7 @@ For each active category:
|
|
|
128
128
|
|
|
129
129
|
### 5. Critic Loop
|
|
130
130
|
|
|
131
|
-
**Always** read `${
|
|
131
|
+
**Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it. Safety cap: **5 passes**.
|
|
132
132
|
|
|
133
133
|
Focus the critic on:
|
|
134
134
|
- Are the findings actionable or just noise?
|