@atlashub/smartstack-cli 3.10.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.
Files changed (35) hide show
  1. package/dist/index.js +2544 -2461
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +479 -6185
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/agents/db-reader.md +149 -0
  7. package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +9 -19
  8. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +12 -2
  9. package/templates/skills/business-analyse/references/deploy-data-build.md +36 -25
  10. package/templates/skills/business-analyse/references/detection-strategies.md +424 -0
  11. package/templates/skills/business-analyse/references/html-data-mapping.md +4 -0
  12. package/templates/skills/business-analyse/references/prd-generation.md +258 -0
  13. package/templates/skills/business-analyse/references/validate-incremental-html.md +47 -4
  14. package/templates/skills/business-analyse/references/validation-checklist.md +281 -0
  15. package/templates/skills/business-analyse/steps/step-00-init.md +50 -221
  16. package/templates/skills/business-analyse/steps/step-01-cadrage.md +8 -22
  17. package/templates/skills/business-analyse/steps/step-03a-data.md +20 -446
  18. package/templates/skills/business-analyse/steps/step-03a1-setup.md +356 -0
  19. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +143 -0
  20. package/templates/skills/business-analyse/steps/step-03b-ui.md +3 -0
  21. package/templates/skills/business-analyse/steps/step-03c-compile.md +1 -1
  22. package/templates/skills/business-analyse/steps/step-03d-validate.md +21 -262
  23. package/templates/skills/business-analyse/steps/step-04-consolidation.md +21 -606
  24. package/templates/skills/business-analyse/steps/step-04a-collect.md +304 -0
  25. package/templates/skills/business-analyse/steps/step-04b-analyze.md +239 -0
  26. package/templates/skills/business-analyse/steps/step-04c-decide.md +186 -0
  27. package/templates/skills/business-analyse/steps/step-05b-deploy.md +21 -0
  28. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +27 -35
  29. package/templates/skills/debug/SKILL.md +156 -53
  30. package/templates/skills/debug/references/team-protocol.md +232 -0
  31. package/templates/skills/ralph-loop/references/category-rules.md +46 -0
  32. package/templates/skills/ralph-loop/references/compact-loop.md +32 -2
  33. package/templates/skills/ralph-loop/references/core-seed-data.md +60 -0
  34. package/templates/skills/ralph-loop/steps/step-00-init.md +64 -1
  35. 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 | 5 sections present | PASS/FAIL (BLOCKING) |
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": 5, "minimum": 5, "status": "PASS|FAIL" }
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" },
@@ -129,276 +129,35 @@ ba-writer.enrichSection({
129
129
  #### 9f. Module Specification Checklist (BLOCKING)
130
130
 
131
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
132
 
134
- **Execute BEFORE updating module status to "specified":**
133
+ **Execute the comprehensive validation checklist:**
135
134
 
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
- };
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)
349
139
 
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 }));
140
+ ```javascript
141
+ const blockingFailures = checks.filter(c => c.blocking && c.status === "FAIL");
354
142
 
355
143
  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}
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
362
150
 
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
151
+ BLOCKING ERROR: Module specification incomplete
152
+ Fix all failures before proceeding
367
153
 
368
- STOP - DO NOT PROCEED TO UPDATE STATUS
369
154
  ELSE:
370
155
  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
- ═══════════════════════════════════════════════════════════════
156
+ Display: "{warnings_count} warnings (non-blocking)"
157
+ Proceed to mark module as "specified"
399
158
  ```
400
159
 
401
- **IF ALL BLOCKING CHECKS PASS Proceed to update module status to "specified"**
160
+ **Optimization:** The detailed 280-line validation-checklist.md is loaded **only when validation fails** (saves ~10,000 tokens on success path).
402
161
 
403
162
  ---
404
163
 
@@ -475,7 +234,7 @@ ba-writer.enrichSection({
475
234
  functionalRequirements: [{id, statement, priority, linkedRules, linkedUseCases, acceptanceCriteria}], // 8c
476
235
  permissionMatrix: {permissions: [], roleAssignments: []}, // 8d
477
236
  navigation: {entries: []}, // 8e
478
- seedDataCore: {navigationModules, navigationTranslations, permissions, rolePermissions, permissionConstants}, // 8f
237
+ seedDataCore: {navigationModules, navigationSections, navigationResources, navigationTranslations, permissions, rolePermissions, permissionConstants}, // 8f (7 arrays)
479
238
  gherkinScenarios: [{feature, scenarios: [{name, tags, given, when, then}]}], // 8g
480
239
  validations: [{entity, field, rules, errorMessageKey}], // 8h
481
240
  messages: [{code, type, title, message, i18nKey}], // 8i