all-for-claudecode 2.11.0 → 2.12.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 +8 -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/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/plan/SKILL.md +1 -1
- package/skills/qa/SKILL.md +1 -1
- package/skills/review/SKILL.md +1 -1
- package/skills/setup/SKILL.md +217 -0
- package/skills/spec/SKILL.md +1 -1
- package/skills/tasks/SKILL.md +4 -4
- package/skills/test/SKILL.md +1 -1
- package/skills/triage/SKILL.md +1 -1
|
@@ -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.12.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.12.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.12.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/MIGRATION.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
- If you previously used `/afc:analyze` for artifact consistency checking, use `/afc:validate` instead (or let the pipeline invoke it automatically).
|
|
21
21
|
- Agent memory files (`.claude/agent-memory/afc-architect/MEMORY.md`, `.claude/agent-memory/afc-security/MEMORY.md`) exceeding 100 lines will be auto-pruned on next pipeline run.
|
|
22
22
|
- Memory subdirectories exceeding rotation thresholds will be auto-pruned during the Clean phase.
|
|
23
|
-
- Run `/afc:
|
|
23
|
+
- Run `/afc:setup` to update the `AFC:VERSION` tag in your CLAUDE.md.
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
@@ -77,7 +77,7 @@ Replace the `SELFISH:START` / `SELFISH:END` block in your project's CLAUDE.md:
|
|
|
77
77
|
- Change all `selfish:` command references → `afc:`
|
|
78
78
|
- Change `selfish-architect` / `selfish-security` → `afc-architect` / `afc-security`
|
|
79
79
|
|
|
80
|
-
Or simply run `/afc:
|
|
80
|
+
Or simply run `/afc:setup` to regenerate the block.
|
|
81
81
|
|
|
82
82
|
#### 4. Migrate state files (if pipeline was active)
|
|
83
83
|
|
package/README.md
CHANGED
|
@@ -28,7 +28,8 @@ npx all-for-claudecode
|
|
|
28
28
|
Then:
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
/afc:
|
|
31
|
+
/afc:setup # Set up global routing in ~/.claude/CLAUDE.md
|
|
32
|
+
/afc:init # Detect your stack, generate project config
|
|
32
33
|
/afc:auto "Add user authentication" # Run the full pipeline
|
|
33
34
|
```
|
|
34
35
|
|
|
@@ -115,7 +116,8 @@ Performance: ✓ no N+1 queries
|
|
|
115
116
|
| `/afc:clean` | Pipeline artifact cleanup and codebase hygiene |
|
|
116
117
|
| `/afc:research` | Technical research with persistent storage |
|
|
117
118
|
| `/afc:debug` | Bug diagnosis and fix |
|
|
118
|
-
| `/afc:init` | Project setup — detects stack and generates config |
|
|
119
|
+
| `/afc:init` | Project setup — detects stack and generates project config |
|
|
120
|
+
| `/afc:setup` | Global CLAUDE.md configuration — injects/updates AFC routing block |
|
|
119
121
|
| `/afc:doctor` | Diagnose project health and plugin setup |
|
|
120
122
|
| `/afc:architect` | Architecture analysis (persistent memory) |
|
|
121
123
|
| `/afc:security` | Security scan (persistent memory, isolated worktree) |
|
|
@@ -248,10 +250,12 @@ Dependencies are tracked via DAG. CI gate + Mini-Review + Auto-Checkpoint run at
|
|
|
248
250
|
## Configuration
|
|
249
251
|
|
|
250
252
|
```
|
|
251
|
-
/afc:
|
|
253
|
+
/afc:setup # One-time: inject routing block into ~/.claude/CLAUDE.md
|
|
254
|
+
/afc:init # Per-project: detect stack and generate .claude/afc.config.md
|
|
252
255
|
```
|
|
253
256
|
|
|
254
|
-
|
|
257
|
+
- **`/afc:setup`** — Manages the AFC routing block in your global `~/.claude/CLAUDE.md`. Run once after install and again after plugin updates. Idempotent — skips if version matches.
|
|
258
|
+
- **`/afc:init`** — Auto-detects your tech stack (package manager, framework, architecture, testing, linting) and generates project-local config files. No manual preset selection needed.
|
|
255
259
|
|
|
256
260
|
## FAQ
|
|
257
261
|
|
package/bin/cli.mjs
CHANGED
|
@@ -97,6 +97,7 @@ async function main() {
|
|
|
97
97
|
console.log(" ✓ Installation complete!");
|
|
98
98
|
console.log();
|
|
99
99
|
console.log(" Next steps:");
|
|
100
|
+
console.log(" /afc:setup Set up global routing");
|
|
100
101
|
console.log(" /afc:init Create project config");
|
|
101
102
|
console.log(' /afc:auto "feature desc" Run the pipeline');
|
|
102
103
|
console.log();
|
package/package.json
CHANGED
|
@@ -264,7 +264,7 @@ check_command_docs() {
|
|
|
264
264
|
[ -d "$skills_dir" ] || return
|
|
265
265
|
|
|
266
266
|
local readme="$PROJECT_DIR/README.md"
|
|
267
|
-
local
|
|
267
|
+
local setup_skill="$skills_dir/setup/SKILL.md"
|
|
268
268
|
local claude_md="$PROJECT_DIR/CLAUDE.md"
|
|
269
269
|
local issues=0
|
|
270
270
|
|
|
@@ -281,12 +281,12 @@ check_command_docs() {
|
|
|
281
281
|
fi
|
|
282
282
|
fi
|
|
283
283
|
|
|
284
|
-
# Sub-check B:
|
|
284
|
+
# Sub-check B: setup/SKILL.md should mention afc:{name} for user-invocable skills
|
|
285
285
|
local invocable
|
|
286
286
|
invocable=$(get_cmd_field "$skill_file" "user-invocable")
|
|
287
|
-
if [ "$invocable" != "false" ] && [ -f "$
|
|
288
|
-
if ! grep -qE "afc:${cmd_name}([^a-z0-9-]|$)" "$
|
|
289
|
-
warn "Skill '$cmd_name' missing from
|
|
287
|
+
if [ "$invocable" != "false" ] && [ -f "$setup_skill" ]; then
|
|
288
|
+
if ! grep -qE "afc:${cmd_name}([^a-z0-9-]|$)" "$setup_skill" 2>/dev/null; then
|
|
289
|
+
warn "Skill '$cmd_name' missing from setup/SKILL.md skill routing"
|
|
290
290
|
issues=$((issues + 1))
|
|
291
291
|
fi
|
|
292
292
|
fi
|
|
@@ -303,7 +303,7 @@ check_command_docs() {
|
|
|
303
303
|
done
|
|
304
304
|
|
|
305
305
|
if [ "$issues" -eq 0 ]; then
|
|
306
|
-
ok "Skill docs: all skills referenced in README.md,
|
|
306
|
+
ok "Skill docs: all skills referenced in README.md, setup/SKILL.md, CLAUDE.md"
|
|
307
307
|
fi
|
|
308
308
|
}
|
|
309
309
|
|
package/scripts/afc-doctor.sh
CHANGED
|
@@ -55,6 +55,20 @@ section() {
|
|
|
55
55
|
printf '\n%s\n' "$1"
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
# --- Header: show which plugin version is running ---
|
|
59
|
+
if [ -f "$PLUGIN_ROOT/package.json" ]; then
|
|
60
|
+
if command -v jq >/dev/null 2>&1; then
|
|
61
|
+
RUNNING_VERSION=$(jq -r '.version // "unknown"' "$PLUGIN_ROOT/package.json" 2>/dev/null || echo "unknown")
|
|
62
|
+
else
|
|
63
|
+
RUNNING_VERSION=$(grep -o '"version"[[:space:]]*:[[:space:]]*"[^"]*"' "$PLUGIN_ROOT/package.json" 2>/dev/null | head -1 | sed 's/.*: *"//;s/"//' || echo "unknown")
|
|
64
|
+
fi
|
|
65
|
+
printf 'all-for-claudecode Doctor (v%s)\n' "$RUNNING_VERSION"
|
|
66
|
+
printf 'Plugin root: %s\n' "$PLUGIN_ROOT"
|
|
67
|
+
else
|
|
68
|
+
printf 'all-for-claudecode Doctor (version unknown)\n'
|
|
69
|
+
printf 'Plugin root: %s\n' "$PLUGIN_ROOT"
|
|
70
|
+
fi
|
|
71
|
+
|
|
58
72
|
# --- Category 1: Environment ---
|
|
59
73
|
section "Environment"
|
|
60
74
|
|
|
@@ -160,15 +174,15 @@ if [ -f "$GLOBAL_CLAUDE" ]; then
|
|
|
160
174
|
if [ "$BLOCK_VERSION" = "$PLUGIN_VERSION" ]; then
|
|
161
175
|
pass "Block version matches plugin ($PLUGIN_VERSION)"
|
|
162
176
|
else
|
|
163
|
-
warn "all-for-claudecode block outdated (block: $BLOCK_VERSION, plugin: $PLUGIN_VERSION)" "run /afc:
|
|
177
|
+
warn "all-for-claudecode block outdated (block: $BLOCK_VERSION, plugin: $PLUGIN_VERSION)" "run /afc:setup to update"
|
|
164
178
|
fi
|
|
165
179
|
fi
|
|
166
180
|
fi
|
|
167
181
|
else
|
|
168
|
-
fail "all-for-claudecode block not found" "run /afc:
|
|
182
|
+
fail "all-for-claudecode block not found" "run /afc:setup to inject all-for-claudecode block"
|
|
169
183
|
fi
|
|
170
184
|
else
|
|
171
|
-
warn "No global ~/.claude/CLAUDE.md" "run /afc:
|
|
185
|
+
warn "No global ~/.claude/CLAUDE.md" "run /afc:setup"
|
|
172
186
|
fi
|
|
173
187
|
|
|
174
188
|
# --- Category 4: Legacy Migration ---
|
|
@@ -179,7 +193,7 @@ LEGACY_FOUND=false
|
|
|
179
193
|
# Legacy CLAUDE.md block
|
|
180
194
|
if [ -f "$GLOBAL_CLAUDE" ] && grep -q '<!-- SELFISH:START -->' "$GLOBAL_CLAUDE" 2>/dev/null; then
|
|
181
195
|
LEGACY_FOUND=true
|
|
182
|
-
warn "Legacy SELFISH:START block in ~/.claude/CLAUDE.md" "run /afc:
|
|
196
|
+
warn "Legacy SELFISH:START block in ~/.claude/CLAUDE.md" "run /afc:setup (will replace)"
|
|
183
197
|
fi
|
|
184
198
|
|
|
185
199
|
# Legacy config
|
|
@@ -73,7 +73,7 @@ if [ -f "$PLUGIN_ROOT/package.json" ]; then
|
|
|
73
73
|
if [ -f "$GLOBAL_CLAUDE" ]; then
|
|
74
74
|
BLOCK_VERSION=$(grep -o 'AFC:VERSION:[0-9][0-9.]*' "$GLOBAL_CLAUDE" 2>/dev/null | head -1 | sed 's/AFC:VERSION://' || true)
|
|
75
75
|
if [ -n "${BLOCK_VERSION:-}" ] && [ "$BLOCK_VERSION" != "$PLUGIN_VERSION" ]; then
|
|
76
|
-
OUTPUT="${OUTPUT:+$OUTPUT | }[AFC VERSION MISMATCH] v$PLUGIN_VERSION installed but CLAUDE.md block is v$BLOCK_VERSION. Run /afc:
|
|
76
|
+
OUTPUT="${OUTPUT:+$OUTPUT | }[AFC VERSION MISMATCH] v$PLUGIN_VERSION installed but CLAUDE.md block is v$BLOCK_VERSION. Run /afc:setup to update."
|
|
77
77
|
fi
|
|
78
78
|
fi
|
|
79
79
|
fi
|
|
@@ -99,7 +99,7 @@ Structure analysis results and **print to console**:
|
|
|
99
99
|
|
|
100
100
|
### 4. Critic Loop
|
|
101
101
|
|
|
102
|
-
> **Always** read `${
|
|
102
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
103
103
|
|
|
104
104
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
105
105
|
|
package/skills/auto/SKILL.md
CHANGED
|
@@ -88,7 +88,7 @@ Route based on **what expertise the feature actually needs**, not keyword presen
|
|
|
88
88
|
|
|
89
89
|
## Critic Loop Rules (common to all phases)
|
|
90
90
|
|
|
91
|
-
> **Always** read `${
|
|
91
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
92
92
|
> Core: minimum 1 concern per criterion + mandatory Adversarial failure scenario each pass + quantitative evidence required. "PASS" as a single word is prohibited. Uses convergence-based termination with 4 verdicts (PASS/FAIL/ESCALATE/DEFER). On ESCALATE: pause and present options to user even in auto mode.
|
|
93
93
|
|
|
94
94
|
---
|
|
@@ -102,18 +102,18 @@ Route based on **what expertise the feature actually needs**, not keyword presen
|
|
|
102
102
|
3. Determine feature name (2-3 keywords → kebab-case)
|
|
103
103
|
3.5. **Preflight Check**:
|
|
104
104
|
```bash
|
|
105
|
-
"${
|
|
105
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-preflight-check.sh"
|
|
106
106
|
```
|
|
107
107
|
- If exit 1 (hard failure) → print error and **abort**
|
|
108
108
|
- If warnings only (exit 0) → print warnings and continue
|
|
109
109
|
4. **Activate Pipeline Flag** (hook integration):
|
|
110
110
|
```bash
|
|
111
|
-
"${
|
|
111
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" start {feature}
|
|
112
112
|
```
|
|
113
113
|
- Safety Snapshot created automatically (`afc/pre-auto` git tag)
|
|
114
114
|
- Stop Gate Hook activated (blocks response termination on CI failure)
|
|
115
115
|
- File change tracking started
|
|
116
|
-
- Timeline log: `"${
|
|
116
|
+
- Timeline log: `"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" log pipeline-start "Auto pipeline: {feature}"`
|
|
117
117
|
5. Create `.claude/afc/specs/{feature}/` directory → **record path as `PIPELINE_ARTIFACT_DIR`** (for Clean scope)
|
|
118
118
|
6. **Initialize Skill Advisor**: `ADVISOR_COUNT = 0`, `ADVISOR_TRANSFORM_USED = false`. Persist to pipeline state for context-loss resilience:
|
|
119
119
|
```bash
|
|
@@ -134,7 +134,7 @@ Before investing pipeline resources, evaluate whether the request warrants execu
|
|
|
134
134
|
1. **Necessity check**: Explore codebase for existing implementations related to `$ARGUMENTS`.
|
|
135
135
|
- If the feature substantially exists → ask user via AskUserQuestion:
|
|
136
136
|
- "This feature appears to already exist at {path}. (1) Enhance existing (2) Replace entirely (3) Abort"
|
|
137
|
-
- If user chooses abort → release pipeline flag (`"${
|
|
137
|
+
- If user chooses abort → release pipeline flag (`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" end`), end with: `"Pipeline aborted — feature already exists."`
|
|
138
138
|
|
|
139
139
|
2. **Scope check**: Estimate the scope of `$ARGUMENTS`:
|
|
140
140
|
- If description implies 10+ files or multiple unrelated concerns → warn:
|
|
@@ -171,8 +171,8 @@ If all checks pass, proceed to Phase 0.8.
|
|
|
171
171
|
3. If change touches > 2 files OR modifies any `.sh` script: **rollback fast-path changes** (`git reset --hard afc/pre-auto`), then restart with full pipeline
|
|
172
172
|
4. **Checkpoint**:
|
|
173
173
|
```bash
|
|
174
|
-
"${
|
|
175
|
-
"${
|
|
174
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase fast-path
|
|
175
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" ci-pass
|
|
176
176
|
```
|
|
177
177
|
5. Run `/afc:review` logic inline (mini-review only — single Critic pass)
|
|
178
178
|
6. Run Phase 5 Clean logic (artifact cleanup, CI gate, pipeline flag release)
|
|
@@ -187,7 +187,7 @@ If all checks pass, proceed to Phase 0.8.
|
|
|
187
187
|
|
|
188
188
|
### Phase 0.5: Auto-Clarify Gate (conditional)
|
|
189
189
|
|
|
190
|
-
`"${
|
|
190
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase clarify`
|
|
191
191
|
|
|
192
192
|
**Trigger condition**: Score `$ARGUMENTS` on 5 ambiguity signals. If score >= 3, trigger clarification.
|
|
193
193
|
|
|
@@ -274,7 +274,7 @@ If all checks pass, proceed to Phase 0.8.
|
|
|
274
274
|
|
|
275
275
|
### Phase 1: Spec (1/5)
|
|
276
276
|
|
|
277
|
-
`"${
|
|
277
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase spec`
|
|
278
278
|
|
|
279
279
|
Execute `/afc:spec` logic inline:
|
|
280
280
|
|
|
@@ -381,7 +381,7 @@ Execute `/afc:spec` logic inline:
|
|
|
381
381
|
|
|
382
382
|
### Phase 2: Plan (2/5)
|
|
383
383
|
|
|
384
|
-
`"${
|
|
384
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase plan`
|
|
385
385
|
|
|
386
386
|
Execute `/afc:plan` logic inline:
|
|
387
387
|
|
|
@@ -523,7 +523,7 @@ Execute `/afc:plan` logic inline:
|
|
|
523
523
|
|
|
524
524
|
### Phase 3: Implement (3/5)
|
|
525
525
|
|
|
526
|
-
`"${
|
|
526
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase implement`
|
|
527
527
|
|
|
528
528
|
**Session context reload**: At implement start, read `.claude/afc/specs/{feature}/context.md` if it exists. This restores key decisions and constraints from Plan phase (resilient to context compaction).
|
|
529
529
|
|
|
@@ -576,14 +576,14 @@ Execute `/afc:implement` logic inline — **follow all orchestration rules defin
|
|
|
576
576
|
|
|
577
577
|
#### Step 3.2: TDD Pre-Generation (conditional)
|
|
578
578
|
|
|
579
|
-
`"${
|
|
579
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase test-pre-gen`
|
|
580
580
|
|
|
581
581
|
**Trigger condition**: tasks.md contains at least 1 task targeting a `.sh` file in `scripts/`.
|
|
582
582
|
|
|
583
583
|
**If triggered**:
|
|
584
584
|
1. Run the test pre-generation script:
|
|
585
585
|
```bash
|
|
586
|
-
"${
|
|
586
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-test-pre-gen.sh" ".claude/afc/specs/{feature}/tasks.md" "spec/"
|
|
587
587
|
```
|
|
588
588
|
2. Review generated skeleton files — verify they are parseable:
|
|
589
589
|
```bash
|
|
@@ -598,14 +598,14 @@ Execute `/afc:implement` logic inline — **follow all orchestration rules defin
|
|
|
598
598
|
|
|
599
599
|
#### Step 3.3: Blast Radius Analysis (conditional)
|
|
600
600
|
|
|
601
|
-
`"${
|
|
601
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase blast-radius`
|
|
602
602
|
|
|
603
603
|
**Trigger condition**: plan.md File Change Map lists >= 3 files to change.
|
|
604
604
|
|
|
605
605
|
**If triggered**:
|
|
606
606
|
1. Run the blast radius analysis:
|
|
607
607
|
```bash
|
|
608
|
-
"${
|
|
608
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-blast-radius.sh" ".claude/afc/specs/{feature}/plan.md" "${CLAUDE_PROJECT_DIR}"
|
|
609
609
|
```
|
|
610
610
|
2. If exit 1 (cycle detected): **ESCALATE** — present the cycle to user with options:
|
|
611
611
|
- Option 1: Refactor plan to break the cycle
|
|
@@ -621,11 +621,11 @@ Execute `/afc:implement` logic inline — **follow all orchestration rules defin
|
|
|
621
621
|
0. **Baseline test** (follows implement.md Step 1, item 5): if `{config.test}` is non-empty, run `{config.test}` before starting task execution. On failure, report pre-existing test failures to user and ask: "(1) Proceed anyway (2) Fix first (3) Abort". On pass or empty config, continue.
|
|
622
622
|
1. Execute tasks phase by phase using implement.md orchestration rules (sequential/batch/swarm based on [P] count)
|
|
623
623
|
2. **Implementation Context injection**: Every sub-agent prompt includes the `## Implementation Context` section from plan.md **and relevant FR/AC items from spec.md** (ensures spec intent propagates to workers)
|
|
624
|
-
3. Perform **3-4 step gate** on each Implementation Phase completion — **always** read `${
|
|
625
|
-
- On gate pass: create phase rollback point `"${
|
|
624
|
+
3. Perform **3-4 step gate** on each Implementation Phase completion — **always** read `${CLAUDE_SKILL_DIR}/../../docs/phase-gate-protocol.md` first. Cannot advance to next phase without passing the gate.
|
|
625
|
+
- On gate pass: create phase rollback point `"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase-tag {phase_number}`
|
|
626
626
|
4. Real-time `[x]` updates in tasks.md
|
|
627
627
|
5. After full completion, run `{config.ci}` final verification
|
|
628
|
-
- On pass: `"${
|
|
628
|
+
- On pass: `"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" ci-pass` (releases Stop Gate)
|
|
629
629
|
- **On fail: Debug-based RCA** (replaces blind retry):
|
|
630
630
|
1. Execute `/afc:debug` logic inline with the CI error output as input
|
|
631
631
|
2. Debug performs RCA: error trace → data flow → hypothesis → targeted fix
|
|
@@ -656,7 +656,7 @@ Execute `/afc:implement` logic inline — **follow all orchestration rules defin
|
|
|
656
656
|
|
|
657
657
|
#### Step 3.6: Implement Critic Loop
|
|
658
658
|
|
|
659
|
-
> **Always** read `${
|
|
659
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
660
660
|
|
|
661
661
|
**Critic Loop until convergence** (safety cap: 5, follow Critic Loop rules):
|
|
662
662
|
- **SCOPE_ADHERENCE**: Compare `git diff` changed files against plan.md File Change Map. Flag any file modified that is NOT in the plan. Flag any planned file NOT modified. Provide "M of N files match" count.
|
|
@@ -750,7 +750,7 @@ Execute `/afc:implement` logic inline — **follow all orchestration rules defin
|
|
|
750
750
|
|
|
751
751
|
### Phase 4: Review (4/5)
|
|
752
752
|
|
|
753
|
-
`"${
|
|
753
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase review`
|
|
754
754
|
|
|
755
755
|
Execute `/afc:review` logic inline — **follow all review perspectives defined in `skills/review/SKILL.md`** (A through H). The review skill is the single source of truth for review criteria.
|
|
756
756
|
|
|
@@ -902,7 +902,7 @@ If Checkpoint D produced outputs, inject them into the review context:
|
|
|
902
902
|
|
|
903
903
|
#### Step 4.9: Critic Loop
|
|
904
904
|
|
|
905
|
-
> **Always** read `${
|
|
905
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
906
906
|
|
|
907
907
|
**Critic Loop until convergence** (safety cap: 5, follow Critic Loop rules):
|
|
908
908
|
- COMPLETENESS: were all changed files reviewed across all 8 perspectives (A-H)?
|
|
@@ -1005,7 +1005,7 @@ Persist the review results for memory:
|
|
|
1005
1005
|
|
|
1006
1006
|
### Phase 5: Clean (5/5)
|
|
1007
1007
|
|
|
1008
|
-
`"${
|
|
1008
|
+
`"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase clean`
|
|
1009
1009
|
|
|
1010
1010
|
Artifact cleanup and codebase hygiene check after implementation and review:
|
|
1011
1011
|
|
|
@@ -1078,11 +1078,11 @@ Artifact cleanup and codebase hygiene check after implementation and review:
|
|
|
1078
1078
|
- Clear `.claude/afc/memory/checkpoint.md` **and** `~/.claude/projects/{ENCODED_PATH}/memory/checkpoint.md` (pipeline complete = session goal achieved, dual-delete prevents stale checkpoint in either location; `ENCODED_PATH` = project path with `/` replaced by `-`)
|
|
1079
1079
|
7. **Timeline finalize**:
|
|
1080
1080
|
```bash
|
|
1081
|
-
"${
|
|
1081
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" log pipeline-end "Pipeline complete: {feature}"
|
|
1082
1082
|
```
|
|
1083
1083
|
8. **Release Pipeline Flag** (hook integration):
|
|
1084
1084
|
```bash
|
|
1085
|
-
"${
|
|
1085
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" end
|
|
1086
1086
|
```
|
|
1087
1087
|
- Stop Gate Hook deactivated
|
|
1088
1088
|
- Change tracking log deleted
|
package/skills/clean/SKILL.md
CHANGED
|
@@ -24,7 +24,7 @@ model: sonnet
|
|
|
24
24
|
### 1. Resolve Feature
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
"${
|
|
27
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase clean
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
- If pipeline is active: read feature from state
|
|
@@ -98,13 +98,13 @@ Clear `.claude/afc/memory/checkpoint.md` **and** `~/.claude/projects/{ENCODED_PA
|
|
|
98
98
|
### 8. Timeline Finalize
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
"${
|
|
101
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" log pipeline-end "Pipeline complete: {feature}"
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
### 9. Release Pipeline Flag
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
"${
|
|
107
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" end
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
- Stop Gate Hook deactivated
|
package/skills/debug/SKILL.md
CHANGED
|
@@ -86,7 +86,7 @@ If hypothesis 0 is rejected: verify remaining hypotheses starting from highest p
|
|
|
86
86
|
|
|
87
87
|
### 5. Critic Loop
|
|
88
88
|
|
|
89
|
-
> **Always** read `${
|
|
89
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
90
90
|
|
|
91
91
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
92
92
|
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ model: sonnet
|
|
|
16
16
|
> Like `brew doctor` or `flutter doctor` — verifies the **tool's setup**, NOT the project's code quality.
|
|
17
17
|
> Read-only — never modifies files. Reports issues with actionable fix commands.
|
|
18
18
|
>
|
|
19
|
-
> **IMPORTANT: Do NOT analyze project source code, architecture, or code quality. Only check afc plugin configuration, hooks, state, and environment
|
|
19
|
+
> **IMPORTANT: Do NOT analyze project source code, architecture, or code quality. Only check afc plugin configuration, hooks, state, and environment. All checks are handled by the bash script — just run it and print the output.**
|
|
20
20
|
|
|
21
21
|
## Arguments
|
|
22
22
|
|
|
@@ -39,7 +39,7 @@ Each failing check includes a **Fix:** line with the exact command to resolve it
|
|
|
39
39
|
|
|
40
40
|
1. Run the health check script (covers ALL categories — no manual checks needed):
|
|
41
41
|
```
|
|
42
|
-
"${
|
|
42
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-doctor.sh" $ARGUMENTS
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
2. Print the script's stdout output as-is. Do not reformat, summarize, or interpret.
|
|
@@ -54,8 +54,8 @@ Each failing check includes a **Fix:** line with the exact command to resolve it
|
|
|
54
54
|
## Example Output
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
all-for-claudecode Doctor
|
|
58
|
-
|
|
57
|
+
all-for-claudecode Doctor (v2.11.0)
|
|
58
|
+
Plugin root: /path/to/plugin
|
|
59
59
|
|
|
60
60
|
Environment
|
|
61
61
|
✓ git installed (2.43.0)
|
|
@@ -64,34 +64,38 @@ Environment
|
|
|
64
64
|
|
|
65
65
|
Project Config
|
|
66
66
|
✓ .claude/afc.config.md exists
|
|
67
|
-
✓ Required sections
|
|
68
|
-
✓
|
|
69
|
-
✓ Gate command runnable
|
|
67
|
+
✓ Required sections present
|
|
68
|
+
✓ Gate command defined
|
|
70
69
|
|
|
71
70
|
CLAUDE.md Integration
|
|
72
71
|
✓ Global ~/.claude/CLAUDE.md exists
|
|
73
72
|
✓ all-for-claudecode block present
|
|
74
|
-
⚠ all-for-claudecode block
|
|
75
|
-
Fix: /afc:
|
|
76
|
-
|
|
73
|
+
⚠ all-for-claudecode block outdated (block: 1.0.0, plugin: 1.1.0)
|
|
74
|
+
Fix: run /afc:setup to update
|
|
75
|
+
|
|
76
|
+
Legacy Migration
|
|
77
|
+
✓ No legacy artifacts found
|
|
77
78
|
|
|
78
79
|
Pipeline State
|
|
79
|
-
✓ No stale pipeline
|
|
80
|
+
✓ No stale pipeline state
|
|
80
81
|
✓ No orphaned artifacts
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
|
|
83
|
+
Memory Health
|
|
83
84
|
|
|
84
85
|
Hook Health
|
|
85
86
|
✓ hooks.json valid
|
|
86
|
-
✓ All scripts exist
|
|
87
|
+
✓ All hook scripts exist
|
|
87
88
|
✓ All scripts executable
|
|
88
89
|
|
|
90
|
+
Learner Health
|
|
91
|
+
✓ Learner not enabled (opt-in via /afc:learner enable)
|
|
92
|
+
|
|
89
93
|
Version Sync (dev)
|
|
90
|
-
✓ Version triple match
|
|
94
|
+
✓ Version triple match (1.1.0)
|
|
91
95
|
✓ Cache in sync
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
✓ Frontmatter exists (
|
|
97
|
+
Skill Definitions (dev)
|
|
98
|
+
✓ Frontmatter exists (29 files)
|
|
95
99
|
✓ Required fields present
|
|
96
100
|
✓ Name-filename match
|
|
97
101
|
✓ Fork-agent references valid
|
|
@@ -108,7 +112,7 @@ Doc References (dev)
|
|
|
108
112
|
✓ Domain adapters exist (3 files)
|
|
109
113
|
|
|
110
114
|
─────────────────────────
|
|
111
|
-
Results:
|
|
115
|
+
Results: 26 passed, 2 warnings, 0 failures
|
|
112
116
|
2 warnings found. Non-blocking but review recommended.
|
|
113
117
|
```
|
|
114
118
|
|
|
@@ -119,4 +123,4 @@ Results: 28 passed, 2 warnings, 0 failures
|
|
|
119
123
|
- **Always run all checks**: do not stop on first failure. The full picture is the value.
|
|
120
124
|
- **Actionable fixes**: every non-pass result must include a Fix line. Never report a problem without a solution.
|
|
121
125
|
- **Fast execution**: skip CI/gate command checks if `--fast` is in arguments (these are the slowest checks).
|
|
122
|
-
- **Development checks**:
|
|
126
|
+
- **Development checks**: Version Sync, Skill Definitions, Agent Definitions, Doc References only run when inside the all-for-claudecode source repo.
|
|
@@ -43,8 +43,8 @@ git tag -f afc/pre-implement
|
|
|
43
43
|
**Standalone safety activation** (skip if inside `/afc:auto`):
|
|
44
44
|
If no active pipeline state exists, activate it for the duration of this command:
|
|
45
45
|
```bash
|
|
46
|
-
"${
|
|
47
|
-
"${
|
|
46
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" start {feature-name-from-plan.md}
|
|
47
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase implement
|
|
48
48
|
```
|
|
49
49
|
This enables Stop Gate and CI Gate hooks during standalone implementation. Release on completion (Step 7) or failure rollback.
|
|
50
50
|
|
|
@@ -81,8 +81,8 @@ If `.claude/afc/specs/{feature}/tasks.md` does not exist, generate it from plan.
|
|
|
81
81
|
- Constraint → tasks (every spec Constraint is addressed by at least one task)
|
|
82
82
|
3. **Validate** (script-based, no critic loop):
|
|
83
83
|
```bash
|
|
84
|
-
"${
|
|
85
|
-
"${
|
|
84
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-dag-validate.sh" .claude/afc/specs/{feature}/tasks.md
|
|
85
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-parallel-validate.sh" .claude/afc/specs/{feature}/tasks.md
|
|
86
86
|
```
|
|
87
87
|
4. If validation fails → fix tasks.md and re-validate (max 2 attempts)
|
|
88
88
|
5. Save to `.claude/afc/specs/{feature}/tasks.md`
|
|
@@ -312,12 +312,12 @@ When a worker agent returns an error:
|
|
|
312
312
|
|
|
313
313
|
#### Phase Completion Gate (3 steps)
|
|
314
314
|
|
|
315
|
-
> **Always** read `${
|
|
315
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/phase-gate-protocol.md` first and perform the 3–4 steps (CI gate → Mini-Review → Integration/E2E Gate (conditional) → Auto-Checkpoint) in order.
|
|
316
316
|
> Cannot advance to the next phase without passing the gate. Abort and report to user after 3 consecutive CI failures.
|
|
317
317
|
|
|
318
318
|
After passing the gate, create a phase rollback point:
|
|
319
319
|
```bash
|
|
320
|
-
"${
|
|
320
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase-tag {phase_number}
|
|
321
321
|
```
|
|
322
322
|
This enables granular rollback: `git reset --hard afc/phase-{N}` restores state after Phase N completed.
|
|
323
323
|
|
|
@@ -359,7 +359,7 @@ After all tasks are complete:
|
|
|
359
359
|
|
|
360
360
|
After CI passes, run a convergence-based Critic Loop to verify design alignment before reporting completion.
|
|
361
361
|
|
|
362
|
-
> **Always** read `${
|
|
362
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
363
363
|
|
|
364
364
|
**Critic Loop until convergence** (safety cap: 5):
|
|
365
365
|
|
|
@@ -378,7 +378,7 @@ After CI passes, run a convergence-based Critic Loop to verify design alignment
|
|
|
378
378
|
|
|
379
379
|
**Standalone cleanup** (if pipeline was activated in Step 0):
|
|
380
380
|
```bash
|
|
381
|
-
"${
|
|
381
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" end
|
|
382
382
|
```
|
|
383
383
|
|
|
384
384
|
```
|
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)
|
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?
|
package/skills/review/SKILL.md
CHANGED
|
@@ -276,7 +276,7 @@ If `.claude/afc/memory/retrospectives/` directory exists, load the **most recent
|
|
|
276
276
|
|
|
277
277
|
### 6. Critic Loop
|
|
278
278
|
|
|
279
|
-
> **Always** read `${
|
|
279
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
280
280
|
|
|
281
281
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
282
282
|
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afc:setup
|
|
3
|
+
description: "Global CLAUDE.md configuration — use when the user asks to set up afc routing in their global config, update the AFC block version, or resolve routing conflicts"
|
|
4
|
+
argument-hint: "[--force]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
model: sonnet
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# /afc:setup — Global CLAUDE.md Configuration
|
|
14
|
+
|
|
15
|
+
> Manages the all-for-claudecode routing block in `~/.claude/CLAUDE.md`.
|
|
16
|
+
> Handles injection, updates, conflict detection, and legacy migration of the AFC block.
|
|
17
|
+
> This is a **global config** operation — it modifies `~/.claude/CLAUDE.md`, NOT project files.
|
|
18
|
+
> For project-local setup (config, rules, profile), use `/afc:init` instead.
|
|
19
|
+
|
|
20
|
+
This skill is a **prompt-only skill** — there is no bash script.
|
|
21
|
+
All steps below are instructions for the LLM to execute directly using its allowed tools.
|
|
22
|
+
|
|
23
|
+
## Arguments
|
|
24
|
+
|
|
25
|
+
- `$ARGUMENTS` — (optional) flags:
|
|
26
|
+
- `--force` — skip conflict prompts and use coexistence mode
|
|
27
|
+
|
|
28
|
+
## Execution Steps
|
|
29
|
+
|
|
30
|
+
### 1. Version Resolution
|
|
31
|
+
|
|
32
|
+
Read `${CLAUDE_SKILL_DIR}/../../package.json` and extract the `"version"` field. Use this value as `{PLUGIN_VERSION}` throughout.
|
|
33
|
+
|
|
34
|
+
### 2. Check Current State
|
|
35
|
+
|
|
36
|
+
Read `~/.claude/CLAUDE.md`. If file does not exist, create it with an empty body and proceed to Step 5.
|
|
37
|
+
|
|
38
|
+
Check for:
|
|
39
|
+
- `<!-- AFC:START -->` marker → existing AFC block found
|
|
40
|
+
- `<!-- SELFISH:START -->` marker → legacy v1.x block found
|
|
41
|
+
- Neither → fresh install
|
|
42
|
+
|
|
43
|
+
**If existing AFC block found:**
|
|
44
|
+
- Extract version from `<!-- AFC:VERSION:X.Y.Z -->`
|
|
45
|
+
- If version matches `{PLUGIN_VERSION}`: print `AFC block already up to date (v{PLUGIN_VERSION})` and **stop**
|
|
46
|
+
- If version differs: proceed to Step 3 (will replace)
|
|
47
|
+
|
|
48
|
+
**If legacy SELFISH block found:**
|
|
49
|
+
- Remove entire `<!-- SELFISH:START -->` ~ `<!-- SELFISH:END -->` block
|
|
50
|
+
- Print: `Removed legacy SELFISH block`
|
|
51
|
+
- Proceed to Step 3
|
|
52
|
+
|
|
53
|
+
### 3. Conflict Pattern Scan
|
|
54
|
+
|
|
55
|
+
Search `~/.claude/CLAUDE.md` for routing conflicts. **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.
|
|
56
|
+
|
|
57
|
+
**A. Marker Block Detection**
|
|
58
|
+
- Regex: `<!-- ([A-Z0-9_-]+):START -->` ~ `<!-- \1:END -->`
|
|
59
|
+
- Record all found block names and line ranges
|
|
60
|
+
- **Strip these ranges from the scan target** — only scan lines NOT inside any marker block
|
|
61
|
+
|
|
62
|
+
**B. Agent Routing Conflict Detection**
|
|
63
|
+
In the **unguarded** (non-marker-block) content only, find directives containing these keywords:
|
|
64
|
+
- `executor`, `deep-executor` — conflicts with afc:implement
|
|
65
|
+
- `code-reviewer`, `quality-reviewer`, `style-reviewer`, `api-reviewer`, `security-reviewer`, `performance-reviewer` — conflicts with afc:review
|
|
66
|
+
- `debugger` (in agent routing context) — conflicts with afc:debug
|
|
67
|
+
- `planner` (in agent routing context) — conflicts with afc:plan
|
|
68
|
+
- `analyst`, `verifier` — conflicts with afc:validate
|
|
69
|
+
- `test-engineer` — conflicts with afc:test
|
|
70
|
+
|
|
71
|
+
**C. Skill Routing Conflict Detection**
|
|
72
|
+
In the **unguarded** content only, find these patterns:
|
|
73
|
+
- Another tool's skill trigger table (e.g., tables like `| situation | skill |`)
|
|
74
|
+
- `delegate to`, `route to`, `always use` + agent name combinations
|
|
75
|
+
- Directives related to `auto-trigger`, `intent detection`, `intent-based routing`
|
|
76
|
+
|
|
77
|
+
**D. Legacy Block Detection**
|
|
78
|
+
Previous versions without markers or with old branding:
|
|
79
|
+
- `## all-for-claudecode Auto-Trigger Rules`
|
|
80
|
+
- `## all-for-claudecode Integration`
|
|
81
|
+
- `<selfish-pipeline>` / `</selfish-pipeline>` XML tags
|
|
82
|
+
|
|
83
|
+
### 4. Report Conflicts and User Choice
|
|
84
|
+
|
|
85
|
+
**No conflicts found** → proceed directly to Step 5
|
|
86
|
+
|
|
87
|
+
**Conflicts found** (skip if `--force` flag present — default to coexistence):
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
CLAUDE.md Scan Results
|
|
91
|
+
├─ Tool blocks found: {block name list} (lines {range})
|
|
92
|
+
├─ Agent routing conflicts: {conflict count}
|
|
93
|
+
│ e.g., "executor" (line XX) ↔ afc:implement
|
|
94
|
+
│ e.g., "code-reviewer" (line XX) ↔ afc:review
|
|
95
|
+
└─ Skill routing conflicts: {conflict count}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Ask user:
|
|
99
|
+
|
|
100
|
+
> "Directives overlapping with afc were found. How would you like to proceed?"
|
|
101
|
+
>
|
|
102
|
+
> 1. **afc-exclusive mode** — Adds override rules in the AFC block to cover conflicting directives.
|
|
103
|
+
> Does not modify other tools' marker block contents.
|
|
104
|
+
> 2. **coexistence mode** — Adds only the AFC block without overrides.
|
|
105
|
+
> Since it's at the end of the file, afc directives will likely take priority.
|
|
106
|
+
> 3. **manual cleanup** — Shows the conflict list only and stops.
|
|
107
|
+
|
|
108
|
+
Based on choice:
|
|
109
|
+
- **Option 1**: AFC block includes explicit override rules (see conflict-overrides section below)
|
|
110
|
+
- **Option 2**: AFC block added without overrides (base template as-is)
|
|
111
|
+
- **Option 3**: Print conflict list only and abort without modifying CLAUDE.md
|
|
112
|
+
|
|
113
|
+
### 5. Inject AFC Block
|
|
114
|
+
|
|
115
|
+
Add the following block at the **very end** of `~/.claude/CLAUDE.md` (later-positioned directives have higher priority).
|
|
116
|
+
|
|
117
|
+
Replace existing AFC block if present, otherwise append.
|
|
118
|
+
If legacy block (`## all-for-claudecode Auto-Trigger Rules` etc.) exists, remove it then append.
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
<!-- AFC:START -->
|
|
122
|
+
<!-- AFC:VERSION:{PLUGIN_VERSION} -->
|
|
123
|
+
<afc-pipeline>
|
|
124
|
+
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.
|
|
125
|
+
|
|
126
|
+
## Skill Routing
|
|
127
|
+
|
|
128
|
+
Classify the user's intent and route to the matching skill. Use semantic understanding — not keyword matching.
|
|
129
|
+
|
|
130
|
+
| User Intent | Skill | Route When |
|
|
131
|
+
|-------------|-------|------------|
|
|
132
|
+
| Full lifecycle | `afc:auto` | User wants end-to-end feature development, or the request is a non-trivial new feature without an existing plan |
|
|
133
|
+
| Specification | `afc:spec` | User wants to define or write requirements, acceptance criteria, or success conditions |
|
|
134
|
+
| Design/Plan | `afc:plan` | User wants to plan HOW to implement before coding — approach, architecture decisions, design |
|
|
135
|
+
| Implement | `afc:implement` | User wants specific code changes with a clear scope: add feature, refactor, modify. Requires existing plan or precise instructions |
|
|
136
|
+
| Review | `afc:review` | User wants code review, PR review, or quality check on existing/changed code |
|
|
137
|
+
| Debug/Fix | `afc:debug` | User reports a bug, error, or broken behavior and wants diagnosis and fix |
|
|
138
|
+
| Test | `afc:test` | User wants to write tests, improve coverage, or verify behavior |
|
|
139
|
+
| Validate | `afc:validate` | User wants to check consistency or validate existing pipeline artifacts |
|
|
140
|
+
| Analyze | `afc:analyze` | User wants to understand, explore, or audit existing code without modifying it |
|
|
141
|
+
| QA Audit | `afc:qa` | User wants project quality audit, test confidence check, or runtime quality gaps |
|
|
142
|
+
| Research | `afc:research` | User wants deep investigation of external tools, libraries, APIs, or technical concepts |
|
|
143
|
+
| Ideate | `afc:ideate` | User wants to brainstorm ideas, explore possibilities, or draft a product brief |
|
|
144
|
+
| Consult | `afc:consult` | User wants expert advice on a decision: library choice, architecture direction, legal/security/infra guidance |
|
|
145
|
+
| Launch | `afc:launch` | User wants to prepare a release — generate changelog, release notes, version bump, or tag |
|
|
146
|
+
| Tasks | `afc:tasks` | User explicitly wants to decompose work into a task breakdown |
|
|
147
|
+
| Ambiguous | `afc:clarify` | User's request is too vague or underspecified to route confidently |
|
|
148
|
+
|
|
149
|
+
### Routing Rules
|
|
150
|
+
|
|
151
|
+
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.
|
|
152
|
+
2. **Compound intents**: Route to the primary intent. The pipeline handles sequencing internally.
|
|
153
|
+
3. **Design-first**: When scope is non-trivial (multiple files, architectural decisions needed), prefer `afc:auto` or `afc:plan` over direct `afc:implement`.
|
|
154
|
+
|
|
155
|
+
User-only (not auto-triggered — when user invokes directly via `/afc:X`, execute the skill immediately):
|
|
156
|
+
- `afc:doctor` — plugin health check
|
|
157
|
+
- `afc:setup` — global CLAUDE.md configuration
|
|
158
|
+
- `afc:init` — project-local setup
|
|
159
|
+
- `afc:architect` — architecture review
|
|
160
|
+
- `afc:security` — security scan
|
|
161
|
+
- `afc:checkpoint` — session save
|
|
162
|
+
- `afc:resume` — session restore
|
|
163
|
+
- `afc:principles` — project principles management
|
|
164
|
+
- `afc:clean` — pipeline cleanup (artifact cleanup, dead code scan, pipeline flag release)
|
|
165
|
+
- `afc:triage` — parallel PR/issue triage
|
|
166
|
+
- `afc:learner` — pattern learning or rule promotion
|
|
167
|
+
- `afc:pr-comment` — post PR review comments to GitHub
|
|
168
|
+
- `afc:release-notes` — generate release notes from git history
|
|
169
|
+
|
|
170
|
+
## Pipeline
|
|
171
|
+
|
|
172
|
+
spec → plan → implement → review → clean
|
|
173
|
+
|
|
174
|
+
## Override Rules
|
|
175
|
+
|
|
176
|
+
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.
|
|
177
|
+
|
|
178
|
+
## Source Verification
|
|
179
|
+
|
|
180
|
+
When analyzing or making claims about external systems, APIs, SDKs, or third-party tools:
|
|
181
|
+
- Verify against official documentation, NOT project-internal docs
|
|
182
|
+
- Do not hardcode reference data when delegating to sub-agents — instruct them to look up primary sources
|
|
183
|
+
- Cross-verify high-severity findings before reporting
|
|
184
|
+
</afc-pipeline>
|
|
185
|
+
<!-- AFC:END -->
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**When Option 1 (afc-exclusive mode) is selected**, add the following directly below the Override Rules:
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
## Detected Conflicts
|
|
192
|
+
|
|
193
|
+
This environment has other agent routing tools that overlap with afc.
|
|
194
|
+
The following rules were auto-generated to resolve conflicts:
|
|
195
|
+
- The Skill Routing table above always takes priority over the agent routing directives of {detected tool blocks}
|
|
196
|
+
- This block is at the end of the file and therefore has the highest priority
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### 6. Final Output
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
all-for-claudecode setup complete
|
|
203
|
+
├─ CLAUDE.md: {injected|updated|already current|user aborted}
|
|
204
|
+
├─ Version: {PLUGIN_VERSION}
|
|
205
|
+
│ {if conflicts found} └─ Conflict resolution: {afc-exclusive|coexistence|user cleanup}
|
|
206
|
+
└─ Next step: /afc:init (project setup) or /afc:auto (start building)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Notes
|
|
210
|
+
|
|
211
|
+
- **Idempotent**: safe to run multiple times. If version matches, it's a no-op.
|
|
212
|
+
- **Global only**: this skill only touches `~/.claude/CLAUDE.md`. For project config, use `/afc:init`.
|
|
213
|
+
- **Global CLAUDE.md principles**:
|
|
214
|
+
- Never modify content outside the `<!-- AFC:START/END -->` markers
|
|
215
|
+
- Never modify content inside other tools' marker blocks (`<!-- *:START/END -->`)
|
|
216
|
+
- Always place the AFC block at the very end of the file (ensures priority)
|
|
217
|
+
- Conflict resolution is handled only via override rules (do not delete or modify other blocks)
|
package/skills/spec/SKILL.md
CHANGED
|
@@ -98,7 +98,7 @@ If `.claude/afc/memory/retrospectives/` directory exists, load the **most recent
|
|
|
98
98
|
|
|
99
99
|
### 5. Critic Loop
|
|
100
100
|
|
|
101
|
-
> **Always** read `${
|
|
101
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
102
102
|
|
|
103
103
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
104
104
|
|
package/skills/tasks/SKILL.md
CHANGED
|
@@ -80,8 +80,8 @@ Decompose tasks per Phase defined in plan.md.
|
|
|
80
80
|
1. **1 task = 1 file** principle (where possible)
|
|
81
81
|
2. **Same file = sequential**, **different files = [P] candidate**
|
|
82
82
|
3. **Explicit dependencies**: Use `depends: [T001, T002]` to declare blocking dependencies. Tasks without `depends:` and with [P] marker are immediately parallelizable.
|
|
83
|
-
4. **[P] physical validation**: Before finalizing tasks.md, run `"${
|
|
84
|
-
5. **Dependency graph must be a DAG**: no circular dependencies allowed. **Mandatory validation**: run `"${
|
|
83
|
+
4. **[P] physical validation**: Before finalizing tasks.md, run `"${CLAUDE_SKILL_DIR}/../../scripts/afc-parallel-validate.sh" .claude/afc/specs/{feature}/tasks.md` to verify no file path overlaps exist among [P] tasks within the same phase. Fix any conflicts before proceeding.
|
|
84
|
+
5. **Dependency graph must be a DAG**: no circular dependencies allowed. **Mandatory validation**: run `"${CLAUDE_SKILL_DIR}/../../scripts/afc-dag-validate.sh" .claude/afc/specs/{feature}/tasks.md` before output. Abort if cycle detected.
|
|
85
85
|
6. **Test tasks**: Include a verification task for each testable unit
|
|
86
86
|
7. **Phase gate**: Add a `{config.gate}` validation task at the end of each Phase
|
|
87
87
|
|
|
@@ -93,14 +93,14 @@ If `.claude/afc/memory/retrospectives/` directory exists, load the **most recent
|
|
|
93
93
|
|
|
94
94
|
### 4. Critic Loop
|
|
95
95
|
|
|
96
|
-
> **Always** read `${
|
|
96
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
97
97
|
|
|
98
98
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
99
99
|
|
|
100
100
|
| Criterion | Validation |
|
|
101
101
|
|-----------|------------|
|
|
102
102
|
| **COVERAGE** | Are all files in plan.md's File Change Map included in tasks? Are all FR-* in spec.md covered? |
|
|
103
|
-
| **DEPENDENCIES** | Is the dependency graph a valid DAG? Do [P] tasks within the same phase have no file overlaps? Are all `depends:` targets valid task IDs? For physical validation of [P] file overlaps, reference the validation script: `"${
|
|
103
|
+
| **DEPENDENCIES** | Is the dependency graph a valid DAG? Do [P] tasks within the same phase have no file overlaps? Are all `depends:` targets valid task IDs? For physical validation of [P] file overlaps, reference the validation script: `"${CLAUDE_SKILL_DIR}/../../scripts/afc-parallel-validate.sh"` can be called with the tasks.md path to verify no conflicts exist. |
|
|
104
104
|
|
|
105
105
|
**On FAIL**: auto-fix and continue to next pass.
|
|
106
106
|
**On ESCALATE**: pause, present options to user, apply choice, resume.
|
package/skills/test/SKILL.md
CHANGED
|
@@ -93,7 +93,7 @@ Confirm strategy with user before proceeding.
|
|
|
93
93
|
|
|
94
94
|
### 4. Critic Loop
|
|
95
95
|
|
|
96
|
-
> **Always** read `${
|
|
96
|
+
> **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
|
|
97
97
|
|
|
98
98
|
Run the critic loop until convergence. Safety cap: 5 passes.
|
|
99
99
|
|
package/skills/triage/SKILL.md
CHANGED
|
@@ -33,7 +33,7 @@ model: sonnet
|
|
|
33
33
|
Run the metadata collection script:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
"${
|
|
36
|
+
"${CLAUDE_SKILL_DIR}/../../scripts/afc-triage.sh" "$ARGUMENTS"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
This returns JSON with PR/issue metadata. If the script is not available, fall back to direct `gh` commands:
|