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
@@ -23,6 +23,23 @@ Identify deep dive candidates, annotate shard document types, validate the depen
23
23
 
24
24
  ---
25
25
 
26
+ ## 9.5. Proactive shard load pre-check (ideation signal)
27
+
28
+ Before identifying deep dives, read the ideation domain folders that fed each shard. The sub-area count from ideation is a **leading indicator** of shard complexity.
29
+
30
+ For each shard skeleton:
31
+ 1. Read the corresponding ideation domain folder (use the path from `ideation-index.md` Structure Map — may be under `domains/` or `surfaces/{name}/`). Read the folder's `*-index.md` for the children table.
32
+ 2. Count the child feature files and sub-domain folders listed in the domain index
33
+ 3. Compare against the shard load thresholds:
34
+
35
+ | Ideation Sub-Areas | Pre-Check Action |
36
+ |---|---|
37
+ | ≤6 | ✅ No concern — proceed to skeleton validation |
38
+ | 7–9 | ⚠️ **Pre-flag for split review** — note in the shard skeleton: `> ⚠️ Ideation source has [N] sub-areas — likely split candidate. Review at calibration gate.` |
39
+ | ≥10 | 🚩 **Proactive split proposal** — present a split proposal to the user NOW, before the calibration gate. Use the same split format as Step 12. If the user approves, create the split shards immediately and update the decomposition plan. |
40
+
41
+ > **Why proactive?** The reactive calibration gate (Step 12) catches overloaded shards, but only after skeletons are fully seeded. By reading ideation sub-area counts first, we avoid creating a massive skeleton only to immediately split it. For multi-product projects where a single surface domain (e.g., "Operations" in a desktop shop app) might have 15+ sub-areas, this saves significant rework.
42
+
26
43
  ## 10. Identify deep dive candidates
27
44
 
28
45
  Read .agent/skills/architecture-mapping/SKILL.md and follow its methodology.
@@ -61,7 +78,7 @@ Read .agent/skills/architecture-mapping/SKILL.md and follow its methodology for
61
78
 
62
79
  - **Must Have coverage gate**: Read `docs/plans/ideation/ideation-index.md` and extract every feature listed under "Must Have" in the MoSCoW Summary. For each Must Have feature, verify it appears in at least one shard's Features section. If any Must Have feature is not covered by any shard → **STOP**: "The following Must Have features from ideation-index.md are not covered by any shard: [list]. Add them to the appropriate shards before proceeding."
63
80
 
64
- - **Shard load calibration gate**: After the Must Have coverage gate passes, count the sub-features in each shard's `## Features` section using the **bullet/named-item rule**: count every bullet point or named item under `## Features`, **excluding** group headers (lines that introduce a group of sub-features but are not themselves a concrete capability). Compare against the following thresholds:
81
+ - **Shard load calibration gate**: After the Must Have coverage gate passes, count the sub-features in each shard's `## Features` section using the **bullet/named-item rule**: count every bullet point or named item under `## Features`, **excluding** group headers (lines that introduce a group of sub-features but are not themselves a concrete capability). If Step 9.5 pre-flagged any shards, they should be reviewed first. Compare against the following thresholds:
65
82
 
66
83
  | Sub-feature Count | Action |
67
84
  |-------------------|--------|
@@ -29,7 +29,7 @@ If no architecture design exists, tell the user to run `/create-prd` first. Do n
29
29
 
30
30
  Also check the document's `**Status**:` field. If the status is `Draft` or `Review` → **STOP**: "The architecture design is not yet approved (current status: [status]). Get explicit approval from the user and update the status to `Approved` before decomposing."
31
31
 
32
- Also read `docs/plans/ideation/ideation-index.md` for the domain map, and load specific domain files as needed for context.
32
+ Also read `docs/plans/ideation/ideation-index.md` for the fractal domain map and structural classification. The ideation folder uses a fractal structure — read domain indexes (not flat files) to understand depth, child counts, and cross-cut density.
33
33
 
34
34
  > **Design system prerequisite (web/mobile/desktop projects)**: Read `.agent/instructions/tech-stack.md` and locate the `SURFACES` value. If surfaces include `web`, `mobile`, or `desktop`, verify that `docs/plans/design-system.md` exists and is not empty.
35
35
  >
@@ -53,13 +53,28 @@ Read .agent/skills/architecture-mapping/SKILL.md and follow its methodology.
53
53
 
54
54
  Analyze the architecture design and identify natural domain boundaries. Each boundary becomes a numbered IA shard.
55
55
 
56
- **Heuristics for finding boundaries:**
56
+ **Fractal tree analysis for shard boundaries:**
57
+
58
+ The ideation folder uses a fractal structure. Walk the tree to inform shard granularity:
59
+
60
+ | Signal | What It Means for Sharding |
61
+ |--------|---------------------------|
62
+ | Deep fractal tree (3+ levels) | Domain is complex enough for its own shard |
63
+ | Many children (5+ features) | Consider splitting into multiple shards |
64
+ | Dense CX file (5+ cross-cuts) | This domain has high coupling — keep it together in one shard, or isolate carefully |
65
+ | Rich Role Matrix (3+ roles with access) | Shard needs multi-role IA spec coverage |
66
+ | Hub-and-spoke shared domains | Shared domains often become `00-*` cross-cutting shards |
67
+ | Leaf features marked `[EXHAUSTED]` | Most confident for shard scoping — behavior is fully defined |
68
+
69
+ **Standard heuristics also apply:**
57
70
  - Features that share the same data models belong together
58
71
  - Features that can be developed/deployed independently are candidates for separation
59
72
  - Features that share the same access control model may belong together
60
73
  - Cross-cutting concerns (auth, API conventions, error handling) become `00-*` shards
61
74
 
62
- Read .agent/skills/architecture-mapping/SKILL.md and follow its Domain Boundary Protocol. Build the domain inventory record, apply all three split trigger rules, and produce the domain boundary table. Present split candidates to the user before locking any boundary.
75
+ Read `.agent/skills/architecture-mapping/SKILL.md` and follow its Domain Boundary Protocol. Build the domain inventory record, apply all three split trigger rules, and produce the domain boundary table. Present split candidates to the user before locking any boundary.
76
+
77
+ > **Important**: Ideation does NOT prescribe shard boundaries. It provides the raw data (depth, features, cross-cuts, roles). This workflow makes the shard boundary decisions based on architectural analysis.
63
78
 
64
79
  Present the proposed domain decomposition to the user for validation.
65
80
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Safely evolve a Zod schema — identify all consumers, write migration tests, update across all four surfaces
2
+ description: Safely evolve a {{CONTRACT_LIBRARY}} schema — identify all consumers, write migration tests, update across all four surfaces
3
3
  pipeline:
4
4
  position: utility
5
5
  stage: maintenance
@@ -11,7 +11,7 @@ pipeline:
11
11
 
12
12
  # Evolve Contract
13
13
 
14
- Safely modify a Zod schema without breaking existing consumers.
14
+ Safely modify a {{CONTRACT_LIBRARY}} schema without breaking existing consumers.
15
15
 
16
16
  **Input**: The contract to change and the desired modification
17
17
  **Output**: Updated contract, migration tests, and all consumers updated
@@ -44,9 +44,9 @@ Read these skills for safe schema migration:
44
44
 
45
45
  ## 1. Identify the contract
46
46
 
47
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
47
+ Determine which surface this contract belongs to (from the file path or calling context). Load the Languages skill(s) from that surface's row per the skill loading protocol (`.agent/skills/prd-templates/references/skill-loading-protocol.md`).
48
48
 
49
- Determine which Zod schema needs to change and what the change is:
49
+ Determine which {{CONTRACT_LIBRARY}} schema needs to change and what the change is:
50
50
  - **Additive** (new optional field) — Low risk
51
51
  - **Narrowing** (tighter validation) — Medium risk
52
52
  - **Breaking** (rename, remove, type change) — High risk
@@ -77,32 +77,32 @@ If a new API version is needed, document the versioning approach (URL prefix, he
77
77
 
78
78
  Read .agent/skills/tdd-workflow/SKILL.md and follow its Red→Green→Refactor cycle for contract evolution.
79
79
 
80
- Read .agent/skills/{{UNIT_TESTING_SKILL}}/SKILL.md and follow its test writing conventions.
80
+ Load the Unit Tests skill(s) from this contract's surface row per the skill loading protocol.
81
81
 
82
82
  Before changing anything, write tests that validate:
83
83
  - Existing data still passes the new schema (backward compatibility)
84
84
  - New data shape is accepted
85
85
  - Invalid data is rejected
86
86
 
87
- Run `{{TEST_COMMAND}}` — tests should FAIL until the schema is updated.
87
+ Run the Test Cmd from this contract's surface row in the surface stack map (see `.agent/instructions/tech-stack.md`) — tests should FAIL until the schema is updated.
88
88
 
89
89
  ## 4. Update the contract
90
90
 
91
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
91
+ Load the Languages skill(s) from this contract's surface row per the skill loading protocol.
92
92
 
93
- Modify the Zod schema. For breaking changes:
93
+ Modify the {{CONTRACT_LIBRARY}} schema. For breaking changes:
94
94
  - Consider versioning (v1 → v2)
95
95
  - Add runtime migration helpers if needed
96
96
 
97
97
  ## 4.5. New dependency check
98
98
 
99
- If the contract change introduces a dependency not currently in the skill set — for example, a new Zod plugin, a Pydantic extension, a binary serialization library, or a new validation pattern — read `.agent/workflows/bootstrap-agents.md` and invoke `/bootstrap-agents NEW_DEPENDENCY=[package]` before updating consumers in Step 5.
99
+ If the contract change introduces a dependency not currently in the skill set — for example, a new validation library plugin, a schema extension, a binary serialization library, or a new validation pattern — read `.agent/workflows/bootstrap-agents.md` and invoke `/bootstrap-agents NEW_DEPENDENCY=[package]` before updating consumers in Step 5.
100
100
 
101
101
  Confirm the matching skill is installed (or no new dependency was introduced) before proceeding to Step 5.
102
102
 
103
103
  ## 5. Update all consumers
104
104
 
105
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
105
+ Load the Languages skill(s) from this contract's surface row per the skill loading protocol.
106
106
 
107
107
  For each consumer found in Step 2:
108
108
  - Update the code to use the new schema shape
@@ -110,7 +110,7 @@ For each consumer found in Step 2:
110
110
 
111
111
  ## 6. Validate
112
112
 
113
- Run `{{VALIDATION_COMMAND}}` (see `.agent/instructions/commands.md` for the configured validation command).
113
+ Run the Validation Cmd from this contract's surface row in the surface stack map (see `.agent/instructions/tech-stack.md` and `.agent/instructions/commands.md`).
114
114
 
115
115
  All must pass.
116
116
 
@@ -54,7 +54,7 @@ Based on the classification, determine where the new content enters the pipeline
54
54
 
55
55
  | Classification | Entry Point Document | Rationale |
56
56
  |---------------|---------------------|-----------|
57
- | **[1] New feature** | `docs/plans/ideation/ideation-index.md` + relevant domain file | New features start at the ideation layer — they affect everything downstream |
57
+ | **[1] New feature** | `docs/plans/ideation/ideation-index.md` + fractal tree placement (see Step 4) | New features start at the ideation layer — placed in the correct domain folder via Classification Gate |
58
58
  | **[2] New requirement** | The IA shard that owns the affected domain | Requirements on existing features enter at the domain interaction level |
59
59
  | **[3] New technical constraint** | `docs/plans/[dated]-architecture-design.md` | Technical constraints affect the architecture and everything below it |
60
60
  | **[4] Scope correction** | Ask the user which document contains the misunderstanding | Corrections enter wherever the original misunderstanding lives |
@@ -69,11 +69,19 @@ Read .agent/skills/technical-writer/SKILL.md and follow its clarity standards fo
69
69
 
70
70
  This is a real spec-writing step — not a placeholder. Write the new content at the appropriate depth for the entry point layer:
71
71
 
72
- **If entry point is ideation layer** (`docs/plans/ideation/ideation-index.md`):
73
- - Feature description (what it does, why it matters)
74
- - Affected personas (who uses this)
75
- - Success criteria (how we know it works)
76
- - Constraints (what limits apply)
72
+ **If entry point is ideation layer** (`docs/plans/ideation/`):
73
+
74
+ 1. **Placement**: Read `ideation-index.md` Structure Map. Identify the domain folder where this feature belongs. If no suitable domain exists, create one.
75
+ 2. **Classification Gate**: Apply the Node Classification Gate from `.agent/skills/idea-extraction/SKILL.md` determine if the feature is a leaf feature file or complex enough to warrant a sub-domain folder.
76
+ 3. **Write the feature**: Use `.agent/skills/prd-templates/references/fractal-feature-template.md` as the template. Include:
77
+ - Feature description (what it does, why it matters)
78
+ - Affected personas (who uses this)
79
+ - Success criteria (how we know it works)
80
+ - Constraints (what limits apply)
81
+ - **Role Lens** — which personas interact with this feature and how
82
+ 4. **Update parent index**: Add the new feature to the parent domain's `*-index.md` children table
83
+ 5. **Update CX files**: If the feature has cross-domain interactions, update the parent domain's `*-cx.md` and/or `ideation-cx.md` (global)
84
+ 6. **Update `ideation-index.md`**: Add the feature to the MoSCoW Summary at the appropriate priority level
77
85
 
78
86
  **If entry point is architecture layer** (`architecture-design.md`):
79
87
  - Technical constraint description
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Recursive breadth-before-depth domain exploration with Deep Think protocol for the ideate workflow
2
+ description: Recursive breadth-before-depth domain exploration with Deep Think protocol and fractal structure for the ideate workflow
3
3
  parent: ideate
4
4
  shard: discover
5
5
  standalone: true
@@ -17,176 +17,141 @@ pipeline:
17
17
 
18
18
  # Ideate — Discover
19
19
 
20
- Explore domains through recursive breadth-before-depth with the Deep Think protocol. Write directly to domain filesno monolithic intermediary.
20
+ Explore domains through recursive breadth-before-depth with the Deep Think protocol. Write to the fractal folder structure every node gets an index, CX file, and children.
21
21
 
22
- **Prerequisite**: If invoked standalone, verify `docs/plans/ideation/ideation-index.md` exists with at least the folder structure seeded. If not, prompt the user to run `/ideate-extract` first.
22
+ **Prerequisite**: If invoked standalone, verify `docs/plans/ideation/ideation-index.md` exists with the fractal folder structure seeded. If not, prompt the user to run `/ideate-extract` first.
23
23
 
24
24
  ---
25
25
 
26
26
  ## 3. Domain Exploration — Recursive Model
27
27
 
28
- Read `.agent/skills/idea-extraction/SKILL.md` and follow its Recursive Domain Exhaustion Protocol and Deep Think Protocol.
28
+ Read `.agent/skills/idea-extraction/SKILL.md` follow the Recursive Domain Exhaustion Protocol, Deep Think Protocol, Node Classification Gate, and Reactive Depth Protocol.
29
29
 
30
- Read the `## Expansion Mode` section from `docs/plans/ideation/ideation-index.md` and route accordingly. All findings are written to the appropriate files in `docs/plans/ideation/` in real time — not held in context.
30
+ Read `## Expansion Mode` and `## Structural Classification` from `docs/plans/ideation/ideation-index.md`.
31
31
 
32
32
  ### Full Mode (recommended for 3+ domains)
33
33
 
34
34
  #### Level 0 — Global Domain Map
35
35
 
36
- 1. Read `ideation-index.md` for currently identified domains
37
- 2. Apply the idea-extraction skill's Deep Think Protocol:
38
- - "Based on this product type and industry, what domains would I expect to see that haven't been mentioned?"
39
- - Present hypotheses to user for confirmation or rejection
40
- 3. For each confirmed domain, create a domain file in `domains/` using the `ideation-domain-template.md`
41
- 4. Note preliminary cross-cuts: "Domain A might touch Domain B because [reason]" → add to `cross-cuts/cross-cut-ledger.md` as **Level 0** entries
42
- 5. Update `ideation-index.md` with the complete domain map
43
- 6. **Gate**: Present complete domain map to user. Get confirmation before Level 1.
36
+ 1. Read `ideation-index.md` for currently identified domains and structural classification
37
+ 2. Apply Deep Think: "What domains would I expect for this product type?"
38
+ 3. For each confirmed domain, run the **Node Classification Gate** (from skill):
39
+ - Determine placement (surface folder, hub, shared, or top-level)
40
+ - Create domain folder: `{NN}-{slug}/` + `{slug}-index.md` + `{slug}-cx.md`
41
+ 4. Note preliminary cross-cuts:
42
+ - In the relevant parent's CX file (surface CX or global CX)
43
+ - In `ideation-cx.md` if cross-surface
44
+ 5. Update `ideation-index.md` structure map with paths
45
+ 6. **Gate**: Present domain map. User confirms before Level 1.
44
46
 
45
47
  #### Level 1 — Domain Breadth Sweep
46
48
 
47
49
  For each domain (dependency order — foundational first):
48
50
 
49
51
  1. List all sub-areas/capabilities within the domain
50
- 2. **Deep Think**: "Based on this domain in this industry, what sub-areas would an expert expect that haven't been mentioned?" Present hypotheses.
51
- 3. Write the breadth map to the domain file. Mark each sub-area as `[SURFACE]`.
52
- 4. Note cross-cuts at sub-area leveladd to ledger as **Level 1** entries
53
- 5. **NEW DOMAINS DISCOVERED?** Create domain file, update index, loop back to Level 0 for the new domain. Do NOT proceed until domain map is stable.
54
- 6. Mark domain status as `[BREADTH]` in the index
55
- 7. **Gate**: Pause after EACH domain's breadth map. "Here's what I mapped for [Domain]. Anything missing?" Then after ALL domains: "All domains are at BREADTH. Ready to drill?"
52
+ 2. **Deep Think**: "What sub-areas would an expert expect?"
53
+ 3. Run **Node Classification Gate** for each:
54
+ - 2+ interacting capabilities**sub-domain** (create folder + index + CX)
55
+ - Single capability**feature** (create `.md` file from `fractal-feature-template.md`)
56
+ 4. Update domain index (Children table + **Role Matrix**)
57
+ 5. Note cross-cuts in the domain's CX file
58
+ 6. **NEW DOMAINS DISCOVERED?** → Classify, create, update index, loop to Level 0
59
+ 7. Mark domain status as `[BREADTH]`
60
+ 8. **Gate**: Pause after EACH domain. "Here's what I mapped for [Domain]. Missing anything?" After ALL: "All domains at BREADTH. Ready to drill?"
56
61
 
57
62
  #### Level 2+ — Vertical Drilling
58
63
 
59
- For each domain (dependency order), for each sub-area:
60
-
61
- 1. Apply the idea-extraction skill's Exhaustion Questions (entity, feature, user, integration)
62
- 2. **Deep Think** per sub-area:
63
- - "Based on this feature in this product, what edge cases, interactions, and failure modes would a production system need?"
64
- - "Based on cross-domain knowledge already captured, does this sub-area need something because of how it connects to other domains?"
65
- - Present hypotheses to user
66
- 3. Write drill results to the domain file under the appropriate sub-area section
67
- 4. Record Deep Think outcomes in the domain file's Deep Think Annotations table
68
- 5. Cross-cuts with evidenceadd to ledger as **Level 2+** entries with specific evidence
69
- 6. **NEW SUB-AREAS DISCOVERED?** Add to domain file breadth map as `[SURFACE]`, complete breadth mapping first, THEN drill
70
- 7. **NEW DOMAINS DISCOVERED?** Create domain file, update index, loop back to Level 0
71
- 8. When Deep Think yields zero new hypotheses AND user confirms → mark sub-area `[EXHAUSTED]`
72
- 9. When all sub-areas are `[DEEP]` or `[EXHAUSTED]` → mark domain `[DEEP]` or `[EXHAUSTED]` in index
73
- 10. **Gate**: Pause after each domain is drilled. "Here's what I captured for [Domain]. Anything missing?"
64
+ For each domain (dependency order), for each child:
65
+
66
+ 1. Apply Exhaustion Questions (entity, feature, user, integration)
67
+ 2. **Deep Think** per child — edge cases, interactions, failure modes
68
+ 3. For **feature files**: fill all sections (Behavior, Edge Cases, States, **Role Lens**)
69
+ 4. For **sub-domains**: drill their child features recursively
70
+ 5. Record Deep Think outcomes in each feature file's Deep Think Annotations table
71
+ 6. Cross-cuts with evidence → add to parent's CX file with synthesis questions
72
+ 7. **Feature reveals 2+ interacting capabilities?** Run **Promotion Protocol** (convert .md to folder)
73
+ 8. **NEW DOMAINS DISCOVERED?**Loop to Level 0
74
+ 9. When Deep Think yields zero hypotheses AND user confirms mark `[EXHAUSTED]`
75
+ 10. Status propagation: all children `[EXHAUSTED]` node is `[EXHAUSTED]`
76
+ 11. **Gate**: Pause after each domain is drilled.
74
77
 
75
78
  #### Cross-Cut Synthesis (Continuous)
76
79
 
77
- Cross-cuts are NOT a separate pass. They are identified and synthesized continuously. However, after all domains reach `[DEEP]`, do a final review:
80
+ Cross-cuts are identified continuously, but after all domains reach `[DEEP]`, do a final review:
78
81
 
79
- 1. Read `cross-cuts/cross-cut-ledger.md` for all accumulated entries
80
- 2. For any pairs still at `pending` status, ask the five synthesis questions:
81
- - Shared state conflict who owns the entity? merge strategy?
82
- - Trigger chain does A trigger B? rollback if B fails? sync/async?
83
- - Permission intersection does permission in A affect B?
84
- - Notification fan-out — does event in A notify actors in B?
85
- - State transition conflict — can A and B race? consistency impact?
86
- 3. Document confirmed interactions with outcomes in the ledger
87
- 4. Discard rejected pairs with a one-line reason
88
- 5. Check for **second-order cross-cuts**: "Now that we've confirmed these interactions, do any of the CONFIRMED pairs themselves cross-cut each other?"
82
+ 1. Read ALL CX files at every level (global, surface, domain, sub-domain)
83
+ 2. For any entries at Medium/Low confidence, ask the five synthesis questions (per `fractal-cx-template.md`)
84
+ 3. Document confirmed interactions with role scoping
85
+ 4. Record rejected pairs with reasoning
86
+ 5. Check second-order cross-cuts: "Do any CONFIRMED pairs cross-cut each other?"
89
87
 
90
88
  ### Vertical Mode
91
89
 
92
- Focus on existing domains. Identify shallowest sub-areas. Drive to Level 2+ depth with Deep Think active. Cross-cut watch active — surface candidates in ledger. Do not introduce new domains unless user requests.
90
+ Identify shallowest leaf nodes. Drive to `[DEEP]`/`[EXHAUSTED]` with Deep Think. Fill Role Lens in all feature files. Cross-cut watch active — log to appropriate CX files. Do not introduce new domains unless user requests.
93
91
 
94
92
  ### Horizontal Mode
95
93
 
96
- Audit for missing domains with Deep Think. Present gap list. Create domain files for confirmed new domains with Level 1 exploration. Cross-cut watch active for new domains vs existing. Offer to continue with vertical drilling after.
94
+ Audit for missing domains with Deep Think. Create domain folders (with Classification Gate) for confirmed new domains. Level 1 breadth sweep on each. Offer vertical drilling after.
97
95
 
98
96
  ### Cross-cutting Mode (standalone)
99
97
 
100
- Read all domain files, identify interaction points. For each significant pair, ask the five synthesis questions. Document confirmed interactions in ledger. Note: works best after vertical drilling.
101
-
102
- ### Combination Mode
103
-
104
- User specifies sequence. Apply each mode in order. Cross-cut detection always active.
105
-
106
- ### As-is Mode
98
+ Read all CX files + feature files' cross-cut notes. Identify interaction points. Run synthesis questions on unresolved pairs. Document in appropriate CX files.
107
99
 
108
- Skip active expansion. Proceed to exhaustion check. Cross-cut watch still active — scan domain files for obvious interaction points and surface candidates in ledger before proceeding.
100
+ ### Combination / As-is Mode
109
101
 
110
- > **Mid-session mode switching**: If you want to change expansion direction, update the `Expansion Mode` in `ideation-index.md` and re-run `/ideate-discover`.
102
+ Combination: user specifies sequence. As-is: skip expansion, run exhaustion check, but still scan for obvious CX candidates.
111
103
 
112
104
  ---
113
105
 
114
106
  ## 4. Problem exploration
115
107
 
116
- Read `.agent/skills/brainstorming/SKILL.md` and follow its structured facilitation methodology.
117
-
118
- Using the idea-extraction skill's approach for the selected mode, explore:
119
-
120
- 1. **What problem are we solving?** — Get the user to articulate the core pain point in one sentence. If they can't, help them sharpen it. Write to `meta/problem-statement.md`.
121
- 2. **Who has this problem?** — Identify 2-4 distinct user personas with different needs. For each persona, explore all 6 required fields. Write to `meta/personas.md`.
122
- 3. **How are they solving it today?** — Understand the competitive landscape and current workarounds. Write to `meta/competitive-landscape.md`.
123
- 4. **Why now?** — What has changed that makes this solvable/valuable now. Write to `meta/problem-statement.md` under the "Why Now" section.
108
+ Read `.agent/skills/brainstorming/SKILL.md` and follow its methodology.
124
109
 
125
- After each answer, summarize what you've captured and ask the user to confirm before moving on.
110
+ 1. **What problem are we solving?** Write to `meta/problem-statement.md`
111
+ 2. **Who has this problem?** → Write to `meta/personas.md`
112
+ 3. **How are they solving it today?** → Write to `meta/competitive-landscape.md`
113
+ 4. **Why now?** → Write to `meta/problem-statement.md` under "Why Now"
126
114
 
127
- **Persona completeness gate (Ideation Rubric Dimension 2):** For each persona, verify all 6 fields are explicitly present before moving on:
128
- 1. **Name + specific role** — not "a user" or "customers"; a named role with context
129
- 2. **Specific pain point** — one sentence naming the exact friction
130
- 3. **Current workaround** — how they solve this today: the specific tool, process, or coping mechanism
131
- 4. **Success criteria** — what "solved" concretely looks like for this persona; measurable if possible
132
- 5. **Switching trigger** — what would make them switch from their current approach
133
- 6. **At least one edge case or constraint unique to this persona**
115
+ **Persona completeness gate (Ideation Rubric Dimension 2):** For each persona, verify all 6 fields:
116
+ 1. Name + specific role
117
+ 2. Specific pain point
118
+ 3. Current workaround
119
+ 4. Success criteria
120
+ 5. Switching trigger
121
+ 6. At least one edge case or constraint unique to this persona
134
122
 
135
- If any field is absent → probe for it before proceeding. Do not move to feature collection until all personas have all 6 fields. Reference: `.agent/skills/pipeline-rubrics/references/ideation-rubric.md` Dimension 2.
123
+ If any field absent → probe before proceeding. Reference: `.agent/skills/pipeline-rubrics/references/ideation-rubric.md` Dimension 2.
136
124
 
137
125
  ---
138
126
 
139
127
  ## 5. Feature inventory — deep exploration
140
128
 
141
- This is where most ideation workflows fail. They collect a feature list and move on. This workflow explores each feature using the recursive model and Deep Think.
142
-
143
129
  ### 5a. Feature collection (MoSCoW)
144
130
 
145
- Read `.agent/skills/brainstorming/SKILL.md` and follow its methodology.
146
-
147
- For each persona identified in Step 4, brainstorm features:
148
-
149
- 1. **Must-have features** — What features are launch-blocking?
150
- 2. **Should-have features** — What features are expected but not day-one critical?
151
- 3. **Could-have features** — What features would delight but can be deferred?
152
- 4. **Won't-have (now)** — What is explicitly out of scope?
153
-
154
- **Deep Think**: "Based on the personas and problem statement, what features would I expect to see in the Must Have list that haven't been mentioned? For example, in similar products, [examples]."
131
+ Read `.agent/skills/brainstorming/SKILL.md`.
155
132
 
156
- Write the MoSCoW matrix to `ideation-index.md` under the MoSCoW Summary section. Each feature links to its domain file.
133
+ For each persona, brainstorm features across all 4 MoSCoW tiers. **Deep Think** for missing Must Haves.
157
134
 
158
- > **Note:** Deferred lower quality. Every feature that makes the cut will be built to production standard.
135
+ Write MoSCoW matrix to `ideation-index.md`. Each feature references its **fractal path** (e.g., `web/01.02.03`) and links to its feature file.
159
136
 
160
137
  ### 5b. Feature deepening — Must Haves
161
138
 
162
- For each **Must Have** feature, use the recursive model:
163
-
164
- 1. **Level 1: Sub-features.** What are the component parts of this feature?
165
- - "User authentication" → signup, login, password reset, profile management, account deletion, session management, OAuth providers
166
-
167
- 2. **Level 2: Edge cases and failure modes.** For each sub-feature:
168
- - What happens on failure? What error does the user see?
169
- - What happens on partial failure? (network drops mid-operation)
170
- - What permissions are required?
171
- - What are the states? (loading, empty, populated, error)
172
-
173
- 3. **Level 3 (complex features): Interactions and conflicts.**
174
- - How does this feature interact with other Must Haves?
175
- - What if two features trigger simultaneously?
176
- - Are there any conflicts between features?
139
+ For each Must Have feature, use the recursive model:
177
140
 
178
- **Deep Think at each level**: "Based on this feature in production systems, what am I missing? What breaks in the real world?"
141
+ 1. **Level 1: Sub-features.** Component parts. Run Classification Gate sub-domain or feature?
142
+ 2. **Level 2: Edge cases and failure modes.** Fill feature file sections: Behavior (happy path, edge cases, states), **Role Lens**.
143
+ 3. **Level 3 (complex features): Interactions.** Cross-cuts with evidence → parent CX file.
179
144
 
180
- Write all drilling results to the appropriate domain files.
145
+ **Deep Think at each level.** Write results to feature files using `fractal-feature-template.md`.
181
146
 
182
147
  ### 5c. Feature deepening — Should Haves (lighter touch)
183
148
 
184
- For Should Have features, explore Level 1 (sub-features) only with Deep Think. Note that these will get full Level 2-3 treatment in `/create-prd` when they enter scope.
149
+ Level 1 (sub-features) only with Deep Think. Full treatment deferred to `/create-prd`.
185
150
 
186
151
  ---
187
152
 
188
153
  ### Propose next step
189
154
 
190
- Once the feature inventory is complete and the user has confirmed the MoSCoW matrix, proceed to `/ideate-validate` to check exhaustion, explore constraints, and compile the vision summary.
155
+ Proceed to `/ideate-validate` for exhaustion check, constraint exploration, and vision compilation.
191
156
 
192
- > 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.
157
+ > If standalone, surface via `notify_user`. If from parent `/ideate`, natural handoff.