@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,304 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-04a-collect
|
|
3
|
+
description: Collect module summaries and cross-module interactions
|
|
4
|
+
model: opus
|
|
5
|
+
next_step: steps/step-04b-analyze.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
> **Context files:** `_shared.md` | `_suggestions.md`
|
|
9
|
+
|
|
10
|
+
# Step 4a: Collect - Module Summaries & Cross-Module Interactions
|
|
11
|
+
|
|
12
|
+
## MANDATORY EXECUTION RULES
|
|
13
|
+
- ALWAYS load summaries of ALL completed modules
|
|
14
|
+
- NEVER duplicate module content - work with summaries only
|
|
15
|
+
- This step auto-validates for single-module (trivial consolidation)
|
|
16
|
+
|
|
17
|
+
## YOUR TASK
|
|
18
|
+
Collect module summaries and identify all cross-module interactions (FK references, shared entities, events, shared data).
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## EXECUTION SEQUENCE
|
|
23
|
+
|
|
24
|
+
### 1. Read Module Summaries
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
ba-reader.getCompletedModulesSummary({feature_id})
|
|
28
|
+
→ For each module: code, entities[], key BRs, permissions[], dependencies
|
|
29
|
+
→ Max 100 lines per module summary
|
|
30
|
+
|
|
31
|
+
ba-reader.readApplicationContext({feature_id})
|
|
32
|
+
→ cadrage.applicationRoles, modules[], dependencyGraph
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
IF status already "consolidated":
|
|
36
|
+
Display: "Consolidation already completed. Loading step-05a-handoff."
|
|
37
|
+
Load: steps/step-05a-handoff.md
|
|
38
|
+
STOP
|
|
39
|
+
|
|
40
|
+
### 2. Cross-Module Interactions
|
|
41
|
+
|
|
42
|
+
**2a. Foreign Key References**
|
|
43
|
+
|
|
44
|
+
For each dependency edge in dependencyGraph:
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"from": "Orders",
|
|
48
|
+
"to": "Customers",
|
|
49
|
+
"type": "FK",
|
|
50
|
+
"references": [
|
|
51
|
+
{
|
|
52
|
+
"sourceEntity": "Order",
|
|
53
|
+
"sourceField": "CustomerId",
|
|
54
|
+
"targetEntity": "Customer",
|
|
55
|
+
"targetField": "Id",
|
|
56
|
+
"cardinality": "N:1",
|
|
57
|
+
"cascadeDelete": false,
|
|
58
|
+
"required": true
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Verify each FK reference exists in the corresponding module's entities.
|
|
65
|
+
IF missing → WARNING + ask user to confirm or add.
|
|
66
|
+
|
|
67
|
+
**2b. Shared Entities**
|
|
68
|
+
|
|
69
|
+
Detect entities referenced by multiple modules:
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"sharedEntities": [
|
|
73
|
+
{
|
|
74
|
+
"entity": "Customer",
|
|
75
|
+
"definedIn": "Customers",
|
|
76
|
+
"referencedBy": ["Orders", "Invoices"],
|
|
77
|
+
"referenceType": "FK"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**2c. Event-Based Interactions**
|
|
84
|
+
|
|
85
|
+
Identify event flows between modules:
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"events": [
|
|
89
|
+
{
|
|
90
|
+
"producer": "Orders",
|
|
91
|
+
"event": "OrderApproved",
|
|
92
|
+
"consumers": ["Invoices"],
|
|
93
|
+
"description": "When an order is approved, an invoice is auto-generated"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**2d. Shared Reference Data**
|
|
100
|
+
|
|
101
|
+
Identify shared lookup/reference tables:
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"sharedReferenceData": [
|
|
105
|
+
{
|
|
106
|
+
"table": "Currency",
|
|
107
|
+
"usedBy": ["Orders", "Invoices"],
|
|
108
|
+
"owner": "shared"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**2e. Cross-Module Reference Validation (ENHANCED)**
|
|
115
|
+
|
|
116
|
+
> **CRITICAL:** Verify ALL cross-module entity references are resolvable.
|
|
117
|
+
> **Purpose:** Prevent broken FK references and runtime errors in ralph-loop.
|
|
118
|
+
|
|
119
|
+
**Process:**
|
|
120
|
+
|
|
121
|
+
1. **Build Entity Registry:**
|
|
122
|
+
```javascript
|
|
123
|
+
const entityRegistry = {};
|
|
124
|
+
for (const module of completedModules) {
|
|
125
|
+
entityRegistry[module.code] = {
|
|
126
|
+
entities: module.analysis.entities.map(e => ({
|
|
127
|
+
name: e.name,
|
|
128
|
+
attributes: e.attributes.map(a => a.name),
|
|
129
|
+
pk: e.attributes.find(a => a.name === "Id" || a.unique)?.name || "Id"
|
|
130
|
+
}))
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
2. **Extract Cross-Module References:**
|
|
136
|
+
|
|
137
|
+
For EACH module, scan all entity relationships:
|
|
138
|
+
```javascript
|
|
139
|
+
for (const entity of module.analysis.entities) {
|
|
140
|
+
for (const rel of entity.relationships) {
|
|
141
|
+
// Detect cross-module reference
|
|
142
|
+
if (rel.target.includes(".")) {
|
|
143
|
+
// Format: "ModuleName.EntityName.FieldName" or "ModuleName.EntityName"
|
|
144
|
+
const [targetModule, targetEntity, targetField] = rel.target.split(".");
|
|
145
|
+
|
|
146
|
+
// Validate: target module exists
|
|
147
|
+
if (!entityRegistry[targetModule]) {
|
|
148
|
+
BLOCKING_ERROR(`Module ${module.code}: Entity ${entity.name} references non-existent module "${targetModule}"`);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Validate: target entity exists in target module
|
|
152
|
+
const targetModuleEntities = entityRegistry[targetModule].entities;
|
|
153
|
+
const resolvedEntity = targetModuleEntities.find(e => e.name === targetEntity);
|
|
154
|
+
if (!resolvedEntity) {
|
|
155
|
+
BLOCKING_ERROR(`Module ${module.code}: Entity ${entity.name} references non-existent entity "${targetEntity}" in module "${targetModule}"`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Validate: target field exists (if specified)
|
|
159
|
+
if (targetField && !resolvedEntity.attributes.includes(targetField)) {
|
|
160
|
+
BLOCKING_ERROR(`Module ${module.code}: Entity ${entity.name} references non-existent field "${targetField}" on "${targetModule}.${targetEntity}"`);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Record valid reference
|
|
164
|
+
crossModuleReferences.push({
|
|
165
|
+
sourceModule: module.code,
|
|
166
|
+
sourceEntity: entity.name,
|
|
167
|
+
sourceField: rel.sourceField || `${targetEntity}Id`,
|
|
168
|
+
targetModule,
|
|
169
|
+
targetEntity,
|
|
170
|
+
targetField: targetField || resolvedEntity.pk,
|
|
171
|
+
type: rel.type,
|
|
172
|
+
cardinality: rel.cardinality || "N:1",
|
|
173
|
+
status: "RESOLVED"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
3. **Validate Dependency Graph Alignment:**
|
|
181
|
+
|
|
182
|
+
```javascript
|
|
183
|
+
// For each cross-module reference, verify dependency edge exists
|
|
184
|
+
for (const ref of crossModuleReferences) {
|
|
185
|
+
const dependencyExists = dependencyGraph.edges.find(edge =>
|
|
186
|
+
edge.from === ref.sourceModule && edge.to === ref.targetModule
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
if (!dependencyExists) {
|
|
190
|
+
WARNING(`Dependency missing: ${ref.sourceModule} → ${ref.targetModule}`);
|
|
191
|
+
WARNING(`Reason: ${ref.sourceEntity}.${ref.sourceField} references ${ref.targetModule}.${ref.targetEntity}`);
|
|
192
|
+
|
|
193
|
+
// Auto-fix: add missing dependency edge
|
|
194
|
+
dependencyGraph.edges.push({
|
|
195
|
+
from: ref.sourceModule,
|
|
196
|
+
to: ref.targetModule,
|
|
197
|
+
type: "FK",
|
|
198
|
+
reason: `${ref.sourceEntity}.${ref.sourceField} → ${ref.targetEntity}`
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
// Recalculate topological order
|
|
202
|
+
topologicalOrder = calculateTopologicalOrder(dependencyGraph);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
4. **Display Cross-Module Reference Map:**
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
═══════════════════════════════════════════════════════════════
|
|
211
|
+
CROSS-MODULE REFERENCES VALIDATED
|
|
212
|
+
═══════════════════════════════════════════════════════════════
|
|
213
|
+
|
|
214
|
+
| Source Module | Source Entity | Target | Type | Status |
|
|
215
|
+
|---------------|---------------|--------|------|--------|
|
|
216
|
+
| TimeTracking | TimeEntry | Projects.Project.Id | FK (N:1) | ✓ RESOLVED |
|
|
217
|
+
| LeaveManagement | LeaveRequest | Projects.Employee.Id | FK (N:1) | ✓ RESOLVED |
|
|
218
|
+
| AbsenceManagement | Absence | Projects.Employee.Id | FK (N:1) | ✓ RESOLVED |
|
|
219
|
+
| Reporting | ProjectReport | Projects.Project.Id | FK (N:1) | ✓ RESOLVED |
|
|
220
|
+
|
|
221
|
+
Total: {count} cross-module references
|
|
222
|
+
All references RESOLVED ✓
|
|
223
|
+
═══════════════════════════════════════════════════════════════
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
5. **Detect Circular Dependencies:**
|
|
227
|
+
|
|
228
|
+
```javascript
|
|
229
|
+
const cycles = detectCycles(dependencyGraph);
|
|
230
|
+
|
|
231
|
+
if (cycles.length > 0) {
|
|
232
|
+
BLOCKING_ERROR("Circular dependencies detected:");
|
|
233
|
+
for (const cycle of cycles) {
|
|
234
|
+
ERROR(` ${cycle.join(" → ")}`);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
ACTIONS:
|
|
238
|
+
1. Review module dependencies
|
|
239
|
+
2. Break cycles by:
|
|
240
|
+
- Moving shared entities to a separate "Core" module
|
|
241
|
+
- Using event-driven communication instead of FK
|
|
242
|
+
- Removing unnecessary dependencies
|
|
243
|
+
3. Re-run step-02 decomposition with fixed dependencies
|
|
244
|
+
|
|
245
|
+
STOP - DO NOT PROCEED TO HANDOFF
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
6. **Store Cross-Module Interaction Data:**
|
|
250
|
+
|
|
251
|
+
```javascript
|
|
252
|
+
ba-writer.enrichSection({
|
|
253
|
+
featureId: {feature_id},
|
|
254
|
+
section: "consolidation",
|
|
255
|
+
data: {
|
|
256
|
+
crossModuleInteractions: crossModuleReferences.map(ref => ({
|
|
257
|
+
fromModule: ref.sourceModule,
|
|
258
|
+
toModule: ref.targetModule,
|
|
259
|
+
interactionType: "FK_REFERENCE",
|
|
260
|
+
description: `${ref.sourceEntity}.${ref.sourceField} → ${ref.targetModule}.${ref.targetEntity}.${ref.targetField}`,
|
|
261
|
+
entities: [ref.sourceEntity, ref.targetEntity],
|
|
262
|
+
cardinality: ref.cardinality,
|
|
263
|
+
status: ref.status
|
|
264
|
+
}))
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Success Criteria:**
|
|
270
|
+
- ✓ All cross-module references resolved
|
|
271
|
+
- ✓ Dependency graph aligned with actual references
|
|
272
|
+
- ✓ No circular dependencies
|
|
273
|
+
- ✓ Topological order valid
|
|
274
|
+
|
|
275
|
+
**Failure Handling:**
|
|
276
|
+
- BLOCKING errors for unresolved references
|
|
277
|
+
- Auto-fix missing dependency edges (with warning)
|
|
278
|
+
- Manual intervention required for circular dependencies
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## SINGLE-MODULE MODE
|
|
283
|
+
|
|
284
|
+
When only 1 module:
|
|
285
|
+
1. Skip cross-module interactions (no other modules)
|
|
286
|
+
2. Display: "Module unique - interactions cross-module non applicables ✓"
|
|
287
|
+
3. Proceed directly to step-04c-decide.md (skip analysis)
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## CONTEXT MANAGEMENT
|
|
292
|
+
|
|
293
|
+
| Loaded | Not Loaded |
|
|
294
|
+
|--------|------------|
|
|
295
|
+
| _shared.md | Full module feature.json files |
|
|
296
|
+
| Module summaries (100 lines each) | Questionnaires |
|
|
297
|
+
| Master feature.json | Templates |
|
|
298
|
+
| cadrage section | React viewer files |
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## NEXT STEP
|
|
303
|
+
|
|
304
|
+
Load: `./step-04b-analyze.md`
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-04b-analyze
|
|
3
|
+
description: Analyze permission coherence, semantic validation, E2E flows, and global risks
|
|
4
|
+
model: opus
|
|
5
|
+
next_step: steps/step-04c-decide.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
> **Context files:** `_shared.md`
|
|
9
|
+
|
|
10
|
+
# Step 4b: Analyze - Permission Coherence & Validation
|
|
11
|
+
|
|
12
|
+
## MANDATORY EXECUTION RULES
|
|
13
|
+
- ALWAYS validate permission coherence across modules
|
|
14
|
+
- ALWAYS execute semantic validation checks
|
|
15
|
+
- E2E flows are OPTIONAL (informational only)
|
|
16
|
+
|
|
17
|
+
## YOUR TASK
|
|
18
|
+
Validate permission coherence, execute semantic checks, identify E2E business flows, and assess global application risks.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## EXECUTION SEQUENCE
|
|
23
|
+
|
|
24
|
+
### 3. Permission Coherence
|
|
25
|
+
|
|
26
|
+
> **All modules MUST use the same application-level roles.**
|
|
27
|
+
|
|
28
|
+
**3a. Role Consistency**
|
|
29
|
+
|
|
30
|
+
Verify all modules use the applicationRoles defined in cadrage:
|
|
31
|
+
```
|
|
32
|
+
FOR each module in completedModules:
|
|
33
|
+
FOR each role in module.specification.permissionMatrix.roles:
|
|
34
|
+
IF role NOT IN cadrage.applicationRoles → ERROR
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**3b. Permission Path Format**
|
|
38
|
+
|
|
39
|
+
Verify all permission paths follow the pattern:
|
|
40
|
+
`business.{app}.{module}.{resource}.{action}`
|
|
41
|
+
|
|
42
|
+
Check for:
|
|
43
|
+
- Inconsistent app prefix → ERROR
|
|
44
|
+
- Missing module segment → ERROR
|
|
45
|
+
- Shortcut paths (not full format) → ERROR
|
|
46
|
+
|
|
47
|
+
**3c. Role Hierarchy Coherence**
|
|
48
|
+
|
|
49
|
+
Verify the role hierarchy is respected across all modules:
|
|
50
|
+
```
|
|
51
|
+
Admin ⊃ Manager ⊃ Contributor ⊃ Viewer
|
|
52
|
+
|
|
53
|
+
FOR each module:
|
|
54
|
+
IF Admin has fewer permissions than Manager → ERROR
|
|
55
|
+
IF Manager has fewer permissions than Contributor → ERROR
|
|
56
|
+
IF Contributor has fewer permissions than Viewer → ERROR
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**3d. Permission Conflicts**
|
|
60
|
+
|
|
61
|
+
Detect conflicting permission assignments:
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"conflicts": [
|
|
65
|
+
{
|
|
66
|
+
"role": "Manager",
|
|
67
|
+
"module1": "Orders",
|
|
68
|
+
"permission1": "business.sales.orders.approve",
|
|
69
|
+
"module2": "Invoices",
|
|
70
|
+
"permission2": "business.sales.invoices.approve",
|
|
71
|
+
"issue": "Manager can approve orders but not invoices - is this intentional?"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Present conflicts to user via AskUserQuestion:
|
|
78
|
+
```
|
|
79
|
+
question: "Le Manager peut approuver les commandes mais pas les factures. Est-ce intentionnel ?"
|
|
80
|
+
header: "Permissions"
|
|
81
|
+
options:
|
|
82
|
+
- label: "Oui, intentionnel"
|
|
83
|
+
description: "Les factures nécessitent un niveau d'approbation supérieur"
|
|
84
|
+
- label: "Non, corriger"
|
|
85
|
+
description: "Le Manager devrait aussi pouvoir approuver les factures"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4. Semantic Validation (MANDATORY)
|
|
89
|
+
|
|
90
|
+
For EACH module feature.json, execute these checks:
|
|
91
|
+
|
|
92
|
+
| # | Check | Rule | Severity |
|
|
93
|
+
|---|-------|------|----------|
|
|
94
|
+
| 1 | Permission orpheline | Every permissionMatrix.permissions[].path is used by at least one useCases[].permission | WARNING |
|
|
95
|
+
| 2 | UC sans FR | Every useCases[].id is referenced by at least one functionalRequirements[].linkedUseCases[] | WARNING |
|
|
96
|
+
| 3 | Entity sans endpoint | Every entities[].name has at least one endpoint in apiEndpoints[] | WARNING |
|
|
97
|
+
| 4 | UC sans scenario | Every useCases[].mainScenario has at least 2 steps | WARNING |
|
|
98
|
+
| 5 | Role sans permissions | Every applicationRole has at least one entry in roleAssignments[] | WARNING |
|
|
99
|
+
| 6 | Navigation sans traduction | Every navigation.entries[].code has translations in 4 languages in seedDataCore.navigationTranslations[] | ERROR |
|
|
100
|
+
| 7 | LifeCycle terminal | Every lifeCycles[].states[] has at least one state with isTerminal: true | WARNING |
|
|
101
|
+
| 8 | Schema conformity | No custom fields outside defined schema (no KPIDefinitions, ChartConfigurations, etc.) | ERROR |
|
|
102
|
+
| 9 | Wireframe coverage | Every navigation section has a corresponding uiWireframes[].screen | ERROR |
|
|
103
|
+
| 10 | Doublon entity | No entity with same name in two different modules (unless shared via dependencyGraph) | ERROR |
|
|
104
|
+
| 11 | Permission fantome | Every action used in applicationRoles pattern (read, create, update, delete, assign, export, approve) MUST exist as a permission path in permissionMatrix.permissions[].action for at least one module | ERROR |
|
|
105
|
+
| 12 | Dashboard coverage | If cadrage mentions dashboard for a module OR navigation includes "dashboard" section, then specification.dashboards[] MUST NOT be empty | WARNING |
|
|
106
|
+
| 13 | Permission-UC alignment | Every permission.action (except "read" and wildcard "*") MUST have at least one UC where that permission is referenced in useCases[].permission | WARNING |
|
|
107
|
+
|
|
108
|
+
Store results in consolidation.semanticChecks[]:
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"check": "permission-orpheline",
|
|
112
|
+
"module": "RepairManagement",
|
|
113
|
+
"status": "PASS|WARNING|ERROR",
|
|
114
|
+
"details": "Permission business.freebike.repairmanagement.export not referenced by any UC",
|
|
115
|
+
"autoFixed": false
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Blocking rule:**
|
|
120
|
+
- 0 ERROR → PASS
|
|
121
|
+
- ≥1 ERROR → BLOCK (fix before handoff, ask user for each)
|
|
122
|
+
- WARNING only → PASS with user notification
|
|
123
|
+
|
|
124
|
+
### 4-bis. Structural Schema Conformity Check (MANDATORY)
|
|
125
|
+
|
|
126
|
+
> **Post-generation validation.** After semantic checks, verify ALL module feature.json files conform to JSON schema.
|
|
127
|
+
|
|
128
|
+
See [references/consolidation-structural-checks.md](../references/consolidation-structural-checks.md) for the full 6-category structural check:
|
|
129
|
+
- **A.** Required Sections Presence (18 sections)
|
|
130
|
+
- **B.** Field Name Conformity (forbidden vs correct fields)
|
|
131
|
+
- **C.** ID Pattern Conformity (BR, UC, FR, Permissions)
|
|
132
|
+
- **D.** Cross-Module ID Uniqueness
|
|
133
|
+
- **E.** Wireframe Layout Completeness
|
|
134
|
+
- **F.** SeedDataCore Translation Coverage
|
|
135
|
+
|
|
136
|
+
**Blocking rule:** 0 ERROR → PASS. ≥1 ERROR → BLOCK (attempt auto-fix, re-write, re-check).
|
|
137
|
+
|
|
138
|
+
### 5. End-to-End Flows
|
|
139
|
+
|
|
140
|
+
Identify business processes that span multiple modules:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"e2eFlows": [
|
|
145
|
+
{
|
|
146
|
+
"name": "Order to Invoice",
|
|
147
|
+
"steps": [
|
|
148
|
+
{ "module": "Customers", "action": "Customer exists", "permission": "customers.read" },
|
|
149
|
+
{ "module": "Products", "action": "Products selected", "permission": "products.read" },
|
|
150
|
+
{ "module": "Orders", "action": "Order created", "permission": "orders.create" },
|
|
151
|
+
{ "module": "Orders", "action": "Order approved", "permission": "orders.approve" },
|
|
152
|
+
{ "module": "Invoices", "action": "Invoice generated", "permission": "invoices.create" },
|
|
153
|
+
{ "module": "Invoices", "action": "Invoice sent", "permission": "invoices.update" }
|
|
154
|
+
],
|
|
155
|
+
"actors": ["Contributor (create)", "Manager (approve)"],
|
|
156
|
+
"data": "Customer → Order → OrderLines (Products) → Invoice → InvoiceLines"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Display each E2E flow as a diagram:
|
|
163
|
+
```
|
|
164
|
+
Customer ──[read]──→ Order ──[create]──→ Order ──[approve]──→ Invoice ──[create]──→ Invoice ──[send]──→
|
|
165
|
+
(Customers) (Orders) (Orders) (Invoices) (Invoices)
|
|
166
|
+
Contributor Contributor Manager System Manager
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 6. Global Risk Assessment
|
|
170
|
+
|
|
171
|
+
Evaluate application-level risks:
|
|
172
|
+
|
|
173
|
+
| Risk | Metric | Threshold | Status |
|
|
174
|
+
|------|--------|-----------|--------|
|
|
175
|
+
| Total entities | {sum across modules} | ≤20 | PASS/WARNING |
|
|
176
|
+
| Total BRs | {sum across modules} | ≤50 | PASS/WARNING |
|
|
177
|
+
| Cross-module dependencies | {edge count} | ≤10 | PASS/WARNING |
|
|
178
|
+
| Shared entities | {count} | ≤5 | PASS/WARNING |
|
|
179
|
+
| E2E flow length | {max steps} | ≤8 | PASS/WARNING |
|
|
180
|
+
| Permission paths | {total} | ≤100 | PASS/WARNING |
|
|
181
|
+
|
|
182
|
+
### 7. Consolidation Summary
|
|
183
|
+
|
|
184
|
+
Display comprehensive summary:
|
|
185
|
+
```
|
|
186
|
+
═══════════════════════════════════════════════════════════
|
|
187
|
+
CONSOLIDATION - {application_name}
|
|
188
|
+
═══════════════════════════════════════════════════════════
|
|
189
|
+
|
|
190
|
+
### Modules ({count})
|
|
191
|
+
| Module | Entités | BRs | UCs | Complexité |
|
|
192
|
+
|--------|---------|-----|-----|------------|
|
|
193
|
+
{for each module}
|
|
194
|
+
|
|
195
|
+
### Interactions Cross-Module
|
|
196
|
+
- FK References: {count}
|
|
197
|
+
- Shared Entities: {count}
|
|
198
|
+
- Events: {count}
|
|
199
|
+
- Shared Data: {count}
|
|
200
|
+
|
|
201
|
+
### Permissions
|
|
202
|
+
- Roles: {count} (coherent: ✓/✗)
|
|
203
|
+
- Total paths: {count}
|
|
204
|
+
- Conflicts resolved: {count}
|
|
205
|
+
|
|
206
|
+
### E2E Flows
|
|
207
|
+
{for each flow: name, modules involved, actors}
|
|
208
|
+
|
|
209
|
+
### Risques Globaux
|
|
210
|
+
{risk assessment table}
|
|
211
|
+
|
|
212
|
+
═══════════════════════════════════════════════════════════
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## SINGLE-MODULE MODE
|
|
218
|
+
|
|
219
|
+
When only 1 module:
|
|
220
|
+
1. Skip permission coherence check (only one module)
|
|
221
|
+
2. Skip E2E flows (single module)
|
|
222
|
+
3. Execute semantic validation (still required)
|
|
223
|
+
4. Auto-approve global risks (no cross-module complexity)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## CONTEXT MANAGEMENT
|
|
228
|
+
|
|
229
|
+
| Loaded | Not Loaded |
|
|
230
|
+
|--------|------------|
|
|
231
|
+
| _shared.md | Full module feature.json files |
|
|
232
|
+
| Module summaries | Questionnaires |
|
|
233
|
+
| consolidation section (from step-04a) | Templates |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## NEXT STEP
|
|
238
|
+
|
|
239
|
+
Load: `./step-04c-decide.md`
|