@atlashub/smartstack-cli 3.5.0 → 3.7.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 (34) hide show
  1. package/dist/index.js +13 -0
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/skills/business-analyse/SKILL.md +24 -19
  5. package/templates/skills/business-analyse/_architecture.md +1 -1
  6. package/templates/skills/business-analyse/_elicitation.md +1 -1
  7. package/templates/skills/business-analyse/_module-loop.md +4 -4
  8. package/templates/skills/business-analyse/html/ba-interactive.html +39 -10
  9. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  10. package/templates/skills/business-analyse/questionnaire.md +2 -2
  11. package/templates/skills/business-analyse/references/html-data-mapping.md +3 -2
  12. package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
  13. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
  14. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +1 -0
  15. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
  16. package/templates/skills/business-analyse/steps/step-00-init.md +37 -1
  17. package/templates/skills/business-analyse/steps/step-01-cadrage.md +166 -6
  18. package/templates/skills/business-analyse/steps/step-02-decomposition.md +4 -4
  19. package/templates/skills/business-analyse/steps/{step-03a-specify.md → step-03a-data.md} +10 -359
  20. package/templates/skills/business-analyse/steps/step-03b-ui.md +414 -0
  21. package/templates/skills/business-analyse/steps/step-03c-compile.md +343 -0
  22. package/templates/skills/business-analyse/steps/{step-03b-compile.md → step-03d-validate.md} +26 -308
  23. package/templates/skills/business-analyse/steps/step-04-consolidation.md +23 -2
  24. package/templates/skills/business-analyse/steps/step-05a-handoff.md +66 -46
  25. package/templates/skills/business-analyse/steps/step-05b-deploy.md +262 -212
  26. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  27. package/templates/skills/business-analyse/templates/tpl-launch-displays.md +1 -1
  28. package/templates/skills/controller/steps/step-03-generate.md +2 -1
  29. package/templates/skills/ralph-loop/SKILL.md +20 -5
  30. package/templates/skills/ralph-loop/references/core-seed-data.md +538 -0
  31. package/templates/skills/ralph-loop/steps/step-00-init.md +79 -1
  32. package/templates/skills/ralph-loop/steps/step-01-task.md +25 -2
  33. package/templates/skills/ralph-loop/steps/step-02-execute.md +39 -15
  34. package/templates/skills/ralph-loop/steps/step-04-check.md +87 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -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
 
@@ -59,8 +60,8 @@ docs/business/
59
60
  **Ralph Loop files (generated by step-05):**
60
61
  ```
61
62
  .ralph/
62
- ├── prd.json # Task breakdown for /ralph-loop -r
63
- └── progress.txt # Links to BA documents
63
+ ├── prd-{moduleCode}.json # Per-module task breakdown for /ralph-loop
64
+ └── progress.txt # Links to BA documents
64
65
  ```
65
66
 
66
67
  **Documentation integrated in SmartStack app:**
@@ -94,14 +95,14 @@ 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)
103
- - Display completion summary with `/ralph-loop -r` command
104
- - User reviews deliverables with stakeholders before launching development
104
+ - **Step 05a:** Handoff: file mapping (7 categories), BR-to-code mapping, API summary, write to feature.json
105
+ - **Step 05b:** Deploy: prd.json, progress.txt, manifest, ba-interactive.html pre-populated (handed-off)
105
106
 
106
107
  **Update workflow (same phases, delta focus):**
107
108
  - **Step 00:** Detection, locate existing feature, create version N+1
@@ -122,6 +123,7 @@ When step-00 detects that the description matches an existing application:
122
123
  | `{module_name}` | string | Target module name |
123
124
  | `{context}` | string | Always "business" for BA |
124
125
  | `{workflow_mode}` | string | "application" or "module" |
126
+ | `{vibe_coding}` | boolean | `true` if developer builds with AI assistance (accelerated questionnaire) |
125
127
  | `{docs_dir}` | string | `docs/business/{app}/{module}/business-analyse/v{X.Y}/` |
126
128
 
127
129
  </state_variables>
@@ -137,14 +139,16 @@ When step-00 detects that the description matches an existing application:
137
139
 
138
140
  | Step | File | Model | Purpose |
139
141
  | ---- | --------------------------------- | ------ | ---------------------------------------------------- |
140
- | 00 | `steps/step-00-init.md` | Haiku | Auto-detect new/update, scan existing, create master feature.json |
142
+ | 00 | `steps/step-00-init.md` | Sonnet | Auto-detect new/update, scan existing, create master feature.json |
141
143
  | 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 |
144
+ | 02 | `steps/step-02-decomposition.md` | Opus | Module decomposition, dependency graph, client checkpoint |
145
+ | 03a | `steps/step-03a-data.md` | Opus | Per-module: sections, entities, BRs, questionnaires |
146
+ | 03b | `steps/step-03b-ui.md` | Opus | Per-module: state machines, wireframes, layouts, dashboards |
147
+ | 03c | `steps/step-03c-compile.md` | Opus | Per-module: actors, UCs, FRs, permissions, nav, seed data, i18n |
148
+ | 03d | `steps/step-03d-validate.md` | Sonnet | Per-module: validation, write, incremental HTML, loop decision |
149
+ | 04 | `steps/step-04-consolidation.md` | Opus | Cross-module validation, E2E flows, permissions coherence |
150
+ | 05a | `steps/step-05a-handoff.md` | Sonnet | Handoff: file mapping (7 categories), BR-to-code mapping, API summary, write handoff |
151
+ | 05b | `steps/step-05b-deploy.md` | Sonnet | Deploy: prd.json, progress.txt, manifest, ba-interactive.html, auto-launch ralph-loop |
148
152
 
149
153
  </step_files>
150
154
 
@@ -188,7 +192,8 @@ Load ONLY relevant categories based on feature type:
188
192
  | spec | `templates/tpl-frd.md` | 02 |
189
193
  | handoff | `templates/tpl-handoff.md` | 04 |
190
194
  | suggestions | `patterns/suggestion-catalog.md` | 01 |
191
- | interactive | `html/ba-interactive.html` | 03b (incremental), 05b (final deploy) |
195
+ | interactive | `html/ba-interactive.html` | 03d (incremental), 05d (final deploy) |
196
+ | mapping | `references/html-data-mapping.md` | 03d, 05d (FEATURE_DATA + EMBEDDED_ARTIFACTS mapping) |
192
197
 
193
198
  </template_files>
194
199
 
@@ -197,7 +202,7 @@ Load ONLY relevant categories based on feature type:
197
202
  - **Load one step at a time** - Only load the current step file
198
203
  - **Load shared files conditionally** - Each step loads only the _shared files it needs (see step headers)
199
204
  - **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)
205
+ - **ULTRATHINK** for steps 01, 02, 03a-03c, 04 (critical thinking)
201
206
  - **State persisted in feature.json** (NOT markdown files)
202
207
  - **Use ba-writer agent** for all JSON writes
203
208
  - **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
4
4
  > **Purpose:** Provide architectural context for relevant questions and aligned recommendations
5
5
 
6
6
  ---
@@ -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,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-05b-deploy (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: {
@@ -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 (filesToCreate, brToCodeMapping, apiEndpointSummary) | step-05b-deploy → (prd, progress, manifest, 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
 
@@ -387,5 +416,12 @@ If initialization was interrupted:
387
416
 
388
417
  1. Check `.business-analyse/config.json` for currentFeature
389
418
  2. If feature ID exists, search for feature.json in `docs/business/`
390
- 3. If found, offer to resume from last completed step
419
+ 3. If found, check `metadata.workflow.lastCompletedStep`:
420
+ - If `"step-04-consolidation"` AND status = `"consolidated"`:
421
+ → Resume directly at `step-05a-handoff.md` (skip steps 00-04)
422
+ → Display: "Resuming from consolidation — proceeding to handoff..."
423
+ - If status = `"handed-off"` AND `.ralph/prd-*.json` files missing:
424
+ → Resume at `step-05b-deploy.md` (only deploy artifacts needed)
425
+ → Display: "Handoff complete but artifacts missing — deploying..."
426
+ - Otherwise: offer to resume from last completed step
391
427
  4. If not found, create fresh feature.json