@atlashub/smartstack-cli 4.18.0 → 4.20.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/package.json +1 -1
- package/templates/agents/ba-reader.md +86 -80
- package/templates/agents/ba-writer.md +318 -415
- package/templates/agents/docs-context-reader.md +3 -3
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +126 -0
- package/templates/skills/apex/SKILL.md +29 -16
- package/templates/skills/apex/_shared.md +62 -9
- package/templates/skills/apex/references/analysis-methods.md +8 -6
- package/templates/skills/apex/references/challenge-questions.md +5 -5
- package/templates/skills/apex/references/core-seed-data.md +68 -45
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +26 -21
- package/templates/skills/apex/references/parallel-execution.md +156 -0
- package/templates/skills/apex/references/person-extension-pattern.md +12 -12
- package/templates/skills/apex/references/post-checks.md +1748 -1726
- package/templates/skills/apex/references/smartstack-api.md +63 -57
- package/templates/skills/apex/references/smartstack-frontend-compliance.md +594 -0
- package/templates/skills/apex/references/smartstack-frontend.md +1246 -1842
- package/templates/skills/apex/references/smartstack-layers.md +98 -145
- package/templates/skills/apex/steps/step-00-init.md +30 -6
- package/templates/skills/apex/steps/step-01-analyze.md +27 -23
- package/templates/skills/apex/steps/step-02-plan.md +12 -12
- package/templates/skills/apex/steps/step-03-execute.md +198 -143
- package/templates/skills/apex/steps/step-04-examine.md +24 -93
- package/templates/skills/apex/steps/step-05-deep-review.md +16 -16
- package/templates/skills/apex/steps/step-06-resolve.md +9 -9
- package/templates/skills/apex/steps/step-07-tests.md +3 -1
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -1
- package/templates/skills/business-analyse/SKILL.md +182 -301
- package/templates/skills/business-analyse/_shared.md +119 -336
- package/templates/skills/business-analyse/html/ba-interactive.html +706 -85
- package/templates/skills/business-analyse/html/build-html.js +41 -3
- package/templates/skills/business-analyse/html/src/partials/cadrage-context.html +34 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-risks.html +48 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-scope.html +49 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-stakeholders.html +55 -0
- package/templates/skills/business-analyse/html/src/partials/cadrage-success.html +34 -0
- package/templates/skills/business-analyse/html/src/partials/consol-datamodel.html +8 -0
- package/templates/skills/business-analyse/html/src/partials/consol-flows.html +29 -0
- package/templates/skills/business-analyse/html/src/partials/consol-interactions.html +8 -0
- package/templates/skills/business-analyse/html/src/partials/consol-permissions.html +8 -0
- package/templates/skills/business-analyse/html/src/partials/decomp-dependencies.html +38 -0
- package/templates/skills/business-analyse/html/src/partials/decomp-modules.html +51 -0
- package/templates/skills/business-analyse/html/src/partials/handoff-summary.html +24 -0
- package/templates/skills/business-analyse/html/src/partials/module-spec-container.html +4 -0
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +17 -1
- package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +32 -6
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +100 -63
- package/templates/skills/business-analyse/html/src/scripts/06-render-mockups.js +372 -0
- package/templates/skills/business-analyse/html/src/scripts/07-render-handoff.js +1 -1
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +41 -13
- package/templates/skills/business-analyse/html/src/styles/09-mockups-html.css +136 -0
- package/templates/skills/business-analyse/html/src/template.html +1 -1
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +7 -5
- package/templates/skills/business-analyse/questionnaire/01-context.md +11 -157
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +101 -0
- package/templates/skills/business-analyse/questionnaire/03-data-ui.md +92 -0
- package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +6 -0
- package/templates/skills/business-analyse/questionnaire/05-cross-module.md +69 -0
- package/templates/skills/business-analyse/questionnaire.md +22 -280
- package/templates/skills/business-analyse/react/application-viewer.md +2 -2
- package/templates/skills/business-analyse/react/components.md +4 -4
- package/templates/skills/business-analyse/react/i18n-template.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +14 -14
- package/templates/skills/business-analyse/references/acceptance-criteria.md +21 -21
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +3 -3
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +5 -5
- package/templates/skills/business-analyse/references/deploy-data-build.md +12 -11
- package/templates/skills/business-analyse/references/deploy-modes.md +10 -10
- package/templates/skills/business-analyse/references/detection-strategies.md +6 -6
- package/templates/skills/business-analyse/references/html-data-mapping.md +15 -15
- package/templates/skills/business-analyse/references/naming-conventions.md +4 -4
- package/templates/skills/business-analyse/references/review-data-mapping.md +29 -29
- package/templates/skills/business-analyse/references/robustness-checks.md +36 -36
- package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +1 -1
- package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
- package/templates/skills/business-analyse/references/wireframe-svg-style-guide.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +8 -8
- package/templates/skills/business-analyse/schemas/feature-schema.json +3 -3
- package/templates/skills/business-analyse/schemas/index-schema.json +47 -0
- package/templates/skills/business-analyse/schemas/project-schema.json +6 -6
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +5 -3
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +4 -4
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/shared/common-defs.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +68 -77
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +50 -216
- package/templates/skills/business-analyse/steps/step-02-structure.md +175 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +198 -0
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +478 -0
- package/templates/skills/business-analyse/steps/step-05-deploy.md +220 -0
- package/templates/skills/business-analyse/steps/step-06-review.md +51 -69
- package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
- package/templates/skills/business-analyse/templates/tpl-handoff.md +20 -17
- package/templates/skills/business-analyse/templates/tpl-launch-displays.md +2 -2
- package/templates/skills/business-analyse/templates-react.md +2 -2
- package/templates/skills/derive-prd/SKILL.md +92 -0
- package/templates/skills/derive-prd/references/acceptance-criteria.md +169 -0
- package/templates/skills/derive-prd/references/entity-domain-mapping.md +115 -0
- package/templates/skills/{business-analyse → derive-prd}/references/handoff-file-templates.md +131 -120
- package/templates/skills/{business-analyse → derive-prd}/references/handoff-mappings.md +95 -95
- package/templates/skills/{business-analyse → derive-prd}/references/handoff-seeddata-generation.md +312 -312
- package/templates/skills/{business-analyse → derive-prd}/references/prd-generation.md +262 -263
- package/templates/skills/derive-prd/references/readiness-scoring.md +104 -0
- package/templates/skills/derive-prd/schemas/handoff-schema.json +95 -0
- package/templates/skills/derive-prd/steps/step-00-validate.md +130 -0
- package/templates/skills/derive-prd/steps/step-01-transform.md +206 -0
- package/templates/skills/derive-prd/steps/step-02-export.md +181 -0
- package/templates/skills/{business-analyse → derive-prd}/templates/tpl-progress.md +172 -172
- package/templates/skills/documentation/SKILL.md +7 -0
- package/templates/skills/ralph-loop/SKILL.md +2 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +1 -1
- package/templates/skills/ralph-loop/steps/step-01-task.md +2 -2
- package/templates/skills/apex/references/agent-teams-protocol.md +0 -203
- package/templates/skills/business-analyse/_architecture.md +0 -124
- package/templates/skills/business-analyse/_elicitation.md +0 -206
- package/templates/skills/business-analyse/_module-loop.md +0 -115
- package/templates/skills/business-analyse/_rules.md +0 -142
- package/templates/skills/business-analyse/_suggestions.md +0 -34
- package/templates/skills/business-analyse/questionnaire/00-application.md +0 -160
- package/templates/skills/business-analyse/questionnaire/00b-project.md +0 -85
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +0 -189
- package/templates/skills/business-analyse/questionnaire/03-scope.md +0 -164
- package/templates/skills/business-analyse/questionnaire/04-data.md +0 -88
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +0 -58
- package/templates/skills/business-analyse/questionnaire/06-security.md +0 -68
- package/templates/skills/business-analyse/questionnaire/07-ui.md +0 -76
- package/templates/skills/business-analyse/questionnaire/08-performance.md +0 -42
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -45
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -58
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +0 -59
- package/templates/skills/business-analyse/questionnaire/12-migration.md +0 -58
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +0 -69
- package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +0 -135
- package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +0 -136
- package/templates/skills/business-analyse/references/agent-module-prompt.md +0 -366
- package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +0 -557
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +0 -566
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +0 -41
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +0 -74
- package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +0 -115
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +0 -68
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +0 -85
- package/templates/skills/business-analyse/references/team-orchestration.md +0 -1093
- package/templates/skills/business-analyse/references/validate-incremental-html.md +0 -121
- package/templates/skills/business-analyse/steps/step-01b-applications.md +0 -419
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +0 -387
- package/templates/skills/business-analyse/steps/step-03a-data.md +0 -16
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +0 -486
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +0 -300
- package/templates/skills/business-analyse/steps/step-03b-ui.md +0 -405
- package/templates/skills/business-analyse/steps/step-03c-compile.md +0 -516
- package/templates/skills/business-analyse/steps/step-03d-validate.md +0 -691
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +0 -17
- package/templates/skills/business-analyse/steps/step-04a-collect.md +0 -415
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +0 -163
- package/templates/skills/business-analyse/steps/step-04c-decide.md +0 -186
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +0 -937
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -522
- 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
|
|
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
|
|
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
|
|
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/*/
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
|
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-
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
315
|
-
> Without schemas,
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
322
|
-
> **Expected token savings:** 15-20% across entire BA session
|
|
329
|
+
## Step 9: Create Master index.json and Thematic Files
|
|
323
330
|
|
|
324
|
-
|
|
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
|
|
355
|
-
ba-writer.
|
|
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}/
|
|
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
|
|
386
|
-
ba-writer.
|
|
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}/
|
|
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
|
|
412
|
-
> In single-app mode, step-02 (
|
|
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}/
|
|
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-
|
|
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
|
-
|
|
|
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
|
|
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
|
|
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"
|
|
503
|
-
→ Resume at `step-
|
|
504
|
-
→ Display: "Handoff complete
|
|
499
|
+
- If status = `"handed-off"`:
|
|
500
|
+
→ Resume at `step-06-review.md`
|
|
501
|
+
→ Display: "Handoff complete — proceeding to review..."
|
|
505
502
|
|
|
506
|
-
- If status = `"
|
|
507
|
-
→ Resume at `step-
|
|
508
|
-
→ Display: "
|
|
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-
|
|
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-
|
|
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
|
-
|
|
517
|
+
5. If not found, create fresh index.json
|
|
525
518
|
|
|
526
519
|
**Project Resume (project mode):**
|
|
527
520
|
|
|
528
|
-
If a project-level
|
|
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`
|
|
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-
|
|
531
|
+
→ All applications specified → Resume at `step-04-consolidate.md`
|
|
539
532
|
|
|
540
533
|
- If status = `"consolidated"`:
|
|
541
|
-
→ Resume at `step-
|
|
542
|
-
|
|
543
|
-
Follow `_module-loop.md` "Project Mode (multi app)" resume logic for detailed routing.
|
|
534
|
+
→ Resume at `step-05-deploy.md`
|