cfsa-antigravity 2.1.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 (43) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/instructions/example.md +21 -0
  3. package/template/.agent/skills/architecture-mapping/SKILL.md +8 -8
  4. package/template/.agent/skills/idea-extraction/SKILL.md +270 -279
  5. package/template/.agent/skills/pipeline-rubrics/references/ia-rubric.md +2 -2
  6. package/template/.agent/skills/pipeline-rubrics/references/scoring.md +1 -1
  7. package/template/.agent/skills/pipeline-rubrics/references/vision-rubric.md +2 -1
  8. package/template/.agent/skills/prd-templates/SKILL.md +11 -11
  9. package/template/.agent/skills/prd-templates/references/decomposition-templates.md +1 -1
  10. package/template/.agent/skills/prd-templates/references/engineering-standards-template.md +2 -0
  11. package/template/.agent/skills/prd-templates/references/fractal-cx-template.md +58 -0
  12. package/template/.agent/skills/prd-templates/references/fractal-feature-template.md +93 -0
  13. package/template/.agent/skills/prd-templates/references/fractal-node-index-template.md +55 -0
  14. package/template/.agent/skills/prd-templates/references/ideation-crosscut-template.md +26 -47
  15. package/template/.agent/skills/prd-templates/references/ideation-index-template.md +41 -49
  16. package/template/.agent/skills/prd-templates/references/slice-completion-gates.md +8 -0
  17. package/template/.agent/skills/prd-templates/references/vision-template.md +8 -8
  18. package/template/.agent/skills/resolve-ambiguity/SKILL.md +1 -1
  19. package/template/.agent/skills/spec-writing/SKILL.md +1 -1
  20. package/template/.agent/workflows/create-prd-architecture.md +7 -2
  21. package/template/.agent/workflows/create-prd-stack.md +1 -1
  22. package/template/.agent/workflows/create-prd.md +4 -3
  23. package/template/.agent/workflows/decompose-architecture-structure.md +2 -2
  24. package/template/.agent/workflows/decompose-architecture-validate.md +3 -3
  25. package/template/.agent/workflows/decompose-architecture.md +18 -3
  26. package/template/.agent/workflows/evolve-feature-classify.md +14 -6
  27. package/template/.agent/workflows/ideate-discover.md +71 -110
  28. package/template/.agent/workflows/ideate-extract.md +68 -104
  29. package/template/.agent/workflows/ideate-validate.md +24 -20
  30. package/template/.agent/workflows/ideate.md +7 -7
  31. package/template/.agent/workflows/implement-slice-tdd.md +25 -0
  32. package/template/.agent/workflows/remediate-pipeline-assess.md +2 -1
  33. package/template/.agent/workflows/resolve-ambiguity.md +2 -2
  34. package/template/.agent/workflows/validate-phase-quality.md +155 -0
  35. package/template/.agent/workflows/validate-phase-readiness.md +167 -0
  36. package/template/.agent/workflows/validate-phase.md +19 -154
  37. package/template/.agent/workflows/write-architecture-spec-design.md +8 -4
  38. package/template/AGENTS.md +5 -1
  39. package/template/GEMINI.md +2 -0
  40. package/template/docs/README.md +10 -10
  41. package/template/docs/kit-architecture.md +92 -25
  42. package/template/docs/plans/ideation/README.md +8 -3
  43. package/template/.agent/skills/prd-templates/references/ideation-domain-template.md +0 -61
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: idea-extraction
3
- description: "Exhaustive idea extraction through recursive breadth-before-depth exploration with Deep Think protocol. Use during /ideate to transform raw ideas — whether richly documented, lightly sketched, or entirely in the user's head — into comprehensive, structured ideation output. Writes directly to the ideation/ folder structureone domain file per domain, no monolithic intermediary."
3
+ description: "Exhaustive idea extraction through recursive breadth-before-depth exploration with Deep Think protocol and fractal structure. Use during /ideate to transform raw ideas into comprehensive, structured ideation output. Writes to a fractal folder hierarchyevery node has an index, CX file, and children."
4
4
  ---
5
5
 
6
6
  # Idea Extraction — Exhaustion Engine
@@ -23,64 +23,45 @@ interactions — then present hypotheses to the user for confirmation or rejecti
23
23
 
24
24
  ---
25
25
 
26
- ## Output Structure
26
+ ## Fractal Structure Protocol
27
27
 
28
- This skill writes directly to the `docs/plans/ideation/` folder. No monolithic
29
- intermediary file. The **folder structure is dynamic** — it adapts to the project's
30
- complexity based on the Structural Classification decided in `ideate-extract`.
31
-
32
- ### Single-Surface Layout (default)
33
-
34
- Used for projects with one delivery platform (e.g., just a web app).
28
+ This skill writes directly to the `docs/plans/ideation/` folder using a **fractal pattern** — every node in the tree (surface, domain, sub-domain) follows the same structure:
35
29
 
36
30
  ```
37
- docs/plans/ideation/
38
- ├── ideation-index.md Pipeline key file domain map + document map
39
- ├── meta/
40
- ├── problem-statement.md
41
- ├── personas.md
42
- │ ├── competitive-landscape.md
43
- │ └── constraints.md
44
- ├── domains/
45
- │ ├── 01-domain-slug.md ← One file per domain
46
- │ └── ...
47
- └── cross-cuts/
48
- └── cross-cut-ledger.md ← Running ledger accumulated at every level
31
+ {node}/
32
+ ├── {node}-index.md what's in this node, child listing, Role Matrix
33
+ ├── {node}-cx.md ← cross-cuts connecting this node's children
34
+ ├── child-01/ ← same pattern repeats (if child is complex)
35
+ └── 01.01.01-feature.md leaf node = .md file, not a folder
49
36
  ```
50
37
 
51
- ### Multi-Product Layout (Option B)
38
+ **Key rules:**
39
+
40
+ 1. **Always folders.** Every domain, sub-domain, and even single-surface projects use folders — no flat files. One universal pattern, no exceptions.
41
+ 2. **Indexes at every level.** Template: `.agent/skills/prd-templates/references/fractal-node-index-template.md`
42
+ 3. **CX files at every level.** Template: `.agent/skills/prd-templates/references/fractal-cx-template.md`
43
+ 4. **Feature files are leaf nodes.** Template: `.agent/skills/prd-templates/references/fractal-feature-template.md`
44
+ 5. **Depth is reactive.** The structure grows during exploration — never pre-scaffolded beyond what's discovered.
45
+ 6. **Soft limit at 4 levels.** If creating a level 5+ node, pause and ask the user: "This is getting unusually deep — should I promote a parent to reduce nesting, or is this depth justified?"
46
+
47
+ ### Super-Index
48
+
49
+ The top-level `ideation-index.md` uses a different template: `.agent/skills/prd-templates/references/ideation-index-template.md`
50
+ The top-level `ideation-cx.md` uses: `.agent/skills/prd-templates/references/ideation-crosscut-template.md`
52
51
 
53
- Used when the project has **distinct products** with different tech stacks, different
54
- users, or surface-exclusive features. Surfaces are top-level folders. Shared/cross-cutting
55
- domains live in `domains/` as siblings.
52
+ ### Numbering Convention
53
+
54
+ Numbers are hierarchical and dot-separated within a surface:
56
55
 
57
56
  ```
58
- docs/plans/ideation/
59
- ├── ideation-index.md
60
- ├── meta/
61
- │ ├── problem-statement.md
62
- │ ├── personas.md
63
- │ ├── competitive-landscape.md
64
- │ └── constraints.md
65
- ├── surfaces/ ← Only created for multi-product projects
66
- │ ├── web/
67
- │ │ ├── 01-accounts.md
68
- │ │ └── 02-education-hub.md
69
- │ ├── desktop/
70
- │ │ ├── 01-operations.md
71
- │ │ └── 02-inventory.md
72
- │ └── mobile/
73
- │ ├── 01-device-guardian.md
74
- │ └── 02-device-locator.md
75
- ├── domains/ ← Shared/cross-cutting domains
76
- │ ├── 01-device-history.md
77
- │ ├── 02-payments.md
78
- │ └── 03-certification.md
79
- └── cross-cuts/
80
- └── cross-cut-ledger.md
57
+ {domain}.{sub-domain}.{sub-sub}.{feature}
58
+ 01 . 01 . 02 . 03
81
59
  ```
82
60
 
83
- Templates for each file type are in `.agent/skills/prd-templates/references/ideation-*.md`.
61
+ - Folders use number prefix: `01.03.02-ai-assistant/`
62
+ - Feature files use full number: `01.03.02.03-parts-recommendation.md`
63
+ - Cross-surface references prefix with surface: `web/02.01.03`, `desktop/01.03.02`
64
+ - Numbers are stable once assigned — never renumber
84
65
 
85
66
  ---
86
67
 
@@ -90,13 +71,14 @@ Templates for each file type are in `.agent/skills/prd-templates/references/idea
90
71
  > It determines the folder layout for the entire ideation phase. The classification
91
72
  > is performed in `ideate-extract` (Step 1.3) and recorded in `ideation-index.md`.
92
73
 
93
- ### Three Project Shapes
74
+ ### Four Project Shapes
94
75
 
95
76
  | Shape | Signals | Folder Structure |
96
77
  |---|---|---|
97
- | **Single-surface** | One platform, simple audience, "make me a website" | Flat `domains/` |
98
- | **Multi-surface, mostly shared** | 2+ platforms, same tech stack, >80% shared logic | Flat `domains/` + surface annotation in domain frontmatter |
99
- | **Multi-product** | 2+ platforms, different tech stacks/users, surface-exclusive features | `surfaces/` + `domains/` (Option B) |
78
+ | **Single-surface** | One platform, one audience, "make me a website" | Domains are top-level children of `ideation/` (no `surfaces/` folder) |
79
+ | **Multi-surface-shared** | 2+ platforms, same stack, >80% shared logic | Domains at top level with surface annotations in feature files |
80
+ | **Multi-product (hub-and-spoke)** | 2+ platforms, one is clearly the central platform/API. Others consume from it. | `surfaces/` with hub surface owning shared domains. Spokes reference hub via CX. |
81
+ | **Multi-product (peer)** | 2+ platforms, no clear primary. Each is equally independent. | `surfaces/` with `shared/` folder as a peer for truly cross-surface domains. |
100
82
 
101
83
  ### Detection: When to Ask vs When to Detect
102
84
 
@@ -108,46 +90,171 @@ Templates for each file type are in `.agent/skills/prd-templates/references/idea
108
90
 
109
91
  ### Interview Questions (asked early, before domain exploration)
110
92
 
111
- When the input doesn't make the project shape obvious, ask these two questions
93
+ When the input doesn't make the project shape obvious, ask these questions
112
94
  **immediately after the opening problem statement question** — before any domain
113
95
  exploration or file creation:
114
96
 
115
97
  1. **"Who are the distinct user types or audiences?"**
116
- - Single audience (e.g., "small business owners") → likely single-surface
117
- - Multiple distinct audiences (e.g., "consumers, repair technicians, shop owners") → likely multi-product
98
+ - Single audience → likely single-surface
99
+ - Multiple distinct audiences → likely multi-product
118
100
 
119
101
  2. **"What platforms or surfaces does this need to live on?"** (web, mobile, desktop, API, CLI)
120
102
  - One platform → single-surface
121
103
  - Multiple platforms, same stack → multi-surface-shared
122
104
  - Multiple platforms, different stacks or exclusive features → multi-product
123
105
 
106
+ 3. **"Is there a primary platform that the other surfaces depend on — like a central API or web platform? Or are all surfaces independent peers?"** _(only if multi-product)_
107
+ - Yes, one primary → hub-and-spoke
108
+ - No, all independent → peer
109
+
124
110
  ### Detection Signals (for document input)
125
111
 
126
112
  When processing a document, scan for these signals before creating any domain files:
127
113
 
128
114
  | Signal | Example | Classification |
129
115
  |---|---|---|
130
- | Distinct platform names in section headings | "Consumer Web Platform", "Shop Software (Tauri)", "Native Mobile Apps" | Multi-product |
131
- | Different tech stacks mentioned per surface | "Astro/React for web", "Rust/Tauri for desktop", "React Native for mobile" | Multi-product |
132
- | Surface-exclusive features | "Board Viewer (desktop only)", "Device Guardian (Android only)" | Multi-product |
116
+ | Distinct platform names in section headings | "Consumer Web Platform", "Shop Software (Tauri)" | Multi-product |
117
+ | Different tech stacks mentioned per surface | "Astro/React for web", "Rust/Tauri for desktop" | Multi-product |
118
+ | One surface described as "the platform" or "the API" | "Desktop app calls the platform API" | Hub-and-spoke |
119
+ | All surfaces access a central database through one API | "Everything goes through the web platform's proxy" | Hub-and-spoke |
120
+ | Surfaces described as equally independent | "Web and mobile are separate apps with separate backends" | Peer |
133
121
  | Single platform implied | "The website will...", "Users visit the app and..." | Single-surface |
134
- | Features described without surface context | "User authentication", "Dashboard", "Settings" | Single-surface (default) |
135
122
 
136
- ### Domain Placement Rules (for multi-product)
123
+ ### Hub-and-Spoke Implications
137
124
 
138
- Once the multi-product classification is confirmed, every domain must be assigned:
125
+ When hub-and-spoke is identified:
139
126
 
140
- | Domain type | Placement | Test |
141
- |---|---|---|
142
- | **Surface-exclusive** | `surfaces/{surface-name}/NN-domain.md` | "Does this feature/capability exist ONLY on one surface?" |
143
- | **Shared / cross-cutting** | `domains/NN-domain.md` | "Does this feature span 2+ surfaces?" |
144
- | **Uncertain** | Ask the user: "Does [domain] belong to [surface] specifically, or is it shared across surfaces?" | — |
127
+ - **The hub surface owns shared domains.** Device History, Payments, Certification — these live INSIDE the hub surface's domain tree, not in a separate `shared/` folder.
128
+ - **Spoke surfaces reference hub domains via CX.** Desktop's CX files say "Feature X consumes web/domain/feature via API."
129
+ - **The hub surface tends to be the largest.** This is expected and correct.
130
+
131
+ ### Peer Mode Implications
132
+
133
+ When peer mode is identified:
134
+
135
+ - **Shared domains live in `shared/`.** `shared/` is treated as a peer node with the same fractal pattern.
136
+ - **Each surface owns only its exclusive features.**
137
+ - **Surface CX files reference `shared/` domains.** Both surfaces point to shared, rather than one owning it.
145
138
 
146
139
  ### Classification Persistence
147
140
 
148
- The classification is recorded in `ideation-index.md` under a `## Structural Classification`
149
- section. All downstream steps (domain creation, discovery, validation) read this section
150
- to determine where to place new domain files.
141
+ The classification is recorded in `ideation-index.md` under `## Structural Classification`.
142
+ All downstream steps read this section to determine where to place new nodes.
143
+
144
+ ---
145
+
146
+ ## Node Classification Gate
147
+
148
+ > **RUN THIS GATE before creating ANY new node** — domain, sub-domain, or feature.
149
+
150
+ ```
151
+ "I discovered [thing]. What is it?"
152
+
153
+
154
+ Does it belong to an EXISTING domain or sub-domain?
155
+
156
+ YES ──► Does it have 2+ distinct capabilities that interact with each other?
157
+ │ │
158
+ │ YES ──► It's a SUB-DOMAIN ──► create folder inside existing parent
159
+ │ │
160
+ │ NO ──► It's a FEATURE ──► create .md file inside existing parent
161
+
162
+ NO ──► Is it surface-exclusive?
163
+
164
+ YES ──► It's a new DOMAIN ──► create domain folder in the correct surface
165
+
166
+ NO ──► Is there a hub surface that owns this kind of logic?
167
+
168
+ YES ──► It lives in the HUB surface ──► create domain in hub + CX from spokes
169
+
170
+ NO ──► It's a shared domain ──► create in shared/
171
+
172
+ **WHEN UNCERTAIN: Ask the user.** Never assume placement.
173
+ ```
174
+
175
+ ### Sub-Domain vs Feature Test
176
+
177
+ The key question: **"Does this thing have its own internal features that interact with each other?"**
178
+
179
+ | Example | Internal Features? | Classification |
180
+ |---------|-------------------|----------------|
181
+ | AI Assistant | Yes: task generation, guided workflow, parts recommendation, test tracking — these interact | **Sub-domain** (folder) |
182
+ | Print Receipt | No: it does one thing | **Feature** (file) |
183
+ | Inventory Manager | Yes: stock tracking, reorder alerts, supplier integration | **Sub-domain** or **Domain** depending on scope |
184
+ | Password Reset | No: single flow with edge cases | **Feature** (file) |
185
+
186
+ ### Anti-Patterns
187
+
188
+ | ❌ Wrong | ✅ Right |
189
+ |----------|---------|
190
+ | Creating "Supplier Integration" as a new domain | Recognizing it's a feature within AI Assistant, cross-cutting to web's Supplier Accounts |
191
+ | Creating a domain for every feature mentioned | Grouping related features under their parent domain/sub-domain |
192
+ | Pre-creating 4 levels of empty folders | Creating depth reactively as complexity is discovered |
193
+ | Putting a shared domain in `shared/` when hub-and-spoke is active | Putting it inside the hub surface, with CX references from spokes |
194
+
195
+ ---
196
+
197
+ ## Reactive Depth Protocol
198
+
199
+ ### Depth Grows from Exploration
200
+
201
+ The structure is NEVER pre-scaffolded. It grows as the agent explores:
202
+
203
+ | Discovery Event | Action |
204
+ |----------------|--------|
205
+ | New surface identified | Create surface folder + surface index + surface CX |
206
+ | New domain identified | Run Classification Gate. Create domain folder + index + CX inside correct parent |
207
+ | New sub-area with 2+ interacting capabilities | Promote to sub-domain: create folder + index + CX |
208
+ | New sub-area with single capability | Create as feature file (.md) inside current parent |
209
+ | Feature explored and found to have internal complexity | Promote: convert .md to folder (see below) |
210
+
211
+ ### Promotion: Feature → Sub-Domain
212
+
213
+ During drilling, a feature might reveal internal complexity that warrants promotion:
214
+
215
+ 1. Agent discovers the feature has 2+ interacting capabilities
216
+ 2. Agent asks: "This feature has enough internal complexity to be its own sub-domain. Should I promote it?"
217
+ 3. If confirmed:
218
+ - Create `{number}-{slug}/` folder
219
+ - Create index and CX files inside
220
+ - Split content from the old feature file into child feature files
221
+ - Update parent index
222
+ 4. Numbering stays the same — the feature number becomes the sub-domain number
223
+
224
+ ### Exhaustion Check (Leaf-Node Model)
225
+
226
+ Exhaustion is checked at the **leaves** — whatever the deepest items are in each branch:
227
+
228
+ - **Old model**: "All domains at DEEP"
229
+ - **New model**: "All LEAF NODES at DEEP or EXHAUSTED"
230
+
231
+ Status propagation rules:
232
+ - All children `[EXHAUSTED]` → node is `[EXHAUSTED]`
233
+ - All children `[DEEP]`+ → node is `[DEEP]`
234
+ - Any child below `[DEEP]` → node stays at its current status
235
+
236
+ ---
237
+
238
+ ## Role Integration
239
+
240
+ ### Global Persona Definitions
241
+
242
+ Personas are defined ONCE in `meta/personas.md`. This file is the single source of truth.
243
+
244
+ ### Where Persona Info Appears
245
+
246
+ | Location | What's There | Template |
247
+ |----------|-------------|----------|
248
+ | `meta/personas.md` | Full persona definitions (6 fields each) | Single source of truth |
249
+ | Index files → Role Matrix | Grid of children × personas with access icons | `fractal-node-index-template.md` |
250
+ | Feature files → Role Lens | Per-feature access level + specific behavior | `fractal-feature-template.md` |
251
+ | CX files → Role scoping | Which roles are affected by each cross-cut | `fractal-cx-template.md` |
252
+
253
+ ### Anti-Duplication Rule
254
+
255
+ - **NEVER** redefine a persona outside `meta/personas.md`
256
+ - **ALWAYS** reference personas by their short name
257
+ - If a new persona is discovered → add to `meta/personas.md` FIRST, then reference
151
258
 
152
259
  ---
153
260
 
@@ -157,74 +264,45 @@ Before starting, classify what the user has provided and select the right mode.
157
264
 
158
265
  ### Extraction Mode — Rich Input
159
266
 
160
- **Trigger:** User provides substantial existing material (>5KB, detailed docs, chat logs,
161
- design conversations, competitor analysis, previous specs, old ideation.md files).
267
+ **Trigger:** User provides substantial existing material (>5KB, detailed docs, chat logs).
162
268
 
163
- **The job:** Don't lose information. The user has already done deep thinking — your job is
164
- to organize it, validate it, and fill gaps.
269
+ **The job:** Don't lose information. Organize, validate, and fill gaps.
165
270
 
166
271
  **Process:**
167
272
  1. Read/ingest every document provided
168
- 2. **Run Structural Classification** — scan for surface signals (see protocol above). Determine project shape before creating any files.
273
+ 2. **Run Structural Classification** — determine project shape before creating any files
169
274
  3. Identify natural domain boundaries in the content
170
- 4. Create the `ideation/` folder structure using the classified layout one domain file per identified domain, placed in the correct folder (surface-specific or shared)
171
- 5. Seed each domain file with the relevant content from the source
172
- 6. Present the organized inventory: "Here's what I extracted, organized by domain: [list]. Is anything missing?"
173
- 6. Identify gaps — domains or sub-topics not covered by the existing material
174
- 7. For each gap, switch to Interview Mode for that topic
175
- 8. Run Deep Think: "Based on the content you provided, I would also expect to see [X] and [Y]. Are those relevant?"
176
- 9. Validate completeness against the domain map in `ideation-index.md`
177
-
178
- **Anti-patterns:**
179
- - ❌ Summarizing 738KB into 70 lines (lossy compression)
180
- - ❌ Ignoring details because they don't fit the template
181
- - ❌ Re-asking questions the material already answers
182
- - ❌ Writing everything to one file then reorganizing later
183
- - ✅ Preserving depth, writing to domain files as you go, filling gaps
275
+ 4. Create fractal folder structure run the **Node Classification Gate** for each domain
276
+ 5. Seed each domain folder (index + CX + feature files) with content from the source
277
+ 6. Present the organized inventory: "Here's what I extracted, organized by domain"
278
+ 7. Identify gaps — domains/sub-topics not covered
279
+ 8. For each gap, switch to Interview Mode
280
+ 9. Run Deep Think: "Based on your content, I would also expect [X] and [Y]. Are those relevant?"
184
281
 
185
282
  ### Expansion Mode — Thin Input
186
283
 
187
- **Trigger:** User provides brief notes, a rough sketch, a short PRD (<5KB, structured but shallow).
188
-
189
- **The job:** Take what's there and systematically deepen it. Every bullet point in their
190
- input should spawn 3-5 follow-up questions that drive toward implementation depth.
284
+ **Trigger:** Brief notes, rough sketch, short PRD (<5KB, structured but shallow).
191
285
 
192
286
  **Process:**
193
- 1. Read the input and identify domain boundaries
194
- 2. Create domain files for each identified area
195
- 3. For each domain, identify the depth level (surface → detailed → implementation-ready)
196
- 4. Start with the shallowest domains first
197
- 5. For each shallow domain, ask targeted deepening questions
198
- 6. Run Deep Think at each level to identify gaps
199
- 7. Update domain files and index as you go
200
-
201
- **Deepening questions by section type:**
202
- - **Feature mentioned without detail:** "You listed [feature]. Help me understand: What does the user see? What happens when they interact with it? What happens when it fails? What data does it need?"
203
- - **User type without specifics:** "You mentioned [user type]. What's their primary workflow? What frustrates them about existing solutions? What would make them switch?"
204
- - **Constraint without numbers:** "You noted [constraint]. Can we put a number on that? For latency — what's the threshold? For budget — what's the monthly ceiling?"
287
+ 1. Read input and identify domain boundaries
288
+ 2. Create fractal folder structure per Classification Gate
289
+ 3. For each domain, identify the depth level
290
+ 4. Start with shallowest domains, ask targeted deepening questions
291
+ 5. Run Deep Think at each level to identify gaps
292
+ 6. Update domain indexes and feature files as you go
205
293
 
206
294
  ### Interview Mode — No Input / One-Liner
207
295
 
208
- **Trigger:** User has no file input. They describe the idea verbally or provide a
209
- one-liner like "I want to build a repair shop management platform."
210
-
211
- **The job:** Be the relentless interviewer. Extract everything from the user's head through
212
- persistent, deep questioning.
296
+ **Trigger:** No file input. User describes idea verbally.
213
297
 
214
298
  **Process:**
215
299
  1. Start: "In one sentence, what problem does this solve and for whom?"
216
- 2. **Run Structural Classification** — ask the two interview questions (audiences + surfaces) immediately after the opening problem statement. Determine project shape before creating any files.
217
- 3. From the problem statement + classification, identify key nouns these become initial domains
218
- 4. Create domain files for each identified domain, placing them in the correct folder based on the structural classification
219
- 5. Run the Recursive Domain Exhaustion Protocol (below)
220
- 6. Use the decision classification rule to route questions appropriately
221
- 7. Don't stop until the deep think protocol generates zero new hypotheses
222
-
223
- **Interview techniques:**
224
- - **Challenge weak answers:** "You mentioned risk management — what happens when a user hits their position limit? What's the escalation path?"
225
- - **Generate new thinking:** "You've described [A] and [B] — what happens when they interact? If A triggers while B is active, what should the system do?"
226
- - **Make them think about failures:** "What's the worst thing a user could do with [feature]?"
227
- - **Help them decide:** When the user says "I'm not sure," present 2-3 options with trade-offs.
300
+ 2. **Run Structural Classification** — ask the 2-3 interview questions immediately
301
+ 3. From the problem statement, identify key nouns initial domains
302
+ 4. Create fractal folder structure per Classification Gate
303
+ 5. Run the Recursive Domain Exhaustion Protocol
304
+ 6. Use decision classification rule to route questions
305
+ 7. Don't stop until Deep Think generates zero new hypotheses
228
306
 
229
307
  ---
230
308
 
@@ -239,212 +317,139 @@ At **every step** — domain discovery, breadth mapping, vertical drilling — p
239
317
  ask yourself these four questions before moving on:
240
318
 
241
319
  1. **What have I captured so far in this domain/sub-area?**
242
- Quick inventory of what's been discussed.
243
-
244
320
  2. **What would a domain expert expect to see here that hasn't been surfaced?**
245
- Based on the product type, industry, and user personas — what's standard in this
246
- space that we haven't discussed? What would a competitor's feature list include?
247
-
248
321
  3. **What should exist here because of interactions with other domains?**
249
- Based on cross-domain knowledge already captured — does this domain need something
250
- because of how it connects to other domains?
251
-
252
322
  4. **What common failure modes or edge cases are missing?**
253
- Based on production systems in similar industries — what breaks? What do users
254
- complain about? What do post-mortems reveal?
255
323
 
256
324
  ### Presenting Hypotheses
257
325
 
258
- For each hypothesis generated, present it to the user:
259
-
260
326
  > "Based on [reasoning], I think [X] might be relevant here. For example, in similar
261
327
  > systems, [concrete example]. Is this something your product needs?"
262
328
 
263
329
  **Outcomes:**
264
- - **CONFIRMED** → Add to the domain file. Drill into it.
265
- - **REJECTED** → Note the rejection with reason in the domain file's Deep Think table. Move on.
330
+ - **CONFIRMED** → Add to the domain/feature file. Drill into it.
331
+ - **REJECTED** → Note the rejection with reason in the Deep Think table.
266
332
  - **DEFERRED** → Note as an open question with owner and target stage.
267
333
 
268
334
  ### Tracking
269
335
 
270
- Record all hypotheses in each domain file's Deep Think Annotations table:
271
-
272
- ```
273
- | Hypothesis | Source | Outcome |
274
- |-----------|--------|---------|
275
- | "Purgatory queue needed for diagnostics not yet tied to a ticket" | Industry pattern | ✅ CONFIRMED |
276
- | "Customer loyalty program integration" | Competitor analysis | ❌ REJECTED: out of scope |
277
- ```
336
+ Record all hypotheses in each feature file's Deep Think Annotations table (see `fractal-feature-template.md`).
278
337
 
279
338
  ### Exhaustion Signal
280
339
 
281
- **The ideation process is considered complete for a domain when:**
340
+ The ideation process is complete for a feature when:
282
341
  1. Deep Think generates **zero new hypotheses** after a full pass
283
- 2. The user confirms "nothing else" for that domain
284
- 3. Both conditions must be true simultaneously
285
-
286
- This replaces the old "completed N passes" model. Exhaustion is evidence-based,
287
- not count-based.
342
+ 2. The user confirms "nothing else" for that feature
343
+ 3. Both conditions must be true simultaneously → mark as `[EXHAUSTED]`
288
344
 
289
345
  ---
290
346
 
291
347
  ## Recursive Domain Exhaustion Protocol
292
348
 
293
- > **This protocol replaces the old fixed-pass model.** Exploration is recursive:
294
- > breadth is always mapped before depth, and new discoveries at any level can trigger
295
- > re-exploration of higher levels.
296
-
297
349
  ### Level 0 — Global Domain Map
298
350
 
299
351
  **Goal:** Identify ALL domains before exploring ANY of them.
300
352
 
301
- 1. List all domains from the user's input
302
- 2. **Deep Think:** "Based on this product type and industry, what domains would I expect to see that haven't been mentioned?" Present hypotheses to user.
303
- 3. **For multi-product projects:** For each confirmed domain, determine placement — "Does this belong to a specific surface, or is it shared?" Create the domain file in the appropriate folder (`surfaces/{name}/` or `domains/`).
304
- **For single-surface projects:** Create a domain file for each confirmed domain in `domains/` (using the ideation-domain-template).
305
- 4. Update `ideation-index.md` with the complete domain map (paths reflect the actual folder structure)
306
- 5. Note preliminary cross-cuts: "Domain A might touch Domain B because [reason]" → add to ledger as Level 0 entries
307
- 6. **Gate:** User confirms the domain list before proceeding
353
+ 1. List all domains from user input
354
+ 2. **Deep Think:** "What domains would a domain expert expect?"
355
+ 3. Run **Node Classification Gate** for each domain determine placement
356
+ 4. Create fractal folder for each: `{number}-{slug}/` + index + CX
357
+ 5. Update `ideation-index.md` with the complete structure map
358
+ 6. Note preliminary cross-cuts in global CX + relevant domain CX files
359
+ 7. **Gate:** User confirms domain list before proceeding
308
360
 
309
361
  ### Level 1 — Domain Breadth Sweep
310
362
 
311
- **Goal:** For each domain, map ALL sub-areas before drilling into ANY of them.
363
+ **Goal:** For each domain, map ALL children before drilling ANY.
312
364
 
313
365
  For each domain (dependency order — foundational first):
314
- 1. List all sub-areas/capabilities within the domain
315
- 2. **Deep Think:** "Based on this domain in this industry, what sub-areas would an expert expect?" Present hypotheses.
316
- 3. Write the breadth map to the domain file with `[SURFACE]` markers
317
- 4. Note cross-cuts at sub-area level add to ledger as Level 1 entries
318
- 5. **NEW DOMAINS DISCOVERED?** Loop back to Level 0. Do NOT proceed until domain map is stable.
319
- 6. **Gate:** User confirms the breadth maps before proceeding to drilling
320
- 7. Mark domain status as `[BREADTH]` in the index
366
+ 1. List all sub-areas/capabilities
367
+ 2. **Deep Think:** "What sub-areas would an expert expect in this domain?"
368
+ 3. Run **Node Classification Gate** for each — sub-domain (folder) or feature (file)?
369
+ 4. Create children: sub-domain folders or feature files as classified
370
+ 5. Update domain index (Children table + Role Matrix)
371
+ 6. Note cross-cuts in domain CX file
372
+ 7. **NEW DOMAINS DISCOVERED?** Loop to Level 0
373
+ 8. **Gate:** User confirms breadth maps before drilling
374
+ 9. Mark domain status as `[BREADTH]`
321
375
 
322
376
  ### Level 2+ — Vertical Drilling
323
377
 
324
- **Goal:** Drill each sub-area to implementation depth. Deep Think at every step.
325
-
326
- For each sub-area:
327
- 1. Apply the entity/feature/user/integration questions (see Exhaustion Questions below)
328
- 2. **Deep Think** per sub-area: "Based on this feature in this product, what edge cases, interactions, and failure modes would a production system need?"
329
- 3. Write drill results to the domain file
330
- 4. Cross-cuts with evidence → add to ledger as Level 2+ entries with evidence
331
- 5. **NEW SUB-AREAS DISCOVERED?** → Loop back to Level 1 for this domain. Map the new sub-area's breadth before drilling it.
332
- 6. **NEW DOMAINS DISCOVERED?** → Loop back to Level 0. Stabilize the domain map first.
333
- 7. When Deep Think yields zero new hypotheses AND user confirms → mark sub-area as `[EXHAUSTED]`
334
- 8. When all sub-areas are `[DEEP]` or `[EXHAUSTED]` → mark domain as `[DEEP]` or `[EXHAUSTED]`
335
-
336
- ### Status Markers
378
+ **Goal:** Drill each child to implementation depth. Deep Think at every step.
337
379
 
338
- | Marker | Meaning |
339
- |--------|---------|
340
- | `[SURFACE]` | Identified, not yet explored |
341
- | `[BREADTH]` | All sub-areas mapped, none drilled |
342
- | `[DEEP]` | Sub-areas drilled, some may still have open questions |
343
- | `[EXHAUSTED]` | Deep Think yields zero hypotheses, user confirms complete |
380
+ For each feature file / sub-domain:
381
+ 1. Apply the Exhaustion Questions
382
+ 2. **Deep Think** per feature
383
+ 3. Write results to feature files (behavior, edge cases, states, Role Lens)
384
+ 4. Cross-cuts with evidence add to parent's CX file
385
+ 5. **Feature reveals 2+ interacting capabilities?** Run Promotion protocol
386
+ 6. **NEW DOMAINS DISCOVERED?** → Loop to Level 0
387
+ 7. When Deep Think yields zero hypotheses AND user confirms → mark `[EXHAUSTED]`
344
388
 
345
389
  ---
346
390
 
347
391
  ## Exhaustion Questions
348
392
 
349
393
  ### For Every Entity
350
-
351
394
  - What are its attributes/fields?
352
395
  - What are its possible states?
353
- - What transitions between states? What triggers each transition?
396
+ - What triggers each state transition?
354
397
  - What's the full lifecycle (creation → active use → archival/deletion)?
355
398
  - Who can create, read, update, delete it?
356
399
  - What happens when it's referenced by other entities and gets deleted?
357
400
 
358
401
  ### For Every Feature
359
-
360
402
  - What does the user see when they first encounter this feature?
361
403
  - What's the happy path interaction flow (step by step)?
362
404
  - What happens when it fails? What error does the user see?
363
- - What happens on partial failure (e.g., network drops mid-operation)?
405
+ - What happens on partial failure?
364
406
  - What permissions are required? What happens without them?
365
407
  - Does it have different states (loading, empty, populated, error)?
366
408
  - How does it interact with other features?
367
- - What edge cases exist? (concurrent edits, duplicate submissions, boundary values)
409
+ - What edge cases exist?
368
410
 
369
411
  ### For Every User Type
370
-
371
- - What's their primary workflow through the product?
372
- - What's the worst thing they could intentionally do? How is it prevented?
373
- - What's the worst thing they could accidentally do? How is it recovered?
412
+ - What's their primary workflow?
413
+ - What's the worst thing they could intentionally do?
414
+ - What's the worst thing they could accidentally do?
374
415
  - What do they see that other user types don't?
375
416
  - What can they do that other user types can't?
376
- - What's their tolerance for complexity? (progressive disclosure implications)
417
+ - What's their tolerance for complexity?
377
418
 
378
419
  ### For Every Integration / External System
379
-
380
- - What happens when it's unavailable? (retry? fallback? degrade gracefully?)
381
- - What's the expected latency? What if it's 10x slower than expected?
382
- - What data format does it use? How does the product transform it?
383
- - What rate limits exist? How does the product handle hitting them?
420
+ - What happens when it's unavailable?
421
+ - What's the expected latency? What if 10x slower?
422
+ - What data format does it use?
423
+ - What rate limits exist?
384
424
  - What happens when the external system changes its API?
385
425
 
386
426
  ---
387
427
 
388
428
  ## Cross-Cut Watch Protocol
389
429
 
390
- Cross-cut detection is **always-on** regardless of mode or level. During all active
391
- exploration, maintain awareness:
430
+ Cross-cut detection is **always-on** regardless of mode or level. During all active exploration:
392
431
 
393
- - After each sub-feature: "Does this behavior depend on or affect any other domain?"
394
- - After each edge case: "Which other parts of the system need to know about this failure mode?"
395
- - After each state transition: "Does this state change trigger anything in another domain?"
432
+ - After each sub-feature: "Does this depend on or affect any other domain?"
433
+ - After each edge case: "Which other parts need to know about this failure mode?"
434
+ - After each state transition: "Does this trigger anything in another domain?"
396
435
 
397
- When a cross-cut is identified, immediately log it to `cross-cuts/cross-cut-ledger.md`
398
- at the appropriate level:
436
+ When a cross-cut is identified, log it to the appropriate CX file:
399
437
 
400
- - **Level 0** (during domain map): surface guesses, low confidence
401
- - **Level 1** (during breadth sweep): sub-domain connections, medium confidence
402
- - **Level 2+** (during drilling): evidence-backed, high confidence
438
+ | Discovery Level | Where to Log | Confidence |
439
+ |----------------|-------------|------------|
440
+ | During domain mapping | Parent node's CX file + global `ideation-cx.md` (if cross-surface) | Low |
441
+ | During breadth sweep | Domain CX file | Medium |
442
+ | During drilling | Sub-domain CX file or feature's cross-cut notes | High |
403
443
 
404
444
  ### Cross-Cut Synthesis Questions
405
445
 
406
- For each confirmed cross-cut pair, ask all five questions:
407
-
408
- 1. **Shared state conflict**: If both features write to the same entity, who wins? Merge/override strategy? Canonical owner?
409
- 2. **Trigger chain**: Does A automatically trigger B? Rollback semantics if B fails? Sync or async?
410
- 3. **Permission intersection**: Does permission in Domain A affect what's possible in Domain B?
411
- 4. **Notification fan-out**: Does an event in A need to notify actors in B? Who owns the notification contract?
412
- 5. **State transition conflict**: Can A and B be triggered simultaneously? Data consistency if they race?
446
+ For each confirmed cross-cut (CX entry with High confidence), answer all five synthesis questions per the `fractal-cx-template.md`:
413
447
 
414
- Record synthesis outcomes in the cross-cut ledger. Never clear entriesthe ledger is the audit trail.
415
-
416
- ---
417
-
418
- ## Domain Coverage Map
419
-
420
- Throughout the conversation, maintain and periodically share a coverage map. The format
421
- uses level-based status with sub-area counts:
422
-
423
- ```
424
- Domain Coverage Map — [Project Name]
425
- ═══════════════════════════════════════
426
-
427
- Domain 01: Consumer Platform [DEEP]
428
- ├── Intake Flow [EXHAUSTED] — 12 sub-topics, 4 hypotheses confirmed
429
- ├── Customer Portal [DEEP] — 8 sub-topics, 2 hypotheses confirmed
430
- └── Payments [BREADTH] — 5 sub-areas mapped, not yet drilled
431
-
432
- Domain 02: Shop Software [BREADTH]
433
- ├── Counter Mode [DEEP] — 8 sub-topics, 3 hypotheses confirmed
434
- ├── Tech Mode [SURFACE] — 2 sub-topics noted
435
- ├── Inventory [EXHAUSTED] — 15 sub-topics, 0 new hypotheses
436
- └── Multi-Location [SURFACE] — 1 sub-topic noted
437
-
438
- Overall: 7 domains | 2 EXHAUSTED, 3 DEEP, 1 BREADTH, 1 SURFACE
439
- Deep Think: 23 hypotheses presented, 18 confirmed, 5 rejected
440
- Cross-cuts: 12 confirmed, 4 pending, 3 rejected
441
- ```
442
-
443
- **Rules:**
444
- - Share the map after every domain or every 3-4 drilling sequences
445
- - Use it to guide: "Domain 02 has 2 sub-areas still at SURFACE. Should we drill those?"
446
- - Write the coverage map to `ideation-index.md` after each update
447
- - Don't compile the vision summary until all domains are at least `[DEEP]`
448
+ 1. **Shared state conflict**Who owns the entity? Merge strategy?
449
+ 2. **Trigger chain** — Does A trigger B? Rollback if B fails? Sync/async?
450
+ 3. **Permission intersection** — Does permission in A affect B?
451
+ 4. **Notification fan-out** — Does an event in A notify actors in B?
452
+ 5. **State transition conflict** — Can A and B race? Consistency impact?
448
453
 
449
454
  ---
450
455
 
@@ -456,44 +461,30 @@ Cross-cuts: 12 confirmed, 4 pending, 3 rejected
456
461
  | **Architecture** | Note for `/create-prd`. Don't burden the user. | "Should we use SQL or NoSQL?" |
457
462
  | **Implementation** | Note for later. Don't even mention it. | "How should we name the routes?" |
458
463
 
459
- **Exception:** If the user brings up architecture or implementation, engage with it.
460
- Don't refuse to discuss it — just don't initiate it.
464
+ **Exception:** If the user brings up architecture or implementation, engage. Don't refuse — just don't initiate it.
461
465
 
462
466
  ---
463
467
 
464
468
  ## Breadth Before Depth
465
469
 
466
470
  ### No Premature Drilling
467
-
468
- Complete the breadth map of all sub-areas within a domain **before drilling any
469
- single sub-area**. This ensures no sub-area is missed because you went deep too early.
471
+ Complete the breadth map of all children within a node **before drilling any single child**.
470
472
 
471
473
  ### No Premature Compilation
472
-
473
474
  Don't start writing the vision summary until:
474
- - All domains are at least `[DEEP]`
475
- - Every Must Have feature explored to ≥Level 2 (sub-features and failure modes)
475
+ - All leaf nodes are at least `[DEEP]`
476
+ - Every Must Have feature explored to ≥Level 2
476
477
  - Deep Think yields zero new hypotheses across ALL domains
477
- - User has confirmed the domain coverage map
478
+ - User has confirmed the coverage map
478
479
 
479
480
  ### Challenge Weak Answers
480
-
481
- When the user gives a one-sentence answer to a complex question, don't accept it. Probe:
482
-
483
- - **Weak:** "Yeah, we need notifications."
484
- - **Probe:** "What kinds of notifications? Just in-app, or also email and push? What events trigger them? Can users configure which ones they receive? What happens with notification overload?"
481
+ When the user gives a one-sentence answer to a complex question, don't accept it. Probe.
485
482
 
486
483
  ### Summarize and Validate
487
-
488
- After every 5-6 questions, pause and summarize:
489
- - "Here's what I've captured about [topic] so far: [summary]. Does this cover everything?"
490
- - This prevents drift, catches misunderstandings, and creates natural checkpoints.
484
+ After every 5-6 questions, pause and summarize to prevent drift.
491
485
 
492
486
  ### Progress Transparency
493
-
494
- Be transparent about where you are:
495
- - "We've explored [N] of [M] domains to DEEP level. [Domain X] is still at BREADTH."
496
- - "Deep Think is still generating hypotheses for this domain — we're not done yet."
487
+ Be transparent: "We've explored [N] of [M] domains to DEEP level. [Domain X] is still at BREADTH."
497
488
 
498
489
  ---
499
490
 
@@ -501,7 +492,7 @@ Be transparent about where you are:
501
492
 
502
493
  - **Does not make product decisions** — It extracts them from the user
503
494
  - **Does not explore architecture** — That's `/create-prd`'s job
504
- - **Does not replace brainstorming** — Brainstorming is a lightweight modifier for quick decisions; this is a heavyweight extraction engine
505
- - **Does not produce the vision document** — The ideate-validate workflow compiles the summary; this skill drives the conversation that fills the domain files
495
+ - **Does not replace brainstorming** — Brainstorming is lightweight; this is heavyweight extraction
496
+ - **Does not produce the vision document** — `ideate-validate` compiles the summary
506
497
  - **Does not rush** — The entire downstream pipeline depends on the depth produced here
507
- - **Does not write to a monolithic file** — Each domain gets its own file from the moment it's discovered
498
+ - **Does not prescribe shard boundaries** — That's `/decompose-architecture`'s job