@atlashub/smartstack-cli 4.18.0 → 4.19.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 (160) hide show
  1. package/package.json +1 -1
  2. package/templates/agents/ba-reader.md +86 -80
  3. package/templates/agents/ba-writer.md +318 -415
  4. package/templates/agents/docs-context-reader.md +3 -3
  5. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
  6. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +126 -0
  7. package/templates/skills/apex/SKILL.md +29 -16
  8. package/templates/skills/apex/_shared.md +62 -9
  9. package/templates/skills/apex/references/analysis-methods.md +8 -6
  10. package/templates/skills/apex/references/challenge-questions.md +5 -5
  11. package/templates/skills/apex/references/core-seed-data.md +68 -45
  12. package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +26 -21
  13. package/templates/skills/apex/references/parallel-execution.md +156 -0
  14. package/templates/skills/apex/references/person-extension-pattern.md +12 -12
  15. package/templates/skills/apex/references/post-checks.md +1748 -1726
  16. package/templates/skills/apex/references/smartstack-api.md +63 -57
  17. package/templates/skills/apex/references/smartstack-frontend-compliance.md +594 -0
  18. package/templates/skills/apex/references/smartstack-frontend.md +1246 -1842
  19. package/templates/skills/apex/references/smartstack-layers.md +98 -145
  20. package/templates/skills/apex/steps/step-00-init.md +30 -6
  21. package/templates/skills/apex/steps/step-01-analyze.md +27 -23
  22. package/templates/skills/apex/steps/step-02-plan.md +12 -12
  23. package/templates/skills/apex/steps/step-03-execute.md +198 -143
  24. package/templates/skills/apex/steps/step-04-examine.md +24 -93
  25. package/templates/skills/apex/steps/step-05-deep-review.md +16 -16
  26. package/templates/skills/apex/steps/step-06-resolve.md +9 -9
  27. package/templates/skills/apex/steps/step-07-tests.md +3 -1
  28. package/templates/skills/apex/steps/step-08-run-tests.md +1 -1
  29. package/templates/skills/business-analyse/SKILL.md +182 -301
  30. package/templates/skills/business-analyse/_shared.md +119 -336
  31. package/templates/skills/business-analyse/html/ba-interactive.html +703 -82
  32. package/templates/skills/business-analyse/html/build-html.js +41 -3
  33. package/templates/skills/business-analyse/html/src/partials/cadrage-context.html +34 -0
  34. package/templates/skills/business-analyse/html/src/partials/cadrage-risks.html +48 -0
  35. package/templates/skills/business-analyse/html/src/partials/cadrage-scope.html +49 -0
  36. package/templates/skills/business-analyse/html/src/partials/cadrage-stakeholders.html +55 -0
  37. package/templates/skills/business-analyse/html/src/partials/cadrage-success.html +34 -0
  38. package/templates/skills/business-analyse/html/src/partials/consol-datamodel.html +8 -0
  39. package/templates/skills/business-analyse/html/src/partials/consol-flows.html +29 -0
  40. package/templates/skills/business-analyse/html/src/partials/consol-interactions.html +8 -0
  41. package/templates/skills/business-analyse/html/src/partials/consol-permissions.html +8 -0
  42. package/templates/skills/business-analyse/html/src/partials/decomp-dependencies.html +38 -0
  43. package/templates/skills/business-analyse/html/src/partials/decomp-modules.html +51 -0
  44. package/templates/skills/business-analyse/html/src/partials/handoff-summary.html +24 -0
  45. package/templates/skills/business-analyse/html/src/partials/module-spec-container.html +4 -0
  46. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +17 -1
  47. package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +31 -5
  48. package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +100 -63
  49. package/templates/skills/business-analyse/html/src/scripts/06-render-mockups.js +372 -0
  50. package/templates/skills/business-analyse/html/src/scripts/10-comments.js +41 -13
  51. package/templates/skills/business-analyse/html/src/styles/09-mockups-html.css +136 -0
  52. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +7 -5
  53. package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +142 -0
  54. package/templates/skills/business-analyse/questionnaire/03-data-ui.md +94 -0
  55. package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +150 -0
  56. package/templates/skills/business-analyse/questionnaire/05-cross-module.md +69 -0
  57. package/templates/skills/business-analyse/questionnaire.md +23 -280
  58. package/templates/skills/business-analyse/react/application-viewer.md +2 -2
  59. package/templates/skills/business-analyse/react/components.md +4 -4
  60. package/templates/skills/business-analyse/react/i18n-template.md +1 -1
  61. package/templates/skills/business-analyse/react/schema.md +14 -14
  62. package/templates/skills/business-analyse/references/acceptance-criteria.md +21 -21
  63. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +3 -3
  64. package/templates/skills/business-analyse/references/compilation-structure-cards.md +1 -1
  65. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +5 -5
  66. package/templates/skills/business-analyse/references/deploy-data-build.md +12 -11
  67. package/templates/skills/business-analyse/references/deploy-modes.md +10 -10
  68. package/templates/skills/business-analyse/references/detection-strategies.md +6 -6
  69. package/templates/skills/business-analyse/references/html-data-mapping.md +15 -15
  70. package/templates/skills/business-analyse/references/naming-conventions.md +4 -4
  71. package/templates/skills/business-analyse/references/review-data-mapping.md +29 -29
  72. package/templates/skills/business-analyse/references/robustness-checks.md +36 -36
  73. package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
  74. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  75. package/templates/skills/business-analyse/references/ui-resource-cards.md +1 -1
  76. package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
  77. package/templates/skills/business-analyse/references/wireframe-svg-style-guide.md +2 -2
  78. package/templates/skills/business-analyse/schemas/application-schema.json +8 -8
  79. package/templates/skills/business-analyse/schemas/feature-schema.json +3 -3
  80. package/templates/skills/business-analyse/schemas/index-schema.json +47 -0
  81. package/templates/skills/business-analyse/schemas/project-schema.json +6 -6
  82. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
  83. package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +5 -3
  84. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +4 -4
  85. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
  86. package/templates/skills/business-analyse/schemas/shared/common-defs.json +4 -4
  87. package/templates/skills/business-analyse/steps/step-00-init.md +68 -77
  88. package/templates/skills/business-analyse/steps/step-01-cadrage.md +54 -180
  89. package/templates/skills/business-analyse/steps/step-02-structure.md +175 -0
  90. package/templates/skills/business-analyse/steps/step-03-specify.md +198 -0
  91. package/templates/skills/business-analyse/steps/step-04-consolidate.md +478 -0
  92. package/templates/skills/business-analyse/steps/step-05-deploy.md +220 -0
  93. package/templates/skills/business-analyse/steps/step-06-review.md +51 -69
  94. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  95. package/templates/skills/business-analyse/templates/tpl-handoff.md +20 -17
  96. package/templates/skills/business-analyse/templates/tpl-launch-displays.md +2 -2
  97. package/templates/skills/business-analyse/templates-react.md +2 -2
  98. package/templates/skills/derive-prd/SKILL.md +92 -0
  99. package/templates/skills/derive-prd/references/acceptance-criteria.md +169 -0
  100. package/templates/skills/derive-prd/references/entity-domain-mapping.md +115 -0
  101. package/templates/skills/{business-analyse → derive-prd}/references/handoff-file-templates.md +131 -120
  102. package/templates/skills/{business-analyse → derive-prd}/references/handoff-mappings.md +95 -95
  103. package/templates/skills/{business-analyse → derive-prd}/references/handoff-seeddata-generation.md +312 -312
  104. package/templates/skills/{business-analyse → derive-prd}/references/prd-generation.md +262 -263
  105. package/templates/skills/derive-prd/references/readiness-scoring.md +104 -0
  106. package/templates/skills/derive-prd/schemas/handoff-schema.json +95 -0
  107. package/templates/skills/derive-prd/steps/step-00-validate.md +130 -0
  108. package/templates/skills/derive-prd/steps/step-01-transform.md +206 -0
  109. package/templates/skills/derive-prd/steps/step-02-export.md +181 -0
  110. package/templates/skills/{business-analyse → derive-prd}/templates/tpl-progress.md +172 -172
  111. package/templates/skills/ralph-loop/SKILL.md +2 -1
  112. package/templates/skills/ralph-loop/references/init-resume-recovery.md +1 -1
  113. package/templates/skills/ralph-loop/steps/step-01-task.md +2 -2
  114. package/templates/skills/apex/references/agent-teams-protocol.md +0 -203
  115. package/templates/skills/business-analyse/_architecture.md +0 -124
  116. package/templates/skills/business-analyse/_elicitation.md +0 -206
  117. package/templates/skills/business-analyse/_module-loop.md +0 -115
  118. package/templates/skills/business-analyse/_rules.md +0 -142
  119. package/templates/skills/business-analyse/_suggestions.md +0 -34
  120. package/templates/skills/business-analyse/questionnaire/00-application.md +0 -160
  121. package/templates/skills/business-analyse/questionnaire/00b-project.md +0 -85
  122. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +0 -189
  123. package/templates/skills/business-analyse/questionnaire/03-scope.md +0 -164
  124. package/templates/skills/business-analyse/questionnaire/04-data.md +0 -88
  125. package/templates/skills/business-analyse/questionnaire/05-integrations.md +0 -58
  126. package/templates/skills/business-analyse/questionnaire/06-security.md +0 -68
  127. package/templates/skills/business-analyse/questionnaire/07-ui.md +0 -76
  128. package/templates/skills/business-analyse/questionnaire/08-performance.md +0 -42
  129. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -45
  130. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -58
  131. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +0 -59
  132. package/templates/skills/business-analyse/questionnaire/12-migration.md +0 -58
  133. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +0 -69
  134. package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +0 -135
  135. package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +0 -136
  136. package/templates/skills/business-analyse/references/agent-module-prompt.md +0 -366
  137. package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +0 -557
  138. package/templates/skills/business-analyse/references/cache-warming-strategy.md +0 -566
  139. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +0 -41
  140. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +0 -74
  141. package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +0 -115
  142. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +0 -68
  143. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +0 -85
  144. package/templates/skills/business-analyse/references/team-orchestration.md +0 -1093
  145. package/templates/skills/business-analyse/references/validate-incremental-html.md +0 -121
  146. package/templates/skills/business-analyse/steps/step-01b-applications.md +0 -419
  147. package/templates/skills/business-analyse/steps/step-02-decomposition.md +0 -387
  148. package/templates/skills/business-analyse/steps/step-03a-data.md +0 -16
  149. package/templates/skills/business-analyse/steps/step-03a1-setup.md +0 -486
  150. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +0 -300
  151. package/templates/skills/business-analyse/steps/step-03b-ui.md +0 -405
  152. package/templates/skills/business-analyse/steps/step-03c-compile.md +0 -516
  153. package/templates/skills/business-analyse/steps/step-03d-validate.md +0 -691
  154. package/templates/skills/business-analyse/steps/step-04-consolidation.md +0 -17
  155. package/templates/skills/business-analyse/steps/step-04a-collect.md +0 -415
  156. package/templates/skills/business-analyse/steps/step-04b-analyze.md +0 -163
  157. package/templates/skills/business-analyse/steps/step-04c-decide.md +0 -186
  158. package/templates/skills/business-analyse/steps/step-05a-handoff.md +0 -937
  159. package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -522
  160. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +0 -703
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: step-00-init
3
- description: Initialize Business Analysis - Auto-detect new/update, create feature.json
3
+ description: Initialize Business Analysis - Auto-detect new/update, create index.json structure
4
4
  model: sonnet
5
5
  next_step: steps/step-01-cadrage.md
6
6
  ---
@@ -17,7 +17,7 @@ next_step: steps/step-01-cadrage.md
17
17
  ═══════════════════════════════════════════════════════════════
18
18
  ```
19
19
 
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.
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 index.json structure with thematic JSON files.
21
21
 
22
22
  ## Flow
23
23
 
@@ -29,7 +29,7 @@ Initialize the business analysis workflow by auto-detecting whether this is a ne
29
29
  6. Generate feature ID
30
30
  7. Create output directory structure
31
31
  8. Deploy JSON schemas
32
- 9. Create master feature.json
32
+ 9. Create master index.json
33
33
  10. Update config
34
34
  11. Display summary
35
35
  12. Load next step
@@ -85,10 +85,10 @@ mcp__smartstack__validate_conventions({ checks: ["tables"] })
85
85
 
86
86
  Execute workflow detection algorithm:
87
87
  1. **Review Mode Detection:** Check if `{feature_description}` starts with `-review`
88
- 2. **Existing Projects Scanner:** Glob `docs/business-analyse/*/feature.json` (project-level)
89
- 2b. **Existing Applications Scanner:** Glob `docs/*/business-analyse/*/feature.json`
90
- 3. **Similarity Analysis:** Score user intent against existing apps (>= 80 = strong match)
91
- 4. **Decision Tree:** Prompt user with relevant options
88
+ 2. **Existing Projects Scanner:** Glob `docs/business-analyse/*/index.json` (project-level)
89
+ 3. **Existing Applications Scanner:** Glob `docs/*/business-analyse/*/index.json`
90
+ 4. **Similarity Analysis:** Score user intent against existing apps (>= 80 = strong match)
91
+ 5. **Decision Tree:** Prompt user with relevant options
92
92
 
93
93
  **Decision logic:**
94
94
 
@@ -118,7 +118,7 @@ existing_apps: array of { app, featureId, description, version }
118
118
  existing_projects: array of { projectName, projectId, applications[], version }
119
119
  ```
120
120
 
121
- > **Project Resume Detection:** If a project-level feature.json is found at `docs/business-analyse/*/feature.json`, check its `metadata.workflow` to determine resume point. The project may have partially completed applications.
121
+ > **Project Resume Detection:** If a project-level index.json is found at `docs/business-analyse/*/index.json`, check its `metadata.workflow` to determine resume point. The project may have partially completed applications.
122
122
 
123
123
  ## Step 3b: Early Multi-Application Detection from Prompt (NEW)
124
124
 
@@ -191,7 +191,7 @@ candidate_applications: [{ name, description, modules, context }]
191
191
  shared_modules_extracted: boolean # true if user chose extraction
192
192
  ```
193
193
 
194
- → Skip step 4 (application name) — applications will be confirmed in step-01b
194
+ → Skip step 4 (application name) — applications will be confirmed in step-01-cadrage
195
195
  → Continue to step 5 (language selection)
196
196
 
197
197
  **IF "Application unique":**
@@ -262,7 +262,7 @@ language: string (code, e.g., "en", "fr")
262
262
 
263
263
  > The analysis phase is ALWAYS interactive — the AI listens, reformulates,
264
264
  > challenges, and validates with the user. This is non-negotiable regardless
265
- > of development mode. Vibe coding applies to code execution (step-03+), NOT to analysis.
265
+ > of development mode.
266
266
 
267
267
  **Set directly (no question):**
268
268
 
@@ -292,7 +292,7 @@ feature_id: string
292
292
 
293
293
  ```
294
294
  IF workflow_mode = "project":
295
- // Project mode: create project-level directory + per-app directories later (in step-01b)
295
+ // Project mode: create project-level directory + per-app directories later
296
296
  mkdir -p docs/business-analyse/v1.0
297
297
  docs_dir = "docs/business-analyse/v{version}"
298
298
 
@@ -301,7 +301,7 @@ ELSE IF workflow_type = "new":
301
301
  docs_dir = "docs/{app}/business-analyse/v{version}"
302
302
 
303
303
  ELSE:
304
- Directory already exists from ba-writer.createVersion()
304
+ Directory already exists from previous session
305
305
  ```
306
306
 
307
307
  **Store:**
@@ -311,48 +311,29 @@ docs_dir: string
311
311
 
312
312
  ## Step 8: Deploy JSON Schemas to Project (MANDATORY)
313
313
 
314
- > **The JSON Schemas MUST be present in the project alongside the generated feature.json files.**
315
- > Without schemas, feature.json files cannot be validated and have no structural reference.
314
+ > **The JSON Schemas MUST be present in the project alongside the generated index.json files.**
315
+ > Without schemas, JSON files cannot be validated and have no structural reference.
316
316
 
317
- See [references/init-schema-deployment.md](../references/init-schema-deployment.md) for cache-based deployment logic (9 schema files, version-checked via `.schema-cache.json`).
317
+ See [references/init-schema-deployment.md](../references/init-schema-deployment.md) for cache-based deployment logic:
318
+ - 7 thematic schemas: entities.json, rules.json, usecases.json, permissions.json, screens.json, validation.json, handoff.json
319
+ - Version-checked via `.schema-cache.json`
318
320
 
319
- ## Step 8b: Cache Warming (PERFORMANCE OPTIMIZATION)
321
+ **Deployment logic:**
322
+ 1. Read `.schema-cache.json` if present
323
+ 2. Compare current smartstack version with cached version
324
+ 3. If versions match, skip deployment (already done)
325
+ 4. If versions differ or cache missing:
326
+ - Deploy all 7 schema files from `@smartstack/cli/schemas/` to `{docs_dir}/schemas/`
327
+ - Update `.schema-cache.json` with new version
320
328
 
321
- > **Objective:** Pre-load frequently-used templates and context files to reduce redundant reads.
322
- > **Expected token savings:** 15-20% across entire BA session
329
+ ## Step 9: Create Master index.json and Thematic Files
323
330
 
324
- **Implementation:**
325
-
326
- **Files to pre-load:**
327
-
328
- 1. **Schemas (CRITICAL):** All JSON files under `docs/{app}/business-analyse/schemas/**/*.json` (9 files)
329
- 2. **Questionnaires (HIGH):** All `.md` files under `~/.claude/skills/business-analyse/questionnaire/` (16 files)
330
- 3. **Catalog:** `~/.claude/skills/business-analyse/patterns/suggestion-catalog.md` (1 file)
331
-
332
- **After loading, display:**
333
- ```
334
- ✓ Cache warmed: 9 schemas + 16 questionnaires + 1 catalog
335
- Expected savings: 15-20% session tokens
336
- Retention: schemas (session-wide), questionnaires (until step-02)
337
- ```
338
-
339
- **Bucket Strategy:**
340
-
341
- See [references/cache-warming-strategy.md](../references/cache-warming-strategy.md) for complete documentation on:
342
- - 5 cache buckets (schemas, questionnaires, moduleSpec, handoff, etc.)
343
- - Retention policies and clearing rules
344
- - Token savings calculations (baseline vs optimized)
345
- - Monitoring cache efficiency
346
- - When to pre-load vs lazy-load
347
-
348
- ## Step 9: Create Master feature.json
349
-
350
- Create the master feature document using ba-writer agent.
331
+ Create the master index document and initialize thematic JSON files using ba-writer agent.
351
332
 
352
333
  ```
353
334
  IF workflow_mode = "project":
354
- // PROJECT MODE: Create project-level feature.json
355
- ba-writer.createProjectFeature({
335
+ // PROJECT MODE: Create project-level index.json
336
+ ba-writer.createProjectIndex({
356
337
  id: generate_project_id(), // PROJ-NNN
357
338
  version: {version},
358
339
  scope: "project",
@@ -375,15 +356,23 @@ IF workflow_mode = "project":
375
356
  }
376
357
  })
377
358
 
378
- Output path: docs/business-analyse/v{version}/feature.json
359
+ Output path: docs/business-analyse/v{version}/index.json
360
+ Thematic files (empty, initialized): docs/business-analyse/v{version}/*.json
361
+ - entities.json
362
+ - rules.json
363
+ - usecases.json
364
+ - permissions.json
365
+ - screens.json
366
+ - validation.json
367
+ - handoff.json
379
368
 
380
369
  Store:
381
370
  project_id: string // PROJ-NNN
382
371
  feature_id: project_id // In project mode, feature_id = project_id for step-01
383
372
 
384
373
  ELSE:
385
- // SINGLE-APP MODE: Create application-level feature.json
386
- ba-writer.createApplicationFeature({
374
+ // SINGLE-APP MODE: Create application-level index.json + thematic files
375
+ ba-writer.createApplicationIndex({
387
376
  id: {feature_id},
388
377
  version: {version},
389
378
  scope: "application",
@@ -405,11 +394,19 @@ ELSE:
405
394
  }
406
395
  })
407
396
 
408
- Output path: docs/{app}/business-analyse/v{version}/feature.json
397
+ Output path: docs/{app}/business-analyse/v{version}/index.json
398
+ Thematic files (empty, initialized): docs/{app}/business-analyse/v{version}/*.json
399
+ - entities.json
400
+ - rules.json
401
+ - usecases.json
402
+ - permissions.json
403
+ - screens.json
404
+ - validation.json
405
+ - handoff.json
409
406
  ```
410
407
 
411
- > **Note:** In project mode, per-application feature.json files are created later in step-01b.
412
- > In single-app mode, step-02 (decomposition) determines if it's single or multi-module.
408
+ > **Note:** In project mode, per-application index.json files are created later in step-01-cadrage.
409
+ > In single-app mode, step-02 (structure) determines if it's single or multi-module.
413
410
 
414
411
  ## Step 10: Update Config
415
412
 
@@ -442,7 +439,7 @@ Update `.business-analyse/config.json` with new feature information.
442
439
  | Workflow | {workflow_type} |
443
440
  | Mode | {workflow_mode === "project" ? "Multi-application project" : "Single application"} |
444
441
  | Application/Project| {workflow_mode === "project" ? project_name + " (" + candidate_applications.length + " apps)" : application_name} |
445
- | Output Path | {docs_dir}/feature.json |
442
+ | Output Path | {docs_dir}/index.json |
446
443
  | Language | {language} |
447
444
  | Version | {version} |
448
445
  | MCP Available | true |
@@ -467,7 +464,7 @@ feature_description: string
467
464
  workflow_type: "new" | "update"
468
465
  workflow_mode: "application" | "project"
469
466
  application_name: string # Single-app: app name. Project: project name.
470
- applicationCode: string # PascalCase derived from application_name (preliminary, confirmed in step-01b)
467
+ applicationCode: string # PascalCase derived from application_name (preliminary, confirmed in step-01)
471
468
  project_id: string | null # PROJ-NNN if project mode, null if single-app
472
469
  candidate_applications: array | null # Pre-identified apps from prompt (project mode only)
473
470
  shared_modules_extracted: boolean # True if user chose to extract shared modules as new app
@@ -484,7 +481,7 @@ version: string
484
481
  |-------|--------|
485
482
  | Config missing | Create fresh with defaults, continue |
486
483
  | Directory creation fails | Check permissions, display error, EXIT |
487
- | feature.json creation fails | Validate ba-writer, retry or fallback |
484
+ | index.json creation fails | Validate ba-writer, retry or fallback |
488
485
  | Feature ID not unique | Generate new ID, retry |
489
486
 
490
487
  ### Resume After Interruption
@@ -492,52 +489,46 @@ version: string
492
489
  If initialization was interrupted:
493
490
 
494
491
  1. Check `.business-analyse/config.json` for currentFeature or currentProject
495
- 2. If project ID exists, search for project feature.json in `docs/business-analyse/`
492
+ 2. If project ID exists, search for project index.json in `docs/business-analyse/`
496
493
  - If found with scope = "project": resume project mode (see Project Resume below)
497
- 3. If feature ID exists, search for feature.json in `docs/`
494
+ 3. If feature ID exists, search for index.json in `docs/`
498
495
  4. If found, check status and `metadata.workflow.lastCompletedStep`:
499
496
 
500
497
  **Status-based resume routing (check in this order):**
501
498
 
502
- - If status = `"handed-off"` AND `ba-interactive.html` missing:
503
- → Resume at `step-05b-deploy.md` (deploy artifacts + HTML)
504
- → Display: "Handoff complete but HTML/artifacts missing — deploying..."
499
+ - If status = `"handed-off"`:
500
+ → Resume at `step-06-review.md`
501
+ → Display: "Handoff complete proceeding to review..."
505
502
 
506
- - If status = `"handed-off"` AND `.ralph/prd-*.json` files missing:
507
- → Resume at `step-05b-deploy.md` (only deploy artifacts needed)
508
- → Display: "Handoff complete but PRD files missing — deploying..."
509
-
510
- - If status = `"consolidated"` OR lastCompletedStep = `"step-04-consolidation"`:
511
- → Resume directly at `step-05a-handoff.md` (skip steps 00-04)
512
- → Display: "Resuming from consolidation — proceeding to handoff..."
503
+ - If status = `"consolidated"`:
504
+ → Resume directly at `step-05-deploy.md`
505
+ → Display: "Resuming from consolidation proceeding to deployment..."
513
506
 
514
507
  - If status = `"specified"` AND `metadata.workflow.allModulesSpecified === true`:
515
- → Resume at `step-04a-collect.md` (consolidation phase)
508
+ → Resume at `step-04-consolidate.md`
516
509
  → Display: "All modules specified — resuming at consolidation..."
517
510
 
518
511
  - If status = `"specified"` AND `metadata.workflow.completedModules.length > 0` AND `metadata.workflow.completedModules.length < metadata.workflow.moduleOrder.length`:
519
- → Resume at `step-03a1-setup.md` (continue specifying remaining modules)
512
+ → Resume at `step-03-specify.md` (continue specifying remaining modules)
520
513
  → Display: "Resuming module specification ({completedCount}/{totalCount})..."
521
514
 
522
515
  - Otherwise: offer to resume from last completed step
523
516
 
524
- 4. If not found, create fresh feature.json
517
+ 5. If not found, create fresh index.json
525
518
 
526
519
  **Project Resume (project mode):**
527
520
 
528
- If a project-level feature.json is found (scope = "project"):
521
+ If a project-level index.json is found (scope = "project"):
529
522
 
530
523
  - If status = `"draft"` or `"framed"`:
531
- → Resume at `step-01-cadrage.md` or `step-01b-applications.md`
524
+ → Resume at `step-01-cadrage.md`
532
525
 
533
526
  - If status = `"decomposed"`:
534
527
  → Check `metadata.workflow.currentApplicationIndex` and `completedApplications[]`
535
528
  → Resume module specification for current application (step-02 or step-03)
536
529
 
537
530
  - If status = `"specified"`:
538
- → All applications specified → Resume at `step-04a-collect.md`
531
+ → All applications specified → Resume at `step-04-consolidate.md`
539
532
 
540
533
  - If status = `"consolidated"`:
541
- → Resume at `step-05a-handoff.md`
542
-
543
- Follow `_module-loop.md` "Project Mode (multi app)" resume logic for detailed routing.
534
+ → Resume at `step-05-deploy.md`