all-for-claudecode 2.9.0 → 2.10.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 +2 -2
- package/MIGRATION.md +1 -1
- package/package.json +2 -2
- package/schemas/plugin.schema.json +2 -2
- package/scripts/afc-consistency-check.sh +23 -23
- package/scripts/afc-doctor.sh +10 -10
- package/scripts/afc-qa-audit.sh +1 -1
- package/scripts/afc-sync-cache.sh +1 -1
- package/{commands/checkpoint.md → skills/checkpoint/SKILL.md} +1 -1
- package/{commands/clean.md → skills/clean/SKILL.md} +1 -1
- package/{commands/doctor.md → skills/doctor/SKILL.md} +1 -1
- package/{commands/init.md → skills/init/SKILL.md} +13 -13
- package/{commands/plan.md → skills/plan/SKILL.md} +1 -122
- package/skills/plan/plan-template.md +118 -0
- package/{commands/principles.md → skills/principles/SKILL.md} +1 -1
- package/{commands/resume.md → skills/resume/SKILL.md} +1 -1
- package/{commands/spec.md → skills/spec/SKILL.md} +1 -76
- package/skills/spec/spec-template.md +72 -0
- /package/{commands/analyze.md → skills/analyze/SKILL.md} +0 -0
- /package/{commands/architect.md → skills/architect/SKILL.md} +0 -0
- /package/{commands/auto.md → skills/auto/SKILL.md} +0 -0
- /package/{commands/clarify.md → skills/clarify/SKILL.md} +0 -0
- /package/{commands/consult.md → skills/consult/SKILL.md} +0 -0
- /package/{commands/debug.md → skills/debug/SKILL.md} +0 -0
- /package/{commands/ideate.md → skills/ideate/SKILL.md} +0 -0
- /package/{commands/implement.md → skills/implement/SKILL.md} +0 -0
- /package/{commands/launch.md → skills/launch/SKILL.md} +0 -0
- /package/{commands/learner.md → skills/learner/SKILL.md} +0 -0
- /package/{commands/pr-comment.md → skills/pr-comment/SKILL.md} +0 -0
- /package/{commands/qa.md → skills/qa/SKILL.md} +0 -0
- /package/{commands/release-notes.md → skills/release-notes/SKILL.md} +0 -0
- /package/{commands/research.md → skills/research/SKILL.md} +0 -0
- /package/{commands/review.md → skills/review/SKILL.md} +0 -0
- /package/{commands/security.md → skills/security/SKILL.md} +0 -0
- /package/{docs → skills/spec}/nfr-templates.md +0 -0
- /package/{commands/tasks.md → skills/tasks/SKILL.md} +0 -0
- /package/{commands/test.md → skills/test/SKILL.md} +0 -0
- /package/{commands/triage.md → skills/triage/SKILL.md} +0 -0
- /package/{commands/validate.md → skills/validate/SKILL.md} +0 -0
|
@@ -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.10.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.10.0",
|
|
17
17
|
"category": "automation",
|
|
18
18
|
"tags": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"]
|
|
19
19
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "afc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.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",
|
|
7
7
|
"repository": "https://github.com/jhlee0409/all-for-claudecode",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"keywords": ["pipeline", "automation", "spec", "plan", "implement", "review", "critic-loop"],
|
|
10
|
-
"
|
|
10
|
+
"skills": "./skills/"
|
|
11
11
|
}
|
package/MIGRATION.md
CHANGED
|
@@ -112,7 +112,7 @@ git tag -d selfish/pre-auto 2>/dev/null
|
|
|
112
112
|
|------|--------|-------|
|
|
113
113
|
| Installation | `git clone` + `./install.sh` | `/plugin install <url>` |
|
|
114
114
|
| Command separator | `.` (`/afc-legacy.spec`) | `:` (`/afc:spec`) |
|
|
115
|
-
| Command location | `~/.claude/commands/afc-legacy.*.md` | `
|
|
115
|
+
| Command location | `~/.claude/commands/afc-legacy.*.md` | `skills/*/SKILL.md` inside the plugin |
|
|
116
116
|
| Hook scripts | `<project>/.claude/hooks/*.sh` | `scripts/*.sh` inside the plugin |
|
|
117
117
|
| Hook config | `<project>/.claude/settings.json` | `hooks/hooks.json` inside the plugin |
|
|
118
118
|
| Config file | `.claude/afc.config.md` (unchanged) | `.claude/afc.config.md` (unchanged) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "all-for-claudecode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Claude Code plugin that automates the full dev cycle — spec, plan, implement, review, clean.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"all-for-claudecode": "bin/cli.mjs"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"agents/",
|
|
11
11
|
"bin/",
|
|
12
|
-
"
|
|
12
|
+
"skills/",
|
|
13
13
|
"docs/",
|
|
14
14
|
"hooks/",
|
|
15
15
|
"schemas/",
|
|
@@ -42,7 +42,7 @@ get_cmd_field() {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
# --- Check 1: Config Placeholder Validation ---
|
|
45
|
-
# Verify all {config.*} references in
|
|
45
|
+
# Verify all {config.*} references in skills/ and docs/ map to known config keys
|
|
46
46
|
|
|
47
47
|
check_config_placeholders() {
|
|
48
48
|
local template="$PROJECT_DIR/templates/afc.config.template.md"
|
|
@@ -66,9 +66,9 @@ check_config_placeholders() {
|
|
|
66
66
|
local valid_keys
|
|
67
67
|
valid_keys=$(printf '%s\n%s\n' "$yaml_keys" "$section_keys" | sort -u)
|
|
68
68
|
|
|
69
|
-
# Extract all {config.*} references from
|
|
69
|
+
# Extract all {config.*} references from skills and docs
|
|
70
70
|
local refs
|
|
71
|
-
refs=$(grep -rohE '\{config\.[a-z_]+\}' "$PROJECT_DIR/
|
|
71
|
+
refs=$(grep -rohE '\{config\.[a-z_]+\}' "$PROJECT_DIR/skills/" "$PROJECT_DIR/docs/" 2>/dev/null \
|
|
72
72
|
| sed 's/{config\.//;s/}//' \
|
|
73
73
|
| sort -u || true)
|
|
74
74
|
|
|
@@ -104,9 +104,9 @@ check_agent_names() {
|
|
|
104
104
|
| tr -d '"' \
|
|
105
105
|
| sort -u || true)
|
|
106
106
|
|
|
107
|
-
# Extract subagent_type references from
|
|
107
|
+
# Extract subagent_type references from skills (afc:agent-name pattern)
|
|
108
108
|
local referenced_agents
|
|
109
|
-
referenced_agents=$(grep -rohE 'subagent_type:[[:space:]]*"afc:[^"]*"' "$PROJECT_DIR/
|
|
109
|
+
referenced_agents=$(grep -rohE 'subagent_type:[[:space:]]*"afc:[^"]*"' "$PROJECT_DIR/skills/" 2>/dev/null \
|
|
110
110
|
| sed 's/.*"afc://;s/"//' \
|
|
111
111
|
| sort -u || true)
|
|
112
112
|
|
|
@@ -122,7 +122,7 @@ check_agent_names() {
|
|
|
122
122
|
|
|
123
123
|
# Check for unprefixed subagent_type that should have afc: prefix
|
|
124
124
|
local unprefixed
|
|
125
|
-
unprefixed=$(grep -rohE 'subagent_type:[[:space:]]*"afc-[^"]*"' "$PROJECT_DIR/
|
|
125
|
+
unprefixed=$(grep -rohE 'subagent_type:[[:space:]]*"afc-[^"]*"' "$PROJECT_DIR/skills/" 2>/dev/null \
|
|
126
126
|
| sed 's/.*subagent_type:[[:space:]]*"//;s/".*//' \
|
|
127
127
|
| sort -u || true)
|
|
128
128
|
for ref in $unprefixed; do
|
|
@@ -254,22 +254,22 @@ check_phase_ssot() {
|
|
|
254
254
|
fi
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
# --- Check 7:
|
|
258
|
-
# Verify
|
|
257
|
+
# --- Check 7: Skill Documentation Cross-Reference ---
|
|
258
|
+
# Verify skills are documented in README.md, init/SKILL.md, and CLAUDE.md
|
|
259
259
|
|
|
260
260
|
check_command_docs() {
|
|
261
|
-
local
|
|
262
|
-
[ -d "$
|
|
261
|
+
local skills_dir="$PROJECT_DIR/skills"
|
|
262
|
+
[ -d "$skills_dir" ] || return
|
|
263
263
|
|
|
264
264
|
local readme="$PROJECT_DIR/README.md"
|
|
265
|
-
local
|
|
265
|
+
local init_skill="$skills_dir/init/SKILL.md"
|
|
266
266
|
local claude_md="$PROJECT_DIR/CLAUDE.md"
|
|
267
267
|
local issues=0
|
|
268
268
|
|
|
269
|
-
for
|
|
270
|
-
[ -f "$
|
|
269
|
+
for skill_file in "$skills_dir"/*/SKILL.md; do
|
|
270
|
+
[ -f "$skill_file" ] || continue
|
|
271
271
|
local cmd_name
|
|
272
|
-
cmd_name=$(basename "$
|
|
272
|
+
cmd_name=$(basename "$(dirname "$skill_file")")
|
|
273
273
|
|
|
274
274
|
# Sub-check A: README.md should mention /afc:{name}
|
|
275
275
|
if [ -f "$readme" ]; then
|
|
@@ -279,29 +279,29 @@ check_command_docs() {
|
|
|
279
279
|
fi
|
|
280
280
|
fi
|
|
281
281
|
|
|
282
|
-
# Sub-check B: init.md should mention afc:{name} for user-invocable
|
|
282
|
+
# Sub-check B: init/SKILL.md should mention afc:{name} for user-invocable skills
|
|
283
283
|
local invocable
|
|
284
|
-
invocable=$(get_cmd_field "$
|
|
285
|
-
if [ "$invocable" != "false" ] && [ -f "$
|
|
286
|
-
if ! grep -qE "afc:${cmd_name}([^a-z0-9-]|$)" "$
|
|
287
|
-
warn "
|
|
284
|
+
invocable=$(get_cmd_field "$skill_file" "user-invocable")
|
|
285
|
+
if [ "$invocable" != "false" ] && [ -f "$init_skill" ]; then
|
|
286
|
+
if ! grep -qE "afc:${cmd_name}([^a-z0-9-]|$)" "$init_skill" 2>/dev/null; then
|
|
287
|
+
warn "Skill '$cmd_name' missing from init/SKILL.md skill routing"
|
|
288
288
|
issues=$((issues + 1))
|
|
289
289
|
fi
|
|
290
290
|
fi
|
|
291
291
|
|
|
292
|
-
# Sub-check C: CLAUDE.md fork list for context:fork
|
|
292
|
+
# Sub-check C: CLAUDE.md fork list for context:fork skills
|
|
293
293
|
local ctx
|
|
294
|
-
ctx=$(get_cmd_field "$
|
|
294
|
+
ctx=$(get_cmd_field "$skill_file" "context")
|
|
295
295
|
if [ "$ctx" = "fork" ] && [ -f "$claude_md" ]; then
|
|
296
296
|
if ! grep "context: fork" "$claude_md" 2>/dev/null | grep -qE "([(, ])${cmd_name}([,) ]|$)"; then
|
|
297
|
-
warn "
|
|
297
|
+
warn "Skill '$cmd_name' (context:fork) missing from CLAUDE.md fork list"
|
|
298
298
|
issues=$((issues + 1))
|
|
299
299
|
fi
|
|
300
300
|
fi
|
|
301
301
|
done
|
|
302
302
|
|
|
303
303
|
if [ "$issues" -eq 0 ]; then
|
|
304
|
-
ok "
|
|
304
|
+
ok "Skill docs: all skills referenced in README.md, init/SKILL.md, CLAUDE.md"
|
|
305
305
|
fi
|
|
306
306
|
}
|
|
307
307
|
|
package/scripts/afc-doctor.sh
CHANGED
|
@@ -457,8 +457,8 @@ if [ "$IS_DEV" = true ]; then
|
|
|
457
457
|
# Cache sync check
|
|
458
458
|
CACHE_DIR="$HOME/.claude/plugins/cache/all-for-claudecode/afc/$V_PKG"
|
|
459
459
|
if [ -d "$CACHE_DIR" ]; then
|
|
460
|
-
CACHE_AUTO="$CACHE_DIR/
|
|
461
|
-
SOURCE_AUTO="$PROJECT_DIR/
|
|
460
|
+
CACHE_AUTO="$CACHE_DIR/skills/auto/SKILL.md"
|
|
461
|
+
SOURCE_AUTO="$PROJECT_DIR/skills/auto/SKILL.md"
|
|
462
462
|
if [ -f "$CACHE_AUTO" ] && [ -f "$SOURCE_AUTO" ]; then
|
|
463
463
|
if diff -q "$SOURCE_AUTO" "$CACHE_AUTO" >/dev/null 2>&1; then
|
|
464
464
|
pass "Cache in sync"
|
|
@@ -472,21 +472,21 @@ if [ "$IS_DEV" = true ]; then
|
|
|
472
472
|
warn "Plugin cache directory not found" "install plugin first, then npm run sync:cache"
|
|
473
473
|
fi
|
|
474
474
|
|
|
475
|
-
# --- Category 10:
|
|
476
|
-
section "
|
|
475
|
+
# --- Category 10: Skill Definitions (dev only) ---
|
|
476
|
+
section "Skill Definitions (dev)"
|
|
477
477
|
|
|
478
|
-
|
|
479
|
-
if [ -d "$
|
|
478
|
+
SKILL_DIR="$PROJECT_DIR/skills"
|
|
479
|
+
if [ -d "$SKILL_DIR" ]; then
|
|
480
480
|
CMD_COUNT=0
|
|
481
481
|
CMD_FM_MISSING=""
|
|
482
482
|
CMD_FIELD_MISSING=""
|
|
483
483
|
CMD_NAME_MISMATCH=""
|
|
484
484
|
CMD_AGENT_MISSING=""
|
|
485
485
|
|
|
486
|
-
for cmd_file in "$
|
|
486
|
+
for cmd_file in "$SKILL_DIR"/*/SKILL.md; do
|
|
487
487
|
[ -f "$cmd_file" ] || continue
|
|
488
488
|
CMD_COUNT=$((CMD_COUNT + 1))
|
|
489
|
-
BASENAME=$(basename "$cmd_file"
|
|
489
|
+
BASENAME=$(basename "$(dirname "$cmd_file")")
|
|
490
490
|
|
|
491
491
|
# Check frontmatter exists (--- ... ---)
|
|
492
492
|
if ! head -1 "$cmd_file" | grep -q '^---' 2>/dev/null; then
|
|
@@ -658,9 +658,9 @@ if [ "$IS_DEV" = true ]; then
|
|
|
658
658
|
# --- Category 12: Doc References (dev only) ---
|
|
659
659
|
section "Doc References (dev)"
|
|
660
660
|
|
|
661
|
-
# Scan
|
|
661
|
+
# Scan skills and agents for docs/ references
|
|
662
662
|
DOC_REFS_MISSING=""
|
|
663
|
-
for src_file in "$
|
|
663
|
+
for src_file in "$SKILL_DIR"/*/SKILL.md "$AGENT_DIR"/*.md; do
|
|
664
664
|
[ -f "$src_file" ] || continue
|
|
665
665
|
while IFS= read -r ref; do
|
|
666
666
|
[ -z "$ref" ] && continue
|
package/scripts/afc-qa-audit.sh
CHANGED
|
@@ -452,7 +452,7 @@ check_d1_cache_divergence() {
|
|
|
452
452
|
local diverged=0
|
|
453
453
|
local checked=0
|
|
454
454
|
|
|
455
|
-
for subdir in
|
|
455
|
+
for subdir in skills scripts hooks; do
|
|
456
456
|
local src_dir="$PROJECT_DIR/$subdir"
|
|
457
457
|
local cache_subdir="$cache_version_dir/$subdir"
|
|
458
458
|
[ -d "$src_dir" ] && [ -d "$cache_subdir" ] || continue
|
|
@@ -31,7 +31,7 @@ if [ ! -d "$CACHE_DIR" ]; then
|
|
|
31
31
|
fi
|
|
32
32
|
|
|
33
33
|
# Sync directories and files
|
|
34
|
-
DIRS_TO_SYNC="
|
|
34
|
+
DIRS_TO_SYNC="skills agents scripts hooks docs schemas templates"
|
|
35
35
|
FILES_TO_SYNC="package.json"
|
|
36
36
|
|
|
37
37
|
for dir in $DIRS_TO_SYNC; do
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: afc:clean
|
|
3
3
|
description: "Pipeline artifact cleanup and codebase hygiene — use when the user asks to clean up artifacts, remove pipeline files, or finalize after implementation"
|
|
4
4
|
argument-hint: "[feature name — defaults to current pipeline feature]"
|
|
5
|
-
model:
|
|
5
|
+
model: sonnet
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# /afc:clean — Pipeline Cleanup
|
|
@@ -7,7 +7,7 @@ allowed-tools:
|
|
|
7
7
|
- Write
|
|
8
8
|
- Bash
|
|
9
9
|
- Glob
|
|
10
|
-
model:
|
|
10
|
+
model: sonnet
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# /afc:init — Project Initial Setup
|
|
@@ -271,18 +271,18 @@ Classify the user's intent and route to the matching skill. Use semantic underst
|
|
|
271
271
|
2. **Compound intents**: Route to the primary intent. The pipeline handles sequencing internally.
|
|
272
272
|
3. **Design-first**: When scope is non-trivial (multiple files, architectural decisions needed), prefer `afc:auto` or `afc:plan` over direct `afc:implement`.
|
|
273
273
|
|
|
274
|
-
User-only (not auto-triggered —
|
|
275
|
-
- `afc:doctor` —
|
|
276
|
-
- `afc:architect` —
|
|
277
|
-
- `afc:security` —
|
|
278
|
-
- `afc:checkpoint` —
|
|
279
|
-
- `afc:resume` —
|
|
280
|
-
- `afc:principles` —
|
|
281
|
-
- `afc:clean` —
|
|
282
|
-
- `afc:triage` —
|
|
283
|
-
- `afc:learner` —
|
|
284
|
-
- `afc:pr-comment` —
|
|
285
|
-
- `afc:release-notes` —
|
|
274
|
+
User-only (not auto-triggered — when user invokes directly via `/afc:X`, execute the skill immediately):
|
|
275
|
+
- `afc:doctor` — plugin health check
|
|
276
|
+
- `afc:architect` — architecture review
|
|
277
|
+
- `afc:security` — security scan
|
|
278
|
+
- `afc:checkpoint` — session save
|
|
279
|
+
- `afc:resume` — session restore
|
|
280
|
+
- `afc:principles` — project principles management
|
|
281
|
+
- `afc:clean` — pipeline cleanup (artifact cleanup, dead code scan, pipeline flag release)
|
|
282
|
+
- `afc:triage` — parallel PR/issue triage
|
|
283
|
+
- `afc:learner` — pattern learning or rule promotion
|
|
284
|
+
- `afc:pr-comment` — post PR review comments to GitHub
|
|
285
|
+
- `afc:release-notes` — generate release notes from git history
|
|
286
286
|
|
|
287
287
|
## Pipeline
|
|
288
288
|
|
|
@@ -101,128 +101,7 @@ Future pipelines can reference prior research to avoid redundant investigation.
|
|
|
101
101
|
|
|
102
102
|
### 4. Phase 1 — Write Design
|
|
103
103
|
|
|
104
|
-
Create `.claude/afc/specs/{feature}/plan.md`.
|
|
105
|
-
|
|
106
|
-
```markdown
|
|
107
|
-
# Implementation Plan: {feature name}
|
|
108
|
-
|
|
109
|
-
## Summary
|
|
110
|
-
{summary of core requirements from spec + technical approach, 3-5 sentences}
|
|
111
|
-
|
|
112
|
-
## Technical Context
|
|
113
|
-
{Summarize key project settings from .claude/rules/afc-project.md (auto-loaded) and afc.config.md}
|
|
114
|
-
- **Constraints**: {constraints extracted from spec}
|
|
115
|
-
|
|
116
|
-
## Principles Check
|
|
117
|
-
{if .claude/afc/memory/principles.md exists: validation results against MUST principles}
|
|
118
|
-
{if violations possible: state explicitly + justification}
|
|
119
|
-
|
|
120
|
-
## Architecture Decision
|
|
121
|
-
### Approach
|
|
122
|
-
{core idea of the chosen design}
|
|
123
|
-
|
|
124
|
-
### Architecture Placement
|
|
125
|
-
| Layer | Path | Role |
|
|
126
|
-
|-------|------|------|
|
|
127
|
-
| {entities/features/widgets/shared} | {path} | {description} |
|
|
128
|
-
|
|
129
|
-
### State Management Strategy (omit if not applicable)
|
|
130
|
-
{what combination of Zustand store / React Query / Context is used where}
|
|
131
|
-
|
|
132
|
-
### API Design (omit if not applicable)
|
|
133
|
-
{plan for new API endpoints or use of existing APIs}
|
|
134
|
-
|
|
135
|
-
## Test Strategy
|
|
136
|
-
|
|
137
|
-
> Written alongside the File Change Map. Classify each implementation file and decide test coverage level.
|
|
138
|
-
> Determines which files need test coverage and at what level.
|
|
139
|
-
|
|
140
|
-
### Code Classification
|
|
141
|
-
|
|
142
|
-
| File | Code Type | Test Need | Reason |
|
|
143
|
-
|------|-----------|:---------:|--------|
|
|
144
|
-
| {path} | {business-logic / pure-function / side-effect / framework / config / UI} | {required / optional / unnecessary} | {brief justification} |
|
|
145
|
-
|
|
146
|
-
> Classification guide:
|
|
147
|
-
> - **business-logic / pure-function**: Required — unit tests (AAA pattern)
|
|
148
|
-
> - **side-effect code** (external API, DB, file I/O): Required — integration tests with mocks
|
|
149
|
-
> - **framework / config / getter-setter / boilerplate**: Unnecessary — no test
|
|
150
|
-
> - **UI rendering** (no state logic): Optional — minimal snapshot or skip
|
|
151
|
-
|
|
152
|
-
### Test Pyramid
|
|
153
|
-
|
|
154
|
-
- **Unit tests**: {count} files ({which files})
|
|
155
|
-
- **Integration tests**: {count} files ({which files}, if applicable)
|
|
156
|
-
- **E2E tests**: {count} (if applicable, only for critical user flows)
|
|
157
|
-
|
|
158
|
-
### Required Test Cases (derived from spec EARS requirements)
|
|
159
|
-
|
|
160
|
-
{For each spec EARS requirement with `→ TC:` mapping, list the test case here}
|
|
161
|
-
- `should_{behavior}_when_{trigger}` → covers FR-{NNN}
|
|
162
|
-
- `should_{behavior}_while_{state}` → covers FR-{NNN}
|
|
163
|
-
|
|
164
|
-
## File Change Map
|
|
165
|
-
|
|
166
|
-
| File | Action | Description | Depends On | Phase |
|
|
167
|
-
|------|--------|-------------|------------|-------|
|
|
168
|
-
| {path} | create/modify/delete | {summary} | {file(s) or "—"} | {1-N} |
|
|
169
|
-
|
|
170
|
-
> - **Depends On**: list file(s) that must be created/modified first (enables dependency-aware task generation in /afc:implement).
|
|
171
|
-
> - **Phase**: implementation phase number. Same-phase + no dependency + different file = parallelizable.
|
|
172
|
-
> - **Test files**: For each implementation file classified as "required" in Code Classification, include a corresponding test file in the same Phase. Test files are first-class citizens in the File Change Map.
|
|
173
|
-
|
|
174
|
-
## Implementation Context
|
|
175
|
-
|
|
176
|
-
> Auto-generated section for implementation agents. Compress to under 500 words.
|
|
177
|
-
> This section travels with every sub-agent prompt during /afc:implement.
|
|
178
|
-
|
|
179
|
-
- **Objective**: {1-sentence feature purpose from spec Overview}
|
|
180
|
-
- **Key Constraints**: {NFR summaries + spec Constraints section, compressed}
|
|
181
|
-
- **Critical Edge Cases**: {top 3 edge cases from spec, 1 line each}
|
|
182
|
-
- **Risk Watchpoints**: {top risks from Risk & Mitigation table}
|
|
183
|
-
- **Must NOT**: {explicit prohibitions — from spec constraints, principles.md, or CLAUDE.md}
|
|
184
|
-
- **Acceptance Anchors**: {key acceptance criteria from spec that implementation must satisfy}
|
|
185
|
-
|
|
186
|
-
## Risk & Mitigation
|
|
187
|
-
| Risk | Impact | Mitigation |
|
|
188
|
-
|------|--------|------------|
|
|
189
|
-
| {risk} | {H/M/L} | {approach} |
|
|
190
|
-
|
|
191
|
-
## Alternative Design
|
|
192
|
-
### Approach 0: No Change (status quo)
|
|
193
|
-
{Why might the current state be sufficient? What is the cost of doing nothing?}
|
|
194
|
-
{If no change is clearly inferior: state specific reason — "Status quo lacks X, which is required by FR-001"}
|
|
195
|
-
{If no change is viable: recommend it — avoid implementing for the sake of implementing}
|
|
196
|
-
|
|
197
|
-
### Approach A: {chosen approach name}
|
|
198
|
-
{Brief description — this is the approach detailed above}
|
|
199
|
-
|
|
200
|
-
### Approach B: {alternative approach name}
|
|
201
|
-
{Brief description of a meaningfully different approach}
|
|
202
|
-
|
|
203
|
-
| Criterion | No Change | Approach A | Approach B |
|
|
204
|
-
|-----------|-----------|-----------|-----------|
|
|
205
|
-
| Complexity | None | {evaluation} | {evaluation} |
|
|
206
|
-
| Risk | None | {evaluation} | {evaluation} |
|
|
207
|
-
| Maintainability | Current | {evaluation} | {evaluation} |
|
|
208
|
-
| Justification | {why not enough} | {why this} | {why this} |
|
|
209
|
-
|
|
210
|
-
**Decision**: Approach {0/A/B} — {1-sentence rationale}
|
|
211
|
-
{If Approach 0 chosen: abort plan, report: "No implementation needed — current state satisfies requirements."}
|
|
212
|
-
|
|
213
|
-
## Phase Breakdown
|
|
214
|
-
### Phase 1: Setup
|
|
215
|
-
{project structure, type definitions, configuration}
|
|
216
|
-
|
|
217
|
-
### Phase 2: Core Implementation
|
|
218
|
-
{core business logic, state management}
|
|
219
|
-
|
|
220
|
-
### Phase 3: UI & Integration
|
|
221
|
-
{UI components, API integration}
|
|
222
|
-
|
|
223
|
-
### Phase 4: Polish
|
|
224
|
-
{error handling, performance optimization, tests}
|
|
225
|
-
```
|
|
104
|
+
Create `.claude/afc/specs/{feature}/plan.md` following the template in `${CLAUDE_SKILL_DIR}/plan-template.md`. Read it first, then generate the plan using that structure. **All sections are mandatory** unless marked "(omit if not applicable)".
|
|
226
105
|
|
|
227
106
|
### 4.5. File Path Verification
|
|
228
107
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Implementation Plan: {feature name}
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
{summary of core requirements from spec + technical approach, 3-5 sentences}
|
|
5
|
+
|
|
6
|
+
## Technical Context
|
|
7
|
+
{Summarize key project settings from .claude/rules/afc-project.md (auto-loaded) and afc.config.md}
|
|
8
|
+
- **Constraints**: {constraints extracted from spec}
|
|
9
|
+
|
|
10
|
+
## Principles Check
|
|
11
|
+
{if .claude/afc/memory/principles.md exists: validation results against MUST principles}
|
|
12
|
+
{if violations possible: state explicitly + justification}
|
|
13
|
+
|
|
14
|
+
## Architecture Decision
|
|
15
|
+
### Approach
|
|
16
|
+
{core idea of the chosen design}
|
|
17
|
+
|
|
18
|
+
### Architecture Placement
|
|
19
|
+
| Layer | Path | Role |
|
|
20
|
+
|-------|------|------|
|
|
21
|
+
| {entities/features/widgets/shared} | {path} | {description} |
|
|
22
|
+
|
|
23
|
+
### State Management Strategy (omit if not applicable)
|
|
24
|
+
{what combination of Zustand store / React Query / Context is used where}
|
|
25
|
+
|
|
26
|
+
### API Design (omit if not applicable)
|
|
27
|
+
{plan for new API endpoints or use of existing APIs}
|
|
28
|
+
|
|
29
|
+
## Test Strategy
|
|
30
|
+
|
|
31
|
+
> Written alongside the File Change Map. Classify each implementation file and decide test coverage level.
|
|
32
|
+
> Determines which files need test coverage and at what level.
|
|
33
|
+
|
|
34
|
+
### Code Classification
|
|
35
|
+
|
|
36
|
+
| File | Code Type | Test Need | Reason |
|
|
37
|
+
|------|-----------|:---------:|--------|
|
|
38
|
+
| {path} | {business-logic / pure-function / side-effect / framework / config / UI} | {required / optional / unnecessary} | {brief justification} |
|
|
39
|
+
|
|
40
|
+
> Classification guide:
|
|
41
|
+
> - **business-logic / pure-function**: Required — unit tests (AAA pattern)
|
|
42
|
+
> - **side-effect code** (external API, DB, file I/O): Required — integration tests with mocks
|
|
43
|
+
> - **framework / config / getter-setter / boilerplate**: Unnecessary — no test
|
|
44
|
+
> - **UI rendering** (no state logic): Optional — minimal snapshot or skip
|
|
45
|
+
|
|
46
|
+
### Test Pyramid
|
|
47
|
+
|
|
48
|
+
- **Unit tests**: {count} files ({which files})
|
|
49
|
+
- **Integration tests**: {count} files ({which files}, if applicable)
|
|
50
|
+
- **E2E tests**: {count} (if applicable, only for critical user flows)
|
|
51
|
+
|
|
52
|
+
### Required Test Cases (derived from spec EARS requirements)
|
|
53
|
+
|
|
54
|
+
{For each spec EARS requirement with `→ TC:` mapping, list the test case here}
|
|
55
|
+
- `should_{behavior}_when_{trigger}` → covers FR-{NNN}
|
|
56
|
+
- `should_{behavior}_while_{state}` → covers FR-{NNN}
|
|
57
|
+
|
|
58
|
+
## File Change Map
|
|
59
|
+
|
|
60
|
+
| File | Action | Description | Depends On | Phase |
|
|
61
|
+
|------|--------|-------------|------------|-------|
|
|
62
|
+
| {path} | create/modify/delete | {summary} | {file(s) or "—"} | {1-N} |
|
|
63
|
+
|
|
64
|
+
> - **Depends On**: list file(s) that must be created/modified first (enables dependency-aware task generation in /afc:implement).
|
|
65
|
+
> - **Phase**: implementation phase number. Same-phase + no dependency + different file = parallelizable.
|
|
66
|
+
> - **Test files**: For each implementation file classified as "required" in Code Classification, include a corresponding test file in the same Phase. Test files are first-class citizens in the File Change Map.
|
|
67
|
+
|
|
68
|
+
## Implementation Context
|
|
69
|
+
|
|
70
|
+
> Auto-generated section for implementation agents. Compress to under 500 words.
|
|
71
|
+
> This section travels with every sub-agent prompt during /afc:implement.
|
|
72
|
+
|
|
73
|
+
- **Objective**: {1-sentence feature purpose from spec Overview}
|
|
74
|
+
- **Key Constraints**: {NFR summaries + spec Constraints section, compressed}
|
|
75
|
+
- **Critical Edge Cases**: {top 3 edge cases from spec, 1 line each}
|
|
76
|
+
- **Risk Watchpoints**: {top risks from Risk & Mitigation table}
|
|
77
|
+
- **Must NOT**: {explicit prohibitions — from spec constraints, principles.md, or CLAUDE.md}
|
|
78
|
+
- **Acceptance Anchors**: {key acceptance criteria from spec that implementation must satisfy}
|
|
79
|
+
|
|
80
|
+
## Risk & Mitigation
|
|
81
|
+
| Risk | Impact | Mitigation |
|
|
82
|
+
|------|--------|------------|
|
|
83
|
+
| {risk} | {H/M/L} | {approach} |
|
|
84
|
+
|
|
85
|
+
## Alternative Design
|
|
86
|
+
### Approach 0: No Change (status quo)
|
|
87
|
+
{Why might the current state be sufficient? What is the cost of doing nothing?}
|
|
88
|
+
{If no change is clearly inferior: state specific reason — "Status quo lacks X, which is required by FR-001"}
|
|
89
|
+
{If no change is viable: recommend it — avoid implementing for the sake of implementing}
|
|
90
|
+
|
|
91
|
+
### Approach A: {chosen approach name}
|
|
92
|
+
{Brief description — this is the approach detailed above}
|
|
93
|
+
|
|
94
|
+
### Approach B: {alternative approach name}
|
|
95
|
+
{Brief description of a meaningfully different approach}
|
|
96
|
+
|
|
97
|
+
| Criterion | No Change | Approach A | Approach B |
|
|
98
|
+
|-----------|-----------|-----------|-----------|
|
|
99
|
+
| Complexity | None | {evaluation} | {evaluation} |
|
|
100
|
+
| Risk | None | {evaluation} | {evaluation} |
|
|
101
|
+
| Maintainability | Current | {evaluation} | {evaluation} |
|
|
102
|
+
| Justification | {why not enough} | {why this} | {why this} |
|
|
103
|
+
|
|
104
|
+
**Decision**: Approach {0/A/B} — {1-sentence rationale}
|
|
105
|
+
{If Approach 0 chosen: abort plan, report: "No implementation needed — current state satisfies requirements."}
|
|
106
|
+
|
|
107
|
+
## Phase Breakdown
|
|
108
|
+
### Phase 1: Setup
|
|
109
|
+
{project structure, type definitions, configuration}
|
|
110
|
+
|
|
111
|
+
### Phase 2: Core Implementation
|
|
112
|
+
{core business logic, state management}
|
|
113
|
+
|
|
114
|
+
### Phase 3: UI & Integration
|
|
115
|
+
{UI components, API integration}
|
|
116
|
+
|
|
117
|
+
### Phase 4: Polish
|
|
118
|
+
{error handling, performance optimization, tests}
|
|
@@ -75,82 +75,7 @@ Detect whether `$ARGUMENTS` references external libraries, APIs, or technologies
|
|
|
75
75
|
|
|
76
76
|
### 3. Write Spec
|
|
77
77
|
|
|
78
|
-
Create `.claude/afc/specs/{feature-name}/spec.md
|
|
79
|
-
|
|
80
|
-
```markdown
|
|
81
|
-
# Feature Spec: {feature name}
|
|
82
|
-
|
|
83
|
-
> Created: {YYYY-MM-DD}
|
|
84
|
-
> Branch: {BRANCH_NAME}
|
|
85
|
-
> Status: Draft
|
|
86
|
-
|
|
87
|
-
## Overview
|
|
88
|
-
{2-3 sentences on the purpose and background of the feature}
|
|
89
|
-
|
|
90
|
-
## User Stories
|
|
91
|
-
|
|
92
|
-
### US1: {story title} [P1]
|
|
93
|
-
**Description**: {feature description from user perspective}
|
|
94
|
-
**Priority rationale**: {why this order}
|
|
95
|
-
**Independent testability**: {whether this story can be tested on its own}
|
|
96
|
-
|
|
97
|
-
#### Acceptance Scenarios (GWT for user scenarios)
|
|
98
|
-
- [ ] Given {precondition}, When {action}, Then {result}
|
|
99
|
-
- [ ] Given {precondition}, When {action}, Then {result}
|
|
100
|
-
|
|
101
|
-
#### System Requirements (EARS notation)
|
|
102
|
-
|
|
103
|
-
> Use one of the 5 EARS patterns for each requirement. Each requirement must map to at least one expected test case (TC).
|
|
104
|
-
|
|
105
|
-
| Pattern | Template | Use When |
|
|
106
|
-
|---------|----------|----------|
|
|
107
|
-
| Ubiquitous | `THE System SHALL {behavior}` | Always-on property (no trigger needed) |
|
|
108
|
-
| Event-driven | `WHEN {trigger}, THE System SHALL {response}` | Specific event triggers a response |
|
|
109
|
-
| State-driven | `WHILE {state}, THE System SHALL {behavior}` | Behavior depends on system state |
|
|
110
|
-
| Unwanted | `IF {condition}, THE System SHALL {handling}` | Error/failure handling |
|
|
111
|
-
| Optional | `WHERE {feature/config active}, THE System SHALL {behavior}` | Feature flag or conditional capability |
|
|
112
|
-
|
|
113
|
-
- [ ] WHEN {trigger}, THE System SHALL {behavior} → TC: `should_{behavior}_when_{trigger}`
|
|
114
|
-
- [ ] WHILE {state}, THE System SHALL {behavior} → TC: `should_{behavior}_while_{state}`
|
|
115
|
-
|
|
116
|
-
### US2: {story title} [P2]
|
|
117
|
-
{same format}
|
|
118
|
-
|
|
119
|
-
## Requirements
|
|
120
|
-
|
|
121
|
-
### Functional Requirements
|
|
122
|
-
- **FR-001**: {requirement}
|
|
123
|
-
- **FR-002**: {requirement}
|
|
124
|
-
|
|
125
|
-
### Non-Functional Requirements
|
|
126
|
-
- **NFR-001**: {performance/security/accessibility etc.}
|
|
127
|
-
|
|
128
|
-
### Auto-Suggested NFRs
|
|
129
|
-
{Load `${CLAUDE_PLUGIN_ROOT}/docs/nfr-templates.md` and select 3-5 relevant NFRs based on the project type detected from afc.config.md}
|
|
130
|
-
- **NFR-A01** [AUTO-SUGGESTED]: {suggestion from matching project type template}
|
|
131
|
-
- **NFR-A02** [AUTO-SUGGESTED]: {suggestion}
|
|
132
|
-
- **NFR-A03** [AUTO-SUGGESTED]: {suggestion}
|
|
133
|
-
{Tag each with [AUTO-SUGGESTED]. Users may accept, modify, or remove.}
|
|
134
|
-
|
|
135
|
-
### Key Entities
|
|
136
|
-
| Entity | Description | Related Existing Code |
|
|
137
|
-
|--------|-------------|-----------------------|
|
|
138
|
-
| {name} | {description} | {path or "new"} |
|
|
139
|
-
|
|
140
|
-
## Success Criteria
|
|
141
|
-
- **SC-001**: {measurable success indicator}
|
|
142
|
-
- **SC-002**: {measurable success indicator}
|
|
143
|
-
|
|
144
|
-
## Edge Cases
|
|
145
|
-
- {edge case 1}
|
|
146
|
-
- {edge case 2}
|
|
147
|
-
|
|
148
|
-
## Constraints
|
|
149
|
-
- {technical/business constraints}
|
|
150
|
-
|
|
151
|
-
## [NEEDS CLARIFICATION]
|
|
152
|
-
- {uncertain items — record if any, remove section if none}
|
|
153
|
-
```
|
|
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.
|
|
154
79
|
|
|
155
80
|
### 3.5. Inline Clarification (standalone mode only)
|
|
156
81
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Feature Spec: {feature name}
|
|
2
|
+
|
|
3
|
+
> Created: {YYYY-MM-DD}
|
|
4
|
+
> Branch: {BRANCH_NAME}
|
|
5
|
+
> Status: Draft
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
{2-3 sentences on the purpose and background of the feature}
|
|
9
|
+
|
|
10
|
+
## User Stories
|
|
11
|
+
|
|
12
|
+
### US1: {story title} [P1]
|
|
13
|
+
**Description**: {feature description from user perspective}
|
|
14
|
+
**Priority rationale**: {why this order}
|
|
15
|
+
**Independent testability**: {whether this story can be tested on its own}
|
|
16
|
+
|
|
17
|
+
#### Acceptance Scenarios (GWT for user scenarios)
|
|
18
|
+
- [ ] Given {precondition}, When {action}, Then {result}
|
|
19
|
+
- [ ] Given {precondition}, When {action}, Then {result}
|
|
20
|
+
|
|
21
|
+
#### System Requirements (EARS notation)
|
|
22
|
+
|
|
23
|
+
> Use one of the 5 EARS patterns for each requirement. Each requirement must map to at least one expected test case (TC).
|
|
24
|
+
|
|
25
|
+
| Pattern | Template | Use When |
|
|
26
|
+
|---------|----------|----------|
|
|
27
|
+
| Ubiquitous | `THE System SHALL {behavior}` | Always-on property (no trigger needed) |
|
|
28
|
+
| Event-driven | `WHEN {trigger}, THE System SHALL {response}` | Specific event triggers a response |
|
|
29
|
+
| State-driven | `WHILE {state}, THE System SHALL {behavior}` | Behavior depends on system state |
|
|
30
|
+
| Unwanted | `IF {condition}, THE System SHALL {handling}` | Error/failure handling |
|
|
31
|
+
| Optional | `WHERE {feature/config active}, THE System SHALL {behavior}` | Feature flag or conditional capability |
|
|
32
|
+
|
|
33
|
+
- [ ] WHEN {trigger}, THE System SHALL {behavior} → TC: `should_{behavior}_when_{trigger}`
|
|
34
|
+
- [ ] WHILE {state}, THE System SHALL {behavior} → TC: `should_{behavior}_while_{state}`
|
|
35
|
+
|
|
36
|
+
### US2: {story title} [P2]
|
|
37
|
+
{same format}
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
40
|
+
|
|
41
|
+
### Functional Requirements
|
|
42
|
+
- **FR-001**: {requirement}
|
|
43
|
+
- **FR-002**: {requirement}
|
|
44
|
+
|
|
45
|
+
### Non-Functional Requirements
|
|
46
|
+
- **NFR-001**: {performance/security/accessibility etc.}
|
|
47
|
+
|
|
48
|
+
### Auto-Suggested NFRs
|
|
49
|
+
{Load `${CLAUDE_SKILL_DIR}/nfr-templates.md` and select 3-5 relevant NFRs based on the project type detected from afc.config.md}
|
|
50
|
+
- **NFR-A01** [AUTO-SUGGESTED]: {suggestion from matching project type template}
|
|
51
|
+
- **NFR-A02** [AUTO-SUGGESTED]: {suggestion}
|
|
52
|
+
- **NFR-A03** [AUTO-SUGGESTED]: {suggestion}
|
|
53
|
+
{Tag each with [AUTO-SUGGESTED]. Users may accept, modify, or remove.}
|
|
54
|
+
|
|
55
|
+
### Key Entities
|
|
56
|
+
| Entity | Description | Related Existing Code |
|
|
57
|
+
|--------|-------------|-----------------------|
|
|
58
|
+
| {name} | {description} | {path or "new"} |
|
|
59
|
+
|
|
60
|
+
## Success Criteria
|
|
61
|
+
- **SC-001**: {measurable success indicator}
|
|
62
|
+
- **SC-002**: {measurable success indicator}
|
|
63
|
+
|
|
64
|
+
## Edge Cases
|
|
65
|
+
- {edge case 1}
|
|
66
|
+
- {edge case 2}
|
|
67
|
+
|
|
68
|
+
## Constraints
|
|
69
|
+
- {technical/business constraints}
|
|
70
|
+
|
|
71
|
+
## [NEEDS CLARIFICATION]
|
|
72
|
+
- {uncertain items — record if any, remove section if none}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|