@atlashub/smartstack-cli 4.17.1 → 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.
- package/package.json +1 -1
- package/templates/agents/ba-reader.md +86 -80
- package/templates/agents/ba-writer.md +321 -413
- 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 +703 -82
- 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 +31 -5
- 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/10-comments.js +41 -13
- package/templates/skills/business-analyse/html/src/styles/09-mockups-html.css +136 -0
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +7 -5
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +142 -0
- package/templates/skills/business-analyse/questionnaire/03-data-ui.md +94 -0
- package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +150 -0
- package/templates/skills/business-analyse/questionnaire/05-cross-module.md +69 -0
- package/templates/skills/business-analyse/questionnaire.md +23 -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 +25 -25
- 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 +7 -7
- package/templates/skills/business-analyse/references/deploy-data-build.md +14 -12
- 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 -33
- 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 +9 -6
- 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 -3
- package/templates/skills/business-analyse/steps/step-00-init.md +93 -134
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +136 -172
- 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 -258
- 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/ralph-loop/SKILL.md +10 -4
- package/templates/skills/ralph-loop/references/category-completeness.md +20 -4
- package/templates/skills/ralph-loop/references/compact-loop.md +80 -48
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +4 -2
- package/templates/skills/ralph-loop/references/parallel-execution.md +27 -27
- package/templates/skills/ralph-loop/steps/step-00-init.md +19 -9
- package/templates/skills/ralph-loop/steps/step-01-task.md +12 -4
- package/templates/skills/ralph-loop/steps/step-02-execute.md +9 -4
- package/templates/skills/ralph-loop/steps/step-03-commit.md +1 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +5 -21
- package/templates/skills/ralph-loop/steps/step-05-report.md +6 -1
- 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/_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 -43
- 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 -362
- 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 -1022
- 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 -506
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +0 -301
- package/templates/skills/business-analyse/steps/step-03b-ui.md +0 -425
- package/templates/skills/business-analyse/steps/step-03c-compile.md +0 -611
- package/templates/skills/business-analyse/steps/step-03d-validate.md +0 -783
- 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 -840
- 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,29 +85,20 @@ 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
|
-
|
|
94
|
-
const detectionResult = detectWorkflowType(feature_description, existingApps);
|
|
93
|
+
**Decision logic:**
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- Review mode troubleshooting (if review mode failed)
|
|
104
|
-
|
|
105
|
-
→ Resolve ambiguity with user clarification
|
|
106
|
-
|
|
107
|
-
ELSE:
|
|
108
|
-
Workflow detected: {detectionResult.workflow_type} ✓
|
|
109
|
-
→ Continue to application name determination
|
|
110
|
-
```
|
|
95
|
+
1. Run workflow detection: compare `{feature_description}` against `existingApps` using similarity scoring.
|
|
96
|
+
2. **IF detection fails or is ambiguous:**
|
|
97
|
+
- **CONDITIONAL LOAD:** Read `references/detection-strategies.md` for detailed scoring algorithm, decision tree, and error handling.
|
|
98
|
+
- Resolve ambiguity with user clarification.
|
|
99
|
+
3. **IF detection succeeds:**
|
|
100
|
+
- `Workflow detected: {workflow_type} ✓`
|
|
101
|
+
- Continue to application name determination.
|
|
111
102
|
|
|
112
103
|
**Key decision points:**
|
|
113
104
|
1. IF review mode → load ba-review.json, skip to step-06-review.md
|
|
@@ -127,7 +118,7 @@ existing_apps: array of { app, featureId, description, version }
|
|
|
127
118
|
existing_projects: array of { projectName, projectId, applications[], version }
|
|
128
119
|
```
|
|
129
120
|
|
|
130
|
-
> **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.
|
|
131
122
|
|
|
132
123
|
## Step 3b: Early Multi-Application Detection from Prompt (NEW)
|
|
133
124
|
|
|
@@ -137,44 +128,30 @@ existing_projects: array of { projectName, projectId, applications[], version }
|
|
|
137
128
|
|
|
138
129
|
**Detection patterns (ANY match = multi-app detected):**
|
|
139
130
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
/premier[e]?\s+application.*deuxième\s+application/is,
|
|
146
|
-
/app\s*1\s*[:.].*app\s*2\s*[:.]*/is,
|
|
147
|
-
// English patterns
|
|
148
|
-
/an?\s+application\s+(for\s+)?\w+.*an?\s+application\s+(for\s+)?\w+/is,
|
|
149
|
-
/application\s*#?\d\s*[:.].*application\s*#?\d\s*[:.]*/is,
|
|
150
|
-
/first\s+app.*second\s+app/is,
|
|
151
|
-
];
|
|
131
|
+
French patterns:
|
|
132
|
+
- "une application X ... une application Y" (two occurrences of "une application")
|
|
133
|
+
- "application 1: X ... application 2: Y" (numbered applications)
|
|
134
|
+
- "première application ... deuxième application"
|
|
135
|
+
- "app 1: ... app 2: ..."
|
|
152
136
|
|
|
153
|
-
|
|
154
|
-
|
|
137
|
+
English patterns:
|
|
138
|
+
- "an application (for) X ... an application (for) Y" (two occurrences)
|
|
139
|
+
- "application #1: ... application #2: ..." (numbered)
|
|
140
|
+
- "first app ... second app"
|
|
141
|
+
|
|
142
|
+
If ANY of these patterns is found in `{feature_description}`, set `isMultiApp = true`.
|
|
155
143
|
|
|
156
144
|
**IF multi-app detected:**
|
|
157
145
|
|
|
158
146
|
1. Extract candidate applications from the prompt:
|
|
159
147
|
|
|
160
|
-
|
|
161
|
-
// Parse the prompt to identify application boundaries
|
|
162
|
-
// Each "une application X" / "an application X" block = one candidate
|
|
163
|
-
const candidates = extractApplicationCandidates(feature_description);
|
|
164
|
-
// Result example:
|
|
165
|
-
// [
|
|
166
|
-
// { name: "RH", description: "gestion des employes, conges, temps", modules: ["Employes", "Conges", "Temps"] },
|
|
167
|
-
// { name: "Projet", description: "gestion des projets, saisie du temps", modules: ["Projets", "Temps"] }
|
|
168
|
-
// ]
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
2. Detect shared modules across candidates:
|
|
148
|
+
**Extraction algorithm (3 steps):**
|
|
172
149
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
150
|
+
1. **Identify boundaries:** Split the prompt at each "une application" / "an application" occurrence. Each block = one candidate.
|
|
151
|
+
2. **Extract per candidate:** For each block, derive `name` (application name), `description` (summary of purpose), and `modules[]` (listed modules/features).
|
|
152
|
+
- Example result: `[{ name: "RH", description: "gestion des employes, conges, temps", modules: ["Employes", "Conges", "Temps"] }, ...]`
|
|
153
|
+
3. **Detect shared modules:** Collect all module names across all candidates. Any module appearing in more than one candidate is a shared module.
|
|
154
|
+
- Example: `sharedModules = ["Temps"]` (appears in both RH and Projet)
|
|
178
155
|
|
|
179
156
|
3. Display detection result and confirm:
|
|
180
157
|
|
|
@@ -214,7 +191,7 @@ candidate_applications: [{ name, description, modules, context }]
|
|
|
214
191
|
shared_modules_extracted: boolean # true if user chose extraction
|
|
215
192
|
```
|
|
216
193
|
|
|
217
|
-
→ 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
|
|
218
195
|
→ Continue to step 5 (language selection)
|
|
219
196
|
|
|
220
197
|
**IF "Application unique":**
|
|
@@ -285,7 +262,7 @@ language: string (code, e.g., "en", "fr")
|
|
|
285
262
|
|
|
286
263
|
> The analysis phase is ALWAYS interactive — the AI listens, reformulates,
|
|
287
264
|
> challenges, and validates with the user. This is non-negotiable regardless
|
|
288
|
-
> of development mode.
|
|
265
|
+
> of development mode.
|
|
289
266
|
|
|
290
267
|
**Set directly (no question):**
|
|
291
268
|
|
|
@@ -315,7 +292,7 @@ feature_id: string
|
|
|
315
292
|
|
|
316
293
|
```
|
|
317
294
|
IF workflow_mode = "project":
|
|
318
|
-
// Project mode: create project-level directory + per-app directories later
|
|
295
|
+
// Project mode: create project-level directory + per-app directories later
|
|
319
296
|
mkdir -p docs/business-analyse/v1.0
|
|
320
297
|
docs_dir = "docs/business-analyse/v{version}"
|
|
321
298
|
|
|
@@ -324,7 +301,7 @@ ELSE IF workflow_type = "new":
|
|
|
324
301
|
docs_dir = "docs/{app}/business-analyse/v{version}"
|
|
325
302
|
|
|
326
303
|
ELSE:
|
|
327
|
-
Directory already exists from
|
|
304
|
+
Directory already exists from previous session
|
|
328
305
|
```
|
|
329
306
|
|
|
330
307
|
**Store:**
|
|
@@ -334,57 +311,29 @@ docs_dir: string
|
|
|
334
311
|
|
|
335
312
|
## Step 8: Deploy JSON Schemas to Project (MANDATORY)
|
|
336
313
|
|
|
337
|
-
> **The JSON Schemas MUST be present in the project alongside the generated
|
|
338
|
-
> 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.
|
|
339
316
|
|
|
340
|
-
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`
|
|
341
320
|
|
|
342
|
-
|
|
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
|
|
343
328
|
|
|
344
|
-
|
|
345
|
-
> **Expected token savings:** 15-20% across entire BA session
|
|
329
|
+
## Step 9: Create Master index.json and Thematic Files
|
|
346
330
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
```javascript
|
|
350
|
-
// Pre-load CRITICAL (schemas) and HIGH (questionnaires) priority buckets
|
|
351
|
-
const schemaFiles = glob("docs/{app}/business-analyse/schemas/**/*.json");
|
|
352
|
-
for (const file of schemaFiles) {
|
|
353
|
-
read(file); // Triggers cache
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const questionnaireFiles = glob("~/.claude/skills/business-analyse/questionnaire/*.md");
|
|
357
|
-
for (const file of questionnaireFiles) {
|
|
358
|
-
read(file); // Triggers cache
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
read("~/.claude/skills/business-analyse/patterns/suggestion-catalog.md");
|
|
362
|
-
|
|
363
|
-
// Display status
|
|
364
|
-
console.log(`
|
|
365
|
-
✓ Cache warmed: 9 schemas + 16 questionnaires + 1 catalog
|
|
366
|
-
Expected savings: 15-20% session tokens
|
|
367
|
-
Retention: schemas (session-wide), questionnaires (until step-02)
|
|
368
|
-
`);
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
**Bucket Strategy:**
|
|
372
|
-
|
|
373
|
-
See [references/cache-warming-strategy.md](../references/cache-warming-strategy.md) for complete documentation on:
|
|
374
|
-
- 5 cache buckets (schemas, questionnaires, moduleSpec, handoff, etc.)
|
|
375
|
-
- Retention policies and clearing rules
|
|
376
|
-
- Token savings calculations (baseline vs optimized)
|
|
377
|
-
- Monitoring cache efficiency
|
|
378
|
-
- When to pre-load vs lazy-load
|
|
379
|
-
|
|
380
|
-
## Step 9: Create Master feature.json
|
|
381
|
-
|
|
382
|
-
Create the master feature document using ba-writer agent.
|
|
331
|
+
Create the master index document and initialize thematic JSON files using ba-writer agent.
|
|
383
332
|
|
|
384
333
|
```
|
|
385
334
|
IF workflow_mode = "project":
|
|
386
|
-
// PROJECT MODE: Create project-level
|
|
387
|
-
ba-writer.
|
|
335
|
+
// PROJECT MODE: Create project-level index.json
|
|
336
|
+
ba-writer.createProjectIndex({
|
|
388
337
|
id: generate_project_id(), // PROJ-NNN
|
|
389
338
|
version: {version},
|
|
390
339
|
scope: "project",
|
|
@@ -407,15 +356,23 @@ IF workflow_mode = "project":
|
|
|
407
356
|
}
|
|
408
357
|
})
|
|
409
358
|
|
|
410
|
-
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
|
|
411
368
|
|
|
412
369
|
Store:
|
|
413
370
|
project_id: string // PROJ-NNN
|
|
414
371
|
feature_id: project_id // In project mode, feature_id = project_id for step-01
|
|
415
372
|
|
|
416
373
|
ELSE:
|
|
417
|
-
// SINGLE-APP MODE: Create application-level
|
|
418
|
-
ba-writer.
|
|
374
|
+
// SINGLE-APP MODE: Create application-level index.json + thematic files
|
|
375
|
+
ba-writer.createApplicationIndex({
|
|
419
376
|
id: {feature_id},
|
|
420
377
|
version: {version},
|
|
421
378
|
scope: "application",
|
|
@@ -437,11 +394,19 @@ ELSE:
|
|
|
437
394
|
}
|
|
438
395
|
})
|
|
439
396
|
|
|
440
|
-
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
|
|
441
406
|
```
|
|
442
407
|
|
|
443
|
-
> **Note:** In project mode, per-application
|
|
444
|
-
> 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.
|
|
445
410
|
|
|
446
411
|
## Step 10: Update Config
|
|
447
412
|
|
|
@@ -474,7 +439,7 @@ Update `.business-analyse/config.json` with new feature information.
|
|
|
474
439
|
| Workflow | {workflow_type} |
|
|
475
440
|
| Mode | {workflow_mode === "project" ? "Multi-application project" : "Single application"} |
|
|
476
441
|
| Application/Project| {workflow_mode === "project" ? project_name + " (" + candidate_applications.length + " apps)" : application_name} |
|
|
477
|
-
| Output Path | {docs_dir}/
|
|
442
|
+
| Output Path | {docs_dir}/index.json |
|
|
478
443
|
| Language | {language} |
|
|
479
444
|
| Version | {version} |
|
|
480
445
|
| MCP Available | true |
|
|
@@ -499,7 +464,7 @@ feature_description: string
|
|
|
499
464
|
workflow_type: "new" | "update"
|
|
500
465
|
workflow_mode: "application" | "project"
|
|
501
466
|
application_name: string # Single-app: app name. Project: project name.
|
|
502
|
-
applicationCode: string # PascalCase derived from application_name (preliminary, confirmed in step-
|
|
467
|
+
applicationCode: string # PascalCase derived from application_name (preliminary, confirmed in step-01)
|
|
503
468
|
project_id: string | null # PROJ-NNN if project mode, null if single-app
|
|
504
469
|
candidate_applications: array | null # Pre-identified apps from prompt (project mode only)
|
|
505
470
|
shared_modules_extracted: boolean # True if user chose to extract shared modules as new app
|
|
@@ -516,7 +481,7 @@ version: string
|
|
|
516
481
|
|-------|--------|
|
|
517
482
|
| Config missing | Create fresh with defaults, continue |
|
|
518
483
|
| Directory creation fails | Check permissions, display error, EXIT |
|
|
519
|
-
|
|
|
484
|
+
| index.json creation fails | Validate ba-writer, retry or fallback |
|
|
520
485
|
| Feature ID not unique | Generate new ID, retry |
|
|
521
486
|
|
|
522
487
|
### Resume After Interruption
|
|
@@ -524,52 +489,46 @@ version: string
|
|
|
524
489
|
If initialization was interrupted:
|
|
525
490
|
|
|
526
491
|
1. Check `.business-analyse/config.json` for currentFeature or currentProject
|
|
527
|
-
2. If project ID exists, search for project
|
|
492
|
+
2. If project ID exists, search for project index.json in `docs/business-analyse/`
|
|
528
493
|
- If found with scope = "project": resume project mode (see Project Resume below)
|
|
529
|
-
3. If feature ID exists, search for
|
|
494
|
+
3. If feature ID exists, search for index.json in `docs/`
|
|
530
495
|
4. If found, check status and `metadata.workflow.lastCompletedStep`:
|
|
531
496
|
|
|
532
497
|
**Status-based resume routing (check in this order):**
|
|
533
498
|
|
|
534
|
-
- If status = `"handed-off"
|
|
535
|
-
→ Resume at `step-
|
|
536
|
-
→ Display: "Handoff complete
|
|
537
|
-
|
|
538
|
-
- If status = `"handed-off"` AND `.ralph/prd-*.json` files missing:
|
|
539
|
-
→ Resume at `step-05b-deploy.md` (only deploy artifacts needed)
|
|
540
|
-
→ Display: "Handoff complete but PRD files missing — deploying..."
|
|
499
|
+
- If status = `"handed-off"`:
|
|
500
|
+
→ Resume at `step-06-review.md`
|
|
501
|
+
→ Display: "Handoff complete — proceeding to review..."
|
|
541
502
|
|
|
542
|
-
- If status = `"consolidated"
|
|
543
|
-
→ Resume directly at `step-
|
|
544
|
-
→ Display: "Resuming from consolidation — proceeding to
|
|
503
|
+
- If status = `"consolidated"`:
|
|
504
|
+
→ Resume directly at `step-05-deploy.md`
|
|
505
|
+
→ Display: "Resuming from consolidation — proceeding to deployment..."
|
|
545
506
|
|
|
546
507
|
- If status = `"specified"` AND `metadata.workflow.allModulesSpecified === true`:
|
|
547
|
-
→ Resume at `step-
|
|
508
|
+
→ Resume at `step-04-consolidate.md`
|
|
548
509
|
→ Display: "All modules specified — resuming at consolidation..."
|
|
549
510
|
|
|
550
511
|
- If status = `"specified"` AND `metadata.workflow.completedModules.length > 0` AND `metadata.workflow.completedModules.length < metadata.workflow.moduleOrder.length`:
|
|
551
|
-
→ Resume at `step-
|
|
512
|
+
→ Resume at `step-03-specify.md` (continue specifying remaining modules)
|
|
552
513
|
→ Display: "Resuming module specification ({completedCount}/{totalCount})..."
|
|
553
514
|
|
|
554
515
|
- Otherwise: offer to resume from last completed step
|
|
555
516
|
|
|
556
|
-
|
|
517
|
+
5. If not found, create fresh index.json
|
|
557
518
|
|
|
558
519
|
**Project Resume (project mode):**
|
|
559
520
|
|
|
560
|
-
If a project-level
|
|
521
|
+
If a project-level index.json is found (scope = "project"):
|
|
561
522
|
|
|
562
523
|
- If status = `"draft"` or `"framed"`:
|
|
563
|
-
→ Resume at `step-01-cadrage.md`
|
|
524
|
+
→ Resume at `step-01-cadrage.md`
|
|
564
525
|
|
|
565
526
|
- If status = `"decomposed"`:
|
|
566
527
|
→ Check `metadata.workflow.currentApplicationIndex` and `completedApplications[]`
|
|
567
528
|
→ Resume module specification for current application (step-02 or step-03)
|
|
568
529
|
|
|
569
530
|
- If status = `"specified"`:
|
|
570
|
-
→ All applications specified → Resume at `step-
|
|
531
|
+
→ All applications specified → Resume at `step-04-consolidate.md`
|
|
571
532
|
|
|
572
533
|
- If status = `"consolidated"`:
|
|
573
|
-
→ Resume at `step-
|
|
574
|
-
|
|
575
|
-
Follow `_module-loop.md` "Project Mode (multi app)" resume logic for detailed routing.
|
|
534
|
+
→ Resume at `step-05-deploy.md`
|