@atlashub/smartstack-cli 3.9.0 → 3.12.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/dist/index.js +2544 -2461
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +479 -6185
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/ba-writer.md +178 -0
- package/templates/agents/db-reader.md +149 -0
- package/templates/skills/application/references/application-roles-template.md +227 -0
- package/templates/skills/application/references/provider-template.md +30 -6
- package/templates/skills/application/steps/step-03-roles.md +45 -7
- package/templates/skills/application/steps/step-03b-provider.md +13 -6
- package/templates/skills/business-analyse/SKILL.md +56 -4
- package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +477 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +578 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +9 -19
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +12 -2
- package/templates/skills/business-analyse/references/deploy-data-build.md +36 -25
- package/templates/skills/business-analyse/references/detection-strategies.md +424 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +4 -0
- package/templates/skills/business-analyse/references/prd-generation.md +258 -0
- package/templates/skills/business-analyse/references/robustness-checks.md +538 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +47 -4
- package/templates/skills/business-analyse/references/validation-checklist.md +281 -0
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +33 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +70 -75
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +8 -22
- package/templates/skills/business-analyse/steps/step-03a-data.md +20 -410
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +356 -0
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +143 -0
- package/templates/skills/business-analyse/steps/step-03b-ui.md +3 -0
- package/templates/skills/business-analyse/steps/step-03c-compile.md +72 -3
- package/templates/skills/business-analyse/steps/step-03d-validate.md +36 -3
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +21 -440
- package/templates/skills/business-analyse/steps/step-04a-collect.md +304 -0
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +239 -0
- package/templates/skills/business-analyse/steps/step-04c-decide.md +186 -0
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +44 -0
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +42 -2
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +518 -0
- package/templates/skills/controller/steps/step-03-generate.md +184 -24
- package/templates/skills/controller/templates.md +11 -2
- package/templates/skills/debug/SKILL.md +156 -53
- package/templates/skills/debug/references/team-protocol.md +232 -0
- package/templates/skills/ralph-loop/references/category-rules.md +46 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +32 -2
- package/templates/skills/ralph-loop/references/core-seed-data.md +233 -21
- package/templates/skills/ralph-loop/steps/step-00-init.md +64 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +27 -2
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-04c-decide
|
|
3
|
+
description: Final client approval, write consolidation, proceed to handoff
|
|
4
|
+
model: opus
|
|
5
|
+
next_step: steps/step-05a-handoff.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
> **Context files:** `_shared.md`
|
|
9
|
+
|
|
10
|
+
# Step 4c: Decide - Final Approval & Consolidation Write
|
|
11
|
+
|
|
12
|
+
## MANDATORY EXECUTION RULES
|
|
13
|
+
- Final client approval is BLOCKING before handoff
|
|
14
|
+
- ALWAYS write consolidation section before proceeding
|
|
15
|
+
- ALWAYS update workflow state for resume support
|
|
16
|
+
|
|
17
|
+
## YOUR TASK
|
|
18
|
+
Obtain final client approval for the complete application specification, write the consolidation section to feature.json, and prepare for handoff.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## EXECUTION SEQUENCE
|
|
23
|
+
|
|
24
|
+
### 8. Final Client Approval (BLOCKING)
|
|
25
|
+
|
|
26
|
+
Ask via AskUserQuestion:
|
|
27
|
+
```
|
|
28
|
+
question: "La spécification complète de l'application est prête. Validez-vous l'ensemble ?"
|
|
29
|
+
header: "Approbation"
|
|
30
|
+
options:
|
|
31
|
+
- label: "Approuvé"
|
|
32
|
+
description: "Passer au handoff pour la phase d'implémentation"
|
|
33
|
+
- label: "Réviser un module"
|
|
34
|
+
description: "Retourner à la spécification d'un module spécifique"
|
|
35
|
+
- label: "Modifier les interactions"
|
|
36
|
+
description: "Ajuster les interactions cross-module"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
IF "Réviser un module":
|
|
40
|
+
Ask which module → set currentModuleIndex to that module → load step-03a-data.md
|
|
41
|
+
|
|
42
|
+
IF "Modifier les interactions":
|
|
43
|
+
Re-enter step-04a-collect.md (sections 2-4)
|
|
44
|
+
|
|
45
|
+
### 9. Write Consolidation
|
|
46
|
+
|
|
47
|
+
> **STRUCTURE CARD: consolidation** — Must match `application-schema.json`. Follow this structure exactly.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
ba-writer.enrichSection({
|
|
51
|
+
featureId: {feature_id},
|
|
52
|
+
section: "consolidation",
|
|
53
|
+
data: {
|
|
54
|
+
crossModuleInteractions: [
|
|
55
|
+
{
|
|
56
|
+
"fromModule": "Orders",
|
|
57
|
+
"toModule": "Customers",
|
|
58
|
+
"interactionType": "FK-reference|event-publish|event-subscribe|shared-lookup|cascade-delete|cascade-update",
|
|
59
|
+
"description": "Order references customer via FK",
|
|
60
|
+
"entities": ["Order→Customer"]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
sharedEntities: [
|
|
64
|
+
{
|
|
65
|
+
"entity": "Customer",
|
|
66
|
+
"ownerModule": "Customers",
|
|
67
|
+
"referencedBy": ["Orders", "Invoices"],
|
|
68
|
+
"sharedFields": ["code", "name"]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
permissionCoherence: {
|
|
72
|
+
"rolesConsistent": true,
|
|
73
|
+
"pathFormatConsistent": true,
|
|
74
|
+
"hierarchyRespected": true,
|
|
75
|
+
"conflicts": [],
|
|
76
|
+
"warnings": []
|
|
77
|
+
},
|
|
78
|
+
e2eFlows: [
|
|
79
|
+
{
|
|
80
|
+
"name": "Order to Invoice",
|
|
81
|
+
"modules": ["Customers", "Orders", "Invoices"],
|
|
82
|
+
"steps": [
|
|
83
|
+
{ "module": "Orders", "action": "Create order", "permission": "business.sales.orders.create", "dataFlow": "Customer → Order" }
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
globalRiskAssessment: [
|
|
88
|
+
{
|
|
89
|
+
"risk": "Cross-module coupling complexity",
|
|
90
|
+
"category": "coupling|complexity|dependency-chain|security|scope",
|
|
91
|
+
"severity": "critical|high|medium|low",
|
|
92
|
+
"mitigation": "Event-driven communication instead of direct FK"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
semanticChecks: [
|
|
96
|
+
{ "check": "permission-orpheline", "status": "PASS|WARNING|ERROR", "details": "..." },
|
|
97
|
+
{ "check": "uc-sans-fr", "status": "PASS|WARNING|ERROR", "details": "..." },
|
|
98
|
+
{ "check": "wireframe-coverage", "status": "PASS|WARNING|ERROR", "details": "..." }
|
|
99
|
+
],
|
|
100
|
+
decision: {
|
|
101
|
+
"approved": true,
|
|
102
|
+
"reason": "All cross-module validations passed",
|
|
103
|
+
"approvedBy": "Client",
|
|
104
|
+
"approvedAt": "{ISO timestamp}"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
ba-writer.updateStatus({feature_id}, "consolidated")
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
> **STRUCTURE DIFFERENCES FROM OLD FORMAT:**
|
|
113
|
+
> - `crossModuleInteractions` is a FLAT ARRAY (not `{fkReferences, sharedEntities, events}` nested object)
|
|
114
|
+
> - `sharedEntities` is TOP-LEVEL (not nested inside crossModuleInteractions)
|
|
115
|
+
> - `decision` is an OBJECT with `approved`, `reason`, `approvedBy`, `approvedAt` (not `clientApproval` string)
|
|
116
|
+
> - `globalRiskAssessment` is an ARRAY of risk objects (not `{totalEntities: {value, threshold}}`)
|
|
117
|
+
|
|
118
|
+
Add changelog entry:
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"step": "step-04-consolidation",
|
|
122
|
+
"timestamp": "...",
|
|
123
|
+
"changes": [
|
|
124
|
+
"Cross-module interactions: X FK, Y events, Z shared entities",
|
|
125
|
+
"Permission coherence: validated ({count} paths, {conflicts} conflicts resolved)",
|
|
126
|
+
"E2E flows: {count} identified",
|
|
127
|
+
"Global risk: {level}",
|
|
128
|
+
"Client approval: APPROVED"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 10. Workflow State Save (for resume support)
|
|
134
|
+
|
|
135
|
+
After consolidation approval, update workflow state to enable resume if context is exhausted during handoff steps:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
ba-writer.enrichSection({
|
|
139
|
+
featureId: {feature_id},
|
|
140
|
+
section: "metadata.workflow",
|
|
141
|
+
data: {
|
|
142
|
+
lastCompletedStep: "step-04-consolidation",
|
|
143
|
+
readyForHandoff: true
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
> **Why:** Steps 05a-05b arrive late in the conversation when context may be near exhaustion.
|
|
149
|
+
> If BA is interrupted during handoff, the user can resume with `/business-analyse` which will
|
|
150
|
+
> detect `lastCompletedStep: "step-04-consolidation"` and resume directly at step-05a.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## SINGLE-MODULE MODE
|
|
155
|
+
|
|
156
|
+
When only 1 module:
|
|
157
|
+
1. Auto-approve (no cross-module concerns)
|
|
158
|
+
2. Write minimal consolidation section
|
|
159
|
+
3. Display: "Module unique - consolidation automatique ✓"
|
|
160
|
+
4. Proceed to step-05a-handoff.md
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## CONTEXT MANAGEMENT
|
|
165
|
+
|
|
166
|
+
| Loaded | Not Loaded |
|
|
167
|
+
|--------|------------|
|
|
168
|
+
| _shared.md | Full module feature.json files |
|
|
169
|
+
| consolidation data (from steps 04a-04b) | Questionnaires |
|
|
170
|
+
| Master feature.json | Templates |
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## SUCCESS CRITERIA
|
|
175
|
+
|
|
176
|
+
- Client approval obtained (or auto-approved for single module)
|
|
177
|
+
- Consolidation section written to master feature.json
|
|
178
|
+
- Status updated to "consolidated"
|
|
179
|
+
- Workflow state saved for resume support
|
|
180
|
+
- Ready to proceed to handoff phase
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## NEXT STEP
|
|
185
|
+
|
|
186
|
+
Load: `./step-05a-handoff.md`
|
|
@@ -57,6 +57,50 @@ Include:
|
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
+
### 1b. Cache Warming for Handoff & Deploy
|
|
61
|
+
|
|
62
|
+
> **Performance Optimization:** Pre-load handoff templates and references to reduce redundant reads during handoff generation.
|
|
63
|
+
> This step runs ONCE at start of step-05a, files retained through step-05b.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
// Pre-load handoff & deploy references (Bucket 5)
|
|
67
|
+
const handoffRefs = [
|
|
68
|
+
"~/.claude/skills/business-analyse/references/handoff-file-templates.md",
|
|
69
|
+
"~/.claude/skills/business-analyse/references/handoff-mappings.md",
|
|
70
|
+
"~/.claude/skills/business-analyse/references/deploy-data-build.md",
|
|
71
|
+
"~/.claude/skills/business-analyse/references/deploy-modes.md",
|
|
72
|
+
"~/.claude/skills/business-analyse/references/html-data-mapping.md"
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
for (const file of handoffRefs) {
|
|
76
|
+
read(file); // Pre-load into cache
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Pre-load HTML template (large file, loaded once)
|
|
80
|
+
read("~/.claude/skills/business-analyse/html/ba-interactive.html");
|
|
81
|
+
|
|
82
|
+
Display: "✓ Cache warmed: handoff templates (139KB, 6 files)"
|
|
83
|
+
Display: " Expected token savings: ~3,000 tokens (handoff refs read 2× → 1×)"
|
|
84
|
+
Display: " Retention: through step-05b (deploy)"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Rationale:**
|
|
88
|
+
|
|
89
|
+
- Handoff templates are read 2× during step-05a + step-05b (without caching)
|
|
90
|
+
- HTML template (85KB) is read once but benefits from explicit pre-load (faster deploy)
|
|
91
|
+
- Token savings: ~3,000 tokens for handoff process
|
|
92
|
+
- Cache retained until session end (needed for both handoff and deploy steps)
|
|
93
|
+
|
|
94
|
+
**Why NOT loaded at step-00:**
|
|
95
|
+
- Large files (139KB total), especially ba-interactive.html (85KB)
|
|
96
|
+
- Only used at END of workflow (steps 05a, 05b)
|
|
97
|
+
- Low re-use (1-2× each)
|
|
98
|
+
- Loading at step-05a is more efficient (just-in-time caching)
|
|
99
|
+
|
|
100
|
+
See [references/cache-warming-strategy.md](../references/cache-warming-strategy.md) § Bucket 5 for details.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
60
104
|
### 2. Implementation Strategy Choice (Multi-Module)
|
|
61
105
|
|
|
62
106
|
**IF** more than 1 module defined in feature.json:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: step-05b-deploy
|
|
3
3
|
description: Generate prd.json, deploy artifacts, interactive HTML
|
|
4
4
|
model: sonnet
|
|
5
|
-
next_step:
|
|
5
|
+
next_step: steps/step-05c-ralph-readiness.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
> **Context files:** _shared.md
|
|
@@ -305,6 +305,27 @@ After writing the HTML file, verify:
|
|
|
305
305
|
fi
|
|
306
306
|
```
|
|
307
307
|
|
|
308
|
+
5. **EMBEDDED_ARTIFACTS wireframes must use renamed fields** (`format`/`content`, NOT `mockupFormat`/`mockup`)
|
|
309
|
+
```bash
|
|
310
|
+
# Check that wireframe field rename was applied (mockup → content, mockupFormat → format)
|
|
311
|
+
if grep -q '"mockupFormat"' "{output_path}/ba-interactive.html"; then
|
|
312
|
+
BLOCKING_ERROR("EMBEDDED_ARTIFACTS wireframes still use 'mockupFormat' — must rename to 'format'")
|
|
313
|
+
BLOCKING_ERROR("See references/html-data-mapping.md for correct field mapping")
|
|
314
|
+
fi
|
|
315
|
+
if grep -q '"mockup":' "{output_path}/ba-interactive.html" | grep -v '"mockupNotes"'; then
|
|
316
|
+
# Note: "mockup" in EMBEDDED_ARTIFACTS = wrong, must be "content"
|
|
317
|
+
BLOCKING_ERROR("EMBEDDED_ARTIFACTS wireframes still use 'mockup' — must rename to 'content'")
|
|
318
|
+
fi
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
6. **EMBEDDED_ARTIFACTS wireframes must exist for ALL modules** (not empty `{}`)
|
|
322
|
+
```bash
|
|
323
|
+
# Each module should have at least one wireframe with "format" and "content"
|
|
324
|
+
if ! grep -q '"format"' "{output_path}/ba-interactive.html"; then
|
|
325
|
+
BLOCKING_ERROR("No wireframe 'format' field found — EMBEDDED_ARTIFACTS wireframes not populated")
|
|
326
|
+
fi
|
|
327
|
+
```
|
|
328
|
+
|
|
308
329
|
**IF ANY CHECK FAILS → DO NOT PROCEED. Fix the data mapping and regenerate.**
|
|
309
330
|
|
|
310
331
|
---
|
|
@@ -339,7 +360,12 @@ Effort: {total_days} days ({total_hours} hours)
|
|
|
339
360
|
1. Ouvrir ba-interactive.html dans le navigateur
|
|
340
361
|
2. Partager avec les stakeholders pour validation
|
|
341
362
|
3. Si retours --> relancer /business-analyse pour une nouvelle itération
|
|
342
|
-
4.
|
|
363
|
+
4. Validation de la compatibilité ralph-loop (recommandé):
|
|
364
|
+
|
|
365
|
+
Continuez à step-05c-ralph-readiness.md pour valider
|
|
366
|
+
la complétude et l'intégrité avant développement
|
|
367
|
+
|
|
368
|
+
5. Une fois validé, lancer le développement:
|
|
343
369
|
|
|
344
370
|
/ralph-loop -r
|
|
345
371
|
|
|
@@ -348,6 +374,20 @@ Effort: {total_days} days ({total_hours} hours)
|
|
|
348
374
|
|
|
349
375
|
---
|
|
350
376
|
|
|
377
|
+
## NEXT STEP
|
|
378
|
+
|
|
379
|
+
**RECOMMENDED:** Load `steps/step-05c-ralph-readiness.md` to run validation gate before /ralph-loop.
|
|
380
|
+
|
|
381
|
+
This validation ensures:
|
|
382
|
+
- All module handoffs are complete
|
|
383
|
+
- PRD files are structurally valid
|
|
384
|
+
- Cross-module references are resolvable
|
|
385
|
+
- No blocking issues before development
|
|
386
|
+
|
|
387
|
+
User can skip validation and proceed directly to /ralph-loop, but validation is strongly recommended to catch issues early.
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
351
391
|
## MODE SUPPORT & TROUBLESHOOTING
|
|
352
392
|
|
|
353
393
|
See [references/deploy-modes.md](../references/deploy-modes.md) for:
|