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.
- package/.claude-plugin/marketplace.json +24 -5
- package/.claude-plugin/plugin.json +15 -4
- package/README.md +12 -0
- package/agents/afc-appsec-expert.md +19 -26
- package/agents/afc-architect.md +9 -2
- package/agents/afc-backend-expert.md +16 -4
- package/agents/afc-design-expert.md +17 -7
- package/agents/afc-impl-worker.md +7 -1
- package/agents/afc-infra-expert.md +16 -6
- package/agents/afc-legal-expert.md +16 -18
- package/agents/afc-marketing-expert.md +15 -5
- package/agents/afc-pm-expert.md +16 -5
- package/agents/afc-pr-analyst.md +1 -1
- package/agents/afc-security.md +7 -2
- package/agents/afc-tech-advisor.md +18 -30
- package/docs/agent-authoring-guide.md +144 -0
- package/docs/context-management-harness.md +293 -0
- package/docs/orchestration-modes.md +228 -0
- package/docs/skill-authoring-guide.md +153 -0
- package/hooks/hooks.json +27 -2
- package/package.json +4 -3
- package/schemas/hooks.schema.json +1 -1
- package/schemas/marketplace.schema.json +6 -1
- package/schemas/plugin.schema.json +0 -4
- package/scripts/afc-pipeline-manage.sh +1 -0
- package/scripts/afc-post-compact.sh +54 -0
- package/scripts/afc-spec-guard.sh +7 -7
- package/scripts/afc-stop-failure.sh +46 -0
- package/scripts/afc-sync-cache.sh +8 -2
- package/scripts/afc-tdd-guard.sh +7 -5
- package/scripts/afc-user-prompt-submit.sh +38 -0
- package/scripts/pre-compact-checkpoint.sh +10 -0
- package/scripts/session-start-context.sh +10 -0
- package/skills/architect/SKILL.md +1 -9
- package/skills/auto/SKILL.md +228 -910
- package/skills/auto/skill-advisor.md +306 -0
- package/skills/checkpoint/SKILL.md +7 -1
- package/skills/clarify/SKILL.md +3 -2
- package/skills/consult/SKILL.md +30 -123
- package/skills/consult/peer-mode.md +61 -0
- package/skills/debug/SKILL.md +3 -21
- package/skills/ideate/SKILL.md +1 -77
- package/skills/ideate/brief-template.md +73 -0
- package/skills/implement/SKILL.md +68 -260
- package/skills/init/SKILL.md +79 -129
- package/skills/init/reference.md +55 -0
- package/skills/issue/SKILL.md +51 -76
- package/skills/launch/SKILL.md +5 -0
- package/skills/learner/SKILL.md +1 -25
- package/skills/learner/suggestion-format.md +49 -0
- package/skills/plan/SKILL.md +1 -5
- package/skills/pr-comment/SKILL.md +38 -51
- package/skills/principles/SKILL.md +3 -7
- package/skills/qa/SKILL.md +3 -14
- package/skills/release-notes/SKILL.md +6 -5
- package/skills/resolve/SKILL.md +75 -158
- package/skills/resolve/graphql.md +48 -0
- package/skills/resume/SKILL.md +10 -5
- package/skills/review/SKILL.md +56 -202
- package/skills/review/perspectives.md +118 -0
- package/skills/security/SKILL.md +4 -22
- package/skills/security/cross-boundary-verification.md +22 -0
- package/skills/setup/SKILL.md +38 -87
- package/skills/setup/conflict-detection.md +33 -0
- package/skills/spec/SKILL.md +1 -5
- package/skills/tasks/SKILL.md +47 -70
- package/skills/test/SKILL.md +4 -16
- package/skills/triage/SKILL.md +38 -85
- package/skills/triage/coupling-detection.md +13 -0
- package/skills/triage/pr-analysis-prompt.md +46 -0
- package/skills/validate/SKILL.md +24 -62
- package/skills/validate/validation-categories.md +39 -0
package/skills/setup/SKILL.md
CHANGED
|
@@ -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
|
-
>
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
-
|
|
26
|
-
- `--force` — skip conflict prompts and use coexistence mode
|
|
24
|
+
- `--force` — skip conflict prompts, default to coexistence mode
|
|
27
25
|
|
|
28
|
-
##
|
|
26
|
+
## Steps
|
|
29
27
|
|
|
30
28
|
### 1. Version Resolution
|
|
31
29
|
|
|
32
|
-
Read `${CLAUDE_SKILL_DIR}/../../package.json`
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
42
|
+
### 3. Conflict Scan
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
**
|
|
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
|
-
|
|
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: {
|
|
92
|
-
├─ Agent routing conflicts: {
|
|
93
|
-
|
|
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
|
-
|
|
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
|
|
103
|
-
>
|
|
104
|
-
>
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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**:
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
|
|
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
|
package/skills/spec/SKILL.md
CHANGED
|
@@ -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
|
-
|
|
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
|
|
package/skills/tasks/SKILL.md
CHANGED
|
@@ -12,10 +12,10 @@ model: sonnet
|
|
|
12
12
|
---
|
|
13
13
|
# /afc:tasks — Task Decomposition
|
|
14
14
|
|
|
15
|
-
> Generates an executable task list (tasks.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
|
|
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
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
36
|
+
Extract from plan.md: phase breakdown, File Change Map, architecture decisions.
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
### 2. Decompose Tasks
|
|
44
39
|
|
|
45
|
-
#### Task Format
|
|
40
|
+
#### Task Format
|
|
46
41
|
|
|
47
42
|
```markdown
|
|
48
|
-
- [ ] T{NNN} {[P]} {[US*]} {description} `{file path}` {depends: [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
|
|
54
|
-
| `[P]` | No |
|
|
55
|
-
| `[US*]` | No | User Story label
|
|
56
|
-
| description | Yes |
|
|
57
|
-
| file path | Yes | Primary target file
|
|
58
|
-
| `depends:` | No |
|
|
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
|
|
66
|
-
|
|
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
|
|
65
|
+
#### Decomposition Rules
|
|
79
66
|
|
|
80
|
-
1. **1 task = 1 file**
|
|
81
|
-
2.
|
|
82
|
-
3.
|
|
83
|
-
4.
|
|
84
|
-
5.
|
|
85
|
-
6.
|
|
86
|
-
7.
|
|
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/`
|
|
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
|
-
|
|
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** |
|
|
103
|
-
| **DEPENDENCIES** |
|
|
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
|
-
|
|
106
|
-
|
|
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
|
|
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
|
|
127
|
-
-
|
|
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
|
|
138
|
-
├─ Phases: {
|
|
139
|
-
├─ Coverage: FR {
|
|
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
|
-
- **
|
|
147
|
-
-
|
|
148
|
-
- **Accurate file paths**:
|
|
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
|
package/skills/test/SKILL.md
CHANGED
|
@@ -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
|
|
27
|
+
## Project Config (auto-loaded)
|
|
28
28
|
|
|
29
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|