@atlashub/smartstack-cli 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.documentation/prd-json-v2.0.0.md +396 -0
- package/.documentation/testing-ba-e2e.md +462 -0
- package/package.json +6 -2
- package/templates/skills/business-analyse/SKILL.md +34 -17
- package/templates/skills/business-analyse/html/ba-interactive.html +146 -57
- package/templates/skills/business-analyse/questionnaire.md +20 -15
- package/templates/skills/business-analyse/steps/step-00-init.md +80 -57
- package/templates/skills/business-analyse/steps/step-05-handoff.md +276 -8
- package/templates/skills/business-analyse/steps/step-06-extract.md +131 -3
- package/templates/skills/ralph-loop/SKILL.md +138 -20
- package/templates/skills/ralph-loop/steps/step-01-task.md +75 -18
- package/templates/skills/ralph-loop/steps/step-04-check.md +72 -5
|
@@ -374,6 +374,95 @@
|
|
|
374
374
|
min-height: 200px;
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
+
/* Wireframe rendering */
|
|
378
|
+
.ascii-wireframe {
|
|
379
|
+
font-family: 'Courier New', 'Consolas', monospace;
|
|
380
|
+
font-size: 0.7rem;
|
|
381
|
+
line-height: 1.3;
|
|
382
|
+
color: var(--primary-light);
|
|
383
|
+
background: var(--bg-dark);
|
|
384
|
+
padding: 1rem;
|
|
385
|
+
border-radius: 6px;
|
|
386
|
+
overflow-x: auto;
|
|
387
|
+
white-space: pre;
|
|
388
|
+
margin: 0;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.svg-wireframe {
|
|
392
|
+
background: var(--bg-dark);
|
|
393
|
+
padding: 1rem;
|
|
394
|
+
border-radius: 6px;
|
|
395
|
+
overflow-x: auto;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.svg-wireframe svg {
|
|
399
|
+
max-width: 100%;
|
|
400
|
+
height: auto;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.wireframe-description {
|
|
404
|
+
padding: 0.75rem 1rem;
|
|
405
|
+
font-size: 0.85rem;
|
|
406
|
+
color: var(--text);
|
|
407
|
+
border-top: 1px solid var(--border);
|
|
408
|
+
background: var(--bg-input);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.wireframe-metadata {
|
|
412
|
+
padding: 0.75rem 1rem;
|
|
413
|
+
font-size: 0.8rem;
|
|
414
|
+
color: var(--text-muted);
|
|
415
|
+
border-top: 1px solid var(--border);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.wireframe-details {
|
|
419
|
+
padding: 0.75rem 1rem;
|
|
420
|
+
border-top: 1px solid var(--border);
|
|
421
|
+
background: var(--bg-input);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.wireframe-details summary {
|
|
425
|
+
cursor: pointer;
|
|
426
|
+
font-size: 0.85rem;
|
|
427
|
+
color: var(--primary-light);
|
|
428
|
+
font-weight: 500;
|
|
429
|
+
user-select: none;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.wireframe-details summary:hover {
|
|
433
|
+
color: var(--primary);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.mapping-table {
|
|
437
|
+
width: 100%;
|
|
438
|
+
margin-top: 0.75rem;
|
|
439
|
+
border-collapse: collapse;
|
|
440
|
+
font-size: 0.8rem;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.mapping-table th {
|
|
444
|
+
background: var(--bg-hover);
|
|
445
|
+
padding: 0.5rem;
|
|
446
|
+
text-align: left;
|
|
447
|
+
font-weight: 500;
|
|
448
|
+
color: var(--text-bright);
|
|
449
|
+
border: 1px solid var(--border);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.mapping-table td {
|
|
453
|
+
padding: 0.5rem;
|
|
454
|
+
border: 1px solid var(--border);
|
|
455
|
+
color: var(--text);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.mapping-table code {
|
|
459
|
+
background: var(--bg-dark);
|
|
460
|
+
padding: 0.2rem 0.4rem;
|
|
461
|
+
border-radius: 3px;
|
|
462
|
+
font-size: 0.75rem;
|
|
463
|
+
color: var(--accent);
|
|
464
|
+
}
|
|
465
|
+
|
|
377
466
|
/* Mockup components */
|
|
378
467
|
.mock-header {
|
|
379
468
|
display: flex;
|
|
@@ -1407,6 +1496,7 @@
|
|
|
1407
1496
|
============================================ */
|
|
1408
1497
|
const APP_KEY = 'ba-{{APPLICATION_ID}}';
|
|
1409
1498
|
let data = {{FEATURE_DATA}};
|
|
1499
|
+
const EMBEDDED_ARTIFACTS = {{EMBEDDED_ARTIFACTS}};
|
|
1410
1500
|
|
|
1411
1501
|
/* ============================================
|
|
1412
1502
|
INITIALIZATION
|
|
@@ -1682,7 +1772,8 @@
|
|
|
1682
1772
|
modules: data.modules,
|
|
1683
1773
|
dependencies: data.dependencies,
|
|
1684
1774
|
moduleSpecifications: {},
|
|
1685
|
-
consolidation: data.consolidation
|
|
1775
|
+
consolidation: data.consolidation,
|
|
1776
|
+
artifacts: EMBEDDED_ARTIFACTS // NEW: Include visual artifacts
|
|
1686
1777
|
};
|
|
1687
1778
|
|
|
1688
1779
|
// Structure module specs for export
|
|
@@ -1700,8 +1791,8 @@
|
|
|
1700
1791
|
})),
|
|
1701
1792
|
entities: spec.entities || [],
|
|
1702
1793
|
permissions: spec.permissions || [],
|
|
1703
|
-
notes: spec.notes || ''
|
|
1704
|
-
mockupNotes:
|
|
1794
|
+
notes: spec.notes || ''
|
|
1795
|
+
// mockupNotes removed: wireframes now in artifacts
|
|
1705
1796
|
};
|
|
1706
1797
|
});
|
|
1707
1798
|
|
|
@@ -2132,60 +2223,9 @@
|
|
|
2132
2223
|
|
|
2133
2224
|
<!-- TAB: Maquettes -->
|
|
2134
2225
|
<div class="tab-panel" id="tab-${code}-mock">
|
|
2135
|
-
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
<div class="mockup-toolbar">
|
|
2139
|
-
<div class="mockup-dot mockup-dot-red"></div>
|
|
2140
|
-
<div class="mockup-dot mockup-dot-yellow"></div>
|
|
2141
|
-
<div class="mockup-dot mockup-dot-green"></div>
|
|
2142
|
-
<span class="mockup-title">${mod.name} - Liste</span>
|
|
2143
|
-
</div>
|
|
2144
|
-
<div class="mockup-content">
|
|
2145
|
-
<div class="mock-header">
|
|
2146
|
-
<div class="mock-title">${mod.name}</div>
|
|
2147
|
-
<div class="mock-btn">+ Nouveau</div>
|
|
2148
|
-
</div>
|
|
2149
|
-
<div class="mock-search">Rechercher...</div>
|
|
2150
|
-
<table class="mock-table">
|
|
2151
|
-
<thead><tr>
|
|
2152
|
-
${(mod.entities || []).slice(0, 1).length > 0 ? '<th>Identifiant</th><th>Nom</th><th>Statut</th><th>Date</th><th>Actions</th>' : '<th>Colonne 1</th><th>Colonne 2</th><th>Statut</th><th>Actions</th>'}
|
|
2153
|
-
</tr></thead>
|
|
2154
|
-
<tbody>
|
|
2155
|
-
<tr><td style="color:var(--primary-light);">001</td><td>Exemple 1</td><td><span class="mock-status mock-status-active">Actif</span></td><td>Aujourd'hui</td><td style="color:var(--text-muted);">Voir | Modifier</td></tr>
|
|
2156
|
-
<tr><td style="color:var(--primary-light);">002</td><td>Exemple 2</td><td><span class="mock-status mock-status-pending">En attente</span></td><td>Hier</td><td style="color:var(--text-muted);">Voir | Modifier</td></tr>
|
|
2157
|
-
<tr><td style="color:var(--primary-light);">003</td><td>Exemple 3</td><td><span class="mock-status mock-status-draft">Brouillon</span></td><td>Il y a 3 jours</td><td style="color:var(--text-muted);">Voir | Modifier</td></tr>
|
|
2158
|
-
</tbody>
|
|
2159
|
-
</table>
|
|
2160
|
-
</div>
|
|
2161
|
-
</div>
|
|
2162
|
-
|
|
2163
|
-
<div class="mockup-frame" style="margin-top:1rem;">
|
|
2164
|
-
<div class="mockup-toolbar">
|
|
2165
|
-
<div class="mockup-dot mockup-dot-red"></div>
|
|
2166
|
-
<div class="mockup-dot mockup-dot-yellow"></div>
|
|
2167
|
-
<div class="mockup-dot mockup-dot-green"></div>
|
|
2168
|
-
<span class="mockup-title">${mod.name} - Formulaire de creation</span>
|
|
2169
|
-
</div>
|
|
2170
|
-
<div class="mockup-content">
|
|
2171
|
-
<div class="mock-header">
|
|
2172
|
-
<div class="mock-title">Nouveau ${(mod.entities || [])[0] || 'enregistrement'}</div>
|
|
2173
|
-
</div>
|
|
2174
|
-
<div class="mock-form-row">
|
|
2175
|
-
<div class="mock-form-group"><div class="mock-label">Identifiant</div><div class="mock-input" style="color:var(--text-muted);">Genere automatiquement</div></div>
|
|
2176
|
-
<div class="mock-form-group"><div class="mock-label">Nom</div><div class="mock-input"></div></div>
|
|
2177
|
-
</div>
|
|
2178
|
-
<div class="mock-form-group"><div class="mock-label">Description</div><div class="mock-input" style="height:60px;"></div></div>
|
|
2179
|
-
<div class="mock-form-actions">
|
|
2180
|
-
<div class="mock-btn" style="background:var(--bg-hover);color:var(--text);">Annuler</div>
|
|
2181
|
-
<div class="mock-btn">Enregistrer</div>
|
|
2182
|
-
</div>
|
|
2183
|
-
</div>
|
|
2184
|
-
</div>
|
|
2185
|
-
|
|
2186
|
-
<div class="card" style="margin-top:1rem;">
|
|
2187
|
-
<div class="card-label">Notes sur les maquettes</div>
|
|
2188
|
-
<div class="editable" contenteditable="true" data-module-code="${code}" data-module-field="mockupNotes" data-placeholder="Ajoutez vos remarques sur les maquettes : elements manquants, disposition souhaitee, comportements particuliers...">${spec.mockupNotes || ''}</div>
|
|
2226
|
+
<p style="font-size:0.85rem;color:var(--text-muted);margin-bottom:1rem;">Maquettes validees lors de l'analyse. Ces wireframes montrent la structure exacte des ecrans de ce domaine.</p>
|
|
2227
|
+
<div id="mockupContainer-${code}">
|
|
2228
|
+
${renderModuleMockups(code)}
|
|
2189
2229
|
</div>
|
|
2190
2230
|
</div>
|
|
2191
2231
|
|
|
@@ -2328,6 +2368,55 @@
|
|
|
2328
2368
|
autoSave();
|
|
2329
2369
|
}
|
|
2330
2370
|
|
|
2371
|
+
function renderModuleMockups(code) {
|
|
2372
|
+
// Get embedded wireframes for this module
|
|
2373
|
+
const wireframes = EMBEDDED_ARTIFACTS?.wireframes?.[code] || [];
|
|
2374
|
+
|
|
2375
|
+
if (wireframes.length === 0) {
|
|
2376
|
+
return `
|
|
2377
|
+
<div class="card" style="text-align:center;padding:2rem;color:var(--text-muted);">
|
|
2378
|
+
<p>Aucune maquette disponible pour ce module.</p>
|
|
2379
|
+
<p style="font-size:0.85rem;margin-top:0.5rem;">Les maquettes seront generees lors de la specification detaillee.</p>
|
|
2380
|
+
</div>`;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
return wireframes.map((wf, i) => `
|
|
2384
|
+
<div class="mockup-frame" style="${i > 0 ? 'margin-top:1.5rem;' : ''}">
|
|
2385
|
+
<div class="mockup-toolbar">
|
|
2386
|
+
<div class="mockup-dot mockup-dot-red"></div>
|
|
2387
|
+
<div class="mockup-dot mockup-dot-yellow"></div>
|
|
2388
|
+
<div class="mockup-dot mockup-dot-green"></div>
|
|
2389
|
+
<span class="mockup-title">${wf.screen || wf.section}</span>
|
|
2390
|
+
</div>
|
|
2391
|
+
<div class="mockup-content">
|
|
2392
|
+
${wf.format === 'ascii'
|
|
2393
|
+
? `<pre class="ascii-wireframe">${wf.content || ''}</pre>`
|
|
2394
|
+
: `<div class="svg-wireframe">${wf.content || ''}</div>`}
|
|
2395
|
+
</div>
|
|
2396
|
+
${wf.description ? `
|
|
2397
|
+
<div class="wireframe-description">
|
|
2398
|
+
<strong>Description:</strong> ${wf.description}
|
|
2399
|
+
</div>` : ''}
|
|
2400
|
+
${(wf.elements || []).length > 0 ? `
|
|
2401
|
+
<div class="wireframe-metadata">
|
|
2402
|
+
<div><strong>Elements:</strong> ${wf.elements.join(', ')}</div>
|
|
2403
|
+
</div>` : ''}
|
|
2404
|
+
${(wf.componentMapping || []).length > 0 ? `
|
|
2405
|
+
<details class="wireframe-details">
|
|
2406
|
+
<summary>Mapping composants SmartStack</summary>
|
|
2407
|
+
<table class="mapping-table">
|
|
2408
|
+
<thead><tr><th>Element maquette</th><th>Composant React</th></tr></thead>
|
|
2409
|
+
<tbody>
|
|
2410
|
+
${wf.componentMapping.map(m =>
|
|
2411
|
+
`<tr><td>${m.wireframeElement}</td><td><code>${m.reactComponent}</code></td></tr>`
|
|
2412
|
+
).join('')}
|
|
2413
|
+
</tbody>
|
|
2414
|
+
</table>
|
|
2415
|
+
</details>` : ''}
|
|
2416
|
+
</div>
|
|
2417
|
+
`).join('');
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2331
2420
|
function renderPermissionGrid(code) {
|
|
2332
2421
|
const roles = data.cadrage.stakeholders.length > 0
|
|
2333
2422
|
? data.cadrage.stakeholders.map(s => s.role)
|
|
@@ -315,18 +315,23 @@ Chaque question conservee passe ce test :
|
|
|
315
315
|
|
|
316
316
|
| Categorie | Questions | Phase | Focus |
|
|
317
317
|
|-----------|-----------|-------|-------|
|
|
318
|
-
| 0. Identite de l'application |
|
|
319
|
-
| 1. Contexte metier |
|
|
320
|
-
| 2. Parties prenantes |
|
|
321
|
-
| 3. Perimetre fonctionnel |
|
|
322
|
-
| 4. Donnees |
|
|
323
|
-
| 5. Integrations |
|
|
324
|
-
| 6. Securite et acces |
|
|
325
|
-
| 7. Interface utilisateur |
|
|
326
|
-
| 8. Performance et qualite |
|
|
327
|
-
| 9. Contraintes |
|
|
328
|
-
| 10. Documentation |
|
|
329
|
-
|
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
318
|
+
| 0. Identite de l'application | 18 | step-01 (mode application) | Nom, domaines, profils |
|
|
319
|
+
| 1. Contexte metier | 32 | step-01 | Probleme, situation actuelle, vision, declencheur |
|
|
320
|
+
| 2. Parties prenantes | 33 | step-01 | Utilisateurs, taches, acces, changement |
|
|
321
|
+
| 3. Perimetre fonctionnel | 32 | step-01 | Priorites, parcours, besoins transversaux |
|
|
322
|
+
| 4. Donnees | 15 | step-03 (par module) | Entites et regles |
|
|
323
|
+
| 5. Integrations | 14 | step-01 (conditionnel) | Systemes et flux |
|
|
324
|
+
| 6. Securite et acces | 13 | step-01 (conditionnel) | Permissions et restrictions |
|
|
325
|
+
| 7. Interface utilisateur | 19 | step-03 (par module) | Ecrans et experience |
|
|
326
|
+
| 8. Performance et qualite | 8 | step-01 (conditionnel) | Temps de reponse et tests |
|
|
327
|
+
| 9. Contraintes | 6 | step-01 (conditionnel) | Technologies et dependances |
|
|
328
|
+
| 10. Documentation | 7 | step-01 (conditionnel) | Guides et formation |
|
|
329
|
+
| 11. Cycle de vie donnees | 14 | step-03 (conditionnel) | Retention, archivage, RGPD |
|
|
330
|
+
| 12. Migration et transition | 14 | step-03 (conditionnel) | Donnees existantes, cutover |
|
|
331
|
+
| 13. Impact inter-modules | 14 | step-03 (conditionnel) | Dependances, evenements |
|
|
332
|
+
| 14. Risques et hypotheses | 16 | step-01 | Risques, hypotheses, lecons du passe |
|
|
333
|
+
| 15. Criteres de reussite | 17 | step-01 | Indicateurs de succes, conditions d'acceptation |
|
|
334
|
+
| **Total noyau (01-03, 14-15)** | **130** | | **Toujours charges** |
|
|
335
|
+
| **Total avec app (00)** | **148** | | **Si mode application** |
|
|
336
|
+
| **Total conditionnel (04-13)** | **124** | | **Selon contexte** |
|
|
337
|
+
| **Total maximum possible** | **272** | | **Noyau + app + tous conditionnels** |
|
|
@@ -37,7 +37,6 @@ question_mode: false
|
|
|
37
37
|
refactor_mode: false
|
|
38
38
|
micro_mode: false
|
|
39
39
|
extract_mode: false
|
|
40
|
-
interactive_mode: false
|
|
41
40
|
application_mode: false # Multi-module application analysis
|
|
42
41
|
```
|
|
43
42
|
|
|
@@ -52,7 +51,6 @@ application_mode: false # Multi-module application analysis
|
|
|
52
51
|
| `-q` | `--question` | Question mode | next arg = FEAT-ID, remaining = question text |
|
|
53
52
|
| `-r` | `--refactor` | Refactoring mode | next arg = FEAT-ID, remaining = change description |
|
|
54
53
|
| `-m` | `--micro` | Micro feature mode | none |
|
|
55
|
-
| `-i` | `--interactive` | Interactive mode | none |
|
|
56
54
|
| `-x` | `--extract` | Extract mode: import from interactive HTML export | next arg = JSON file path |
|
|
57
55
|
| `-app` | `--application` | Application mode: multi-module analysis | none |
|
|
58
56
|
|
|
@@ -232,25 +230,7 @@ mcp__smartstack__validate_conventions({ checks: ["tables"] })
|
|
|
232
230
|
**DO NOT** continue to Step 4 or any subsequent step.
|
|
233
231
|
**STOP the skill immediately.**
|
|
234
232
|
|
|
235
|
-
## Step 4:
|
|
236
|
-
|
|
237
|
-
If `-i` or `--interactive` flag is set, prompt for confirmation.
|
|
238
|
-
|
|
239
|
-
**Prompt:**
|
|
240
|
-
```
|
|
241
|
-
Confirm initialization with:
|
|
242
|
-
- Use Case: {use_case}
|
|
243
|
-
- Application: {application_name}
|
|
244
|
-
- Module: {module_name}
|
|
245
|
-
- Auto Mode: {auto_mode}
|
|
246
|
-
- Economy Mode: {economy_mode}
|
|
247
|
-
|
|
248
|
-
Continue? (y/n)
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
If 'n', EXIT.
|
|
252
|
-
|
|
253
|
-
## Step 5: Validate Business Context
|
|
233
|
+
## Step 4: Validate Business Context
|
|
254
234
|
|
|
255
235
|
Verify that the business context is properly configured.
|
|
256
236
|
|
|
@@ -275,23 +255,27 @@ Verify that the business context is properly configured.
|
|
|
275
255
|
}
|
|
276
256
|
```
|
|
277
257
|
|
|
278
|
-
## Step
|
|
258
|
+
## Step 5: Determine Application and Module
|
|
279
259
|
|
|
280
260
|
Scan for existing applications and modules.
|
|
281
261
|
|
|
282
|
-
**Scan
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
2.
|
|
287
|
-
|
|
262
|
+
**Scan location:** `docs/business/` (modern structure only)
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
1. List subdirectories in `docs/business/` = applications
|
|
266
|
+
2. For each app, list subdirectories = modules
|
|
267
|
+
3. IF no applications found:
|
|
268
|
+
Will create new under docs/business/
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Legacy structure (`.business-analyse/business/`) is NO LONGER SUPPORTED.**
|
|
288
272
|
|
|
289
273
|
**Logic:**
|
|
290
274
|
```
|
|
291
275
|
IF auto_mode = true:
|
|
292
276
|
application_name = first found app OR "default"
|
|
293
277
|
module_name = first found module OR "default"
|
|
294
|
-
ELSE
|
|
278
|
+
ELSE:
|
|
295
279
|
Prompt: "Select application: [list]"
|
|
296
280
|
Prompt: "Select module: [list]"
|
|
297
281
|
OR: "Create new application: {name}"
|
|
@@ -304,7 +288,7 @@ application_name: string
|
|
|
304
288
|
module_name: string
|
|
305
289
|
```
|
|
306
290
|
|
|
307
|
-
## Step
|
|
291
|
+
## Step 6: Select Language
|
|
308
292
|
|
|
309
293
|
Determine the language for analysis and code generation.
|
|
310
294
|
|
|
@@ -312,13 +296,15 @@ Determine the language for analysis and code generation.
|
|
|
312
296
|
- Retrieve `businessContext.language` from config
|
|
313
297
|
- Default: "en" (English)
|
|
314
298
|
|
|
315
|
-
**If
|
|
299
|
+
**If not in config OR auto_mode = false:**
|
|
316
300
|
```
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
301
|
+
Ask via AskUserQuestion:
|
|
302
|
+
question: "Select language for analysis"
|
|
303
|
+
header: "Language"
|
|
304
|
+
options:
|
|
305
|
+
- label: "English (en)"
|
|
306
|
+
- label: "French (fr)"
|
|
307
|
+
- label: "Spanish (es)"
|
|
322
308
|
```
|
|
323
309
|
|
|
324
310
|
**Store:**
|
|
@@ -326,7 +312,7 @@ Select language:
|
|
|
326
312
|
language: string (code, e.g., "en", "fr")
|
|
327
313
|
```
|
|
328
314
|
|
|
329
|
-
## Step
|
|
315
|
+
## Step 7: Generate Feature ID
|
|
330
316
|
|
|
331
317
|
Create a unique feature identifier.
|
|
332
318
|
|
|
@@ -345,7 +331,7 @@ ELSE:
|
|
|
345
331
|
feature_id: string
|
|
346
332
|
```
|
|
347
333
|
|
|
348
|
-
## Step
|
|
334
|
+
## Step 8: Create Output Directory Structure
|
|
349
335
|
|
|
350
336
|
Create the directory hierarchy for feature documentation.
|
|
351
337
|
|
|
@@ -370,20 +356,35 @@ docs_dir: "docs/business/{app}/{module}/business-analyse/v{version}"
|
|
|
370
356
|
output_dir: same as docs_dir
|
|
371
357
|
```
|
|
372
358
|
|
|
373
|
-
## Step
|
|
359
|
+
## Step 8-bis: Deploy JSON Schemas to Project (MANDATORY)
|
|
374
360
|
|
|
375
361
|
> **The JSON Schemas MUST be present in the project alongside the generated feature.json files.**
|
|
376
362
|
> Without schemas, feature.json files cannot be validated and have no structural reference.
|
|
377
363
|
|
|
378
|
-
**
|
|
364
|
+
**Performance optimization:** Use cache file to avoid redundant deployments.
|
|
365
|
+
|
|
366
|
+
### Cache-based deployment logic:
|
|
367
|
+
|
|
368
|
+
**Step 1: Check deployment cache**
|
|
369
|
+
|
|
370
|
+
Cache file location: `docs/business/{app}/business-analyse/.schema-cache.json`
|
|
371
|
+
|
|
379
372
|
```
|
|
380
|
-
IF EXISTS docs/business/{app}/business-analyse
|
|
381
|
-
|
|
373
|
+
IF EXISTS docs/business/{app}/business-analyse/.schema-cache.json:
|
|
374
|
+
Read cache file
|
|
375
|
+
IF cache.version == "6.0" (CURRENT SKILL VERSION):
|
|
376
|
+
Display: "✓ Schemas already deployed (v6.0) - skipping"
|
|
377
|
+
SKIP deployment (trust cache)
|
|
378
|
+
→ Go to Step 10
|
|
379
|
+
ELSE:
|
|
380
|
+
Display: "⚠ Schema version mismatch (cache: {cache.version}, current: 6.0)"
|
|
381
|
+
Proceed to deployment
|
|
382
382
|
ELSE:
|
|
383
|
-
|
|
383
|
+
Display: "Deploying schemas (first time)..."
|
|
384
|
+
Proceed to deployment
|
|
384
385
|
```
|
|
385
386
|
|
|
386
|
-
**
|
|
387
|
+
**Step 2: Deploy schemas (if needed)**
|
|
387
388
|
|
|
388
389
|
Source: `schemas/` (relative to skill root = `~/.claude/skills/business-analyse/schemas/`)
|
|
389
390
|
Destination: `docs/business/{app}/business-analyse/schemas/`
|
|
@@ -411,13 +412,43 @@ docs/business/{app}/business-analyse/schemas/
|
|
|
411
412
|
1. Use Glob to find all `.json` files in `schemas/` directory (skill-relative)
|
|
412
413
|
2. For each file, Read from skill directory and Write to project directory
|
|
413
414
|
3. Preserve the subdirectory structure (sections/, shared/)
|
|
415
|
+
4. Display progress: "Deploying schema {i}/{total}: {filename}"
|
|
416
|
+
|
|
417
|
+
**Step 3: Write cache file (after successful deployment)**
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"version": "6.0",
|
|
422
|
+
"deployedAt": "{ISO timestamp}",
|
|
423
|
+
"schemas": [
|
|
424
|
+
"feature-schema.json",
|
|
425
|
+
"application-schema.json",
|
|
426
|
+
"sections/metadata-schema.json",
|
|
427
|
+
"sections/discovery-schema.json",
|
|
428
|
+
"sections/analysis-schema.json",
|
|
429
|
+
"sections/specification-schema.json",
|
|
430
|
+
"sections/validation-schema.json",
|
|
431
|
+
"sections/handoff-schema.json",
|
|
432
|
+
"shared/common-defs.json"
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Write to: `docs/business/{app}/business-analyse/.schema-cache.json`
|
|
438
|
+
|
|
439
|
+
Display: "✓ Schemas deployed successfully (9 files)"
|
|
414
440
|
|
|
415
441
|
**Store:**
|
|
416
442
|
```yaml
|
|
417
443
|
schemas_dir: "docs/business/{app}/business-analyse/schemas"
|
|
418
444
|
```
|
|
419
445
|
|
|
420
|
-
|
|
446
|
+
**Performance gain:**
|
|
447
|
+
- First deployment: ~12 seconds (unchanged)
|
|
448
|
+
- Subsequent deployments: **~0 seconds (skipped via cache)** ✨
|
|
449
|
+
- Cache invalidation: automatic on skill version upgrade
|
|
450
|
+
|
|
451
|
+
## Step 9: Create Master feature.json
|
|
421
452
|
|
|
422
453
|
Create the master feature document using ba-writer agent.
|
|
423
454
|
|
|
@@ -526,7 +557,7 @@ ba-writer.createApplicationFeature({
|
|
|
526
557
|
{docs_dir}/feature.json
|
|
527
558
|
```
|
|
528
559
|
|
|
529
|
-
## Step
|
|
560
|
+
## Step 10: Update Config
|
|
530
561
|
|
|
531
562
|
Update `.business-analyse/config.json` with new feature information.
|
|
532
563
|
|
|
@@ -543,12 +574,11 @@ Update `.business-analyse/config.json` with new feature information.
|
|
|
543
574
|
},
|
|
544
575
|
"lastInitialized": "{ISO timestamp}",
|
|
545
576
|
"autoMode": {auto_mode},
|
|
546
|
-
"economyMode": {economy_mode}
|
|
547
|
-
"interactiveMode": {interactive_mode}
|
|
577
|
+
"economyMode": {economy_mode}
|
|
548
578
|
}
|
|
549
579
|
```
|
|
550
580
|
|
|
551
|
-
## Step
|
|
581
|
+
## Step 11: Display Summary
|
|
552
582
|
|
|
553
583
|
Show initialization results in a clear table format.
|
|
554
584
|
|
|
@@ -576,7 +606,7 @@ NEXT STEP: step-01-analyse ({use_case} mode)
|
|
|
576
606
|
═══════════════════════════════════════════════════════════════
|
|
577
607
|
```
|
|
578
608
|
|
|
579
|
-
## Step
|
|
609
|
+
## Step 12: Load Next Step
|
|
580
610
|
|
|
581
611
|
**All modes except question (-q), micro (-m), and extract (-x):**
|
|
582
612
|
After showing initialization summary, proceed to `./step-01-cadrage.md`
|
|
@@ -596,7 +626,6 @@ language: string
|
|
|
596
626
|
docs_dir: string
|
|
597
627
|
auto_mode: boolean
|
|
598
628
|
economy_mode: boolean
|
|
599
|
-
interactive_mode: boolean
|
|
600
629
|
mcp_available: boolean
|
|
601
630
|
workflow_mode: string
|
|
602
631
|
```
|
|
@@ -625,9 +654,3 @@ If initialization was interrupted:
|
|
|
625
654
|
3. If found, offer to resume from last completed step
|
|
626
655
|
4. If not found, create fresh feature.json
|
|
627
656
|
|
|
628
|
-
### Clean Fallbacks
|
|
629
|
-
|
|
630
|
-
If modern paths unavailable:
|
|
631
|
-
1. Search `.business-analyse/business/` (legacy)
|
|
632
|
-
2. Create new structure under `docs/business/` regardless
|
|
633
|
-
3. Log migration notice (automated, non-blocking)
|