@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
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-05-deploy
|
|
3
|
+
description: Deploy interactive HTML document from analysis data
|
|
4
|
+
model: sonnet
|
|
5
|
+
next_step: steps/step-06-review.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
> **Context files:** `_shared.md` | `references/html-data-mapping.md`
|
|
9
|
+
|
|
10
|
+
# Step 5: Deploy - Interactive HTML Document
|
|
11
|
+
|
|
12
|
+
## MANDATORY EXECUTION RULES
|
|
13
|
+
|
|
14
|
+
- **ALWAYS** verify PRD exists before proceeding (`.ralph/prd-{module}.json`)
|
|
15
|
+
- **ALWAYS** pre-populate HTML with FEATURE_DATA + EMBEDDED_ARTIFACTS (no empty templates)
|
|
16
|
+
- **FEATURE_DATA.moduleSpecs** must have ONE entry per module (empty = BROKEN)
|
|
17
|
+
- **FEATURE_DATA.cadrage.scope** uses HTML keys (vital/important/optional/excluded)
|
|
18
|
+
- **ALWAYS** deploy SINGLE interactive HTML (multi-app or single-app per config)
|
|
19
|
+
|
|
20
|
+
## YOUR TASK
|
|
21
|
+
|
|
22
|
+
Deploy the single interactive HTML document pre-populated with all analysis data across all modules and applications. PRD and handoff data must already exist (generated by `/derive-prd`).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## EXECUTION SEQUENCE
|
|
27
|
+
|
|
28
|
+
### 1. Verify PRD Exists
|
|
29
|
+
|
|
30
|
+
For each module, verify PRD file exists:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
FOR each module in modules:
|
|
34
|
+
prdPath = ".ralph/prd-{moduleCode}.json"
|
|
35
|
+
IF NOT exists(prdPath):
|
|
36
|
+
BLOCKING ERROR: "PRD not found: {prdPath} — Run /derive-prd first"
|
|
37
|
+
STOP
|
|
38
|
+
IF fileSize(prdPath) < 100:
|
|
39
|
+
BLOCKING ERROR: "PRD file too small: {prdPath} — Run /derive-prd to regenerate"
|
|
40
|
+
STOP
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Verify consolidation status:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
IF workflow.mode === "project":
|
|
47
|
+
projectFeature = ba-reader.findProjectFeature()
|
|
48
|
+
FOR each app in projectFeature.applications:
|
|
49
|
+
appFeature = ba-reader.findFeature(app.featureJsonPath)
|
|
50
|
+
IF appFeature.status !== "consolidated":
|
|
51
|
+
BLOCKING ERROR: "Application {app.code} not consolidated"
|
|
52
|
+
ELSE:
|
|
53
|
+
feature = ba-reader.findFeature({feature_id})
|
|
54
|
+
IF feature.status !== "consolidated":
|
|
55
|
+
BLOCKING ERROR: "Feature status: {feature.status}, expected consolidated"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Display:
|
|
59
|
+
```
|
|
60
|
+
PRD verified: {module_count} modules
|
|
61
|
+
.ralph/prd-{module1}.json ({size} bytes)
|
|
62
|
+
.ralph/prd-{module2}.json ({size} bytes)
|
|
63
|
+
→ Proceeding to HTML generation...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### 2. Build FEATURE_DATA Object
|
|
69
|
+
|
|
70
|
+
Read from index.json (master module JSON files):
|
|
71
|
+
|
|
72
|
+
For EACH module:
|
|
73
|
+
- Read complete index.json for each module
|
|
74
|
+
- Map to FEATURE_DATA structure per `references/html-data-mapping.md`
|
|
75
|
+
|
|
76
|
+
**FEATURE_DATA structure:**
|
|
77
|
+
- metadata (analysisMode="interactive", workflowMode, versions, timestamps)
|
|
78
|
+
- cadrage (scope using HTML keys: vital/important/optional/excluded; objectives, constraints, assumptions)
|
|
79
|
+
- modules[] (all modules with all fields from index.json)
|
|
80
|
+
- moduleSpecs{} (one entry PER module with analysis, specification sections from index.json)
|
|
81
|
+
- consolidation (cross-module interactions)
|
|
82
|
+
- handoff (complexity, filesToCreate summary, totalFiles, totalTasks)
|
|
83
|
+
|
|
84
|
+
**Critical requirements:**
|
|
85
|
+
- moduleSpecs MUST have ONE entry per module (empty = BUG)
|
|
86
|
+
- cadrage.scope converts: mustHave->vital, shouldHave->important, couldHave->optional, outOfScope->excluded
|
|
87
|
+
- metadata.analysisMode from master.metadata.analysisMode (always "interactive")
|
|
88
|
+
- PROJECT MODE: include applications[], consolidation.crossApplicationInteractions
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### 3. Build EMBEDDED_ARTIFACTS Object
|
|
93
|
+
|
|
94
|
+
Collect from FEATURE_DATA:
|
|
95
|
+
- **wireframes**: Per-module ASCII + SVG (if generated) — fields: format, content, svgContent
|
|
96
|
+
- **e2eFlows**: E2E diagrams from consolidated.e2eFlows
|
|
97
|
+
- **dependencyGraph**: From dependencyGraph section
|
|
98
|
+
|
|
99
|
+
**Field name mapping (CRITICAL):**
|
|
100
|
+
- wireframes use: `format`, `content`, `svgContent` (NOT mockupFormat/mockup)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### 4. Generate SVG Wireframes (Parallel, Optional)
|
|
105
|
+
|
|
106
|
+
> **After EMBEDDED_ARTIFACTS built but BEFORE HTML write.**
|
|
107
|
+
> This step is NEVER blocking — ASCII-only wireframes acceptable.
|
|
108
|
+
> **Reference:** Read `references/wireframe-svg-style-guide.md` for full agent prompt template
|
|
109
|
+
|
|
110
|
+
1. Collect all wireframes where `mockup` exists and `svgContent` is null
|
|
111
|
+
2. Spawn parallel Task(sonnet) agents — ONE per wireframe
|
|
112
|
+
3. Validate results: strip markdown fences, verify SVG syntax
|
|
113
|
+
4. Inject valid SVGs into `EMBEDDED_ARTIFACTS.wireframes[moduleCode][index].svgContent`
|
|
114
|
+
5. Display: "SVG wireframe generation: {successCount}/{total} generated, {failCount} fallback (ASCII)"
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### 5. Replace Placeholders & Write HTML
|
|
119
|
+
|
|
120
|
+
1. Read HTML template from skill: `html/ba-interactive.html`
|
|
121
|
+
2. Serialize FEATURE_DATA and EMBEDDED_ARTIFACTS as JSON (2-space indent)
|
|
122
|
+
3. Replace 8 placeholders:
|
|
123
|
+
- `{{FEATURE_DATA}}` — Full FEATURE_DATA JSON object
|
|
124
|
+
- `{{EMBEDDED_ARTIFACTS}}` — Wireframes, E2E, dependency graph
|
|
125
|
+
- `{{APPLICATION_NAME}}` — From master.metadata.application
|
|
126
|
+
- Others per template
|
|
127
|
+
|
|
128
|
+
4. **Output path:**
|
|
129
|
+
- Multi-app (project mode): `docs/business-analyse/v{version}/ba-interactive.html`
|
|
130
|
+
- Single-app: `docs/{app}/business-analyse/v{version}/ba-interactive.html`
|
|
131
|
+
|
|
132
|
+
5. Write to file
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### 6. Verify Deployment
|
|
137
|
+
|
|
138
|
+
**POST-CHECK (BLOCKING):**
|
|
139
|
+
|
|
140
|
+
1. **File size > 100KB** (indicates pre-populated)
|
|
141
|
+
```
|
|
142
|
+
if [ $(stat --format=%s ba-interactive.html) -lt 100000 ]; then
|
|
143
|
+
BLOCKING_ERROR("ba-interactive.html not pre-populated")
|
|
144
|
+
fi
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
2. **moduleSpecs present in HTML** (must be serialized)
|
|
148
|
+
```
|
|
149
|
+
if ! grep -q '"moduleSpecs"' ba-interactive.html; then
|
|
150
|
+
BLOCKING_ERROR("moduleSpecs not found — FEATURE_DATA not serialized")
|
|
151
|
+
fi
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
3. **cadrage.scope uses HTML keys** (vital/important/optional/excluded)
|
|
155
|
+
```
|
|
156
|
+
if grep -q '"mustHave"' ba-interactive.html; then
|
|
157
|
+
BLOCKING_ERROR("cadrage.scope still has JSON keys")
|
|
158
|
+
fi
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
4. **Wireframe field names correct** (format/content, NOT mockupFormat/mockup)
|
|
162
|
+
```
|
|
163
|
+
if grep -q '"mockupFormat"' ba-interactive.html; then
|
|
164
|
+
BLOCKING_ERROR("Wireframes use 'mockupFormat' — must be 'format'")
|
|
165
|
+
fi
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
5. **All modules have specs AND wireframes**
|
|
169
|
+
```
|
|
170
|
+
FOR each module in FEATURE_DATA.modules:
|
|
171
|
+
IF FEATURE_DATA.moduleSpecs[module.code] undefined:
|
|
172
|
+
BLOCKING_ERROR("Module not in moduleSpecs")
|
|
173
|
+
IF EMBEDDED_ARTIFACTS.wireframes[module.code] undefined:
|
|
174
|
+
BLOCKING_ERROR("Module not in wireframes")
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### 7. Display Completion Summary
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
══════════════════════════════════════════════════════════════
|
|
183
|
+
[OK] HTML DEPLOY COMPLETE — {application_name}
|
|
184
|
+
══════════════════════════════════════════════════════════════
|
|
185
|
+
|
|
186
|
+
Modules: {count} ({names})
|
|
187
|
+
|
|
188
|
+
[DIR] Artifact generated:
|
|
189
|
+
ba-interactive.html — Interactive document
|
|
190
|
+
Path: {output_path}
|
|
191
|
+
Pre-populated: {module_count} modules, {total_uc} use cases,
|
|
192
|
+
{total_br} business rules, {total_wireframes} wireframes
|
|
193
|
+
|
|
194
|
+
[NEXT] Review & Validation:
|
|
195
|
+
1. Open ba-interactive.html in browser
|
|
196
|
+
2. Review all modules, use cases, business rules
|
|
197
|
+
3. Validate wireframes and permissions
|
|
198
|
+
4. If OK: /derive-prd then /ralph-loop to begin development
|
|
199
|
+
5. If changes needed: /business-analyse to iterate
|
|
200
|
+
|
|
201
|
+
══════════════════════════════════════════════════════════════
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## SELF-VERIFICATION (BEFORE COMPLETION)
|
|
207
|
+
|
|
208
|
+
1. `ba-interactive.html` exists and >100KB
|
|
209
|
+
2. FEATURE_DATA.moduleSpecs has entries for ALL modules
|
|
210
|
+
3. cadrage.scope uses HTML keys (vital/important/optional/excluded)
|
|
211
|
+
4. Wireframes use format/content fields (not mockupFormat/mockup)
|
|
212
|
+
5. POST-CHECK verification all passed
|
|
213
|
+
|
|
214
|
+
**IF any check fails -> generate missing artifact before completing.**
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## NEXT STEP
|
|
219
|
+
|
|
220
|
+
Load: `steps/step-06-review.md`
|
|
@@ -19,17 +19,15 @@ Apply corrections exported from the interactive HTML review (`ba-review.json`) t
|
|
|
19
19
|
## Flow
|
|
20
20
|
|
|
21
21
|
1. Read and validate ba-review.json
|
|
22
|
-
2. Read existing master
|
|
22
|
+
2. Read existing master index.json and version directory
|
|
23
23
|
3. Create new version
|
|
24
24
|
4. Apply cadrage corrections (reverse mapping)
|
|
25
25
|
5. Apply module corrections
|
|
26
26
|
6. Apply consolidation corrections
|
|
27
27
|
7. Preserve review comments
|
|
28
|
-
8. Regenerate
|
|
29
|
-
9.
|
|
30
|
-
10.
|
|
31
|
-
11. Regenerate HTML
|
|
32
|
-
12. Display completion summary
|
|
28
|
+
8. Regenerate HTML
|
|
29
|
+
9. Update manifest
|
|
30
|
+
10. Display completion summary
|
|
33
31
|
|
|
34
32
|
---
|
|
35
33
|
|
|
@@ -55,13 +53,14 @@ source_version: _reviewMeta.sourceVersion
|
|
|
55
53
|
change_summary: _reviewMeta.changeSummary
|
|
56
54
|
```
|
|
57
55
|
|
|
58
|
-
## Step 2: Read Existing Master
|
|
56
|
+
## Step 2: Read Existing Master Index.json
|
|
59
57
|
|
|
60
58
|
```
|
|
61
|
-
1. Locate master
|
|
59
|
+
1. Locate master index.json from docs_dir (e.g., docs/{app}/business-analyse/v{X.Y}/index.json)
|
|
62
60
|
2. Read and parse
|
|
63
|
-
3. Verify metadata.
|
|
64
|
-
4. Store as
|
|
61
|
+
3. Verify metadata.applicationId matches _reviewMeta.sourceApplicationId
|
|
62
|
+
4. Store as existing_master_index
|
|
63
|
+
5. Read all thematic files referenced in index.json (cadrage.json, entities.json, rules.json, etc.)
|
|
65
64
|
```
|
|
66
65
|
|
|
67
66
|
## Step 3: Create New Version
|
|
@@ -81,17 +80,17 @@ Call ba-writer.createVersion(existing_master.id, "Review corrections applied fro
|
|
|
81
80
|
```yaml
|
|
82
81
|
new_version: string (e.g., "1.1" or "2.0")
|
|
83
82
|
new_docs_dir: path to new version directory
|
|
84
|
-
|
|
83
|
+
new_version_dir: path to new version directory (contains index.json + thematic files)
|
|
85
84
|
```
|
|
86
85
|
|
|
87
86
|
## Step 4: Apply Cadrage Corrections
|
|
88
87
|
|
|
89
88
|
> **Reference:** `references/review-data-mapping.md` for exact field mapping
|
|
90
89
|
|
|
91
|
-
Read the new
|
|
90
|
+
Read the new version's cadrage.json and apply reverse mapping from review data:
|
|
92
91
|
|
|
93
92
|
```
|
|
94
|
-
1. Scope mapping (review →
|
|
93
|
+
1. Scope mapping (review → cadrage.json):
|
|
95
94
|
- cadrage.scope.vital[] → cadrage.globalScope.mustHave[]
|
|
96
95
|
- cadrage.scope.important[] → cadrage.globalScope.shouldHave[]
|
|
97
96
|
- cadrage.scope.optional[] → cadrage.globalScope.couldHave[]
|
|
@@ -119,33 +118,34 @@ Read the new master feature.json and apply reverse mapping from review data:
|
|
|
119
118
|
5. Acceptance criteria:
|
|
120
119
|
- cadrage.success.definition → cadrage.acceptanceCriteria[] (split by newline, generate AC-NNN IDs)
|
|
121
120
|
|
|
122
|
-
|
|
121
|
+
Update cadrage.json with corrected data and update its hash in index.json
|
|
123
122
|
```
|
|
124
123
|
|
|
125
124
|
## Step 5: Apply Module Corrections
|
|
126
125
|
|
|
127
126
|
```
|
|
128
127
|
FOR EACH moduleCode in review_data.moduleSpecifications:
|
|
129
|
-
1. Check if module exists in current
|
|
128
|
+
1. Check if module exists in current index.json.modules[]
|
|
130
129
|
- If NEW module (in change_summary.modulesAdded):
|
|
131
|
-
a. Add to
|
|
132
|
-
b. Create module directory and
|
|
130
|
+
a. Add to index.json.modules[] with metadata from review
|
|
131
|
+
b. Create module directory and entities.json, rules.json, usecases.json, etc. via ba-writer
|
|
133
132
|
- If REMOVED module (in change_summary.modulesRemoved):
|
|
134
|
-
a. Mark module status as "removed" in
|
|
133
|
+
a. Mark module status as "removed" in index.json (do NOT delete files)
|
|
135
134
|
- If EXISTING module:
|
|
136
|
-
a.
|
|
135
|
+
a. Update module's thematic files
|
|
137
136
|
|
|
138
137
|
2. Reverse-map module specification data:
|
|
139
|
-
- review.useCases[] →
|
|
138
|
+
- review.useCases[] → usecases.json.useCases[]
|
|
140
139
|
(name→name, actor→primaryActor, steps→mainScenario (split by \n), alternative→alternativeScenarios)
|
|
141
|
-
- review.businessRules[] →
|
|
140
|
+
- review.businessRules[] → rules.json.businessRules[]
|
|
142
141
|
(name→name, category→category, statement→statement, example→examples[])
|
|
143
|
-
- review.entities[] →
|
|
142
|
+
- review.entities[] → entities.json.entities[]
|
|
144
143
|
(name→name, description→description, attributes→attributes, relationships→relationships)
|
|
145
|
-
- review.permissions[] →
|
|
144
|
+
- review.permissions[] → permissions.json.permissionMatrix
|
|
146
145
|
(reverse "Role|Action" format → {permissions[], roleAssignments[]})
|
|
147
146
|
|
|
148
|
-
3.
|
|
147
|
+
3. Update each module's thematic files via ba-writer.enrichSection()
|
|
148
|
+
4. Update hashes in index.json for modified files
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
## Step 6: Apply Consolidation Corrections
|
|
@@ -153,19 +153,19 @@ FOR EACH moduleCode in review_data.moduleSpecifications:
|
|
|
153
153
|
```
|
|
154
154
|
IF review_data.consolidation exists:
|
|
155
155
|
1. Reverse-map interactions:
|
|
156
|
-
- consolidation.interactions[] → consolidation.crossModuleInteractions[]
|
|
156
|
+
- consolidation.interactions[] → consolidation.json.crossModuleInteractions[]
|
|
157
157
|
(from→fromModule, to→toModule, description→description)
|
|
158
158
|
|
|
159
159
|
2. Reverse-map E2E flows:
|
|
160
|
-
- consolidation.e2eFlows[] → consolidation.e2eFlows[]
|
|
160
|
+
- consolidation.e2eFlows[] → consolidation.json.e2eFlows[]
|
|
161
161
|
(name→name, steps→steps, actors preserved)
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
3. Update consolidation.json and update hash in index.json
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
## Step 7: Preserve Review Comments
|
|
167
167
|
|
|
168
|
-
Store all review feedback in a new
|
|
168
|
+
Store all review feedback in a new review.json file:
|
|
169
169
|
|
|
170
170
|
```
|
|
171
171
|
review_section = {
|
|
@@ -177,58 +177,41 @@ review_section = {
|
|
|
177
177
|
changeSummary: change_summary
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
Create review.json with review_section and update hash in index.json
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
## Step 8: Regenerate
|
|
184
|
-
|
|
185
|
-
```
|
|
186
|
-
FOR EACH module in master.modules[] WHERE status != "removed":
|
|
187
|
-
Run: ss derive-prd --application {new_master_path} --module {moduleCode}
|
|
188
|
-
Verify: .ralph/prd-{moduleCode}.json exists and has filesToCreate
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
> `ss derive-prd` is a deterministic CLI command (no LLM), safe for regeneration.
|
|
192
|
-
|
|
193
|
-
## Step 9: Regenerate progress.txt
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
Write .ralph/progress.txt with:
|
|
197
|
-
- Link to new master feature.json
|
|
198
|
-
- Link to each module feature.json
|
|
199
|
-
- Link to ba-interactive.html (new version)
|
|
200
|
-
- Summary of review changes applied
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Step 10: Update Manifest
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
1. Read docs/index.json
|
|
207
|
-
2. Find entry for this application
|
|
208
|
-
3. Update version, lastModified, status
|
|
209
|
-
4. If entry doesn't exist, create it
|
|
210
|
-
5. Write docs/index.json
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
## Step 11: Regenerate Interactive HTML
|
|
183
|
+
## Step 8: Regenerate Interactive HTML
|
|
214
184
|
|
|
215
185
|
> **Reference:** `references/html-data-mapping.md` for FEATURE_DATA and EMBEDDED_ARTIFACTS mapping
|
|
216
186
|
|
|
217
187
|
```
|
|
218
188
|
1. Read ba-interactive.html template from skill templates
|
|
219
|
-
2. Build FEATURE_DATA from NEW
|
|
189
|
+
2. Build FEATURE_DATA from NEW version:
|
|
190
|
+
- Read index.json for metadata
|
|
191
|
+
- Read cadrage.json for cadrage section
|
|
192
|
+
- Read entities.json, rules.json, usecases.json, etc.
|
|
220
193
|
(follow exact mapping from html-data-mapping.md)
|
|
221
|
-
3. Build EMBEDDED_ARTIFACTS from
|
|
194
|
+
3. Build EMBEDDED_ARTIFACTS from thematic files
|
|
222
195
|
(wireframes, e2eFlows, dependencyGraph)
|
|
223
196
|
4. Replace placeholders:
|
|
224
197
|
- {{FEATURE_DATA}} → serialized FEATURE_DATA JSON
|
|
225
198
|
- {{EMBEDDED_ARTIFACTS}} → serialized EMBEDDED_ARTIFACTS JSON
|
|
226
199
|
- {{APPLICATION_NAME}} → application_name
|
|
227
200
|
- {{APPLICATION_ID}} → feature_id
|
|
228
|
-
5. Write to new version directory: {
|
|
201
|
+
5. Write to new version directory: {new_version_dir}/ba-interactive.html
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Step 9: Update Manifest
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
1. Read docs/index.json
|
|
208
|
+
2. Find entry for this application
|
|
209
|
+
3. Update version, lastModified, status
|
|
210
|
+
4. If entry doesn't exist, create it
|
|
211
|
+
5. Write docs/index.json
|
|
229
212
|
```
|
|
230
213
|
|
|
231
|
-
## Step
|
|
214
|
+
## Step 10: Display Completion Summary
|
|
232
215
|
|
|
233
216
|
```
|
|
234
217
|
═══════════════════════════════════════════════════════════════
|
|
@@ -254,10 +237,9 @@ Changes applied:
|
|
|
254
237
|
Artifacts regenerated:
|
|
255
238
|
| Artifact | Path |
|
|
256
239
|
|----------------------|--------------------------------------|
|
|
257
|
-
| Master
|
|
258
|
-
| ba-interactive.html | {
|
|
259
|
-
|
|
|
260
|
-
| progress.txt | .ralph/progress.txt |
|
|
240
|
+
| Master index.json | {new_version_dir}/index.json |
|
|
241
|
+
| ba-interactive.html | {new_version_dir}/ba-interactive.html|
|
|
242
|
+
| Thematic files | {new_version_dir}/*.json |
|
|
261
243
|
| Manifest | docs/index.json |
|
|
262
244
|
|
|
263
245
|
NEXT STEPS:
|
|
@@ -274,5 +256,5 @@ NEXT STEPS:
|
|
|
274
256
|
| ba-review.json malformed | Display structure errors, STOP |
|
|
275
257
|
| Source version mismatch | Warn but continue (corrections may still apply) |
|
|
276
258
|
| Module not found for update | Skip module, warn user |
|
|
277
|
-
|
|
|
259
|
+
| HTML generation fails | Warn but continue (can be re-run manually) |
|
|
278
260
|
| Manifest update fails | Warn but continue |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Template Development Handoff
|
|
2
2
|
|
|
3
|
-
> **Usage:** Template for step-
|
|
4
|
-
> **Data source:**
|
|
3
|
+
> **Usage:** Template for step-05-deploy.md
|
|
4
|
+
> **Data source:** index.json (sections: metadata, analysis, specification, handoff)
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
> **Module:** {application}/{module}
|
|
12
12
|
> **Version:** {version}
|
|
13
|
-
> **Validated Specs:**
|
|
14
|
-
> **Source:** `docs/{app}/{module}/business-analyse/v{version}/
|
|
13
|
+
> **Validated Specs:** index.json (validation.decision = APPROVED)
|
|
14
|
+
> **Source:** `docs/{app}/{module}/business-analyse/v{version}/index.json`
|
|
15
15
|
> **Implementation:** `/ralph-loop`
|
|
16
16
|
|
|
17
17
|
## DEVELOPER INSTRUCTIONS
|
|
@@ -39,6 +39,8 @@ This document is a self-contained prompt for Claude Code.
|
|
|
39
39
|
| Table Prefix | `{prefix}_` |
|
|
40
40
|
| Complexity | {feature.handoff.complexity} |
|
|
41
41
|
|
|
42
|
+
> **Source:** Read from index.json
|
|
43
|
+
|
|
42
44
|
## 2. [EXPLORE] EXISTING PATTERNS
|
|
43
45
|
|
|
44
46
|
BEFORE coding, explore these files to understand the patterns:
|
|
@@ -66,7 +68,7 @@ FRONTEND:
|
|
|
66
68
|
|
|
67
69
|
## 3. FILES TO CREATE
|
|
68
70
|
|
|
69
|
-
> **Source:** `
|
|
71
|
+
> **Source:** `index.json.handoff.filesToCreate[]`
|
|
70
72
|
|
|
71
73
|
### 3.1 Backend
|
|
72
74
|
|
|
@@ -83,18 +85,18 @@ FRONTEND:
|
|
|
83
85
|
|
|
84
86
|
### 3.2 SeedData Core (CRITICAL -- without these, module is invisible and returns 403)
|
|
85
87
|
|
|
86
|
-
> **Source:** `
|
|
88
|
+
> **Source:** `index.json.specification.seedDataCore` (generated in step-03)
|
|
87
89
|
> **5 core files + NavigationSectionSeedData when sections are defined** for every new module.
|
|
88
90
|
> Derive content EXACTLY from `specification.seedDataCore` sections (navigationModules, navigationSections, navigationTranslations, permissions, rolePermissions, permissionConstants).
|
|
89
91
|
|
|
90
|
-
| # | File | Layer | Content |
|
|
91
|
-
|
|
92
|
-
| 1 | `NavigationModuleConfiguration.cs` | Infrastructure (HasData) | Module entry in `nav_Modules` |
|
|
93
|
-
| 2 | `NavigationSectionSeedData.cs` | Infrastructure (HasData) | Section entries (list, dashboard, etc.) with full absolute routes. **MANDATORY when sections defined.** |
|
|
94
|
-
| 3 | `NavigationTranslationConfiguration.cs` | Infrastructure (HasData) | 4 translations (fr, en, it, de) per nav entity |
|
|
95
|
-
| 4 | `PermissionConfiguration.cs` | Infrastructure (HasData) | Wildcard + CRUD permissions in `nav_Permissions` |
|
|
96
|
-
| 5 | `Permissions.cs` | Application (code) | Compile-time constants for `[RequirePermission]` |
|
|
97
|
-
| 6 | `RolePermissionConfiguration.cs` | Infrastructure (HasData) | Role->Permission for {App} Admin, {App} Manager, {App} Contributor, {App} Viewer |
|
|
92
|
+
| # | File | Layer | Content | Source |
|
|
93
|
+
|---|------|-------|---------|--------|
|
|
94
|
+
| 1 | `NavigationModuleConfiguration.cs` | Infrastructure (HasData) | Module entry in `nav_Modules` | index.json.specification.seedDataCore.navigationModules |
|
|
95
|
+
| 2 | `NavigationSectionSeedData.cs` | Infrastructure (HasData) | Section entries (list, dashboard, etc.) with full absolute routes. **MANDATORY when sections defined.** | index.json.specification.seedDataCore.navigationSections |
|
|
96
|
+
| 3 | `NavigationTranslationConfiguration.cs` | Infrastructure (HasData) | 4 translations (fr, en, it, de) per nav entity | index.json.specification.seedDataCore.navigationTranslations |
|
|
97
|
+
| 4 | `PermissionConfiguration.cs` | Infrastructure (HasData) | Wildcard + CRUD permissions in `nav_Permissions` | index.json.specification.seedDataCore.permissions |
|
|
98
|
+
| 5 | `Permissions.cs` | Application (code) | Compile-time constants for `[RequirePermission]` | index.json.specification.seedDataCore.permissionConstants |
|
|
99
|
+
| 6 | `RolePermissionConfiguration.cs` | Infrastructure (HasData) | Role->Permission for {App} Admin, {App} Manager, {App} Contributor, {App} Viewer | index.json.specification.seedDataCore.rolePermissions |
|
|
98
100
|
|
|
99
101
|
### 3.3 Frontend
|
|
100
102
|
|
|
@@ -107,7 +109,7 @@ FRONTEND:
|
|
|
107
109
|
|
|
108
110
|
## 4. DETAILED SPECIFICATIONS
|
|
109
111
|
|
|
110
|
-
> **Source:** Read from
|
|
112
|
+
> **Source:** Read from index.json sections: `analysis.entities[]`, `specification.apiEndpoints[]`, `analysis.businessRules[]`, `specification.sections[]`, `specification.permissionMatrix`
|
|
111
113
|
|
|
112
114
|
### 4.1 Entity
|
|
113
115
|
|
|
@@ -132,10 +134,11 @@ From: `feature.handoff.brToCodeMapping[]`
|
|
|
132
134
|
|
|
133
135
|
### 4.4 SeedData Specifications
|
|
134
136
|
|
|
135
|
-
From: `
|
|
137
|
+
From: `index.json.specification.seedDataCore` and `index.json.specification.permissionMatrix`
|
|
136
138
|
|
|
137
|
-
> **IMPORTANT :** Les données des
|
|
139
|
+
> **IMPORTANT :** Les données des 6 fichiers SeedData Core doivent être dérivées de `index.json.specification.seedDataCore` :
|
|
138
140
|
> - `navigationModules` → NavigationModuleConfiguration.cs
|
|
141
|
+
> - `navigationSections` → NavigationSectionSeedData.cs
|
|
139
142
|
> - `navigationTranslations` → NavigationTranslationConfiguration.cs
|
|
140
143
|
> - `permissions` → PermissionConfiguration.cs (module-level: `{app}.{module}.{action}`, section-level: `{app}.{module}.{section}.{action}`)
|
|
141
144
|
> - `rolePermissions` → RolePermissionConfiguration.cs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill Launch Display Templates (templates/tpl-launch-displays.md)
|
|
2
2
|
|
|
3
|
-
> **Used by:** step-
|
|
3
|
+
> **Used by:** step-05-deploy (Completion Summary)
|
|
4
4
|
> **Purpose:** User-facing display templates for BA completion
|
|
5
5
|
> **Note:** No emojis - uses text markers per Claude Code conventions
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ Complexity: {complexity}
|
|
|
23
23
|
Effort: {total_days} days ({total_hours} hours)
|
|
24
24
|
|
|
25
25
|
[DIR] Artefacts générés:
|
|
26
|
-
✓
|
|
26
|
+
✓ index.json (master + per-module) - spécification complète
|
|
27
27
|
✓ .ralph/prd.json or .ralph/prd-{module}.json - task breakdown
|
|
28
28
|
✓ .ralph/progress.txt - tracker de progression
|
|
29
29
|
✓ ba-interactive.html - document de revue interactif
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
Database
|
|
52
52
|
} from 'lucide-react';
|
|
53
53
|
|
|
54
|
-
// Types for documentation data
|
|
54
|
+
// Types for documentation data (loaded from index.json)
|
|
55
55
|
interface UseCase {
|
|
56
56
|
id: string;
|
|
57
57
|
name: string;
|
|
@@ -83,7 +83,7 @@ interface DocData {
|
|
|
83
83
|
permissions: Permission[];
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// Data loaded from
|
|
86
|
+
// Data loaded from index.json (to be generated dynamically)
|
|
87
87
|
const docData: DocData = {
|
|
88
88
|
featureId: 'FEAT-XXX',
|
|
89
89
|
moduleName: '{ModuleName}',
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: derive-prd
|
|
3
|
+
description: "Transform consolidated business analysis into handoff data (8 categories) and PRD files for /ralph-loop consumption."
|
|
4
|
+
model: sonnet
|
|
5
|
+
user_invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /derive-prd — v1
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Bridge between `/business-analyse` (understand) and `/ralph-loop` (execute).
|
|
13
|
+
Transforms consolidated BA data into structured handoff and PRD files.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/business-analyse → /derive-prd → /ralph-loop
|
|
17
|
+
(comprendre) (planifier) (executer)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
**3 steps** — "Validate, Transform, Export"
|
|
23
|
+
|
|
24
|
+
| Step | File | Model | Role |
|
|
25
|
+
|------|------|-------|------|
|
|
26
|
+
| 00 | `step-00-validate.md` | Sonnet | Detect input, validate BA readiness, AC gate |
|
|
27
|
+
| 01 | `step-01-transform.md` | Sonnet | Build handoff data per module (8 categories) |
|
|
28
|
+
| 02 | `step-02-export.md` | Sonnet | Generate PRD files, verify, output progress |
|
|
29
|
+
|
|
30
|
+
## Input
|
|
31
|
+
|
|
32
|
+
- Consolidated BA feature (`status = "consolidated"`)
|
|
33
|
+
- Source: `docs/{app}/{module}/business-analyse/v{X.Y}/index.json`
|
|
34
|
+
- Usage: `--feature <path>` or auto-detection from `docs/`
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
| Artifact | Path | Description |
|
|
39
|
+
|----------|------|-------------|
|
|
40
|
+
| Handoff data | Written to module `handoff.json` via ba-writer | 8-category file mapping + BR-to-code + API summary |
|
|
41
|
+
| PRD files | `.ralph/prd-{moduleCode}.json` | Deterministic extraction via `ss derive-prd` |
|
|
42
|
+
| Progress tracker | `.ralph/progress.txt` | Task breakdown per module |
|
|
43
|
+
| Module queue | `.ralph/modules-queue.json` | Topological order (if 2+ modules) |
|
|
44
|
+
| BA manifest | `docs/index.json` | Updated with "handed-off" status |
|
|
45
|
+
|
|
46
|
+
## Handoff Categories (8)
|
|
47
|
+
|
|
48
|
+
| Category | Source | Key rules |
|
|
49
|
+
|----------|--------|-----------|
|
|
50
|
+
| **domain** | `analysis.entities[]` | Entities, ValueObjects, Enums |
|
|
51
|
+
| **application** | `analysis.useCases[]` | Services, DTOs, Validators |
|
|
52
|
+
| **infrastructure** | `analysis.entities[]` | EF Configurations, DbSet |
|
|
53
|
+
| **api** | `specification.apiEndpoints[]` | Controllers (exact copy) |
|
|
54
|
+
| **frontend** | `specification.uiWireframes[]` | Pages, Components, Hooks |
|
|
55
|
+
| **seedData** | `specification.seedDataCore` | CORE + business |
|
|
56
|
+
| **tests** | All layers | Unit, Integration, Security tests |
|
|
57
|
+
| **documentation** | All layers | Technical docs, user guides, API specs |
|
|
58
|
+
|
|
59
|
+
## Agents
|
|
60
|
+
|
|
61
|
+
| Agent | Role | Operations |
|
|
62
|
+
|-------|------|------------|
|
|
63
|
+
| `ba-writer` | Write handoff data | enrichModuleHandoff() |
|
|
64
|
+
| `ba-reader` | Read feature data | findFeature, readSection, getModuleStatus |
|
|
65
|
+
|
|
66
|
+
## References
|
|
67
|
+
|
|
68
|
+
| File | Content |
|
|
69
|
+
|------|---------|
|
|
70
|
+
| `references/prd-generation.md` | PRD v3.0 structure & validation rules |
|
|
71
|
+
| `references/handoff-mappings.md` | BR-to-code & API summary mapping |
|
|
72
|
+
| `references/handoff-seeddata-generation.md` | SeedData core generation reference |
|
|
73
|
+
| `references/handoff-file-templates.md` | Handoff file structure (8 categories) |
|
|
74
|
+
| `references/acceptance-criteria.md` | Module acceptance criteria (AC-01 to AC-17) |
|
|
75
|
+
| `references/entity-domain-mapping.md` | Entity BA to Domain file mapping |
|
|
76
|
+
| `references/readiness-scoring.md` | Readiness scoring algorithm |
|
|
77
|
+
|
|
78
|
+
## Schema
|
|
79
|
+
|
|
80
|
+
| File | Content |
|
|
81
|
+
|------|---------|
|
|
82
|
+
| `schemas/handoff-schema.json` | Handoff data schema (8 categories) |
|
|
83
|
+
|
|
84
|
+
## Templates
|
|
85
|
+
|
|
86
|
+
| File | Content |
|
|
87
|
+
|------|---------|
|
|
88
|
+
| `templates/tpl-progress.md` | Progress tracker template |
|
|
89
|
+
|
|
90
|
+
## Entry Point
|
|
91
|
+
|
|
92
|
+
**FIRST ACTION:** Load `steps/step-00-validate.md`
|