@atlashub/smartstack-cli 4.20.0 → 4.21.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.
Files changed (65) hide show
  1. package/package.json +2 -2
  2. package/templates/skills/ba-generate-html/SKILL.md +60 -0
  3. package/templates/skills/{business-analyse/references/deploy-data-build.md → ba-generate-html/references/data-build.md} +2 -2
  4. package/templates/skills/{business-analyse/references/html-data-mapping.md → ba-generate-html/references/data-mapping.md} +2 -2
  5. package/templates/skills/{business-analyse/references/deploy-modes.md → ba-generate-html/references/output-modes.md} +1 -1
  6. package/templates/skills/ba-generate-html/steps/step-01-collect.md +113 -0
  7. package/templates/skills/ba-generate-html/steps/step-02-build-data.md +237 -0
  8. package/templates/skills/ba-generate-html/steps/step-03-render.md +75 -0
  9. package/templates/skills/ba-generate-html/steps/step-04-verify.md +83 -0
  10. package/templates/skills/ba-review/SKILL.md +45 -0
  11. package/templates/skills/{business-analyse → ba-review}/references/review-data-mapping.md +2 -2
  12. package/templates/skills/{business-analyse/steps/step-06-review.md → ba-review/steps/step-01-apply.md} +7 -18
  13. package/templates/skills/business-analyse/SKILL.md +19 -54
  14. package/templates/skills/business-analyse/_shared.md +9 -14
  15. package/templates/skills/business-analyse/react/components.md +1 -1
  16. package/templates/skills/business-analyse/react/schema.md +1 -1
  17. package/templates/skills/business-analyse/references/acceptance-criteria.md +2 -7
  18. package/templates/skills/business-analyse/references/detection-strategies.md +3 -3
  19. package/templates/skills/business-analyse/references/naming-conventions.md +2 -2
  20. package/templates/skills/business-analyse/references/robustness-checks.md +2 -121
  21. package/templates/skills/business-analyse/references/validation-checklist.md +3 -4
  22. package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
  23. package/templates/skills/business-analyse/steps/step-00-init.md +6 -9
  24. package/templates/skills/business-analyse/steps/step-04-consolidate.md +13 -6
  25. package/templates/skills/business-analyse/templates/tpl-handoff.md +1 -1
  26. package/templates/skills/business-analyse/templates/tpl-launch-displays.md +1 -1
  27. package/templates/skills/business-analyse/steps/step-05-deploy.md +0 -220
  28. /package/templates/skills/{business-analyse → ba-generate-html}/html/ba-interactive.html +0 -0
  29. /package/templates/skills/{business-analyse → ba-generate-html}/html/build-html.js +0 -0
  30. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/cadrage-context.html +0 -0
  31. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/cadrage-risks.html +0 -0
  32. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/cadrage-scope.html +0 -0
  33. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/cadrage-stakeholders.html +0 -0
  34. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/cadrage-success.html +0 -0
  35. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/consol-datamodel.html +0 -0
  36. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/consol-flows.html +0 -0
  37. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/consol-interactions.html +0 -0
  38. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/consol-permissions.html +0 -0
  39. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/decomp-dependencies.html +0 -0
  40. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/decomp-modules.html +0 -0
  41. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/handoff-summary.html +0 -0
  42. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/partials/module-spec-container.html +0 -0
  43. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/01-data-init.js +0 -0
  44. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/02-navigation.js +0 -0
  45. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/03-render-cadrage.js +0 -0
  46. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/04-render-modules.js +0 -0
  47. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/05-render-specs.js +0 -0
  48. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/06-render-consolidation.js +0 -0
  49. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/06-render-mockups.js +0 -0
  50. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/07-render-handoff.js +0 -0
  51. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/08-editing.js +0 -0
  52. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/09-export.js +0 -0
  53. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/10-comments.js +0 -0
  54. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/scripts/11-review-panel.js +0 -0
  55. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/01-variables.css +0 -0
  56. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/02-layout.css +0 -0
  57. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/03-navigation.css +0 -0
  58. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/04-cards.css +0 -0
  59. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/05-modules.css +0 -0
  60. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/06-wireframes.css +0 -0
  61. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/07-comments.css +0 -0
  62. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/08-review-panel.css +0 -0
  63. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/styles/09-mockups-html.css +0 -0
  64. /package/templates/skills/{business-analyse → ba-generate-html}/html/src/template.html +0 -0
  65. /package/templates/skills/{business-analyse → ba-generate-html}/references/wireframe-svg-style-guide.md +0 -0
@@ -1,12 +1,12 @@
1
1
  ---
2
- name: step-06-review
2
+ name: step-01-apply
3
3
  description: Apply review corrections from ba-review.json, create new version, regenerate all artifacts
4
4
  model: opus
5
5
  ---
6
6
 
7
- > **Context files:** `_shared.md`, `references/review-data-mapping.md`, `references/html-data-mapping.md`
7
+ > **Context files:** `references/review-data-mapping.md`
8
8
 
9
- # Step 06: Apply Review Corrections
9
+ # Step 01: Apply Review Corrections
10
10
 
11
11
  Apply corrections exported from the interactive HTML review (`ba-review.json`) to create a new version of the business analysis with all downstream artifacts regenerated.
12
12
 
@@ -182,23 +182,12 @@ Create review.json with review_section and update hash in index.json
182
182
 
183
183
  ## Step 8: Regenerate Interactive HTML
184
184
 
185
- > **Reference:** `references/html-data-mapping.md` for FEATURE_DATA and EMBEDDED_ARTIFACTS mapping
185
+ Delegate HTML generation to `/ba-generate-html` skill:
186
186
 
187
187
  ```
188
- 1. Read ba-interactive.html template from skill templates
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.
193
- (follow exact mapping from html-data-mapping.md)
194
- 3. Build EMBEDDED_ARTIFACTS from thematic files
195
- (wireframes, e2eFlows, dependencyGraph)
196
- 4. Replace placeholders:
197
- - {{FEATURE_DATA}} → serialized FEATURE_DATA JSON
198
- - {{EMBEDDED_ARTIFACTS}} → serialized EMBEDDED_ARTIFACTS JSON
199
- - {{APPLICATION_NAME}} → application_name
200
- - {{APPLICATION_ID}} → feature_id
201
- 5. Write to new version directory: {new_version_dir}/ba-interactive.html
188
+ 1. Load skill: /ba-generate-html with feature_id
189
+ 2. The skill handles: collect → build → render → verify
190
+ 3. Output: {new_version_dir}/ba-interactive.html
202
191
  ```
203
192
 
204
193
  ## Step 9: Update Manifest
@@ -9,7 +9,7 @@ user_invocable: true
9
9
 
10
10
  ## Architecture
11
11
 
12
- **2 phases, 7 steps** — "Macro vers Specification"
12
+ **2 phases, 5 steps** — "Macro vers Specification"
13
13
 
14
14
  ### Phase 1 — Macro (Identification + Challenge)
15
15
 
@@ -19,29 +19,28 @@ user_invocable: true
19
19
  | 01 | `step-01-cadrage.md` | Opus | Context, stakeholders, scope, risks. ~40 core questions |
20
20
  | 02 | `step-02-structure.md` | Opus | Identify App > Module > Section > Resource hierarchy, CHALLENGE each element |
21
21
 
22
- ### Phase 2 — Specification (Deep dive + Client enrichment)
22
+ ### Phase 2 — Specification (Deep dive + Consolidation)
23
23
 
24
24
  | Step | File | Model | Role |
25
25
  |------|------|-------|------|
26
26
  | 03 | `step-03-specify.md` | Opus | Deep dive per module: entities, BRs, UCs, permissions, screens. Sequential internal loop |
27
27
  | 04 | `step-04-consolidate.md` | Opus | Cross-module validation: data model, permission coherence, E2E flows |
28
- | 05 | `step-05-deploy.md` | Sonnet | Deploy interactive HTML document |
29
- | 06 | `step-06-review.md` | Opus | Apply client corrections from ba-review.json exported from HTML |
30
28
 
31
- ### IA + Client Loop
29
+ ### Post-BA Workflow
32
30
  ```
33
- Phase 1 (steps 00-02) → Phase 2 (steps 03-05) → Client reviews HTML
34
-
35
- Client comments/enriches
36
-
37
- Export ba-review.json
38
-
39
- Step 06 re-deploy HTML
40
-
41
- /derive-prd → /ralph-loop
31
+ Phase 1 (steps 00-02) → Phase 2 (steps 03-04) → /ba-generate-html → Client reviews HTML
32
+
33
+ Client comments/enriches
34
+
35
+ Export ba-review.json
36
+
37
+ /ba-review/ba-generate-html
38
+
39
+ /derive-prd → /ralph-loop
42
40
  ```
43
41
 
44
- > **PRD generation:** Handoff data and PRD files are generated by the `/derive-prd` skill, not by step-05.
42
+ > After step-04, invoke `/ba-generate-html` to generate the HTML, then `/ba-review` for the client correction cycle.
43
+ > **PRD generation:** Handoff data and PRD files are generated by the `/derive-prd` skill.
45
44
 
46
45
  ## JSON Architecture — Granular files + Index
47
46
 
@@ -83,7 +82,6 @@ docs/
83
82
  Each step loads only the files it needs via `index.json`:
84
83
  - Step 03 (specify): loads `index.json` + `entities.json` for current module only
85
84
  - Step 04 (consolidate): loads all `index.json` files for summary counts
86
- - Step 05 (deploy): assembles all files into unified FEATURE_DATA for HTML
87
85
 
88
86
  ## Workflow Modes
89
87
 
@@ -91,7 +89,6 @@ Each step loads only the files it needs via `index.json`:
91
89
  |------|-----------|----------|
92
90
  | `new` | No existing index.json | Full analysis from step 00 |
93
91
  | `update` | Existing index.json found | Delta analysis, skip completed sections |
94
- | `review` | ba-review.json provided | Apply corrections (step 06 only) |
95
92
 
96
93
  ## Context Loading Rules
97
94
 
@@ -104,8 +101,6 @@ Each step loads ONLY what it needs:
104
101
  | 02 | `_shared.md`, `step-02-structure.md` | cadrage.json from step 01 |
105
102
  | 03 | `_shared.md`, `step-03-specify.md` | current module's index.json + relevant files |
106
103
  | 04 | `_shared.md`, `step-04-consolidate.md` | all module index.json files |
107
- | 05 | `_shared.md`, `step-05-deploy.md` | all JSON files for HTML assembly |
108
- | 06 | `_shared.md`, `step-06-review.md` | ba-review.json + current feature files |
109
104
 
110
105
  ## Agents
111
106
 
@@ -116,27 +111,7 @@ Each step loads ONLY what it needs:
116
111
 
117
112
  ## HTML Output
118
113
 
119
- **Single unified HTML** document (`ba-interactive.html`) with:
120
- - Multi-app navigation (4 levels: App > Module > Section > Resource)
121
- - Inline editing (UC, BR, entities, sections/resources)
122
- - HTML mockups from `screens[]` specs (SmartTable, SmartForm, SmartCard, SmartKanban, SmartDashboard)
123
- - Wireframe fallback from EMBEDDED_ARTIFACTS
124
- - Comment system with review panel
125
- - Export: ba-review.json for step 06 loop
126
-
127
- ### FEATURE_DATA structure
128
-
129
- ```javascript
130
- {
131
- metadata: { projectName, version, ... },
132
- applications: [{ code, name, icon, route, modules: [...] }],
133
- cadrage: { context, scope, stakeholders, risks, criteria },
134
- modules: [{ code, applicationCode, name, ... }],
135
- moduleSpecs: { [code]: { useCases, businessRules, entities, permissions, screens, sections, resources } },
136
- consolidation: { interactions, e2eFlows },
137
- comments: []
138
- }
139
- ```
114
+ HTML generation is handled by the `/ba-generate-html` skill. After step-04, invoke `/ba-generate-html` to produce the interactive HTML document. For client review corrections, use `/ba-review`.
140
115
 
141
116
  ## Step Execution
142
117
 
@@ -164,31 +139,21 @@ STEP 03 (specify) — SEQUENTIAL MODULE LOOP
164
139
  → Output: entities.json, rules.json, usecases.json, permissions.json, screens.json
165
140
  → No team mode — sequential ensures 100% context per module
166
141
 
167
- STEP 04 (consolidate)
142
+ STEP 04 (consolidate) — FINAL BA STEP
168
143
  → Load: _shared.md, step-04-consolidate.md, all index.json
169
144
  → Execute: Data model validation, permission coherence, E2E flows
170
145
  → Output: validation.json, consolidated data
171
-
172
- STEP 05 (deploy)
173
- → Load: _shared.md, step-05-deploy.md, all JSON files
174
- → Execute: Assemble FEATURE_DATA, generate HTML
175
- → Output: ba-interactive.html (single file)
176
-
177
- STEP 06 (review) — CLIENT LOOP ENTRY
178
- → Load: _shared.md, step-06-review.md, ba-review.json
179
- → Execute: Apply corrections, create new version
180
- → Output: Updated JSON files, regenerated HTML
146
+ → Next: invoke /ba-generate-html, then /ba-review for client cycle
181
147
  ```
182
148
 
183
149
  ## References
184
150
 
185
151
  | File | Content |
186
152
  |------|---------|
187
- | `references/html-data-mapping.md` | FEATURE_DATA mapping for HTML generation |
153
+ | `/ba-generate-html` skill | HTML generation (FEATURE_DATA mapping, build, render, verify) |
154
+ | `/ba-review` skill | Apply client corrections from ba-review.json |
188
155
  | `references/naming-conventions.md` | SmartStack naming rules |
189
- | `references/wireframe-svg-style-guide.md` | SVG wireframe rendering guide |
190
156
  | `references/validation-checklist.md` | Validation criteria checklist |
191
- | `references/deploy-modes.md` | Deployment configuration |
192
157
  | `references/acceptance-criteria.md` | Acceptance criteria patterns |
193
158
 
194
159
  > **Cross-reference:** Handoff data, PRD generation, file templates, and BR-to-code mappings are in the `/derive-prd` skill.
@@ -68,16 +68,16 @@ Steps load only the files they need:
68
68
  |------|---------|-------------|
69
69
  | `new` | No existing index.json | Full analysis from scratch |
70
70
  | `update` | Existing index.json found | Delta analysis (add modules, update specs) |
71
- | `review` | ba-review.json provided | Apply client corrections from HTML export |
72
71
 
73
72
  ### Workflow detection
74
73
 
75
74
  ```
76
- 1. Check for ba-review.json in project root → mode = "review"
77
- 2. Check for existing docs/**/index.json → mode = "update"
78
- 3. Otherwise → mode = "new"
75
+ 1. Check for existing docs/**/index.json → mode = "update"
76
+ 2. Otherwise → mode = "new"
79
77
  ```
80
78
 
79
+ > **Note:** Review mode (`ba-review.json`) is handled by the `/ba-review` skill.
80
+
81
81
  ## Navigation Hierarchy
82
82
 
83
83
  Maps to SmartStack DB tables:
@@ -138,24 +138,19 @@ draft → identified → specified → validated → reviewed
138
138
  | identified | Step 02 | Hierarchy identified (App > Module > Section > Resource) |
139
139
  | specified | Step 03 | Module fully specified (entities, UCs, BRs, permissions, screens) |
140
140
  | validated | Step 04 | Cross-module validation passed |
141
- | reviewed | Step 06 | Client review applied |
141
+ | reviewed | `/ba-review` | Client review applied |
142
142
 
143
143
  ## Handoff & PRD Generation
144
144
 
145
- Handoff data and PRD files are generated by the `/derive-prd` skill, not by step-05. Step-05 only deploys the interactive HTML document. The workflow is:
145
+ Handoff data and PRD files are generated by the `/derive-prd` skill. The workflow is:
146
146
 
147
147
  ```
148
- /business-analyse (steps 00-05) → /derive-prd → /ralph-loop
148
+ /business-analyse (steps 00-04) → /ba-generate-html → /ba-review (if needed) → /derive-prd → /ralph-loop
149
149
  ```
150
150
 
151
- ## HTML Integration
152
-
153
- Single unified HTML (`ba-interactive.html`) generated in step 05:
154
-
155
- - **Single-app**: `docs/{app}/business-analyse/v{X.Y}/ba-interactive.html`
156
- - **Multi-app**: `docs/business-analyse/v{X.Y}/ba-interactive.html`
151
+ ## HTML Generation
157
152
 
158
- The HTML embeds all data as `FEATURE_DATA` JavaScript object. See `references/html-data-mapping.md` for the complete mapping.
153
+ For HTML generation, use the `/ba-generate-html` skill after step-04 consolidation. For client review corrections, use `/ba-review`.
159
154
 
160
155
  ## Resume Protocol
161
156
 
@@ -1,7 +1,7 @@
1
1
  # React Components - Business Analyse Viewer
2
2
 
3
3
  > **Usage:** React component that renders index.json directly
4
- > **Loaded in:** step-05-deploy.md
4
+ > **Loaded in:** /ba-generate-html
5
5
  > **Data source (module):** `docs/{app}/{module}/business-analyse/v{X.Y}/index.json`
6
6
  > **Data source (application):** `docs/{app}/business-analyse/v{X.Y}/index.json`
7
7
  > **Related:** `react/application-viewer.md` for application-level view
@@ -1,7 +1,7 @@
1
1
  # TypeScript Schema - Feature JSON Types
2
2
 
3
3
  > **Usage:** TypeScript interfaces aligned with index.json and application-schema.json
4
- > **Loaded in:** step-05-deploy.md (for web app rendering)
4
+ > **Loaded in:** /ba-generate-html (for web app rendering)
5
5
  > **Source (module):** `docs/{app}/{module}/business-analyse/v{X.Y}/index.json`
6
6
  > **Source (application):** `docs/{app}/business-analyse/v{X.Y}/index.json`
7
7
 
@@ -1,6 +1,6 @@
1
1
  # Module Acceptance Criteria (Shared Reference)
2
2
 
3
- > **Loaded by:** step-03-specify (post-check), step-05-deploy (pre-handoff gate), ralph-loop step-01-task (input validation)
3
+ > **Loaded by:** step-03-specify (post-check), ralph-loop step-01-task (input validation)
4
4
  > **Purpose:** Define measurable, bash-verifiable acceptance criteria that a module MUST pass before being marked "specified".
5
5
  > **Key principle:** These checks read the REAL JSON files on disk — NOT in-memory data the model "thinks" it wrote.
6
6
 
@@ -137,12 +137,7 @@ console.log('PASS: All acceptance criteria met (AC-01 to AC-17)');
137
137
  After writing module JSON files, run the bash script above.
138
138
  IF FAIL → re-execute section 11 write with corrected data → re-run until PASS.
139
139
 
140
- ### 2. step-05-deploy.md (pre-handoff gate)
141
-
142
- Before writing handoff for each module, run the bash script on the module index.json.
143
- IF FAIL → STOP handoff for this module, report which criteria failed.
144
-
145
- ### 3. ralph-loop step-01-task.md (input validation)
140
+ ### 2. ralph-loop step-01-task.md (input validation)
146
141
 
147
142
  At PRD load time, run the bash script on each module index.json.
148
143
  IF FAIL → BLOCKING: "Module {name} does not meet acceptance criteria — run /business-analyse to fix".
@@ -63,7 +63,7 @@ function detectReviewMode(feature_description) {
63
63
  reviewJsonPath: reviewFilePath,
64
64
  applicationName: latestApp.metadata.application,
65
65
  docsDir: versionDir,
66
- nextStep: 'step-06-review.md'
66
+ nextStep: 'redirect-to-ba-review'
67
67
  };
68
68
  }
69
69
  ```
@@ -73,7 +73,7 @@ function detectReviewMode(feature_description) {
73
73
  | Condition | Action |
74
74
  |-----------|--------|
75
75
  | `{feature_description}` starts with `-review` | Activate review mode detection |
76
- | ba-review.json found | Skip to step-06-review.md |
76
+ | ba-review.json found | Redirect user to `/ba-review` skill |
77
77
  | ba-review.json NOT found | Display error with fix instructions, STOP |
78
78
  | No applications exist | Display error, STOP |
79
79
 
@@ -416,7 +416,7 @@ interface DetectionResult {
416
416
  **Test Case 4: Review Mode**
417
417
  - Input: `"-review"`
418
418
  - Existing: `HumanResources` with ba-review.json present
419
- - Expected: Load ba-review.json, skip to step-06-review.md
419
+ - Expected: Redirect user to `/ba-review` skill
420
420
 
421
421
  **Test Case 5: Review Mode - File Missing**
422
422
  - Input: `"-review"`
@@ -75,7 +75,7 @@ Route = ToKebabCase($"/{appCode}/{moduleCode}")
75
75
 
76
76
  ### JavaScript (BA Handoff Generation)
77
77
 
78
- **Location:** Used in step-05-deploy.md when building seedDataCore
78
+ **Location:** Used in /ba-generate-html when building seedDataCore
79
79
 
80
80
  **Usage:**
81
81
  ```javascript
@@ -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-05-deploy.md` (handoff section)
243
+ - **Handoff:** `/derive-prd` skill (handoff section)
@@ -264,96 +264,7 @@ DEVELOPMENT CANNOT PROCEED WITH CIRCULAR DEPENDENCIES
264
264
 
265
265
  ---
266
266
 
267
- ## Phase 3: Ralph Readiness Validation (Step-05)
268
-
269
- > **When:** After artifacts deployed (step-05), before launching /ralph-loop
270
- > **Blocking:** YES - Development blocked if critical checks fail
271
-
272
- ### Purpose
273
-
274
- Final gate to ensure business analysis is 100% ready for implementation. Catches issues before ralph-loop starts, preventing failed development attempts.
275
-
276
- ### Checks (9 categories)
277
-
278
- | # | Category | Checks | Blocking | Purpose |
279
- |---|----------|--------|----------|---------|
280
- | 1 | Module Status | All modules status = "handed-off" | YES | Incomplete modules break ralph-loop |
281
- | 2 | PRD Files | All .ralph/prd-{module}.json files exist, valid structure, file counts match index.json | YES | Ralph-loop reads PRDs for tasks |
282
- | 3 | Dependency Graph | Valid, no cycles, topological order correct | YES | Determines module implementation order |
283
- | 4 | Cross-Module References | All references resolvable | YES | Prevents FK constraint errors |
284
- | 5 | Handoff Completeness | All 8 file categories, brToCodeMapping, apiEndpointSummary | YES | Missing data breaks code generation |
285
- | 6 | i18n Keys | All keys have 4 languages | NO (WARNING) | Missing translations won't block dev |
286
- | 7 | Master Feature | Status = "handed-off", handoff complete | YES | Ralph-loop needs master handoff |
287
- | 8 | Progress Tracker | File exists, structure valid, task count matches | NO (WARNING) | Used for progress tracking |
288
- | 9 | Final Readiness | Aggregate all checks, calculate score | YES if <100% | All critical checks must pass |
289
-
290
- ### Readiness Score
291
-
292
- ```
293
- Readiness Score = (passed critical checks / total critical checks) × 100%
294
- ```
295
-
296
- **Thresholds:**
297
- - **100%** → READY FOR DEVELOPMENT ✓
298
- - **<100%** → NOT READY - FIX REQUIRED ✗
299
-
300
- ### Example Output
301
-
302
- **Ready:**
303
-
304
- ```
305
- ═══════════════════════════════════════════════════════════════
306
- RALPH READINESS CHECK - COMPLETE
307
- ═══════════════════════════════════════════════════════════════
308
-
309
- Validation Summary:
310
- ✓ Module status validation: PASS (5/5 modules)
311
- ✓ PRD files validation: PASS (5/5 files)
312
- ✓ Dependency graph validation: PASS (4 edges)
313
- ✓ Cross-module references validation: PASS (4 references)
314
- ✓ Handoff completeness check: PASS (5/5 modules)
315
- ⚠ i18n keys validation: WARNING (1 missing translation)
316
- ✓ Master feature validation: PASS
317
- ✓ Progress tracker validation: PASS
318
-
319
- Readiness Score: 100% (7/7 critical checks passed, 1 warning)
320
-
321
- Status: READY FOR DEVELOPMENT ✓
322
-
323
- Next Steps:
324
- 1. Address warnings (optional, recommended)
325
- 2. Review progress tracker: .ralph/progress.txt
326
- 3. Launch development: /ralph-loop
327
- (Use /ralph-loop -r ONLY to resume an interrupted loop)
328
- ═══════════════════════════════════════════════════════════════
329
- ```
330
-
331
- **Not Ready:**
332
-
333
- ```
334
- ═══════════════════════════════════════════════════════════════
335
- RALPH READINESS CHECK - FAILED
336
- ═══════════════════════════════════════════════════════════════
337
-
338
- Status: NOT READY FOR DEVELOPMENT ✗
339
-
340
- Critical Issues Found:
341
- ✗ Module status validation: FAIL (1/5 modules incomplete)
342
- - Reporting module status is "specified", must be "handed-off"
343
- - Fix: Return to step-05-deploy.md for Reporting module
344
-
345
- ✗ PRD files validation: FAIL (1/5 files invalid)
346
- - prd-Reporting.json has wrong structure (filesToCreate at root level)
347
- - Fix: Re-run ss derive-prd --feature {path} --output .ralph/prd-Reporting.json
348
-
349
- Required Actions:
350
- 1. Fix all critical issues listed above
351
- 2. Re-run validation: load step-05-deploy.md
352
- 3. Only proceed to /ralph-loop when all critical checks pass
353
-
354
- DO NOT PROCEED TO /RALPH-LOOP UNTIL ALL CRITICAL CHECKS PASS
355
- ═══════════════════════════════════════════════════════════════
356
- ```
267
+ > **Note:** Ralph Readiness Validation (PRD files, handoff completeness, etc.) is handled by the `/derive-prd` skill.
357
268
 
358
269
  ---
359
270
 
@@ -374,7 +285,6 @@ DO NOT PROCEED TO /RALPH-LOOP UNTIL ALL CRITICAL CHECKS PASS
374
285
  **Checkpoints:**
375
286
  - Step-03d: Module completeness (before marking "specified")
376
287
  - Step-04: Cross-module coherence (before marking "consolidated")
377
- - Step-05c: Development readiness (before /ralph-loop)
378
288
 
379
289
  ### 3. Auto-Fix vs. Manual Fix
380
290
 
@@ -486,25 +396,6 @@ WHERE: Return to step-03-specify.md for TimeTracking module
486
396
 
487
397
  ---
488
398
 
489
- ### Issue: Ralph Readiness Check Fails
490
-
491
- **Symptoms:**
492
- - Step-05c reports readiness score < 100%
493
- - Critical checks failed
494
-
495
- **Diagnosis:**
496
- 1. Review failed checks in summary
497
- 2. Identify missing/invalid artifacts
498
-
499
- **Fix:**
500
- - **Module status incomplete:** Return to step-05-deploy for affected module
501
- - **PRD files invalid:** Re-run `ss derive-prd` for affected module
502
- - **Handoff incomplete:** Return to step-05-deploy, complete handoff section
503
- - **Cross-module refs broken:** Return to step-04-consolidate, fix references
504
- - Re-run step-05-deploy after fixes
505
-
506
- ---
507
-
508
399
  ## Metrics & Success Criteria
509
400
 
510
401
  ### Module Specification Checklist
@@ -525,17 +416,7 @@ WHERE: Return to step-03-specify.md for TimeTracking module
525
416
 
526
417
  **Success:**
527
418
  - Application marked as "consolidated"
528
- - Ready for handoff
529
-
530
- ### Ralph Readiness (Step-05)
531
-
532
- **Target:**
533
- - 100% critical checks passed
534
- - Warnings addressed or documented
535
-
536
- **Success:**
537
- - Application ready for /ralph-loop
538
- - Development can proceed with full confidence
419
+ - Ready for `/ba-generate-html` and `/derive-prd`
539
420
 
540
421
  ---
541
422
 
@@ -147,18 +147,17 @@ const checklist = {
147
147
  },
148
148
 
149
149
  wireframeSchemaCompliance: {
150
- check: "All wireframes have required fields: screen, section, mockupFormat, elements[], componentMapping[], layout (object), permissionsRequired[]",
150
+ check: "All wireframes have required fields: screen, section, mockupFormat, elements[], layout (object), permissionsRequired[]",
151
151
  status: (specification.uiWireframes || specification.wireframes || []).every(wf =>
152
152
  (wf.screen || wf.title) && wf.section && (wf.mockupFormat || wf.mockup || wf.ascii) &&
153
153
  Array.isArray(wf.elements) && wf.elements.length > 0 &&
154
- Array.isArray(wf.componentMapping) && wf.componentMapping.length > 0 &&
155
154
  typeof wf.layout === 'object' && wf.layout !== null &&
156
155
  Array.isArray(wf.permissionsRequired)
157
156
  ) ? "PASS" : "FAIL",
158
157
  blocking: true,
159
- details: "Wireframes missing metadata render as empty frames in HTML documentation. " +
158
+ details: "Wireframes missing metadata render as empty frames. " +
160
159
  "Check: screen (not name/id/title), section, mockupFormat, elements[] non-empty, " +
161
- "componentMapping[] as array of {wireframeElement, reactComponent}, layout as object (not string). " +
160
+ "layout as object (not string). " +
162
161
  "Also see references/acceptance-criteria.md for bash-verifiable checks."
163
162
  },
164
163
 
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
 
46
- "$comment": "Sub-schema loading guide per BA step: step-00-init → metadata-schema.json | step-01-cadrage → discovery-schema.json (module) OR application-schema.json (master) | step-02-structure → application-schema.json (modules[], dependencyGraph) | step-03-specify → analysis-schema.json + specification-schema.json | step-04-consolidate → validation-schema.json + application-schema.json (consolidation) | step-05-deployhandoff-schema.json (filesToCreate, brToCodeMapping, apiEndpointSummary) + (prd, progress, manifest, ba-interactive.html) | step-06-reviewapplies ba-review.json corrections, creates new version",
46
+ "$comment": "Sub-schema loading guide per BA step: step-00-init → metadata-schema.json | step-01-cadrage → discovery-schema.json (module) OR application-schema.json (master) | step-02-structure → application-schema.json (modules[], dependencyGraph) | step-03-specify → analysis-schema.json + specification-schema.json | step-04-consolidate → validation-schema.json + application-schema.json (consolidation). HTML generation/ba-generate-html skill. Review corrections /ba-review skill. Handoff /derive-prd skill",
47
47
 
48
48
  "$defs": {
49
49
  "stepStatus": { "$ref": "shared/common-defs.json#/$defs/stepStatus" },
@@ -101,7 +101,7 @@ Execute workflow detection algorithm:
101
101
  - Continue to application name determination.
102
102
 
103
103
  **Key decision points:**
104
- 1. IF review mode → load ba-review.json, skip to step-06-review.md
104
+ 1. IF review mode → inform user to use `/ba-review` skill instead
105
105
  2. IF no existing apps → workflow_type = "new"
106
106
  3. IF existing apps → analyze similarity → prompt user
107
107
 
@@ -496,13 +496,9 @@ If initialization was interrupted:
496
496
 
497
497
  **Status-based resume routing (check in this order):**
498
498
 
499
- - If status = `"handed-off"`:
500
- Resume at `step-06-review.md`
501
- Display: "Handoff complete — proceeding to review..."
502
-
503
- - If status = `"consolidated"`:
504
- → Resume directly at `step-05-deploy.md`
505
- → Display: "Resuming from consolidation — proceeding to deployment..."
499
+ - If status = `"handed-off"` or `"consolidated"`:
500
+ Display: "BA workflow complete. Use /ba-generate-html to generate HTML, /ba-review for corrections."
501
+ STOP
506
502
 
507
503
  - If status = `"specified"` AND `metadata.workflow.allModulesSpecified === true`:
508
504
  → Resume at `step-04-consolidate.md`
@@ -531,4 +527,5 @@ If a project-level index.json is found (scope = "project"):
531
527
  → All applications specified → Resume at `step-04-consolidate.md`
532
528
 
533
529
  - If status = `"consolidated"`:
534
- Resume at `step-05-deploy.md`
530
+ Display: "BA workflow complete. Use /ba-generate-html to generate HTML."
531
+ → STOP
@@ -2,7 +2,7 @@
2
2
  name: step-04-consolidate
3
3
  description: Cross-module validation - data model, permissions, E2E flows, approval
4
4
  model: opus
5
- next_step: steps/step-05-deploy.md
5
+ next_step: none
6
6
  ---
7
7
 
8
8
  > **Context files:** `_shared.md`
@@ -34,8 +34,8 @@ ba-reader.readApplicationContext({feature_id})
34
34
  → cadrage.applicationRoles, modules[], dependencyGraph
35
35
 
36
36
  IF status already "consolidated":
37
- Display: "Consolidation already completed. Loading step-05-deploy."
38
- Load: steps/step-05-deploy.md
37
+ Display: "Consolidation already completed. BA workflow finished."
38
+ Display: "Next: invoke /ba-generate-html then /ba-review for client cycle."
39
39
  STOP
40
40
  ```
41
41
 
@@ -443,7 +443,11 @@ Display final summary:
443
443
  ✓ All validations passed
444
444
  ✓ Client approval obtained
445
445
  ✓ Status: consolidated
446
- → Proceeding to step-05-deploy.md
446
+
447
+ BA workflow complete. Next steps:
448
+ → Invoke /ba-generate-html to generate the interactive HTML
449
+ → Invoke /ba-review to apply client corrections
450
+ → Invoke /derive-prd → /ralph-loop for implementation
447
451
  ```
448
452
 
449
453
  ---
@@ -473,6 +477,9 @@ Display final summary:
473
477
 
474
478
  ---
475
479
 
476
- ## NEXT STEP
480
+ ## NEXT STEPS
477
481
 
478
- Load: `./step-05-deploy.md`
482
+ BA workflow ends here. After consolidation:
483
+ 1. Invoke `/ba-generate-html` to generate the interactive HTML document
484
+ 2. Invoke `/ba-review` to apply client corrections (if needed)
485
+ 3. Invoke `/derive-prd` then `/ralph-loop` for implementation
@@ -1,6 +1,6 @@
1
1
  # Template Development Handoff
2
2
 
3
- > **Usage:** Template for step-05-deploy.md
3
+ > **Usage:** Template for /derive-prd
4
4
  > **Data source:** index.json (sections: metadata, analysis, specification, handoff)
5
5
 
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  # Skill Launch Display Templates (templates/tpl-launch-displays.md)
2
2
 
3
- > **Used by:** step-05-deploy (Completion Summary)
3
+ > **Used by:** /ba-generate-html (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