all-for-claudecode 2.13.0 → 2.14.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.
Files changed (72) hide show
  1. package/.claude-plugin/marketplace.json +24 -5
  2. package/.claude-plugin/plugin.json +15 -4
  3. package/README.md +12 -0
  4. package/agents/afc-appsec-expert.md +19 -26
  5. package/agents/afc-architect.md +9 -2
  6. package/agents/afc-backend-expert.md +16 -4
  7. package/agents/afc-design-expert.md +17 -7
  8. package/agents/afc-impl-worker.md +7 -1
  9. package/agents/afc-infra-expert.md +16 -6
  10. package/agents/afc-legal-expert.md +16 -18
  11. package/agents/afc-marketing-expert.md +15 -5
  12. package/agents/afc-pm-expert.md +16 -5
  13. package/agents/afc-pr-analyst.md +1 -1
  14. package/agents/afc-security.md +7 -2
  15. package/agents/afc-tech-advisor.md +18 -30
  16. package/docs/agent-authoring-guide.md +144 -0
  17. package/docs/context-management-harness.md +293 -0
  18. package/docs/orchestration-modes.md +228 -0
  19. package/docs/skill-authoring-guide.md +153 -0
  20. package/hooks/hooks.json +27 -2
  21. package/package.json +4 -3
  22. package/schemas/hooks.schema.json +1 -1
  23. package/schemas/marketplace.schema.json +6 -1
  24. package/schemas/plugin.schema.json +0 -4
  25. package/scripts/afc-pipeline-manage.sh +1 -0
  26. package/scripts/afc-post-compact.sh +54 -0
  27. package/scripts/afc-spec-guard.sh +7 -7
  28. package/scripts/afc-stop-failure.sh +46 -0
  29. package/scripts/afc-sync-cache.sh +8 -2
  30. package/scripts/afc-tdd-guard.sh +7 -5
  31. package/scripts/afc-user-prompt-submit.sh +38 -0
  32. package/scripts/pre-compact-checkpoint.sh +10 -0
  33. package/scripts/session-start-context.sh +10 -0
  34. package/skills/architect/SKILL.md +1 -9
  35. package/skills/auto/SKILL.md +228 -910
  36. package/skills/auto/skill-advisor.md +306 -0
  37. package/skills/checkpoint/SKILL.md +7 -1
  38. package/skills/clarify/SKILL.md +3 -2
  39. package/skills/consult/SKILL.md +30 -123
  40. package/skills/consult/peer-mode.md +61 -0
  41. package/skills/debug/SKILL.md +3 -21
  42. package/skills/ideate/SKILL.md +1 -77
  43. package/skills/ideate/brief-template.md +73 -0
  44. package/skills/implement/SKILL.md +68 -260
  45. package/skills/init/SKILL.md +79 -129
  46. package/skills/init/reference.md +55 -0
  47. package/skills/issue/SKILL.md +51 -76
  48. package/skills/launch/SKILL.md +5 -0
  49. package/skills/learner/SKILL.md +1 -25
  50. package/skills/learner/suggestion-format.md +49 -0
  51. package/skills/plan/SKILL.md +1 -5
  52. package/skills/pr-comment/SKILL.md +38 -51
  53. package/skills/principles/SKILL.md +3 -7
  54. package/skills/qa/SKILL.md +3 -14
  55. package/skills/release-notes/SKILL.md +6 -5
  56. package/skills/resolve/SKILL.md +75 -158
  57. package/skills/resolve/graphql.md +48 -0
  58. package/skills/resume/SKILL.md +10 -5
  59. package/skills/review/SKILL.md +56 -202
  60. package/skills/review/perspectives.md +118 -0
  61. package/skills/security/SKILL.md +4 -22
  62. package/skills/security/cross-boundary-verification.md +22 -0
  63. package/skills/setup/SKILL.md +38 -87
  64. package/skills/setup/conflict-detection.md +33 -0
  65. package/skills/spec/SKILL.md +1 -5
  66. package/skills/tasks/SKILL.md +47 -70
  67. package/skills/test/SKILL.md +4 -16
  68. package/skills/triage/SKILL.md +38 -85
  69. package/skills/triage/coupling-detection.md +13 -0
  70. package/skills/triage/pr-analysis-prompt.md +46 -0
  71. package/skills/validate/SKILL.md +24 -62
  72. package/skills/validate/validation-categories.md +39 -0
@@ -13,109 +13,64 @@ model: sonnet
13
13
  # /afc:setup — Global CLAUDE.md Configuration
14
14
 
15
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.
16
+ > **Global only** modifies `~/.claude/CLAUDE.md`, not project files. For project-local setup, use `/afc:init`.
19
17
 
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.
18
+ ## Current State
19
+
20
+ !`cat ~/.claude/CLAUDE.md 2>/dev/null || echo "[CLAUDE.md NOT FOUND]"`
22
21
 
23
22
  ## Arguments
24
23
 
25
- - `$ARGUMENTS` — (optional) flags:
26
- - `--force` — skip conflict prompts and use coexistence mode
24
+ - `--force` — skip conflict prompts, default to coexistence mode
27
25
 
28
- ## Execution Steps
26
+ ## Steps
29
27
 
30
28
  ### 1. Version Resolution
31
29
 
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
30
+ Read `${CLAUDE_SKILL_DIR}/../../package.json` extract `"version"` use as `{PLUGIN_VERSION}`.
42
31
 
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)
32
+ ### 2. Analyze Current State
47
33
 
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
34
+ Parse the pre-fetched CLAUDE.md content above:
52
35
 
53
- ### 3. Conflict Pattern Scan
36
+ - `<!-- AFC:START -->` found → existing AFC block
37
+ - Extract `<!-- AFC:VERSION:X.Y.Z -->`. If matches `{PLUGIN_VERSION}`: print `AFC block already up to date (v{PLUGIN_VERSION})` and **stop**.
38
+ - Otherwise: replace block in Step 5.
39
+ - `<!-- SELFISH:START -->` found → remove entire `SELFISH:START`…`SELFISH:END` block, print `Removed legacy SELFISH block`, proceed.
40
+ - Neither → fresh install, proceed to Step 5.
54
41
 
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.
42
+ ### 3. Conflict Scan
56
43
 
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
44
+ Detect conflicts in unguarded content (outside any `<!-- *:START/END -->` blocks).
45
+ See [`conflict-detection.md`](conflict-detection.md) for marker-block algorithm and conflict keyword table.
61
46
 
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
47
+ Skip this step if `--force` is set — default to coexistence.
70
48
 
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`
49
+ ### 4. Resolve Conflicts
76
50
 
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
51
+ **No conflicts** proceed to Step 5.
82
52
 
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):
53
+ **Conflicts found** show scan summary and ask:
88
54
 
89
55
  ```
90
56
  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}
57
+ ├─ Tool blocks found: {names} (lines {range})
58
+ ├─ Agent routing conflicts: {count} — e.g. "executor" (line XX) ↔ afc:implement
59
+ └─ Skill routing conflicts: {count}
96
60
  ```
97
61
 
98
- Ask user:
99
-
100
- > "Directives overlapping with afc were found. How would you like to proceed?"
62
+ > "Directives overlapping with afc were found. Choose resolution:"
101
63
  >
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.
64
+ > 1. **afc-exclusive** — add override rules inside the AFC block (does not touch other tools' blocks)
65
+ > 2. **coexistence** append AFC block as-is (end-of-file position gives it priority)
66
+ > 3. **manual cleanup** — print conflict list and abort
107
67
 
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
68
+ - Option 3: print list and abort without writing.
112
69
 
113
70
  ### 5. Inject AFC Block
114
71
 
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.
72
+ Append the block below to the **end** of `~/.claude/CLAUDE.md` (or replace existing AFC block in place).
73
+ Also remove any legacy unguarded block (`## all-for-claudecode Auto-Trigger Rules`, etc.) before appending.
119
74
 
120
75
  ```markdown
121
76
  <!-- AFC:START -->
@@ -187,14 +142,13 @@ When analyzing or making claims about external systems, APIs, SDKs, or third-par
187
142
  <!-- AFC:END -->
188
143
  ```
189
144
 
190
- **When Option 1 (afc-exclusive mode) is selected**, add the following directly below the Override Rules:
145
+ **When afc-exclusive mode (Option 1)** is selected, append inside the block after Override Rules:
191
146
 
192
147
  ```markdown
193
148
  ## Detected Conflicts
194
149
 
195
- This environment has other agent routing tools that overlap with afc.
196
150
  The following rules were auto-generated to resolve conflicts:
197
- - The Skill Routing table above always takes priority over the agent routing directives of {detected tool blocks}
151
+ - The Skill Routing table above always takes priority over agent routing directives of {detected tool blocks}
198
152
  - This block is at the end of the file and therefore has the highest priority
199
153
  ```
200
154
 
@@ -204,16 +158,13 @@ The following rules were auto-generated to resolve conflicts:
204
158
  all-for-claudecode setup complete
205
159
  ├─ CLAUDE.md: {injected|updated|already current|user aborted}
206
160
  ├─ Version: {PLUGIN_VERSION}
207
- │ {if conflicts found} └─ Conflict resolution: {afc-exclusive|coexistence|user cleanup}
161
+ │ {if conflicts} └─ Conflict resolution: {afc-exclusive|coexistence|user cleanup}
208
162
  └─ Next step: /afc:init (project setup) or /afc:auto (start building)
209
163
  ```
210
164
 
211
165
  ## Notes
212
166
 
213
- - **Idempotent**: safe to run multiple times. If version matches, it's a no-op.
214
- - **Global only**: this skill only touches `~/.claude/CLAUDE.md`. For project config, use `/afc:init`.
215
- - **Global CLAUDE.md principles**:
216
- - Never modify content outside the `<!-- AFC:START/END -->` markers
217
- - Never modify content inside other tools' marker blocks (`<!-- *:START/END -->`)
218
- - Always place the AFC block at the very end of the file (ensures priority)
219
- - Conflict resolution is handled only via override rules (do not delete or modify other blocks)
167
+ - **Idempotent**: version match no-op.
168
+ - Never modify content outside `<!-- AFC:START/END -->` markers.
169
+ - Never modify content inside other tools' `<!-- *:START/END -->` blocks.
170
+ - Always place the AFC block at the end of the file.
@@ -0,0 +1,33 @@
1
+ # Conflict Detection Reference
2
+
3
+ ## Marker Block Scanning
4
+
5
+ **Goal:** identify content inside `<!-- *:START --> ... <!-- *:END -->` blocks and exclude it from conflict analysis. Other tools manage their own blocks — only scan *unguarded* (outside-marker) content.
6
+
7
+ **Algorithm:**
8
+ 1. Match `<!-- ([A-Z0-9_-]+):START -->` to `<!-- \1:END -->` pairs
9
+ 2. Record each block name and its line range
10
+ 3. Remove those line ranges from the scan target
11
+
12
+ ## Agent Routing Conflicts (unguarded content only)
13
+
14
+ | Keyword | Conflicts with |
15
+ |---------|---------------|
16
+ | `executor`, `deep-executor` | afc:implement |
17
+ | `code-reviewer`, `quality-reviewer`, `style-reviewer`, `api-reviewer`, `security-reviewer`, `performance-reviewer` | afc:review |
18
+ | `debugger` (agent routing context) | afc:debug |
19
+ | `planner` (agent routing context) | afc:plan |
20
+ | `analyst`, `verifier` | afc:validate |
21
+ | `test-engineer` | afc:test |
22
+
23
+ ## Skill Routing Conflicts (unguarded content only)
24
+
25
+ - Skill trigger tables (e.g. `| situation | skill |`)
26
+ - `delegate to`, `route to`, `always use` + agent name combinations
27
+ - Directives referencing `auto-trigger`, `intent detection`, `intent-based routing`
28
+
29
+ ## Legacy Block Patterns
30
+
31
+ - `## all-for-claudecode Auto-Trigger Rules`
32
+ - `## all-for-claudecode Integration`
33
+ - `<selfish-pipeline>` / `</selfish-pipeline>` XML tags
@@ -111,11 +111,7 @@ Run the critic loop until convergence. Safety cap: 5 passes.
111
111
  | **EDGE_CASES** | Are at least 2 edge cases identified? Any missing boundary conditions? |
112
112
  | **TESTABILITY** | Does every System Requirement follow one of the 5 EARS patterns (WHEN/WHILE/IF/WHERE/SHALL)? Does each EARS requirement have a mapped TC (`→ TC: should_...`)? If not → FAIL and auto-fix: rewrite to EARS + generate TC mapping. |
113
113
 
114
- **On FAIL**: auto-fix and continue to next pass.
115
- **On ESCALATE**: pause, present options to user, apply choice, resume.
116
- **On DEFER**: record reason, mark criterion clean, continue.
117
- **On CONVERGE**: `✓ Critic converged ({N} passes, {M} fixes, {E} escalations)`
118
- **On SAFETY CAP**: `⚠ Critic safety cap ({N} passes). Review recommended.`
114
+ Follow verdict handling and output format per `docs/critic-loop-rules.md`.
119
115
 
120
116
  ### 5.5. Auto-Checkpoint (standalone only)
121
117
 
@@ -12,10 +12,10 @@ model: sonnet
12
12
  ---
13
13
  # /afc:tasks — Task Decomposition
14
14
 
15
- > Generates an executable task list (tasks.md) based on plan.md.
16
- > Validates coverage with convergence-based Critic Loop.
15
+ > Generates an executable task list (tasks.md) from plan.md.
16
+ > Validates coverage with a convergence-based Critic Loop.
17
17
  >
18
- > **Note**: In `/afc:auto` pipeline, task generation is handled automatically at implement start (no separate tasks phase). This command is for standalone use when manual task decomposition control is needed.
18
+ > **Note**: In `/afc:auto`, task generation runs automatically at implement start. Use this command only for standalone manual control.
19
19
 
20
20
  ## Arguments
21
21
 
@@ -23,90 +23,73 @@ model: sonnet
23
23
 
24
24
  ## Config Load
25
25
 
26
- **Must** read `.claude/afc.config.md` first. If the config file is not present, print "`.claude/afc.config.md` not found. Run `/afc:init` first." then **abort**.
26
+ Read `.claude/afc.config.md` first. If missing: print "`.claude/afc.config.md` not found. Run `/afc:init` first." then **abort**.
27
27
 
28
28
  ## Execution Steps
29
29
 
30
30
  ### 1. Load Context
31
31
 
32
- 1. Load from `.claude/afc/specs/{feature}/`:
33
- - **plan.md** (required) — stop if missing: "Run /afc:plan first."
34
- - **spec.md** (required)
35
- - **research.md** (if present)
36
- 2. Extract from plan.md:
37
- - Phase breakdown
38
- - File Change Map
39
- - Architecture decisions
32
+ From `.claude/afc/specs/{feature}/`:
33
+ - **plan.md** (required) — if missing: "Run /afc:plan first."
34
+ - **spec.md** (required), **research.md** (if present)
40
35
 
41
- ### 2. Decompose Tasks
36
+ Extract from plan.md: phase breakdown, File Change Map, architecture decisions.
42
37
 
43
- Decompose tasks per Phase defined in plan.md.
38
+ ### 2. Decompose Tasks
44
39
 
45
- #### Task Format (required)
40
+ #### Task Format
46
41
 
47
42
  ```markdown
48
- - [ ] T{NNN} {[P]} {[US*]} {description} `{file path}` {depends: [TXXX, TXXX]}
43
+ - [ ] T{NNN} {[P]} {[US*]} {description} `{file path}` {depends: [TXXX, ...]}
49
44
  ```
50
45
 
51
46
  | Component | Required | Description |
52
47
  |-----------|----------|-------------|
53
- | `T{NNN}` | Yes | 3-digit sequential ID (T001, T002, ...) |
54
- | `[P]` | No | **Mandatory parallel execution**task MUST run in parallel with other [P] tasks in the same phase. Requires: (1) no file overlap with other [P] tasks in the same phase, (2) different target files per task (enforced by `afc-parallel-validate.sh`). Sequential substitution of [P] tasks is prohibited. |
55
- | `[US*]` | No | User Story label (US1, US2, ... from spec.md) |
56
- | description | Yes | Clear task description (start with a verb) |
57
- | file path | Yes | Primary target file (wrapped in backticks) |
58
- | `depends:` | No | Explicit dependency list — task cannot start until all listed tasks complete |
48
+ | `T{NNN}` | Yes | 3-digit sequential ID |
49
+ | `[P]` | No | Mandatory parallel execution — no file overlap with other [P] tasks in same phase |
50
+ | `[US*]` | No | User Story label from spec.md |
51
+ | `description` | Yes | Verb-first clear description |
52
+ | `` `file path` `` | Yes | Primary target file |
53
+ | `depends:` | No | Blocking dependency list |
59
54
 
60
55
  #### Phase Structure
61
56
 
62
57
  ```markdown
63
58
  # Tasks: {feature name}
64
-
65
- ## Phase 1: Setup
66
- {type definitions, configuration, directory structure}
67
-
68
- ## Phase 2: Core
69
- {core business logic, store, API}
70
-
71
- ## Phase 3: UI
72
- {components, interactions}
73
-
74
- ## Phase 4: Integration & Polish
75
- {integration, error handling, optimization}
59
+ ## Phase 1: Setup — type definitions, configuration
60
+ ## Phase 2: Core — business logic, store, API
61
+ ## Phase 3: UI — components, interactions
62
+ ## Phase 4: Integration & Polish — error handling, optimization
76
63
  ```
77
64
 
78
- #### Decomposition Principles
65
+ #### Decomposition Rules
79
66
 
80
- 1. **1 task = 1 file** principle (where possible)
81
- 2. **Same file = sequential**, **different files = [P] candidate**
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 `"${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
- 6. **Test tasks**: Include a verification task for each testable unit
86
- 7. **Phase gate**: Add a `{config.gate}` validation task at the end of each Phase
67
+ 1. **1 task = 1 file** (where possible)
68
+ 2. Same file sequential; different files `[P]` candidate
69
+ 3. **`[P]` is mandatory, not optional** once marked, task MUST run in parallel
70
+ 4. Validate `[P]` file overlaps: run `"${CLAUDE_SKILL_DIR}/../../scripts/afc-parallel-validate.sh" .claude/afc/specs/{feature}/tasks.md`
71
+ 5. Validate DAG (no cycles): run `"${CLAUDE_SKILL_DIR}/../../scripts/afc-dag-validate.sh" .claude/afc/specs/{feature}/tasks.md` abort if cycle detected
72
+ 6. Include a verification task per testable unit
73
+ 7. Add `{config.gate}` validation task at end of each Phase
74
+ 8. **No over-decomposition**: skip separate tasks for single-line changes
87
75
 
88
76
  ### 3. Retrospective Check
89
77
 
90
- If `.claude/afc/memory/retrospectives/` directory exists, load the **most recent 10 files** (sorted by filename descending) and check:
91
- - Were there previous parallel conflict issues ([P] file overlaps)? Flag similar file patterns.
92
- - Were there tasks that were over-decomposed or under-decomposed? Adjust granularity.
78
+ If `.claude/afc/memory/retrospectives/` exists, load the 10 most recent files (sorted descending) and check for prior `[P]` conflict patterns or granularity issues.
93
79
 
94
80
  ### 4. Critic Loop
95
81
 
96
- > **Always** read `${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md` first and follow it.
97
-
98
- Run the critic loop until convergence. Safety cap: 5 passes.
82
+ Read [`docs/critic-loop-rules.md`](../../docs/critic-loop-rules.md) first and follow all rules. Safety cap: 5 passes.
99
83
 
100
84
  | Criterion | Validation |
101
85
  |-----------|------------|
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: `"${CLAUDE_SKILL_DIR}/../../scripts/afc-parallel-validate.sh"` can be called with the tasks.md path to verify no conflicts exist. |
86
+ | **COVERAGE** | All files in plan.md File Change Map included? All FR-* in spec.md covered? |
87
+ | **DEPENDENCIES** | DAG valid? `[P]` tasks in same phase have no file overlaps? All `depends:` IDs exist? |
88
+
89
+ **Verdicts**: PASS / FAIL (auto-fix, continue) / ESCALATE (pause for user) / DEFER (record, continue)
104
90
 
105
- **On FAIL**: auto-fix and continue to next pass.
106
- **On ESCALATE**: pause, present options to user, apply choice, resume.
107
- **On DEFER**: record reason, mark criterion clean, continue.
108
- **On CONVERGE**: `✓ Critic converged ({N} passes, {M} fixes, {E} escalations)`
109
- **On SAFETY CAP**: `⚠ Critic safety cap ({N} passes). Review recommended.`
91
+ On convergence: `✓ Critic converged ({N} passes, {M} fixes, {E} escalations)`
92
+ On safety cap: `⚠ Critic safety cap ({N} passes). Review recommended.`
110
93
 
111
94
  ### 5. Coverage Mapping
112
95
 
@@ -115,17 +98,15 @@ Run the critic loop until convergence. Safety cap: 5 passes.
115
98
  | Requirement | Tasks |
116
99
  |-------------|-------|
117
100
  | FR-001 | T003, T007 |
118
- | FR-002 | T005, T008 |
119
101
  | NFR-001 | T012 |
120
102
  ```
121
103
 
122
- Every FR-*/NFR-* must be mapped to at least one task.
104
+ Every FR-*/NFR-* must map to at least one task.
123
105
 
124
106
  ### 5.5. Auto-Checkpoint (standalone only)
125
107
 
126
- When not running inside `/afc:auto`, save progress for `/afc:resume`:
127
- - Write/update `.claude/afc/memory/checkpoint.md` with: branch, last commit, feature name, current phase (tasks complete), task count ({total} tasks, {parallel} parallel), next step (`/afc:implement`)
128
- - Skip if running inside auto pipeline (auto manages its own checkpoints via phase transitions)
108
+ When not inside `/afc:auto`, write `.claude/afc/memory/checkpoint.md`:
109
+ - branch, last commit, feature name, phase (tasks complete), task count, next step (`/afc:implement`)
129
110
 
130
111
  ### 6. Final Output
131
112
 
@@ -134,19 +115,15 @@ Save to `.claude/afc/specs/{feature}/tasks.md`, then:
134
115
  ```
135
116
  Tasks generated
136
117
  ├─ .claude/afc/specs/{feature}/tasks.md
137
- ├─ Tasks: {total count} ({[P] count} parallelizable)
138
- ├─ Phases: {phase count}
139
- ├─ Coverage: FR {coverage}%, NFR {coverage}%
118
+ ├─ Tasks: {total} ({[P] count} parallelizable)
119
+ ├─ Phases: {count}
120
+ ├─ Coverage: FR {N}%, NFR {N}%
140
121
  ├─ Critic: converged ({N} passes, {M} fixes, {E} escalations)
141
122
  └─ Next step: /afc:validate (optional) or /afc:implement
142
123
  ```
143
124
 
144
125
  ## Notes
145
126
 
146
- - **Do not write implementation code**: Write task descriptions only. Actual code is the responsibility of /afc:implement.
147
- - **No over-decomposition**: Do not create separate tasks for single-line changes.
148
- - **Accurate file paths**: Use paths based on the actual project structure (no guessing).
149
- - **Use [P] sparingly**: Mark [P] only for truly independent tasks. When in doubt, keep sequential.
150
- - **Dependencies unlock orchestration**: explicit `depends:` enables /afc:implement to use dependency-aware scheduling. Note: `addBlockedBy` auto-unblocking is only guaranteed in Agent Teams mode. In sub-agent mode, the orchestrator must poll TaskList and manually check blockedBy status after each task completion.
151
- - **Cross-phase dependencies prohibited**: `depends:` may only reference task IDs within the same phase or a previous phase. Phase N tasks are registered only when Phase N begins — this prevents workers from claiming future-phase tasks.
152
- - **[P] is mandatory, not optional**: once a [P] marker is assigned, the task MUST execute in parallel. Do not mark [P] unless you are certain the task has no file overlap and no implicit ordering requirement.
127
+ - **Cross-phase `depends:` prohibited**: only reference tasks in same or previous phase
128
+ - **`addBlockedBy` auto-unblocking** is guaranteed in Agent Teams only; in sub-agent mode the orchestrator must poll manually
129
+ - **Accurate file paths**: use actual project structure no guessing
@@ -24,19 +24,11 @@ model: sonnet
24
24
  - Feature name (e.g., `login flow`)
25
25
  - `coverage` — full coverage analysis and gap remediation
26
26
 
27
- ## Config Load
27
+ ## Project Config (auto-loaded)
28
28
 
29
- **Always** read `.claude/afc.config.md` first.
29
+ !`cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."`
30
30
 
31
- If config file is missing:
32
- 1. Ask the user: "`.claude/afc.config.md` not found. Run `/afc:init` to set up the project?"
33
- 2. If user accepts → run `/afc:init`, then **restart this command** with the original `$ARGUMENTS`
34
- 3. If user declines → **abort**
35
-
36
- Values used from config:
37
- - `{config.gate}` — CI validation command (from `## CI Commands` YAML)
38
- - `{config.architecture}` — architecture pattern (from `## Architecture` section)
39
- - Test framework info — from `## Project Context` section
31
+ Values used: `{config.gate}` (CI), `{config.architecture}` (layers), test framework from Project Context.
40
32
 
41
33
  ## Execution Steps
42
34
 
@@ -102,11 +94,7 @@ Run the critic loop until convergence. Safety cap: 5 passes.
102
94
  | **COVERAGE** | Are all core logic and branch points covered? |
103
95
  | **QUALITY** | Do tests validate behavior, not implementation details? Are there any brittle tests? |
104
96
 
105
- **On FAIL**: auto-fix and continue to next pass.
106
- **On ESCALATE**: pause, present options to user, apply choice, resume.
107
- **On DEFER**: record reason, mark criterion clean, continue.
108
- **On CONVERGE**: `✓ Critic converged ({N} passes, {M} fixes, {E} escalations)`
109
- **On SAFETY CAP**: `⚠ Critic safety cap ({N} passes). Review recommended.`
97
+ Follow verdict handling and output format per `docs/critic-loop-rules.md`.
110
98
 
111
99
  ### 5. Run and Verify Tests
112
100