@atlashub/smartstack-cli 3.4.1 → 3.6.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 (46) hide show
  1. package/dist/index.js +160 -5
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +4 -3
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/skills/_shared.md +1 -1
  7. package/templates/skills/application/steps/step-04-backend.md +4 -4
  8. package/templates/skills/application/templates-backend.md +4 -4
  9. package/templates/skills/business-analyse/SKILL.md +26 -15
  10. package/templates/skills/business-analyse/_architecture.md +4 -4
  11. package/templates/skills/business-analyse/_elicitation.md +1 -1
  12. package/templates/skills/business-analyse/_module-loop.md +4 -4
  13. package/templates/skills/business-analyse/html/ba-interactive.html +39 -10
  14. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  15. package/templates/skills/business-analyse/questionnaire.md +2 -2
  16. package/templates/skills/business-analyse/react/components.md +1 -1
  17. package/templates/skills/business-analyse/react/schema.md +1 -1
  18. package/templates/skills/business-analyse/references/html-data-mapping.md +4 -3
  19. package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
  20. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
  21. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +1 -0
  22. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
  23. package/templates/skills/business-analyse/steps/step-00-init.md +29 -0
  24. package/templates/skills/business-analyse/steps/step-01-cadrage.md +166 -6
  25. package/templates/skills/business-analyse/steps/step-02-decomposition.md +4 -4
  26. package/templates/skills/business-analyse/steps/{step-03a-specify.md → step-03a-data.md} +10 -359
  27. package/templates/skills/business-analyse/steps/step-03b-ui.md +414 -0
  28. package/templates/skills/business-analyse/steps/step-03c-compile.md +343 -0
  29. package/templates/skills/business-analyse/steps/{step-03b-compile.md → step-03d-validate.md} +26 -308
  30. package/templates/skills/business-analyse/steps/step-04-consolidation.md +2 -2
  31. package/templates/skills/business-analyse/steps/step-05a-handoff.md +49 -292
  32. package/templates/skills/business-analyse/steps/step-05b-mapping.md +302 -0
  33. package/templates/skills/business-analyse/steps/step-05c-deploy.md +296 -0
  34. package/templates/skills/business-analyse/steps/step-05d-html.md +326 -0
  35. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  36. package/templates/skills/business-analyse/templates/tpl-handoff.md +6 -6
  37. package/templates/skills/business-analyse/templates/tpl-launch-displays.md +1 -1
  38. package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
  39. package/templates/skills/controller/steps/step-03-generate.md +2 -1
  40. package/templates/skills/ralph-loop/SKILL.md +17 -2
  41. package/templates/skills/ralph-loop/references/core-seed-data.md +538 -0
  42. package/templates/skills/ralph-loop/steps/step-00-init.md +2 -0
  43. package/templates/skills/ralph-loop/steps/step-01-task.md +273 -7
  44. package/templates/skills/ralph-loop/steps/step-02-execute.md +39 -15
  45. package/templates/skills/ralph-loop/steps/step-04-check.md +87 -4
  46. package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -432
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "3.4.1",
3
+ "version": "3.6.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -21,7 +21,7 @@ Domain → Application → Infrastructure → API → Web
21
21
  |-------|-----------------|-----------|------------------|
22
22
  | Domain | Entities, ValueObjects | `SmartStack.Domain.{Context}.{App}.{Module}` | `Domain/{Context}/{App}/{Module}/` |
23
23
  | Application | Interfaces (Common), DTOs | `SmartStack.Application.Common.Interfaces` / `.{Context}.{App}.{Module}.DTOs` | `Application/Common/Interfaces/` + `Application/{Context}/{App}/{Module}/DTOs/` |
24
- | Infrastructure | Service Impl, EF Core | `SmartStack.Infrastructure.Services.{Module}` | `Infrastructure/Services/{Module}/` + `Persistence/Configurations/{Module}/` |
24
+ | Infrastructure | Service Impl, EF Core | `SmartStack.Infrastructure.Services.{Context}.{App}.{Module}` | `Infrastructure/Services/{Context}/{App}/{Module}/` + `Persistence/Configurations/{Context}/{App}/{Module}/` |
25
25
  | API | Controllers, Middleware | `SmartStack.Api.Controllers.{Context}` | `Api/Controllers/{Context}/` |
26
26
  | Web | React components, pages | N/A | `pages/{context}/{app}/{module}/` + `components/{context}/{module}/` |
27
27
 
@@ -86,9 +86,9 @@ Args:
86
86
 
87
87
  The tool generates (paths organized by navRoute hierarchy `{context}.{application}.{module}`):
88
88
  - `Domain/{Context}/{Application}/{Module}/{EntityName}.cs` - Entity with BaseEntity
89
- - `Infrastructure/Persistence/Configurations/{Module}/{EntityName}Configuration.cs` - EF Config
89
+ - `Infrastructure/Persistence/Configurations/{Context}/{Application}/{Module}/{EntityName}Configuration.cs` - EF Config
90
90
  - `Application/Common/Interfaces/I{EntityName}Service.cs` - Service Interface
91
- - `Infrastructure/Services/{Module}/{EntityName}Service.cs` - Service Implementation
91
+ - `Infrastructure/Services/{Context}/{Application}/{Module}/{EntityName}Service.cs` - Service Implementation
92
92
  - `Api/Controllers/{controller_folder}/{Application}/{EntityName}Controller.cs` - REST Controller
93
93
  - `Application/{Context}/{Application}/{Module}/DTOs/{EntityName}ResponseDto.cs` - Response DTO
94
94
  - `Application/{Context}/{Application}/{Module}/DTOs/Create{EntityName}Dto.cs` - Create request
@@ -103,8 +103,8 @@ The tool generates (paths organized by navRoute hierarchy `{context}.{applicatio
103
103
  - `Domain/{Context}/{Application}/{Module}/{EntityName}.cs`
104
104
 
105
105
  ### Infrastructure Layer
106
- - `Persistence/Configurations/{Module}/{EntityName}Configuration.cs`
107
- - `Services/{Module}/{EntityName}Service.cs`
106
+ - `Persistence/Configurations/{Context}/{Application}/{Module}/{EntityName}Configuration.cs`
107
+ - `Services/{Context}/{Application}/{Module}/{EntityName}Service.cs`
108
108
 
109
109
  ### Application Layer
110
110
  - `Common/Interfaces/I{EntityName}Service.cs`
@@ -83,7 +83,7 @@ public interface I$MODULE_PASCALService
83
83
  ## TEMPLATE: SERVICE IMPLEMENTATION
84
84
 
85
85
  ```csharp
86
- // src/SmartStack.Infrastructure/Services/$MODULE_PASCAL/$MODULE_PASCALService.cs
86
+ // src/SmartStack.Infrastructure/Services/$CONTEXT_PASCAL/$APPLICATION_PASCAL/$MODULE_PASCAL/$MODULE_PASCALService.cs
87
87
 
88
88
  using Microsoft.EntityFrameworkCore;
89
89
  using Microsoft.Extensions.Logging;
@@ -91,7 +91,7 @@ using SmartStack.Application.Common.Interfaces;
91
91
  using SmartStack.Application.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL.DTOs;
92
92
  using SmartStack.Domain.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
93
93
 
94
- namespace SmartStack.Infrastructure.Services.$MODULE_PASCAL;
94
+ namespace SmartStack.Infrastructure.Services.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
95
95
 
96
96
  public class $MODULE_PASCALService : I$MODULE_PASCALService
97
97
  {
@@ -359,13 +359,13 @@ public class $ENTITY_PASCAL : BaseEntity
359
359
  ## TEMPLATE: EF CONFIGURATION
360
360
 
361
361
  ```csharp
362
- // src/SmartStack.Infrastructure/Persistence/Configurations/$MODULE_PASCAL/$ENTITY_PASCALConfiguration.cs
362
+ // src/SmartStack.Infrastructure/Persistence/Configurations/$CONTEXT_PASCAL/$APPLICATION_PASCAL/$MODULE_PASCAL/$ENTITY_PASCALConfiguration.cs
363
363
 
364
364
  using Microsoft.EntityFrameworkCore;
365
365
  using Microsoft.EntityFrameworkCore.Metadata.Builders;
366
366
  using SmartStack.Domain.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
367
367
 
368
- namespace SmartStack.Infrastructure.Persistence.Configurations.$MODULE_PASCAL;
368
+ namespace SmartStack.Infrastructure.Persistence.Configurations.$CONTEXT_PASCAL.$APPLICATION_PASCAL.$MODULE_PASCAL;
369
369
 
370
370
  public class $ENTITY_PASCALConfiguration : IEntityTypeConfiguration<$ENTITY_PASCAL>
371
371
  {
@@ -15,7 +15,8 @@ The skill auto-detects which use case applies by scanning existing features in `
15
15
 
16
16
  **Architecture highlights:**
17
17
  - Conditional context loading: each step loads only the shared files it needs (~54% context reduction)
18
- - Split long steps for reliability: 03→03a+03b, 05→05a+05b with self-verification at transitions
18
+ - 12 granular steps (1-2 responsibilities each, 200-500 lines) for maximum LLM attention quality
19
+ - Self-verification at every step transition, POST-CHECKs on critical outputs
19
20
  - Templates and references extracted to separate files, loaded on demand
20
21
  </objective>
21
22
 
@@ -94,12 +95,16 @@ When step-00 detects that the description matches an existing application:
94
95
  - **Step 00:** Detection, scan existing, create master feature.json (draft)
95
96
  - **Step 01:** Cadrage: context, stakeholders, scope, application roles (framed)
96
97
  - **Step 02:** Decomposition: modules, dependencies, client checkpoint (decomposed)
97
- - **Step 03a:** Interactive specification per module: sections, wireframes, entities, BR, use cases
98
- - **Step 03b:** Compilation: write spec to feature.json, validate, deploy HTML, loop decision
99
- - Loop: 03a 03b 03a (next module) until all specified (specified)
98
+ - **Step 03a:** Per-module data: sections, entities, business rules, questionnaires
99
+ - **Step 03b:** Per-module UI: state machines, wireframes, layouts, dashboards
100
+ - **Step 03c:** Per-module compile: actors, UCs, FRs, permissions, navigation, seed data, i18n
101
+ - **Step 03d:** Per-module validate: completeness checks, write feature.json, incremental HTML, loop
102
+ - Loop: 03a → 03b → 03c → 03d → 03a (next module) until all specified (specified)
100
103
  - **Step 04:** Cross-module consolidation (consolidated)
101
- - **Step 05a:** Build handoff data: file mapping, BR-to-code, API summary, write to feature.json
102
- - **Step 05b:** Deploy artifacts: prd.json, progress.txt, HTML, manifest (handed-off)
104
+ - **Step 05a:** Handoff strategy: file mapping (7 categories)
105
+ - **Step 05b:** Handoff mapping: BR-to-code, API summary, write to feature.json
106
+ - **Step 05c:** Deploy artifacts: prd.json, progress.txt, manifest
107
+ - **Step 05d:** Deploy interactive HTML: ba-interactive.html pre-populated (handed-off)
103
108
  - Display completion summary with `/ralph-loop -r` command
104
109
  - User reviews deliverables with stakeholders before launching development
105
110
 
@@ -122,6 +127,7 @@ When step-00 detects that the description matches an existing application:
122
127
  | `{module_name}` | string | Target module name |
123
128
  | `{context}` | string | Always "business" for BA |
124
129
  | `{workflow_mode}` | string | "application" or "module" |
130
+ | `{vibe_coding}` | boolean | `true` if developer builds with AI assistance (accelerated questionnaire) |
125
131
  | `{docs_dir}` | string | `docs/business/{app}/{module}/business-analyse/v{X.Y}/` |
126
132
 
127
133
  </state_variables>
@@ -137,14 +143,18 @@ When step-00 detects that the description matches an existing application:
137
143
 
138
144
  | Step | File | Model | Purpose |
139
145
  | ---- | --------------------------------- | ------ | ---------------------------------------------------- |
140
- | 00 | `steps/step-00-init.md` | Haiku | Auto-detect new/update, scan existing, create master feature.json |
146
+ | 00 | `steps/step-00-init.md` | Sonnet | Auto-detect new/update, scan existing, create master feature.json |
141
147
  | 01 | `steps/step-01-cadrage.md` | Opus | Framing: context, stakeholders, scope, application roles |
142
- | 02 | `steps/step-02-decomposition.md` | Sonnet | Module decomposition, dependency graph, client checkpoint |
143
- | 03a | `steps/step-03a-specify.md` | Opus | Per-module specification: interactive phase (sections, entities, BR, wireframes, use cases) |
144
- | 03b | `steps/step-03b-compile.md` | Opus | Per-module compilation: write spec, validate, HTML deploy, loop decision |
145
- | 04 | `steps/step-04-consolidation.md` | Sonnet | Cross-module validation, E2E flows, permissions coherence |
146
- | 05a | `steps/step-05a-handoff.md` | Sonnet | Build handoff data, write to module + master feature.json |
147
- | 05b | `steps/step-05b-deploy.md` | Sonnet | Generate prd.json, progress.txt, deploy HTML, manifest, user choice |
148
+ | 02 | `steps/step-02-decomposition.md` | Opus | Module decomposition, dependency graph, client checkpoint |
149
+ | 03a | `steps/step-03a-data.md` | Opus | Per-module: sections, entities, BRs, questionnaires |
150
+ | 03b | `steps/step-03b-ui.md` | Opus | Per-module: state machines, wireframes, layouts, dashboards |
151
+ | 03c | `steps/step-03c-compile.md` | Opus | Per-module: actors, UCs, FRs, permissions, nav, seed data, i18n |
152
+ | 03d | `steps/step-03d-validate.md` | Sonnet | Per-module: validation, write, incremental HTML, loop decision |
153
+ | 04 | `steps/step-04-consolidation.md` | Opus | Cross-module validation, E2E flows, permissions coherence |
154
+ | 05a | `steps/step-05a-handoff.md` | Sonnet | Handoff strategy, file mapping (7 categories) |
155
+ | 05b | `steps/step-05b-mapping.md` | Sonnet | BR-to-code mapping, API summary, write handoff |
156
+ | 05c | `steps/step-05c-deploy.md` | Sonnet | Generate prd.json, progress.txt, manifest, summary |
157
+ | 05d | `steps/step-05d-html.md` | Sonnet | Deploy ba-interactive.html pre-populated with all data |
148
158
 
149
159
  </step_files>
150
160
 
@@ -188,7 +198,8 @@ Load ONLY relevant categories based on feature type:
188
198
  | spec | `templates/tpl-frd.md` | 02 |
189
199
  | handoff | `templates/tpl-handoff.md` | 04 |
190
200
  | suggestions | `patterns/suggestion-catalog.md` | 01 |
191
- | interactive | `html/ba-interactive.html` | 03b (incremental), 05b (final deploy) |
201
+ | interactive | `html/ba-interactive.html` | 03d (incremental), 05d (final deploy) |
202
+ | mapping | `references/html-data-mapping.md` | 03d, 05d (FEATURE_DATA + EMBEDDED_ARTIFACTS mapping) |
192
203
 
193
204
  </template_files>
194
205
 
@@ -197,7 +208,7 @@ Load ONLY relevant categories based on feature type:
197
208
  - **Load one step at a time** - Only load the current step file
198
209
  - **Load shared files conditionally** - Each step loads only the _shared files it needs (see step headers)
199
210
  - **Reference files on demand** - Templates and mappings in references/ and templates/ are loaded only when needed
200
- - **ULTRATHINK** for steps 01, 02, 04 (critical thinking)
211
+ - **ULTRATHINK** for steps 01, 02, 03a-03c, 04 (critical thinking)
201
212
  - **State persisted in feature.json** (NOT markdown files)
202
213
  - **Use ba-writer agent** for all JSON writes
203
214
  - **Use ba-reader agent** for all JSON reads
@@ -1,6 +1,6 @@
1
1
  # Business Analysis - SmartStack Architecture Reference (_architecture.md)
2
2
 
3
- > **Loaded by:** step-01-cadrage, step-03a-specify, step-05a-handoff
3
+ > **Loaded by:** step-01-cadrage, step-03a-data, step-05a-handoff, step-05b-mapping
4
4
  > **Purpose:** Provide architectural context for relevant questions and aligned recommendations
5
5
 
6
6
  ---
@@ -63,9 +63,9 @@
63
63
  | **Domain** | `{Project}.Domain/Business/{Application}/{Module}/` | `Domain/Business/Operations/FreeBicke/FreeBicke.cs` |
64
64
  | **Application/DTOs** | `{Project}.Application/Business/{Application}/{Module}/DTOs/` | `Application/Business/Operations/FreeBicke/DTOs/FreeBickeDto.cs` |
65
65
  | **Application/Interfaces** | `{Project}.Application/Common/Interfaces/` | `Application/Common/Interfaces/IFreeBickeService.cs` |
66
- | **Infrastructure/Config** | `{Project}.Infrastructure/Persistence/Configurations/{Module}/` | `Configurations/FreeBicke/FreeBickeConfiguration.cs` |
67
- | **Infrastructure/Services** | `{Project}.Infrastructure/Services/{Module}/` | `Services/FreeBicke/FreeBickeService.cs` |
68
- | **Infrastructure/SeedData** | `{Project}.Infrastructure/Persistence/Seeding/Data/{Module}/` | `Seeding/Data/FreeBicke/FreeBickeSeedData.cs` |
66
+ | **Infrastructure/Config** | `{Project}.Infrastructure/Persistence/Configurations/{Context}/{Application}/{Module}/` | `Configurations/Business/Operations/FreeBicke/FreeBickeConfiguration.cs` |
67
+ | **Infrastructure/Services** | `{Project}.Infrastructure/Services/{Context}/{Application}/{Module}/` | `Services/Business/Operations/FreeBicke/FreeBickeService.cs` |
68
+ | **Infrastructure/SeedData** | `{Project}.Infrastructure/Persistence/Seeding/Data/{Context}/{Application}/{Module}/` | `Seeding/Data/Business/Operations/FreeBicke/FreeBickeSeedData.cs` |
69
69
  | **API/Controllers** | `{Project}.Api/Controllers/Business/{Application}/` | `Controllers/Business/Operations/FreeBickeController.cs` |
70
70
  | **Frontend/Pages** | `web/src/pages/business/{application}/{module}/` | `pages/business/operations/freebicke/page.tsx` |
71
71
  | **Frontend/i18n** | `web/src/i18n/locales/{lang}/{module}.json` | `locales/fr/freebicke.json` |
@@ -1,6 +1,6 @@
1
1
  # Business Analysis - Elicitation & Interaction (_elicitation.md)
2
2
 
3
- > **Loaded by:** step-01-cadrage, step-03a-specify
3
+ > **Loaded by:** step-01-cadrage, step-03a-data
4
4
  > **Purpose:** Interactive questioning techniques, AskUserQuestion formatting, ULTRATHINK mode
5
5
 
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  # Business Analysis - Module Loop Protocol (_module-loop.md)
2
2
 
3
- > **Loaded by:** step-03a-specify, step-03b-compile
3
+ > **Loaded by:** step-03a-data, step-03b-ui, step-03c-compile, step-03d-validate
4
4
  > **Purpose:** State management and iteration logic for multi-module specification loop
5
5
 
6
6
  ---
@@ -31,7 +31,7 @@
31
31
  currentModule = moduleOrder[currentModuleIndex]
32
32
  Write master feature.json
33
33
  Display: "Module {name} complete. Next: {next_name} ({N}/{total})"
34
- RE-LOAD: steps/step-03a-specify.md
34
+ RE-LOAD: steps/step-03a-data.md
35
35
  4. ELSE:
36
36
  master.status = "specified"
37
37
  Load: steps/step-04-consolidation.md
@@ -50,7 +50,7 @@ To prevent context explosion as modules accumulate:
50
50
  1. ba-reader.findApplicationFeature() -> locate master feature.json
51
51
  2. Read metadata.workflow.currentModuleIndex
52
52
  3. IF currentModule has a feature.json with status != "validated":
53
- Resume step-03a-specify for that module
53
+ Resume step-03a-data for that module
54
54
  4. ELSE:
55
- Start step-03a-specify for next module
55
+ Start step-03a-data for next module
56
56
  ```
@@ -996,10 +996,10 @@
996
996
  <a class="nav-item active" onclick="showSection('cadrage-problem')" data-section="cadrage-problem">
997
997
  <span class="nav-icon">&#9679;</span> Probleme a resoudre
998
998
  </a>
999
- <a class="nav-item" onclick="showSection('cadrage-current')" data-section="cadrage-current">
999
+ <a class="nav-item" onclick="showSection('cadrage-current')" data-section="cadrage-current" data-vibe-hide>
1000
1000
  <span class="nav-icon">&#9679;</span> Situation actuelle
1001
1001
  </a>
1002
- <a class="nav-item" onclick="showSection('cadrage-vision')" data-section="cadrage-vision">
1002
+ <a class="nav-item" onclick="showSection('cadrage-vision')" data-section="cadrage-vision" data-vibe-hide>
1003
1003
  <span class="nav-icon">&#9679;</span> Situation souhaitee
1004
1004
  </a>
1005
1005
  <a class="nav-item" onclick="showSection('cadrage-stakeholders')" data-section="cadrage-stakeholders">
@@ -1073,12 +1073,12 @@
1073
1073
  <div class="editable" contenteditable="true" data-field="problem.description" data-placeholder="Decrivez le probleme que vous rencontrez aujourd'hui. Qu'est-ce qui ne fonctionne pas, ou pas assez bien ?"></div>
1074
1074
  </div>
1075
1075
 
1076
- <div class="card">
1076
+ <div class="card" data-vibe-hide>
1077
1077
  <div class="card-label">Qui est le plus impacte ?</div>
1078
1078
  <div class="editable" contenteditable="true" data-field="problem.impactedPeople" data-placeholder="Quelles personnes souffrent le plus de ce probleme au quotidien ? Quel impact sur leur travail ?"></div>
1079
1079
  </div>
1080
1080
 
1081
- <div class="card">
1081
+ <div class="card" data-vibe-hide>
1082
1082
  <div class="card-label">Depuis quand ce probleme existe-t-il ?</div>
1083
1083
  <div class="editable" contenteditable="true" data-field="problem.history" data-placeholder="Depuis combien de temps ce probleme existe-t-il ? A-t-il empire recemment ?"></div>
1084
1084
  </div>
@@ -1088,14 +1088,14 @@
1088
1088
  <div class="editable" contenteditable="true" data-field="problem.trigger" data-placeholder="Qu'est-ce qui a declenche cette demande maintenant ? Pourquoi pas il y a 6 mois ?"></div>
1089
1089
  </div>
1090
1090
 
1091
- <div class="card">
1091
+ <div class="card" data-vibe-hide>
1092
1092
  <div class="card-label">Consequences si le projet n'est pas realise</div>
1093
1093
  <div class="editable" contenteditable="true" data-field="problem.consequences" data-placeholder="Que se passerait-il si ce projet n'etait PAS realise ? Quelles consequences a court et moyen terme ?"></div>
1094
1094
  </div>
1095
1095
  </div>
1096
1096
 
1097
1097
  <!-- SECTION: Situation actuelle -->
1098
- <div class="section" id="cadrage-current" style="display:none;">
1098
+ <div class="section" id="cadrage-current" style="display:none;" data-vibe-hide>
1099
1099
  <h2 class="section-title">Situation actuelle</h2>
1100
1100
  <p class="section-subtitle">Comment les choses se passent aujourd'hui, concretement.</p>
1101
1101
 
@@ -1124,7 +1124,7 @@
1124
1124
  </div>
1125
1125
 
1126
1126
  <!-- SECTION: Situation souhaitee -->
1127
- <div class="section" id="cadrage-vision" style="display:none;">
1127
+ <div class="section" id="cadrage-vision" style="display:none;" data-vibe-hide>
1128
1128
  <h2 class="section-title">Situation souhaitee</h2>
1129
1129
  <p class="section-subtitle">Ce que le client veut obtenir, pas ce qu'il veut construire.</p>
1130
1130
 
@@ -1309,17 +1309,17 @@
1309
1309
  <div class="editable" contenteditable="true" data-field="success.definition" data-placeholder="Comment saurez-vous que le projet est un succes ? Quel changement concret observerez-vous ?"></div>
1310
1310
  </div>
1311
1311
 
1312
- <div class="card">
1312
+ <div class="card" data-vibe-hide>
1313
1313
  <div class="card-label">Objectifs mesurables</div>
1314
1314
  <div class="editable" contenteditable="true" data-field="success.metrics" data-placeholder="Quels chiffres presenteriez-vous a votre direction pour prouver le succes ? (temps, erreurs, satisfaction...)"></div>
1315
1315
  </div>
1316
1316
 
1317
- <div class="card">
1317
+ <div class="card" data-vibe-hide>
1318
1318
  <div class="card-label">Delai d'evaluation</div>
1319
1319
  <div class="editable" contenteditable="true" data-field="success.timeline" data-placeholder="Au bout de combien de temps pourrez-vous juger si ca fonctionne ? 1 semaine ? 1 mois ? 3 mois ?"></div>
1320
1320
  </div>
1321
1321
 
1322
- <div class="card">
1322
+ <div class="card" data-vibe-hide>
1323
1323
  <div class="card-label">Conditions minimales de mise en service</div>
1324
1324
  <div class="editable" contenteditable="true" data-field="success.minimumConditions" data-placeholder="Quelles conditions minimales pour mettre le systeme en service ? (fonctionnalites presentes, donnees migrees, formation faite...)"></div>
1325
1325
  </div>
@@ -1540,6 +1540,31 @@
1540
1540
  data.customRoles = data.customRoles || [];
1541
1541
  data.customActions = data.customActions || [];
1542
1542
  data.cadrage.criteria = data.cadrage.criteria || [];
1543
+ data.cadrage.risks = data.cadrage.risks || [];
1544
+ data.consolidation = data.consolidation || {};
1545
+ data.consolidation.e2eFlows = data.consolidation.e2eFlows || [];
1546
+
1547
+ // Defensive mapping: globalScope (feature.json format) → scope (HTML format)
1548
+ // Handles cases where FEATURE_DATA contains raw globalScope instead of pre-mapped scope
1549
+ if (!data.cadrage.scope || (!data.cadrage.scope.vital?.length && data.cadrage.globalScope)) {
1550
+ const gs = data.cadrage.globalScope || {};
1551
+ data.cadrage.scope = {
1552
+ vital: (gs.mustHave || []).map(s => typeof s === 'string' ? { name: s, description: '' } : s),
1553
+ important: (gs.shouldHave || []).map(s => typeof s === 'string' ? { name: s, description: '' } : s),
1554
+ optional: (gs.couldHave || []).map(s => typeof s === 'string' ? { name: s, description: '' } : s),
1555
+ excluded: (gs.outOfScope || []).map(s => typeof s === 'string' ? { name: s, description: '' } : s)
1556
+ };
1557
+ }
1558
+ data.cadrage.scope = data.cadrage.scope || { vital: [], important: [], optional: [], excluded: [] };
1559
+
1560
+ // Defensive init: moduleSpecs (may be missing if LLM didn't follow mapping)
1561
+ data.moduleSpecs = data.moduleSpecs || {};
1562
+
1563
+ // Vibe coding mode: hide non-relevant sections
1564
+ const isVibeCoding = data.metadata?.vibeCoding === true;
1565
+ if (isVibeCoding) {
1566
+ document.querySelectorAll('[data-vibe-hide]').forEach(el => el.style.display = 'none');
1567
+ }
1543
1568
 
1544
1569
  /* ============================================
1545
1570
  INITIALIZATION
@@ -1547,6 +1572,10 @@
1547
1572
  document.addEventListener('DOMContentLoaded', function() {
1548
1573
  loadFromLocalStorage();
1549
1574
  initEditableFields();
1575
+ // Re-apply vibe hiding after DOM init (in case loadFromLocalStorage changed data)
1576
+ if (isVibeCoding) {
1577
+ document.querySelectorAll('[data-vibe-hide]').forEach(el => el.style.display = 'none');
1578
+ }
1550
1579
  renderStakeholders();
1551
1580
  renderScope();
1552
1581
  renderRisks();
@@ -44,7 +44,7 @@
44
44
  > - Les rôles identifiés en Q6.1-Q6.4 sont des **ensembles de permissions**, pas des données métier
45
45
  > - L'accès est contrôlé par des permissions attribuées aux rôles, pas par des propriétés d'entité
46
46
  > - Ne jamais proposer de créer une entité `Role`, `UserRole`, ou un attribut `User.Role`
47
- > - Le mapping rôle → permissions se fait dans la **Permission Matrix** (step-03a-specify)
47
+ > - Le mapping rôle → permissions se fait dans la **Permission Matrix** (step-03c-compile)
48
48
 
49
49
  ## Elicitation Guide
50
50
 
@@ -1,6 +1,6 @@
1
1
  # Elicitation Questionnaire - Business Analysis
2
2
 
3
- > **Usage:** Structured questions for step-01-cadrage and step-03a-specify
3
+ > **Usage:** Structured questions for step-01-cadrage and step-03a-data
4
4
  > **Standard:** BABOK v3 - Elicitation Techniques (VibeCoding-focused)
5
5
  > **Model:** OPUS with ULTRATHINK
6
6
  > **Total:** ~68 targeted questions (dev-relevant only)
@@ -284,7 +284,7 @@
284
284
  | Phase | Categories utilisees |
285
285
  |-------|---------------------|
286
286
  | step-01-cadrage | 00 (si mode application), 01, 02, 03, 14, 15 + conditionnelles (05, 06, 08, 09, 10) |
287
- | step-03a-specify (par module) | 04, 07, 11, 12, 13 (chargees par module) |
287
+ | step-03a-data (par module) | 04, 07, 11, 12, 13 (chargees par module) |
288
288
 
289
289
  ### Phase de cadrage
290
290
 
@@ -1,7 +1,7 @@
1
1
  # React Components - Business Analyse Viewer
2
2
 
3
3
  > **Usage:** React component that renders feature.json directly
4
- > **Loaded in:** step-05b-deploy.md
4
+ > **Loaded in:** step-05d-html.md
5
5
  > **Data source (module):** `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
6
6
  > **Data source (application):** `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
7
7
  > **Related:** `react/application-viewer.md` for application-level view
@@ -1,7 +1,7 @@
1
1
  # TypeScript Schema - Feature JSON Types
2
2
 
3
3
  > **Usage:** TypeScript interfaces aligned with feature-schema.json and application-schema.json
4
- > **Loaded in:** step-05b-deploy.md (for web app rendering)
4
+ > **Loaded in:** step-05d-html.md (for web app rendering)
5
5
  > **Source (module):** `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
6
6
  > **Source (application):** `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
7
7
 
@@ -1,6 +1,6 @@
1
1
  # HTML Data Mapping Reference (references/html-data-mapping.md)
2
2
 
3
- > **Used by:** step-05b-deploy (section 3: Deploy Interactive HTML Document)
3
+ > **Used by:** step-05d-html (Deploy Interactive HTML), step-03d-validate (incremental HTML)
4
4
  > **Purpose:** Exact mapping from feature.json to HTML FEATURE_DATA and EMBEDDED_ARTIFACTS objects
5
5
 
6
6
  ---
@@ -16,7 +16,8 @@ Build a JSON object following this **exact mapping** from feature.json to the HT
16
16
  applicationId: master.id, // e.g. "FEAT-001"
17
17
  version: master.version, // e.g. "1.0"
18
18
  createdAt: master.metadata.createdAt,
19
- lastModified: master.metadata.updatedAt
19
+ lastModified: master.metadata.updatedAt,
20
+ vibeCoding: master.metadata.vibeCoding || false // true if vibe coding mode
20
21
  },
21
22
  cadrage: {
22
23
  problem: {
@@ -282,7 +283,7 @@ EMBEDDED_ARTIFACTS.dependencyGraph = {
282
283
 
283
284
  ---
284
285
 
285
- ## Usage in step-05b-deploy
286
+ ## Usage in step-05d-html
286
287
 
287
288
  1. Serialize the FEATURE_DATA object as JSON (with 2-space indentation for readability)
288
289
  2. Serialize the EMBEDDED_ARTIFACTS object as JSON (with 2-space indentation)
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
 
46
- "$comment": "Sub-schema loading guide per BA step: step-00-init → metadata-schema.json | step-01-cadrage → discovery-schema.json (module) OR application-schema.json (master) | step-02-decomposition → application-schema.json (modules[], dependencyGraph) | step-03a-specify → analysis-schema.json | step-03b-compile → specification-schema.json | step-04-consolidation → validation-schema.json + application-schema.json (consolidation) | step-05a-handoff → handoff-schema.json | step-05b-deploy → (artifacts only)",
46
+ "$comment": "Sub-schema loading guide per BA step: step-00-init → metadata-schema.json | step-01-cadrage → discovery-schema.json (module) OR application-schema.json (master) | step-02-decomposition → application-schema.json (modules[], dependencyGraph) | step-03a-data → analysis-schema.json | step-03b-ui → specification-schema.json (wireframes, layouts) | step-03c-compile → specification-schema.json | step-03d-validate → validation-schema.json | step-04-consolidation → validation-schema.json + application-schema.json (consolidation) | step-05a-handoff → handoff-schema.json | step-05b-mapping → handoff-schema.json (brToCodeMapping, apiEndpointSummary) | step-05c-deploy → (prd, progress, manifest) | step-05d-html → (ba-interactive.html)",
47
47
 
48
48
  "$defs": {
49
49
  "stepStatus": { "$ref": "shared/common-defs.json#/$defs/stepStatus" },
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "analysis-schema.json",
4
4
  "title": "SmartStack BA - Analysis",
5
- "description": "Module-level analysis: objectives, business rules, entities, process flows, integrations, data lifecycle. Enriched by step-03a-specify.",
5
+ "description": "Module-level analysis: objectives, business rules, entities, process flows, integrations, data lifecycle. Enriched by step-03a-data.",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "objectives": {
@@ -24,6 +24,7 @@
24
24
  "permissionBase": { "type": "string", "description": "e.g., business.sales.orders" },
25
25
  "previousVersion": { "type": ["string", "null"] },
26
26
  "changeReason": { "type": ["string", "null"] },
27
+ "vibeCoding": { "type": "boolean", "default": false, "description": "True if project is built in vibe coding mode (developer + AI)" },
27
28
  "mcpAvailable": { "type": "boolean" },
28
29
  "scope": { "type": "string", "enum": ["application", "module"], "default": "module" },
29
30
  "applicationRef": { "type": ["string", "null"], "description": "Parent application feature ID (FEAT-XXX)" },
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "specification-schema.json",
4
4
  "title": "SmartStack BA - Specification",
5
- "description": "Module-level specification: actors, use cases, FRs, permissions, navigation, wireframes, dashboards, sections, resources. Enriched by step-03b-compile.",
5
+ "description": "Module-level specification: actors, use cases, FRs, permissions, navigation, wireframes, dashboards, sections, resources. Enriched by step-03c-compile.",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "actors": {
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: step-00-init
3
3
  description: Initialize Business Analysis - Auto-detect new/update, create feature.json
4
+ model: sonnet
4
5
  next_step: steps/step-01-cadrage.md
5
6
  ---
6
7
 
@@ -180,6 +181,31 @@ Ask via AskUserQuestion:
180
181
  language: string (code, e.g., "en", "fr")
181
182
  ```
182
183
 
184
+ ## Step 5b: Detect Development Mode
185
+
186
+ Determine if the project will be built in **vibe coding** mode (developer + AI) or by a human development team.
187
+
188
+ ```
189
+ Ask via AskUserQuestion:
190
+ question: "Comment allez-vous developper ce projet ?"
191
+ header: "Mode dev"
192
+ options:
193
+ - label: "Vibe coding (avec IA)"
194
+ description: "Je developpe moi-meme avec l'aide de l'IA — questionnaire allege"
195
+ - label: "Equipe de developpement"
196
+ description: "Une equipe humaine va developper — analyse complete"
197
+
198
+ IF user selects "Vibe coding (avec IA)":
199
+ vibe_coding = true
200
+ ELSE:
201
+ vibe_coding = false
202
+ ```
203
+
204
+ **Store:**
205
+ ```yaml
206
+ vibe_coding: boolean
207
+ ```
208
+
183
209
  ## Step 6: Generate Feature ID
184
210
 
185
211
  Create a unique feature identifier.
@@ -300,6 +326,7 @@ ba-writer.createApplicationFeature({
300
326
  language: {language},
301
327
  featureDescription: {feature_description},
302
328
  workflowType: {workflow_type},
329
+ vibeCoding: {vibe_coding},
303
330
  mcpAvailable: true,
304
331
  workflow: {
305
332
  mode: "application",
@@ -350,6 +377,7 @@ Update `.business-analyse/config.json` with new feature information.
350
377
  | Language | {language} |
351
378
  | Version | {version} |
352
379
  | MCP Available | true |
380
+ | Dev Mode | {vibe_coding ? "Vibe coding" : "Standard"} |
353
381
 
354
382
  NEXT STEP: step-01-cadrage
355
383
  ═══════════════════════════════════════════════════════════════
@@ -369,6 +397,7 @@ language: string
369
397
  docs_dir: string
370
398
  mcp_available: boolean
371
399
  workflow_mode: "application"
400
+ vibe_coding: boolean
372
401
  version: string
373
402
  ```
374
403