@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,10 +2,95 @@
2
2
  CONSOLIDATION
3
3
  ============================================ */
4
4
  function renderConsolidation() {
5
+ renderDataModel();
5
6
  renderConsolInteractions();
6
7
  renderConsolPermissions();
7
8
  }
8
9
 
10
+ /* ============================================
11
+ DATA MODEL (cross-module entity overview)
12
+ ============================================ */
13
+ function renderDataModel() {
14
+ const container = document.getElementById('dataModelContainer');
15
+ if (!container) return;
16
+
17
+ // Collect all entities from all modules
18
+ const allEntities = [];
19
+ data.modules.forEach(m => {
20
+ const spec = data.moduleSpecs[m.code] || {};
21
+ (spec.entities || []).forEach(ent => {
22
+ allEntities.push({ ...ent, moduleCode: m.code, moduleName: m.name || m.code });
23
+ });
24
+ });
25
+
26
+ if (allEntities.length === 0) {
27
+ container.innerHTML = '<p style="color:var(--text-muted);text-align:center;padding:2rem;">Aucune entite definie. Specifiez les donnees dans chaque domaine (Phase 3 > onglet Donnees).</p>';
28
+ return;
29
+ }
30
+
31
+ // Build relationship index for cross-module links
32
+ const entityModuleMap = {};
33
+ allEntities.forEach(e => { entityModuleMap[e.name] = e.moduleName; });
34
+
35
+ // Render grouped by module
36
+ let html = '';
37
+
38
+ // Summary bar
39
+ const moduleCount = data.modules.filter(m => (data.moduleSpecs[m.code]?.entities || []).length > 0).length;
40
+ const relCount = allEntities.reduce((sum, e) => sum + (e.relationships || []).length, 0);
41
+ html += `
42
+ <div class="dm-summary">
43
+ <div class="dm-summary-item"><span class="dm-summary-value">${allEntities.length}</span><span class="dm-summary-label">Entites</span></div>
44
+ <div class="dm-summary-item"><span class="dm-summary-value">${moduleCount}</span><span class="dm-summary-label">Domaines</span></div>
45
+ <div class="dm-summary-item"><span class="dm-summary-value">${relCount}</span><span class="dm-summary-label">Relations</span></div>
46
+ </div>`;
47
+
48
+ // Entity cards grouped by module
49
+ data.modules.forEach(m => {
50
+ const spec = data.moduleSpecs[m.code] || {};
51
+ const entities = spec.entities || [];
52
+ if (entities.length === 0) return;
53
+
54
+ html += `<div class="dm-module-group">`;
55
+ html += `<div class="dm-module-header">
56
+ <span class="dm-module-name">${m.name || m.code}</span>
57
+ <span class="dm-module-count">${entities.length} entite${entities.length > 1 ? 's' : ''}</span>
58
+ </div>`;
59
+
60
+ html += `<div class="dm-entity-grid">`;
61
+ entities.forEach(ent => {
62
+ const attrs = ent.attributes || [];
63
+ const rels = ent.relationships || [];
64
+ html += `
65
+ <div class="dm-entity-card">
66
+ <div class="dm-entity-header">
67
+ <span class="dm-entity-name">${ent.name}</span>
68
+ <span class="dm-entity-attr-count">${attrs.length} champ${attrs.length > 1 ? 's' : ''}</span>
69
+ </div>
70
+ ${ent.description ? `<div class="dm-entity-desc">${ent.description}</div>` : ''}
71
+ ${attrs.length > 0 ? `
72
+ <table class="dm-attr-table">
73
+ <thead><tr><th>Champ</th><th>Description</th></tr></thead>
74
+ <tbody>
75
+ ${attrs.map(a => `<tr><td class="dm-attr-name">${a.name}</td><td class="dm-attr-desc">${a.description || ''}</td></tr>`).join('')}
76
+ </tbody>
77
+ </table>` : ''}
78
+ ${rels.length > 0 ? `
79
+ <div class="dm-relations">
80
+ <div class="dm-relations-title">Relations</div>
81
+ ${rels.map(r => {
82
+ const relText = typeof r === 'string' ? r : (r.target + ' (' + r.type + ') - ' + (r.description || ''));
83
+ return `<div class="dm-relation-item">${relText}</div>`;
84
+ }).join('')}
85
+ </div>` : ''}
86
+ </div>`;
87
+ });
88
+ html += `</div></div>`;
89
+ });
90
+
91
+ container.innerHTML = html;
92
+ }
93
+
9
94
  function renderConsolInteractions() {
10
95
  const container = document.getElementById('consolInteractions');
11
96
  if (!container || data.dependencies.length === 0) return;
@@ -323,3 +323,68 @@
323
323
  }
324
324
  .e2e-step-module { font-weight: 600; color: var(--primary-light); font-size: 0.65rem; }
325
325
  .e2e-step-action { color: var(--text-bright); }
326
+
327
+ /* ============================================
328
+ DATA MODEL (Consolidation)
329
+ ============================================ */
330
+ .dm-summary {
331
+ display: flex; gap: 1.5rem; margin-bottom: 1.5rem;
332
+ padding: 1rem 1.5rem; background: var(--bg-card);
333
+ border: 1px solid var(--border); border-radius: 10px;
334
+ }
335
+ .dm-summary-item { display: flex; align-items: baseline; gap: 0.4rem; }
336
+ .dm-summary-value { font-size: 1.4rem; font-weight: 700; color: var(--text-bright); }
337
+ .dm-summary-label { font-size: 0.8rem; color: var(--text-muted); }
338
+ .dm-module-group { margin-bottom: 1.5rem; }
339
+ .dm-module-header {
340
+ display: flex; align-items: center; justify-content: space-between;
341
+ padding: 0.5rem 0; margin-bottom: 0.75rem;
342
+ border-bottom: 2px solid var(--primary);
343
+ }
344
+ .dm-module-name { font-weight: 700; color: var(--primary-light); font-size: 1rem; }
345
+ .dm-module-count { font-size: 0.75rem; color: var(--text-muted); }
346
+ .dm-entity-grid {
347
+ display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem;
348
+ }
349
+ .dm-entity-card {
350
+ background: var(--bg-card); border: 1px solid var(--border);
351
+ border-radius: 10px; overflow: hidden;
352
+ transition: border-color var(--transition-fast);
353
+ }
354
+ .dm-entity-card:hover { border-color: var(--border-light); }
355
+ .dm-entity-header {
356
+ display: flex; align-items: center; justify-content: space-between;
357
+ padding: 0.6rem 0.75rem; background: var(--bg-hover);
358
+ border-bottom: 1px solid var(--border);
359
+ }
360
+ .dm-entity-name { font-weight: 600; color: var(--text-bright); font-size: 0.95rem; }
361
+ .dm-entity-attr-count {
362
+ font-size: 0.65rem; color: var(--text-muted);
363
+ background: rgba(99,102,241,0.1); padding: 0.1rem 0.4rem; border-radius: 4px;
364
+ }
365
+ .dm-entity-desc {
366
+ padding: 0.5rem 0.75rem; font-size: 0.8rem; color: var(--text-muted);
367
+ border-bottom: 1px solid var(--border);
368
+ }
369
+ .dm-attr-table { width: 100%; border-collapse: collapse; }
370
+ .dm-attr-table th {
371
+ text-align: left; font-size: 0.65rem; text-transform: uppercase;
372
+ letter-spacing: 0.05em; color: var(--text-muted); padding: 0.4rem 0.75rem;
373
+ border-bottom: 1px solid var(--border); font-weight: 600;
374
+ }
375
+ .dm-attr-table td { padding: 0.35rem 0.75rem; font-size: 0.8rem; border-bottom: 1px solid rgba(51,65,85,0.2); }
376
+ .dm-attr-name { font-weight: 500; color: var(--text-bright); white-space: nowrap; }
377
+ .dm-attr-desc { color: var(--text-muted); }
378
+ .dm-relations {
379
+ padding: 0.5rem 0.75rem; border-top: 1px solid var(--border);
380
+ background: rgba(6,182,212,0.03);
381
+ }
382
+ .dm-relations-title {
383
+ font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
384
+ color: var(--accent); font-weight: 600; margin-bottom: 0.3rem;
385
+ }
386
+ .dm-relation-item {
387
+ font-size: 0.8rem; color: var(--text); padding: 0.15rem 0;
388
+ padding-left: 0.75rem; border-left: 2px solid var(--accent);
389
+ margin-bottom: 0.2rem;
390
+ }
@@ -96,6 +96,10 @@
96
96
  <!-- Phase 4 : Consolidation -->
97
97
  <div class="nav-group">
98
98
  <div class="nav-group-title">4. Consolidation</div>
99
+ <a class="nav-item" onclick="showSection('consol-datamodel')" data-section="consol-datamodel">
100
+ <span class="nav-icon">&#9679;</span> Modele de donnees
101
+ <span class="nav-badge" id="entityCount">0</span>
102
+ </a>
99
103
  <a class="nav-item" onclick="showSection('consol-interactions')" data-section="consol-interactions">
100
104
  <span class="nav-icon">&#9679;</span> Interactions
101
105
  </a>
@@ -500,6 +504,15 @@
500
504
  PHASE 4 : CONSOLIDATION
501
505
  ================================================================ -->
502
506
 
507
+ <!-- SECTION: Modele de donnees -->
508
+ <div class="section" id="consol-datamodel" style="display:none;">
509
+ <h2 class="section-title">Modele de donnees</h2>
510
+ <p class="section-subtitle">Vue d'ensemble de toutes les entites metier, leurs attributs et leurs relations entre domaines.</p>
511
+ <div id="dataModelContainer">
512
+ <p style="color:var(--text-muted);text-align:center;padding:2rem;">Le modele de donnees sera genere a partir des specifications de chaque domaine.</p>
513
+ </div>
514
+ </div>
515
+
503
516
  <!-- SECTION: Interactions cross-module -->
504
517
  <div class="section" id="consol-interactions" style="display:none;">
505
518
  <h2 class="section-title">Interactions entre domaines</h2>
@@ -1,7 +1,7 @@
1
1
  # Elicitation Questionnaire - Business Analysis
2
2
 
3
3
  > **Usage:** Structured questions for step-01-cadrage and step-03a-data
4
- > **Standard:** BABOK v3 - Elicitation Techniques (VibeCoding-focused)
4
+ > **Standard:** BABOK v3 - Elicitation Techniques (Interactive analysis)
5
5
  > **Model:** OPUS with ULTRATHINK
6
6
  > **Total:** ~68 targeted questions (dev-relevant only)
7
7
 
@@ -132,9 +132,7 @@ for (const file of questionnaireFiles) {
132
132
  // (Questionnaires no longer needed)
133
133
  ```
134
134
 
135
- **Optimization:** Only load questionnaires that will be used based on `vibe_coding` flag:
136
- - If `vibe_coding = true`: Load only 00, 01, 02, 03, 14, 15 (core 6 files, ~31KB)
137
- - If `vibe_coding = false`: Load all 16 files (~56KB)
135
+ **Optimization:** Cadrage uses targeted questionnaires (selected questions from 01-context, 02-stakeholders, 03-scope, 14-risks, 15-success) — not all questions are asked. Module-level questionnaires (04, 07, 11, 12, 13) are loaded on demand in step-03.
138
136
 
139
137
  ---
140
138
 
@@ -167,7 +165,7 @@ Total: ~12KB, 1 file
167
165
  ├── spec-auto-inference.md (~8KB)
168
166
  ├── ui-resource-cards.md (~6KB)
169
167
  ├── ui-dashboard-spec.md (~5KB)
170
- └── cadrage-vibe-coding.md (~4KB)
168
+ └── cadrage-pre-analysis.md (~4KB)
171
169
 
172
170
  Total: ~23KB, 4 files
173
171
  ```
@@ -189,7 +187,7 @@ const moduleRefs = [
189
187
  "spec-auto-inference.md",
190
188
  "ui-resource-cards.md",
191
189
  "ui-dashboard-spec.md",
192
- "cadrage-vibe-coding.md"
190
+ "cadrage-pre-analysis.md"
193
191
  ];
194
192
  for (const file of moduleRefs) {
195
193
  read(`~/.claude/skills/business-analyse/references/${file}`);
@@ -254,15 +252,9 @@ const htmlTemplate = read("~/.claude/skills/business-analyse/html/ba-interactive
254
252
  // 1. Schemas (42KB, 9 files) - CRITICAL
255
253
  glob("schemas/**/*.json").forEach(f => read(f));
256
254
 
257
- // 2. Questionnaires (31-56KB, 6-16 files) - HIGH
258
- // Conditional on vibe_coding flag
259
- if (vibe_coding) {
260
- ["00", "01", "02", "03", "14", "15"].forEach(n =>
261
- read(`questionnaire/${n}-*.md`)
262
- );
263
- } else {
264
- glob("questionnaire/*.md").forEach(f => read(f));
265
- }
255
+ // 2. Core questionnaires (01, 02, 03, 14, 15) - pre-loaded for cadrage
256
+ // Cadrage uses targeted questions from these 5 core questionnaires
257
+ // Module-level questionnaires (04, 07, 11, 12, 13) deferred to step-03
266
258
 
267
259
  // 3. Suggestion catalog (12KB, 1 file) - HIGH
268
260
  read("patterns/suggestion-catalog.md");
@@ -304,7 +296,7 @@ const moduleRefs = [
304
296
  "spec-auto-inference.md",
305
297
  "ui-resource-cards.md",
306
298
  "ui-dashboard-spec.md",
307
- "cadrage-vibe-coding.md"
299
+ "cadrage-pre-analysis.md"
308
300
  ];
309
301
  moduleRefs.forEach(f => read(`references/${f}`));
310
302
 
@@ -455,7 +447,7 @@ Step-${currentStep} cache statistics:
455
447
  ```javascript
456
448
  // Step-00: Analyze feature_description to predict workflow
457
449
  const predictions = {
458
- willNeedQuestionnaires: !vibe_coding, // Full questionnaires if not vibe coding
450
+ willNeedQuestionnaires: false, // Cadrage uses zero questions (auto-inferred)
459
451
  willBeMultiModule: detectMultiModuleKeywords(feature_description), // "modules", "applications"
460
452
  estimatedModuleCount: estimateModuleCount(feature_description) // 1-10
461
453
  };
@@ -466,13 +458,9 @@ if (predictions.willBeMultiModule && predictions.estimatedModuleCount > 3) {
466
458
  loadModuleReferences();
467
459
  }
468
460
 
469
- if (!predictions.willNeedQuestionnaires) {
470
- // Vibe coding only load 6 core questionnaires
471
- loadCoreQuestionnaires();
472
- } else {
473
- // Full analysis → load all 16 questionnaires
474
- loadAllQuestionnaires();
475
- }
461
+ // Interactive cadrage → load 5 core questionnaires (01, 02, 03, 14, 15)
462
+ // Module-level questionnaires (04, 07, 11, 12, 13) loaded on demand in step-03
463
+ loadCoreQuestionnaires();
476
464
  ```
477
465
 
478
466
  **Benefits:**
@@ -0,0 +1,112 @@
1
+ # Cadrage: Pre-Analysis Reference
2
+
3
+ > Reference for step-01-cadrage.md — silent pre-analysis to PREPARE the interactive conversation.
4
+ > **This file does NOT replace the conversation — it prepares it.**
5
+
6
+ ## Purpose
7
+
8
+ Before engaging the client, the AI silently analyzes the `{feature_description}` to:
9
+ 1. Understand what was said (extract explicit requirements)
10
+ 2. Detect what was NOT said (identify shadow zones to challenge)
11
+ 3. Prepare targeted questions (not generic ones)
12
+ 4. Pre-identify modules, sections, and resources
13
+
14
+ **The output of this pre-analysis is INTERNAL ONLY.** It is never shown directly to the client — it feeds the reformulation (Phase 2) and challenge questions (Phase 3).
15
+
16
+ ## Pre-Analysis Rules
17
+
18
+ ### 1. Problem Type Inference
19
+
20
+ Derive the problem type from `{feature_description}` keywords:
21
+
22
+ ```yaml
23
+ problem_type:
24
+ → Keywords "remplacer", "migrer", "existant" → "replace" (existing tool to replace)
25
+ → Keywords "automatiser", "manuel", "processus" → "automate" (manual process to automate)
26
+ → Keywords "centraliser", "dispersees", "eparpillees" → "centralize" (data scattered across systems)
27
+ → Default (new tool) → "new_tool" (no system in place)
28
+ ```
29
+
30
+ ### 2. Explicit Module/Feature Extraction
31
+
32
+ Extract functional areas explicitly mentioned in the description:
33
+
34
+ ```yaml
35
+ detected_modules:
36
+ → For each distinct functional area mentioned:
37
+ - name: "{PascalCase module name}"
38
+ - description: "{what the user said about it}"
39
+ - detected_sections: ["{inferred sections based on description}"]
40
+ - detected_resources: ["{inferred resources}"]
41
+ ```
42
+
43
+ ### 3. Shadow Zone Detection (CRITICAL)
44
+
45
+ > **Shadow zones are the most valuable output of pre-analysis.**
46
+ > They become the challenge questions in Phase 3.
47
+
48
+ For EACH detected module, check for missing information:
49
+
50
+ | What to check | Shadow zone if missing | Challenge question pattern |
51
+ |--------------|----------------------|--------------------------|
52
+ | Stakeholders | Who uses this module? | "Who interacts with {module} daily? Only {mentioned role} or also managers, admins, external users?" |
53
+ | Cardinality | Relationships stated as fact | "You said {A} is 1:1 with {B}. Can {A} exist without {B}? Can {B} have multiple {A}?" |
54
+ | Granularity | Level of detail unclear | "What granularity for {feature}? Day, half-day, hour? Single entry or batch?" |
55
+ | Reports | Mentioned but not detailed | "Which reports exactly? For whom? What format? How often?" |
56
+ | Validation workflow | Actions without approval | "Does {action} require approval? Who validates? What happens if rejected?" |
57
+ | Edge cases | Only happy path described | "What happens when {something goes wrong}? When data is incomplete? When two users do it simultaneously?" |
58
+ | Non-functional | Security, performance, compliance | "Is there sensitive data (GDPR)? Expected concurrent users? Compliance requirements?" |
59
+ | Integration | Standalone or connected | "Does {module} need to exchange data with external systems? Import? Export? API?" |
60
+
61
+ ### 4. Domain-Specific Anticipation Patterns
62
+
63
+ When the problem domain is identified, pre-load domain-specific needs:
64
+
65
+ | Domain keywords | Anticipated needs (suggest in Phase 4) |
66
+ |----------------|---------------------------------------|
67
+ | RH, employes, personnel | Contrats, competences, organigramme, RGPD, conges, jours feries, calendriers |
68
+ | Temps, activites, absences | Granularite saisie, validation manageriale, soldes conges, compteurs, export paie |
69
+ | Ventes, commandes, clients | Devis, factures, pipeline, relances, taux conversion, segments client |
70
+ | Stock, inventaire, produits | Categories, fournisseurs, seuils reapprovisionnement, mouvements, valorisation |
71
+ | Projets, taches, planning | Jalons, ressources, Gantt, charge, budget, risques projet |
72
+ | Tickets, support, incidents | SLA, escalade, base connaissances, satisfaction, priorites |
73
+ | Documents, GED | Versionning, workflows validation, templates, OCR, archivage legal |
74
+
75
+ ### 5. Section & Resource Pre-Identification
76
+
77
+ For each detected module, anticipate sections (Level 4) and resources (Level 5) based on feature type:
78
+
79
+ | Feature type | Standard sections | Standard resources per section |
80
+ |-------------|------------------|------------------------------|
81
+ | data-centric | list, detail, create, edit | {entity}-grid, {entity}-form, {entity}-card |
82
+ | workflow | list, detail, create, edit, approve, history | {entity}-grid, {entity}-form, approval-panel, status-timeline |
83
+ | reporting | dashboard, detail, export | summary-chart, kpi-cards, export-panel |
84
+ | integration | list, detail, config, sync, logs | sync-status-grid, config-form, log-viewer |
85
+
86
+ **Always check:** Does the user's description imply additional sections beyond the standard set? (e.g., "reports" → dashboard + export, "calendar view" → calendar section)
87
+
88
+ ## Output Format (Internal Only)
89
+
90
+ ```yaml
91
+ pre_analysis:
92
+ problem_type: "new_tool|replace|automate|centralize"
93
+ detected_modules:
94
+ - name: "ModuleName"
95
+ description: "What the user said"
96
+ detected_sections: ["list", "detail", "create"]
97
+ detected_resources: ["entity-grid", "entity-form"]
98
+ shadow_zones:
99
+ - topic: "Cardinality Employee-User"
100
+ why_it_matters: "1:1 assumption may not hold for temp workers"
101
+ challenge_question: "Can a user be linked to multiple employee records?"
102
+ - topic: "Report granularity"
103
+ why_it_matters: "Reports mentioned but not specified"
104
+ challenge_question: "Which reports exactly? For whom? What format?"
105
+ anticipated_suggestions:
106
+ - suggestion: "Leave balance management"
107
+ justification: "Time tracking without leave balances is incomplete"
108
+ module: "TimeTracking"
109
+ - suggestion: "GDPR compliance module"
110
+ justification: "HR data is personal data under GDPR"
111
+ module: "Employees"
112
+ ```
@@ -63,11 +63,16 @@
63
63
  "category": "mustHave|shouldHave|couldHave|outOfScope|implicit",
64
64
  "module": "Users",
65
65
  "ucRef": "UC-UM-001",
66
- "notes": "Foundation module, must be implemented first"
66
+ "notes": "Foundation module, must be implemented first",
67
+ "anticipatedSections": ["list", "detail", "create", "edit"],
68
+ "anticipatedResources": ["user-grid", "user-form", "user-card"]
67
69
  }
68
70
  ```
69
71
  **MANDATORY fields:** `item`, `category`, `module`
72
+ **OPTIONAL fields:** `ucRef`, `notes`, `anticipatedSections`, `anticipatedResources`
70
73
  **category values:** `mustHave`, `shouldHave`, `couldHave`, `outOfScope`, `implicit` (camelCase)
74
+ **anticipatedSections:** Array of section codes (Level 4) — e.g., `["list", "detail", "create", "edit", "dashboard", "export"]`
75
+ **anticipatedResources:** Array of resource codes (Level 5) — e.g., `["user-grid", "user-form", "user-card"]`
71
76
  **FORBIDDEN fields:** Do NOT use `id`, `feature`, `priority`. Use `item` + `category`.
72
77
 
73
78
  ## codebaseContext
@@ -11,7 +11,7 @@ const FEATURE_DATA = {
11
11
  applicationId: master.feature_id,
12
12
  version: master.version,
13
13
  createdAt: ISO_TIMESTAMP,
14
- vibeCoding: master.metadata.vibeCoding // "enabled" or "disabled" — controls UI section visibility
14
+ analysisMode: master.metadata.analysisMode || "interactive" // always "interactive" — analysis is always interactive
15
15
  },
16
16
  cadrage: {
17
17
  goal: master.cadrage.goal,
@@ -17,7 +17,7 @@ Build a JSON object following this **exact mapping** from feature.json to the HT
17
17
  version: master.version, // e.g. "1.0"
18
18
  createdAt: master.metadata.createdAt,
19
19
  lastModified: master.metadata.updatedAt,
20
- vibeCoding: master.metadata.vibeCoding || false // true if vibe coding mode
20
+ analysisMode: master.metadata.analysisMode || "interactive" // always "interactive"
21
21
  },
22
22
  cadrage: {
23
23
  problem: {
@@ -407,7 +407,7 @@ WHY: This will cause FK constraint violation in database
407
407
  HOW TO FIX:
408
408
  Option 1: Create "Task" entity in Projects module
409
409
  Option 2: Remove reference from TimeEntry (change taskId to projectId)
410
- WHERE: Return to step-03a-data.md for TimeTracking module
410
+ WHERE: Return to step-03a1-setup.md for TimeTracking module
411
411
  ```
412
412
 
413
413
  ---
@@ -1,6 +1,6 @@
1
1
  # Specification: Auto-Inference Rules
2
2
 
3
- > Reference for step-03a-data.md — convention/override depth auto-generation from entity definitions.
3
+ > Reference for step-03a1-setup.md — convention/override depth auto-generation from entity definitions.
4
4
 
5
5
  ## Entity Attribute → SmartTable Column
6
6
 
@@ -43,6 +43,16 @@
43
43
  "description": "Whether this is a new application or an update"
44
44
  },
45
45
  "mcpAvailable": { "type": "boolean" },
46
+ "analysisMode": {
47
+ "type": "string",
48
+ "const": "interactive",
49
+ "description": "Analysis mode — always interactive (AI listens, reformulates, challenges, validates)"
50
+ },
51
+ "tablePrefix": {
52
+ "type": "string",
53
+ "pattern": "^[a-z]{2,5}_$",
54
+ "description": "Application table prefix for database tables (e.g., rh_, fi_, crm_). Defined during cadrage, used by all entities in this application."
55
+ },
46
56
  "workflow": {
47
57
  "type": "object",
48
58
  "description": "Iterative module loop state",
@@ -173,7 +183,17 @@
173
183
  "category": { "type": "string", "enum": ["mustHave", "shouldHave", "couldHave", "outOfScope", "implicit"] },
174
184
  "module": { "type": ["string", "null"], "description": "Module code that covers this requirement (null if cross-cutting)" },
175
185
  "ucRef": { "type": ["string", "null"], "description": "UC ID if already assigned" },
176
- "notes": { "type": "string" }
186
+ "notes": { "type": "string" },
187
+ "anticipatedSections": {
188
+ "type": "array",
189
+ "items": { "type": "string" },
190
+ "description": "Anticipated sections (Level 4) for this requirement — e.g., list, detail, create, edit, dashboard"
191
+ },
192
+ "anticipatedResources": {
193
+ "type": "array",
194
+ "items": { "type": "string" },
195
+ "description": "Anticipated resources (Level 5) for this requirement — e.g., user-grid, user-form, user-card"
196
+ }
177
197
  }
178
198
  }
179
199
  }
@@ -230,6 +250,23 @@
230
250
  "estimatedComplexity": {
231
251
  "type": "string",
232
252
  "enum": ["simple", "medium", "complex"]
253
+ },
254
+ "anticipatedSections": {
255
+ "type": "array",
256
+ "description": "Anticipated sections (Level 4) with their resources (Level 5), from cadrage coverage matrix",
257
+ "items": {
258
+ "type": "object",
259
+ "required": ["code"],
260
+ "properties": {
261
+ "code": { "type": "string", "description": "Section code (e.g., list, detail, create, edit, dashboard)" },
262
+ "description": { "type": "string" },
263
+ "resources": {
264
+ "type": "array",
265
+ "items": { "type": "string" },
266
+ "description": "Anticipated resource codes for this section"
267
+ }
268
+ }
269
+ }
233
270
  }
234
271
  }
235
272
  }
@@ -24,7 +24,8 @@
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
+ "analysisMode": { "type": "string", "const": "interactive", "description": "Analysis mode always interactive (AI listens, reformulates, challenges, validates)" },
28
+ "tablePrefix": { "type": "string", "pattern": "^[a-z]{2,5}_$", "description": "Application table prefix inherited from parent (e.g., rh_, fi_, crm_)" },
28
29
  "mcpAvailable": { "type": "boolean" },
29
30
  "scope": { "type": "string", "enum": ["application", "module"], "default": "module" },
30
31
  "applicationRef": { "type": ["string", "null"], "description": "Parent application feature ID (FEAT-XXX)" },
@@ -9,6 +9,14 @@ next_step: steps/step-01-cadrage.md
9
9
 
10
10
  # Step 00: Initialize Business Analysis
11
11
 
12
+ **Before anything else**, display the version banner:
13
+
14
+ ```
15
+ ═══════════════════════════════════════════════════════════════
16
+ SmartStack Business Analyse — v{{SMARTSTACK_VERSION}}
17
+ ═══════════════════════════════════════════════════════════════
18
+ ```
19
+
12
20
  Initialize the business analysis workflow by auto-detecting whether this is a new application or an update to an existing one, then creating the initial feature.json structure.
13
21
 
14
22
  ## Flow
@@ -170,29 +178,16 @@ Ask via AskUserQuestion:
170
178
  language: string (code, e.g., "en", "fr")
171
179
  ```
172
180
 
173
- ## Step 5b: Detect Development Mode
181
+ ## Step 5b: Analysis Mode
174
182
 
175
- Determine if the project will be built in **vibe coding** mode (developer + AI) or by a human development team.
183
+ > The analysis phase is ALWAYS interactive the AI listens, reformulates,
184
+ > challenges, and validates with the user. This is non-negotiable regardless
185
+ > of development mode. Vibe coding applies to code execution (step-03+), NOT to analysis.
176
186
 
177
- ```
178
- Ask via AskUserQuestion:
179
- question: "Comment allez-vous developper ce projet ?"
180
- header: "Mode dev"
181
- options:
182
- - label: "Vibe coding (avec IA)"
183
- description: "Je developpe moi-meme avec l'aide de l'IA — questionnaire allege"
184
- - label: "Equipe de developpement"
185
- description: "Une equipe humaine va developper — analyse complete"
186
-
187
- IF user selects "Vibe coding (avec IA)":
188
- vibe_coding = true
189
- ELSE:
190
- vibe_coding = false
191
- ```
187
+ **Set directly (no question):**
192
188
 
193
- **Store:**
194
189
  ```yaml
195
- vibe_coding: boolean
190
+ analysisMode: "interactive" # Always interactive for cadrage
196
191
  ```
197
192
 
198
193
  ## Step 6: Generate Feature ID
@@ -288,7 +283,7 @@ ba-writer.createApplicationFeature({
288
283
  language: {language},
289
284
  featureDescription: {feature_description},
290
285
  workflowType: {workflow_type},
291
- vibeCoding: {vibe_coding},
286
+ analysisMode: "interactive",
292
287
  mcpAvailable: true,
293
288
  workflow: {
294
289
  mode: "application",
@@ -328,6 +323,7 @@ Update `.business-analyse/config.json` with new feature information.
328
323
  ```
329
324
  ═══════════════════════════════════════════════════════════════
330
325
  BUSINESS ANALYSIS INITIALIZATION COMPLETE
326
+ SmartStack CLI v{{SMARTSTACK_VERSION}}
331
327
  ═══════════════════════════════════════════════════════════════
332
328
 
333
329
  | Field | Value |
@@ -339,7 +335,7 @@ Update `.business-analyse/config.json` with new feature information.
339
335
  | Language | {language} |
340
336
  | Version | {version} |
341
337
  | MCP Available | true |
342
- | Dev Mode | {vibe_coding ? "Vibe coding" : "Standard"} |
338
+ | Analysis Mode | Interactive (always) |
343
339
 
344
340
  NEXT STEP: step-01-cadrage
345
341
  ═══════════════════════════════════════════════════════════════
@@ -359,7 +355,7 @@ language: string
359
355
  docs_dir: string
360
356
  mcp_available: boolean
361
357
  workflow_mode: "application"
362
- vibe_coding: boolean
358
+ analysisMode: "interactive"
363
359
  version: string
364
360
  ```
365
361