cfsa-antigravity 2.7.0 → 2.8.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 (50) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/kit-sync.md +3 -3
  3. package/template/.agent/skills/prd-templates/references/architecture-completeness-checklist.md +28 -0
  4. package/template/.agent/skills/prd-templates/references/be-spec-classification.md +41 -0
  5. package/template/.agent/skills/prd-templates/references/bootstrap-verification-protocol.md +50 -0
  6. package/template/.agent/skills/prd-templates/references/constraint-exploration.md +41 -0
  7. package/template/.agent/skills/prd-templates/references/decision-confirmation-protocol.md +68 -0
  8. package/template/.agent/skills/prd-templates/references/decision-propagation.md +121 -0
  9. package/template/.agent/skills/prd-templates/references/domain-exhaustion-criteria.md +37 -0
  10. package/template/.agent/skills/prd-templates/references/engagement-tier-protocol.md +58 -0
  11. package/template/.agent/skills/prd-templates/references/evolution-layer-guidance.md +91 -0
  12. package/template/.agent/skills/prd-templates/references/expansion-modes.md +27 -0
  13. package/template/.agent/skills/prd-templates/references/folder-seeding-protocol.md +77 -0
  14. package/template/.agent/skills/prd-templates/references/input-classification.md +23 -0
  15. package/template/.agent/skills/prd-templates/references/map-guard-protocol.md +44 -0
  16. package/template/.agent/skills/prd-templates/references/persona-completeness-gate.md +20 -0
  17. package/template/.agent/skills/prd-templates/references/shard-boundary-analysis.md +76 -0
  18. package/template/.agent/skills/prd-templates/references/write-verification-protocol.md +57 -0
  19. package/template/.agent/workflows/create-prd-architecture.md +17 -23
  20. package/template/.agent/workflows/create-prd-compile.md +31 -22
  21. package/template/.agent/workflows/create-prd-design-system.md +18 -14
  22. package/template/.agent/workflows/create-prd-security.md +22 -24
  23. package/template/.agent/workflows/create-prd-stack.md +20 -11
  24. package/template/.agent/workflows/create-prd.md +27 -99
  25. package/template/.agent/workflows/decompose-architecture-structure.md +14 -4
  26. package/template/.agent/workflows/decompose-architecture-validate.md +29 -80
  27. package/template/.agent/workflows/decompose-architecture.md +27 -60
  28. package/template/.agent/workflows/evolve-contract.md +7 -2
  29. package/template/.agent/workflows/evolve-feature-cascade.md +34 -78
  30. package/template/.agent/workflows/evolve-feature-classify.md +22 -56
  31. package/template/.agent/workflows/ideate-discover.md +89 -100
  32. package/template/.agent/workflows/ideate-extract.md +42 -138
  33. package/template/.agent/workflows/ideate-validate.md +57 -133
  34. package/template/.agent/workflows/ideate.md +32 -19
  35. package/template/.agent/workflows/implement-slice-setup.md +15 -5
  36. package/template/.agent/workflows/implement-slice-tdd.md +21 -5
  37. package/template/.agent/workflows/plan-phase-write.md +30 -1
  38. package/template/.agent/workflows/propagate-decision-apply.md +23 -90
  39. package/template/.agent/workflows/propagate-decision-scan.md +20 -91
  40. package/template/.agent/workflows/remediate-pipeline-execute.md +6 -1
  41. package/template/.agent/workflows/validate-phase-quality.md +14 -3
  42. package/template/.agent/workflows/validate-phase-readiness.md +1 -1
  43. package/template/.agent/workflows/verify-infrastructure.md +2 -0
  44. package/template/.agent/workflows/write-architecture-spec-deepen.md +8 -2
  45. package/template/.agent/workflows/write-architecture-spec-design.md +11 -14
  46. package/template/.agent/workflows/write-be-spec-classify.md +26 -104
  47. package/template/.agent/workflows/write-be-spec-write.md +49 -3
  48. package/template/.agent/workflows/write-be-spec.md +1 -1
  49. package/template/.agent/workflows/write-fe-spec-write.md +62 -3
  50. package/template/.agent/workflows/write-fe-spec.md +1 -1
@@ -19,181 +19,85 @@ pipeline:
19
19
 
20
20
  Classify the user's input, create the fractal `ideation/` folder structure, and load skills.
21
21
 
22
- **Prerequisite**: If standalone, verify user provided input via `@file` or verbal. If none, prompt: \"What would you like to build? Provide a file or describe your idea.\"
22
+ **Prerequisite**: If standalone, verify user provided input via `@file` or verbal. If none, prompt: "What would you like to build? Provide a file or describe your idea."
23
+
24
+ If `@file` was provided:
25
+ - **If file does not exist or is not readable** → **STOP**: "File not found at `[path]`. Provide a valid file path or describe your idea verbally."
26
+ - **If file is empty** (0 bytes) → **STOP**: "File at `[path]` is empty. Provide a file with content or describe your idea verbally."
27
+ - **If file is readable** → proceed to Step 1.
23
28
 
24
29
  ---
25
30
 
26
31
  ## 1. Input assessment
27
32
 
28
- Classify what the user has provided. This determines which mode the `idea-extraction` skill uses.
29
-
30
- | Input Type | Detection | Extraction Mode |
31
- |---|---|---|
32
- | **Rich document** | >5KB, detailed docs, design conversations, prior specs | Extraction |
33
- | **Thin document** | <5KB, structured but shallow (bullet list, rough PRD) | Expansion |
34
- | **Conversational dump** | Chat logs, unstructured conversation transcripts | Extraction (with noise filtering) |
35
- | **Verbal / one-liner** | User describes idea in chat, no files | Interview |
36
- | **Nothing** | "I want to build an app" or similar | Interview (deep) |
37
-
38
- **For rich inputs (Extraction mode):**
39
- 1. Read/ingest all provided documents
40
- 2. **Proportionality check**: If source >50KB, total ideation output must be ≥30% of source line count
41
- 3. **Interview the document**: Run the interview question framework from `idea-extraction/SKILL.md` Extraction Mode Phase 1. Extract concepts (not headings) with citations. Classify every concept through the Node Classification Gate. Build the classification table and proposed domain map.
42
- 4. **BLOCKING GATE — Do NOT proceed to Step 1.5 until the classification table is built.** The classification table is a required artifact. No domain folders can be created without it.
43
- 5. Identify gaps — questions the document doesn't answer → these become Phase 2 user interview questions
44
- 6. Use idea-extraction skill to refine, not re-derive
45
-
46
- **For thin inputs (Expansion mode):**
47
- 1. Read input and identify domain boundaries
48
- 2. Identify depth level per domain (surface → detailed → implementation-ready)
49
- 3. Note shallowest domains for priority treatment in `/ideate-discover`
50
-
51
- **For verbal / no input (Interview mode):**
52
- 1. Read `.agent/skills/idea-extraction/SKILL.md` and enter Interview mode
53
- 2. Start with: "In one sentence, what problem does this solve and for whom?"
54
- 3. **Immediately after**: Run Structural Classification (Step 1.3)
55
- 4. From that sentence + classification, identify initial domains
56
- 5. Proceed to folder seeding (Step 1.5)
33
+ Read `.agent/skills/prd-templates/references/input-classification.md` classify the input into one of the five types.
57
34
 
58
- ## 1.3. Structural Classification
35
+ Read `.agent/skills/idea-extraction/SKILL.md` `## Input-Adaptive Modes` — follow the process for the classified input type.
59
36
 
60
- Read the **Structural Classification Protocol** in `.agent/skills/idea-extraction/SKILL.md`.
37
+ **BLOCKING GATE**: Classification must produce a single input type. If ambiguous between Rich and Thin, use the 5KB threshold. If ambiguous between Thin and Verbal, check whether a file was provided.
61
38
 
62
- This step determines the folder layout. It MUST run **before** any domain folders are created (Step 1.5).
39
+ **For Extraction mode (rich input)**: Follow `idea-extraction/SKILL.md` Extraction Mode Phase 1 steps 1-6.
63
40
 
64
- **For rich/thin document input:**
65
- 1. Scan for surface signals (see detection table in skill)
66
- 2. If multi-product signals detected, scan for hub-and-spoke vs peer signals:
67
- - One surface described as "the platform" or "the API" → **hub-and-spoke**
68
- - All surfaces access central database through one API → **hub-and-spoke**
69
- - Surfaces described as equally independent → **peer**
70
- 3. If no multi-product signals → **single-surface**
71
- 4. If ambiguous → ask the user the classification questions
41
+ **BLOCKING GATE Do NOT proceed to Step 1.3 until the classification table is built.** The classification table (from skill Phase 1 step 4) is a required artifact. No domain folders can be created without it.
72
42
 
73
- **For interview / verbal input:**
74
- 1. After the opening problem statement, ask:
75
- - "Who are the distinct user types or audiences?"
76
- - "What platforms does this need to live on?" (web, mobile, desktop, API, CLI)
77
- 2. If multi-product → ask: "Is there a primary platform that others depend on, or are all surfaces independent peers?"
78
- 3. Classify the project shape
43
+ **For Expansion mode (thin input)**: Follow `idea-extraction/SKILL.md` Expansion Mode steps 1-3. Note shallowest domains for priority treatment in `/ideate-discover`.
79
44
 
80
- **Record the classification** in `ideation-index.md` under `## Structural Classification` per the super-index template.
45
+ **For Interview mode (verbal / no input)**: Follow `idea-extraction/SKILL.md` Interview Mode steps 1-2. Proceed to Step 1.3 immediately after opening question.
46
+
47
+ ## 1.3. Structural Classification
81
48
 
82
- Four shapes: `single-surface`, `multi-surface-shared`, `multi-product-hub`, `multi-product-peer`.
49
+ Read `.agent/skills/idea-extraction/SKILL.md` `## Structural Classification Protocol`. Follow the protocol for the current input type (document vs interview).
50
+
51
+ **BLOCKING GATE**: Classification must run BEFORE any domain folders are created (Step 1.5). Record the result (`single-surface`, `multi-surface-shared`, `multi-product-hub`, `multi-product-peer`) in `ideation-index.md` under `## Structural Classification`.
83
52
 
84
53
  ## 1.4. Re-run check
85
54
 
86
- Before seeding, check whether `docs/plans/ideation/ideation-index.md` already exists.
55
+ Check whether `docs/plans/ideation/ideation-index.md` already exists.
87
56
 
88
- - If it **exists**: Present summary (expansion mode, domain count, depth markers). Ask: "An ideation folder already exists. **Continue** or **start fresh**?"
57
+ - **Exists** Present summary (expansion mode, domain count, depth markers). Ask: "An ideation folder already exists. **Continue** or **start fresh**?"
89
58
  - **Continue** → skip seeding, jump to Step 1.6
90
59
  - **Start fresh** → archive to `docs/plans/ideation-archive-[timestamp]/`, then seed
91
- - If it **does not exist**: proceed with seeding.
60
+ - **Does not exist** proceed with seeding.
92
61
 
93
62
  ## 1.4.5. Classification Confirmation (Extraction mode only)
94
63
 
95
64
  > **BLOCKING GATE**: Before creating ANY domain folder, you MUST complete this step.
96
- > This step exists because the test revealed that the Node Classification Gate was being
97
- > bypassedthe agent mirrored source document headings as domains instead of classifying
98
- > each concept. This gate makes classification a hard prerequisite for folder creation.
99
-
100
- 1. **Verify the classification table exists.** Step 1 item 3 must have produced a completed classification table. If it doesn't exist, STOP — go back and run Extraction Mode Phase 1 from `idea-extraction/SKILL.md`.
101
- 2. **Present the classification table and proposed domain map to the user.** Show:
102
- - Every concept with its source location, gate result, and reasoning
103
- - The proposed domain hierarchy (what folders would be created and where)
104
- - The gap list (questions the document didn't answer)
105
- 3. **Ask**: "Here's how I classified your content. Does this look right?"
106
- 4. **Wait for user confirmation or corrections.** Do NOT proceed until the user responds.
107
- 5. **Apply any corrections** the user provides — update the classification table and domain map.
108
-
109
- **The classification table must show for each concept:**
110
- - Concept name and source location (line numbers or section reference)
111
- - Gate result: domain / sub-domain / feature / cross-cut / not-a-product-domain
112
- - Gate reasoning: which gate questions were asked and how they were answered
113
-
114
- **Do NOT mirror source document headings as domains.** Source headings are hints for finding concepts. The Node Classification Gate determines what each concept is.
65
+
66
+ 1. **Verify the classification table exists.** If it doesn't exist → STOP go back and run Extraction Mode Phase 1 from `idea-extraction/SKILL.md`.
67
+ 2. **Present the classification table and proposed domain map to the user.** Follow `idea-extraction/SKILL.md` Extraction Mode Phase 2 step 7 for what to show.
68
+ 3. **Wait for user confirmation or corrections.** Do NOT proceed until the user responds.
69
+ 4. **Apply any corrections** the user provides.
70
+ 5. **If user rejects the classification entirely** (e.g., "these domains are completely wrong") → return to Step 1 and re-classify from scratch, incorporating the user's feedback as explicit constraints. Do NOT attempt to patch the existing classification — start the classification protocol over.
115
71
 
116
72
  ## 1.5. Seed fractal `ideation/` folder
117
73
 
118
- Read these templates:
119
- - `.agent/skills/prd-templates/references/ideation-index-template.md` (super-index)
120
- - `.agent/skills/prd-templates/references/ideation-crosscut-template.md` (global CX)
121
- - `.agent/skills/prd-templates/references/fractal-node-index-template.md` (node index)
122
- - `.agent/skills/prd-templates/references/fractal-cx-template.md` (node CX)
123
- - `.agent/skills/prd-templates/references/fractal-feature-template.md` (feature file)
74
+ Read `.agent/skills/prd-templates/references/folder-seeding-protocol.md` and follow it.
124
75
 
125
76
  Read `.agent/skills/technical-writer/SKILL.md` and follow its methodology.
126
77
 
127
- **ADDITIVE ONLY** The `docs/plans/ideation/` directory already exists in the kit with `.gitkeep` and `README.md`. You are ADDING files into this existing directory. Do NOT delete, overwrite, or replace the directory itself. Do NOT remove any existing files. Create new files alongside what already exists.
128
-
129
- **Create the base structure** (all project shapes). This is what the folder should contain AFTER seeding — kit-shipped files plus new pipeline files:
78
+ **BLOCKING GATE**: If Step 1.4.5 was not completed (Extraction mode), STOP you cannot seed without a confirmed classification.
130
79
 
131
- ```
132
- docs/plans/ideation/
133
- ├── .gitkeep ← KIT-SHIPPED do not touch
134
- ├── README.md ← KIT-SHIPPED do not touch
135
- ├── ideation-index.md ← NEW: super-index (from ideation-index-template)
136
- ├── ideation-cx.md ← NEW: global cross-cuts (from ideation-crosscut-template)
137
- └── meta/ ← NEW: created by this step
138
- ├── problem-statement.md
139
- ├── personas.md
140
- ├── competitive-landscape.md
141
- └── constraints.md
142
- ```
80
+ **Partial failure recovery**: If folder seeding fails mid-way (some domain folders created, others not):
81
+ 1. List what was successfully created vs. what failed
82
+ 2. Present to user: "Folder seeding partially failed. [N] of [M] domains created. Retry the remaining [M-N] domains?"
83
+ 3. If user says retry → seed only the missing domains
84
+ 4. If user says abort → delete all newly created folders and STOP
143
85
 
144
- **For multi-product projects**, additionally create `surfaces/` with sub-folders per surface.
145
-
146
- **Post-seeding verification gate**: After creating all files, verify that `docs/plans/ideation/.gitkeep` and `docs/plans/ideation/README.md` still exist. If EITHER file is missing → **STOP**: "Kit-shipped files were destroyed during seeding. Restore `.gitkeep` and/or `README.md` to `docs/plans/ideation/` before continuing."
147
-
148
- **Seed domains from CONFIRMED classification table** (not from source headings):
149
-
150
- > **CRITICAL**: The domain list comes from the classification table confirmed in Step 1.4.5.
151
- > Do NOT re-derive domains from the source document. Do NOT fall back to source headings.
152
- > If Step 1.4.5 was not completed, STOP — you cannot seed without a confirmed classification.
153
-
154
- For each concept classified as **domain** in the confirmed table:
155
- 1. Determine placement from the structural classification:
156
- - Single-surface → create `docs/plans/ideation/{NN}-{slug}/`
157
- - Hub-and-spoke → surface-exclusive in `surfaces/{surface}/{NN}-{slug}/`, shared in hub surface
158
- - Peer → surface-exclusive in `surfaces/{surface}/{NN}-{slug}/`, shared in `shared/{NN}-{slug}/`
159
- 2. Create the domain folder with: `{slug}-index.md` + `{slug}-cx.md`
160
- 3. For concepts classified as **sub-domain**, create sub-domain folders nested inside their parent domain
161
- 4. For concepts classified as **feature**, create feature files inside their parent domain or sub-domain
162
- 5. For concepts classified as **cross-cut**, add entries to the appropriate CX files (domain-level or global)
163
- 6. For concepts classified as **not-a-product-domain**, add notes to `meta/constraints.md` for `/create-prd`
164
- 7. Update `ideation-index.md` structure map with paths
165
-
166
- **Seeding content by input type:**
167
-
168
- - **Rich document**: Seed each domain/sub-domain/feature with content from the source document using the source citations in the classification table. Run fidelity check: every major concept in the source must map to SOMETHING in the output (domain, sub-domain, feature, CX entry, or `/create-prd` note). Add `> Source: path/to/original.md` to index.
169
- - **Chat transcript**: Noise filter → extract signal → seed domain folders with structured output.
170
- - **Thin document**: Create domain folders with depth markers on feature files.
171
- - **Verbal / one-liner**: Create domain folders with scaffolding. Feature files are `[SURFACE]`.
86
+ **Post-seeding verification gate**: Verify `docs/plans/ideation/.gitkeep` and `docs/plans/ideation/README.md` still exist. If EITHER is missing → **STOP**: "Kit-shipped files were destroyed during seeding. Restore them before continuing."
172
87
 
173
88
  ## 1.6. Engagement Tier Selection (ALL input types)
174
89
 
175
- All three tiers are available for all input types. Present with the recommended default for this input type (Rich/Thin/Chat → Hybrid, Verbal → Interactive):
90
+ Read `.agent/skills/prd-templates/references/engagement-tier-protocol.md` for tier definitions and behavior.
176
91
 
177
- > **How involved do you want to be?**
178
- > 1. 🤖 **Auto** — I explore independently via Deep Think. You review at the end.
179
- > 2. 🤝 **Hybrid** *(recommended)* — Structural stuff auto, product decisions pause for you.
180
- > 3. 💬 **Interactive** — I pause at every gate. Full interview mode.
92
+ Present with the recommended default for this input type (Rich/Thin/Chat → Hybrid, Verbal → Interactive).
181
93
 
182
94
  **Wait for user answer.** Write the engagement tier to `ideation-index.md` under `## Engagement Tier` immediately.
183
95
 
184
96
  ## 1.6.5. Expansion Mode Selection (ALL input types)
185
97
 
186
- Present expansion mode options:
187
-
188
- 1. **Full exploration** *(recommended for 3+ domains)* — Breadth-before-depth with Deep Think
189
- 2. **Process as-is** — Proceed with what's captured
190
- 3. **Expand vertically** — Drill deeper into existing features
191
- 4. **Expand horizontally** — Add new domains
192
- 5. **Cross-cutting concerns** — Map feature interactions
193
- 6. **Combination** — User specifies dimensions and order
194
- 7. **Audit ambiguity first** — Inline check before deciding
98
+ Read `.agent/skills/prd-templates/references/expansion-modes.md` for mode options and default recommendations.
195
99
 
196
- **Wait for user answer.** Write expansion mode to `ideation-index.md` under `## Expansion Mode` immediately.
100
+ Present the options. **Wait for user answer.** Write expansion mode to `ideation-index.md` under `## Expansion Mode` immediately.
197
101
 
198
102
  ## 2. Load skills
199
103
 
@@ -201,8 +105,8 @@ Read `.agent/skills/idea-extraction/SKILL.md` and follow its methodology through
201
105
 
202
106
  Also read `.agent/skills/resolve-ambiguity/SKILL.md` — use reactively when encountering ambiguity that can be resolved without user input.
203
107
 
204
- ### Propose next step
108
+ ### Next step
205
109
 
206
- Proceed to `/ideate-discover` to explore domains using the recursive breadth-before-depth model with the fractal structure.
110
+ **STOP** do NOT proceed to any other workflow. The only valid next step is `/ideate-discover`.
207
111
 
208
- > If invoked standalone, surface this via `notify_user`. If invoked by parent `/ideate`, this is a natural handoff.
112
+ > If invoked standalone, surface this via `notify_user` and wait for user confirmation before running `/ideate-discover`.
@@ -19,154 +19,98 @@ pipeline:
19
19
 
20
20
  Explore constraints, verify domain exhaustion, and compile the vision summary.
21
21
 
22
- **Prerequisite**: If invoked standalone, verify `docs/plans/ideation/ideation-index.md` exists with leaf nodes at `[DEEP]` or `[EXHAUSTED]` level. If not, prompt the user to run `/ideate-discover` first.
22
+ **Prerequisite**: If invoked standalone, verify `docs/plans/ideation/ideation-index.md` exists with leaf nodes at `[DEEP]` or `[EXHAUSTED]` level. If not **STOP**: "Run `/ideate-discover` first."
23
23
 
24
24
  ---
25
25
 
26
26
  ## 7.5. Read Engagement Tier
27
27
 
28
- Read `## Engagement Tier` from `docs/plans/ideation/ideation-index.md`. Apply to gates in this shard:
28
+ Read `## Engagement Tier` from `docs/plans/ideation/ideation-index.md`.
29
29
 
30
- - **Auto**: Steps 8 (constraints, metrics, competitive positioning) → agent self-interviews using Deep Think, writes answers to files. Step 10.5 (below) provides a review checkpoint before compilation.
31
- - **Hybrid**: Steps 8 product decisions → pause for user. Structural checks → auto.
32
- - **Interactive**: All steps pause for user confirmation.
30
+ Read `.agent/skills/prd-templates/references/engagement-tier-protocol.md` apply the tier's gate behavior for this shard.
33
31
 
34
32
  ## 8. Constraints and metrics
35
33
 
36
- Read `.agent/skills/idea-extraction/SKILL.md` and follow its Deep Think Protocol.
34
+ Read `.agent/skills/idea-extraction/SKILL.md` Deep Think Protocol.
37
35
 
38
- Read `.agent/skills/prd-templates/references/ideation-meta-template.md` for the constraints template.
36
+ Read `.agent/skills/prd-templates/references/constraint-exploration.md` follow the constraint questions, tier-specific behavior, success metrics, and competitive positioning procedures.
39
37
 
40
- Explore constraints with the user. Write to `docs/plans/ideation/meta/constraints.md`:
38
+ **Showstopper detection**: If any constraint is classified as a fundamental viability blocker (e.g., regulatory impossibility, technical impossibility with current tech, market size < viable threshold) → **STOP**. Present to the user:
41
39
 
42
- 1. **Budget** Self-funded? VC-backed? Monthly infrastructure ceiling?
43
- 2. **Timeline** — Launch target? Phased rollout?
44
- 3. **Team** — Solo dev? Small team? Skill gaps?
45
- 4. **Compliance** — GDPR, PCI, COPPA, HIPAA, SOC 2? Age restrictions?
46
- 5. **Performance** — Expected scale (users, requests, data)? Latency requirements?
47
- 6. **Surface classification validation** — Verify the structural classification from `ideation-index.md` (set in `ideate-extract` Step 1.3) still holds. Have any new surfaces been discovered during exploration? Has the project shape changed (e.g., what started as single-surface now has a mobile app too)? If the classification needs updating, update it now and note any domain files that need to be relocated.
40
+ > ⚠️ **Potential showstopper identified**: [constraint description]
41
+ >
42
+ > Options:
43
+ > 1. **Pivot** — modify the idea to avoid this constraint
44
+ > 2. **Accept risk** — proceed knowing this constraint exists
45
+ > 3. **Abandon** — this idea is not viable
48
46
 
49
- **Deep Think**: "Based on the product type and user personas, what constraints would I expect that haven't been mentioned? For example, does this product handle payments (PCI)? Does it serve minors (COPPA)? Does it store health data (HIPAA)?"
47
+ Wait for user decision. If pivot update problem statement and loop back to re-explore affected domains. If accept risk document in `meta/constraints.md` as accepted risk and continue. If abandon end the workflow.
50
48
 
51
- **Interactive/Hybrid**: Present each constraint question to user, wait for answers. Write each confirmed constraint to `meta/constraints.md` immediately.
52
-
53
- **Auto**: Self-interview using Deep Think. Write all answers with reasoning to `meta/constraints.md` immediately. Mark each answer as `[AUTO-CONFIRMED]` for traceability.
54
-
55
- If the surface classification changed, update `ideation-index.md` `## Structural Classification` section.
56
-
57
- ### Success metrics
58
-
59
- For each persona, define concrete success metrics. Write to `ideation-index.md` (or link to domain files where the metric applies):
60
-
61
- - What metric proves this product solves the persona's problem?
62
- - What's the target number? (specific — not "good response times")
63
- - What's the measurement method?
64
-
65
- ### Competitive positioning
66
-
67
- If not already explored in `/ideate-discover` Step 4, explore competitive landscape now. Write to `docs/plans/ideation/meta/competitive-landscape.md`:
68
-
69
- - Name 2-4 direct competitors
70
- - For each: what they do well, where they fail, how we differentiate
71
- - What's the moat? (network effects, data, expertise, switching costs)
49
+ If the surface classification changed during constraint exploration, update `ideation-index.md` `## Structural Classification` section.
72
50
 
73
51
  ---
74
52
 
75
53
  ## 9. Domain exhaustion check
76
54
 
77
- This is the final validation gate before compilation.
78
-
79
- ### Read the fractal tree
55
+ Read `.agent/skills/prd-templates/references/domain-exhaustion-criteria.md` apply all criteria and follow the execution procedure.
80
56
 
81
- Read `docs/plans/ideation/ideation-index.md` and recursively review:
82
- - Every node's status marker (surface → domain → sub-domain → feature)
83
- - All leaf feature files' status markers
84
- - All CX files at every level for pending entries
57
+ If any criterion fails → take the specified action. If proportionality fails → return to `/ideate-discover` for under-explored areas.
85
58
 
86
- ### Exhaustion criteria
59
+ ### 9.5. Domain Gap Reasoning (missing domain detection)
87
60
 
88
- | Check | Criteria | Action if Fail |
89
- |-------|----------|----------------|
90
- | All leaf nodes ≥ `[DEEP]` | Every feature file in the tree is `[DEEP]` or `[EXHAUSTED]` | Drill remaining feature files |
91
- | Status propagation correct | Parent nodes reflect their children's status | Update parent indexes |
92
- | All Must Have features ≥ Level 2 | Every Must Have has sub-features AND edge cases AND Role Lens | Deep Think + drill |
93
- | Deep Think zero hypotheses | Final Deep Think pass across ALL leaf nodes yields no new hypotheses | Present any new hypotheses, drill if confirmed |
94
- | All CX files clean | No Medium/Low confidence entries remain at any level — all are High or rejected | Run synthesis questions on pending pairs |
95
- | Role Lens complete | Every feature file has a populated Role Lens table | Fill missing Role Lens entries |
96
- | User confirmation | User explicitly confirms "nothing else" for each domain | Ask for each under-explored domain |
61
+ After verifying existing domains are deep enough, reason about whether **entire domains are missing**:
97
62
 
98
- ### Execute exhaustion check
63
+ 1. **Product archetype analysis**: Identify the product archetype (e.g., marketplace, SaaS tool, social platform, developer tool). List the standard domain categories for this archetype.
64
+ 2. **Gap identification**: Compare the standard domain list against the actual domain folders in `docs/plans/ideation/domains/`. List any standard domains with no corresponding folder.
65
+ 3. **Cross-feature gap detection**: Read all CX files. For each unresolved cross-cut, ask: "Does this cross-cut imply a domain that doesn't exist yet?" (Example: if multiple features reference "notifications" but no notifications domain exists, that's a structural gap.)
66
+ 4. **Present missing domains**:
99
67
 
100
- 1. Walk the fractal tree. For each leaf node below `[DEEP]`:
101
- - "Feature [X] in [domain] is still at [status]. Drill deeper or intentionally minimal?"
102
- - If "drill" return to `/ideate-discover`
103
- - If "intentionally minimal" note in feature file and proceed
68
+ > 🏗️ **Potential missing domains:**
69
+ >
70
+ > Given this is a [product archetype], these domains are standard but not present:
71
+ > - **[Domain A]** [why it's expected: most [archetype] apps have this because...]
72
+ > - **[Domain B]** — [why it's expected: cross-cuts between features X and Y imply this]
73
+ >
74
+ > These are suggestions. You may have intentionally excluded them. Want to add any?
104
75
 
105
- 2. Run **final Deep Think pass**: For each `[DEEP]` leaf node, apply the four Deep Think questions. Present any new hypotheses.
106
- - If confirmed drill, update feature files
107
- - If zero hypotheses mark `[EXHAUSTED]`, propagate status upward
76
+ **STOP** wait for user response. For each accepted domain:
77
+ 1. Create the domain folder with index and CX files
78
+ 2. Run a quick Level 1 breadth sweep (from idea-extraction skill)
79
+ 3. Re-run the exhaustion check on the expanded domain set
108
80
 
109
- 3. Walk ALL CX files at every level. Resolve any Medium/Low confidence entries.
81
+ For rejected domains: add to `ideation-index.md` `## Considered & Rejected` section.
110
82
 
111
- 4. Verify all feature files have populated Role Lens tables.
112
-
113
- 5. Update `ideation-index.md` progress summary with final counts (total leaf nodes, exhausted count, CX entries confirmed).
114
-
115
- ---
116
-
117
- ## 10. Vision deepening (if needed)
118
-
119
- After the exhaustion check, verify proportionality:
120
-
121
- - **Rich inputs**: Total domain file content (all files combined) should be at least 30% of the original source document's line count. If short, identify what was lost.
122
- - **All inputs**: Each domain with `[DEEP]` or `[EXHAUSTED]` status should have at least 3 sub-areas drilled with edge cases.
123
-
124
- If proportionality fails, return to `/ideate-discover` for the under-explored areas.
83
+ **Loop guard**: Track how many times this shard has returned to `/ideate-discover` for exhaustion remediation.
84
+ - **1st return** → normal. Run discover again on the flagged areas.
85
+ - **2nd return** warn: "This is the second remediation loop. Remaining gaps: [list]. Resolve these specifically or they will be escalated."
86
+ - **3rd return** → **STOP**: "Exhaustion check has failed 3 times. Remaining gaps: [list]. Present these to the user as known gaps and ask: accept as-is, or manually provide the missing content?"
125
87
 
126
88
  ---
127
89
 
128
90
  ## 10.5. Auto Tier Review Checkpoint (Auto tier only)
129
91
 
130
- If engagement tier is **Auto**, present a comprehensive review before compilation:
92
+ If engagement tier is **Auto**:
131
93
 
132
- 1. **List all auto-confirmed decisions** with their Deep Think reasoning — from domain classification, feature drilling, constraints, personas, competitive positioning
133
- 2. **Highlight any `[AUTO-CONFIRMED]` entries** in `meta/constraints.md`, `meta/personas.md`, and `meta/competitive-landscape.md`
134
- 3. **Present for review**: "I explored your idea independently. Here's everything I decided and why. Override anything before I compile the vision."
135
- 4. **Wait for user response.** Apply any overrides. Write corrections to files immediately.
94
+ 1. List all auto-confirmed decisions with their Deep Think reasoning
95
+ 2. Highlight any `[AUTO-CONFIRMED]` entries in `meta/constraints.md`, `meta/personas.md`, `meta/competitive-landscape.md`
96
+ 3. Present: "I explored your idea independently. Here's everything I decided and why. Override anything before I compile the vision."
97
+ 4. **Wait for user response.** Apply any overrides. Write corrections immediately.
136
98
 
137
- For **Hybrid** and **Interactive** tiers, skip this step — the user already confirmed during exploration.
99
+ For **Hybrid** and **Interactive** tiers skip this step.
138
100
 
139
101
  ---
140
102
 
141
103
  ## 11. Compile vision document
142
104
 
143
- Read `.agent/skills/prd-templates/references/vision-template.md` for the output template.
105
+ Read `.agent/skills/prd-templates/references/vision-template.md` for the output template and required sections.
144
106
 
145
107
  Read `.agent/skills/technical-writer/SKILL.md` and follow its methodology.
146
108
 
147
- Compile `docs/plans/vision.md` as a **human-readable executive summary** of the ideation output. This is the "sales pitch" — it is NOT consumed by the pipeline. The pipeline reads `ideation-index.md` directly.
148
-
149
- **Vision.md contents (Option B — Executive Summary):**
150
-
151
- 1. **Problem Statement** — Condensed from `meta/problem-statement.md`
152
- 2. **Target Users** — Condensed persona summaries from `meta/personas.md` (name + role + pain point + success criteria — not the full 6-field exploration)
153
- 3. **Solution Overview** — 2-3 paragraphs describing what the product does
154
- 4. **Domain Map** — One paragraph per domain (condensed from domain files, not the full exploration)
155
- 5. **MoSCoW Feature Matrix** — Feature names + domain links (not the drill-down details)
156
- 6. **Key Differentiators + Competitive Landscape** — From `meta/competitive-landscape.md`
157
- 7. **Constraints Summary** — From `meta/constraints.md`
158
- 8. **Key Decisions** — Numbered list from `ideation-index.md` decision log
159
-
160
- Add a header note:
161
-
162
- ```markdown
163
- > **This is a human-readable project summary.** For pipeline-grade detail, see
164
- > [ideation-index.md](ideation/ideation-index.md) and the domain files it references.
165
- ```
109
+ Compile `docs/plans/vision.md` as a human-readable executive summary. This is NOT consumed by the pipeline the pipeline reads `ideation-index.md` directly.
166
110
 
167
111
  ### Fidelity check
168
112
 
169
- Verify that every domain in `ideation-index.md` appears in `vision.md`. Nothing dropped during compilation. This is a summary, not a filter.
113
+ Verify every domain in `ideation-index.md` appears in `vision.md`. Nothing dropped during compilation.
170
114
 
171
115
  ---
172
116
 
@@ -174,30 +118,12 @@ Verify that every domain in `ideation-index.md` appears in `vision.md`. Nothing
174
118
 
175
119
  ### Self-check against Ideation rubric
176
120
 
177
- Before presenting to the user, self-check the ideation output:
178
-
179
- Read `.agent/skills/pipeline-rubrics/references/ideation-rubric.md` before applying the self-check dimensions.
121
+ Read `.agent/skills/pipeline-rubrics/references/ideation-rubric.md` and apply all 12 dimensions as the self-check.
180
122
 
181
- | # | Dimension | Check |
182
- |---|-----------|-------|
183
- | 1 | Problem Clarity | Is the problem one sentence, specific, and testable? |
184
- | 2 | Persona Specificity | Are personas named with all 6 fields? |
185
- | 3 | Feature Completeness | Is MoSCoW complete? Are Must Haves at ≥Level 2 depth? |
186
- | 4 | Constraint Explicitness | Are all axes (budget, timeline, team, compliance, performance) addressed? |
187
- | 5 | Success Measurability | Are there concrete numbers/thresholds? |
188
- | 6 | Competitive Positioning | Are competitors named with differentiation? |
189
- | 7 | Open Question Resolution | Do all open questions have owners + deadlines? |
190
- | 8 | **Input-Output Proportionality** | Is the ideation output proportional to input richness? |
191
- | 9 | **Domain Coverage** | Are all domains at `[DEEP]` or `[EXHAUSTED]`? |
192
- | 10 | **Deep Think Coverage** | Were hypotheses tracked? Are all resolved (confirmed/rejected)? |
193
- | 11 | **Cross-Cut Completeness** | Is the ledger clean? No pending entries? |
194
- | 12 | **Fractal Structure Compliance** | Does every folder have an index + CX file? Do leaf nodes use the feature template? Does hub-and-spoke placement match classification? Are Role Matrix and Role Lens populated? |
123
+ For any dimension that scores ⚠️ or ❌ → resolve it NOW. Loop back to the relevant step. Do not present a document with known gaps.
195
124
 
196
- For any dimension that scores ⚠️ or ❌, resolve it NOW — don't present a document with known gaps. Loop back to the relevant step and work through it with the user.
197
-
198
- > **Note**: This is an internal self-check, not a formal audit. For a rigorous,
199
- > independent audit with evidence citations, run `/audit-ambiguity ideation` as a
200
- > separate step after this workflow completes.
125
+ **Remediation loop guard**: Track remediation attempts per dimension.
126
+ - After **3 failed attempts** on the same dimension → **STOP**: "Dimension '[name]' has failed remediation 3 times. Presenting to user as a known gap with context: [what was tried, why it failed]." Include it in the review presentation as an unresolved item for user decision.
201
127
 
202
128
  ### Present for review
203
129
 
@@ -205,14 +131,12 @@ Use `notify_user` to request review of:
205
131
  - `docs/plans/ideation/ideation-index.md` — the pipeline key file
206
132
  - `docs/plans/vision.md` — the human summary
207
133
 
208
- Include:
209
- - Summary of the self-check results (all 12 dimensions)
210
- - Any areas where you resolved gaps during the self-check
211
- - The final domain coverage map
212
- - Count of Deep Think hypotheses: N presented, N confirmed, N rejected
134
+ Include: self-check results (all 12 dimensions), any resolved gaps, final domain coverage map, Deep Think hypothesis counts.
135
+
136
+ **STOP** do NOT proceed until the user explicitly approves.
213
137
 
214
- The ideation must be approved before proceeding. Do NOT proceed until the user sends a message explicitly approving. Wait for explicit approval.
138
+ ### Next step
215
139
 
216
- ### Proposed next steps
140
+ **STOP** do NOT propose `/create-prd` or any other pipeline workflow. The only valid next step is:
217
141
 
218
- **Mandatory next step**: Run `/audit-ambiguity ideation` for all inputs, regardless of input type. Even a rich document can have gaps the agent missed. The audit is cheap; the cost of a gap propagating to architecture is high. Do not propose `/create-prd` until `/audit-ambiguity ideation` has run.
142
+ - `/audit-ambiguity ideation` mandatory coverage verification before `/create-prd` can begin.
@@ -33,22 +33,7 @@ shards: [ideate-extract, ideate-discover, ideate-validate]
33
33
 
34
34
  After input classification, the user chooses how much involvement they want. All tiers are available for all input types — the pipeline recommends a default but the user picks.
35
35
 
36
- | Tier | Gate behavior | Default for |
37
- |------|---------------|-------------|
38
- | 🤖 **Auto** | Pipeline uses Deep Think to self-interview at every gate. User reviews compiled output at the end. | — |
39
- | 🤝 **Hybrid** | Structural/mechanical gates auto-confirm. Product decisions (personas, MoSCoW, competitive positioning, constraints) pause for user. | Rich doc, thin doc, chat transcript |
40
- | 💬 **Interactive** | Every gate pauses for explicit user confirmation. | Verbal / one-liner |
41
-
42
- **Full matrix — Input × Tier:**
43
-
44
- | Input Type | 🤖 Auto | 🤝 Hybrid | 💬 Interactive |
45
- |---|---|---|---|
46
- | Rich document | AI extracts + self-interviews gaps | AI extracts, pauses for product calls | AI extracts, pauses at every gate |
47
- | Thin document | AI expands all domains independently | AI expands, pauses for product calls | AI expands with user at every step |
48
- | Chat transcript | AI filters noise + self-interviews | AI filters, pauses for product calls | AI filters with user validation |
49
- | Verbal / one-liner | AI generates vision from scratch via Deep Think | AI generates, pauses for product calls | Full traditional interview |
50
-
51
- **Quality guarantee**: All input types and engagement tiers produce the **same output quality** using the same fractal structure. The ideation output from an Auto one-liner is structurally identical to an Interactive rich document. Every node has an index, CX file, and children. Every feature has a Role Lens. Only the amount of human involvement differs.
36
+ Read the engagement tier protocol (`.agent/skills/prd-templates/references/engagement-tier-protocol.md`) apply the tier behavior for ideation decisions. The user chooses their tier after input classification. All tiers produce the **same output quality** using the same fractal structure — only the amount of human involvement differs.
52
37
 
53
38
  Transform a raw idea into comprehensive, structured ideation output through exhaustive recursive exploration with the Deep Think protocol.
54
39
 
@@ -66,7 +51,32 @@ Transform a raw idea into comprehensive, structured ideation output through exha
66
51
  Check whether `docs/plans/ideation/ideation-index.md` already exists.
67
52
 
68
53
  - **If it does NOT exist** → This is a fresh ideation. Proceed to Shard 1.
69
- - **If it DOES exist** → **STOP**. Present to the user:
54
+ - **If it exists but is corrupt** (file size < 100 bytes OR missing `## Structural Classification` section) Treat as fresh. Warn: "Found a corrupt ideation-index.md — treating as a fresh start." Delete the corrupt file and proceed to Shard 1.
55
+ - **If it DOES exist and is valid** → Check for downstream artifacts before offering overwrite:
56
+
57
+ ### 0.1. Downstream cascade check
58
+
59
+ Scan for downstream pipeline output:
60
+ - `docs/plans/*-architecture-design.md`
61
+ - `docs/plans/ia/` (any `.md` files besides `index.md`)
62
+ - `docs/plans/be/` (any `.md` files besides `index.md`)
63
+ - `docs/plans/fe/` (any `.md` files besides `index.md`)
64
+
65
+ **If downstream artifacts exist** → **STOP**. Present:
66
+
67
+ > ⚠️ **Ideation output AND downstream specs exist.**
68
+ >
69
+ > Re-running `/ideate` will invalidate **all** downstream work:
70
+ > - Architecture design document
71
+ > - IA specs (N shards)
72
+ > - BE specs (N specs)
73
+ > - FE specs (N specs)
74
+ >
75
+ > You would need to re-run the entire pipeline from `/create-prd` forward.
76
+ >
77
+ > **Overwrite** (start fresh, accept cascade invalidation) or **Abort**?
78
+
79
+ **If no downstream artifacts exist** → Present the standard overwrite prompt:
70
80
 
71
81
  > ⚠️ **Ideation output already exists** at `docs/plans/ideation/ideation-index.md`.
72
82
  >
@@ -109,7 +119,10 @@ Explores constraints, success metrics, and competitive positioning. Runs leaf-no
109
119
  > The quality self-check and review request are handled by `ideate-validate.md` (Step 12).
110
120
  > The parent does not duplicate shard-level quality gates.
111
121
 
112
- ### Proposed next steps
122
+ ### Next step
123
+
124
+ **STOP** — do NOT propose `/create-prd` or any other pipeline workflow. The only valid next step is:
113
125
 
114
- **Mandatory next step**: Run `/audit-ambiguity ideation` for all inputs, regardless of input type. Even a rich document can have gaps the agent missed. The audit is cheap; the cost of a gap propagating to architecture is high. Do not propose `/create-prd` until `/audit-ambiguity ideation` has run.
126
+ - `/audit-ambiguity ideation` mandatory coverage verification before `/create-prd` can begin.
115
127
 
128
+ > If the user wants to pause, save progress and note where to resume. When resuming, the next step remains `/audit-ambiguity ideation`.
@@ -17,7 +17,7 @@ pipeline:
17
17
 
18
18
  Check progress state, load skills, read the slice, detect parallel mode, and write the contract.
19
19
 
20
- **Prerequisite**: Phase plan must exist with slice acceptance criteria. If not, tell the user to run `/plan-phase` first.
20
+ **Prerequisite**: Phase plan must exist with slice acceptance criteria. If the phase plan file does not exist → **STOP**: tell the user to run `/plan-phase` first.
21
21
 
22
22
  ---
23
23
 
@@ -64,7 +64,7 @@ Read `.agent/skills/prd-templates/references/skill-loading-protocol.md` and load
64
64
 
65
65
  Use `find-skills` to discover a test framework skill if needed.
66
66
 
67
- If this slice introduces a new dependency, read `.agent/workflows/bootstrap-agents.md` and execute with the new value.
67
+ If this slice introduces a new dependency, read `.agent/workflows/bootstrap-agents.md` and execute with the new value. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`).
68
68
 
69
69
  ---
70
70
 
@@ -72,6 +72,16 @@ If this slice introduces a new dependency, read `.agent/workflows/bootstrap-agen
72
72
 
73
73
  Read the slice's acceptance criteria from the phase plan.
74
74
 
75
+ ## 1.25. Load spec context
76
+
77
+ For each acceptance criterion, trace its spec citation (e.g., `[BE §3.2]`, `[FE §LoginForm]`) back to the source spec:
78
+
79
+ 1. Read the full §section from every cited BE spec — not just the contract shape, but the error handling, edge cases, access control rules, rate limits, and concurrency notes
80
+ 2. Read the full §section from every cited FE spec — component props, states, interactions, responsive behavior, accessibility rules
81
+ 3. Read any IA shard sections cited by the BE spec's Source Map — especially `## Edge Cases` and `## Access Control`
82
+
83
+ This context persists throughout the TDD cycle. The acceptance criteria define WHAT to test; the spec context defines HOW DEEP to test it.
84
+
75
85
  ## 1.5. Check for parallel mode
76
86
 
77
87
  Scan the slice's tasks for surface tags (`BE`, `FE`, `QA`):
@@ -108,8 +118,8 @@ Load the Languages skill(s) from this slice's surface row per the skill loading
108
118
 
109
119
  Define request/response shapes as {{CONTRACT_LIBRARY}} schemas in the contracts directory (see `.agent/instructions/structure.md`). This is the source of truth.
110
120
 
111
- ### Propose next step
121
+ ### Next step
112
122
 
113
- Contract written. Next: `/implement-slice-tdd` for the Red→Green→Refactor cycle.
123
+ **STOP** — do NOT proceed to any other workflow. The only valid next step is `/implement-slice-tdd`.
114
124
 
115
- > If invoked standalone, surface via `notify_user`.
125
+ > If invoked standalone, surface via `notify_user` and wait for user confirmation.