all-for-claudecode 2.12.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 +14 -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 +43 -1
  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 +191 -0
  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 +162 -0
  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 +40 -87
  64. package/skills/setup/conflict-detection.md +33 -0
  65. package/skills/spec/SKILL.md +6 -9
  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
@@ -14,9 +14,15 @@ model: sonnet
14
14
 
15
15
  # /afc:triage — PR & Issue Triage
16
16
 
17
- > Collects open PRs and issues, analyzes them in parallel, and produces a priority-ranked triage report.
17
+ > Collects open PRs and issues, analyzes them in parallel batch, and produces a priority-ranked triage report.
18
18
  > Uses lightweight analysis first (no checkout), then selective deep analysis with worktree isolation for PRs that require build/test verification.
19
19
 
20
+ ## Pre-fetched Context
21
+
22
+ !`gh pr list --json number,title,headRefName,author,labels,additions,deletions,changedFiles,createdAt,updatedAt,reviewDecision,isDraft --limit 50 2>/dev/null || echo "PR_FETCH_FAILED"`
23
+
24
+ !`gh issue list --json number,title,labels,author,createdAt,updatedAt,comments --limit 50 2>/dev/null || echo "ISSUE_FETCH_FAILED"`
25
+
20
26
  ## Arguments
21
27
 
22
28
  - `$ARGUMENTS` — (optional) Triage scope
@@ -30,64 +36,28 @@ model: sonnet
30
36
 
31
37
  ### 1. Collect Targets
32
38
 
33
- Run the metadata collection script:
39
+ Use the pre-fetched context above. If fetch failed, fall back to:
34
40
 
35
41
  ```bash
36
42
  "${CLAUDE_SKILL_DIR}/../../scripts/afc-triage.sh" "$ARGUMENTS"
37
43
  ```
38
44
 
39
- This returns JSON with PR/issue metadata. If the script is not available, fall back to direct `gh` commands:
40
-
41
- ```bash
42
- # PRs
43
- gh pr list --json number,title,headRefName,author,labels,additions,deletions,changedFiles,createdAt,updatedAt,reviewDecision,isDraft --limit 50
44
-
45
- # Issues
46
- gh issue list --json number,title,labels,author,createdAt,updatedAt,comments --limit 50
47
- ```
45
+ Apply `$ARGUMENTS` filtering: skip irrelevant items based on `--pr`, `--issue`, or specific numbers.
48
46
 
49
- ### 2. Phase 1 — Lightweight Parallel Analysis (no checkout)
47
+ ### 2. Phase 1 — Lightweight Parallel Batch (no checkout)
50
48
 
51
- For each PR/issue, gather analysis data **without** checking out branches:
49
+ Spawn all agents in a **single message** (parallel batch, max 5 concurrent).
52
50
 
53
- #### PR Analysis (parallel — one agent per PR, max 5 concurrent)
51
+ #### PR Analysis
54
52
 
55
- Spawn parallel agents in a **single message**:
53
+ See prompt template: [pr-analysis-prompt.md](./pr-analysis-prompt.md)
56
54
 
57
55
  ```
58
56
  Task("Triage PR #{number}: {title}", subagent_type: "general-purpose",
59
- prompt: "Analyze this PR without checking out the branch.
60
-
61
- PR #{number}: {title}
62
- Author: {author}
63
- Branch: {headRefName}
64
- Changed files: {changedFiles}, +{additions}/-{deletions}
65
- Labels: {labels}
66
- Review status: {reviewDecision}
67
- Draft: {isDraft}
68
-
69
- Steps:
70
- 1. Run: gh pr diff {number}
71
- 2. Run: gh pr view {number} --comments
72
- 3. Analyze the diff for:
73
- - What the PR does (1-2 sentence summary)
74
- - Risk level: Assess the actual impact of this PR on the system. Consider: does it change trust boundaries, data flows, or core business logic? Could a bug here cause data loss, security breach, or service outage? Rate risk based on potential blast radius, not file categories.
75
- - Complexity: Assess the cognitive complexity of reviewing this PR. Consider: how many distinct concerns does it touch, does it cross architectural boundaries, does understanding one change require understanding another? Rate complexity based on review difficulty, not file count.
76
- - Whether build/test verification is needed (yes/no + reason)
77
- - Potential issues or concerns (max 3)
78
- - Suggested reviewers or labels if obvious
79
-
80
- Output as structured text:
81
- SUMMARY: ...
82
- RISK: Critical|Medium|Low
83
- COMPLEXITY: High|Medium|Low
84
- NEEDS_DEEP: yes|no
85
- DEEP_REASON: ... (if yes)
86
- CONCERNS: ...
87
- SUGGESTION: ...")
57
+ prompt: "<contents of pr-analysis-prompt.md with placeholders filled>")
88
58
  ```
89
59
 
90
- #### Issue Analysis (parallel — one agent per batch of 5 issues)
60
+ #### Issue Analysis (batch of 5 per agent)
91
61
 
92
62
  ```
93
63
  Task("Triage Issues #{n1}-#{n5}", subagent_type: "general-purpose",
@@ -95,15 +65,15 @@ Task("Triage Issues #{n1}-#{n5}", subagent_type: "general-purpose",
95
65
  {issue list with titles, labels, comment count}
96
66
 
97
67
  For each issue:
98
- 1. Read issue body and comments: gh issue view {number} --comments
68
+ 1. gh issue view {number} --comments
99
69
  2. Classify:
100
- - Type: Classify based on the issue's actual nature. The standard categories (Bug, Feature, Enhancement, Question, Maintenance) serve as defaults, but adapt to the project's own labeling conventions if they differ.
101
- - Priority: Assess priority based on the issue's relationship to current work, user impact, and project goals not by forcing into generic P0-P3 buckets. Consider: is this blocking other work? How many users are affected? Does it align with current priorities?
102
- - Estimated effort: Estimate based on the actual scope of work required, considering project complexity and available context — not by rigid day-count buckets.
70
+ - Type: Bug|Feature|Enhancement|Question|Maintenance (adapt to project labels)
71
+ - Priority: P0 (blocking/critical) | P1 (high impact) | P2 (normal) | P3 (low/nice-to-have)
72
+ - Effort: Small|Medium|Large
103
73
  - Related PRs (if any mentioned)
104
74
  3. One-line summary
105
75
 
106
- Output as structured text per issue:
76
+ Output per issue:
107
77
  ISSUE #{number}: {title}
108
78
  TYPE: ...
109
79
  PRIORITY: P0|P1|P2|P3
@@ -114,9 +84,9 @@ Task("Triage Issues #{n1}-#{n5}", subagent_type: "general-purpose",
114
84
 
115
85
  ### 3. Phase 2 — Selective Deep Analysis (worktree, optional)
116
86
 
117
- From Phase 1 results, identify PRs where `NEEDS_DEEP: yes`.
87
+ From Phase 1, identify PRs where `NEEDS_DEEP: yes`.
118
88
 
119
- For each deep-analysis PR, spawn a **worktree-isolated agent**:
89
+ For each, spawn a worktree-isolated agent (max 3 concurrent):
120
90
 
121
91
  ```
122
92
  Task("Deep triage PR #{number}", subagent_type: "afc:afc-pr-analyst",
@@ -127,11 +97,10 @@ Task("Deep triage PR #{number}", subagent_type: "afc:afc-pr-analyst",
127
97
  Phase 1 concerns: {concerns from Phase 1}
128
98
 
129
99
  Steps:
130
- 1. Checkout the PR branch: gh pr checkout {number}
131
- 2. Run project CI/test commands if available (from .claude/afc.config.md or CLAUDE.md)
132
- 3. Check for type errors, lint issues, test failures
133
- 4. Analyze architectural impact
134
- 5. Report findings
100
+ 1. gh pr checkout {number}
101
+ 2. Run CI commands from .claude/afc.config.md or CLAUDE.md
102
+ 3. Check type errors, lint issues, test failures
103
+ 4. Report architectural impact
135
104
 
136
105
  Output:
137
106
  BUILD_STATUS: pass|fail|skip
@@ -141,28 +110,14 @@ Task("Deep triage PR #{number}", subagent_type: "afc:afc-pr-analyst",
141
110
  RECOMMENDATION: merge|request-changes|needs-discussion")
142
111
  ```
143
112
 
144
- **Important**: Launch at most 3 worktree agents concurrently to avoid resource contention.
145
-
146
- If `--deep` flag was specified, run Phase 2 for **all** PRs regardless of Phase 1 classification.
113
+ If `--deep` flag specified, run Phase 2 for all PRs regardless of Phase 1 classification.
147
114
 
148
115
  ### 3.5. Cross-PR Coupling Detection
149
116
 
150
- After Phase 1 (and Phase 2 if applicable) results are collected, detect file-level coupling between PRs:
151
-
152
- 1. Extract changed file lists from each PR's diff (already available from Phase 1 agent outputs)
153
- 2. For each file, check if it appears in multiple PRs' changed file lists
154
- 3. If shared files are found, annotate affected PRs with a coupling flag:
155
- ```
156
- COUPLING: PR #{A} and PR #{B} both modify src/shared/utils.ts
157
- ```
158
- 4. Include coupling information in the consolidated report's Priority Actions table and per-PR details
159
-
160
- This helps identify merge-order dependencies and potential conflict risks that no single-PR agent can detect.
117
+ See: [coupling-detection.md](./coupling-detection.md)
161
118
 
162
119
  ### 4. Consolidate Triage Report
163
120
 
164
- Merge Phase 1 and Phase 2 results into a single report:
165
-
166
121
  ```markdown
167
122
  # Triage Report
168
123
 
@@ -176,7 +131,7 @@ Merge Phase 1 and Phase 2 results into a single report:
176
131
 
177
132
  | # | Title | Risk | Complexity | Status | Action |
178
133
  |---|-------|------|------------|--------|--------|
179
- | {sorted by: Critical first, then by staleness} |
134
+ | {sorted: Critical first, then by staleness} |
180
135
 
181
136
  ### PR Details
182
137
 
@@ -195,25 +150,23 @@ Merge Phase 1 and Phase 2 results into a single report:
195
150
 
196
151
  | Priority | # | Title | Type | Effort | Related PR |
197
152
  |----------|---|-------|------|--------|------------|
198
- | {sorted by priority, then by creation date} |
153
+ | {sorted by priority, then creation date} |
199
154
 
200
155
  ## Summary
201
156
 
202
- - **Immediate attention**: {list of Critical PRs and P0 issues}
157
+ - **Immediate attention**: {Critical PRs and P0 issues}
203
158
  - **Ready to merge**: {PRs with no concerns and passing checks}
204
159
  - **Needs discussion**: {PRs/issues requiring team input}
205
- - **Stale items**: {PRs/issues with no meaningful activity for an extended period. Consider the project's typical development cadence — what counts as stale depends on the project's release cycle and activity patterns.}
160
+ - **Stale items**: {items with no meaningful activity relative to project cadence}
206
161
  ```
207
162
 
208
163
  ### 5. Save Report
209
164
 
210
- Save the triage report:
211
-
212
165
  ```
213
166
  .claude/afc/memory/triage/{YYYY-MM-DD}.md
214
167
  ```
215
168
 
216
- If a previous triage report exists for today, overwrite it.
169
+ Overwrite if a report for today already exists.
217
170
 
218
171
  ### 6. Final Output
219
172
 
@@ -229,8 +182,8 @@ Triage complete
229
182
 
230
183
  ## Notes
231
184
 
232
- - **Read-only**: Triage does not modify any code, merge PRs, or close issues.
233
- - **Rate limits**: `gh` API calls are rate-limited. For repos with 50+ open items, consider using `--pr` or `--issue` to reduce scope.
234
- - **Worktree cleanup**: Worktree agents auto-clean on completion. If a worktree is left behind, use `git worktree prune`.
235
- - **NEVER use `run_in_background: true` on Phase 1 Task calls**: agents must run in foreground so results are collected before consolidation. Phase 2 worktree agents also run in foreground.
236
- - **Parallel limits**: Phase 1 — max 5 concurrent agents. Phase 2 — max 3 concurrent worktree agents.
185
+ - **Read-only**: Does not modify code, merge PRs, or close issues.
186
+ - **Rate limits**: For repos with 50+ open items, use `--pr` or `--issue` to reduce scope.
187
+ - **Worktree cleanup**: Worktree agents auto-clean on completion. If left behind: `git worktree prune`.
188
+ - **NEVER use `run_in_background: true`** on Phase 1 or Phase 2 Task calls results must be collected before consolidation.
189
+ - **Parallel limits**: Phase 1 — max 5 concurrent (parallel batch). Phase 2 — max 3 concurrent worktree agents.
@@ -0,0 +1,13 @@
1
+ # Cross-PR Coupling Detection
2
+
3
+ After Phase 1 (and Phase 2 if applicable) results are collected, detect file-level coupling between PRs:
4
+
5
+ 1. Extract changed file lists from each PR's diff (available from Phase 1 agent outputs)
6
+ 2. For each file, check if it appears in multiple PRs' changed file lists
7
+ 3. If shared files are found, annotate affected PRs:
8
+ ```
9
+ COUPLING: PR #{A} and PR #{B} both modify {path/to/file}
10
+ ```
11
+ 4. Include coupling annotations in the Priority Actions table and per-PR details
12
+
13
+ This identifies merge-order dependencies and potential conflict risks that no single-PR agent can detect.
@@ -0,0 +1,46 @@
1
+ # PR Analysis Prompt Template
2
+
3
+ Use this prompt for each Phase 1 parallel batch agent:
4
+
5
+ ```
6
+ Analyze this PR without checking out the branch.
7
+
8
+ PR #{number}: {title}
9
+ Author: {author}
10
+ Branch: {headRefName}
11
+ Changed files: {changedFiles}, +{additions}/-{deletions}
12
+ Labels: {labels}
13
+ Review status: {reviewDecision}
14
+ Draft: {isDraft}
15
+
16
+ Steps:
17
+ 1. Run: gh pr diff {number}
18
+ 2. Run: gh pr view {number} --comments
19
+ 3. Analyze the diff for:
20
+ - What the PR does (1-2 sentence summary)
21
+ - Risk level (see rubric below)
22
+ - Complexity (see rubric below)
23
+ - Whether build/test verification is needed (yes/no + reason)
24
+ - Potential issues or concerns (max 3)
25
+ - Suggested reviewers or labels if obvious
26
+
27
+ Risk rubric:
28
+ - Critical: changes trust boundaries, auth, data integrity, or core business logic with outage/breach potential
29
+ - High: significant blast radius — broad API changes, DB schema, cross-service contracts
30
+ - Medium: localized impact — single service/module, recoverable if broken
31
+ - Low: isolated, low blast radius — docs, tests, UI copy, config flags
32
+
33
+ Complexity rubric:
34
+ - High: multiple distinct concerns, crosses architectural boundaries, understanding one change requires another
35
+ - Medium: moderate cross-cutting, single domain with some interdependencies
36
+ - Low: single-concern, self-contained, easy to review independently
37
+
38
+ Output as structured text:
39
+ SUMMARY: ...
40
+ RISK: Critical|High|Medium|Low
41
+ COMPLEXITY: High|Medium|Low
42
+ NEEDS_DEEP: yes|no
43
+ DEEP_REASON: ... (if yes)
44
+ CONCERNS: ...
45
+ SUGGESTION: ...
46
+ ```
@@ -13,78 +13,33 @@ model: sonnet
13
13
 
14
14
  # /afc:validate — Artifact Consistency Validation
15
15
 
16
- > Validates consistency and quality across spec.md, plan.md, and tasks.md.
17
- > **Read-only** — does not modify any files.
16
+ > Validates consistency across spec.md, plan.md, and tasks.md. **Read-only** — does not modify files.
18
17
 
19
- ## Arguments
20
-
21
- - `$ARGUMENTS` — (optional) limit validation scope (e.g., "spec-plan", "tasks-only")
18
+ ## Project Config (auto-loaded)
19
+ !`cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND — run /afc:init first]"`
22
20
 
23
- ## Config Load
24
-
25
- **Always** read `.claude/afc.config.md` first. This file contains free-form markdown sections:
26
- - `## Architecture` — architecture pattern, layers, import rules (primary reference for this command)
27
- - `## Code Style` — language, naming conventions, lint rules
28
- - `## Project Context` — framework, state management, testing, etc.
21
+ ## Arguments
29
22
 
30
- If config file is missing: read `CLAUDE.md` for architecture info. Assume "Layered Architecture" if neither source has it.
23
+ - `$ARGUMENTS` (optional) limit validation scope (`spec-plan`, `tasks-only`)
31
24
 
32
25
  ## Execution Steps
33
26
 
34
27
  ### 1. Load Artifacts
35
28
 
36
29
  From `.claude/afc/specs/{feature}/`:
37
- - **spec.md** (required)
38
- - **plan.md** (required)
39
- - **tasks.md** (if present)
40
- - **research.md** (if present)
41
- - **context.md** (if present — written by auto pipeline Phase 2)
30
+ - **spec.md** (required), **plan.md** (required)
31
+ - **tasks.md**, **research.md**, **context.md** (load if present)
42
32
 
43
33
  Warn about missing files but proceed with what is available.
34
+ If config is missing: use `CLAUDE.md` for architecture info; assume "Layered Architecture" as fallback.
44
35
 
45
36
  ### 2. Run Validation
46
37
 
47
- Validate across 6 categories:
48
-
49
- #### A. Duplication Detection (DUPLICATION)
50
- - Similar requirements within spec.md
51
- - Overlapping tasks within tasks.md
52
-
53
- #### B. Ambiguity Detection (AMBIGUITY)
54
- - Unmeasurable adjectives ("appropriate", "fast", "good")
55
- - Residual TODO/TBD/FIXME markers
56
- - Incomplete sentences
57
-
58
- #### C. Coverage Gaps (COVERAGE)
59
- - spec → plan: Are all FR-*/NFR-* reflected in the plan?
60
- - plan → tasks: Are all items in the plan's File Change Map present in tasks?
61
- - spec → tasks: Are all requirements mapped to tasks?
62
- - spec → context.md (if present): Are all FR-*/NFR-*/SC-* items from spec.md copied into context.md's Acceptance Criteria section? (AC completeness check)
38
+ Run all 6 categories defined in [`validation-categories.md`](./validation-categories.md).
63
39
 
64
- #### D. Inconsistencies (INCONSISTENCY)
65
- - Terminology drift (different names for the same concept)
66
- - Conflicting requirements
67
- - Mismatches between technical decisions in plan and execution in tasks
40
+ If `$ARGUMENTS` specifies a scope (e.g., `spec-plan`), run only the relevant categories.
68
41
 
69
- #### E. Principles Compliance (PRINCIPLES)
70
- - Validate against MUST principles in .claude/afc/memory/principles.md if present
71
- - Potential violations of {config.architecture} rules
72
-
73
- #### F. Unidentified Risks (RISK)
74
- - Are there risks not identified in plan.md?
75
- - External dependency risks
76
- - Potential performance bottlenecks
77
-
78
- ### 3. Severity Classification
79
-
80
- | Severity | Criteria |
81
- |----------|----------|
82
- | **CRITICAL** | Principles violation, core feature blocker, security issue |
83
- | **HIGH** | Duplication/conflict, untestable, coverage gap |
84
- | **MEDIUM** | Terminology drift, ambiguous requirements |
85
- | **LOW** | Style improvements, minor duplication |
86
-
87
- ### 4. Output Results (console)
42
+ ### 3. Output Results
88
43
 
89
44
  ```markdown
90
45
  ## Consistency Analysis Results: {feature name}
@@ -93,7 +48,6 @@ Validate across 6 categories:
93
48
  | ID | Category | Severity | Location | Summary | Recommended Action |
94
49
  |----|----------|----------|----------|---------|-------------------|
95
50
  | A-001 | COVERAGE | HIGH | spec FR-003 | No mapping in tasks | Add task |
96
- | A-002 | AMBIGUITY | MEDIUM | spec NFR-001 | "quickly" is unmeasurable | Add numeric threshold |
97
51
 
98
52
  ### Coverage Summary
99
53
  | Mapping | Coverage |
@@ -103,14 +57,22 @@ Validate across 6 categories:
103
57
  | spec → tasks | {N}% |
104
58
 
105
59
  ### Metrics
106
- - Total requirements: {N}
107
- - Total tasks: {N}
60
+ - Total requirements: {N} / Total tasks: {N}
108
61
  - Issues: CRITICAL {N} / HIGH {N} / MEDIUM {N} / LOW {N}
109
62
 
110
63
  ### Next Steps
111
64
  {Concrete action proposals for CRITICAL/HIGH issues}
112
65
  ```
113
66
 
67
+ ### 4. After Validation Fails
68
+
69
+ If CRITICAL or HIGH issues are found:
70
+ 1. Return the findings table to the calling skill (spec/plan/tasks/implement)
71
+ 2. The calling skill is responsible for fixing the reported issues before proceeding
72
+ 3. To re-validate after fixes: re-invoke `/afc:validate` with the same scope
73
+
74
+ If only MEDIUM/LOW issues: proceed is safe; issues are advisory.
75
+
114
76
  ### 5. Final Output
115
77
 
116
78
  ```
@@ -122,6 +84,6 @@ Analysis complete
122
84
 
123
85
  ## Notes
124
86
 
125
- - **Read-only**: Do not modify any files. Report only.
126
- - **Avoid false positives**: Do not over-flag ambiguity. Consider context.
127
- - **Optional**: Not required in the pipeline. Can proceed plan → implement directly.
87
+ - **Read-only**: Report only, no file writes.
88
+ - **Avoid false positives**: Do not over-flag ambiguity consider context.
89
+ - **Optional in pipeline**: Not required. Can proceed plan → implement directly.
@@ -0,0 +1,39 @@
1
+ # /afc:validate — Validation Categories
2
+
3
+ ## A. Duplication Detection (DUPLICATION)
4
+ - Similar requirements within spec.md
5
+ - Overlapping tasks within tasks.md
6
+
7
+ ## B. Ambiguity Detection (AMBIGUITY)
8
+ - Unmeasurable adjectives ("appropriate", "fast", "good")
9
+ - Residual TODO/TBD/FIXME markers
10
+ - Incomplete sentences
11
+
12
+ ## C. Coverage Gaps (COVERAGE)
13
+ - spec → plan: Are all FR-*/NFR-* reflected in the plan?
14
+ - plan → tasks: Are all items in plan's File Change Map present in tasks?
15
+ - spec → tasks: Are all requirements mapped to tasks?
16
+ - spec → context.md (if present): Are all FR-*/NFR-*/SC-* items copied into context.md's Acceptance Criteria section?
17
+
18
+ ## D. Inconsistencies (INCONSISTENCY)
19
+ - Terminology drift (different names for the same concept)
20
+ - Conflicting requirements
21
+ - Mismatches between technical decisions in plan and execution in tasks
22
+
23
+ ## E. Principles Compliance (PRINCIPLES)
24
+ - Validate against MUST principles in `.claude/afc/memory/principles.md` if present
25
+ - Potential violations of `{config.architecture}` rules
26
+
27
+ ## F. Unidentified Risks (RISK)
28
+ - Risks not identified in plan.md
29
+ - External dependency risks
30
+ - Potential performance bottlenecks
31
+
32
+ ## Severity Classification
33
+
34
+ | Severity | Criteria |
35
+ |----------|----------|
36
+ | **CRITICAL** | Principles violation, core feature blocker, security issue |
37
+ | **HIGH** | Duplication/conflict, untestable, coverage gap |
38
+ | **MEDIUM** | Terminology drift, ambiguous requirements |
39
+ | **LOW** | Style improvements, minor duplication |