@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,7 @@
|
|
|
1
1
|
# FEATURE_DATA & EMBEDDED_ARTIFACTS Build Reference
|
|
2
2
|
|
|
3
|
-
> Reference for step-
|
|
3
|
+
> Reference for step-05-deploy.md — complete mapping specification for the interactive HTML.
|
|
4
|
+
> **Canonical field mapping reference:** See also `html-data-mapping.md` for the authoritative field name mapping between module JSON files and HTML data objects.
|
|
4
5
|
|
|
5
6
|
## FEATURE_DATA Object
|
|
6
7
|
|
|
@@ -16,15 +17,15 @@ const FEATURE_DATA = {
|
|
|
16
17
|
cadrage: {
|
|
17
18
|
// CONTEXT SECTION — merged from problem/asIs/toBe (lean cadrage)
|
|
18
19
|
context: {
|
|
19
|
-
problem: master.cadrage.problem || "", // flat string from
|
|
20
|
-
trigger: master.cadrage.trigger || "", // flat string from
|
|
21
|
-
currentSituation: master.cadrage.asIs || "", // flat string from
|
|
22
|
-
desiredSituation: master.cadrage.toBe || "", // flat string from
|
|
20
|
+
problem: master.cadrage.problem || "", // flat string from index.json
|
|
21
|
+
trigger: master.cadrage.trigger || "", // flat string from index.json
|
|
22
|
+
currentSituation: master.cadrage.asIs || "", // flat string from index.json
|
|
23
|
+
desiredSituation: master.cadrage.toBe || "", // flat string from index.json
|
|
23
24
|
painPoints: (master.cadrage.stakeholders || []).flatMap(s => s.painPoints || []),
|
|
24
25
|
acceptanceCriteria: (master.cadrage.acceptanceCriteria || []).map(c => c.criterion)
|
|
25
26
|
},
|
|
26
27
|
scope: {
|
|
27
|
-
// CONVERT
|
|
28
|
+
// CONVERT index.json keys to HTML keys:
|
|
28
29
|
// mustHave → vital, shouldHave → important, couldHave → optional, outOfScope → excluded
|
|
29
30
|
// CRITICAL: Preserve per-item `module` assignment from coverageMatrix (NOT modules[0])
|
|
30
31
|
vital: (master.cadrage.globalScope?.mustHave || master.cadrage.coverageMatrix?.filter(i => i.category === "mustHave") || [])
|
|
@@ -84,12 +85,12 @@ const FEATURE_DATA = {
|
|
|
84
85
|
: (ent.fields || []).filter(f => f.foreignKey)
|
|
85
86
|
.map(f => `${f.foreignKey.table} (N:1) - ${f.description || f.name}`)
|
|
86
87
|
})),
|
|
87
|
-
permissions: module.specification.permissions || [],
|
|
88
|
+
permissions: module.specification.permissionMatrix?.permissions || [],
|
|
88
89
|
apiEndpoints: module.specification.apiEndpoints || []
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
92
|
consolidation: {
|
|
92
|
-
integrations: master.consolidation.
|
|
93
|
+
integrations: master.consolidation.crossModuleInteractions || [],
|
|
93
94
|
sharedEntities: master.consolidation.sharedEntities || [],
|
|
94
95
|
sequenceDiagrams: master.consolidation.e2eFlows || []
|
|
95
96
|
},
|
|
@@ -106,8 +107,8 @@ const FEATURE_DATA = {
|
|
|
106
107
|
|
|
107
108
|
### Build Process
|
|
108
109
|
|
|
109
|
-
1. Extract metadata from master
|
|
110
|
-
2. Extract cadrage from master
|
|
110
|
+
1. Extract metadata from master index.json
|
|
111
|
+
2. Extract cadrage from master index.json (CONVERT scope keys)
|
|
111
112
|
3. Extract stakeholders from master.stakeholders
|
|
112
113
|
4. Iterate ALL modules and populate moduleSpecs (THIS IS CRITICAL — empty moduleSpecs = BUG)
|
|
113
114
|
5. For EACH module, extract: useCases, businessRules, entities, permissions, apiEndpoints
|
|
@@ -117,8 +118,8 @@ const FEATURE_DATA = {
|
|
|
117
118
|
## EMBEDDED_ARTIFACTS Object
|
|
118
119
|
|
|
119
120
|
> **CRITICAL:** The wireframes object is keyed by moduleCode (NOT a flat array).
|
|
120
|
-
> Field names MUST be renamed from
|
|
121
|
-
> The HTML renderer reads `wf.format` and `wf.content` — using
|
|
121
|
+
> Field names MUST be renamed from module JSON files: `mockupFormat` → `format`, `mockup` → `content`.
|
|
122
|
+
> The HTML renderer reads `wf.format` and `wf.content` — using module JSON file names will produce EMPTY mockups.
|
|
122
123
|
|
|
123
124
|
```javascript
|
|
124
125
|
const EMBEDDED_ARTIFACTS = {
|
|
@@ -126,6 +127,7 @@ const EMBEDDED_ARTIFACTS = {
|
|
|
126
127
|
// PER-MODULE keyed object (NOT a flat array)
|
|
127
128
|
// FOR EACH module: extract from specification.uiWireframes[] OR specification.wireframes[] (SAFETY NET)
|
|
128
129
|
// IMPORTANT: The agent may write wireframes under either key name — always check BOTH
|
|
130
|
+
// Read from module JSON files
|
|
129
131
|
[moduleCode]: (moduleFeature.specification.uiWireframes || moduleFeature.specification.wireframes || []).map(wf => ({
|
|
130
132
|
screen: wf.screen || wf.name || wf.title || wf.id || "", // SAFETY NET: fallback name/title/id → screen
|
|
131
133
|
section: wf.section || "", // e.g. "list"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Deploy Mode Support & Troubleshooting
|
|
2
2
|
|
|
3
|
-
> Reference for step-
|
|
3
|
+
> Reference for step-05-deploy.md (HTML deployment) and `/derive-prd` skill (handoff + PRD generation) — mode variations and common issues.
|
|
4
4
|
|
|
5
5
|
## Mode Support
|
|
6
6
|
|
|
7
7
|
### Standard Mode
|
|
8
8
|
|
|
9
|
-
Full handoff with all implementation details:
|
|
10
|
-
- All
|
|
9
|
+
Full handoff with all implementation details (via `/derive-prd`):
|
|
10
|
+
- All 8 file categories (including documentation)
|
|
11
11
|
- Complete BR-to-code mapping
|
|
12
12
|
- Full API endpoint summary
|
|
13
13
|
- Detailed prd.json
|
|
@@ -52,7 +52,7 @@ Full handoff across multiple applications within a project:
|
|
|
52
52
|
"version": "1.0",
|
|
53
53
|
"status": "handed-off",
|
|
54
54
|
"applications": ["HumanResources", "EmployeeSelfService"],
|
|
55
|
-
"path": "business-analyse/v1.0/
|
|
55
|
+
"path": "business-analyse/v1.0/index.json",
|
|
56
56
|
"updatedAt": "2026-02-16T..."
|
|
57
57
|
}
|
|
58
58
|
```
|
|
@@ -104,15 +104,15 @@ Full handoff across multiple applications within a project:
|
|
|
104
104
|
|
|
105
105
|
| Issue | Resolution |
|
|
106
106
|
|-------|-----------|
|
|
107
|
-
| All modules missing handoff data |
|
|
108
|
-
| prd.json generation failed | Verify ss derive-prd command is installed and
|
|
107
|
+
| All modules missing handoff data | Run `/derive-prd` skill. Handoff MUST be written to each module's handoff.json. |
|
|
108
|
+
| prd.json generation failed | Run `/derive-prd`. Verify ss derive-prd command is installed and index.json path is correct. |
|
|
109
109
|
| progress.txt incomplete | Ensure all CORE SeedData entries are present: 2 app-level (NavigationApplication + ApplicationRoles) + per module (NavigationModule + NavigationSections + Permissions + Roles). Check topological order. |
|
|
110
110
|
| BA manifest not found | Create docs/index.json if missing. Use schema provided in section 3. |
|
|
111
|
-
| Manifest entries incorrect | Verify appCode, moduleCode, and version match
|
|
111
|
+
| Manifest entries incorrect | Verify appCode, moduleCode, and version match index.json metadata exactly. |
|
|
112
112
|
| ba-interactive.html is too small (< 100KB) | FEATURE_DATA not serialized correctly. Verify JSON structure. Re-run FEATURE_DATA build. |
|
|
113
113
|
| moduleSpecs missing from HTML | FEATURE_DATA.moduleSpecs is empty or not included in JSON. Verify each module is iterated and populated. |
|
|
114
|
-
| Scope keys still show "mustHave" instead of "vital" | Conversion from
|
|
114
|
+
| Scope keys still show "mustHave" instead of "vital" | Conversion from JSON keys to HTML keys failed. Check cadrage.scope conversion logic. |
|
|
115
115
|
| Wireframes array is empty | Verify each module has specification.uiWireframes. If missing, add wireframe stubs. |
|
|
116
|
-
| dependencyGraph missing | Verify master
|
|
116
|
+
| dependencyGraph missing | Verify master index.json has consolidation.dependencyGraph. If missing, create empty nodes/edges arrays. |
|
|
117
117
|
| HTML opens but data blank (localStorage issue) | Clear browser localStorage. HTML will load pre-populated FEATURE_DATA on first load. |
|
|
118
|
-
| Export/re-import fails | Verify exported JSON matches original
|
|
118
|
+
| Export/re-import fails | Verify exported JSON matches original schema. Validate with `/business-analyse -x --validate`. |
|
|
@@ -21,7 +21,7 @@ function detectReviewMode(feature_description) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// Scan docs/ for most recent application
|
|
24
|
-
const applications = glob('docs/*/business-analyse/*/
|
|
24
|
+
const applications = glob('docs/*/business-analyse/*/index.json')
|
|
25
25
|
.map(path => ({
|
|
26
26
|
path,
|
|
27
27
|
metadata: readJSON(path).metadata,
|
|
@@ -113,7 +113,7 @@ Expected path: {expectedPath}
|
|
|
113
113
|
|
|
114
114
|
```javascript
|
|
115
115
|
function scanExistingApplications() {
|
|
116
|
-
const featureFiles = glob('docs/*/business-analyse/*/
|
|
116
|
+
const featureFiles = glob('docs/*/business-analyse/*/index.json');
|
|
117
117
|
|
|
118
118
|
const existingApps = featureFiles.map(path => {
|
|
119
119
|
const feature = readJSON(path);
|
|
@@ -155,8 +155,8 @@ interface ExistingApp {
|
|
|
155
155
|
|
|
156
156
|
| Case | Handling |
|
|
157
157
|
|------|----------|
|
|
158
|
-
| No
|
|
159
|
-
| Corrupted
|
|
158
|
+
| No index.json files found | Return empty array → triggers "new application" mode |
|
|
159
|
+
| Corrupted index.json | Skip file, log warning, continue scan |
|
|
160
160
|
| Multiple versions of same app | Include all, sorted by updatedAt |
|
|
161
161
|
| Incomplete applications (status="draft") | Include but flag in description |
|
|
162
162
|
|
|
@@ -346,8 +346,8 @@ function initiateUpdateMode(existingApp) {
|
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
|
|
349
|
-
// 3. Write new version
|
|
350
|
-
const newPath = `docs/${existingApp.app}/business-analyse/v${newVersion.version}/
|
|
349
|
+
// 3. Write new version index.json
|
|
350
|
+
const newPath = `docs/${existingApp.app}/business-analyse/v${newVersion.version}/index.json`;
|
|
351
351
|
writeJSON(newPath, newFeature);
|
|
352
352
|
|
|
353
353
|
return {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# HTML Data Mapping Reference (references/html-data-mapping.md)
|
|
2
2
|
|
|
3
|
-
> **Used by:** step-
|
|
4
|
-
> **Purpose:** Exact mapping from
|
|
3
|
+
> **Used by:** step-05-deploy (Deploy Interactive HTML)
|
|
4
|
+
> **Purpose:** Exact mapping from module JSON files to HTML FEATURE_DATA and EMBEDDED_ARTIFACTS objects
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## FEATURE_DATA Mapping
|
|
9
9
|
|
|
10
|
-
Build a JSON object following this **exact mapping** from
|
|
10
|
+
Build a JSON object following this **exact mapping** from index.json to the HTML data model:
|
|
11
11
|
|
|
12
12
|
```javascript
|
|
13
13
|
{
|
|
@@ -17,16 +17,16 @@ Build a JSON object following this **exact mapping** from feature.json to the HT
|
|
|
17
17
|
version: master.version, // e.g. "1.0"
|
|
18
18
|
createdAt: master.metadata.createdAt,
|
|
19
19
|
lastModified: master.metadata.updatedAt,
|
|
20
|
-
analysisMode: master.metadata.analysisMode || "interactive" // always "interactive"
|
|
20
|
+
analysisMode: master.metadata.analysisMode || "interactive" // always "interactive" in JSON format
|
|
21
21
|
},
|
|
22
22
|
cadrage: {
|
|
23
23
|
// CONTEXT SECTION — lean format (merged from problem/asIs/toBe)
|
|
24
24
|
// NOTE: 01-data-init.js has backward compat for old problem/current/vision format
|
|
25
25
|
context: {
|
|
26
|
-
problem: master.cadrage.problem || "", // flat string from
|
|
27
|
-
trigger: master.cadrage.trigger || "", // flat string from
|
|
28
|
-
currentSituation: master.cadrage.asIs || "", // flat string from
|
|
29
|
-
desiredSituation: master.cadrage.toBe || "", // flat string from
|
|
26
|
+
problem: master.cadrage.problem || "", // flat string from index.json
|
|
27
|
+
trigger: master.cadrage.trigger || "", // flat string from index.json
|
|
28
|
+
currentSituation: master.cadrage.asIs || "", // flat string from index.json
|
|
29
|
+
desiredSituation: master.cadrage.toBe || "", // flat string from index.json
|
|
30
30
|
painPoints: (master.cadrage.stakeholders || [])
|
|
31
31
|
.flatMap(s => s.painPoints || []).join("\n"), // aggregate all painPoints
|
|
32
32
|
acceptanceCriteria: (master.cadrage.acceptanceCriteria || [])
|
|
@@ -80,7 +80,7 @@ Build a JSON object following this **exact mapping** from feature.json to the HT
|
|
|
80
80
|
description: e.description || ""
|
|
81
81
|
})),
|
|
82
82
|
moduleSpecs: {
|
|
83
|
-
// FOR EACH module: read module
|
|
83
|
+
// FOR EACH module: read module index.json, then map:
|
|
84
84
|
// [moduleCode]: { useCases, businessRules, entities, permissions, notes, mockupNotes }
|
|
85
85
|
},
|
|
86
86
|
consolidation: {
|
|
@@ -103,7 +103,7 @@ Build a JSON object following this **exact mapping** from feature.json to the HT
|
|
|
103
103
|
|
|
104
104
|
For EACH module in `master.modules[]`:
|
|
105
105
|
|
|
106
|
-
1. Read the module
|
|
106
|
+
1. Read the module index.json at `master.modules[i].featureJsonPath`
|
|
107
107
|
2. Map to `moduleSpecs[moduleCode]`:
|
|
108
108
|
|
|
109
109
|
```javascript
|
|
@@ -188,16 +188,16 @@ Default: "contributor"
|
|
|
188
188
|
|
|
189
189
|
## EMBEDDED_ARTIFACTS Mapping
|
|
190
190
|
|
|
191
|
-
> **FIELD RENAME WARNING:**
|
|
191
|
+
> **FIELD RENAME WARNING:** Module JSON files store wireframes with `mockupFormat` and `mockup` fields.
|
|
192
192
|
> The HTML renderer reads `format` and `content`. You MUST rename: `mockupFormat` → `format`, `mockup` → `content`.
|
|
193
193
|
> Failure to rename = empty mockup display in the browser.
|
|
194
194
|
|
|
195
|
-
Build a JSON object containing ALL visual artifacts from
|
|
195
|
+
Build a JSON object containing ALL visual artifacts from module JSON files (index.json):
|
|
196
196
|
|
|
197
197
|
```javascript
|
|
198
198
|
{
|
|
199
199
|
wireframes: {
|
|
200
|
-
// FOR EACH module: extract all wireframes from module
|
|
200
|
+
// FOR EACH module: extract all wireframes from module index.json
|
|
201
201
|
// [moduleCode]: [ {screen, format, content, elements, componentMapping, layout, description} ]
|
|
202
202
|
},
|
|
203
203
|
e2eFlows: [
|
|
@@ -216,7 +216,7 @@ Build a JSON object containing ALL visual artifacts from feature.json:
|
|
|
216
216
|
For EACH module in `master.modules[]`:
|
|
217
217
|
|
|
218
218
|
```javascript
|
|
219
|
-
// Read the module
|
|
219
|
+
// Read the module index.json file
|
|
220
220
|
const moduleFeature = readModuleFeature(moduleCode);
|
|
221
221
|
const wireframes = (moduleFeature.specification?.uiWireframes || []).map(wf => ({
|
|
222
222
|
screen: wf.screen, // e.g. "UM-list", "UM-form"
|
|
@@ -287,7 +287,7 @@ EMBEDDED_ARTIFACTS.dependencyGraph = {
|
|
|
287
287
|
|
|
288
288
|
---
|
|
289
289
|
|
|
290
|
-
## Usage in step-
|
|
290
|
+
## Usage in step-05-deploy
|
|
291
291
|
|
|
292
292
|
1. Serialize the FEATURE_DATA object as JSON (with 2-space indentation for readability)
|
|
293
293
|
2. Serialize the EMBEDDED_ARTIFACTS object as JSON (with 2-space indentation)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## Module & Application Codes
|
|
9
9
|
|
|
10
|
-
### In
|
|
10
|
+
### In JSON files
|
|
11
11
|
|
|
12
12
|
- `modules[].code` = **PascalCase** (e.g., `"HumanResources"`, `"TimeManagement"`)
|
|
13
13
|
- `metadata.application` = **PascalCase** (e.g., `"HumanResources"`)
|
|
@@ -75,7 +75,7 @@ Route = ToKebabCase($"/{appCode}/{moduleCode}")
|
|
|
75
75
|
|
|
76
76
|
### JavaScript (BA Handoff Generation)
|
|
77
77
|
|
|
78
|
-
**Location:** Used in step-
|
|
78
|
+
**Location:** Used in step-05-deploy.md when building seedDataCore
|
|
79
79
|
|
|
80
80
|
**Usage:**
|
|
81
81
|
```javascript
|
|
@@ -200,7 +200,7 @@ Sections and resources ALWAYS use kebab-case (no transformation needed).
|
|
|
200
200
|
|
|
201
201
|
### Full Hierarchy Example
|
|
202
202
|
|
|
203
|
-
**BA Input (
|
|
203
|
+
**BA Input (index.json):**
|
|
204
204
|
```json
|
|
205
205
|
{
|
|
206
206
|
"metadata": {
|
|
@@ -240,4 +240,4 @@ src/API/Controllers/HumanResources/TimeManagementController.cs
|
|
|
240
240
|
- **Template:** `templates/skills/ralph-loop/references/core-seed-data.md`
|
|
241
241
|
- **Validation:** `src/mcp/tools/validate-frontend-routes.ts`
|
|
242
242
|
- **POST-CHECK:** `templates/skills/ralph-loop/steps/step-02-execute.md` (section 5)
|
|
243
|
-
- **Handoff:** `templates/skills/business-analyse/steps/step-
|
|
243
|
+
- **Handoff:** `templates/skills/business-analyse/steps/step-05-deploy.md` (handoff section)
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# Review Data Mapping Reference (references/review-data-mapping.md)
|
|
2
2
|
|
|
3
3
|
> **Used by:** step-06-review (Apply Review Corrections)
|
|
4
|
-
> **Purpose:** Reverse mapping from ba-review.json (HTML export) back to
|
|
4
|
+
> **Purpose:** Reverse mapping from ba-review.json (HTML export) back to module JSON files format
|
|
5
5
|
> **Complement of:** `references/html-data-mapping.md` (forward mapping)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
The ba-review.json is exported from the interactive HTML with the same structure as the HTML data model. This document defines the **reverse transformation** to apply corrections back into
|
|
11
|
+
The ba-review.json is exported from the interactive HTML with the same structure as the HTML data model. This document defines the **reverse transformation** to apply corrections back into module JSON files (index.json) format.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
## Cadrage Reverse Mapping
|
|
16
16
|
|
|
17
|
-
### Scope (HTML →
|
|
17
|
+
### Scope (HTML → index.json)
|
|
18
18
|
|
|
19
19
|
```javascript
|
|
20
20
|
// HTML format: { vital: [{name, description}], important: [...], optional: [...], excluded: [...] }
|
|
21
|
-
//
|
|
21
|
+
// index.json format: { mustHave: [string], shouldHave: [string], couldHave: [string], outOfScope: [string] }
|
|
22
22
|
|
|
23
23
|
reverseScope(reviewCadrage) {
|
|
24
24
|
return {
|
|
@@ -30,11 +30,11 @@ reverseScope(reviewCadrage) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
### Stakeholders (HTML →
|
|
33
|
+
### Stakeholders (HTML → module index.json)
|
|
34
34
|
|
|
35
35
|
```javascript
|
|
36
36
|
// HTML format: { role, function, tasks[], frequency, access, frustrations }
|
|
37
|
-
//
|
|
37
|
+
// module JSON format: { role, function, involvement, tasks[], frequency, painPoints[] }
|
|
38
38
|
|
|
39
39
|
const accessToInvolvement = {
|
|
40
40
|
admin: "decision-maker",
|
|
@@ -62,10 +62,10 @@ reverseStakeholder(htmlStakeholder) {
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
### Problem / Vision / Current (HTML →
|
|
65
|
+
### Problem / Vision / Current (HTML → index.json)
|
|
66
66
|
|
|
67
67
|
```javascript
|
|
68
|
-
// HTML has detailed sub-fields;
|
|
68
|
+
// HTML has detailed sub-fields; index.json has flat strings
|
|
69
69
|
reverseProblemVision(reviewCadrage) {
|
|
70
70
|
return {
|
|
71
71
|
problem: reviewCadrage.problem?.description || "",
|
|
@@ -76,11 +76,11 @@ reverseProblemVision(reviewCadrage) {
|
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
### Risks (HTML →
|
|
79
|
+
### Risks (HTML → index.json)
|
|
80
80
|
|
|
81
81
|
```javascript
|
|
82
82
|
// HTML format: { description, probability, impact, mitigation }
|
|
83
|
-
//
|
|
83
|
+
// index.json format: { id, type, description, probability, impact, mitigation }
|
|
84
84
|
|
|
85
85
|
reverseRisks(reviewRisks, existingRisks) {
|
|
86
86
|
return (reviewRisks || []).map((r, i) => {
|
|
@@ -98,11 +98,11 @@ reverseRisks(reviewRisks, existingRisks) {
|
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
### Acceptance Criteria (HTML →
|
|
101
|
+
### Acceptance Criteria (HTML → index.json)
|
|
102
102
|
|
|
103
103
|
```javascript
|
|
104
104
|
// HTML format: success.definition (string, one criterion per line)
|
|
105
|
-
//
|
|
105
|
+
// index.json format: acceptanceCriteria[]: { id, criterion, validated }
|
|
106
106
|
|
|
107
107
|
reverseAcceptanceCriteria(reviewSuccess, existingCriteria) {
|
|
108
108
|
const lines = (reviewSuccess?.definition || "").split("\n").filter(Boolean);
|
|
@@ -121,11 +121,11 @@ reverseAcceptanceCriteria(reviewSuccess, existingCriteria) {
|
|
|
121
121
|
|
|
122
122
|
## Module Specifications Reverse Mapping
|
|
123
123
|
|
|
124
|
-
### Use Cases (HTML →
|
|
124
|
+
### Use Cases (HTML → module index.json)
|
|
125
125
|
|
|
126
126
|
```javascript
|
|
127
127
|
// HTML format: { id, name, actor, steps (newline-separated string), alternative (string) }
|
|
128
|
-
//
|
|
128
|
+
// module JSON format: { id, name, primaryActor, permission, preconditions[], postconditions[], mainScenario[], alternativeScenarios[], linkedRules[] }
|
|
129
129
|
|
|
130
130
|
reverseUseCase(htmlUC, existingUC) {
|
|
131
131
|
return {
|
|
@@ -143,11 +143,11 @@ reverseUseCase(htmlUC, existingUC) {
|
|
|
143
143
|
}
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
### Business Rules (HTML →
|
|
146
|
+
### Business Rules (HTML → module index.json)
|
|
147
147
|
|
|
148
148
|
```javascript
|
|
149
149
|
// HTML format: { id, name, category, statement, example (string) }
|
|
150
|
-
//
|
|
150
|
+
// module JSON format: { id, name, category, statement, priority, conditions[], examples[], testability }
|
|
151
151
|
|
|
152
152
|
reverseBusinessRule(htmlBR, existingBR) {
|
|
153
153
|
return {
|
|
@@ -165,11 +165,11 @@ reverseBusinessRule(htmlBR, existingBR) {
|
|
|
165
165
|
}
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
### Entities (HTML →
|
|
168
|
+
### Entities (HTML → module index.json)
|
|
169
169
|
|
|
170
170
|
```javascript
|
|
171
171
|
// HTML format: { name, description, attributes: [{name, description}], relationships: [string] }
|
|
172
|
-
//
|
|
172
|
+
// module JSON format: { name, description, attributes: [{name, description, required}], relationships: [{target, type, description}] }
|
|
173
173
|
|
|
174
174
|
reverseEntity(htmlEntity, existingEntity) {
|
|
175
175
|
return {
|
|
@@ -195,11 +195,11 @@ reverseEntity(htmlEntity, existingEntity) {
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
### Permissions (HTML →
|
|
198
|
+
### Permissions (HTML → module index.json)
|
|
199
199
|
|
|
200
200
|
```javascript
|
|
201
201
|
// HTML format: permissions[] = ["Role|Action", "Role|Action", "Role|*"]
|
|
202
|
-
//
|
|
202
|
+
// module JSON format: permissionMatrix = { permissions: [{path, action, description}], roleAssignments: [{role, permissions[]}] }
|
|
203
203
|
|
|
204
204
|
const actionToPermission = {
|
|
205
205
|
Consulter: "read",
|
|
@@ -252,11 +252,11 @@ reversePermissions(htmlPermissions, moduleCode, appName) {
|
|
|
252
252
|
|
|
253
253
|
## Modules Reverse Mapping
|
|
254
254
|
|
|
255
|
-
### Module List (HTML →
|
|
255
|
+
### Module List (HTML → index.json)
|
|
256
256
|
|
|
257
257
|
```javascript
|
|
258
258
|
// HTML format: modules[] = [{ code, name, description, featureType, priority, entities[], status }]
|
|
259
|
-
//
|
|
259
|
+
// index.json format: modules[] = [{ code, description, featureType, dependencies[], dependents[], status, priority, sortOrder, entities[], estimatedComplexity }]
|
|
260
260
|
|
|
261
261
|
reverseModule(htmlModule, existingModule) {
|
|
262
262
|
return {
|
|
@@ -279,11 +279,11 @@ reverseModule(htmlModule, existingModule) {
|
|
|
279
279
|
|
|
280
280
|
## Consolidation Reverse Mapping
|
|
281
281
|
|
|
282
|
-
### Cross-Module Interactions (HTML →
|
|
282
|
+
### Cross-Module Interactions (HTML → index.json)
|
|
283
283
|
|
|
284
284
|
```javascript
|
|
285
285
|
// HTML format: consolidation.interactions[] = [{ from, to, description }]
|
|
286
|
-
//
|
|
286
|
+
// index.json format: consolidation.crossModuleInteractions[] = [{ fromModule, toModule, interactionType, description, entities[] }]
|
|
287
287
|
|
|
288
288
|
reverseInteraction(htmlInteraction, existingInteraction) {
|
|
289
289
|
return {
|
|
@@ -296,11 +296,11 @@ reverseInteraction(htmlInteraction, existingInteraction) {
|
|
|
296
296
|
}
|
|
297
297
|
```
|
|
298
298
|
|
|
299
|
-
### E2E Flows (HTML →
|
|
299
|
+
### E2E Flows (HTML → index.json)
|
|
300
300
|
|
|
301
301
|
```javascript
|
|
302
302
|
// HTML format: consolidation.e2eFlows[] = [{ name, steps: [{module, action}], actors }]
|
|
303
|
-
//
|
|
303
|
+
// index.json format: consolidation.e2eFlows[] = [{ name, steps: [{module, action, permission}] }]
|
|
304
304
|
|
|
305
305
|
reverseE2EFlow(htmlFlow, existingFlow) {
|
|
306
306
|
return {
|
|
@@ -318,7 +318,7 @@ reverseE2EFlow(htmlFlow, existingFlow) {
|
|
|
318
318
|
|
|
319
319
|
## Review Comments Preservation
|
|
320
320
|
|
|
321
|
-
Comments from the review are stored in a new `review` section of the master
|
|
321
|
+
Comments from the review are stored in a new `review` section of the master index.json:
|
|
322
322
|
|
|
323
323
|
```javascript
|
|
324
324
|
{
|
|
@@ -355,9 +355,9 @@ Comments from the review are stored in a new `review` section of the master feat
|
|
|
355
355
|
|
|
356
356
|
When applying corrections, always try to **match existing items** before creating new ones:
|
|
357
357
|
|
|
358
|
-
1. **By ID**: If the review item has an ID (UC-001, BR-VAL-001), find the same ID in
|
|
358
|
+
1. **By ID**: If the review item has an ID (UC-001, BR-VAL-001), find the same ID in index.json
|
|
359
359
|
2. **By name**: If no ID match, find by exact name match
|
|
360
360
|
3. **New item**: If no match found, create a new item with a generated ID
|
|
361
|
-
4. **Removed items**: Items present in
|
|
361
|
+
4. **Removed items**: Items present in index.json but absent from review are marked as removed (not deleted)
|
|
362
362
|
|
|
363
363
|
This preserves referential integrity (linked rules, use case references) across the update.
|