cfsa-antigravity 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +14 -0
  2. package/package.json +1 -1
  3. package/template/.agent/instructions/commands.md +8 -32
  4. package/template/.agent/instructions/example.md +21 -0
  5. package/template/.agent/instructions/patterns.md +3 -3
  6. package/template/.agent/instructions/tech-stack.md +71 -23
  7. package/template/.agent/instructions/workflow.md +12 -1
  8. package/template/.agent/rules/completion-checklist.md +6 -0
  9. package/template/.agent/rules/security-first.md +3 -3
  10. package/template/.agent/rules/vertical-slices.md +1 -1
  11. package/template/.agent/skill-library/MANIFEST.md +6 -0
  12. package/template/.agent/skill-library/stack/devops/git-advanced/SKILL.md +972 -0
  13. package/template/.agent/skill-library/stack/devops/git-workflow/SKILL.md +420 -0
  14. package/template/.agent/skills/api-versioning/SKILL.md +44 -298
  15. package/template/.agent/skills/api-versioning/references/typescript.md +157 -0
  16. package/template/.agent/skills/architecture-mapping/SKILL.md +13 -13
  17. package/template/.agent/skills/bootstrap-agents/SKILL.md +151 -152
  18. package/template/.agent/skills/clean-code/SKILL.md +64 -118
  19. package/template/.agent/skills/clean-code/references/typescript.md +126 -0
  20. package/template/.agent/skills/database-schema-design/SKILL.md +93 -317
  21. package/template/.agent/skills/database-schema-design/references/relational.md +228 -0
  22. package/template/.agent/skills/error-handling-patterns/SKILL.md +62 -557
  23. package/template/.agent/skills/error-handling-patterns/references/go.md +162 -0
  24. package/template/.agent/skills/error-handling-patterns/references/python.md +262 -0
  25. package/template/.agent/skills/error-handling-patterns/references/rust.md +112 -0
  26. package/template/.agent/skills/error-handling-patterns/references/typescript.md +178 -0
  27. package/template/.agent/skills/idea-extraction/SKILL.md +322 -224
  28. package/template/.agent/skills/logging-best-practices/SKILL.md +108 -767
  29. package/template/.agent/skills/logging-best-practices/references/go.md +49 -0
  30. package/template/.agent/skills/logging-best-practices/references/python.md +52 -0
  31. package/template/.agent/skills/logging-best-practices/references/typescript.md +215 -0
  32. package/template/.agent/skills/migration-management/SKILL.md +127 -311
  33. package/template/.agent/skills/migration-management/references/relational.md +214 -0
  34. package/template/.agent/skills/parallel-feature-development/SKILL.md +34 -43
  35. package/template/.agent/skills/pipeline-rubrics/references/be-rubric.md +1 -1
  36. package/template/.agent/skills/pipeline-rubrics/references/ia-rubric.md +2 -2
  37. package/template/.agent/skills/pipeline-rubrics/references/scoring.md +1 -1
  38. package/template/.agent/skills/pipeline-rubrics/references/vision-rubric.md +2 -1
  39. package/template/.agent/skills/prd-templates/SKILL.md +23 -6
  40. package/template/.agent/skills/prd-templates/references/be-spec-template.md +2 -2
  41. package/template/.agent/skills/prd-templates/references/decomposition-templates.md +2 -2
  42. package/template/.agent/skills/prd-templates/references/engineering-standards-template.md +2 -0
  43. package/template/.agent/skills/prd-templates/references/fe-spec-template.md +1 -1
  44. package/template/.agent/skills/prd-templates/references/fractal-cx-template.md +58 -0
  45. package/template/.agent/skills/prd-templates/references/fractal-feature-template.md +93 -0
  46. package/template/.agent/skills/prd-templates/references/fractal-node-index-template.md +55 -0
  47. package/template/.agent/skills/prd-templates/references/ideation-crosscut-template.md +26 -47
  48. package/template/.agent/skills/prd-templates/references/ideation-index-template.md +47 -31
  49. package/template/.agent/skills/prd-templates/references/operational-templates.md +1 -1
  50. package/template/.agent/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -21
  51. package/template/.agent/skills/prd-templates/references/skill-loading-protocol.md +32 -0
  52. package/template/.agent/skills/prd-templates/references/slice-completion-gates.md +29 -0
  53. package/template/.agent/skills/prd-templates/references/spec-coverage-sweep.md +3 -3
  54. package/template/.agent/skills/prd-templates/references/tdd-testing-policy.md +39 -0
  55. package/template/.agent/skills/prd-templates/references/vision-template.md +8 -8
  56. package/template/.agent/skills/regex-patterns/SKILL.md +122 -540
  57. package/template/.agent/skills/regex-patterns/references/go.md +44 -0
  58. package/template/.agent/skills/regex-patterns/references/javascript.md +63 -0
  59. package/template/.agent/skills/regex-patterns/references/python.md +77 -0
  60. package/template/.agent/skills/regex-patterns/references/rust.md +43 -0
  61. package/template/.agent/skills/resolve-ambiguity/SKILL.md +1 -1
  62. package/template/.agent/skills/session-continuity/SKILL.md +11 -9
  63. package/template/.agent/skills/session-continuity/protocols/02-progress-generation.md +2 -2
  64. package/template/.agent/skills/session-continuity/protocols/04-pattern-extraction.md +1 -1
  65. package/template/.agent/skills/session-continuity/protocols/05-session-close.md +1 -1
  66. package/template/.agent/skills/session-continuity/protocols/09-parallel-claim.md +1 -1
  67. package/template/.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md +57 -78
  68. package/template/.agent/skills/session-continuity/protocols/11-parallel-synthesis.md +1 -1
  69. package/template/.agent/skills/spec-writing/SKILL.md +1 -1
  70. package/template/.agent/skills/tdd-workflow/SKILL.md +94 -317
  71. package/template/.agent/skills/tdd-workflow/references/typescript.md +231 -0
  72. package/template/.agent/skills/testing-strategist/SKILL.md +74 -687
  73. package/template/.agent/skills/testing-strategist/references/typescript.md +328 -0
  74. package/template/.agent/skills/workflow-automation/SKILL.md +62 -154
  75. package/template/.agent/skills/workflow-automation/references/inngest.md +88 -0
  76. package/template/.agent/skills/workflow-automation/references/temporal.md +64 -0
  77. package/template/.agent/workflows/bootstrap-agents-fill.md +85 -143
  78. package/template/.agent/workflows/bootstrap-agents-provision.md +90 -107
  79. package/template/.agent/workflows/create-prd-architecture.md +23 -16
  80. package/template/.agent/workflows/create-prd-compile.md +11 -12
  81. package/template/.agent/workflows/create-prd-design-system.md +1 -1
  82. package/template/.agent/workflows/create-prd-security.md +9 -11
  83. package/template/.agent/workflows/create-prd-stack.md +10 -4
  84. package/template/.agent/workflows/create-prd.md +9 -9
  85. package/template/.agent/workflows/decompose-architecture-structure.md +4 -6
  86. package/template/.agent/workflows/decompose-architecture-validate.md +18 -1
  87. package/template/.agent/workflows/decompose-architecture.md +18 -3
  88. package/template/.agent/workflows/evolve-contract.md +11 -11
  89. package/template/.agent/workflows/evolve-feature-classify.md +14 -6
  90. package/template/.agent/workflows/ideate-discover.md +72 -107
  91. package/template/.agent/workflows/ideate-extract.md +84 -63
  92. package/template/.agent/workflows/ideate-validate.md +26 -22
  93. package/template/.agent/workflows/ideate.md +9 -9
  94. package/template/.agent/workflows/implement-slice-setup.md +25 -23
  95. package/template/.agent/workflows/implement-slice-tdd.md +73 -89
  96. package/template/.agent/workflows/implement-slice.md +4 -4
  97. package/template/.agent/workflows/plan-phase-preflight.md +6 -2
  98. package/template/.agent/workflows/plan-phase-write.md +6 -8
  99. package/template/.agent/workflows/remediate-pipeline-assess.md +2 -1
  100. package/template/.agent/workflows/resolve-ambiguity.md +2 -2
  101. package/template/.agent/workflows/update-architecture-map.md +22 -5
  102. package/template/.agent/workflows/validate-phase-quality.md +155 -0
  103. package/template/.agent/workflows/validate-phase-readiness.md +167 -0
  104. package/template/.agent/workflows/validate-phase.md +19 -157
  105. package/template/.agent/workflows/verify-infrastructure.md +10 -10
  106. package/template/.agent/workflows/write-architecture-spec-design.md +23 -14
  107. package/template/.agent/workflows/write-be-spec-classify.md +25 -21
  108. package/template/.agent/workflows/write-be-spec.md +1 -1
  109. package/template/.agent/workflows/write-fe-spec-classify.md +6 -12
  110. package/template/.agent/workflows/write-fe-spec-write.md +1 -1
  111. package/template/AGENTS.md +6 -2
  112. package/template/GEMINI.md +5 -3
  113. package/template/docs/README.md +10 -10
  114. package/template/docs/kit-architecture.md +126 -33
  115. package/template/docs/plans/ideation/README.md +8 -3
  116. package/template/.agent/skills/prd-templates/references/ideation-domain-template.md +0 -55
@@ -17,7 +17,7 @@ pipeline:
17
17
 
18
18
  # Ideate — Extract
19
19
 
20
- Classify the user's input, create the `ideation/` folder structure, and load skills.
20
+ Classify the user's input, create the fractal `ideation/` folder structure, and load skills.
21
21
 
22
22
  **Prerequisite**: If invoked standalone (not from `/ideate`), verify the user has provided input — either an `@file` reference or a verbal description. If no input is provided, prompt: "What would you like to build? Describe your idea, or provide a file with `/ideate-extract @path/to/file.md`."
23
23
 
@@ -25,8 +25,7 @@ Classify the user's input, create the `ideation/` folder structure, and load ski
25
25
 
26
26
  ## 1. Input assessment
27
27
 
28
- Classify what the user has provided. This determines which mode the `idea-extraction` skill
29
- uses and how the rest of the workflow behaves.
28
+ Classify what the user has provided. This determines which mode the `idea-extraction` skill uses.
30
29
 
31
30
  | Input Type | Detection | Extraction Mode |
32
31
  |---|---|---|
@@ -38,111 +37,133 @@ uses and how the rest of the workflow behaves.
38
37
 
39
38
  **For rich inputs (Extraction mode):**
40
39
  1. Read/ingest all provided documents
41
- 2. **Proportionality check**: If the source document is over 50KB, the total ideation output (all domain files combined) must be at least 30% of the source document's line count. If it falls short, identify what was lost and recover it.
40
+ 2. **Proportionality check**: If source >50KB, total ideation output must be 30% of source line count
42
41
  3. Identify natural domain boundaries in the content
43
- 4. Present the organized inventory to the user for confirmation: "Here's what I found, organized by domain. Is anything missing or wrong?"
44
- 5. Identify gaps — domains or sub-topics not covered
45
- 6. For each gap, note it for Interview Mode treatment in `/ideate-discover`
46
- 7. Use idea-extraction skill to refine and deepen, not to re-derive what's already known
42
+ 4. Present organized inventory for user confirmation
43
+ 5. Identify gaps — note for Interview Mode in `/ideate-discover`
44
+ 6. Use idea-extraction skill to refine, not re-derive
47
45
 
48
46
  **For thin inputs (Expansion mode):**
49
- 1. Read the input and identify domain boundaries
50
- 2. For each domain area, identify depth level (surface → detailed → implementation-ready)
47
+ 1. Read input and identify domain boundaries
48
+ 2. Identify depth level per domain (surface → detailed → implementation-ready)
51
49
  3. Note shallowest domains for priority treatment in `/ideate-discover`
52
- 4. Use idea-extraction skill to deepen each one
53
50
 
54
51
  **For verbal / no input (Interview mode):**
55
52
  1. Read `.agent/skills/idea-extraction/SKILL.md` and enter Interview mode
56
53
  2. Start with: "In one sentence, what problem does this solve and for whom?"
57
- 3. From that sentence, identify the key nouns — these become initial domains
58
- 4. Proceed to folder seeding (Step 1.5) then domain exploration in `/ideate-discover`
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)
57
+
58
+ ## 1.3. Structural Classification
59
+
60
+ Read the **Structural Classification Protocol** in `.agent/skills/idea-extraction/SKILL.md`.
61
+
62
+ This step determines the folder layout. It MUST run **before** any domain folders are created (Step 1.5).
63
+
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
72
+
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
79
+
80
+ **Record the classification** in `ideation-index.md` under `## Structural Classification` per the super-index template.
81
+
82
+ Four shapes: `single-surface`, `multi-surface-shared`, `multi-product-hub`, `multi-product-peer`.
59
83
 
60
84
  ## 1.4. Re-run check
61
85
 
62
86
  Before seeding, check whether `docs/plans/ideation/ideation-index.md` already exists.
63
87
 
64
- - If it **exists**: Present a summary of its current state (expansion mode, domain count, depth markers, cross-cut count). Ask: "An ideation folder already exists. Do you want to **continue from it** or **start fresh**?"
65
- - **Continue** → skip seeding, jump directly to Step 1.6.
66
- - **Start fresh** → archive existing folder to `docs/plans/ideation-archive-[timestamp]/`, then proceed with seeding.
88
+ - If it **exists**: Present summary (expansion mode, domain count, depth markers). Ask: "An ideation folder already exists. **Continue** or **start fresh**?"
89
+ - **Continue** → skip seeding, jump to Step 1.6
90
+ - **Start fresh** → archive to `docs/plans/ideation-archive-[timestamp]/`, then seed
67
91
  - If it **does not exist**: proceed with seeding.
68
92
 
69
- ## 1.5. Seed `ideation/` folder
93
+ ## 1.5. Seed fractal `ideation/` folder
70
94
 
71
- Read `.agent/skills/prd-templates/references/ideation-index-template.md` and the other ideation templates.
95
+ Read these templates:
96
+ - `.agent/skills/prd-templates/references/ideation-index-template.md` (super-index)
97
+ - `.agent/skills/prd-templates/references/ideation-crosscut-template.md` (global CX)
98
+ - `.agent/skills/prd-templates/references/fractal-node-index-template.md` (node index)
99
+ - `.agent/skills/prd-templates/references/fractal-cx-template.md` (node CX)
100
+ - `.agent/skills/prd-templates/references/fractal-feature-template.md` (feature file)
72
101
 
73
102
  Read `.agent/skills/technical-writer/SKILL.md` and follow its methodology.
74
103
 
75
- Create the `docs/plans/ideation/` folder structure:
104
+ **Create the base structure** (all project shapes):
76
105
 
77
106
  ```
78
107
  docs/plans/ideation/
79
- ├── ideation-index.md
80
- ├── meta/
81
- │ ├── problem-statement.md
82
- ├── personas.md
83
- ├── competitive-landscape.md
84
- │ └── constraints.md
85
- ├── domains/
86
- │ └── (domain files created per identified domain)
87
- └── cross-cuts/
88
- └── cross-cut-ledger.md
108
+ ├── ideation-index.md ← super-index (from ideation-index-template)
109
+ ├── ideation-cx.md ← global cross-cuts (from ideation-crosscut-template)
110
+ └── meta/
111
+ ├── problem-statement.md
112
+ ├── personas.md
113
+ ├── competitive-landscape.md
114
+ └── constraints.md
89
115
  ```
90
116
 
91
- **Seeding behavior by input type:**
117
+ **For multi-product projects**, additionally create `surfaces/` with sub-folders per surface.
92
118
 
93
- - **Rich document**: Parse by domain create one domain file per identified domain → seed each with relevant content from source. Preserve all detail. Add reference at top of index: `> Source: path/to/original.md`. Do not modify the original. Run the **Source → Domain Files fidelity check**: every major section of the source maps to a domain file — nothing dropped during parsing.
94
- - **Chat transcript**: Run the noise filter (read full transcript, extract decisions/ideas/rejections, discard filler, present extracted signal to user for confirmation), then create domain files with the clean structured signal. Attribute decisions: `> Decided in conversation: [decision]`.
95
- - **Thin document**: Create domain files annotated with `[SURFACE]`, `[PARTIAL]`, or `[DEEP]` depth markers per sub-area.
96
- - **Verbal / one-liner**: Create domain files with scaffolding based on the initial description. Sub-areas are `[SURFACE]` placeholders.
119
+ **Seed domains using the Node Classification Gate** (from `idea-extraction/SKILL.md`):
97
120
 
98
- Populate `ideation-index.md` with the domain map and document map linking to all created files.
121
+ For each domain identified in Step 1:
122
+ 1. Run the Classification Gate — determine placement:
123
+ - Single-surface → create `docs/plans/ideation/{NN}-{slug}/`
124
+ - Hub-and-spoke → surface-exclusive in `surfaces/{surface}/{NN}-{slug}/`, shared in hub surface
125
+ - Peer → surface-exclusive in `surfaces/{surface}/{NN}-{slug}/`, shared in `shared/{NN}-{slug}/`
126
+ 2. Create the domain folder with: `{slug}-index.md` + `{slug}-cx.md`
127
+ 3. For rich document inputs, parse sub-areas into feature files within each domain folder
128
+ 4. Update `ideation-index.md` structure map with paths
129
+
130
+ **Seeding behavior by input type:**
131
+
132
+ - **Rich document**: Parse by domain → create fractal folders + feature files → seed with content. Run fidelity check: every major source section maps to a domain folder. Add `> Source: path/to/original.md` to index.
133
+ - **Chat transcript**: Noise filter → extract signal → seed domain folders with structured output.
134
+ - **Thin document**: Create domain folders with depth markers on feature files.
135
+ - **Verbal / one-liner**: Create domain folders with scaffolding. Feature files are `[SURFACE]`.
99
136
 
100
137
  ## 1.6. User Intent Check (ALL input types)
101
138
 
102
139
  Read `.agent/skills/brainstorming/SKILL.md` and follow its methodology.
103
140
 
104
- After seeding, present a summary of what was captured and ask how the user wants to proceed. Framing adapts to input type:
105
-
106
- - **Rich document**: "I've organized your document into the ideation folder. Here's the domain map: [domain list with depth indicators]. How would you like to proceed?"
107
- - **Chat transcript**: "I've extracted the signal from your conversation — [N] decisions, [N] feature ideas, [N] rejected directions. Here's the domain map: [list]. How would you like to proceed?"
108
- - **Thin document**: "I've seeded the ideation folder with [N] domains. I found [N] sub-areas at surface depth, [N] at partial depth, [N] implementation-ready. How would you like to proceed?"
109
- - **Verbal / one-liner**: "I've scaffolded [N] initial domains based on your description. How would you like to approach this?"
141
+ After seeding, present a summary and ask how the user wants to proceed. Present all options:
110
142
 
111
- Present all options for every input type:
112
- 1. **Full exploration** *(recommended for 3+ domains)* Recursive breadth-before-depth with Deep Think protocol domain map → breadth sweep → vertical drilling, with cross-cut detection and hypothesis generation active throughout
113
- 2. **Process as-is** — Proceed with what's captured; fill gaps via interview as they arise
143
+ 1. **Full exploration** *(recommended for 3+ domains)* — Recursive breadth-before-depth with Deep Think
144
+ 2. **Process as-is** — Proceed with what's captured; fill gaps as they arise
114
145
  3. **Expand vertically** — Drill deeper into existing features
115
146
  4. **Expand horizontally** — Add new feature domains not yet covered
116
- 5. **Explore cross-cutting concerns** — Map how existing features interact and conflict
117
- 6. **Combination** — User specifies which dimensions and order
118
- 7. **Audit ambiguity first** — Run inline check on ideation folder before deciding
147
+ 5. **Explore cross-cutting concerns** — Map how existing features interact
148
+ 6. **Combination** — User specifies dimensions and order
149
+ 7. **Audit ambiguity first** — Run inline check before deciding
119
150
 
120
- Recommendation logic: suggest Full if 3+ domains, vertical if 1-2 domains, Full if no domains (verbal). Always present all options. **Wait for user answer — do not assume.**
121
-
122
- > **Note**: Cross-cut detection is always-on regardless of mode. Even if the user picks vertical-only, maintain the cross-cut ledger and surface it at the end.
151
+ **Wait for user answer — do not assume.**
123
152
 
124
153
  ## 1.7. Expansion Mode Routing
125
154
 
126
- Based on the user's choice, write the expansion mode to `ideation-index.md`:
127
-
128
- ```
129
- ## Expansion Mode
130
- - Type: [full | vertical | horizontal | cross-cutting | combination | as-is]
131
- - Targets: [list of domains/features to focus on, if applicable]
132
- - Cross-cut Detection: always-on
133
- - Deep Think Protocol: active
134
- ```
155
+ Write the expansion mode to `ideation-index.md` per the super-index template.
135
156
 
136
157
  This flag is read by `ideate-discover.md` to shape exploration behavior.
137
158
 
138
159
  ## 2. Load skills
139
160
 
140
- Read `.agent/skills/idea-extraction/SKILL.md` and follow its methodology throughout this workflow.
161
+ Read `.agent/skills/idea-extraction/SKILL.md` and follow its methodology throughout.
141
162
 
142
- Also read `.agent/skills/resolve-ambiguity/SKILL.md` — use it reactively when encountering ambiguity that can be resolved without user input (technical/factual questions). For intent/choice questions, use the decision classification rule.
163
+ Also read `.agent/skills/resolve-ambiguity/SKILL.md` — use reactively when encountering ambiguity that can be resolved without user input.
143
164
 
144
165
  ### Propose next step
145
166
 
146
- Once input is classified, folder is seeded, and skills are loaded, proceed to `/ideate-discover` to explore domains using the recursive breadth-before-depth model.
167
+ Proceed to `/ideate-discover` to explore domains using the recursive breadth-before-depth model with the fractal structure.
147
168
 
148
- > If this shard was invoked standalone (not from `/ideate`), surface this via `notify_user`. If invoked by the parent `/ideate`, this is a natural handoff — the parent orchestrates the transition.
169
+ > If invoked standalone, surface this via `notify_user`. If invoked by parent `/ideate`, this is a natural handoff.
@@ -19,7 +19,7 @@ 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 domains 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, prompt the user to run `/ideate-discover` first.
23
23
 
24
24
  ---
25
25
 
@@ -36,11 +36,11 @@ Explore constraints with the user. Write to `docs/plans/ideation/meta/constraint
36
36
  3. **Team** — Solo dev? Small team? Skill gaps?
37
37
  4. **Compliance** — GDPR, PCI, COPPA, HIPAA, SOC 2? Age restrictions?
38
38
  5. **Performance** — Expected scale (users, requests, data)? Latency requirements?
39
- 6. **Surface classification** — What platforms will this run on? (web, mobile, desktop, CLI, API)
39
+ 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
40
 
41
41
  **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)?"
42
42
 
43
- Write the surface classification to `meta/constraints.md` downstream workflows use this to determine which decision axes apply.
43
+ Write constraints to `meta/constraints.md`. If the surface classification changed, update `ideation-index.md` `## Structural Classification` section.
44
44
 
45
45
  ### Success metrics
46
46
 
@@ -64,37 +64,41 @@ If not already explored in `/ideate-discover` Step 4, explore competitive landsc
64
64
 
65
65
  This is the final validation gate before compilation.
66
66
 
67
- ### Read the full domain map
67
+ ### Read the fractal tree
68
68
 
69
- Read `docs/plans/ideation/ideation-index.md` and review:
70
- - Every domain's status marker
71
- - Every domain file's sub-area status markers
72
- - The cross-cut ledger's pending items
69
+ Read `docs/plans/ideation/ideation-index.md` and recursively review:
70
+ - Every node's status marker (surface → domain → sub-domain → feature)
71
+ - All leaf feature files' status markers
72
+ - All CX files at every level for pending entries
73
73
 
74
74
  ### Exhaustion criteria
75
75
 
76
76
  | Check | Criteria | Action if Fail |
77
77
  |-------|----------|----------------|
78
- | All domains ≥ `[DEEP]` | Every domain in index is `[DEEP]` or `[EXHAUSTED]` | Drill remaining domains |
79
- | All Must Have features ≥ Level 2 | Every Must Have has sub-features AND edge cases explored | Deep Think + drill |
80
- | Deep Think zero hypotheses | Final Deep Think pass across ALL domains yields no new hypotheses | Present any new hypotheses, drill if confirmed |
81
- | Cross-cut ledger clean | No `pending` entries remain all are `confirmed` or `rejected` | Run synthesis questions on pending pairs |
78
+ | All leaf nodes ≥ `[DEEP]` | Every feature file in the tree is `[DEEP]` or `[EXHAUSTED]` | Drill remaining feature files |
79
+ | Status propagation correct | Parent nodes reflect their children's status | Update parent indexes |
80
+ | All Must Have features ≥ Level 2 | Every Must Have has sub-features AND edge cases AND Role Lens | Deep Think + drill |
81
+ | Deep Think zero hypotheses | Final Deep Think pass across ALL leaf nodes yields no new hypotheses | Present any new hypotheses, drill if confirmed |
82
+ | All CX files clean | No Medium/Low confidence entries remain at any level — all are High or rejected | Run synthesis questions on pending pairs |
83
+ | Role Lens complete | Every feature file has a populated Role Lens table | Fill missing Role Lens entries |
82
84
  | User confirmation | User explicitly confirms "nothing else" for each domain | Ask for each under-explored domain |
83
85
 
84
86
  ### Execute exhaustion check
85
87
 
86
- 1. Scan index for domains below `[DEEP]`. If any:
87
- - "Domain [X] is still at [status]. Should we drill deeper, or is it intentionally minimal?"
88
- - If user says "drill" → return to `/ideate-discover` for those domains
89
- - If user says "intentionally minimal" → note in domain file and proceed
88
+ 1. Walk the fractal tree. For each leaf node below `[DEEP]`:
89
+ - "Feature [X] in [domain] is still at [status]. Drill deeper or intentionally minimal?"
90
+ - If "drill" → return to `/ideate-discover`
91
+ - If "intentionally minimal" → note in feature file and proceed
90
92
 
91
- 2. Run **final Deep Think pass**: For each `[DEEP]` (not `[EXHAUSTED]`) domain, apply the four Deep Think questions one more time. Present any new hypotheses.
92
- - If new hypotheses are confirmed → drill them, update domain files
93
- - If zero hypotheses generated → mark domain as `[EXHAUSTED]`
93
+ 2. Run **final Deep Think pass**: For each `[DEEP]` leaf node, apply the four Deep Think questions. Present any new hypotheses.
94
+ - If confirmed → drill, update feature files
95
+ - If zero hypotheses → mark `[EXHAUSTED]`, propagate status upward
94
96
 
95
- 3. Check cross-cut ledger for `pending` entries. Resolve each.
97
+ 3. Walk ALL CX files at every level. Resolve any Medium/Low confidence entries.
96
98
 
97
- 4. Update `ideation-index.md` progress summary with final counts.
99
+ 4. Verify all feature files have populated Role Lens tables.
100
+
101
+ 5. Update `ideation-index.md` progress summary with final counts (total leaf nodes, exhausted count, CX entries confirmed).
98
102
 
99
103
  ---
100
104
 
@@ -162,7 +166,7 @@ Read `.agent/skills/pipeline-rubrics/references/ideation-rubric.md` before apply
162
166
  | 9 | **Domain Coverage** | Are all domains at `[DEEP]` or `[EXHAUSTED]`? |
163
167
  | 10 | **Deep Think Coverage** | Were hypotheses tracked? Are all resolved (confirmed/rejected)? |
164
168
  | 11 | **Cross-Cut Completeness** | Is the ledger clean? No pending entries? |
165
- | 12 | **Folder Structure Compliance** | Does the folder match the template structure? |
169
+ | 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? |
166
170
 
167
171
  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.
168
172
 
@@ -4,8 +4,8 @@ pipeline:
4
4
  position: 1
5
5
  stage: vision
6
6
  predecessors: [] # entry point
7
- successors: [create-prd]
8
- skills: [brainstorming, idea-extraction, pipeline-rubrics, prd-templates, resolve-ambiguity, technical-writer]
7
+ successors: [audit-ambiguity, create-prd] # audit-ambiguity recommended before create-prd
8
+ skills: [brainstorming, idea-extraction, pipeline-rubrics, prd-templates, prompt-engineer, resolve-ambiguity, technical-writer]
9
9
  calls-bootstrap: false
10
10
  shards: [ideate-extract, ideate-discover, ideate-validate]
11
11
  ---
@@ -29,7 +29,7 @@ shards: [ideate-extract, ideate-discover, ideate-validate]
29
29
  | One-liner / verbal | User describes idea in chat, no files | Interview (deep) — builds vision from scratch domain by domain |
30
30
  | Full exploration | Any input with 3+ domains | Full — Recursive breadth-before-depth with Deep Think protocol, cross-cut detection active throughout |
31
31
 
32
- **Quality guarantee**: All input types produce the **same output quality**. The ideation output that emerges from a one-liner is structurally and substantively identical to one produced from a rich document. Only the amount of interview work differs.
32
+ **Quality guarantee**: All input types produce the **same output quality** using the same fractal structure. The ideation output from a one-liner is structurally identical to one from a rich document. Every node has an index, CX file, and children. Every feature has a Role Lens. Only the amount of interview work differs.
33
33
 
34
34
  Transform a raw idea into comprehensive, structured ideation output through exhaustive recursive exploration with the Deep Think protocol.
35
35
 
@@ -46,9 +46,9 @@ Transform a raw idea into comprehensive, structured ideation output through exha
46
46
 
47
47
  | # | Shard | What It Does |
48
48
  |---|-------|-------------|
49
- | 1 | [`ideate-extract`](.agent/workflows/ideate-extract.md) | Classifies input, creates `ideation/` folder structure, seeds domain files, runs user intent check, sets expansion mode, loads skills |
50
- | 2 | [`ideate-discover`](.agent/workflows/ideate-discover.md) | Recursive breadth-before-depth domain exploration with Deep Think writes directly to domain files. Cross-cut detection + ledger active throughout. |
51
- | 3 | [`ideate-validate`](.agent/workflows/ideate-validate.md) | Constraints, metrics, competitive positioning, domain exhaustion check, vision summary compilation |
49
+ | 1 | [`ideate-extract`](.agent/workflows/ideate-extract.md) | Classifies input, determines structural classification (4 shapes), creates fractal `ideation/` folder structure using Node Classification Gate, seeds domain folders, runs user intent check, sets expansion mode, loads skills |
50
+ | 2 | [`ideate-discover`](.agent/workflows/ideate-discover.md) | Recursive breadth-before-depth exploration with Deep Think. Creates fractal nodes (folders with index + CX) and leaf feature files (with Role Lens). Hierarchical CX detection active throughout. |
51
+ | 3 | [`ideate-validate`](.agent/workflows/ideate-validate.md) | Constraints, metrics, competitive positioning, leaf-node exhaustion check, fractal structure compliance, vision summary compilation |
52
52
 
53
53
  ---
54
54
 
@@ -56,15 +56,15 @@ Transform a raw idea into comprehensive, structured ideation output through exha
56
56
 
57
57
  ### Step 1 — Run `.agent/workflows/ideate-extract.md`
58
58
 
59
- Classifies the user's input (rich doc, thin PRD, chat transcript, verbal), checks for an existing ideation folder (re-run check), creates the `docs/plans/ideation/` folder structure from the input, runs the universal user intent check to determine expansion mode, sets the expansion mode flag in `ideation-index.md`, and loads the idea-extraction and resolve-ambiguity skills.
59
+ Classifies the user's input (rich doc, thin PRD, chat transcript, verbal), determines structural classification (single-surface, multi-surface-shared, multi-product-hub, multi-product-peer), checks for existing ideation folder (re-run check), creates the fractal `docs/plans/ideation/` folder structure using the Node Classification Gate, runs user intent check to determine expansion mode, sets the expansion mode flag in `ideation-index.md`, and loads skills.
60
60
 
61
61
  ### Step 2 — Run `.agent/workflows/ideate-discover.md`
62
62
 
63
- Recursive breadth-before-depth exploration: Level 0 (global domain map) → Level 1 (domain breadth sweep) → Level 2+ (vertical drilling). Deep Think protocol active at every level. Writes directly to domain files. Cross-cut ledger accumulated continuously.
63
+ Recursive breadth-before-depth exploration: Level 0 (global domain map) → Level 1 (domain breadth sweep with Node Classification Gate) → Level 2+ (vertical drilling with Reactive Depth and Promotion Protocol). Deep Think active at every level. Writes to fractal feature files with Role Lens. Hierarchical CX files accumulated at every level.
64
64
 
65
65
  ### Step 3 — Run `.agent/workflows/ideate-validate.md`
66
66
 
67
- Explores constraints, success metrics, and competitive positioning. Runs domain exhaustion check (all domains ≥ `[DEEP]`, Deep Think yields zero hypotheses, cross-cut ledger clean). Compiles `docs/plans/vision.md` as a human-readable executive summary.
67
+ Explores constraints, success metrics, and competitive positioning. Runs leaf-node exhaustion check (all leaf features ≥ `[DEEP]`, Role Lens complete, Deep Think yields zero hypotheses, all CX files clean). Verifies fractal structure compliance. Compiles `docs/plans/vision.md` as a human-readable executive summary.
68
68
 
69
69
  ---
70
70
 
@@ -23,25 +23,28 @@ Check progress state, load skills, read the slice, detect parallel mode, and wri
23
23
 
24
24
  ## -1. Placeholder verification (CRITICAL — run before anything else)
25
25
 
26
- Scan for unfilled placeholders before writing code. Read each file and scan for `{{`:
26
+ Scan the surface stack map in `.agent/instructions/tech-stack.md` for completeness before writing code.
27
27
 
28
- 1. `AGENTS.md`
29
- 2. `GEMINI.md`
30
- 3. `.agent/instructions/workflow.md`
31
- 4. `.agent/instructions/commands.md`
32
- 5. `.agent/instructions/structure.md`
33
- 6. `.agent/instructions/patterns.md`
34
- 7. `.agent/instructions/tech-stack.md`
28
+ Verify:
29
+ 1. The slice's surface row has filled values for **all** required columns (Languages, Databases, BE Frameworks, FE Frameworks, ORMs, Unit Tests, E2E Tests, FE Design, State Mgmt)
30
+ 2. Cross-cutting categories have filled values (Auth, Security, CI/CD, Hosting, Accessibility)
31
+ 3. Commands section in `.agent/instructions/commands.md` has non-template values
35
32
 
36
- **If ANY `{{PLACEHOLDER}}` found** → STOP. Tell user which files contain unfilled placeholders with remediation:
33
+ Also scan these instruction files for any remaining template markers:
34
+ - `.agent/instructions/structure.md`
35
+ - `.agent/instructions/patterns.md`
36
+ - `.agent/instructions/tech-stack.md`
37
37
 
38
- | Unfilled pattern | Remediation |
39
- |-----------------|-------------|
40
- | `AGENTS.md`, `GEMINI.md`, `workflow.md`, `commands.md`, `tech-stack.md` | Run `/create-prd` |
41
- | `structure.md` (`{{PROJECT_STRUCTURE}}`, `{{ARCHITECTURE_TABLE}}`) | Run `/create-prd-compile` Step 9.5 |
42
- | `patterns.md` (`{{FRAMEWORK_PATTERNS}}`) | Run `/bootstrap-agents-provision` |
38
+ **If the map has empty cells for this slice's surface** → STOP. Tell user which cells are empty with remediation:
43
39
 
44
- Only proceed when zero `{{` patterns remain in all seven files.
40
+ | Empty Cell | Remediation |
41
+ |---|---|
42
+ | Languages / Databases / Frameworks | Run `/create-prd-stack` first |
43
+ | Commands section | Run `/bootstrap-agents` |
44
+ | `structure.md` (project structure) | Run `/create-prd-compile` Step 9.5 |
45
+ | `patterns.md` (framework patterns) | Run `/bootstrap-agents-provision` |
46
+
47
+ Only proceed when the map is fully populated for this slice's surface.
45
48
 
46
49
  ---
47
50
 
@@ -55,10 +58,9 @@ Verify previous slice was fully marked complete before starting this one.
55
58
 
56
59
  Read these skill SKILL.md files: `tdd-workflow`, `error-handling-patterns`, `git-workflow`, `code-review-pro`, `testing-strategist`, `clean-code`, `logging-best-practices`, `minimalist-surgical-development`, `systematic-debugging`. All are in `.agent/skills/[name]/SKILL.md`.
57
60
 
58
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
59
- If this slice includes BE tasks: Read .agent/skills/{{ORM_SKILL}}/SKILL.md and follow its migration and schema conventions. Skip if no BE tasks or `{{ORM_SKILL}}` is not provisioned.
60
- Read .agent/skills/{{UNIT_TESTING_SKILL}}/SKILL.md and follow its test writing conventions.
61
- If this slice includes FE tasks: Read .agent/skills/{{STATE_MANAGEMENT_SKILL}}/SKILL.md and follow its state management conventions. Skip if no FE tasks or `{{STATE_MANAGEMENT_SKILL}}` is not provisioned.
61
+ Determine which surface this slice belongs to from the phase plan. Read the surface stack map.
62
+
63
+ Read `.agent/skills/prd-templates/references/skill-loading-protocol.md` and load skills for this slice's surface: Languages, Unit Tests, and conditionally ORMs (if BE tasks) and State Mgmt (if FE tasks).
62
64
 
63
65
  Use `find-skills` to discover a test framework skill if needed.
64
66
 
@@ -95,16 +97,16 @@ Log each dispatch phase to `.agent/progress/slices/phase-NN-slice-NN.md` `## Dis
95
97
 
96
98
  ---
97
99
 
98
- ## 2. Write the contract (Zod schema)
100
+ ## 2. Write the contract ({{CONTRACT_LIBRARY}} schema)
99
101
 
100
102
  Before writing the schema, locate the BE endpoint(s) referenced by this slice's acceptance criteria. For each endpoint:
101
- 1. Read the BE spec section that defines it. Copy the typed Zod contract completely — every request field, response field, error code, and validation rule.
103
+ 1. Read the BE spec section that defines it. Copy the typed {{CONTRACT_LIBRARY}} contract completely — every request field, response field, error code, and validation rule.
102
104
  2. Read the slice's acceptance criteria. Add any additional request/response shapes required by behavioral assertions that are not already present in the BE contract (e.g., query parameters implied by filter behavior, UI-specific error payloads).
103
105
  3. Verify the combined schema covers every acceptance criterion and every BE contract field. Flag any drift between the BE spec and the IA shard it implements.
104
106
 
105
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
107
+ Load the Languages skill(s) from this slice's surface row per the skill loading protocol.
106
108
 
107
- Define request/response shapes as Zod schemas in the contracts directory (see `.agent/instructions/structure.md`). This is the source of truth.
109
+ Define request/response shapes as {{CONTRACT_LIBRARY}} schemas in the contracts directory (see `.agent/instructions/structure.md`). This is the source of truth.
108
110
 
109
111
  ### Propose next step
110
112