@atlashub/smartstack-cli 3.0.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/agents.html +1 -371
- package/.documentation/cli-commands.html +1 -1
- package/.documentation/commands.html +1 -1
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +1 -1
- package/.documentation/hooks.html +27 -66
- package/.documentation/index.html +166 -166
- package/.documentation/init.html +6 -7
- package/.documentation/installation.html +1 -1
- package/.documentation/prd-json-v2.0.0.md +396 -0
- package/.documentation/ralph-loop.html +1 -9
- package/.documentation/test-web.html +15 -39
- package/.documentation/testing-ba-e2e.md +462 -0
- package/dist/index.js +23 -16
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/templates/agents/gitflow/merge.md +56 -6
- package/templates/agents/gitflow/pr.md +70 -9
- package/templates/project/appsettings.json.template +8 -2
- package/templates/skills/business-analyse/SKILL.md +34 -17
- package/templates/skills/business-analyse/html/ba-interactive.html +147 -84
- 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-03-specify.md +57 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +480 -14
- package/templates/skills/business-analyse/steps/step-06-extract.md +131 -3
- package/templates/skills/gitflow/steps/step-pr.md +17 -5
- package/templates/skills/ralph-loop/SKILL.md +158 -33
- package/templates/skills/ralph-loop/steps/step-01-task.md +160 -18
- package/templates/skills/ralph-loop/steps/step-02-execute.md +408 -23
- package/templates/skills/ralph-loop/steps/step-03-commit.md +82 -0
- package/templates/skills/ralph-loop/steps/step-04-check.md +305 -9
- package/templates/skills/ralph-loop/steps/step-05-report.md +115 -0
|
@@ -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)
|
|
@@ -1263,6 +1263,62 @@ ba-writer.updateStatus({module_feature_id}, "specified")
|
|
|
1263
1263
|
ba-writer.updateModuleStatus({feature_id}, {currentModule.code}, "specified")
|
|
1264
1264
|
```
|
|
1265
1265
|
|
|
1266
|
+
### 11-bis. Deploy Incremental Interactive HTML (MANDATORY)
|
|
1267
|
+
|
|
1268
|
+
> **After each module is specified, deploy/update the interactive HTML document with all available data.**
|
|
1269
|
+
> This allows the client to review completed modules while the next module is being specified.
|
|
1270
|
+
> The HTML is incrementally enriched: after module 1, only module 1 specs appear; after module 2, both appear; etc.
|
|
1271
|
+
|
|
1272
|
+
**Source:** `html/ba-interactive.html` (relative to skill root = `~/.claude/skills/business-analyse/html/`)
|
|
1273
|
+
|
|
1274
|
+
**Destination:** `docs/business/{app}/business-analyse/v{version}/ba-interactive.html`
|
|
1275
|
+
|
|
1276
|
+
**Steps:**
|
|
1277
|
+
|
|
1278
|
+
1. **Read sources:**
|
|
1279
|
+
- Read the HTML template from skill directory
|
|
1280
|
+
- Read the master feature.json (application level — now updated with current module status)
|
|
1281
|
+
- Read EACH completed module's feature.json (including the one just specified)
|
|
1282
|
+
|
|
1283
|
+
2. **Build FEATURE_DATA object:**
|
|
1284
|
+
|
|
1285
|
+
> **Use the EXACT SAME mapping defined in step-05-handoff.md section 9d.**
|
|
1286
|
+
> The mapping is identical — the only difference is that `moduleSpecs` only includes completed modules.
|
|
1287
|
+
> Modules not yet specified will NOT appear in `moduleSpecs` (their entry in `modules[]` will show `status: "pending"`).
|
|
1288
|
+
|
|
1289
|
+
Follow step-05 section 9d "Step 2: Build FEATURE_DATA object" for the complete mapping pseudocode:
|
|
1290
|
+
- `metadata`, `cadrage`, `modules[]`, `dependencies[]` → from master feature.json
|
|
1291
|
+
- `moduleSpecs[moduleCode]` → only for modules with status "specified" (completed so far)
|
|
1292
|
+
- `consolidation` → empty `{ interactions: [], e2eFlows: [] }` (not yet consolidated)
|
|
1293
|
+
- `handoff` → empty `{}` (not yet handed off)
|
|
1294
|
+
|
|
1295
|
+
3. **Replace placeholders in template:**
|
|
1296
|
+
- Serialize the FEATURE_DATA object as JSON (2-space indentation)
|
|
1297
|
+
- Replace `{{FEATURE_DATA}}` with the serialized JSON
|
|
1298
|
+
- Replace `{{APPLICATION_NAME}}` → `{application_name}`
|
|
1299
|
+
- Replace `{{APPLICATION_ID}}` → `{feature_id}`
|
|
1300
|
+
- Replace `{{VERSION}}` → `{version}`
|
|
1301
|
+
- Replace `{{CREATED_AT}}` → `{ISO timestamp}`
|
|
1302
|
+
|
|
1303
|
+
4. **Write and confirm:**
|
|
1304
|
+
|
|
1305
|
+
```
|
|
1306
|
+
✓ Interactive HTML updated (incremental):
|
|
1307
|
+
Path: docs/business/{app}/business-analyse/v{version}/ba-interactive.html
|
|
1308
|
+
Modules included: {completedModules.length}/{totalModules} specified
|
|
1309
|
+
- {completedModule1}: {uc_count} UCs, {br_count} BRs, {entity_count} entities
|
|
1310
|
+
- {completedModule2}: ...
|
|
1311
|
+
Remaining: {pendingModules.join(', ')} (will be added after specification)
|
|
1312
|
+
→ Client can open in browser to review completed modules now.
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
> **WHY incremental?** The client doesn't have to wait until handoff to start reviewing.
|
|
1316
|
+
> While module 2 is being specified, the client can already give feedback on module 1.
|
|
1317
|
+
> Each incremental deployment OVERWRITES the previous HTML (latest state always).
|
|
1318
|
+
> The FINAL deployment at step-05 (handoff) will include consolidation and handoff data.
|
|
1319
|
+
|
|
1320
|
+
---
|
|
1321
|
+
|
|
1266
1322
|
### 12. Loop Decision
|
|
1267
1323
|
|
|
1268
1324
|
```
|
|
@@ -1338,6 +1394,7 @@ Read metadata.workflow.currentModule
|
|
|
1338
1394
|
- Client confirmed module specification
|
|
1339
1395
|
- Module feature.json written
|
|
1340
1396
|
- Master updated with module status
|
|
1397
|
+
- **Interactive HTML deployed/updated with completed module data (incremental)**
|
|
1341
1398
|
- Loop advanced correctly
|
|
1342
1399
|
|
|
1343
1400
|
## FAILURE MODES
|