@atlashub/smartstack-cli 4.56.0 → 4.58.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 (23) hide show
  1. package/dist/index.js +62 -13
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/project/Dockerfile.frontend.template +3 -3
  5. package/templates/skills/business-analyse/_shared.md +69 -21
  6. package/templates/skills/business-analyse/references/canonical-json-formats.md +1 -1
  7. package/templates/skills/business-analyse/references/naming-conventions.md +12 -2
  8. package/templates/skills/business-analyse/steps/step-00-init.md +54 -21
  9. package/templates/skills/business-analyse/steps/step-01-cadrage.md +6 -2
  10. package/templates/skills/business-analyse/steps/step-02-structure.md +13 -3
  11. package/templates/skills/business-analyse/steps/step-03-specify.md +14 -1
  12. package/templates/skills/business-analyse/steps/step-04-consolidate.md +3 -1
  13. package/templates/skills/business-analyse-design/steps/step-01-screens.md +12 -1
  14. package/templates/skills/business-analyse-design/steps/step-03-navigation.md +4 -3
  15. package/templates/skills/business-analyse-handoff/steps/step-01-transform.md +2 -2
  16. package/templates/skills/business-analyse-handoff/steps/step-02-export.md +15 -13
  17. package/templates/skills/business-analyse-html/SKILL.md +14 -0
  18. package/templates/skills/business-analyse-html/steps/step-01-collect.md +12 -6
  19. package/templates/skills/business-analyse-html/steps/step-03-render.md +7 -4
  20. package/templates/skills/business-analyse-html/steps/step-04-verify.md +3 -3
  21. package/templates/skills/business-analyse-review/steps/step-00-init.md +7 -2
  22. package/templates/skills/business-analyse-review/steps/step-01-apply.md +6 -7
  23. package/templates/skills/business-analyse-status/SKILL.md +19 -8
@@ -18,11 +18,14 @@ Read all JSON analysis files for the feature and store them as `{collected_data}
18
18
  ### 1. Locate Feature
19
19
 
20
20
  ```
21
- 1. Read feature_id from parameters
22
- 2. Locate master index.json:
23
- - Multi-app (project): docs/business-analyse/v{version}/index.json
24
- - Single-app: docs/{app}/business-analyse/v{version}/index.json
21
+ 1. Read feature_id from parameters OR from .business-analyse/config.json
22
+ 2. Locate master index.json (ba-006):
23
+ - Primary: docs/{projectSlug}/v{version}/index.json
24
+ - Discovery: Glob docs/*/v*/index.json → select project
25
+ - Legacy fallback: docs/business-analyse/v{version}/index.json OR docs/{app}/business-analyse/v{version}/index.json
25
26
  3. IF index.json NOT found → BLOCKING ERROR: "index.json not found — run /business-analyse first"
27
+
28
+ Store: projectSlug, docs_dir (e.g., "docs/projet-rh/v1.0")
26
29
  ```
27
30
 
28
31
  ### 2. Detect Mode
@@ -67,8 +70,11 @@ collected_data = {
67
70
  }
68
71
 
69
72
  FOR each module in master.index.modules[]:
70
- // Resolve module directory path
71
- moduleDir = "{app}/{module.code}/business-analyse/v{version}/"
73
+ // Resolve module directory path (ba-006: no business-analyse/ intermediate)
74
+ const appKebab = toKebabCase(module.applicationCode || applicationCode);
75
+ const moduleKebab = toKebabCase(module.code);
76
+ moduleDir = docs_dir + "/" + appKebab + "/" + moduleKebab + "/";
77
+ // Legacy fallback: if not found, try {app}/{module.code}/business-analyse/v{version}/
72
78
  moduleIndex = READ(moduleDir + "index.json")
73
79
 
74
80
  // Read ALL flat files from module directory
@@ -65,10 +65,13 @@ Serialize and inject:
65
65
  ### 4. Determine Output Path
66
66
 
67
67
  ```
68
- IF workflow.mode === "project" (multi-app):
69
- outputPath = "docs/business-analyse/v{version}/ba-interactive.html"
70
- ELSE (single-app):
71
- outputPath = "docs/{app}/business-analyse/v{version}/ba-interactive.html"
68
+ outputPath = docs_dir + "/ba-interactive.html"
69
+ // ba-006: docs/{projectSlug}/v{version}/ba-interactive.html
70
+ // e.g., docs/projet-rh/v1.0/ba-interactive.html
71
+
72
+ // Legacy fallback (pre-ba-006):
73
+ // Multi-app: docs/business-analyse/v{version}/ba-interactive.html
74
+ // Single-app: docs/{app}/business-analyse/v{version}/ba-interactive.html
72
75
  ```
73
76
 
74
77
  ### 5. Write File
@@ -56,13 +56,13 @@ FOR each module in FEATURE_DATA.modules:
56
56
  **Check 6 — Per-module data completeness (source vs HTML):**
57
57
  ```
58
58
  FOR each module in FEATURE_DATA.modules:
59
- Read source: docs/{app}/{module.code}/business-analyse/v{version}/usecases.json
59
+ Read source: {docs_dir}/{appKebab}/{moduleKebab}/usecases.json
60
60
  sourceUCCount = count of useCases OR usecases in source file
61
61
  htmlUCCount = count in FEATURE_DATA.moduleSpecs[module.code].useCases
62
62
  IF sourceUCCount > 0 AND htmlUCCount === 0:
63
63
  BLOCKING_ERROR("Module {module.code}: 0 useCases in HTML but {sourceUCCount} in source")
64
64
 
65
- Read source: docs/{app}/{module.code}/business-analyse/v{version}/rules.json
65
+ Read source: {docs_dir}/{appKebab}/{moduleKebab}/rules.json
66
66
  sourceBRCount = count of rules OR businessRules in source file
67
67
  htmlBRCount = count in FEATURE_DATA.moduleSpecs[module.code].businessRules
68
68
  IF sourceBRCount > 0 AND htmlBRCount === 0:
@@ -72,7 +72,7 @@ FOR each module in FEATURE_DATA.modules:
72
72
  **Check 7 — Screens/mockups populated (prevents ASCII-only regression):**
73
73
  ```
74
74
  FOR each module in FEATURE_DATA.modules:
75
- Read source: docs/{app}/{module.code}/business-analyse/v{version}/screens.json
75
+ Read source: {docs_dir}/{appKebab}/{moduleKebab}/screens.json
76
76
  sourceScreenCount = count of "screens" array OR "sections" array in source file
77
77
  htmlScreenResources = sum of resources[].length across moduleSpecs[module.code].screens[]
78
78
  IF sourceScreenCount > 0 AND htmlScreenResources === 0:
@@ -52,8 +52,13 @@ const source_version = review._reviewMeta.sourceVersion || "1.0";
52
52
  ### 3. Locate Feature Docs Directory
53
53
 
54
54
  ```javascript
55
- // Find the matching BA feature directory
56
- const docs_dir = glob(`docs/**/business-analyse/v*/index.json`)
55
+ // Find the matching BA feature directory (ba-006 first, then legacy)
56
+ const candidates = [
57
+ ...glob('docs/*/v*/index.json'), // ba-006 format
58
+ ...glob('docs/**/business-analyse/v*/index.json') // legacy format
59
+ ];
60
+
61
+ const docs_dir = candidates
57
62
  .map(p => dirname(p))
58
63
  .find(dir => {
59
64
  const index = readJSON(join(dir, 'index.json'));
@@ -56,7 +56,7 @@ change_summary: _reviewMeta.changeSummary
56
56
  ## Step 2: Read Existing Master Index.json
57
57
 
58
58
  ```
59
- 1. Locate master index.json from docs_dir (e.g., docs/{app}/business-analyse/v{X.Y}/index.json)
59
+ 1. Locate master index.json from docs_dir (ba-006: docs/{projectSlug}/v{X.Y}/index.json, legacy: docs/{app}/business-analyse/v{X.Y}/index.json)
60
60
  2. Read and parse
61
61
  3. Verify metadata.applicationId matches _reviewMeta.sourceApplicationId
62
62
  4. Store as existing_master_index
@@ -214,14 +214,13 @@ Delegate HTML generation to `/business-analyse-html` skill:
214
214
  3. Output: {new_version_dir}/ba-interactive.html
215
215
  ```
216
216
 
217
- ## Step 10: Update Manifest
217
+ ## Step 10: Update Project Index
218
218
 
219
219
  ```
220
- 1. Read docs/index.json
221
- 2. Find entry for this application
222
- 3. Update version, lastModified, status
223
- 4. If entry doesn't exist, create it
224
- 5. Write docs/index.json
220
+ 1. Read {docs_dir}/index.json (project master index)
221
+ 2. Update version, lastModified, status
222
+ 3. Write {docs_dir}/index.json
223
+ 4. Legacy: if docs/index.json global manifest exists, also update it
225
224
  ```
226
225
 
227
226
  ## Step 10b: Update Status
@@ -15,15 +15,26 @@ Display the current state of the business analysis cycle for the active feature.
15
15
 
16
16
  ## Execution
17
17
 
18
- ### Step 1 — Locate feature
18
+ ### Step 1 — Locate project(s)
19
19
 
20
- 1. If `<feature-id>` is provided, search for `docs/business/<feature-id>/index.json`
21
- 2. If not provided, scan `docs/business/*/index.json` — if exactly 1 feature exists, use it; if multiple, list them and ask which one
22
- 3. If no feature found, display:
20
+ 1. Glob `docs/*/v*/index.json` to discover all projects (ba-006 format)
21
+ 2. Also check legacy paths: `docs/business-analyse/v*/index.json`, `docs/*/business-analyse/v*/index.json`
22
+ 3. If `<feature-id>` is provided, filter to matching project
23
+ 4. If 0 projects found, display:
23
24
  ```
24
- Aucune analyse métier trouvée dans docs/business/.
25
+ Aucune analyse métier trouvée dans docs/.
25
26
  → Lancez /business-analyse pour démarrer.
26
27
  ```
28
+ 5. If 1 project → auto-select
29
+ 6. If N projects → list ALL projects with their status:
30
+ ```
31
+ Projets disponibles :
32
+ | # | Projet | Version | Apps | Modules | Status |
33
+ |---|---------------|---------|------|---------|--------------|
34
+ | 1 | projet-rh | v1.0 | 2 | 6 | consolidated |
35
+ | 2 | commande-repas| v1.0 | 1 | 3 | specified |
36
+ ```
37
+ Then ask which project to display details for.
27
38
 
28
39
  ### Step 2 — Read state
29
40
 
@@ -40,8 +51,8 @@ Read the following files (all optional — missing = not done):
40
51
  | Per module: `screens.json` | UI design done |
41
52
  | Per module: `navigation.json` | Navigation tree done |
42
53
  | Per module: `handoff.json` | Handoff/PRD generated |
43
- | `ba-interactive.html` (in project root or feature dir) | HTML document generated |
44
- | `ba-review.json` (in project root) | Client review pending |
54
+ | `ba-interactive.html` (in `{docs_dir}/`) | HTML document generated |
55
+ | `ba-review.json` (in project root or `{docs_dir}/`) | Client review pending |
45
56
 
46
57
  ### Step 3 — Compute progress
47
58
 
@@ -64,7 +75,7 @@ Use this exact format:
64
75
 
65
76
  ```
66
77
  ══════════════════════════════════════════════════
67
- Business Analyse — {applicationName}
78
+ Business Analyse — {projectSlug}
68
79
  Version {version} · {lastModified}
69
80
  ══════════════════════════════════════════════════
70
81