@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
|
@@ -46,7 +46,7 @@ Validate the module specification for completeness and consistency, write to fea
|
|
|
46
46
|
| validations | 1 | PASS/FAIL |
|
|
47
47
|
| messages | 4 | PASS/FAIL |
|
|
48
48
|
| lifeCycles | 1 (if entity has status) | PASS/FAIL |
|
|
49
|
-
| seedDataCore |
|
|
49
|
+
| seedDataCore | 7 sections present | PASS/FAIL (BLOCKING) |
|
|
50
50
|
|
|
51
51
|
#### 9b. Consistency Checks
|
|
52
52
|
|
|
@@ -98,7 +98,7 @@ ba-writer.enrichSection({
|
|
|
98
98
|
{ "section": "useCases", "count": {count}, "minimum": 2, "status": "PASS|FAIL" },
|
|
99
99
|
{ "section": "functionalRequirements", "count": {count}, "minimum": 4, "status": "PASS|FAIL" },
|
|
100
100
|
{ "section": "wireframes", "count": {count}, "minimum": {section_count}, "status": "PASS|FAIL" },
|
|
101
|
-
{ "section": "seedDataCore", "count":
|
|
101
|
+
{ "section": "seedDataCore", "count": 7, "minimum": 7, "status": "PASS|FAIL" }
|
|
102
102
|
],
|
|
103
103
|
consistencyChecks: [
|
|
104
104
|
{ "check": "UC-FR linkage", "passed": {n}, "warnings": {n}, "errors": {n}, "status": "PASS|FAIL" },
|
|
@@ -126,6 +126,39 @@ ba-writer.enrichSection({
|
|
|
126
126
|
})
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
#### 9f. Module Specification Checklist (BLOCKING)
|
|
130
|
+
|
|
131
|
+
> **CRITICAL:** This checklist MUST be FULLY COMPLETED before marking module status = "specified".
|
|
132
|
+
|
|
133
|
+
**Execute the comprehensive validation checklist:**
|
|
134
|
+
|
|
135
|
+
Run the 25-check validation process across 10 categories:
|
|
136
|
+
- Data Model (3 checks) | Business Rules (3 checks) | Use Cases & FRs (4 checks)
|
|
137
|
+
- Permissions (3 checks) | UI & Navigation (3 checks) | I18N & Messages (3 checks)
|
|
138
|
+
- Seed Data (2 checks) | API Endpoints (2 checks) | Validations (1 check) | Gherkin (1 check)
|
|
139
|
+
|
|
140
|
+
```javascript
|
|
141
|
+
const blockingFailures = checks.filter(c => c.blocking && c.status === "FAIL");
|
|
142
|
+
|
|
143
|
+
IF blockingFailures.length > 0:
|
|
144
|
+
// CONDITIONAL LOAD: Only load detailed checklist on validation failure
|
|
145
|
+
Read references/validation-checklist.md
|
|
146
|
+
Display:
|
|
147
|
+
- Full validation logic for FAILED checks
|
|
148
|
+
- Exact requirements (minimums, patterns, formats)
|
|
149
|
+
- Fix recommendations for each failure
|
|
150
|
+
|
|
151
|
+
BLOCKING ERROR: Module specification incomplete
|
|
152
|
+
→ Fix all failures before proceeding
|
|
153
|
+
|
|
154
|
+
ELSE:
|
|
155
|
+
All blocking checks passed ✓
|
|
156
|
+
Display: "{warnings_count} warnings (non-blocking)"
|
|
157
|
+
→ Proceed to mark module as "specified"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Optimization:** The detailed 280-line validation-checklist.md is loaded **only when validation fails** (saves ~10,000 tokens on success path).
|
|
161
|
+
|
|
129
162
|
---
|
|
130
163
|
|
|
131
164
|
### 10. Module Summary with Roles & Permissions
|
|
@@ -201,7 +234,7 @@ ba-writer.enrichSection({
|
|
|
201
234
|
functionalRequirements: [{id, statement, priority, linkedRules, linkedUseCases, acceptanceCriteria}], // 8c
|
|
202
235
|
permissionMatrix: {permissions: [], roleAssignments: []}, // 8d
|
|
203
236
|
navigation: {entries: []}, // 8e
|
|
204
|
-
seedDataCore: {navigationModules, navigationTranslations, permissions, rolePermissions, permissionConstants}, // 8f
|
|
237
|
+
seedDataCore: {navigationModules, navigationSections, navigationResources, navigationTranslations, permissions, rolePermissions, permissionConstants}, // 8f (7 arrays)
|
|
205
238
|
gherkinScenarios: [{feature, scenarios: [{name, tags, given, when, then}]}], // 8g
|
|
206
239
|
validations: [{entity, field, rules, errorMessageKey}], // 8h
|
|
207
240
|
messages: [{code, type, title, message, i18nKey}], // 8i
|
|
@@ -1,462 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-04-consolidation
|
|
3
|
-
description: Cross-module consolidation -
|
|
3
|
+
description: Cross-module consolidation - REDIRECTS to step-04a (refactored into 3 sub-steps)
|
|
4
4
|
model: opus
|
|
5
|
-
next_step: steps/step-
|
|
5
|
+
next_step: steps/step-04a-collect.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
> **
|
|
8
|
+
> **NOTICE:** This step has been refactored into 3 sub-steps for better context management.
|
|
9
9
|
|
|
10
|
-
# Step 4: Consolidation
|
|
10
|
+
# Step 4: Consolidation (Entry Point)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- ALWAYS load summaries of ALL completed modules
|
|
14
|
-
- NEVER duplicate module content - work with summaries only
|
|
15
|
-
- ALWAYS validate permission coherence across modules
|
|
16
|
-
- This step auto-validates for single-module (trivial consolidation)
|
|
17
|
-
- Final client approval is BLOCKING before handoff
|
|
12
|
+
This step has been divided into 3 focused sub-steps:
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
1. **step-04a-collect.md** - Collect module summaries and cross-module interactions
|
|
15
|
+
2. **step-04b-analyze.md** - Analyze permissions, validation, E2E flows, and risks
|
|
16
|
+
3. **step-04c-decide.md** - Obtain final approval and write consolidation
|
|
21
17
|
|
|
22
18
|
---
|
|
23
19
|
|
|
24
|
-
##
|
|
20
|
+
## Automatic Redirect
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
**Loading:** `./step-04a-collect.md`
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
→ For each module: code, entities[], key BRs, permissions[], dependencies
|
|
31
|
-
→ Max 100 lines per module summary
|
|
32
|
-
|
|
33
|
-
ba-reader.readApplicationContext({feature_id})
|
|
34
|
-
→ cadrage.applicationRoles, modules[], dependencyGraph
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
IF status already "consolidated":
|
|
38
|
-
Display: "Consolidation already completed. Loading next step."
|
|
39
|
-
Load: steps/step-05a-handoff.md
|
|
40
|
-
STOP
|
|
41
|
-
|
|
42
|
-
### 2. Cross-Module Interactions
|
|
43
|
-
|
|
44
|
-
**2a. Foreign Key References**
|
|
45
|
-
|
|
46
|
-
For each dependency edge in dependencyGraph:
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"from": "Orders",
|
|
50
|
-
"to": "Customers",
|
|
51
|
-
"type": "FK",
|
|
52
|
-
"references": [
|
|
53
|
-
{
|
|
54
|
-
"sourceEntity": "Order",
|
|
55
|
-
"sourceField": "CustomerId",
|
|
56
|
-
"targetEntity": "Customer",
|
|
57
|
-
"targetField": "Id",
|
|
58
|
-
"cardinality": "N:1",
|
|
59
|
-
"cascadeDelete": false,
|
|
60
|
-
"required": true
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Verify each FK reference exists in the corresponding module's entities.
|
|
67
|
-
IF missing → WARNING + ask user to confirm or add.
|
|
68
|
-
|
|
69
|
-
**2b. Shared Entities**
|
|
70
|
-
|
|
71
|
-
Detect entities referenced by multiple modules:
|
|
72
|
-
```json
|
|
73
|
-
{
|
|
74
|
-
"sharedEntities": [
|
|
75
|
-
{
|
|
76
|
-
"entity": "Customer",
|
|
77
|
-
"definedIn": "Customers",
|
|
78
|
-
"referencedBy": ["Orders", "Invoices"],
|
|
79
|
-
"referenceType": "FK"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**2c. Event-Based Interactions**
|
|
86
|
-
|
|
87
|
-
Identify event flows between modules:
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"events": [
|
|
91
|
-
{
|
|
92
|
-
"producer": "Orders",
|
|
93
|
-
"event": "OrderApproved",
|
|
94
|
-
"consumers": ["Invoices"],
|
|
95
|
-
"description": "When an order is approved, an invoice is auto-generated"
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**2d. Shared Reference Data**
|
|
102
|
-
|
|
103
|
-
Identify shared lookup/reference tables:
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"sharedReferenceData": [
|
|
107
|
-
{
|
|
108
|
-
"table": "Currency",
|
|
109
|
-
"usedBy": ["Orders", "Invoices"],
|
|
110
|
-
"owner": "shared"
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 3. Permission Coherence
|
|
117
|
-
|
|
118
|
-
> **All modules MUST use the same application-level roles.**
|
|
119
|
-
|
|
120
|
-
**3a. Role Consistency**
|
|
121
|
-
|
|
122
|
-
Verify all modules use the applicationRoles defined in cadrage:
|
|
123
|
-
```
|
|
124
|
-
FOR each module in completedModules:
|
|
125
|
-
FOR each role in module.specification.permissionMatrix.roles:
|
|
126
|
-
IF role NOT IN cadrage.applicationRoles → ERROR
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**3b. Permission Path Format**
|
|
130
|
-
|
|
131
|
-
Verify all permission paths follow the pattern:
|
|
132
|
-
`business.{app}.{module}.{resource}.{action}`
|
|
133
|
-
|
|
134
|
-
Check for:
|
|
135
|
-
- Inconsistent app prefix → ERROR
|
|
136
|
-
- Missing module segment → ERROR
|
|
137
|
-
- Shortcut paths (not full format) → ERROR
|
|
138
|
-
|
|
139
|
-
**3c. Role Hierarchy Coherence**
|
|
140
|
-
|
|
141
|
-
Verify the role hierarchy is respected across all modules:
|
|
142
|
-
```
|
|
143
|
-
Admin ⊃ Manager ⊃ Contributor ⊃ Viewer
|
|
144
|
-
|
|
145
|
-
FOR each module:
|
|
146
|
-
IF Admin has fewer permissions than Manager → ERROR
|
|
147
|
-
IF Manager has fewer permissions than Contributor → ERROR
|
|
148
|
-
IF Contributor has fewer permissions than Viewer → ERROR
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**3d. Permission Conflicts**
|
|
152
|
-
|
|
153
|
-
Detect conflicting permission assignments:
|
|
154
|
-
```json
|
|
155
|
-
{
|
|
156
|
-
"conflicts": [
|
|
157
|
-
{
|
|
158
|
-
"role": "Manager",
|
|
159
|
-
"module1": "Orders",
|
|
160
|
-
"permission1": "business.sales.orders.approve",
|
|
161
|
-
"module2": "Invoices",
|
|
162
|
-
"permission2": "business.sales.invoices.approve",
|
|
163
|
-
"issue": "Manager can approve orders but not invoices - is this intentional?"
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Present conflicts to user via AskUserQuestion:
|
|
170
|
-
```
|
|
171
|
-
question: "Le Manager peut approuver les commandes mais pas les factures. Est-ce intentionnel ?"
|
|
172
|
-
header: "Permissions"
|
|
173
|
-
options:
|
|
174
|
-
- label: "Oui, intentionnel"
|
|
175
|
-
description: "Les factures nécessitent un niveau d'approbation supérieur"
|
|
176
|
-
- label: "Non, corriger"
|
|
177
|
-
description: "Le Manager devrait aussi pouvoir approuver les factures"
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### 4. Semantic Validation (MANDATORY)
|
|
181
|
-
|
|
182
|
-
For EACH module feature.json, execute these checks:
|
|
183
|
-
|
|
184
|
-
| # | Check | Rule | Severity |
|
|
185
|
-
|---|-------|------|----------|
|
|
186
|
-
| 1 | Permission orpheline | Every permissionMatrix.permissions[].path is used by at least one useCases[].permission | WARNING |
|
|
187
|
-
| 2 | UC sans FR | Every useCases[].id is referenced by at least one functionalRequirements[].linkedUseCases[] | WARNING |
|
|
188
|
-
| 3 | Entity sans endpoint | Every entities[].name has at least one endpoint in apiEndpoints[] | WARNING |
|
|
189
|
-
| 4 | UC sans scenario | Every useCases[].mainScenario has at least 2 steps | WARNING |
|
|
190
|
-
| 5 | Role sans permissions | Every applicationRole has at least one entry in roleAssignments[] | WARNING |
|
|
191
|
-
| 6 | Navigation sans traduction | Every navigation.entries[].code has translations in 4 languages in seedDataCore.navigationTranslations[] | ERROR |
|
|
192
|
-
| 7 | LifeCycle terminal | Every lifeCycles[].states[] has at least one state with isTerminal: true | WARNING |
|
|
193
|
-
| 8 | Schema conformity | No custom fields outside defined schema (no KPIDefinitions, ChartConfigurations, etc.) | ERROR |
|
|
194
|
-
| 9 | Wireframe coverage | Every navigation section has a corresponding uiWireframes[].screen | ERROR |
|
|
195
|
-
| 10 | Doublon entity | No entity with same name in two different modules (unless shared via dependencyGraph) | ERROR |
|
|
196
|
-
|
|
197
|
-
Store results in consolidation.semanticChecks[]:
|
|
198
|
-
```json
|
|
199
|
-
{
|
|
200
|
-
"check": "permission-orpheline",
|
|
201
|
-
"module": "RepairManagement",
|
|
202
|
-
"status": "PASS|WARNING|ERROR",
|
|
203
|
-
"details": "Permission business.freebike.repairmanagement.export not referenced by any UC",
|
|
204
|
-
"autoFixed": false
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Blocking rule:**
|
|
209
|
-
- 0 ERROR → PASS
|
|
210
|
-
- ≥1 ERROR → BLOCK (fix before handoff, ask user for each)
|
|
211
|
-
- WARNING only → PASS with user notification
|
|
212
|
-
|
|
213
|
-
### 4-bis. Structural Schema Conformity Check (MANDATORY)
|
|
214
|
-
|
|
215
|
-
> **Post-generation validation.** After semantic checks, verify ALL module feature.json files conform to JSON schema.
|
|
216
|
-
|
|
217
|
-
See [references/consolidation-structural-checks.md](../references/consolidation-structural-checks.md) for the full 6-category structural check:
|
|
218
|
-
- **A.** Required Sections Presence (18 sections)
|
|
219
|
-
- **B.** Field Name Conformity (forbidden vs correct fields)
|
|
220
|
-
- **C.** ID Pattern Conformity (BR, UC, FR, Permissions)
|
|
221
|
-
- **D.** Cross-Module ID Uniqueness
|
|
222
|
-
- **E.** Wireframe Layout Completeness
|
|
223
|
-
- **F.** SeedDataCore Translation Coverage
|
|
224
|
-
|
|
225
|
-
**Blocking rule:** 0 ERROR → PASS. ≥1 ERROR → BLOCK (attempt auto-fix, re-write, re-check).
|
|
226
|
-
|
|
227
|
-
### 5. End-to-End Flows
|
|
228
|
-
|
|
229
|
-
Identify business processes that span multiple modules:
|
|
230
|
-
|
|
231
|
-
```json
|
|
232
|
-
{
|
|
233
|
-
"e2eFlows": [
|
|
234
|
-
{
|
|
235
|
-
"name": "Order to Invoice",
|
|
236
|
-
"steps": [
|
|
237
|
-
{ "module": "Customers", "action": "Customer exists", "permission": "customers.read" },
|
|
238
|
-
{ "module": "Products", "action": "Products selected", "permission": "products.read" },
|
|
239
|
-
{ "module": "Orders", "action": "Order created", "permission": "orders.create" },
|
|
240
|
-
{ "module": "Orders", "action": "Order approved", "permission": "orders.approve" },
|
|
241
|
-
{ "module": "Invoices", "action": "Invoice generated", "permission": "invoices.create" },
|
|
242
|
-
{ "module": "Invoices", "action": "Invoice sent", "permission": "invoices.update" }
|
|
243
|
-
],
|
|
244
|
-
"actors": ["Contributor (create)", "Manager (approve)"],
|
|
245
|
-
"data": "Customer → Order → OrderLines (Products) → Invoice → InvoiceLines"
|
|
246
|
-
}
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Display each E2E flow as a diagram:
|
|
252
|
-
```
|
|
253
|
-
Customer ──[read]──→ Order ──[create]──→ Order ──[approve]──→ Invoice ──[create]──→ Invoice ──[send]──→
|
|
254
|
-
(Customers) (Orders) (Orders) (Invoices) (Invoices)
|
|
255
|
-
Contributor Contributor Manager System Manager
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### 6. Global Risk Assessment
|
|
259
|
-
|
|
260
|
-
Evaluate application-level risks:
|
|
261
|
-
|
|
262
|
-
| Risk | Metric | Threshold | Status |
|
|
263
|
-
|------|--------|-----------|--------|
|
|
264
|
-
| Total entities | {sum across modules} | ≤20 | PASS/WARNING |
|
|
265
|
-
| Total BRs | {sum across modules} | ≤50 | PASS/WARNING |
|
|
266
|
-
| Cross-module dependencies | {edge count} | ≤10 | PASS/WARNING |
|
|
267
|
-
| Shared entities | {count} | ≤5 | PASS/WARNING |
|
|
268
|
-
| E2E flow length | {max steps} | ≤8 | PASS/WARNING |
|
|
269
|
-
| Permission paths | {total} | ≤100 | PASS/WARNING |
|
|
270
|
-
|
|
271
|
-
### 7. Consolidation Summary
|
|
272
|
-
|
|
273
|
-
Display comprehensive summary:
|
|
274
|
-
```
|
|
275
|
-
═══════════════════════════════════════════════════════════
|
|
276
|
-
CONSOLIDATION - {application_name}
|
|
277
|
-
═══════════════════════════════════════════════════════════
|
|
278
|
-
|
|
279
|
-
### Modules ({count})
|
|
280
|
-
| Module | Entités | BRs | UCs | Complexité |
|
|
281
|
-
|--------|---------|-----|-----|------------|
|
|
282
|
-
{for each module}
|
|
283
|
-
|
|
284
|
-
### Interactions Cross-Module
|
|
285
|
-
- FK References: {count}
|
|
286
|
-
- Shared Entities: {count}
|
|
287
|
-
- Events: {count}
|
|
288
|
-
- Shared Data: {count}
|
|
289
|
-
|
|
290
|
-
### Permissions
|
|
291
|
-
- Roles: {count} (coherent: ✓/✗)
|
|
292
|
-
- Total paths: {count}
|
|
293
|
-
- Conflicts resolved: {count}
|
|
294
|
-
|
|
295
|
-
### E2E Flows
|
|
296
|
-
{for each flow: name, modules involved, actors}
|
|
297
|
-
|
|
298
|
-
### Risques Globaux
|
|
299
|
-
{risk assessment table}
|
|
300
|
-
|
|
301
|
-
═══════════════════════════════════════════════════════════
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### 8. Final Client Approval (BLOCKING)
|
|
305
|
-
|
|
306
|
-
Ask via AskUserQuestion:
|
|
307
|
-
```
|
|
308
|
-
question: "La spécification complète de l'application est prête. Validez-vous l'ensemble ?"
|
|
309
|
-
header: "Approbation"
|
|
310
|
-
options:
|
|
311
|
-
- label: "Approuvé"
|
|
312
|
-
description: "Passer au handoff pour la phase d'implémentation"
|
|
313
|
-
- label: "Réviser un module"
|
|
314
|
-
description: "Retourner à la spécification d'un module spécifique"
|
|
315
|
-
- label: "Modifier les interactions"
|
|
316
|
-
description: "Ajuster les interactions cross-module"
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
IF "Réviser un module":
|
|
320
|
-
Ask which module → set currentModuleIndex to that module → load step-03a-data.md
|
|
321
|
-
|
|
322
|
-
IF "Modifier les interactions":
|
|
323
|
-
Re-enter section 2-4 of this step
|
|
324
|
-
|
|
325
|
-
### 9. Write Consolidation
|
|
326
|
-
|
|
327
|
-
> **STRUCTURE CARD: consolidation** — Must match `application-schema.json`. Follow this structure exactly.
|
|
328
|
-
|
|
329
|
-
```
|
|
330
|
-
ba-writer.enrichSection({
|
|
331
|
-
featureId: {feature_id},
|
|
332
|
-
section: "consolidation",
|
|
333
|
-
data: {
|
|
334
|
-
crossModuleInteractions: [
|
|
335
|
-
{
|
|
336
|
-
"fromModule": "Orders",
|
|
337
|
-
"toModule": "Customers",
|
|
338
|
-
"interactionType": "FK-reference|event-publish|event-subscribe|shared-lookup|cascade-delete|cascade-update",
|
|
339
|
-
"description": "Order references customer via FK",
|
|
340
|
-
"entities": ["Order→Customer"]
|
|
341
|
-
}
|
|
342
|
-
],
|
|
343
|
-
sharedEntities: [
|
|
344
|
-
{
|
|
345
|
-
"entity": "Customer",
|
|
346
|
-
"ownerModule": "Customers",
|
|
347
|
-
"referencedBy": ["Orders", "Invoices"],
|
|
348
|
-
"sharedFields": ["code", "name"]
|
|
349
|
-
}
|
|
350
|
-
],
|
|
351
|
-
permissionCoherence: {
|
|
352
|
-
"rolesConsistent": true,
|
|
353
|
-
"pathFormatConsistent": true,
|
|
354
|
-
"hierarchyRespected": true,
|
|
355
|
-
"conflicts": [],
|
|
356
|
-
"warnings": []
|
|
357
|
-
},
|
|
358
|
-
e2eFlows: [
|
|
359
|
-
{
|
|
360
|
-
"name": "Order to Invoice",
|
|
361
|
-
"modules": ["Customers", "Orders", "Invoices"],
|
|
362
|
-
"steps": [
|
|
363
|
-
{ "module": "Orders", "action": "Create order", "permission": "business.sales.orders.create", "dataFlow": "Customer → Order" }
|
|
364
|
-
]
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
globalRiskAssessment: [
|
|
368
|
-
{
|
|
369
|
-
"risk": "Cross-module coupling complexity",
|
|
370
|
-
"category": "coupling|complexity|dependency-chain|security|scope",
|
|
371
|
-
"severity": "critical|high|medium|low",
|
|
372
|
-
"mitigation": "Event-driven communication instead of direct FK"
|
|
373
|
-
}
|
|
374
|
-
],
|
|
375
|
-
semanticChecks: [
|
|
376
|
-
{ "check": "permission-orpheline", "status": "PASS|WARNING|ERROR", "details": "..." },
|
|
377
|
-
{ "check": "uc-sans-fr", "status": "PASS|WARNING|ERROR", "details": "..." },
|
|
378
|
-
{ "check": "wireframe-coverage", "status": "PASS|WARNING|ERROR", "details": "..." }
|
|
379
|
-
],
|
|
380
|
-
decision: {
|
|
381
|
-
"approved": true,
|
|
382
|
-
"reason": "All cross-module validations passed",
|
|
383
|
-
"approvedBy": "Client",
|
|
384
|
-
"approvedAt": "{ISO timestamp}"
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
})
|
|
388
|
-
|
|
389
|
-
ba-writer.updateStatus({feature_id}, "consolidated")
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
> **STRUCTURE DIFFERENCES FROM OLD FORMAT:**
|
|
393
|
-
> - `crossModuleInteractions` is a FLAT ARRAY (not `{fkReferences, sharedEntities, events}` nested object)
|
|
394
|
-
> - `sharedEntities` is TOP-LEVEL (not nested inside crossModuleInteractions)
|
|
395
|
-
> - `decision` is an OBJECT with `approved`, `reason`, `approvedBy`, `approvedAt` (not `clientApproval` string)
|
|
396
|
-
> - `globalRiskAssessment` is an ARRAY of risk objects (not `{totalEntities: {value, threshold}}`)
|
|
397
|
-
|
|
398
|
-
Add changelog entry:
|
|
399
|
-
```json
|
|
400
|
-
{
|
|
401
|
-
"step": "step-04-consolidation",
|
|
402
|
-
"timestamp": "...",
|
|
403
|
-
"changes": [
|
|
404
|
-
"Cross-module interactions: X FK, Y events, Z shared entities",
|
|
405
|
-
"Permission coherence: validated ({count} paths, {conflicts} conflicts resolved)",
|
|
406
|
-
"E2E flows: {count} identified",
|
|
407
|
-
"Global risk: {level}",
|
|
408
|
-
"Client approval: APPROVED"
|
|
409
|
-
]
|
|
410
|
-
}
|
|
411
|
-
```
|
|
24
|
+
The consolidation process will execute in sequence:
|
|
25
|
+
- step-04a-collect → step-04b-analyze → step-04c-decide → step-05a-handoff
|
|
412
26
|
|
|
413
27
|
---
|
|
414
28
|
|
|
415
|
-
##
|
|
29
|
+
## Why Refactored?
|
|
416
30
|
|
|
417
|
-
|
|
418
|
-
1. Skip cross-module interactions (no other modules)
|
|
419
|
-
2. Skip permission coherence check (only one module)
|
|
420
|
-
3. Skip E2E flows (single module)
|
|
421
|
-
4. Auto-approve (no cross-module concerns)
|
|
422
|
-
5. Write minimal consolidation section
|
|
423
|
-
6. Display: "Module unique - consolidation automatique ✓"
|
|
424
|
-
7. Proceed to step-05a-handoff.md
|
|
31
|
+
**Before:** 628 lines in single file (exceeded 400-line recommendation)
|
|
425
32
|
|
|
426
|
-
|
|
33
|
+
**After:** 3 focused files (~200-280 lines each)
|
|
427
34
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
| Module summaries (100 lines each) | Questionnaires |
|
|
434
|
-
| Master feature.json | Templates |
|
|
435
|
-
| cadrage section | React viewer files |
|
|
436
|
-
|
|
437
|
-
---
|
|
438
|
-
|
|
439
|
-
## WORKFLOW STATE SAVE (for resume support)
|
|
440
|
-
|
|
441
|
-
After consolidation approval, update workflow state to enable resume if context is exhausted during handoff steps:
|
|
442
|
-
|
|
443
|
-
```
|
|
444
|
-
ba-writer.enrichSection({
|
|
445
|
-
featureId: {feature_id},
|
|
446
|
-
section: "metadata.workflow",
|
|
447
|
-
data: {
|
|
448
|
-
lastCompletedStep: "step-04-consolidation",
|
|
449
|
-
readyForHandoff: true
|
|
450
|
-
}
|
|
451
|
-
})
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
> **Why:** Steps 05a-05b arrive late in the conversation when context may be near exhaustion.
|
|
455
|
-
> If BA is interrupted during handoff, the user can resume with `/business-analyse` which will
|
|
456
|
-
> detect `lastCompletedStep: "step-04-consolidation"` and resume directly at step-05a.
|
|
35
|
+
**Benefits:**
|
|
36
|
+
- Better context management
|
|
37
|
+
- Clearer separation of concerns (collect → analyze → decide)
|
|
38
|
+
- Easier to resume from specific consolidation phase
|
|
39
|
+
- Reduced cognitive load per step
|
|
457
40
|
|
|
458
41
|
---
|
|
459
42
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
Load: `./step-05a-handoff.md`
|
|
43
|
+
**Proceeding to step-04a-collect.md...**
|