@atlashub/smartstack-cli 4.40.0 → 4.42.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/.documentation/apex.html +2 -2
- package/.documentation/business-analyse.html +26 -27
- package/.documentation/commands.html +6 -6
- package/dist/index.js +24 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/templates/agents/ba-reader.md +2 -2
- package/templates/agents/ba-writer.md +44 -9
- package/templates/hooks/stop-hook.sh +6 -6
- package/templates/ralph/README.md +1 -1
- package/templates/scripts/setup-ralph-loop.sh +2 -2
- package/templates/skills/_resources/context-digest-template.md +1 -1
- package/templates/skills/_shared.md +13 -13
- package/templates/skills/apex/SKILL.md +15 -7
- package/templates/skills/apex/_shared.md +1 -1
- package/templates/skills/apex/references/analysis-methods.md +24 -0
- package/templates/skills/apex/references/challenge-questions.md +46 -13
- package/templates/skills/apex/references/core-seed-data.md +4 -4
- package/templates/skills/apex/references/error-classification.md +3 -3
- package/templates/skills/apex/references/smartstack-api.md +1 -1
- package/templates/skills/apex/references/smartstack-layers.md +1 -1
- package/templates/skills/apex/steps/step-00-init.md +48 -8
- package/templates/skills/apex/steps/step-01-analyze.md +42 -2
- package/templates/skills/apex/steps/step-02-plan.md +3 -1
- package/templates/skills/apex/steps/step-03-execute.md +3 -1
- package/templates/skills/apex/steps/step-03a-layer0-domain.md +2 -0
- package/templates/skills/apex/steps/step-03b-layer1-seed.md +111 -3
- package/templates/skills/apex/steps/step-03c-layer2-backend.md +2 -0
- package/templates/skills/apex/steps/step-03d-layer3-frontend.md +2 -0
- package/templates/skills/apex/steps/step-03e-layer4-devdata.md +2 -0
- package/templates/skills/apex/steps/step-04-examine.md +18 -0
- package/templates/skills/business-analyse/SKILL.md +83 -22
- package/templates/skills/business-analyse/_shared.md +12 -9
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +13 -0
- package/templates/skills/business-analyse/questionnaire/03-data-ui.md +33 -0
- package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +1 -1
- package/templates/skills/business-analyse/react/components.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +1 -1
- package/templates/skills/business-analyse/references/acceptance-criteria.md +3 -3
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +1 -1
- package/templates/skills/business-analyse/references/detection-strategies.md +2 -2
- package/templates/skills/business-analyse/references/entity-architecture-decision.md +1 -1
- package/templates/skills/business-analyse/references/naming-conventions.md +6 -6
- package/templates/skills/business-analyse/references/robustness-checks.md +4 -4
- package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
- package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +2 -2
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +3 -2
- package/templates/skills/business-analyse/steps/step-00-init.md +15 -5
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +14 -5
- package/templates/skills/business-analyse/steps/step-02-structure.md +17 -1
- package/templates/skills/business-analyse/steps/step-03-specify.md +136 -26
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +44 -8
- package/templates/skills/business-analyse/templates/tpl-handoff.md +5 -5
- package/templates/skills/business-analyse/templates/tpl-launch-displays.md +4 -4
- package/templates/skills/business-analyse/templates-frd.md +4 -4
- package/templates/skills/{ba-design-ui → business-analyse-design}/SKILL.md +9 -9
- package/templates/skills/{ba-design-ui → business-analyse-design}/steps/step-01-screens.md +9 -0
- package/templates/skills/{ba-design-ui → business-analyse-design}/steps/step-03-navigation.md +9 -2
- package/templates/skills/business-analyse-develop/SKILL.md +248 -0
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/category-completeness.md +1 -1
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/init-resume-recovery.md +8 -8
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/multi-module-queue.md +1 -1
- package/templates/skills/business-analyse-develop/references/quality-gates.md +70 -0
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/task-transform-legacy.md +1 -1
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-00-init.md +20 -4
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-01-task.md +3 -2
- package/templates/skills/business-analyse-develop/steps/step-01-v4-execute.md +131 -0
- package/templates/skills/business-analyse-develop/steps/step-02-v4-verify.md +156 -0
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-04-check.md +1 -1
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-05-report.md +1 -1
- package/templates/skills/{derive-prd → business-analyse-handoff}/SKILL.md +7 -7
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/acceptance-criteria.md +5 -5
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-file-templates.md +1 -1
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-mappings.md +1 -1
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-seeddata-generation.md +2 -2
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/prd-generation.md +14 -14
- package/templates/skills/{derive-prd → business-analyse-handoff}/schemas/handoff-schema.json +2 -2
- package/templates/skills/{derive-prd → business-analyse-handoff}/steps/step-00-validate.md +6 -6
- package/templates/skills/{derive-prd → business-analyse-handoff}/steps/step-01-transform.md +46 -7
- package/templates/skills/{derive-prd → business-analyse-handoff}/steps/step-02-export.md +34 -14
- package/templates/skills/{ba-generate-html → business-analyse-html}/SKILL.md +4 -4
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/ba-interactive.html +709 -277
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/build-html.js +25 -3
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/01-data-init.js +54 -0
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/02-navigation.js +97 -3
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/03-render-cadrage.js +8 -7
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/04-render-modules.js +7 -7
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/05-render-specs.js +188 -85
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/06-render-consolidation.js +15 -14
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/06-render-mockups.js +19 -19
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/07-render-handoff.js +24 -4
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/08-editing.js +6 -2
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/09-export.js +27 -57
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/10-comments.js +67 -45
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/11-review-panel.js +15 -13
- package/templates/skills/business-analyse-html/html/src/styles/02-layout.css +216 -0
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/05-modules.css +36 -0
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/template.html +22 -12
- package/templates/skills/{ba-generate-html → business-analyse-html}/references/data-build.md +1 -1
- package/templates/skills/{ba-generate-html → business-analyse-html}/references/data-mapping.md +5 -1
- package/templates/skills/{ba-generate-html → business-analyse-html}/references/output-modes.md +7 -7
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-01-collect.md +25 -1
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-02-build-data.md +33 -5
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-03-render.md +2 -2
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-04-verify.md +2 -2
- package/templates/skills/{ba-review → business-analyse-review}/SKILL.md +11 -10
- package/templates/skills/{ba-review → business-analyse-review}/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse-review/steps/step-00-init.md +107 -0
- package/templates/skills/{ba-review → business-analyse-review}/steps/step-01-apply.md +19 -11
- package/templates/skills/business-analyse-status/SKILL.md +118 -0
- package/templates/skills/documentation/SKILL.md +2 -2
- package/templates/skills/sketch/SKILL.md +172 -0
- package/templates/skills/sketch/references/domain-heuristics.md +116 -0
- package/templates/skills/ba-generate-html/html/src/styles/02-layout.css +0 -101
- package/templates/skills/ralph-loop/SKILL.md +0 -240
- /package/templates/skills/{ba-design-ui → business-analyse-design}/steps/step-02-wireframes.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/category-rules.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/compact-loop.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/module-transition.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/parallel-execution.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/section-splitting.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/team-orchestration.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-02-execute.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-03-commit.md +0 -0
- /package/templates/skills/{derive-prd → business-analyse-handoff}/references/entity-domain-mapping.md +0 -0
- /package/templates/skills/{derive-prd → business-analyse-handoff}/references/readiness-scoring.md +0 -0
- /package/templates/skills/{derive-prd → business-analyse-handoff}/templates/tpl-progress.md +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-context.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-scope.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-stakeholders.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-success.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-datamodel.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-flows.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-interactions.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-permissions.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/decomp-dependencies.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/decomp-modules.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/handoff-summary.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/module-spec-container.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/01-variables.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/03-navigation.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/04-cards.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/06-wireframes.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/07-comments.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/08-review-panel.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/09-mockups-html.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/references/wireframe-svg-style-guide.md +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-02-v4-verify
|
|
3
|
+
description: Final verification gates, file reconciliation, BR coverage, and report generation
|
|
4
|
+
model: opus
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 02-v4: Verify + Report
|
|
8
|
+
|
|
9
|
+
## YOUR TASK
|
|
10
|
+
|
|
11
|
+
After ALL modules are implemented, run final verification across the ENTIRE project, then generate the completion report.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## FINAL VERIFICATION SEQUENCE
|
|
16
|
+
|
|
17
|
+
### 1. Full Solution Build
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
dotnet build 2>&1
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This catches cross-module compilation issues that per-module builds might miss.
|
|
24
|
+
|
|
25
|
+
### 2. Full Test Suite
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
dotnet test 2>&1
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Run ALL tests across ALL modules. This catches cross-module integration issues.
|
|
32
|
+
|
|
33
|
+
### 3. Frontend Verification
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm run typecheck 2>&1
|
|
37
|
+
npm test -- --run 2>&1
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 4. File Reconciliation
|
|
41
|
+
|
|
42
|
+
For each module's PRD, compare `expectedFiles` against actual files on disk:
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
for (const category of ['domain', 'application', 'infrastructure', 'api', 'frontend', 'seedData', 'tests', 'documentation']) {
|
|
46
|
+
const expected = prd.expectedFiles[category] || [];
|
|
47
|
+
for (const file of expected) {
|
|
48
|
+
if (!existsOnDisk(file.path)) {
|
|
49
|
+
MISSING.push({ category, path: file.path, type: file.type });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**If missing files found:**
|
|
56
|
+
- List them clearly with category and expected path
|
|
57
|
+
- Delegate to `/apex`: "Create missing files: {list}"
|
|
58
|
+
- Re-verify after creation
|
|
59
|
+
|
|
60
|
+
### 5. Business Rule Coverage
|
|
61
|
+
|
|
62
|
+
For each BR in ALL modules' `brToCodeMapping`:
|
|
63
|
+
1. Verify target file exists
|
|
64
|
+
2. Verify implementation is present (grep for method/class name)
|
|
65
|
+
3. Verify test coverage (grep test files for BR reference)
|
|
66
|
+
|
|
67
|
+
Output:
|
|
68
|
+
```
|
|
69
|
+
BR Coverage: {covered}/{total} ({pct}%)
|
|
70
|
+
Missing: BR-VAL-INV-003 (no test), BR-CALC-INV-005 (no implementation)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**If coverage < 100%:** Delegate remediation to `/apex`.
|
|
74
|
+
|
|
75
|
+
### 6. MCP Final Scan
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
// Security validation (BLOCKING)
|
|
79
|
+
mcp__smartstack__validate_security({ projectPath: "." })
|
|
80
|
+
|
|
81
|
+
// Convention validation (report)
|
|
82
|
+
mcp__smartstack__validate_conventions({ projectPath: "." })
|
|
83
|
+
|
|
84
|
+
// Code review — semantic permission check (BLOCKING if write endpoint has Read permission)
|
|
85
|
+
mcp__smartstack__review_code({ files: changedFiles, focus: "security" })
|
|
86
|
+
|
|
87
|
+
// Test convention validation (report)
|
|
88
|
+
mcp__smartstack__validate_test_conventions({ projectPath: "." })
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Log results. Security and permission mismatches are BLOCKING. Convention/test findings go in the report.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## REPORT GENERATION
|
|
96
|
+
|
|
97
|
+
Generate `.ralph/reports/{feature}.md`:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
# Feature Report: {applicationName}
|
|
101
|
+
|
|
102
|
+
**Generated:** {date}
|
|
103
|
+
**Modules:** {moduleCount}
|
|
104
|
+
**Duration:** {startTime} → {endTime}
|
|
105
|
+
|
|
106
|
+
## Summary
|
|
107
|
+
|
|
108
|
+
| Module | Entities | BRs | Sections | Build | Tests | Coverage |
|
|
109
|
+
|--------|----------|-----|----------|-------|-------|----------|
|
|
110
|
+
| {mod1} | {n} | {n} | {n} | PASS | PASS | {pct}% |
|
|
111
|
+
| {mod2} | {n} | {n} | {n} | PASS | PASS | {pct}% |
|
|
112
|
+
|
|
113
|
+
## Objectives
|
|
114
|
+
|
|
115
|
+
| Objective | Status | Acceptance Criteria |
|
|
116
|
+
|-----------|--------|---------------------|
|
|
117
|
+
| {obj.description} | PASS/FAIL | {criteria results} |
|
|
118
|
+
|
|
119
|
+
## File Reconciliation
|
|
120
|
+
|
|
121
|
+
| Category | Expected | Present | Missing |
|
|
122
|
+
|----------|----------|---------|---------|
|
|
123
|
+
| domain | {n} | {n} | {list} |
|
|
124
|
+
| ... | | | |
|
|
125
|
+
|
|
126
|
+
## Business Rule Coverage
|
|
127
|
+
|
|
128
|
+
| BR ID | Name | Implementation | Test | Status |
|
|
129
|
+
|-------|------|----------------|------|--------|
|
|
130
|
+
| {id} | {name} | {file}:{method} | {testFile} | PASS/FAIL |
|
|
131
|
+
|
|
132
|
+
## Quality Gates
|
|
133
|
+
|
|
134
|
+
| Gate | Result |
|
|
135
|
+
|------|--------|
|
|
136
|
+
| dotnet build | PASS |
|
|
137
|
+
| dotnet test | PASS ({n} tests) |
|
|
138
|
+
| npm typecheck | PASS |
|
|
139
|
+
| npm test | PASS ({n} tests) |
|
|
140
|
+
| MCP security | {findings} |
|
|
141
|
+
| MCP conventions | {findings} |
|
|
142
|
+
|
|
143
|
+
## Git Commits
|
|
144
|
+
|
|
145
|
+
{list of commits with hashes and messages}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## COMPLETION
|
|
151
|
+
|
|
152
|
+
After report is generated:
|
|
153
|
+
1. Display report path: `.ralph/reports/{feature}.md`
|
|
154
|
+
2. Display summary stats
|
|
155
|
+
3. If completion_promise was set: output the promise text
|
|
156
|
+
4. Ralph-Loop is DONE
|
|
@@ -382,7 +382,7 @@ If `hasPending && iteration < max`:
|
|
|
382
382
|
## CRITICAL RULES — EXECUTION GUARANTEE:
|
|
383
383
|
|
|
384
384
|
- **NEVER** output completion promise unless ALL tasks done (all modules if multi)
|
|
385
|
-
- **NEVER** stop between iterations — this is the CORE PROMISE of
|
|
385
|
+
- **NEVER** stop between iterations — this is the CORE PROMISE of business-analyse-develop
|
|
386
386
|
- **NEVER** ask the user "should I continue?" or "is this OK?" — JUST CONTINUE
|
|
387
387
|
- **NEVER** pause to show intermediate results and wait for feedback
|
|
388
388
|
- **NEVER** generate code directly — ALWAYS delegate to /apex
|
|
@@ -365,7 +365,7 @@ if (prd._sectionSplit?.enabled && prd.status === 'completed') {
|
|
|
365
365
|
}
|
|
366
366
|
delete prd._sectionSplit;
|
|
367
367
|
} else if (prd._sectionSplit?.enabled && prd.status !== 'completed') {
|
|
368
|
-
console.log(`Section-split temp files preserved (status: ${prd.status}) — use /
|
|
368
|
+
console.log(`Section-split temp files preserved (status: ${prd.status}) — use /business-analyse-develop -r to resume`);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
prd.updated_at = new Date().toISOString();
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "Transform consolidated business analysis into handoff data (8 categories) and PRD files for /
|
|
2
|
+
name: business-analyse-handoff
|
|
3
|
+
description: "Transform consolidated business analysis into handoff data (8 categories) and PRD files for /business-analyse-develop consumption."
|
|
4
4
|
model: sonnet
|
|
5
5
|
user_invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# /
|
|
8
|
+
# /business-analyse-handoff — v1
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
Bridge between `/business-analyse` (understand) and `/
|
|
12
|
+
Bridge between `/business-analyse` (understand) and `/business-analyse-develop` (execute).
|
|
13
13
|
Transforms consolidated BA data into structured handoff and PRD files.
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
/business-analyse → /
|
|
17
|
-
(comprendre)
|
|
16
|
+
/business-analyse → /business-analyse-handoff → /business-analyse-develop
|
|
17
|
+
(comprendre) (planifier) (executer)
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Architecture
|
|
@@ -38,7 +38,7 @@ Transforms consolidated BA data into structured handoff and PRD files.
|
|
|
38
38
|
| Artifact | Path | Description |
|
|
39
39
|
|----------|------|-------------|
|
|
40
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
|
|
41
|
+
| PRD files | `.ralph/prd-{moduleCode}.json` | Deterministic extraction via `ss business-analyse-handoff` |
|
|
42
42
|
| Progress tracker | `.ralph/progress.txt` | Task breakdown per module |
|
|
43
43
|
| Module queue | `.ralph/modules-queue.json` | Topological order (if 2+ modules) |
|
|
44
44
|
| BA manifest | `docs/index.json` | Updated with "handed-off" status |
|
package/templates/skills/{derive-prd → business-analyse-handoff}/references/acceptance-criteria.md
RENAMED
|
@@ -43,7 +43,7 @@ These verify data that `/business-analyse` produces:
|
|
|
43
43
|
|
|
44
44
|
### Output ACs (checked in step-01 post-transform)
|
|
45
45
|
|
|
46
|
-
These verify data that `/
|
|
46
|
+
These verify data that `/business-analyse-handoff` step-01 generates:
|
|
47
47
|
|
|
48
48
|
| # | Criterion | Minimum | Location | Blocking |
|
|
49
49
|
|---|-----------|---------|----------|----------|
|
|
@@ -213,7 +213,7 @@ console.log('PASS: All output acceptance criteria met (AC-08 to AC-11)');
|
|
|
213
213
|
| AC-05 | Re-run `/business-analyse` screen specification |
|
|
214
214
|
| AC-06 | Re-run `/business-analyse` permission specification |
|
|
215
215
|
| AC-07 | Run `/business-analyse` step-04 consolidation |
|
|
216
|
-
| AC-08 | Re-run `/
|
|
217
|
-
| AC-09 | Re-run `/
|
|
218
|
-
| AC-10 | Re-run `/
|
|
219
|
-
| AC-11 | Re-run `/
|
|
216
|
+
| AC-08 | Re-run `/business-analyse-handoff` step-01 transform (missing categories) |
|
|
217
|
+
| AC-09 | Re-run `/business-analyse-handoff` step-01 transform (BR mapping) |
|
|
218
|
+
| AC-10 | Re-run `/business-analyse-handoff` step-01 transform (API endpoints) |
|
|
219
|
+
| AC-11 | Re-run `/business-analyse-handoff` step-01 transform (seedData categories) |
|
|
@@ -152,4 +152,4 @@ From `screens.json > screens[]` and `usecases.json > useCases[]`:
|
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
Include: Technical documentation data, API specification files, user guides.
|
|
155
|
-
This category can be an empty array `[]` if no documentation is planned at this stage. It will be populated by the `/documentation` skill after `/
|
|
155
|
+
This category can be an empty array `[]` if no documentation is planned at this stage. It will be populated by the `/documentation` skill after `/business-analyse-develop` completes.
|
package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-mappings.md
RENAMED
|
@@ -44,7 +44,7 @@ When an entity has `personRoleConfig` in its entity data, it MUST be carried int
|
|
|
44
44
|
| `personRoleConfig.userLinkMode` | Determines scaffold options: `isPersonRole: true, userLinkMode: "{mode}"` |
|
|
45
45
|
| `personRoleConfig.inheritedFields` | Fields to exclude from entity (mandatory) or mark as fallback (optional) |
|
|
46
46
|
|
|
47
|
-
The `personRoleConfig` object is passed through verbatim to ensure `/apex` and `/
|
|
47
|
+
The `personRoleConfig` object is passed through verbatim to ensure `/apex` and `/business-analyse-develop` receive the person extension configuration.
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
@@ -289,7 +289,7 @@ function inferIconFromModule(module) {
|
|
|
289
289
|
IF !seedDataCore.navigationApplications || seedDataCore.navigationApplications.length === 0:
|
|
290
290
|
BLOCKING ERROR: "navigationApplications is empty — Application navigation will NOT be seeded. Menu will show (nothing) → Modules."
|
|
291
291
|
IF seedDataCore.navigationApplications[0].icon === null || seedDataCore.navigationApplications[0].icon === undefined:
|
|
292
|
-
BLOCKING ERROR: "Application icon is null —
|
|
292
|
+
BLOCKING ERROR: "Application icon is null — business-analyse-develop will render empty navigation"
|
|
293
293
|
IF !seedDataCore.navigationApplications[0].labels?.fr || !seedDataCore.navigationApplications[0].labels?.en:
|
|
294
294
|
BLOCKING ERROR: "Application labels missing fr/en — translations will fail"
|
|
295
295
|
IF seedDataCore.navigationModules.length !== master.modules.length:
|
|
@@ -297,7 +297,7 @@ IF seedDataCore.navigationModules.length !== master.modules.length:
|
|
|
297
297
|
IF seedDataCore.permissions.length === 0:
|
|
298
298
|
WARNING: seedDataCore has 0 permissions — applicationRoles may be missing
|
|
299
299
|
IF seedDataCore.navigationModules.some(m => !m.icon || m.icon === null):
|
|
300
|
-
BLOCKING ERROR: "Navigation modules with null icons detected —
|
|
300
|
+
BLOCKING ERROR: "Navigation modules with null icons detected — business-analyse-develop will render empty navigation"
|
|
301
301
|
→ Fix: Re-run inferIconFromModule() for modules with null icons
|
|
302
302
|
IF seedDataCore.navigationSections.length === 0:
|
|
303
303
|
WARNING: "0 navigation sections — every module should have at least 1 section (e.g., 'list')"
|
package/templates/skills/{derive-prd → business-analyse-handoff}/references/prd-generation.md
RENAMED
|
@@ -31,7 +31,7 @@ Example: `.ralph/prd-Projects.json`, `.ralph/prd-TimeTracking.json`
|
|
|
31
31
|
**Common Error:**
|
|
32
32
|
```
|
|
33
33
|
BLOCKING_ERROR: PRD version must be 3.0.0, got: 2.1.0
|
|
34
|
-
Fix: Re-run ss
|
|
34
|
+
Fix: Re-run ss business-analyse-handoff with latest version
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -75,7 +75,7 @@ Fix: Re-run ss derive-prd with latest version
|
|
|
75
75
|
|
|
76
76
|
**Fix Command:**
|
|
77
77
|
```bash
|
|
78
|
-
ss
|
|
78
|
+
ss business-analyse-handoff --feature {path} --output .ralph/prd-{moduleCode}.json
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
---
|
|
@@ -95,7 +95,7 @@ All PRD files MUST include these 8 categories under `implementation.filesToCreat
|
|
|
95
95
|
| **tests** | Unit tests, integration tests | `ProjectServiceTests.cs`, `ProjectsControllerTests.cs` |
|
|
96
96
|
| **documentation** | Technical docs, user guides, API specs | `doc-data.ts`, `UserGuide.md`, `api-spec.yaml` |
|
|
97
97
|
|
|
98
|
-
> **Note `documentation`:** Cette catégorie peut contenir des fichiers générés par le skill `/documentation` après `/
|
|
98
|
+
> **Note `documentation`:** Cette catégorie peut contenir des fichiers générés par le skill `/documentation` après `/business-analyse-develop`. Elle est obligatoire dans la structure PRD (peut être un tableau vide `[]` si aucune doc n'est prévue, mais DOIT être présente).
|
|
99
99
|
|
|
100
100
|
**Validation:**
|
|
101
101
|
```javascript
|
|
@@ -136,7 +136,7 @@ for (const cat of categories) {
|
|
|
136
136
|
**Why this matters:**
|
|
137
137
|
- Ensures PRD was derived from the correct index.json
|
|
138
138
|
- Catches stale PRD files (derived from old version)
|
|
139
|
-
- Validates handoff integrity before
|
|
139
|
+
- Validates handoff integrity before business-analyse-develop
|
|
140
140
|
|
|
141
141
|
**Fix:**
|
|
142
142
|
- Re-derive PRD from latest index.json
|
|
@@ -179,7 +179,7 @@ Use this checklist when validating PRD files:
|
|
|
179
179
|
| **File Counts** | PRD counts match index.json handoff.filesToCreate | PASS/FAIL |
|
|
180
180
|
| **File Schemas** | All files have path, type, module | PASS/FAIL |
|
|
181
181
|
|
|
182
|
-
**All checks must PASS before proceeding to /
|
|
182
|
+
**All checks must PASS before proceeding to /business-analyse-develop**
|
|
183
183
|
|
|
184
184
|
---
|
|
185
185
|
|
|
@@ -189,13 +189,13 @@ Use this checklist when validating PRD files:
|
|
|
189
189
|
```
|
|
190
190
|
BLOCKING_ERROR: PRD version must be 3.0.0, got: 2.1.0
|
|
191
191
|
```
|
|
192
|
-
**Fix:** Re-run `ss
|
|
192
|
+
**Fix:** Re-run `ss business-analyse-handoff` with latest SmartStack.mcp version
|
|
193
193
|
|
|
194
194
|
### Error 2: filesToCreate at Root Level
|
|
195
195
|
```
|
|
196
196
|
BLOCKING_ERROR: filesToCreate is at ROOT level (wrong structure)
|
|
197
197
|
```
|
|
198
|
-
**Fix:** Re-run `ss
|
|
198
|
+
**Fix:** Re-run `ss business-analyse-handoff --feature {path} --output .ralph/prd-{moduleCode}.json`
|
|
199
199
|
|
|
200
200
|
### Error 3: Missing Categories
|
|
201
201
|
```
|
|
@@ -212,7 +212,7 @@ BLOCKING_ERROR: api: prd has 8 files but index.json has 12
|
|
|
212
212
|
```
|
|
213
213
|
**Fix:**
|
|
214
214
|
- PRD is stale (derived from old index.json)
|
|
215
|
-
- Re-derive PRD from latest index.json: `ss
|
|
215
|
+
- Re-derive PRD from latest index.json: `ss business-analyse-handoff --feature {path} --output .ralph/prd-{moduleCode}.json`
|
|
216
216
|
|
|
217
217
|
---
|
|
218
218
|
|
|
@@ -220,14 +220,14 @@ BLOCKING_ERROR: api: prd has 8 files but index.json has 12
|
|
|
220
220
|
|
|
221
221
|
**Derive PRD from index.json:**
|
|
222
222
|
```bash
|
|
223
|
-
ss
|
|
223
|
+
ss business-analyse-handoff \
|
|
224
224
|
--feature docs/{App}/business-analyse/v1.0/index.json \
|
|
225
225
|
--output .ralph/prd-{ModuleCode}.json
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
**Example:**
|
|
229
229
|
```bash
|
|
230
|
-
ss
|
|
230
|
+
ss business-analyse-handoff \
|
|
231
231
|
--feature docs/HumanResources/business-analyse/v1.0/index.json \
|
|
232
232
|
--output .ralph/prd-Projects.json
|
|
233
233
|
```
|
|
@@ -236,7 +236,7 @@ ss derive-prd \
|
|
|
236
236
|
```bash
|
|
237
237
|
# Typically done in step-05-deploy.md
|
|
238
238
|
for module in $(modules); do
|
|
239
|
-
ss
|
|
239
|
+
ss business-analyse-handoff --feature {module_feature_path} --output .ralph/prd-${module}.json
|
|
240
240
|
done
|
|
241
241
|
```
|
|
242
242
|
|
|
@@ -246,7 +246,7 @@ done
|
|
|
246
246
|
|
|
247
247
|
| Risk | Without Validation | With Validation |
|
|
248
248
|
|------|-------------------|-----------------|
|
|
249
|
-
| **Wrong structure** |
|
|
249
|
+
| **Wrong structure** | business-analyse-develop fails mid-execution | Caught before development starts |
|
|
250
250
|
| **Stale PRD** | Generates code from old spec | Detects version mismatch |
|
|
251
251
|
| **Missing files** | Incomplete implementation | Ensures all layers covered |
|
|
252
252
|
| **Count mismatch** | Silent data loss | Guarantees integrity |
|
|
@@ -257,6 +257,6 @@ done
|
|
|
257
257
|
|
|
258
258
|
## Related Files
|
|
259
259
|
|
|
260
|
-
- `step-05-deploy.md`: Generates PRD files via `ss
|
|
260
|
+
- `step-05-deploy.md`: Generates PRD files via `ss business-analyse-handoff`
|
|
261
261
|
- `feature-schema.json`: Schema for index.json (source of PRD)
|
|
262
|
-
- `/
|
|
262
|
+
- `/business-analyse-develop` skill: Consumes PRD files for implementation
|
package/templates/skills/{derive-prd → business-analyse-handoff}/schemas/handoff-schema.json
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "handoff-schema.json",
|
|
4
4
|
"title": "SmartStack BA - Handoff",
|
|
5
|
-
"description": "Module-level handoff: file mapping (8 categories), BR-to-code mapping, API endpoint summary. Used by /
|
|
5
|
+
"description": "Module-level handoff: file mapping (8 categories), BR-to-code mapping, API endpoint summary. Used by /business-analyse-handoff skill.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"complexity": { "type": "string", "enum": ["simple", "medium", "complex"] },
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"ralphPrd": {
|
|
63
63
|
"type": "object",
|
|
64
|
-
"description": "Embedded Ralph Loop task breakdown (also exported to .ralph/prd.json by ss
|
|
64
|
+
"description": "Embedded Ralph Loop task breakdown (also exported to .ralph/prd.json by ss business-analyse-handoff)",
|
|
65
65
|
"properties": {
|
|
66
66
|
"tasks": {
|
|
67
67
|
"type": "array",
|
|
@@ -11,7 +11,7 @@ next_step: steps/step-01-transform.md
|
|
|
11
11
|
|
|
12
12
|
## MANDATORY EXECUTION RULES
|
|
13
13
|
|
|
14
|
-
- **ALWAYS** verify status = "consolidated" or "
|
|
14
|
+
- **ALWAYS** verify status = "consolidated", "specified", "designed", or "reviewed" for all modules before proceeding
|
|
15
15
|
- **ALWAYS** validate **input** acceptance criteria (AC-01 to AC-07) per module
|
|
16
16
|
- **ALWAYS** load flat files (entities.json, usecases.json, etc.) from module directories
|
|
17
17
|
- **BLOCKING** if any module has readiness score < 100% on input ACs
|
|
@@ -33,14 +33,14 @@ IF --feature <path> provided:
|
|
|
33
33
|
featurePath = <path>
|
|
34
34
|
ELSE:
|
|
35
35
|
// Auto-detect from docs/
|
|
36
|
-
Scan docs/ for index.json files with status
|
|
36
|
+
Scan docs/ for index.json files with status in ["consolidated", "specified", "designed", "reviewed"]
|
|
37
37
|
IF found exactly 1:
|
|
38
38
|
featurePath = found path
|
|
39
39
|
ELSE IF found > 1:
|
|
40
40
|
Display list and ask user to specify --feature <path>
|
|
41
41
|
STOP
|
|
42
42
|
ELSE:
|
|
43
|
-
BLOCKING ERROR: "No
|
|
43
|
+
BLOCKING ERROR: "No ready BA feature found (expected status: consolidated, specified, designed, or reviewed). Run /business-analyse first."
|
|
44
44
|
STOP
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -65,8 +65,8 @@ FOR each module in appIndex.modules:
|
|
|
65
65
|
```
|
|
66
66
|
FOR each module:
|
|
67
67
|
moduleIndex = READ(module.baDir/index.json)
|
|
68
|
-
IF moduleIndex.metadata.status NOT IN ["consolidated", "specified"]:
|
|
69
|
-
BLOCKING ERROR: "Module {module.code} status: {status}, expected consolidated or
|
|
68
|
+
IF moduleIndex.metadata.status NOT IN ["consolidated", "specified", "designed", "reviewed"]:
|
|
69
|
+
BLOCKING ERROR: "Module {module.code} status: {status}, expected consolidated, specified, designed, or reviewed"
|
|
70
70
|
-> Run /business-analyse to complete specification first
|
|
71
71
|
```
|
|
72
72
|
|
|
@@ -119,7 +119,7 @@ FOR each module:
|
|
|
119
119
|
IF readiness_score < 100%:
|
|
120
120
|
BLOCKING ERROR: "Module {moduleCode} readiness: {score}% -- {failed_count} input ACs failed"
|
|
121
121
|
Display failed ACs with recovery actions
|
|
122
|
-
-> Run /business-analyse to fix, then retry /
|
|
122
|
+
-> Run /business-analyse to fix, then retry /business-analyse-handoff
|
|
123
123
|
STOP
|
|
124
124
|
```
|
|
125
125
|
|
|
@@ -35,11 +35,22 @@ For each module, load data from separate files:
|
|
|
35
35
|
// Module BA directory: docs/{AppCode}/{ModuleCode}/business-analyse/v{X.Y}/
|
|
36
36
|
const moduleDir = module.baDir; // resolved in step-00
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
38
|
+
// Read with explicit error detection (do NOT silently swallow parse failures)
|
|
39
|
+
const entitiesFile = READ(moduleDir + '/entities.json');
|
|
40
|
+
const usecasesFile = READ(moduleDir + '/usecases.json');
|
|
41
|
+
const rulesFile = READ(moduleDir + '/rules.json');
|
|
42
|
+
const permissions = READ(moduleDir + '/permissions.json');
|
|
43
|
+
const screensFile = READ(moduleDir + '/screens.json');
|
|
44
|
+
|
|
45
|
+
// Log missing files explicitly before falling back
|
|
46
|
+
if (!entitiesFile) console.warn("⚠ " + moduleDir + "/entities.json not found — using empty");
|
|
47
|
+
if (!usecasesFile) console.warn("⚠ " + moduleDir + "/usecases.json not found — using empty");
|
|
48
|
+
if (!rulesFile) console.warn("⚠ " + moduleDir + "/rules.json not found — using empty");
|
|
49
|
+
|
|
50
|
+
const entities = (entitiesFile?.entities) || [];
|
|
51
|
+
const useCases = (usecasesFile?.useCases) || [];
|
|
52
|
+
const rules = (rulesFile?.rules) || [];
|
|
53
|
+
const screens = (screensFile?.screens) || [];
|
|
43
54
|
```
|
|
44
55
|
|
|
45
56
|
**Source mapping (flat files -> handoff categories):**
|
|
@@ -96,6 +107,24 @@ Since `/business-analyse` does not produce `apiEndpoints`, generate them from us
|
|
|
96
107
|
// Map CRUD operations to HTTP methods
|
|
97
108
|
```
|
|
98
109
|
|
|
110
|
+
### 2b. Enrich Sections with UC/BR Links
|
|
111
|
+
|
|
112
|
+
Using `sectionCode` from usecases.json and rules.json, link each UC and BR to its section:
|
|
113
|
+
|
|
114
|
+
```javascript
|
|
115
|
+
// Build section-level UC/BR mapping
|
|
116
|
+
const sectionMap = {};
|
|
117
|
+
for (const section of screens) {
|
|
118
|
+
sectionMap[section.sectionCode || section.code] = {
|
|
119
|
+
useCases: useCases.filter(uc => uc.sectionCode === (section.sectionCode || section.code)).map(uc => uc.id),
|
|
120
|
+
businessRules: rules.filter(br => br.sectionCode === (section.sectionCode || section.code)).map(br => br.id)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
// Attach to sections for PRD consumption
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
> This mapping enables business-analyse-develop's section-splitting to know which UCs/BRs belong to which section.
|
|
127
|
+
|
|
99
128
|
### 3. Map Specification to Files (8 Categories)
|
|
100
129
|
|
|
101
130
|
> **Reference:** Read `references/handoff-file-templates.md` for complete JSON templates.
|
|
@@ -242,8 +271,18 @@ if (!handoff.brToCodeMapping || handoff.brToCodeMapping.length === 0) {
|
|
|
242
271
|
BLOCKING_ERROR("Module {moduleCode}: brToCodeMapping is empty");
|
|
243
272
|
}
|
|
244
273
|
|
|
245
|
-
// 4.
|
|
246
|
-
|
|
274
|
+
// 4. Validate section resources have entity field (enables section-splitting)
|
|
275
|
+
const sections = screens || [];
|
|
276
|
+
for (const section of sections) {
|
|
277
|
+
for (const resource of (section.resources || [])) {
|
|
278
|
+
if (!resource.entity) {
|
|
279
|
+
BLOCKING_ERROR("Module {moduleCode}, section {section.code}: resource {resource.code} missing 'entity' field");
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// 5. Display pass
|
|
285
|
+
console.log("POST-CHECK PASS: {moduleCode} -- 8 categories, {brCount} BRs mapped, {sections.length} sections validated");
|
|
247
286
|
```
|
|
248
287
|
|
|
249
288
|
---
|
|
@@ -10,8 +10,8 @@ model: sonnet
|
|
|
10
10
|
|
|
11
11
|
## MANDATORY EXECUTION RULES
|
|
12
12
|
|
|
13
|
-
- **ALWAYS** generate PRD via `ss
|
|
14
|
-
- **ALWAYS** verify PRD structure: $version=3.0.0, implementation.filesToCreate, 8 categories
|
|
13
|
+
- **ALWAYS** generate PRD via `ss business-analyse-handoff` CLI command (deterministic, never LLM)
|
|
14
|
+
- **ALWAYS** verify PRD structure: $version=3.0.0 or 4.0.0, implementation.filesToCreate (v3) or expectedFiles (v4), 8 categories
|
|
15
15
|
- **ALWAYS** verify file counts match between PRD and handoff
|
|
16
16
|
- **ALWAYS** generate progress.txt from template
|
|
17
17
|
- **ALWAYS** update BA manifest (docs/index.json)
|
|
@@ -33,18 +33,30 @@ For EACH module:
|
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
# Single module:
|
|
36
|
-
ss
|
|
36
|
+
ss business-analyse-handoff --ba-dir {moduleBaDir} --output .ralph/prd-{moduleCode}.json
|
|
37
37
|
|
|
38
38
|
# All modules from app-level index.json:
|
|
39
|
-
ss
|
|
39
|
+
ss business-analyse-handoff --ba-app {appIndexPath}
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
**Option B — Legacy feature.json:**
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
ss
|
|
45
|
+
ss business-analyse-handoff --feature {moduleFeaturePath} --output .ralph/prd-{moduleCode}.json
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
**Option C — v4 spec-oriented PRD (1M context + compaction):**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
ss business-analyse-handoff --ba-app {appIndexPath} --v4
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Generates `prd-{moduleCode}.json` with `$version: "4.0.0"` containing:
|
|
55
|
+
- `objectives[]` with acceptance criteria (instead of pre-computed tasks)
|
|
56
|
+
- `expectedFiles` (same 8 categories, for file reconciliation)
|
|
57
|
+
- `gates` (declarative quality gate definitions)
|
|
58
|
+
- Architecture, business rules, BR mapping, seed data (same as v3)
|
|
59
|
+
|
|
48
60
|
### 2. POST-CHECK PRD (BLOCKING)
|
|
49
61
|
|
|
50
62
|
> **Reference:** Read `references/prd-generation.md` for complete validation rules.
|
|
@@ -54,26 +66,27 @@ const prd = readJSON(`.ralph/prd-${moduleCode}.json`);
|
|
|
54
66
|
const featureHandoff = moduleFeature.handoff.filesToCreate;
|
|
55
67
|
|
|
56
68
|
// Check 1: Version
|
|
57
|
-
if (prd.$version !== "3.0.0") {
|
|
58
|
-
BLOCKING_ERROR("PRD version must be 3.0.0, got: " + prd.$version);
|
|
69
|
+
if (prd.$version !== "3.0.0" && prd.$version !== "4.0.0") {
|
|
70
|
+
BLOCKING_ERROR("PRD version must be 3.0.0 or 4.0.0, got: " + prd.$version);
|
|
59
71
|
}
|
|
60
72
|
|
|
61
|
-
// Check 2: filesToCreate
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
// Check 2: filesToCreate location (v3: implementation.filesToCreate, v4: expectedFiles)
|
|
74
|
+
const ftc = prd.$version === "4.0.0" ? prd.expectedFiles : prd.implementation?.filesToCreate;
|
|
75
|
+
if (!ftc) {
|
|
76
|
+
BLOCKING_ERROR("prd.json missing file manifest (v3: implementation.filesToCreate, v4: expectedFiles)");
|
|
64
77
|
STOP;
|
|
65
78
|
}
|
|
66
79
|
|
|
67
80
|
// Check 3: All 8 categories present
|
|
68
81
|
const categories = ['domain', 'application', 'infrastructure', 'api', 'frontend', 'seedData', 'tests', 'documentation'];
|
|
69
|
-
const missingCategories = categories.filter(cat => !
|
|
82
|
+
const missingCategories = categories.filter(cat => !ftc[cat]);
|
|
70
83
|
if (missingCategories.length > 0) {
|
|
71
84
|
BLOCKING_ERROR("Missing categories: " + missingCategories.join(', '));
|
|
72
85
|
}
|
|
73
86
|
|
|
74
87
|
// Check 4: File counts match
|
|
75
88
|
for (const cat of categories) {
|
|
76
|
-
const prdCount =
|
|
89
|
+
const prdCount = ftc[cat]?.length ?? 0;
|
|
77
90
|
const featureCount = featureHandoff[cat]?.length ?? 0;
|
|
78
91
|
if (prdCount !== featureCount) {
|
|
79
92
|
BLOCKING_ERROR(`${cat}: prd=${prdCount} but feature=${featureCount}`);
|
|
@@ -111,6 +124,13 @@ Write to: `.ralph/modules-queue.json`
|
|
|
111
124
|
- Summary with totals across all modules
|
|
112
125
|
- Cross-module tasks IF multi-module
|
|
113
126
|
|
|
127
|
+
Before writing:
|
|
128
|
+
```
|
|
129
|
+
IF .ralph/progress.txt exists AND contains "Iteration" entries:
|
|
130
|
+
WARN: "progress.txt contains development progress — appending handoff section instead of overwriting"
|
|
131
|
+
APPEND instead of WRITE
|
|
132
|
+
```
|
|
133
|
+
|
|
114
134
|
Write to: `.ralph/progress.txt`
|
|
115
135
|
|
|
116
136
|
### 5. Update BA Manifest (docs/index.json)
|
|
@@ -172,7 +192,7 @@ Artifacts generated:
|
|
|
172
192
|
docs/index.json — BA manifest (status: handed-off)
|
|
173
193
|
|
|
174
194
|
[NEXT] Development:
|
|
175
|
-
1. Run /
|
|
195
|
+
1. Run /business-analyse-develop to begin implementation
|
|
176
196
|
2. Modules will be processed in topological order
|
|
177
197
|
3. Each module PRD contains {total_files} files across 8 categories
|
|
178
198
|
|
|
@@ -187,7 +207,7 @@ Artifacts generated:
|
|
|
187
207
|
2. `.ralph/progress.txt` exists (>500 bytes)
|
|
188
208
|
3. `.ralph/modules-queue.json` exists (if 2+ modules)
|
|
189
209
|
4. `docs/index.json` updated with correct entry count and status "handed-off"
|
|
190
|
-
5. All PRD files have $version=3.0.0
|
|
210
|
+
5. All PRD files have $version=3.0.0 or 4.0.0, file manifest present, 8 categories
|
|
191
211
|
6. File counts match between PRD and handoff for all categories
|
|
192
212
|
|
|
193
213
|
**IF any check fails -> fix before completing.**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: business-analyse-html
|
|
3
3
|
description: "Generate the interactive HTML document from business analysis JSON data"
|
|
4
4
|
model: opus
|
|
5
5
|
user_invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# /
|
|
8
|
+
# /business-analyse-html
|
|
9
9
|
|
|
10
10
|
Generate the interactive HTML document of the business analysis from the JSON analysis files.
|
|
11
11
|
|
|
12
12
|
## Triggers
|
|
13
13
|
|
|
14
|
-
- Explicit invocation: `/
|
|
14
|
+
- Explicit invocation: `/business-analyse-html <feature-id>`
|
|
15
15
|
- After `/business-analyse` step-04 (consolidation complete)
|
|
16
|
-
- Delegation from `/
|
|
16
|
+
- Delegation from `/business-analyse-review` (after review corrections applied)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|