@atlashub/smartstack-cli 3.13.0 → 3.15.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 (54) hide show
  1. package/dist/index.js +26 -28
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +626 -141
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/agents/efcore/migration.md +15 -0
  7. package/templates/skills/apex/steps/step-04-validate.md +64 -5
  8. package/templates/skills/application/references/frontend-verification.md +20 -0
  9. package/templates/skills/application/steps/step-04-backend.md +17 -1
  10. package/templates/skills/application/steps/step-05-frontend.md +49 -23
  11. package/templates/skills/application/templates-seed.md +14 -4
  12. package/templates/skills/business-analyse/SKILL.md +3 -2
  13. package/templates/skills/business-analyse/_module-loop.md +5 -5
  14. package/templates/skills/business-analyse/html/ba-interactive.html +165 -0
  15. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +2 -0
  16. package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +85 -0
  17. package/templates/skills/business-analyse/html/src/styles/05-modules.css +65 -0
  18. package/templates/skills/business-analyse/html/src/template.html +13 -0
  19. package/templates/skills/business-analyse/questionnaire.md +1 -1
  20. package/templates/skills/business-analyse/references/cache-warming-strategy.md +11 -23
  21. package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +112 -0
  22. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +6 -1
  23. package/templates/skills/business-analyse/references/deploy-data-build.md +1 -1
  24. package/templates/skills/business-analyse/references/html-data-mapping.md +1 -1
  25. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  26. package/templates/skills/business-analyse/references/spec-auto-inference.md +1 -1
  27. package/templates/skills/business-analyse/schemas/application-schema.json +38 -1
  28. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -1
  29. package/templates/skills/business-analyse/steps/step-00-init.md +18 -22
  30. package/templates/skills/business-analyse/steps/step-01-cadrage.md +383 -128
  31. package/templates/skills/business-analyse/steps/step-02-decomposition.md +42 -16
  32. package/templates/skills/business-analyse/steps/step-03a-data.md +5 -31
  33. package/templates/skills/business-analyse/steps/step-03a1-setup.md +41 -2
  34. package/templates/skills/business-analyse/steps/step-03b-ui.md +20 -11
  35. package/templates/skills/business-analyse/steps/step-03d-validate.md +6 -6
  36. package/templates/skills/business-analyse/steps/step-04-consolidation.md +5 -31
  37. package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
  38. package/templates/skills/business-analyse/steps/step-05a-handoff.md +1 -1
  39. package/templates/skills/business-analyse/steps/step-05b-deploy.md +3 -3
  40. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +1 -1
  41. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  42. package/templates/skills/efcore/steps/shared/step-00-init.md +55 -0
  43. package/templates/skills/ralph-loop/SKILL.md +1 -0
  44. package/templates/skills/ralph-loop/references/category-rules.md +131 -27
  45. package/templates/skills/ralph-loop/references/compact-loop.md +61 -3
  46. package/templates/skills/ralph-loop/references/core-seed-data.md +251 -5
  47. package/templates/skills/ralph-loop/references/error-classification.md +143 -0
  48. package/templates/skills/ralph-loop/steps/step-05-report.md +54 -0
  49. package/templates/skills/review-code/references/smartstack-conventions.md +16 -0
  50. package/templates/skills/validate-feature/SKILL.md +11 -1
  51. package/templates/skills/validate-feature/steps/step-00-dependencies.md +121 -0
  52. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +61 -13
  53. package/templates/skills/validate-feature/steps/step-05-db-validation.md +250 -0
  54. package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +0 -87
@@ -2,7 +2,7 @@
2
2
  name: step-02-decomposition
3
3
  description: Module decomposition - identify modules, dependency graph, topological sort, client checkpoint
4
4
  model: opus
5
- next_step: steps/step-03a-data.md
5
+ next_step: steps/step-03a1-setup.md
6
6
  ---
7
7
 
8
8
  > **Context files:** `_shared.md`
@@ -38,7 +38,7 @@ ba-reader.findFeature({feature_id})
38
38
 
39
39
  IF status already "decomposed":
40
40
  Display: "Decomposition already completed. Loading next step."
41
- Load: steps/step-03a-data.md
41
+ Load: steps/step-03a1-setup.md
42
42
  STOP
43
43
 
44
44
  ### 2. Module Identification
@@ -70,13 +70,20 @@ For each mustHave/shouldHave scope item:
70
70
  > "priority": "must|should|could",
71
71
  > "sortOrder": 0,
72
72
  > "entities": ["Anticipated entity names"],
73
- > "estimatedComplexity": "simple|medium|complex"
73
+ > "estimatedComplexity": "simple|medium|complex",
74
+ > "anticipatedSections": [
75
+ > { "code": "list", "description": "Main entity list with filters", "resources": ["entity-grid", "entity-filter"] },
76
+ > { "code": "detail", "description": "Entity detail view", "resources": ["entity-card"] },
77
+ > { "code": "create", "description": "Create new entity", "resources": ["entity-form"] }
78
+ > ]
74
79
  > }
75
80
  > ```
76
81
  > **MANDATORY fields:** `code`, `description`, `featureType`, `dependencies`, `dependents`, `status`, `priority`, `sortOrder`, `entities`, `estimatedComplexity`
82
+ > **OPTIONAL fields:** `anticipatedSections` (from cadrage coverageMatrix, enriched here with resources)
77
83
  > **status:** Always `"pending"` at creation (updated to `"in-progress"` → `"specified"` → `"validated"` by step-03/04)
78
84
  > **sortOrder:** Integer from topological sort (0 = foundation layer)
79
85
  > **featureJsonPath:** Set to null at creation; updated to actual path when module feature.json is created in step-03
86
+ > **anticipatedSections:** Array of `{ code, description, resources[] }` objects. Derived from `cadrage.coverageMatrix[].anticipatedSections` aggregated per module, then refined during decomposition. These serve as starting point for step-03a1 section walkthrough.
80
87
 
81
88
  **Complexity estimation rules:**
82
89
  | Criteria | Simple | Medium | Complex |
@@ -93,14 +100,21 @@ Display the identified modules as markdown:
93
100
  ```
94
101
  ## Modules identifiés pour {application_name}
95
102
 
96
- | # | Module | Type | Priorité | Complexité | Entités pressenties |
97
- |---|--------|------|----------|------------|---------------------|
98
- | 1 | Customers | data-centric | must | medium | Customer, Address, Contact |
99
- | 2 | Products | data-centric | must | simple | Product, Category |
100
- | 3 | Orders | workflow | must | complex | Order, OrderLine |
101
- | 4 | Invoices | workflow | should | medium | Invoice, InvoiceLine, Payment |
103
+ {language == "fr"
104
+ ? "**Préfixe de table :** `{metadata.tablePrefix}` — toutes les tables de cette application seront préfixées (ex: `{metadata.tablePrefix}Customers`, `{metadata.tablePrefix}Orders`)"
105
+ : "**Table prefix:** `{metadata.tablePrefix}` all tables in this application will be prefixed (e.g., `{metadata.tablePrefix}Customers`, `{metadata.tablePrefix}Orders`)"}
106
+
107
+ | # | Module | Type | Priorité | Complexité | Sections pressenties | Entités |
108
+ |---|--------|------|----------|------------|---------------------|---------|
109
+ | 1 | Customers | data-centric | must | medium | list, detail, create, edit | Customer, Address, Contact |
110
+ | 2 | Products | data-centric | must | simple | list, detail, create | Product, Category |
111
+ | 3 | Orders | workflow | must | complex | list, detail, create, approve, history | Order, OrderLine |
112
+ | 4 | Invoices | workflow | should | medium | list, detail, create, export | Invoice, InvoiceLine, Payment |
102
113
  ```
103
114
 
115
+ > **Sections are derived from:** cadrage.coverageMatrix[].anticipatedSections aggregated per module.
116
+ > If cadrage did not provide sections, infer from module featureType using the standard section table.
117
+
104
118
  Ask via AskUserQuestion:
105
119
  ```
106
120
  question: "Ces modules correspondent-ils à votre vision de l'application ?"
@@ -191,12 +205,24 @@ Products ───┘
191
205
 
192
206
  ### Ordre de traitement
193
207
 
194
- | Ordre | Module | Dépend de | Complexité |
195
- |-------|--------|-----------|------------|
196
- | 1 | Customers | (aucune) | medium |
197
- | 2 | Products | (aucune) | simple |
198
- | 3 | Orders | Customers, Products | complex |
199
- | 4 | Invoices | Orders, Customers | medium |
208
+ | Ordre | Module | Dépend de | Complexité | Sections pressenties |
209
+ |-------|--------|-----------|------------|---------------------|
210
+ | 1 | Customers | (aucune) | medium | list, detail, create, edit |
211
+ | 2 | Products | (aucune) | simple | list, detail, create |
212
+ | 3 | Orders | Customers, Products | complex | list, detail, create, approve, history |
213
+ | 4 | Invoices | Orders, Customers | medium | list, detail, create, export |
214
+
215
+ ### Détail des sections et resources par module
216
+
217
+ **Module : {module_name}**
218
+ | Section | Description | Resources pressenties |
219
+ |---------|-------------|----------------------|
220
+ | list | {description} | {entity}-grid, {entity}-filter |
221
+ | detail | {description} | {entity}-card, {entity}-tabs |
222
+ | create | {description} | {entity}-form |
223
+ | ... | ... | ... |
224
+
225
+ (Repeat for each module)
200
226
 
201
227
  > Les modules seront spécifiés dans cet ordre. Chaque module sera
202
228
  > détaillé avec ses sections, entités, permissions et maquettes,
@@ -292,4 +318,4 @@ When `workflow.mode = "module"` or only 1 scope item identified:
292
318
 
293
319
  ## NEXT STEP
294
320
 
295
- Load: `./step-03a-data.md`
321
+ Load: `./step-03a1-setup.md`
@@ -1,42 +1,16 @@
1
1
  ---
2
2
  name: step-03a-data
3
- description: Per-module data specification - REDIRECTS to step-03a1 (refactored into 2 sub-steps)
3
+ description: "DEPRECATED REDIRECT - All references now point directly to step-03a1-setup.md"
4
4
  model: opus
5
5
  next_step: steps/step-03a1-setup.md
6
6
  ---
7
7
 
8
- > **NOTICE:** This step has been refactored into 2 sub-steps for better context management.
8
+ > **DEPRECATED:** This file is no longer loaded in normal workflow. All step references now point directly to `step-03a1-setup.md`. This file is kept for historical reference only.
9
9
 
10
- # Step 3a: Specification - Data & Logic (Entry Point)
11
-
12
- This step has been divided into 2 focused sub-steps:
10
+ # Step 3a: Specification - Data & Logic (Refactored)
13
11
 
12
+ Refactored into 2 sub-steps:
14
13
  1. **step-03a1-setup.md** - Module setup, sections walkthrough, questionnaires, cross-refs
15
14
  2. **step-03a2-analysis.md** - Analysis section: objectives, entities, business rules, process flow
16
15
 
17
- ---
18
-
19
- ## Automatic Redirect
20
-
21
- **Loading:** `./step-03a1-setup.md`
22
-
23
- The data specification process will execute in sequence:
24
- - step-03a1-setup → step-03a2-analysis → step-03b-ui
25
-
26
- ---
27
-
28
- ## Why Refactored?
29
-
30
- **Before:** 468 lines in single file (exceeded 400-line recommendation)
31
-
32
- **After:** 2 focused files (~320 + ~150 lines)
33
-
34
- **Benefits:**
35
- - Better context management
36
- - Clearer separation: setup vs analysis
37
- - Module preparation separated from entity/logic definition
38
- - Reduced cognitive load per step
39
-
40
- ---
41
-
42
- **Proceeding to step-03a1-setup.md...**
16
+ Flow: step-03a1-setup → step-03a2-analysis → step-03b-ui
@@ -60,7 +60,7 @@ ba-reader.readApplicationContext({feature_id})
60
60
 
61
61
  IF module already specified (status = "specified" in master):
62
62
  Increment currentModuleIndex, re-check
63
- IF all modules specified → Load step-04-consolidation.md, STOP
63
+ IF all modules specified → Load step-04a-collect.md, STOP
64
64
 
65
65
  ### 1b. Cache Warming for Module Loop (FIRST MODULE ONLY)
66
66
 
@@ -74,7 +74,7 @@ IF currentModuleIndex === 0:
74
74
  "~/.claude/skills/business-analyse/references/spec-auto-inference.md",
75
75
  "~/.claude/skills/business-analyse/references/ui-resource-cards.md",
76
76
  "~/.claude/skills/business-analyse/references/ui-dashboard-spec.md",
77
- "~/.claude/skills/business-analyse/references/cadrage-vibe-coding.md"
77
+ "~/.claude/skills/business-analyse/references/cadrage-pre-analysis.md"
78
78
  ];
79
79
 
80
80
  for (const file of moduleRefs) {
@@ -349,6 +349,45 @@ options:
349
349
  description: "Pas de référence à {completedModule}"
350
350
  ```
351
351
 
352
+ #### 5-bis. Unresolved Entity Dependencies (New Module Detection)
353
+
354
+ > **When an entity reference is detected that does NOT belong to any completed or planned module, apply the Entity Sourcing Pattern from step-01-cadrage (section 4d-bis).**
355
+
356
+ For each entity referenced by {currentModule} that is NOT covered by any existing/planned module:
357
+
358
+ ```
359
+ question: "{language == 'fr'
360
+ ? 'Les {entity_plural} référencés par {currentModule} ne font partie d\'aucun module. Comment les gérer ?'
361
+ : '{entity_plural} referenced by {currentModule} are not part of any module. How should they be managed?'}"
362
+ header: "{entity_name}"
363
+ options:
364
+ - label: "{language == 'fr' ? 'Dans ce module' : 'In this module'}"
365
+ description: "{language == 'fr'
366
+ ? 'Gérer les {entity_plural} comme une section/entité de {currentModule}'
367
+ : 'Manage {entity_plural} as a section/entity of {currentModule}'}"
368
+ - label: "{language == 'fr' ? 'Nouveau module dédié' : 'New dedicated module'}"
369
+ description: "{language == 'fr'
370
+ ? 'Créer un module complet avec CRUD, permissions et navigation'
371
+ : 'Create a full module with CRUD, permissions and navigation'}"
372
+ - label: "{language == 'fr' ? 'Système externe' : 'External system'}"
373
+ description: "{language == 'fr'
374
+ ? 'Import ou API depuis un autre système'
375
+ : 'Import or API from another system'}"
376
+ - label: "{language == 'fr' ? 'Liste de référence' : 'Reference list'}"
377
+ description: "{language == 'fr'
378
+ ? 'Table de lookup configurable par l\'admin'
379
+ : 'Admin-configurable lookup table'}"
380
+ ```
381
+
382
+ **IF "Nouveau module dédié" is selected:**
383
+ 1. Add new module to master `modules[]` via ba-writer (status: "pending", sortOrder: after current module)
384
+ 2. Update dependency graph: current module depends on the new module
385
+ 3. **WARNING:** The new module will need specification AFTER the current one. Display:
386
+ ```
387
+ "⚠ Nouveau module '{entity_name}' ajouté. Il sera spécifié après {currentModule}."
388
+ ```
389
+ 4. Update `metadata.workflow.moduleOrder` to include the new module (inserted after its dependents)
390
+
352
391
  ---
353
392
 
354
393
  ## NEXT STEP
@@ -12,7 +12,7 @@ next_step: steps/step-03c-compile.md
12
12
  ## MANDATORY EXECUTION RULES
13
13
 
14
14
  - ALWAYS use ULTRATHINK mode
15
- - This step is EXECUTED ONCE PER MODULE, after step-03a-data.md
15
+ - This step is EXECUTED ONCE PER MODULE, after step-03a1-setup.md and step-03a2-analysis.md
16
16
  - **WIREFRAME RULE:** Every section MUST have a wireframe in `specification.uiWireframes[]`. No section without a validated mockup.
17
17
  - **ID NAMING RULE (MANDATORY, NO EXCEPTION):**
18
18
  All IDs MUST include a module prefix to guarantee application-wide uniqueness.
@@ -136,7 +136,17 @@ See [references/ui-resource-cards.md](../references/ui-resource-cards.md) for ex
136
136
  > **BLOCKING RULE:** Every section MUST have a wireframe. No section proceeds to entity definition (step 6) without a validated mockup stored in `specification.uiWireframes[]`.
137
137
  > **HTML INTEGRATION:** These wireframes are also rendered in the interactive HTML document (`ba-interactive.html`) deployed at handoff. The client can review and annotate mockups directly in their browser.
138
138
 
139
- For each confirmed section, generate an ASCII mockup and validate with client:
139
+ **Procedural sequence (MANDATORY follow in exact order):**
140
+
141
+ 1. **Generate** an ASCII mockup for each confirmed section
142
+ 2. **Display** each mockup in the conversation output with a markdown header:
143
+ ```
144
+ ### {SectionName} — Wireframe
145
+ ```
146
+ followed by the ASCII art in a code block. **ALL mockups MUST be visible text in the conversation.**
147
+ 3. **Only THEN** call `AskUserQuestion` to ask the client to validate the displayed mockups (batch 2-3 at once if possible)
148
+
149
+ > **BLOCKING RULE:** You MUST NOT call AskUserQuestion for wireframe validation until ALL mockups are displayed as visible text in the conversation. The client cannot validate what they cannot see.
140
150
 
141
151
  Example for a list section:
142
152
 
@@ -160,8 +170,6 @@ See [references/ui-resource-cards.md](../references/ui-resource-cards.md) for ex
160
170
  **REQUIRED fields:** `screen`, `mockup`, `elements`, `section`, `componentMapping`, `layout` are ALL mandatory.
161
171
  A wireframe without `componentMapping` or `layout` will FAIL validation in step 9.
162
172
 
163
- Ask client to validate each mockup via AskUserQuestion (batch 2-3 mockups at once if possible).
164
-
165
173
  > **IF client rejects a mockup:** Revise and re-propose until validated. Do NOT proceed without client approval on the layout.
166
174
 
167
175
  ### 3b-bis. Wireframe-to-Component Mapping
@@ -234,13 +242,14 @@ See [references/ui-dashboard-spec.md](../references/ui-dashboard-spec.md) for th
234
242
 
235
243
  Before proceeding to step-03c-compile.md, VERIFY:
236
244
 
237
- 1. **Wireframes exist for all sections** in `specification.uiWireframes[]`
238
- 2. **All wireframes have componentMapping** with smarter mapping rules
239
- 3. **All wireframes have layout** with regions and resourceRef references
240
- 4. **All resource references** in layout.regions[].components[].resourceRef exist in sections[].resources[]
241
- 5. **State machines defined** (if module has status fields) in `specification.lifeCycles[]`
242
- 6. **Form field completeness** SmartForm fields[] covers ALL entity attributes except system/audit fields
243
- 7. **Navigation entries for all sections** — Every section (including dashboard) has a corresponding entry in `specification.navigation.entries[]`
245
+ 1. **Wireframes displayed and validated** — ALL wireframes were output as visible ASCII art in the conversation AND validated by the client via AskUserQuestion
246
+ 2. **Wireframes exist for all sections** in `specification.uiWireframes[]`
247
+ 3. **All wireframes have componentMapping** with smarter mapping rules
248
+ 4. **All wireframes have layout** with regions and resourceRef references
249
+ 5. **All resource references** in layout.regions[].components[].resourceRef exist in sections[].resources[]
250
+ 6. **State machines defined** (if module has status fields) in `specification.lifeCycles[]`
251
+ 7. **Form field completeness** — SmartForm fields[] covers ALL entity attributes except system/audit fields
252
+ 8. **Navigation entries for all sections** — Every section (including dashboard) has a corresponding entry in `specification.navigation.entries[]`
244
253
 
245
254
  **IF any check fails → FIX before proceeding.** Do NOT load step-03c-compile with incomplete data.
246
255
 
@@ -2,7 +2,7 @@
2
2
  name: step-03d-validate
3
3
  description: Per-module validation, write feature.json, incremental HTML deploy, loop decision
4
4
  model: sonnet
5
- next_step: steps/step-03a-data.md OR steps/step-04-consolidation.md (conditional)
5
+ next_step: steps/step-03a1-setup.md OR steps/step-04a-collect.md (conditional)
6
6
  ---
7
7
 
8
8
  > **Context files:** `_shared.md` | `_module-loop.md`
@@ -279,12 +279,12 @@ ba-writer.advanceModuleLoop({feature_id})
279
279
 
280
280
  IF currentModuleIndex < moduleOrder.length:
281
281
  Display: "→ Module suivant: {nextModule} ({currentModuleIndex + 1}/{total})"
282
- Load: steps/step-03a-data.md
282
+ Load: steps/step-03a1-setup.md
283
283
 
284
284
  IF currentModuleIndex >= moduleOrder.length:
285
285
  Display: "═══ Tous les modules spécifiés! Passage à la consolidation... ═══"
286
286
  ba-writer.updateStatus({feature_id}, "specified")
287
- Load: steps/step-04-consolidation.md
287
+ Load: steps/step-04a-collect.md
288
288
  ```
289
289
 
290
290
  ---
@@ -308,7 +308,7 @@ When only 1 module in moduleOrder:
308
308
 
309
309
  - Same full validation flow
310
310
  - Skip cross-module references (section 5)
311
- - After validation → direct to step-04-consolidation.md (auto-consolidation)
311
+ - After validation → direct to step-04a-collect.md (auto-consolidation)
312
312
 
313
313
  ---
314
314
 
@@ -372,5 +372,5 @@ Read metadata.workflow.currentModule
372
372
 
373
373
  Conditional:
374
374
 
375
- - IF modules remaining → Load `steps/step-03a-data.md`
376
- - IF all modules done → Load `steps/step-04-consolidation.md`
375
+ - IF modules remaining → Load `steps/step-03a1-setup.md`
376
+ - IF all modules done → Load `steps/step-04a-collect.md`
@@ -1,43 +1,17 @@
1
1
  ---
2
2
  name: step-04-consolidation
3
- description: Cross-module consolidation - REDIRECTS to step-04a (refactored into 3 sub-steps)
3
+ description: "DEPRECATED REDIRECT - All references now point directly to step-04a-collect.md"
4
4
  model: opus
5
5
  next_step: steps/step-04a-collect.md
6
6
  ---
7
7
 
8
- > **NOTICE:** This step has been refactored into 3 sub-steps for better context management.
8
+ > **DEPRECATED:** This file is no longer loaded in normal workflow. All step references now point directly to `step-04a-collect.md`. This file is kept for historical reference only.
9
9
 
10
- # Step 4: Consolidation (Entry Point)
11
-
12
- This step has been divided into 3 focused sub-steps:
10
+ # Step 4: Consolidation (Refactored)
13
11
 
12
+ Refactored into 3 sub-steps:
14
13
  1. **step-04a-collect.md** - Collect module summaries and cross-module interactions
15
14
  2. **step-04b-analyze.md** - Analyze permissions, validation, E2E flows, and risks
16
15
  3. **step-04c-decide.md** - Obtain final approval and write consolidation
17
16
 
18
- ---
19
-
20
- ## Automatic Redirect
21
-
22
- **Loading:** `./step-04a-collect.md`
23
-
24
- The consolidation process will execute in sequence:
25
- - step-04a-collect → step-04b-analyze → step-04c-decide → step-05a-handoff
26
-
27
- ---
28
-
29
- ## Why Refactored?
30
-
31
- **Before:** 628 lines in single file (exceeded 400-line recommendation)
32
-
33
- **After:** 3 focused files (~200-280 lines each)
34
-
35
- **Benefits:**
36
- - Better context management
37
- - Clearer separation of concerns (collect → analyze → decide)
38
- - Easier to resume from specific consolidation phase
39
- - Reduced cognitive load per step
40
-
41
- ---
42
-
43
- **Proceeding to step-04a-collect.md...**
17
+ Flow: step-04a-collect → step-04b-analyze → step-04c-decide → step-05a-handoff
@@ -37,7 +37,7 @@ options:
37
37
  ```
38
38
 
39
39
  IF "Réviser un module":
40
- Ask which module → set currentModuleIndex to that module → load step-03a-data.md
40
+ Ask which module → set currentModuleIndex to that module → load step-03a1-setup.md
41
41
 
42
42
  IF "Modifier les interactions":
43
43
  Re-enter step-04a-collect.md (sections 2-4)
@@ -36,7 +36,7 @@ ba-reader.findFeature({feature_id})
36
36
  → Check status = "consolidated"
37
37
  ```
38
38
 
39
- **IF** status ≠ "consolidated" → **STOP**. Return to step-04-consolidation.md.
39
+ **IF** status ≠ "consolidated" → **STOP**. Return to step-04a-collect.md.
40
40
 
41
41
  Display validation summary:
42
42
 
@@ -19,7 +19,7 @@ next_step: steps/step-05c-ralph-readiness.md
19
19
  - **ALWAYS** follow references/html-data-mapping.md EXACTLY for FEATURE_DATA and EMBEDDED_ARTIFACTS mapping
20
20
  - **FEATURE_DATA.moduleSpecs MUST be populated for EACH module** — empty moduleSpecs = BROKEN specification tabs
21
21
  - **FEATURE_DATA.cadrage.scope must use HTML keys** (vital/important/optional/excluded) NOT feature.json keys (mustHave/shouldHave/couldHave/outOfScope)
22
- - **FEATURE_DATA.metadata.vibeCoding must be set** from master.metadata.vibeCoding (controls section visibility)
22
+ - **FEATURE_DATA.metadata.analysisMode must be set** from master.metadata.analysisMode (always "interactive")
23
23
  - **NEVER leave FEATURE_DATA or EMBEDDED_ARTIFACTS empty or partial**
24
24
 
25
25
  ## YOUR TASK
@@ -214,7 +214,7 @@ IF ANY category shows FAIL → **STOP AND RE-RUN `ss derive-prd`**. DO NOT proce
214
214
  - FEATURE_DATA must be pre-populated with ALL analysis data (empty data = BUG)
215
215
  - FEATURE_DATA.**moduleSpecs** MUST be populated for EACH module (use cases, business rules, entities, permissions) — empty moduleSpecs = BROKEN specification tabs
216
216
  - FEATURE_DATA.**cadrage.scope** must use HTML keys (vital/important/optional/excluded) NOT feature.json keys (mustHave/shouldHave/couldHave/outOfScope)
217
- - FEATURE_DATA.**metadata.vibeCoding** must be set from `master.metadata.vibeCoding` (controls section visibility)
217
+ - FEATURE_DATA.**metadata.analysisMode** must be set from `master.metadata.analysisMode` (always "interactive")
218
218
  - EMBEDDED_ARTIFACTS contains wireframes, E2E diagrams, dependency graph
219
219
  - Both objects are serialized as JSON with 2-space indentation
220
220
  - All data mapped from master and module feature.json files — follow `html-data-mapping.md` EXACTLY
@@ -233,7 +233,7 @@ See [references/deploy-data-build.md](../references/deploy-data-build.md) for:
233
233
  **Critical reminders:**
234
234
  - FEATURE_DATA.**moduleSpecs** MUST have ONE entry per module (empty = BUG)
235
235
  - FEATURE_DATA.**cadrage.scope** converts `mustHave→vital`, `shouldHave→important`, `couldHave→optional`, `outOfScope→excluded`
236
- - FEATURE_DATA.**metadata.vibeCoding** from `master.metadata.vibeCoding`
236
+ - FEATURE_DATA.**metadata.analysisMode** from `master.metadata.analysisMode`
237
237
  - Also reference `references/html-data-mapping.md` for the full mapping spec
238
238
 
239
239
  ---
@@ -203,7 +203,7 @@ Total: 4 cross-module references, all resolvable
203
203
 
204
204
  **IF ANY reference is unresolvable:**
205
205
  - **BLOCKING ERROR:** List broken references with module and field names
206
- - **FIX:** Return to step-03a-data.md for affected modules to fix entity references
206
+ - **FIX:** Return to step-03a1-setup.md for affected modules to fix entity references
207
207
  - **STOP** - do not proceed to next check
208
208
 
209
209
  ---
@@ -1,7 +1,7 @@
1
1
  # Template Functional Requirements Document
2
2
 
3
3
  > **Usage:** Template for 3-functional-specification.md
4
- > **Loaded in:** step-03a-data.md
4
+ > **Loaded in:** step-03a1-setup.md
5
5
 
6
6
  ---
7
7
 
@@ -16,6 +16,61 @@ Detect EF Core project structure, identify DbContext (Core vs Extensions), and l
16
16
 
17
17
  ## EXECUTION SEQUENCE:
18
18
 
19
+ ### 0. Ensure dotnet ef Available (Platform-Aware)
20
+
21
+ > **CRITICAL:** On Windows (Git Bash, MSYS2), `dotnet ef` may not be on the shell PATH
22
+ > even though it's installed. This step fixes PATH before any EF Core command.
23
+
24
+ ```bash
25
+ ensure_dotnet_ef() {
26
+ # Quick check: already available?
27
+ if dotnet ef --version &>/dev/null; then
28
+ DOTNET_EF_VERSION=$(dotnet ef --version 2>/dev/null)
29
+ echo "dotnet-ef: $DOTNET_EF_VERSION"
30
+ return 0
31
+ fi
32
+
33
+ echo "dotnet-ef not on PATH, attempting platform-aware fix..."
34
+
35
+ # Try all known .NET global tools locations
36
+ # - $USERPROFILE/.dotnet/tools → Windows via Git Bash (USERPROFILE=C:\Users\xxx)
37
+ # - $HOME/.dotnet/tools → Linux/macOS or Git Bash fallback
38
+ # - $LOCALAPPDATA/Microsoft/dotnet/tools → Windows alternate location
39
+ for TOOLS_DIR in \
40
+ "$USERPROFILE/.dotnet/tools" \
41
+ "$HOME/.dotnet/tools" \
42
+ "$LOCALAPPDATA/Microsoft/dotnet/tools"; do
43
+ if [ -n "$TOOLS_DIR" ] && [ -d "$TOOLS_DIR" ]; then
44
+ export PATH="$TOOLS_DIR:$PATH"
45
+ echo " PATH += $TOOLS_DIR"
46
+ fi
47
+ done
48
+
49
+ # Verify after PATH fix
50
+ if dotnet ef --version &>/dev/null; then
51
+ DOTNET_EF_VERSION=$(dotnet ef --version 2>/dev/null)
52
+ echo "dotnet-ef: $DOTNET_EF_VERSION (found after PATH fix)"
53
+ return 0
54
+ fi
55
+
56
+ echo "ERROR: dotnet-ef not available"
57
+ echo "Install with: dotnet tool install --global dotnet-ef"
58
+ echo ""
59
+ echo "If installed but not found, check:"
60
+ echo " Windows: %USERPROFILE%\\.dotnet\\tools must be in PATH"
61
+ echo " Linux: ~/.dotnet/tools must be in PATH"
62
+ exit 1
63
+ }
64
+
65
+ ensure_dotnet_ef
66
+ ```
67
+
68
+ **IMPORTANT — WSL pitfall:**
69
+ If the shell resolves `$HOME` to `/home/{user}` (WSL path) instead of `/c/Users/{user}` (Git Bash),
70
+ the .NET SDK may not be found even if `dotnet-ef` is. Use `$USERPROFILE` first on Windows.
71
+
72
+ ---
73
+
19
74
  ### 1. Detect EF Core Project
20
75
 
21
76
  ```bash
@@ -115,6 +115,7 @@ LOAD → GENERATE → COMPILE → TEST → [FAIL?] → FIX → RE-TEST → [PASS
115
115
  | `references/category-rules.md` | Step-02 and compact loop (execution rules per category) |
116
116
  | `references/compact-loop.md` | Step-04 section 5 (inline execution after first iteration) |
117
117
  | `references/core-seed-data.md` | Infrastructure task with seed data keywords |
118
+ | `references/error-classification.md` | Build failure in compact loop or validation (error diagnosis) |
118
119
  | `references/team-orchestration.md` | Step-00 when multi-module detected (2+ PRDs) |
119
120
  </step_files>
120
121