@atlashub/smartstack-cli 3.9.0 → 3.10.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 (22) hide show
  1. package/package.json +1 -1
  2. package/templates/agents/ba-writer.md +178 -0
  3. package/templates/skills/application/references/application-roles-template.md +227 -0
  4. package/templates/skills/application/references/provider-template.md +30 -6
  5. package/templates/skills/application/steps/step-03-roles.md +45 -7
  6. package/templates/skills/application/steps/step-03b-provider.md +13 -6
  7. package/templates/skills/business-analyse/SKILL.md +56 -4
  8. package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +477 -0
  9. package/templates/skills/business-analyse/references/cache-warming-strategy.md +578 -0
  10. package/templates/skills/business-analyse/references/robustness-checks.md +538 -0
  11. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +33 -1
  12. package/templates/skills/business-analyse/steps/step-00-init.md +166 -0
  13. package/templates/skills/business-analyse/steps/step-03a-data.md +36 -0
  14. package/templates/skills/business-analyse/steps/step-03c-compile.md +71 -2
  15. package/templates/skills/business-analyse/steps/step-03d-validate.md +274 -0
  16. package/templates/skills/business-analyse/steps/step-04-consolidation.md +166 -0
  17. package/templates/skills/business-analyse/steps/step-05a-handoff.md +44 -0
  18. package/templates/skills/business-analyse/steps/step-05b-deploy.md +21 -2
  19. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +526 -0
  20. package/templates/skills/controller/steps/step-03-generate.md +184 -24
  21. package/templates/skills/controller/templates.md +11 -2
  22. package/templates/skills/ralph-loop/references/core-seed-data.md +173 -21
@@ -0,0 +1,538 @@
1
+ # Robustness Checks for Business Analysis
2
+
3
+ > **Objective:** Prevent incomplete specifications and broken references from reaching development.
4
+
5
+ ## Overview
6
+
7
+ This document consolidates all robustness checks implemented across the business-analyse workflow. Each check serves to catch issues early, before they cause ralph-loop failures or runtime errors.
8
+
9
+ ---
10
+
11
+ ## Phase 1: Module Specification Checklist (Step-03d)
12
+
13
+ > **When:** Before marking module status = "specified"
14
+ > **Blocking:** YES - Module CANNOT proceed to handoff with failing checks
15
+
16
+ ### Purpose
17
+
18
+ Ensures each module has ALL required components before being marked as "specified". Prevents incomplete modules from reaching step-04 consolidation.
19
+
20
+ ### Checks (30 total)
21
+
22
+ #### SECTION 1: Data Model (3 checks)
23
+
24
+ | # | Check | Minimum | Blocking | Rationale |
25
+ |---|-------|---------|----------|-----------|
26
+ | 1.1 | Entities count | ≥2 | YES | Single-entity modules are rare and likely incomplete |
27
+ | 1.2 | Entity attributes | Each entity ≥3 attributes | YES | Entities with <3 attributes are incomplete |
28
+ | 1.3 | Entity relationships | All entities have relationships or marked standalone | NO (WARNING) | Standalone entities should be rare |
29
+
30
+ #### SECTION 2: Business Rules (3 checks)
31
+
32
+ | # | Check | Minimum | Blocking | Rationale |
33
+ |---|-------|---------|----------|-----------|
34
+ | 2.1 | Business rules count | ≥4 | YES | Modules need validation/calculation logic |
35
+ | 2.2 | BR categories | ≥2 categories (VAL/CALC/WF/SEC/DATA) | YES | Single-category modules likely incomplete |
36
+ | 2.3 | BR module prefixes | All BRs use module prefix | YES | Prevents ID collisions in multi-module apps |
37
+
38
+ #### SECTION 3: Use Cases & Requirements (4 checks)
39
+
40
+ | # | Check | Minimum | Blocking | Rationale |
41
+ |---|-------|---------|----------|-----------|
42
+ | 3.1 | Use cases count | ≥6 | YES | CRUD (5) + 1 business-specific minimum |
43
+ | 3.2 | UC module prefixes | All UCs use module prefix | YES | Prevents ID collisions |
44
+ | 3.3 | Functional requirements count | ≥4 | YES | FRs must cover key functionality |
45
+ | 3.4 | UC-FR linkage | Every UC has ≥1 linked FR | YES | Orphan UCs indicate incomplete requirements |
46
+ | 3.5 | FR-BR linkage | Every FR has ≥1 linked BR | NO (WARNING) | FRs without BRs may lack validation logic |
47
+
48
+ #### SECTION 4: Permissions (3 checks)
49
+
50
+ | # | Check | Minimum | Blocking | Rationale |
51
+ |---|-------|---------|----------|-----------|
52
+ | 4.1 | Permissions count | ≥5 | YES | CRUD (4) + 1 business action minimum |
53
+ | 4.2 | Permission format | `business.{app}.{module}.{resource}.{action}` | YES | Wrong format breaks RBAC system |
54
+ | 4.3 | Role permissions | All roles have ≥1 permission | YES | Roles without permissions are useless |
55
+
56
+ #### SECTION 5: UI & Navigation (3 checks)
57
+
58
+ | # | Check | Minimum | Blocking | Rationale |
59
+ |---|-------|---------|----------|-----------|
60
+ | 5.1 | Sections count | ≥2 | YES | Modules need list + form minimum |
61
+ | 5.2 | Wireframes count | 1 per section | YES | EVERY section MUST have wireframe |
62
+ | 5.3 | Navigation entries | ≥1 | YES | Module must be accessible in menu |
63
+
64
+ #### SECTION 6: I18N & Messages (3 checks)
65
+
66
+ | # | Check | Minimum | Blocking | Rationale |
67
+ |---|-------|---------|----------|-----------|
68
+ | 6.1 | i18n keys count | ≥42 | YES | Entities, fields, messages, validation, navigation |
69
+ | 6.2 | i18n languages | All keys have 4 languages (fr/en/nl/de) | YES | Missing translations break multi-language |
70
+ | 6.3 | Messages count | ≥4 | YES | 1 success, 1 error, 1 warning, 1 info minimum |
71
+
72
+ #### SECTION 7: Seed Data (2 checks)
73
+
74
+ | # | Check | Minimum | Blocking | Rationale |
75
+ |---|-------|---------|----------|-----------|
76
+ | 7.1 | CORE seed data sections | All 5 sections present | YES | Missing CORE data breaks deployment |
77
+ | 7.2 | Business seed data | Template defined | NO (WARNING) | Helps with testing |
78
+
79
+ **CORE sections required:**
80
+ 1. `navigationModules`
81
+ 2. `navigationTranslations`
82
+ 3. `permissions`
83
+ 4. `rolePermissions`
84
+ 5. `permissionConstants`
85
+
86
+ #### SECTION 8: API Endpoints (2 checks)
87
+
88
+ | # | Check | Minimum | Blocking | Rationale |
89
+ |---|-------|---------|----------|-----------|
90
+ | 8.1 | API endpoints count | ≥5 | YES | CRUD (5) minimum |
91
+ | 8.2 | API permissions | Every endpoint has permission | YES | Endpoints without permissions are security holes |
92
+
93
+ #### SECTION 9: Validations (1 check)
94
+
95
+ | # | Check | Minimum | Blocking | Rationale |
96
+ |---|-------|---------|----------|-----------|
97
+ | 9.1 | Validations count | ≥1 | YES | Modules need field validation rules |
98
+
99
+ #### SECTION 10: Gherkin Scenarios (1 check)
100
+
101
+ | # | Check | Minimum | Blocking | Rationale |
102
+ |---|-------|---------|----------|-----------|
103
+ | 10.1 | Gherkin scenarios count | ≥2 | NO (WARNING) | Enables automated testing |
104
+
105
+ ### Failure Handling
106
+
107
+ **IF ANY blocking check fails:**
108
+
109
+ 1. **STOP** - Do NOT mark module as "specified"
110
+ 2. **DISPLAY** table of failures with details
111
+ 3. **ACTIONS:**
112
+ - Fix ALL blocking failures
113
+ - Re-run step-03d validation
114
+ - Proceed only when ALL blocking checks pass
115
+
116
+ **Example output:**
117
+
118
+ ```
119
+ ═══════════════════════════════════════════════════════════════
120
+ MODULE SPECIFICATION INCOMPLETE - Projects
121
+ ═══════════════════════════════════════════════════════════════
122
+
123
+ | Section | Check | Required | Actual | Status | Details |
124
+ |---------|-------|----------|--------|--------|---------|
125
+ | Business Rules | BR categories | ≥2 | 1 | ✗ FAIL | Only VAL category present |
126
+ | Use Cases | UC count | ≥6 | 4 | ✗ FAIL | Missing business-specific UCs |
127
+ | Wireframes | Count | 3 | 2 | ✗ FAIL | Missing wireframe for "Settings" section |
128
+
129
+ ACTIONS REQUIRED:
130
+ 1. Add business rules in ≥1 other category (CALC, WF, SEC, or DATA)
131
+ 2. Add 2 more use cases (business-specific)
132
+ 3. Create wireframe for "Settings" section
133
+ 4. Re-run step-03d validation
134
+
135
+ DO NOT PROCEED TO CONSOLIDATION UNTIL ALL CHECKS PASS
136
+ ═══════════════════════════════════════════════════════════════
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Phase 2: Cross-Module Reference Validation (Step-04)
142
+
143
+ > **When:** During consolidation, before marking application as "consolidated"
144
+ > **Blocking:** YES - Unresolved references BLOCK handoff
145
+
146
+ ### Purpose
147
+
148
+ Verifies ALL cross-module entity references are resolvable. Prevents FK constraint violations and runtime errors during ralph-loop code generation.
149
+
150
+ ### Process
151
+
152
+ 1. **Build Entity Registry**
153
+ - Extract all entities from all modules
154
+ - Map: `{moduleCode → [entities]}`
155
+
156
+ 2. **Extract Cross-Module References**
157
+ - Scan all `entity.relationships[]` for references to other modules
158
+ - Format: `"ModuleName.EntityName.FieldName"` or `"ModuleName.EntityName"`
159
+
160
+ 3. **Validate References**
161
+ - ✓ Target module exists
162
+ - ✓ Target entity exists in target module
163
+ - ✓ Target field exists (if specified)
164
+
165
+ 4. **Validate Dependency Graph Alignment**
166
+ - For each cross-module reference, verify dependency edge exists
167
+ - Auto-fix: add missing edges (with warning)
168
+
169
+ 5. **Detect Circular Dependencies**
170
+ - BLOCKING ERROR if cycles detected
171
+ - User must break cycles manually
172
+
173
+ ### Checks
174
+
175
+ | # | Check | Blocking | Failure Action |
176
+ |---|-------|----------|----------------|
177
+ | 1 | Target module exists | YES | BLOCKING ERROR - list invalid references |
178
+ | 2 | Target entity exists | YES | BLOCKING ERROR - list invalid references |
179
+ | 3 | Target field exists | NO (WARNING) | Assume PK ("Id") if not specified |
180
+ | 4 | Dependency edge exists | NO (WARNING) | Auto-fix: add missing edge |
181
+ | 5 | No circular dependencies | YES | BLOCKING ERROR - user must fix |
182
+
183
+ ### Example Output
184
+
185
+ **Success:**
186
+
187
+ ```
188
+ ═══════════════════════════════════════════════════════════════
189
+ CROSS-MODULE REFERENCES VALIDATED
190
+ ═══════════════════════════════════════════════════════════════
191
+
192
+ | Source Module | Source Entity | Target | Type | Status |
193
+ |---------------|---------------|--------|------|--------|
194
+ | TimeTracking | TimeEntry | Projects.Project.Id | FK (N:1) | ✓ RESOLVED |
195
+ | LeaveManagement | LeaveRequest | Projects.Employee.Id | FK (N:1) | ✓ RESOLVED |
196
+ | AbsenceManagement | Absence | Projects.Employee.Id | FK (N:1) | ✓ RESOLVED |
197
+ | Reporting | ProjectReport | Projects.Project.Id | FK (N:1) | ✓ RESOLVED |
198
+
199
+ Total: 4 cross-module references
200
+ All references RESOLVED ✓
201
+ No circular dependencies ✓
202
+ ═══════════════════════════════════════════════════════════════
203
+ ```
204
+
205
+ **Failure (unresolved reference):**
206
+
207
+ ```
208
+ ═══════════════════════════════════════════════════════════════
209
+ CROSS-MODULE REFERENCES FAILED
210
+ ═══════════════════════════════════════════════════════════════
211
+
212
+ BLOCKING ERRORS:
213
+
214
+ 1. Module "TimeTracking": Entity "TimeEntry" references non-existent entity "Task" in module "Projects"
215
+ - Source: TimeEntry.taskId
216
+ - Target: Projects.Task (NOT FOUND)
217
+ - Fix: Either create "Task" entity in Projects module, or remove reference
218
+
219
+ 2. Module "Reporting": Entity "ProjectReport" references non-existent module "Analytics"
220
+ - Source: ProjectReport.analyticsId
221
+ - Target: Analytics.Report (module does not exist)
222
+ - Fix: Either create "Analytics" module, or remove reference
223
+
224
+ ACTIONS REQUIRED:
225
+ 1. Fix ALL unresolved references listed above
226
+ 2. Return to step-03a for affected modules
227
+ 3. Re-run step-04 consolidation
228
+
229
+ DO NOT PROCEED TO HANDOFF UNTIL ALL REFERENCES RESOLVED
230
+ ═══════════════════════════════════════════════════════════════
231
+ ```
232
+
233
+ **Failure (circular dependency):**
234
+
235
+ ```
236
+ ═══════════════════════════════════════════════════════════════
237
+ CIRCULAR DEPENDENCIES DETECTED
238
+ ═══════════════════════════════════════════════════════════════
239
+
240
+ BLOCKING ERROR: Cycles found in dependency graph
241
+
242
+ Cycle 1: Orders → Invoices → Payments → Orders
243
+ Cycle 2: Customers → Contacts → Customers
244
+
245
+ ACTIONS REQUIRED:
246
+ 1. Break cycles by:
247
+ - Moving shared entities to a separate "Core" module
248
+ - Using event-driven communication instead of FK
249
+ - Removing unnecessary dependencies
250
+ 2. Return to step-02 decomposition
251
+ 3. Fix dependency graph
252
+ 4. Re-run step-03 module specification
253
+ 5. Re-run step-04 consolidation
254
+
255
+ DEVELOPMENT CANNOT PROCEED WITH CIRCULAR DEPENDENCIES
256
+ ═══════════════════════════════════════════════════════════════
257
+ ```
258
+
259
+ ---
260
+
261
+ ## Phase 3: Ralph Readiness Validation (Step-05c)
262
+
263
+ > **When:** After artifacts deployed (step-05b), before launching /ralph-loop
264
+ > **Blocking:** YES - Development blocked if critical checks fail
265
+
266
+ ### Purpose
267
+
268
+ Final gate to ensure business analysis is 100% ready for implementation. Catches issues before ralph-loop starts, preventing failed development attempts.
269
+
270
+ ### Checks (9 categories)
271
+
272
+ | # | Category | Checks | Blocking | Purpose |
273
+ |---|----------|--------|----------|---------|
274
+ | 1 | Module Status | All modules status = "handed-off" | YES | Incomplete modules break ralph-loop |
275
+ | 2 | PRD Files | All PRD files exist, valid structure, file counts match | YES | Ralph-loop reads PRDs for tasks |
276
+ | 3 | Dependency Graph | Valid, no cycles, topological order correct | YES | Determines module implementation order |
277
+ | 4 | Cross-Module References | All references resolvable | YES | Prevents FK constraint errors |
278
+ | 5 | Handoff Completeness | All 7 file categories, brToCodeMapping, apiEndpointSummary | YES | Missing data breaks code generation |
279
+ | 6 | i18n Keys | All keys have 4 languages | NO (WARNING) | Missing translations won't block dev |
280
+ | 7 | Master Feature | Status = "handed-off", handoff complete | YES | Ralph-loop needs master handoff |
281
+ | 8 | Progress Tracker | File exists, structure valid, task count matches | NO (WARNING) | Used for progress tracking |
282
+ | 9 | Final Readiness | Aggregate all checks, calculate score | YES if <100% | All critical checks must pass |
283
+
284
+ ### Readiness Score
285
+
286
+ ```
287
+ Readiness Score = (passed critical checks / total critical checks) × 100%
288
+ ```
289
+
290
+ **Thresholds:**
291
+ - **100%** → READY FOR DEVELOPMENT ✓
292
+ - **<100%** → NOT READY - FIX REQUIRED ✗
293
+
294
+ ### Example Output
295
+
296
+ **Ready:**
297
+
298
+ ```
299
+ ═══════════════════════════════════════════════════════════════
300
+ RALPH READINESS CHECK - COMPLETE
301
+ ═══════════════════════════════════════════════════════════════
302
+
303
+ Validation Summary:
304
+ ✓ Module status validation: PASS (5/5 modules)
305
+ ✓ PRD files validation: PASS (5/5 files)
306
+ ✓ Dependency graph validation: PASS (4 edges)
307
+ ✓ Cross-module references validation: PASS (4 references)
308
+ ✓ Handoff completeness check: PASS (5/5 modules)
309
+ ⚠ i18n keys validation: WARNING (1 missing translation)
310
+ ✓ Master feature validation: PASS
311
+ ✓ Progress tracker validation: PASS
312
+
313
+ Readiness Score: 100% (7/7 critical checks passed, 1 warning)
314
+
315
+ Status: READY FOR DEVELOPMENT ✓
316
+
317
+ Next Steps:
318
+ 1. Address warnings (optional, recommended)
319
+ 2. Review progress tracker: .ralph/progress.txt
320
+ 3. Launch development: /ralph-loop -r
321
+ ═══════════════════════════════════════════════════════════════
322
+ ```
323
+
324
+ **Not Ready:**
325
+
326
+ ```
327
+ ═══════════════════════════════════════════════════════════════
328
+ RALPH READINESS CHECK - FAILED
329
+ ═══════════════════════════════════════════════════════════════
330
+
331
+ Status: NOT READY FOR DEVELOPMENT ✗
332
+
333
+ Critical Issues Found:
334
+ ✗ Module status validation: FAIL (1/5 modules incomplete)
335
+ - Reporting module status is "specified", must be "handed-off"
336
+ - Fix: Return to step-05a-handoff.md for Reporting module
337
+
338
+ ✗ PRD files validation: FAIL (1/5 files invalid)
339
+ - prd-Reporting.json has wrong structure (filesToCreate at root level)
340
+ - Fix: Re-run ss derive-prd --feature {path} --output .ralph/prd-Reporting.json
341
+
342
+ Required Actions:
343
+ 1. Fix all critical issues listed above
344
+ 2. Re-run validation: load step-05c-ralph-readiness.md
345
+ 3. Only proceed to /ralph-loop when all critical checks pass
346
+
347
+ DO NOT PROCEED TO /RALPH-LOOP UNTIL ALL CRITICAL CHECKS PASS
348
+ ═══════════════════════════════════════════════════════════════
349
+ ```
350
+
351
+ ---
352
+
353
+ ## Common Patterns & Best Practices
354
+
355
+ ### 1. Fail Fast, Fail Clear
356
+
357
+ **Principle:** Detect issues as early as possible, provide clear error messages with actionable fixes.
358
+
359
+ **Example:**
360
+ - ✗ BAD: "Validation failed" (vague, no action)
361
+ - ✓ GOOD: "Entity 'Task' not found in Projects module. Fix: Create Task entity or remove reference from TimeEntry.taskId"
362
+
363
+ ### 2. Progressive Validation
364
+
365
+ **Principle:** Validate at each step, not just at the end.
366
+
367
+ **Checkpoints:**
368
+ - Step-03d: Module completeness (before marking "specified")
369
+ - Step-04: Cross-module coherence (before marking "consolidated")
370
+ - Step-05c: Development readiness (before /ralph-loop)
371
+
372
+ ### 3. Auto-Fix vs. Manual Fix
373
+
374
+ **Auto-fix (safe):**
375
+ - Add missing dependency edges (with warning)
376
+ - Auto-correct casing (PascalCase, camelCase)
377
+ - Fill default values (e.g., PK = "Id" if not specified)
378
+
379
+ **Manual fix (requires user decision):**
380
+ - Circular dependencies (how to break?)
381
+ - Unresolved entity references (create or remove?)
382
+ - Permission conflicts (intentional or error?)
383
+
384
+ ### 4. Severity Levels
385
+
386
+ | Level | Symbol | Meaning | Action |
387
+ |-------|--------|---------|--------|
388
+ | PASS | ✓ | Check passed | Continue |
389
+ | WARNING | ⚠ | Non-blocking issue | Recommend fix, allow continue |
390
+ | ERROR | ✗ | Blocking issue | STOP, fix required |
391
+
392
+ ### 5. Display Standards
393
+
394
+ **Always include in error messages:**
395
+ 1. **What failed** - Clear identification of the issue
396
+ 2. **Why it matters** - Impact if not fixed
397
+ 3. **How to fix** - Specific actionable steps
398
+ 4. **Where to go** - Which step to return to
399
+
400
+ **Example:**
401
+
402
+ ```
403
+ ✗ BLOCKING ERROR: Cross-module reference unresolved
404
+
405
+ WHAT: TimeTracking.TimeEntry references Projects.Task (NOT FOUND)
406
+ WHY: This will cause FK constraint violation in database
407
+ HOW TO FIX:
408
+ Option 1: Create "Task" entity in Projects module
409
+ Option 2: Remove reference from TimeEntry (change taskId to projectId)
410
+ WHERE: Return to step-03a-data.md for TimeTracking module
411
+ ```
412
+
413
+ ---
414
+
415
+ ## Troubleshooting Guide
416
+
417
+ ### Issue: Module Fails Specification Checklist
418
+
419
+ **Symptoms:**
420
+ - Module has < minimum required components
421
+ - Step-03d validation fails
422
+
423
+ **Diagnosis:**
424
+ 1. Check which sections failed (entities, UCs, BRs, wireframes, etc.)
425
+ 2. Review minimum requirements per section
426
+
427
+ **Fix:**
428
+ 1. Add missing components until minimums met
429
+ 2. Re-run step-03d validation
430
+ 3. Proceed only when ALL blocking checks pass
431
+
432
+ ---
433
+
434
+ ### Issue: Cross-Module Reference Unresolved
435
+
436
+ **Symptoms:**
437
+ - Step-04 reports "entity not found"
438
+ - Cross-module FK references fail validation
439
+
440
+ **Diagnosis:**
441
+ 1. Identify source module + entity
442
+ 2. Identify target module + entity
443
+ 3. Check if target entity exists in target module
444
+
445
+ **Fix:**
446
+ 1. **If target entity missing:**
447
+ - Create target entity in target module
448
+ - OR remove reference from source entity
449
+ 2. **If target module missing:**
450
+ - Create target module
451
+ - OR remove reference from source entity
452
+ 3. Re-run step-04 consolidation
453
+
454
+ ---
455
+
456
+ ### Issue: Circular Dependencies Detected
457
+
458
+ **Symptoms:**
459
+ - Step-04 reports "circular dependencies"
460
+ - Dependency graph has cycles
461
+
462
+ **Diagnosis:**
463
+ 1. Identify cycle path (A → B → C → A)
464
+ 2. Analyze relationships causing cycle
465
+
466
+ **Fix:**
467
+ 1. **Option 1: Create Core module**
468
+ - Move shared entities to new "Core" module
469
+ - Other modules depend on Core (no cycle)
470
+ 2. **Option 2: Use events instead of FK**
471
+ - Replace direct FK with event-driven communication
472
+ - Breaks dependency link
473
+ 3. **Option 3: Remove unnecessary dependency**
474
+ - Review if dependency is truly needed
475
+ - Remove if redundant
476
+ 4. Return to step-02, fix dependency graph
477
+ 5. Re-run step-03 for affected modules
478
+ 6. Re-run step-04 consolidation
479
+
480
+ ---
481
+
482
+ ### Issue: Ralph Readiness Check Fails
483
+
484
+ **Symptoms:**
485
+ - Step-05c reports readiness score < 100%
486
+ - Critical checks failed
487
+
488
+ **Diagnosis:**
489
+ 1. Review failed checks in summary
490
+ 2. Identify missing/invalid artifacts
491
+
492
+ **Fix:**
493
+ - **Module status incomplete:** Return to step-05a for affected module
494
+ - **PRD files invalid:** Re-run `ss derive-prd` for affected module
495
+ - **Handoff incomplete:** Return to step-05a, complete handoff section
496
+ - **Cross-module refs broken:** Return to step-04, fix references
497
+ - Re-run step-05c after fixes
498
+
499
+ ---
500
+
501
+ ## Metrics & Success Criteria
502
+
503
+ ### Module Specification Checklist
504
+
505
+ **Target:**
506
+ - 100% blocking checks passed
507
+ - 0-5 warnings acceptable
508
+
509
+ **Success:**
510
+ - Module marked as "specified"
511
+ - Ready for consolidation
512
+
513
+ ### Cross-Module Validation
514
+
515
+ **Target:**
516
+ - 100% references resolved
517
+ - 0 circular dependencies
518
+
519
+ **Success:**
520
+ - Application marked as "consolidated"
521
+ - Ready for handoff
522
+
523
+ ### Ralph Readiness
524
+
525
+ **Target:**
526
+ - 100% critical checks passed
527
+ - Warnings addressed or documented
528
+
529
+ **Success:**
530
+ - Application ready for /ralph-loop
531
+ - 0% chance of ralph-loop failure due to incomplete BA
532
+
533
+ ---
534
+
535
+ **Last Updated:** 2026-02-08
536
+ **Version:** 1.0
537
+ **Author:** SmartStack CLI Team
538
+ **Based on:** Analysis of BA session 03b76b8b-ea1c-4f1e-a636-bd46b0c33e02
@@ -382,7 +382,7 @@
382
382
  },
383
383
  "seedDataCore": {
384
384
  "type": "object",
385
- "description": "5 mandatory SmartStack core SeedData definitions",
385
+ "description": "7 mandatory SmartStack core SeedData definitions (modules, sections, resources, translations, permissions, rolePermissions, permissionConstants)",
386
386
  "properties": {
387
387
  "navigationModules": {
388
388
  "type": "array",
@@ -399,6 +399,38 @@
399
399
  }
400
400
  }
401
401
  },
402
+ "navigationSections": {
403
+ "type": "array",
404
+ "description": "Level 4 (Section) navigation entries for core.nav_Sections table. Derived from specification.sections[].",
405
+ "items": {
406
+ "type": "object",
407
+ "required": ["code", "label", "icon", "route", "parentCode", "permission"],
408
+ "properties": {
409
+ "code": { "type": "string", "description": "Section code (list, detail, create, dashboard)" },
410
+ "label": { "type": "string", "description": "Section label in default language (fr)" },
411
+ "icon": { "type": "string", "description": "Lucide icon name" },
412
+ "route": { "type": "string", "description": "Full route path" },
413
+ "parentCode": { "type": "string", "description": "Parent module code" },
414
+ "permission": { "type": "string", "description": "Required permission path" },
415
+ "sort": { "type": "integer", "description": "Display order within module" }
416
+ }
417
+ }
418
+ },
419
+ "navigationResources": {
420
+ "type": "array",
421
+ "description": "Level 5 (Resource) navigation entries for core.nav_Resources table. Derived from specification.sections[].resources[].",
422
+ "items": {
423
+ "type": "object",
424
+ "required": ["code", "type", "parentCode"],
425
+ "properties": {
426
+ "code": { "type": "string", "description": "Resource code (kebab-case)" },
427
+ "type": { "type": "string", "description": "SmartStack component type (SmartTable, SmartForm, DetailCard, KpiCard, Chart, etc.)" },
428
+ "entity": { "type": "string", "description": "Primary entity this resource operates on" },
429
+ "parentCode": { "type": "string", "description": "Parent section code" },
430
+ "permission": { "type": "string", "description": "Required permission path (optional if inherited from section)" }
431
+ }
432
+ }
433
+ },
402
434
  "navigationTranslations": {
403
435
  "type": "array",
404
436
  "items": {