all-for-claudecode 2.0.0 → 2.2.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 (67) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +3 -4
  3. package/MIGRATION.md +10 -7
  4. package/README.md +68 -119
  5. package/agents/afc-architect.md +16 -0
  6. package/agents/afc-impl-worker.md +40 -0
  7. package/agents/afc-security.md +11 -0
  8. package/bin/cli.mjs +1 -1
  9. package/commands/analyze.md +6 -7
  10. package/commands/architect.md +5 -7
  11. package/commands/auto.md +355 -102
  12. package/commands/checkpoint.md +3 -4
  13. package/commands/clarify.md +8 -1
  14. package/commands/debug.md +40 -3
  15. package/commands/doctor.md +12 -13
  16. package/commands/ideate.md +191 -0
  17. package/commands/implement.md +211 -66
  18. package/commands/init.md +76 -61
  19. package/commands/launch.md +181 -0
  20. package/commands/plan.md +86 -22
  21. package/commands/principles.md +6 -2
  22. package/commands/resume.md +1 -2
  23. package/commands/review.md +68 -18
  24. package/commands/security.md +10 -13
  25. package/commands/spec.md +60 -3
  26. package/commands/tasks.md +19 -4
  27. package/commands/test.md +24 -6
  28. package/docs/phase-gate-protocol.md +6 -6
  29. package/hooks/hooks.json +29 -3
  30. package/package.json +19 -11
  31. package/schemas/hooks.schema.json +75 -0
  32. package/schemas/marketplace.schema.json +52 -0
  33. package/schemas/plugin.schema.json +53 -0
  34. package/scripts/afc-bash-guard.sh +6 -6
  35. package/scripts/afc-blast-radius.sh +418 -0
  36. package/scripts/afc-config-change.sh +6 -4
  37. package/scripts/afc-consistency-check.sh +261 -0
  38. package/scripts/afc-dag-validate.mjs +94 -0
  39. package/scripts/afc-dag-validate.sh +142 -0
  40. package/scripts/afc-failure-hint.sh +6 -4
  41. package/scripts/afc-parallel-validate.mjs +81 -0
  42. package/scripts/afc-parallel-validate.sh +33 -45
  43. package/scripts/afc-permission-request.sh +56 -11
  44. package/scripts/afc-pipeline-manage.sh +46 -46
  45. package/scripts/afc-preflight-check.sh +6 -3
  46. package/scripts/afc-schema-validate.sh +225 -0
  47. package/scripts/afc-session-end.sh +5 -5
  48. package/scripts/afc-state.sh +256 -0
  49. package/scripts/afc-stop-gate.sh +32 -24
  50. package/scripts/afc-subagent-context.sh +15 -6
  51. package/scripts/afc-subagent-stop.sh +4 -2
  52. package/scripts/afc-task-completed-gate.sh +19 -25
  53. package/scripts/afc-teammate-idle.sh +9 -14
  54. package/scripts/afc-test-pre-gen.sh +141 -0
  55. package/scripts/afc-timeline-log.sh +9 -6
  56. package/scripts/afc-user-prompt-submit.sh +8 -10
  57. package/scripts/afc-worktree-create.sh +56 -0
  58. package/scripts/afc-worktree-remove.sh +47 -0
  59. package/scripts/install-shellspec.sh +38 -0
  60. package/scripts/pre-compact-checkpoint.sh +6 -4
  61. package/scripts/session-start-context.sh +9 -8
  62. package/scripts/track-afc-changes.sh +6 -9
  63. package/templates/afc.config.template.md +12 -76
  64. package/templates/afc.config.express-api.md +0 -99
  65. package/templates/afc.config.monorepo.md +0 -98
  66. package/templates/afc.config.nextjs-fsd.md +0 -107
  67. package/templates/afc.config.react-spa.md +0 -96
@@ -3,6 +3,12 @@ name: afc:clarify
3
3
  description: "Resolve spec ambiguities"
4
4
  argument-hint: "[focus area: security, performance, UI flow]"
5
5
  user-invocable: false
6
+ allowed-tools:
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Glob
11
+ - Grep
6
12
  model: sonnet
7
13
  ---
8
14
  # /afc:clarify — Resolve Spec Ambiguities
@@ -16,7 +22,7 @@ model: sonnet
16
22
 
17
23
  ## Config Load
18
24
 
19
- **Must** read `.claude/afc.config.md` first. Stop if the config file is not present.
25
+ **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**.
20
26
 
21
27
  ## Execution Steps
22
28
 
@@ -32,6 +38,7 @@ Scan across 10 categories:
32
38
 
33
39
  | # | Category | What to find |
34
40
  |---|----------|-------------|
41
+ | 0 | Necessity | Is this feature truly needed? Does it already exist? Is the cost justified by the benefit? |
35
42
  | 1 | Feature scope | Features with unclear boundaries |
36
43
  | 2 | Domain/data | Incomplete entity relationships or field definitions |
37
44
  | 3 | UX flow | Missing user journey steps |
package/commands/debug.md CHANGED
@@ -2,6 +2,13 @@
2
2
  name: afc:debug
3
3
  description: "Bug diagnosis and fix"
4
4
  argument-hint: "[bug description, error message, or reproduction steps]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
5
12
  model: sonnet
6
13
  ---
7
14
 
@@ -16,7 +23,12 @@ model: sonnet
16
23
 
17
24
  ## Config Load
18
25
 
19
- **Always** read `.claude/afc.config.md` first. Abort if config file is missing.
26
+ **Always** read `.claude/afc.config.md` first.
27
+
28
+ If config file is missing:
29
+ 1. Ask the user: "`.claude/afc.config.md` not found. Run `/afc:init` to set up the project?"
30
+ 2. If user accepts → run `/afc:init`, then **restart this command** with the original `$ARGUMENTS`
31
+ 3. If user declines → **abort**
20
32
 
21
33
  ## Execution Steps
22
34
 
@@ -36,7 +48,7 @@ Proceed in order:
36
48
 
37
49
  1. **Error trace**: extract file:line from error message/stack trace → read that code
38
50
  2. **Data flow**: trace backwards from the problem point (where did the bad data come in?)
39
- 3. **State analysis**: check relevant {config.state_management} cache state
51
+ 3. **State analysis**: check relevant state management cache state (from Project Context)
40
52
  4. **Recent changes**: check recent changes with `git log --oneline -10 -- {related files}`
41
53
  5. **Race conditions**: check for timing issues between async operations
42
54
 
@@ -46,15 +58,28 @@ List possible causes as a **hypothesis list**:
46
58
 
47
59
  ```markdown
48
60
  ### Hypotheses
61
+ 0. **[Not a Bug?]** {intended behavior explanation}: {evidence from docs/code/spec}
49
62
  1. **[High probability]** {cause1}: {evidence}
50
63
  2. **[Medium probability]** {cause2}: {evidence}
51
64
  3. **[Low probability]** {cause3}: {evidence}
52
65
  ```
53
66
 
54
- Verify starting from highest probability.
67
+ **Always evaluate hypothesis 0 first.** Check:
68
+ - Is this behavior documented or specified? (README, comments, spec, CLAUDE.md)
69
+ - Does the code explicitly handle this case? (intentional logic, not missing logic)
70
+ - Is the user's expectation based on a misunderstanding of the design?
71
+
72
+ If hypothesis 0 is confirmed (not a bug):
73
+ - Report: "This appears to be intended behavior: {explanation with evidence}."
74
+ - Do **not** modify code. Suggest documentation improvement if the behavior is non-obvious.
75
+ - Skip Steps 4-6. Go directly to Final Output with verdict: `"Not a bug — intended behavior."`
76
+
77
+ If hypothesis 0 is rejected: verify remaining hypotheses starting from highest probability.
55
78
 
56
79
  ### 4. Implement Fix
57
80
 
81
+ **Precondition**: Only proceed if a genuine bug was confirmed in Step 3 (hypothesis 0 rejected).
82
+
58
83
  1. **Minimal change principle**: change only the minimum code required to fix the bug
59
84
  2. **Impact analysis**: verify what effect the fix has on other code
60
85
  3. **Apply fix**
@@ -101,6 +126,7 @@ Only write if the pattern is new and actionable. Generic observations are prohib
101
126
 
102
127
  ### 8. Final Output
103
128
 
129
+ **If bug confirmed and fixed:**
104
130
  ```
105
131
  Debug complete
106
132
  ├─ Root cause: {one-line summary}
@@ -110,6 +136,16 @@ Debug complete
110
136
  └─ Impact scope: {affected components/features}
111
137
  ```
112
138
 
139
+ **If not a bug (intended behavior):**
140
+ ```
141
+ Debug complete
142
+ ├─ Verdict: Not a bug — intended behavior
143
+ ├─ Explanation: {why this behavior is correct}
144
+ ├─ Evidence: {code path, documentation, or spec reference}
145
+ ├─ Fixed files: none
146
+ └─ Suggestion: {documentation improvement if non-obvious, or "none"}
147
+ ```
148
+
113
149
  ## Debugging Checklist (applied automatically)
114
150
 
115
151
  Always check the Debugging Checklist from CLAUDE.md:
@@ -121,6 +157,7 @@ Always check the Debugging Checklist from CLAUDE.md:
121
157
 
122
158
  ## Notes
123
159
 
160
+ - **Not every report is a bug**: Always evaluate "intended behavior" hypothesis first. Do not modify code to match incorrect expectations.
124
161
  - **No excessive changes**: change only what is needed to fix the bug. Do not refactor surrounding code.
125
162
  - **Symptom vs cause**: find the root cause, not the surface symptom.
126
163
  - **3-attempt limit**: if fix fails after 3 attempts, report the situation to the user.
@@ -2,7 +2,6 @@
2
2
  name: afc:doctor
3
3
  description: "Diagnose project health and plugin setup"
4
4
  argument-hint: "[--verbose]"
5
- disable-model-invocation: true
6
5
  allowed-tools:
7
6
  - Read
8
7
  - Grep
@@ -49,7 +48,7 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
49
48
  | Check | How | Pass | Fail |
50
49
  |-------|-----|------|------|
51
50
  | Config file exists | Read `.claude/afc.config.md` | File exists | Fix: run `/afc:init` |
52
- | Required sections present | Grep for `## CI Commands`, `## Architecture`, `## Code Style`, `## Framework` | All 4 sections found | Fix: add missing section to `.claude/afc.config.md` or re-run `/afc:init` |
51
+ | Required sections present | Grep for `## CI Commands`, `## Architecture`, `## Code Style` | All 3 sections found | Fix: add missing section to `.claude/afc.config.md` or re-run `/afc:init` |
53
52
  | Gate command defined | Grep for `gate:` inside `## CI Commands` section | `gate:` field found | Fix: add `gate:` field to `## CI Commands` section |
54
53
  | CI command runnable | Extract CI command from config, run it | Exits 0 | ⚠ Warning: CI command failed. Check `{config.ci}` in afc.config.md |
55
54
  | Gate command runnable | Extract gate command from config, run it | Exits 0 | ⚠ Warning: gate command failed. Check `{config.gate}` in afc.config.md |
@@ -58,10 +57,10 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
58
57
 
59
58
  | Check | How | Pass | Fail |
60
59
  |-------|-----|------|------|
61
- | Global CLAUDE.md exists | Read `~/.claude/CLAUDE.md` | File exists | ⚠ Warning: no global CLAUDE.md. All-for-ClaudeCode skills won't auto-trigger from intent. Fix: run `/afc:init` |
62
- | AFC block present | Grep for `<!-- AFC:START -->` and `<!-- AFC:END -->` in `~/.claude/CLAUDE.md` | Both markers found | Fix: run `/afc:init` to inject AFC block |
63
- | AFC block version | Extract version from `<!-- AFC:VERSION:X.Y.Z -->` in CLAUDE.md. Then read `${CLAUDE_PLUGIN_ROOT}/package.json` to get the actual plugin version. Compare the two. | Block version ≥ plugin version | ⚠ Warning: AFC block is outdated (found {block_version}, current {plugin_version}). Fix: run `/afc:init` to update |
64
- | No conflicting routing | Grep for conflicting agent patterns (`executor`, `deep-executor`, `debugger`, `code-reviewer`) outside AFC block that could intercept afc intents | No conflicts or conflicts are inside other tool blocks | ⚠ Warning: found agent routing that may conflict with afc skills. Review `~/.claude/CLAUDE.md` |
60
+ | Global CLAUDE.md exists | Read `~/.claude/CLAUDE.md` | File exists | ⚠ Warning: no global CLAUDE.md. all-for-claudecode skills won't auto-trigger from intent. Fix: run `/afc:init` |
61
+ | all-for-claudecode block present | Grep for `<!-- AFC:START -->` and `<!-- AFC:END -->` in `~/.claude/CLAUDE.md` | Both markers found | Fix: run `/afc:init` to inject all-for-claudecode block |
62
+ | all-for-claudecode block version | Extract version from `<!-- AFC:VERSION:X.Y.Z -->` in CLAUDE.md. Then read `${CLAUDE_PLUGIN_ROOT}/package.json` to get the actual plugin version. Compare the two. | Block version ≥ plugin version | ⚠ Warning: all-for-claudecode block is outdated (found {block_version}, current {plugin_version}). Fix: run `/afc:init` to update |
63
+ | No conflicting routing | Grep for conflicting agent patterns (`executor`, `deep-executor`, `debugger`, `code-reviewer`) outside all-for-claudecode block that could intercept afc intents | No conflicts or conflicts are inside other tool blocks | ⚠ Warning: found agent routing that may conflict with afc skills. Review `~/.claude/CLAUDE.md` |
65
64
 
66
65
  ### Category 4: Legacy Migration (v1.x → v2.0)
67
66
 
@@ -69,7 +68,7 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
69
68
 
70
69
  | Check | How | Pass | Fail |
71
70
  |-------|-----|------|------|
72
- | No legacy CLAUDE.md block | Grep `~/.claude/CLAUDE.md` for `<!-- SELFISH:START -->` | Marker not found | ⚠ Warning: legacy `SELFISH:START` block found in `~/.claude/CLAUDE.md`. Fix: run `/afc:init` (will replace with AFC block) |
71
+ | No legacy CLAUDE.md block | Grep `~/.claude/CLAUDE.md` for `<!-- SELFISH:START -->` | Marker not found | ⚠ Warning: legacy `SELFISH:START` block found in `~/.claude/CLAUDE.md`. Fix: run `/afc:init` (will replace with all-for-claudecode block) |
73
72
  | No legacy config file | Check `.claude/selfish.config.md` | File does not exist | ⚠ Warning: legacy config `.claude/selfish.config.md` found. Fix: `mv .claude/selfish.config.md .claude/afc.config.md` |
74
73
  | No legacy state files | Glob `.claude/.selfish-*` | No files found | ⚠ Warning: legacy state files `.claude/.selfish-*` found. Fix: `cd .claude && for f in .selfish-*; do mv "$f" "${f/.selfish-/.afc-}"; done` |
75
74
  | No legacy artifact dir | Check `.claude/selfish/` directory | Directory does not exist | ⚠ Warning: legacy artifact directory `.claude/selfish/` found. Fix: `mv .claude/selfish .claude/afc` |
@@ -80,7 +79,7 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
80
79
 
81
80
  | Check | How | Pass | Fail |
82
81
  |-------|-----|------|------|
83
- | No stale pipeline flag | Check `.claude/.afc-active` | File does not exist (no active pipeline) | ⚠ Warning: stale pipeline flag found (feature: {name}). This may block normal operations. Fix: `rm .claude/.afc-active .claude/.afc-phase .claude/.afc-ci-passed` or run `/afc:resume` |
82
+ | No stale pipeline state | Check `.claude/.afc-state.json` via `afc-pipeline-manage.sh status` | File does not exist (no active pipeline) | ⚠ Warning: stale pipeline state found (feature: {name}, phase: {phase}). This may block normal operations. Fix: `"${CLAUDE_PLUGIN_ROOT}/scripts/afc-pipeline-manage.sh" end --force` or run `/afc:resume` |
84
83
  | No orphaned artifacts | Glob `.claude/afc/specs/*/spec.md` | No specs directories, or all are from active pipeline | ⚠ Warning: orphaned `.claude/afc/specs/{name}/` found. Left over from a previous pipeline. Fix: `rm -rf .claude/afc/specs/{name}/` |
85
84
  | No lingering safety tags | `git tag -l 'afc/pre-*'` | No tags, or tags match active pipeline | ⚠ Warning: lingering safety tag `afc/pre-{x}` found. Fix: `git tag -d afc/pre-{x}` |
86
85
  | Checkpoint state | Read `.claude/afc/memory/checkpoint.md` if exists | No checkpoint (clean), or checkpoint is from current session | ⚠ Warning: stale checkpoint from {date}. Fix: run `/afc:resume` to continue or delete `.claude/afc/memory/checkpoint.md` |
@@ -108,7 +107,7 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
108
107
 
109
108
  1. Print header:
110
109
  ```
111
- All-for-ClaudeCode Doctor
110
+ all-for-claudecode Doctor
112
111
  =======================
113
112
  ```
114
113
 
@@ -133,7 +132,7 @@ Run ALL checks regardless of earlier failures. Do not short-circuit.
133
132
  ## Example Output
134
133
 
135
134
  ```
136
- All-for-ClaudeCode Doctor
135
+ all-for-claudecode Doctor
137
136
  =======================
138
137
 
139
138
  Environment
@@ -149,8 +148,8 @@ Project Config
149
148
 
150
149
  CLAUDE.md Integration
151
150
  ✓ Global ~/.claude/CLAUDE.md exists
152
- AFC block present
153
- AFC block version outdated (1.0.0 → 1.1.0)
151
+ all-for-claudecode block present
152
+ all-for-claudecode block version outdated (1.0.0 → 1.1.0)
154
153
  Fix: /afc:init
155
154
  ✓ No conflicting routing
156
155
 
@@ -176,4 +175,4 @@ Results: 14 passed, 2 warnings, 0 failures
176
175
  - **Always run all checks**: do not stop on first failure. The full picture is the value.
177
176
  - **Actionable fixes**: every non-pass result must include a Fix line. Never report a problem without a solution.
178
177
  - **Fast execution**: skip CI/gate command checks if `--fast` is in arguments (these are the slowest checks).
179
- - **Development checks**: Category 6 (Version Sync) only runs when inside the all-for-claudecode source repo.
178
+ - **Development checks**: Category 7 (Version Sync) only runs when inside the all-for-claudecode source repo.
@@ -0,0 +1,191 @@
1
+ ---
2
+ name: afc:ideate
3
+ description: "Explore and structure a product idea"
4
+ argument-hint: "[rough idea or problem statement]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Glob
9
+ - Grep
10
+ - WebSearch
11
+ - WebFetch
12
+ model: sonnet
13
+ ---
14
+
15
+ # /afc:ideate — Explore and Structure a Product Idea
16
+
17
+ > Transforms a rough idea, problem statement, or inspiration into a structured product brief (ideate.md).
18
+ > This is a **pre-spec exploration** tool — use it when you don't yet know exactly what to build.
19
+ > The output feeds directly into `/afc:spec` as input.
20
+
21
+ ## Relationship to Other Commands
22
+
23
+ ```
24
+ afc:ideate (what to build?) → afc:spec (how to specify it) → afc:plan → afc:implement → ...
25
+ ```
26
+
27
+ - **ideate** = "I have an idea but haven't decided the scope, audience, or approach yet"
28
+ - **spec** = "I know what to build and need a formal specification"
29
+ - ideate is **never** part of the auto pipeline — it's a standalone exploration tool
30
+
31
+ ## Arguments
32
+
33
+ - `$ARGUMENTS` — (required) One of:
34
+ - Rough idea: `"real-time collaborative whiteboard"`
35
+ - Problem statement: `"users keep losing unsaved work when the browser crashes"`
36
+ - Reference URL: `"https://example.com/competitor-product"` (fetched and analyzed)
37
+ - File path: `"./meeting-notes.md"` (read and extracted)
38
+
39
+ ## Execution Steps
40
+
41
+ ### 1. Parse Input
42
+
43
+ Determine the input type and extract raw content:
44
+
45
+ 1. **If `$ARGUMENTS` starts with `http://` or `https://`**:
46
+ - Fetch content via WebFetch
47
+ - Extract: product name, key features, target audience, value proposition
48
+ - Frame as: "Build something similar/better that addresses {gap}"
49
+
50
+ 2. **If `$ARGUMENTS` is a file path** (contains `/` or ends with `.md`/`.txt`):
51
+ - Read the file content
52
+ - Extract: action items, feature requests, pain points, user feedback
53
+ - Frame as: structured requirements from raw notes
54
+
55
+ 3. **Otherwise**: treat as a natural language idea/problem statement
56
+
57
+ ### 2. Market & Context Research
58
+
59
+ Perform lightweight research to ground the idea in reality:
60
+
61
+ 1. **Competitive landscape** (WebSearch):
62
+ - Search: `"{core concept}" tool OR app OR service {current year}`
63
+ - Identify 3-5 existing solutions
64
+ - Note: what they do well, what gaps exist
65
+
66
+ 2. **Technology feasibility** (WebSearch, optional):
67
+ - If the idea involves unfamiliar tech: search for current state and constraints
68
+ - Tag findings with `[RESEARCHED]`
69
+
70
+ 3. **Target user validation**:
71
+ - Who would use this? Why? What's their current workaround?
72
+
73
+ ### 3. Explore Existing Codebase (if applicable)
74
+
75
+ If running inside a project with source code:
76
+
77
+ 1. Check if any related functionality already exists (Glob/Grep)
78
+ 2. If found: note as "Existing foundation" — ideate around extending, not rebuilding
79
+ 3. If no codebase or greenfield: skip this step
80
+
81
+ ### 4. Write Product Brief
82
+
83
+ Create `.claude/afc/ideate.md` (overwrite if exists after confirmation):
84
+
85
+ ```markdown
86
+ # Product Brief: {idea name}
87
+
88
+ > Created: {YYYY-MM-DD}
89
+ > Status: Exploration
90
+ > Input: {original $ARGUMENTS summary}
91
+
92
+ ## Problem Statement
93
+ {What problem does this solve? Who has this problem? How painful is it?}
94
+ {2-3 sentences, specific and measurable where possible}
95
+
96
+ ## Target Users
97
+
98
+ ### Primary Persona
99
+ - **Who**: {role/demographic}
100
+ - **Context**: {when/where they encounter the problem}
101
+ - **Current workaround**: {what they do today}
102
+ - **Pain level**: {High/Medium/Low — with justification}
103
+
104
+ ### Secondary Persona (if applicable)
105
+ {same format}
106
+
107
+ ## Value Proposition
108
+ {One sentence: "For {persona} who {need}, this {product} provides {benefit} unlike {alternatives}"}
109
+
110
+ ## Core Features (MoSCoW)
111
+
112
+ ### Must Have (MVP)
113
+ 1. {feature} — {why it's essential}
114
+ 2. {feature} — {why it's essential}
115
+ 3. {feature} — {why it's essential}
116
+
117
+ ### Should Have (v1.1)
118
+ 1. {feature} — {value added}
119
+
120
+ ### Could Have (future)
121
+ 1. {feature} — {potential value}
122
+
123
+ ### Won't Have (explicit scope cut)
124
+ 1. {feature} — {why excluded}
125
+
126
+ ## User Journey (primary flow)
127
+
128
+ ```mermaid
129
+ graph LR
130
+ A[Entry Point] --> B[Core Action]
131
+ B --> C[Key Decision]
132
+ C --> D[Success State]
133
+ C --> E[Error/Edge Case]
134
+ ```
135
+
136
+ {Describe the 3-5 step primary user flow in plain text as well}
137
+
138
+ ## Competitive Analysis
139
+
140
+ | Aspect | {Competitor 1} | {Competitor 2} | This Product |
141
+ |--------|---------------|---------------|-------------|
142
+ | Core strength | {X} | {X} | {X} |
143
+ | Key weakness | {X} | {X} | {X} |
144
+ | Pricing | {X} | {X} | {X} |
145
+ | Differentiator | — | — | {what makes this unique} |
146
+
147
+ ## Open Questions
148
+ - {Decision that needs user input before proceeding to spec}
149
+ - {Technical uncertainty that affects scope}
150
+ - {Business assumption that should be validated}
151
+
152
+ ## Suggested Next Steps
153
+ 1. Resolve Open Questions above
154
+ 2. Run `/afc:spec {refined feature description}` to formalize as a specification
155
+ 3. {Any other recommended action}
156
+
157
+ ## Research Sources
158
+ - [{source title}]({url}) — {what was learned}
159
+ ```
160
+
161
+ ### 5. Interactive Refinement
162
+
163
+ After writing the initial brief, present key decisions to the user:
164
+
165
+ 1. **Scope check**: "The MVP has {N} features. Does this feel right, or should we cut/add?"
166
+ 2. **Persona validation**: "Is {persona} the right primary user?"
167
+ 3. **Open questions**: present the top 2 unresolved questions via AskUserQuestion
168
+
169
+ Apply user feedback directly into ideate.md.
170
+
171
+ ### 6. Final Output
172
+
173
+ ```
174
+ Ideation complete
175
+ ├─ .claude/afc/ideate.md
176
+ ├─ Personas: {count}
177
+ ├─ MVP features: {count}
178
+ ├─ Competitors analyzed: {count}
179
+ ├─ Open questions: {count}
180
+ ├─ Research sources: {count}
181
+ └─ Next step: /afc:spec "{suggested feature description}"
182
+ ```
183
+
184
+ ## Notes
185
+
186
+ - **This is exploration, not specification**. Do not write acceptance criteria, system requirements, or FR/NFR numbers — that belongs in `/afc:spec`.
187
+ - **ideate.md lives at `.claude/afc/ideate.md`** (project-level, not feature-level) because ideation may span multiple features.
188
+ - **Not part of the auto pipeline**. ideate is manually invoked when a developer needs to think through an idea before committing to a spec.
189
+ - **One ideate.md per project** — overwrite on re-run (with confirmation). If you need to preserve a previous ideation, rename it first.
190
+ - **Competitive analysis is lightweight** — 3-5 competitors max. Deep market research is not the goal; grounding the idea in reality is.
191
+ - **Mermaid diagrams are optional** — only include if the user flow benefits from visualization. Do not force diagrams for simple concepts.