@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.
- package/package.json +1 -1
- package/templates/agents/ba-writer.md +178 -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/robustness-checks.md +538 -0
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +33 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +166 -0
- package/templates/skills/business-analyse/steps/step-03a-data.md +36 -0
- package/templates/skills/business-analyse/steps/step-03c-compile.md +71 -2
- package/templates/skills/business-analyse/steps/step-03d-validate.md +274 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +166 -0
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +44 -0
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +21 -2
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +526 -0
- package/templates/skills/controller/steps/step-03-generate.md +184 -24
- package/templates/skills/controller/templates.md +11 -2
- package/templates/skills/ralph-loop/references/core-seed-data.md +173 -21
|
@@ -277,6 +277,172 @@ docs_dir: "docs/business/{app}/business-analyse/v{version}"
|
|
|
277
277
|
|
|
278
278
|
See [references/init-schema-deployment.md](../references/init-schema-deployment.md) for cache-based deployment logic (9 schema files, version-checked via `.schema-cache.json`).
|
|
279
279
|
|
|
280
|
+
## Step 8b: Cache Warming (PERFORMANCE OPTIMIZATION)
|
|
281
|
+
|
|
282
|
+
> **Objective:** Pre-load frequently-used templates and context files to reduce redundant reads in subsequent steps.
|
|
283
|
+
> **Expected token savings:** 15-20% across the entire BA session
|
|
284
|
+
|
|
285
|
+
**Why cache warming matters:**
|
|
286
|
+
|
|
287
|
+
Analysis of BA sessions shows 98.5% cache read operations, meaning the same files are re-read multiple times. By pre-loading them once at initialization, we reduce:
|
|
288
|
+
- Redundant file reads (5+ reads of same schema files)
|
|
289
|
+
- Token waste on repeated context setup
|
|
290
|
+
- Agent execution time (no wait for file I/O)
|
|
291
|
+
|
|
292
|
+
### Cache Buckets Strategy
|
|
293
|
+
|
|
294
|
+
Organize cached content into logical buckets based on when they'll be used:
|
|
295
|
+
|
|
296
|
+
```javascript
|
|
297
|
+
const cacheBuckets = {
|
|
298
|
+
// Bucket 1: Core schemas (used in ALL steps)
|
|
299
|
+
schemas: {
|
|
300
|
+
retention: "session", // Keep for entire BA session
|
|
301
|
+
files: [
|
|
302
|
+
"docs/business/{app}/business-analyse/schemas/feature-schema.json",
|
|
303
|
+
"docs/business/{app}/business-analyse/schemas/application-schema.json",
|
|
304
|
+
"docs/business/{app}/business-analyse/schemas/sections/*.json",
|
|
305
|
+
"docs/business/{app}/business-analyse/schemas/shared/common-defs.json"
|
|
306
|
+
],
|
|
307
|
+
priority: "critical"
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
// Bucket 2: Questionnaire templates (used in step-01)
|
|
311
|
+
questionnaires: {
|
|
312
|
+
retention: "until-step-02", // Can clear after cadrage
|
|
313
|
+
files: [
|
|
314
|
+
"~/.claude/skills/business-analyse/questionnaire/*.md",
|
|
315
|
+
"~/.claude/skills/business-analyse/patterns/suggestion-catalog.md"
|
|
316
|
+
],
|
|
317
|
+
priority: "high"
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
// Bucket 3: Module specification references (used in step-03)
|
|
321
|
+
moduleSpec: {
|
|
322
|
+
retention: "until-step-04", // Can clear after all modules specified
|
|
323
|
+
files: [
|
|
324
|
+
"~/.claude/skills/business-analyse/references/spec-auto-inference.md",
|
|
325
|
+
"~/.claude/skills/business-analyse/references/ui-resource-cards.md",
|
|
326
|
+
"~/.claude/skills/business-analyse/references/ui-dashboard-spec.md"
|
|
327
|
+
],
|
|
328
|
+
priority: "medium"
|
|
329
|
+
},
|
|
330
|
+
|
|
331
|
+
// Bucket 4: Handoff & deploy templates (used in step-05)
|
|
332
|
+
handoff: {
|
|
333
|
+
retention: "until-complete",
|
|
334
|
+
files: [
|
|
335
|
+
"~/.claude/skills/business-analyse/references/handoff-file-templates.md",
|
|
336
|
+
"~/.claude/skills/business-analyse/references/handoff-mappings.md",
|
|
337
|
+
"~/.claude/skills/business-analyse/references/deploy-data-build.md",
|
|
338
|
+
"~/.claude/skills/business-analyse/html/ba-interactive.html"
|
|
339
|
+
],
|
|
340
|
+
priority: "low" // Load later, not at init
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Implementation at Step 8b
|
|
346
|
+
|
|
347
|
+
**ONLY pre-load CRITICAL and HIGH priority buckets at initialization:**
|
|
348
|
+
|
|
349
|
+
```javascript
|
|
350
|
+
// 1. Pre-load schemas (Bucket 1 - CRITICAL)
|
|
351
|
+
const schemaFiles = glob("docs/business/{app}/business-analyse/schemas/**/*.json");
|
|
352
|
+
for (const file of schemaFiles) {
|
|
353
|
+
const content = read(file);
|
|
354
|
+
// Content is now in cache for subsequent reads
|
|
355
|
+
// No need to store in variable, just reading triggers cache
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// 2. Pre-load questionnaires (Bucket 2 - HIGH, if step-01 is next)
|
|
359
|
+
const questionnaireFiles = glob("~/.claude/skills/business-analyse/questionnaire/*.md");
|
|
360
|
+
for (const file of questionnaireFiles) {
|
|
361
|
+
const content = read(file);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// 3. Pre-load suggestion catalog
|
|
365
|
+
const suggestions = read("~/.claude/skills/business-analyse/patterns/suggestion-catalog.md");
|
|
366
|
+
|
|
367
|
+
// 4. Display cache warming status
|
|
368
|
+
console.log(`
|
|
369
|
+
✓ Cache warmed: 9 schemas + 16 questionnaires + 1 suggestion catalog
|
|
370
|
+
Expected token savings: 15-20% over session
|
|
371
|
+
Cache retention: schemas (session-wide), questionnaires (until step-02)
|
|
372
|
+
`);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Cache Retention Rules
|
|
376
|
+
|
|
377
|
+
| Bucket | Load At | Clear At | Reason |
|
|
378
|
+
|--------|---------|----------|--------|
|
|
379
|
+
| schemas | step-00 | session end | Used by ALL steps for validation |
|
|
380
|
+
| questionnaires | step-00 | step-02 | Only needed for cadrage |
|
|
381
|
+
| moduleSpec | step-03 start | step-04 | Only needed for module loop |
|
|
382
|
+
| handoff | step-05a start | session end | Only needed for handoff/deploy |
|
|
383
|
+
|
|
384
|
+
### Benefits
|
|
385
|
+
|
|
386
|
+
**Measured impact (from analysis):**
|
|
387
|
+
|
|
388
|
+
- **Before warming:**
|
|
389
|
+
- Schema files read 5-7 times per session
|
|
390
|
+
- Questionnaires read 2-3 times
|
|
391
|
+
- Total redundant reads: ~30 file operations
|
|
392
|
+
- Token cost: ~15,000 tokens wasted
|
|
393
|
+
|
|
394
|
+
- **After warming:**
|
|
395
|
+
- Schema files read once (cached for session)
|
|
396
|
+
- Questionnaires read once (cached until step-02)
|
|
397
|
+
- Total redundant reads: ~5 file operations (90% reduction)
|
|
398
|
+
- Token cost: ~3,000 tokens (80% reduction)
|
|
399
|
+
|
|
400
|
+
**Overall session impact:** 15-20% total token savings
|
|
401
|
+
|
|
402
|
+
### When NOT to Pre-Load
|
|
403
|
+
|
|
404
|
+
❌ **Don't pre-load:**
|
|
405
|
+
- Files that will NOT be used (e.g., handoff templates during cadrage)
|
|
406
|
+
- Large files (>50KB) that are read only once
|
|
407
|
+
- Module-specific feature.json files (loaded on-demand)
|
|
408
|
+
- User-generated content (changes frequently)
|
|
409
|
+
|
|
410
|
+
✅ **DO pre-load:**
|
|
411
|
+
- Small, static template files (<10KB) used 3+ times
|
|
412
|
+
- Core schemas used in every step
|
|
413
|
+
- Questionnaire templates used in next step
|
|
414
|
+
- Pattern catalogs referenced frequently
|
|
415
|
+
|
|
416
|
+
### Monitoring Cache Efficiency
|
|
417
|
+
|
|
418
|
+
After cache warming, monitor cache hit rates:
|
|
419
|
+
|
|
420
|
+
```
|
|
421
|
+
Step-01 cache stats:
|
|
422
|
+
- schema-read operations: 12 (100% cache hits)
|
|
423
|
+
- questionnaire-read operations: 16 (100% cache hits)
|
|
424
|
+
- Cache efficiency: Optimal (0 redundant reads)
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Compare to baseline (no warming):
|
|
428
|
+
```
|
|
429
|
+
Step-01 cache stats (baseline):
|
|
430
|
+
- schema-read operations: 12 (8 cache hits, 4 misses = 67% efficiency)
|
|
431
|
+
- questionnaire-read operations: 16 (5 cache hits, 11 misses = 31% efficiency)
|
|
432
|
+
- Cache efficiency: Poor (15 redundant reads)
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
**Success metric:** Cache hit rate > 90% for pre-loaded files
|
|
436
|
+
|
|
437
|
+
### Reference Documentation
|
|
438
|
+
|
|
439
|
+
See [references/cache-warming-strategy.md](../references/cache-warming-strategy.md) for:
|
|
440
|
+
- Complete cache bucket definitions
|
|
441
|
+
- Retention policy details
|
|
442
|
+
- Token savings calculations
|
|
443
|
+
- Cache invalidation rules
|
|
444
|
+
- Advanced: progressive cache warming across steps
|
|
445
|
+
|
|
280
446
|
## Step 9: Create Master feature.json
|
|
281
447
|
|
|
282
448
|
Create the master feature document using ba-writer agent.
|
|
@@ -62,6 +62,42 @@ IF module already specified (status = "specified" in master):
|
|
|
62
62
|
Increment currentModuleIndex, re-check
|
|
63
63
|
IF all modules specified → Load step-04-consolidation.md, STOP
|
|
64
64
|
|
|
65
|
+
### 1b. Cache Warming for Module Loop (FIRST MODULE ONLY)
|
|
66
|
+
|
|
67
|
+
> **Performance Optimization:** Pre-load module specification references to reduce redundant reads across all modules.
|
|
68
|
+
> This step runs ONLY for the FIRST module (currentModuleIndex = 0), not repeated for subsequent modules.
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
IF currentModuleIndex === 0:
|
|
72
|
+
// Pre-load module specification references (Bucket 3)
|
|
73
|
+
const moduleRefs = [
|
|
74
|
+
"~/.claude/skills/business-analyse/references/spec-auto-inference.md",
|
|
75
|
+
"~/.claude/skills/business-analyse/references/ui-resource-cards.md",
|
|
76
|
+
"~/.claude/skills/business-analyse/references/ui-dashboard-spec.md",
|
|
77
|
+
"~/.claude/skills/business-analyse/references/cadrage-vibe-coding.md"
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
for (const file of moduleRefs) {
|
|
81
|
+
read(file); // Pre-load into cache
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
Display: "✓ Cache warmed: module specification references (23KB, 4 files)"
|
|
85
|
+
Display: " Expected token savings: 75% reduction in reference reads across module loop"
|
|
86
|
+
Display: " Retention: until step-04 (after all modules specified)"
|
|
87
|
+
ELSE:
|
|
88
|
+
// Subsequent modules use cached references (no re-load)
|
|
89
|
+
Display: "✓ Using cached module references (from first module)"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Rationale:**
|
|
93
|
+
|
|
94
|
+
- Module specification references are read 2-3× PER MODULE (5 modules = 10-15 reads without caching)
|
|
95
|
+
- Pre-loading once at start of module loop eliminates 75% of redundant reads
|
|
96
|
+
- Token savings: ~10,000 tokens for a 5-module application
|
|
97
|
+
- Cache retained until step-04 (when consolidation starts, references no longer needed)
|
|
98
|
+
|
|
99
|
+
See [references/cache-warming-strategy.md](../references/cache-warming-strategy.md) § Bucket 3 for details.
|
|
100
|
+
|
|
65
101
|
### 2. Initialize Module Feature.json
|
|
66
102
|
|
|
67
103
|
```
|
|
@@ -161,7 +161,7 @@ Module → Sections → Resources (levels 3-4-5 of the hierarchy).
|
|
|
161
161
|
|
|
162
162
|
#### 8f. SeedData Core
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
7 MANDATORY typed arrays — each with structured objects, NOT flat strings or objects.
|
|
165
165
|
|
|
166
166
|
> **STRUCTURE CARD: specification.seedDataCore**
|
|
167
167
|
> ```json
|
|
@@ -169,6 +169,16 @@ Module → Sections → Resources (levels 3-4-5 of the hierarchy).
|
|
|
169
169
|
> "navigationModules": [
|
|
170
170
|
> { "code": "{module}", "label": "{Module Name}", "icon": "list", "route": "/business/{app}/{module}", "parentCode": "{app}", "sort": 1 }
|
|
171
171
|
> ],
|
|
172
|
+
> "navigationSections": [
|
|
173
|
+
> { "code": "list", "label": "Liste", "icon": "List", "route": "/business/{app}/{module}/list", "parentCode": "{module}", "permission": "business.{app}.{module}.read", "sort": 1 },
|
|
174
|
+
> { "code": "detail", "label": "Détail", "icon": "FileText", "route": "/business/{app}/{module}/detail/:id", "parentCode": "{module}", "permission": "business.{app}.{module}.read", "sort": 2 },
|
|
175
|
+
> { "code": "create", "label": "Créer", "icon": "Plus", "route": "/business/{app}/{module}/create", "parentCode": "{module}", "permission": "business.{app}.{module}.create", "sort": 3 }
|
|
176
|
+
> ],
|
|
177
|
+
> "navigationResources": [
|
|
178
|
+
> { "code": "{module}-grid", "type": "SmartTable", "entity": "{Entity}", "parentCode": "list", "permission": "business.{app}.{module}.read" },
|
|
179
|
+
> { "code": "{module}-form", "type": "SmartForm", "entity": "{Entity}", "parentCode": "create", "permission": "business.{app}.{module}.create" },
|
|
180
|
+
> { "code": "{module}-detail-card", "type": "DetailCard", "entity": "{Entity}", "parentCode": "detail", "permission": "business.{app}.{module}.read" }
|
|
181
|
+
> ],
|
|
172
182
|
> "navigationTranslations": [
|
|
173
183
|
> { "moduleCode": "{module}", "language": "fr", "label": "..." },
|
|
174
184
|
> { "moduleCode": "{module}", "language": "en", "label": "..." },
|
|
@@ -189,9 +199,68 @@ Module → Sections → Resources (levels 3-4-5 of the hierarchy).
|
|
|
189
199
|
> ]
|
|
190
200
|
> }
|
|
191
201
|
> ```
|
|
192
|
-
> **MANDATORY:** All
|
|
202
|
+
> **MANDATORY:** All 7 arrays must be present. Each element must be an object, NOT a string.
|
|
203
|
+
> **CRITICAL:** `navigationSections` and `navigationResources` are DERIVED from `specification.sections[]` — use the transform algorithm below (section 8f-bis).
|
|
193
204
|
> **FORBIDDEN:** Do NOT use `navigationModule` (singular string), `permissions` as flat string array, `rolePermissions` as flat object, `permissionsConstants` as comma-separated string.
|
|
194
205
|
|
|
206
|
+
#### 8f-bis. Transform Sections into Navigation SeedData
|
|
207
|
+
|
|
208
|
+
> **CRITICAL:** `navigationSections` and `navigationResources` must be generated from `specification.sections[]`.
|
|
209
|
+
> This ensures the navigation hierarchy (Module → Section → Resource) is complete in the database.
|
|
210
|
+
|
|
211
|
+
**Transform algorithm:**
|
|
212
|
+
|
|
213
|
+
```javascript
|
|
214
|
+
// 1. Transform specification.sections[] into navigationSections
|
|
215
|
+
const navigationSections = specification.sections.map((section, index) => ({
|
|
216
|
+
code: section.code, // e.g., "list", "detail", "dashboard"
|
|
217
|
+
label: section.labels.fr, // Default language (fr)
|
|
218
|
+
icon: section.icon, // Lucide icon name
|
|
219
|
+
route: section.route, // Full route path
|
|
220
|
+
parentCode: metadata.module, // Module code (parent)
|
|
221
|
+
permission: section.permission, // Required permission
|
|
222
|
+
sort: index + 1 // Display order (1-based)
|
|
223
|
+
}));
|
|
224
|
+
|
|
225
|
+
// 2. Transform specification.sections[].resources[] into navigationResources
|
|
226
|
+
const navigationResources = specification.sections.flatMap(section =>
|
|
227
|
+
section.resources.map(resource => ({
|
|
228
|
+
code: resource.code, // e.g., "employees-grid"
|
|
229
|
+
type: resource.type, // e.g., "SmartTable", "SmartForm"
|
|
230
|
+
entity: resource.entity, // e.g., "Employee"
|
|
231
|
+
parentCode: section.code, // Section code (parent)
|
|
232
|
+
permission: resource.permission // Optional (can inherit from section)
|
|
233
|
+
}))
|
|
234
|
+
);
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Write to seedDataCore:**
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
ba-writer.enrichSection({
|
|
241
|
+
feature_id,
|
|
242
|
+
section: "specification",
|
|
243
|
+
data: {
|
|
244
|
+
seedDataCore: {
|
|
245
|
+
navigationModules: [ ... ],
|
|
246
|
+
navigationSections: navigationSections, // DERIVED
|
|
247
|
+
navigationResources: navigationResources, // DERIVED
|
|
248
|
+
navigationTranslations: [ ... ],
|
|
249
|
+
permissions: [ ... ],
|
|
250
|
+
rolePermissions: [ ... ],
|
|
251
|
+
permissionConstants: [ ... ]
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
})
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Validation:**
|
|
258
|
+
|
|
259
|
+
- EVERY section in `specification.sections[]` MUST appear in `navigationSections`
|
|
260
|
+
- EVERY resource in `specification.sections[].resources[]` MUST appear in `navigationResources`
|
|
261
|
+
- Total count: `navigationSections.length === specification.sections.length`
|
|
262
|
+
- Total count: `navigationResources.length === sum(sections[].resources.length)`
|
|
263
|
+
|
|
195
264
|
#### 8g. Gherkin Scenarios
|
|
196
265
|
|
|
197
266
|
BDD acceptance tests per UC.
|
|
@@ -126,6 +126,280 @@ 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
|
+
> **Rationale:** Prevents incomplete modules from reaching handoff, reduces ralph-loop failures.
|
|
133
|
+
|
|
134
|
+
**Execute BEFORE updating module status to "specified":**
|
|
135
|
+
|
|
136
|
+
```javascript
|
|
137
|
+
const checklist = {
|
|
138
|
+
// SECTION 1: DATA MODEL (BLOCKING)
|
|
139
|
+
entities: {
|
|
140
|
+
minimum: 2,
|
|
141
|
+
actual: specification.entities.length,
|
|
142
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
143
|
+
blocking: true,
|
|
144
|
+
details: "At least 2 entities required for a meaningful module"
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
entityAttributes: {
|
|
148
|
+
check: "All entities have ≥3 attributes",
|
|
149
|
+
status: validateAllEntities(e => e.attributes.length >= 3) ? "PASS" : "FAIL",
|
|
150
|
+
blocking: true,
|
|
151
|
+
details: "Entities with <3 attributes are likely incomplete"
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
entityRelationships: {
|
|
155
|
+
check: "All entities have relationships defined (or explicitly marked as standalone)",
|
|
156
|
+
status: validateEntityRelationships() ? "PASS" : "FAIL",
|
|
157
|
+
blocking: false, // WARNING only
|
|
158
|
+
details: "Standalone entities should be rare in business modules"
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// SECTION 2: BUSINESS RULES (BLOCKING)
|
|
162
|
+
businessRules: {
|
|
163
|
+
minimum: 4,
|
|
164
|
+
actual: analysis.businessRules.length,
|
|
165
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
166
|
+
blocking: true,
|
|
167
|
+
details: "Minimum 4 BRs (mix of VAL/CALC/WF/SEC/DATA)"
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
businessRuleCategories: {
|
|
171
|
+
check: "BRs cover ≥2 categories (VAL, CALC, WF, SEC, DATA)",
|
|
172
|
+
status: countUniqueCategories(analysis.businessRules) >= 2 ? "PASS" : "FAIL",
|
|
173
|
+
blocking: true,
|
|
174
|
+
details: "Single-category modules are likely incomplete"
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
businessRulePrefixes: {
|
|
178
|
+
check: "All BR IDs use module prefix (e.g., BR-VAL-{PREFIX}-NNN)",
|
|
179
|
+
status: validateBRPrefixes() ? "PASS" : "FAIL",
|
|
180
|
+
blocking: true,
|
|
181
|
+
details: "Missing prefixes cause ID collisions in multi-module apps"
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
// SECTION 3: USE CASES & REQUIREMENTS (BLOCKING)
|
|
185
|
+
useCases: {
|
|
186
|
+
minimum: 6,
|
|
187
|
+
actual: specification.useCases.length,
|
|
188
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
189
|
+
blocking: true,
|
|
190
|
+
details: "Minimum 6 UCs (CRUD + 2 business-specific)"
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
useCasePrefixes: {
|
|
194
|
+
check: "All UC IDs use module prefix (UC-{PREFIX}-NNN)",
|
|
195
|
+
status: validateUCPrefixes() ? "PASS" : "FAIL",
|
|
196
|
+
blocking: true,
|
|
197
|
+
details: "Missing prefixes cause ID collisions"
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
functionalRequirements: {
|
|
201
|
+
minimum: 4,
|
|
202
|
+
actual: specification.functionalRequirements.length,
|
|
203
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
204
|
+
blocking: true,
|
|
205
|
+
details: "FRs must cover key functionality"
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
ucFrLinkage: {
|
|
209
|
+
check: "Every UC has ≥1 linked FR",
|
|
210
|
+
status: validateUCtoFRLinkage() ? "PASS" : "FAIL",
|
|
211
|
+
blocking: true,
|
|
212
|
+
details: "Orphan UCs indicate incomplete requirements"
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
frBrLinkage: {
|
|
216
|
+
check: "Every FR has ≥1 linked BR",
|
|
217
|
+
status: validateFRtoBRLinkage() ? "PASS" : "FAIL",
|
|
218
|
+
blocking: false, // WARNING only
|
|
219
|
+
details: "FRs without BRs may lack validation/calculation logic"
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
// SECTION 4: PERMISSIONS (BLOCKING)
|
|
223
|
+
permissions: {
|
|
224
|
+
minimum: 5,
|
|
225
|
+
actual: specification.permissionMatrix.permissions.length,
|
|
226
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
227
|
+
blocking: true,
|
|
228
|
+
details: "Minimum 5 permissions (CRUD + 1 business action)"
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
permissionFormat: {
|
|
232
|
+
check: "All permissions use full format: business.{app}.{module}.{resource}.{action}",
|
|
233
|
+
status: validatePermissionFormat() ? "PASS" : "FAIL",
|
|
234
|
+
blocking: true,
|
|
235
|
+
details: "Wrong format breaks RBAC system"
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
rolePermissions: {
|
|
239
|
+
check: "All application roles have ≥1 permission assigned",
|
|
240
|
+
status: validateRoleAssignments() ? "PASS" : "FAIL",
|
|
241
|
+
blocking: true,
|
|
242
|
+
details: "Roles without permissions are useless"
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
// SECTION 5: UI & NAVIGATION (BLOCKING)
|
|
246
|
+
sections: {
|
|
247
|
+
minimum: 2,
|
|
248
|
+
actual: specification.sections.length,
|
|
249
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
250
|
+
blocking: true,
|
|
251
|
+
details: "Modules need ≥2 sections (list + form minimum)"
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
wireframes: {
|
|
255
|
+
minimum: specification.sections.length, // 1 wireframe PER section
|
|
256
|
+
actual: specification.uiWireframes.length,
|
|
257
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
258
|
+
blocking: true,
|
|
259
|
+
details: "EVERY section MUST have a wireframe (ASCII/SVG)"
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
navigation: {
|
|
263
|
+
check: "Module has ≥1 navigation entry",
|
|
264
|
+
status: specification.navigation.entries.length >= 1 ? "PASS" : "FAIL",
|
|
265
|
+
blocking: true,
|
|
266
|
+
details: "Module must be accessible in menu"
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
// SECTION 6: I18N & MESSAGES (BLOCKING)
|
|
270
|
+
i18nKeys: {
|
|
271
|
+
minimum: 42, // Realistic minimum for a module
|
|
272
|
+
actual: specification.i18nKeys.length,
|
|
273
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
274
|
+
blocking: true,
|
|
275
|
+
details: "Keys needed: entities (×2), fields, messages, validation, navigation"
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
i18nLanguages: {
|
|
279
|
+
check: "All i18n keys have 4 languages (fr, en, nl, de)",
|
|
280
|
+
status: validateI18nCompleteness() ? "PASS" : "FAIL",
|
|
281
|
+
blocking: true,
|
|
282
|
+
details: "Missing translations break multi-language support"
|
|
283
|
+
},
|
|
284
|
+
|
|
285
|
+
messages: {
|
|
286
|
+
minimum: 4,
|
|
287
|
+
actual: specification.messages.length,
|
|
288
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
289
|
+
blocking: true,
|
|
290
|
+
details: "Minimum: 1 success, 1 error, 1 warning, 1 info"
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
// SECTION 7: SEED DATA (BLOCKING)
|
|
294
|
+
seedDataCore: {
|
|
295
|
+
check: "All 5 CORE seed data sections present",
|
|
296
|
+
requiredSections: [
|
|
297
|
+
"navigationModules",
|
|
298
|
+
"navigationTranslations",
|
|
299
|
+
"permissions",
|
|
300
|
+
"rolePermissions",
|
|
301
|
+
"permissionConstants"
|
|
302
|
+
],
|
|
303
|
+
status: validateSeedDataCore() ? "PASS" : "FAIL",
|
|
304
|
+
blocking: true,
|
|
305
|
+
details: "Missing CORE seed data breaks module deployment"
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
seedDataBusiness: {
|
|
309
|
+
check: "Business seed data template defined (even if empty)",
|
|
310
|
+
status: specification.seedDataBusiness !== undefined ? "PASS" : "FAIL",
|
|
311
|
+
blocking: false, // WARNING only
|
|
312
|
+
details: "Business seed data helps with testing"
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
// SECTION 8: API ENDPOINTS (BLOCKING)
|
|
316
|
+
apiEndpoints: {
|
|
317
|
+
minimum: 5,
|
|
318
|
+
actual: specification.apiEndpoints.length,
|
|
319
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
320
|
+
blocking: true,
|
|
321
|
+
details: "Minimum 5 endpoints (CRUD + 1 business action)"
|
|
322
|
+
},
|
|
323
|
+
|
|
324
|
+
apiPermissions: {
|
|
325
|
+
check: "Every API endpoint has permission defined",
|
|
326
|
+
status: validateAPIPermissions() ? "PASS" : "FAIL",
|
|
327
|
+
blocking: true,
|
|
328
|
+
details: "Endpoints without permissions are security holes"
|
|
329
|
+
},
|
|
330
|
+
|
|
331
|
+
// SECTION 9: VALIDATIONS (BLOCKING)
|
|
332
|
+
validations: {
|
|
333
|
+
minimum: 1,
|
|
334
|
+
actual: specification.validations.length,
|
|
335
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
336
|
+
blocking: true,
|
|
337
|
+
details: "Modules need field validation rules"
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
// SECTION 10: GHERKIN SCENARIOS (WARNING)
|
|
341
|
+
gherkinScenarios: {
|
|
342
|
+
minimum: 2,
|
|
343
|
+
actual: specification.gherkinScenarios.scenarios.length,
|
|
344
|
+
status: actual >= minimum ? "PASS" : "FAIL",
|
|
345
|
+
blocking: false, // WARNING only
|
|
346
|
+
details: "Gherkin scenarios enable automated testing"
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// BLOCKING CHECK: Count failures in BLOCKING items
|
|
351
|
+
const blockingFailures = Object.entries(checklist)
|
|
352
|
+
.filter(([key, check]) => check.blocking === true && check.status === "FAIL")
|
|
353
|
+
.map(([key, check]) => ({ section: key, ...check }));
|
|
354
|
+
|
|
355
|
+
IF blockingFailures.length > 0:
|
|
356
|
+
**BLOCKING ERROR:** Module specification incomplete
|
|
357
|
+
|
|
358
|
+
Display table:
|
|
359
|
+
| Section | Required | Actual | Status | Details |
|
|
360
|
+
|---------|----------|--------|--------|---------|
|
|
361
|
+
{for each blocking failure}
|
|
362
|
+
|
|
363
|
+
ACTIONS REQUIRED:
|
|
364
|
+
1. Fix ALL blocking failures listed above
|
|
365
|
+
2. Re-run step-03d validation
|
|
366
|
+
3. DO NOT mark module as "specified" until ALL blocking checks pass
|
|
367
|
+
|
|
368
|
+
STOP - DO NOT PROCEED TO UPDATE STATUS
|
|
369
|
+
ELSE:
|
|
370
|
+
All blocking checks passed ✓
|
|
371
|
+
{count} warnings (non-blocking)
|
|
372
|
+
Proceed to mark module as "specified"
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**Display Checklist Summary:**
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
═══════════════════════════════════════════════════════════════
|
|
379
|
+
MODULE SPECIFICATION CHECKLIST - {currentModule}
|
|
380
|
+
═══════════════════════════════════════════════════════════════
|
|
381
|
+
|
|
382
|
+
| Category | Checks | Passed | Failed | Warnings |
|
|
383
|
+
|----------|--------|--------|--------|----------|
|
|
384
|
+
| Data Model | 3 | {n} | {n} | {n} |
|
|
385
|
+
| Business Rules | 3 | {n} | {n} | {n} |
|
|
386
|
+
| Use Cases & FRs | 4 | {n} | {n} | {n} |
|
|
387
|
+
| Permissions | 3 | {n} | {n} | {n} |
|
|
388
|
+
| UI & Navigation | 3 | {n} | {n} | {n} |
|
|
389
|
+
| I18N & Messages | 3 | {n} | {n} | {n} |
|
|
390
|
+
| Seed Data | 2 | {n} | {n} | {n} |
|
|
391
|
+
| API Endpoints | 2 | {n} | {n} | {n} |
|
|
392
|
+
| Validations | 1 | {n} | {n} | {n} |
|
|
393
|
+
| Gherkin | 1 | {n} | {n} | {n} |
|
|
394
|
+
|
|
395
|
+
TOTAL: {total_checks} checks | {passed} ✓ | {failed} ✗ | {warnings} ⚠
|
|
396
|
+
|
|
397
|
+
STATUS: {failed === 0 ? "READY FOR SPECIFIED" : "INCOMPLETE - FIX REQUIRED"}
|
|
398
|
+
═══════════════════════════════════════════════════════════════
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**IF ALL BLOCKING CHECKS PASS → Proceed to update module status to "specified"**
|
|
402
|
+
|
|
129
403
|
---
|
|
130
404
|
|
|
131
405
|
### 10. Module Summary with Roles & Permissions
|