@atlashub/smartstack-cli 4.74.0 → 4.76.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 (121) hide show
  1. package/dist/index.js +152 -31
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +14 -3
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/agents/ba-reader.md +17 -15
  7. package/templates/agents/ba-writer.md +49 -51
  8. package/templates/skills/apex/SKILL.md +2 -2
  9. package/templates/skills/apex/_shared.md +1 -1
  10. package/templates/skills/apex/references/checks/backend-checks.sh +21 -7
  11. package/templates/skills/apex/references/checks/frontend-checks.sh +26 -0
  12. package/templates/skills/apex/references/checks/infrastructure-checks.sh +47 -10
  13. package/templates/skills/apex/references/checks/seed-checks.sh +47 -7
  14. package/templates/skills/apex/references/core-seed-data.md +20 -18
  15. package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +3 -0
  16. package/templates/skills/apex/references/post-checks.md +23 -3
  17. package/templates/skills/apex/references/smartstack-api.md +4 -4
  18. package/templates/skills/apex/references/smartstack-frontend.md +54 -8
  19. package/templates/skills/apex/references/smartstack-layers.md +6 -6
  20. package/templates/skills/apex/steps/step-00-init.md +75 -1
  21. package/templates/skills/apex/steps/step-03-execute.md +16 -4
  22. package/templates/skills/apex/steps/step-03b-layer1-seed.md +65 -6
  23. package/templates/skills/apex/steps/step-03c-layer2-backend.md +50 -5
  24. package/templates/skills/apex/steps/step-03d-layer3-frontend.md +226 -4
  25. package/templates/skills/apex/steps/step-04-examine.md +163 -0
  26. package/templates/skills/apex-verify/SKILL.md +110 -0
  27. package/templates/skills/apex-verify/references/audit-rules.md +50 -0
  28. package/templates/skills/apex-verify/steps/step-00-init.md +119 -0
  29. package/templates/skills/apex-verify/steps/step-01-nav-audit.md +92 -0
  30. package/templates/skills/apex-verify/steps/step-02-crud-audit.md +127 -0
  31. package/templates/skills/apex-verify/steps/step-03-perm-audit.md +119 -0
  32. package/templates/skills/apex-verify/steps/step-04-route-audit.md +98 -0
  33. package/templates/skills/apex-verify/steps/step-05-report.md +110 -0
  34. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +3 -0
  35. package/templates/skills/application/templates-frontend.md +2 -2
  36. package/templates/skills/business-analyse/SKILL.md +17 -3
  37. package/templates/skills/business-analyse/_shared.md +64 -0
  38. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +34 -26
  39. package/templates/skills/business-analyse/questionnaire/01-context.md +13 -9
  40. package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +20 -27
  41. package/templates/skills/business-analyse/questionnaire.md +86 -9
  42. package/templates/skills/business-analyse/references/03-json-schemas.md +221 -0
  43. package/templates/skills/business-analyse/references/03-post-check-validation.md +208 -0
  44. package/templates/skills/business-analyse/references/03-smartstack-entity-guards.md +32 -0
  45. package/templates/skills/business-analyse/references/04-cross-module-validation.md +95 -0
  46. package/templates/skills/business-analyse/references/04-file-allocation.md +162 -0
  47. package/templates/skills/business-analyse/references/04-naming-audit-checks.md +174 -0
  48. package/templates/skills/business-analyse/references/04-semantic-validation-matrix.md +118 -0
  49. package/templates/skills/business-analyse/references/canonical-json-formats.md +7 -3
  50. package/templates/skills/business-analyse/references/domain-research-playbook.md +234 -0
  51. package/templates/skills/business-analyse/references/entity-sourcing-presentation.md +166 -0
  52. package/templates/skills/business-analyse/references/init-resume-logic.md +70 -0
  53. package/templates/skills/business-analyse/references/module-completeness-challenge.md +174 -0
  54. package/templates/skills/business-analyse/references/multi-app-detection.md +149 -0
  55. package/templates/skills/business-analyse/references/portal-classification.md +52 -0
  56. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  57. package/templates/skills/business-analyse/references/validation-checklist.md +35 -6
  58. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +50 -6
  59. package/templates/skills/business-analyse/steps/step-00-init.md +22 -190
  60. package/templates/skills/business-analyse/steps/step-01-cadrage.md +365 -269
  61. package/templates/skills/business-analyse/steps/step-02-structure.md +98 -20
  62. package/templates/skills/business-analyse/steps/step-03-specify.md +810 -229
  63. package/templates/skills/business-analyse/steps/step-04-consolidate.md +509 -278
  64. package/templates/skills/business-analyse-design/SKILL.md +10 -0
  65. package/templates/skills/business-analyse-design/references/screens-post-check.md +221 -0
  66. package/templates/skills/business-analyse-design/references/screens-type-mapping.md +138 -0
  67. package/templates/skills/business-analyse-design/references/smartcomponents-templates.md +225 -0
  68. package/templates/skills/{business-analyse → business-analyse-design}/references/spec-auto-inference.md +117 -117
  69. package/templates/skills/business-analyse-design/steps/step-01-screens.md +36 -162
  70. package/templates/skills/business-analyse-design/steps/step-02-wireframes.md +8 -7
  71. package/templates/skills/business-analyse-design/steps/step-03-navigation.md +89 -42
  72. package/templates/skills/business-analyse-develop/references/compact-loop.md +9 -0
  73. package/templates/skills/business-analyse-develop/references/handoff-quality-gate.md +132 -0
  74. package/templates/skills/business-analyse-develop/references/prd-v3-transformation.md +326 -0
  75. package/templates/skills/business-analyse-develop/references/report-reconciliation.md +140 -0
  76. package/templates/skills/business-analyse-develop/references/report-template.md +142 -0
  77. package/templates/skills/business-analyse-develop/steps/step-01-task.md +5 -177
  78. package/templates/skills/business-analyse-develop/steps/step-02-execute.md +17 -4
  79. package/templates/skills/business-analyse-develop/steps/step-03-commit.md +6 -2
  80. package/templates/skills/business-analyse-develop/steps/step-04-check.md +6 -0
  81. package/templates/skills/business-analyse-develop/steps/step-05-report.md +3 -269
  82. package/templates/skills/business-analyse-handoff/SKILL.md +10 -0
  83. package/templates/skills/business-analyse-handoff/references/agent-handoff-transform-prompt.md +211 -0
  84. package/templates/skills/business-analyse-handoff/references/context-isolation-pattern.md +47 -0
  85. package/templates/skills/business-analyse-handoff/references/handoff-file-inventory.md +49 -0
  86. package/templates/skills/business-analyse-handoff/references/handoff-global-validation.md +142 -0
  87. package/templates/skills/business-analyse-handoff/references/prd-validation-checks.md +125 -0
  88. package/templates/skills/business-analyse-handoff/references/project-index-update.md +98 -0
  89. package/templates/skills/business-analyse-handoff/steps/step-01-transform.md +9 -160
  90. package/templates/skills/business-analyse-handoff/steps/step-02-export.md +10 -99
  91. package/templates/skills/business-analyse-html/SKILL.md +10 -0
  92. package/templates/skills/business-analyse-html/html/ba-interactive.html +504 -97
  93. package/templates/skills/business-analyse-html/html/src/scripts/01-data-init.js +79 -2
  94. package/templates/skills/business-analyse-html/html/src/scripts/02-navigation.js +6 -46
  95. package/templates/skills/business-analyse-html/html/src/scripts/05-render-specs.js +80 -11
  96. package/templates/skills/business-analyse-html/html/src/scripts/06-render-consolidation.js +2 -2
  97. package/templates/skills/business-analyse-html/html/src/scripts/06-render-mockups.js +94 -36
  98. package/templates/skills/business-analyse-html/html/src/scripts/12-render-diagrams.js +162 -0
  99. package/templates/skills/business-analyse-html/html/src/styles/10-diagrams.css +73 -0
  100. package/templates/skills/business-analyse-html/html/src/template.html +2 -0
  101. package/templates/skills/business-analyse-html/references/02-embedded-artifacts-building.md +144 -0
  102. package/templates/skills/business-analyse-html/references/02-feature-data-building.md +143 -0
  103. package/templates/skills/business-analyse-html/references/02-mapping-tables.md +442 -0
  104. package/templates/skills/business-analyse-html/references/02-normalization-helpers.md +139 -0
  105. package/templates/skills/business-analyse-html/references/02-screen-format-detection.md +283 -0
  106. package/templates/skills/business-analyse-html/references/02-self-check-validation.md +199 -0
  107. package/templates/skills/business-analyse-html/references/data-build.md +24 -1
  108. package/templates/skills/business-analyse-html/references/data-mapping.md +119 -17
  109. package/templates/skills/business-analyse-html/steps/step-02-build-data.md +18 -555
  110. package/templates/skills/business-analyse-html/steps/step-04-verify.md +92 -3
  111. package/templates/skills/business-analyse-quick/SKILL.md +807 -0
  112. package/templates/skills/{sketch → business-analyse-quick}/references/domain-heuristics.md +59 -3
  113. package/templates/skills/business-analyse-quick/references/prd-schema.md +268 -0
  114. package/templates/skills/business-analyse-review/SKILL.md +10 -0
  115. package/templates/skills/business-analyse-review/references/review-data-mapping.md +6 -0
  116. package/templates/skills/business-analyse-status/SKILL.md +8 -0
  117. package/templates/skills/dev-start/SKILL.md +143 -307
  118. package/templates/skills/efcore/SKILL.md +13 -0
  119. package/templates/skills/sketch/SKILL.md +15 -153
  120. package/templates/skills/ui-components/SKILL.md +1 -1
  121. package/templates/skills/ui-components/patterns/data-table.md +1 -1
@@ -8,7 +8,7 @@ model: opus
8
8
 
9
9
  ## YOUR TASK
10
10
 
11
- Run 9 blocking validations on the generated HTML file and display the completion summary.
11
+ Run 16 blocking validations on the generated HTML file and display the completion summary.
12
12
 
13
13
  ---
14
14
 
@@ -105,11 +105,97 @@ IF "modules" is missing:
105
105
  BLOCKING_ERROR("FEATURE_DATA.modules missing — page will crash")
106
106
  ```
107
107
 
108
- > **IF any check fails:** fix the issue and re-run the failing step before completing.
108
+ > **IF any check fails (1-9):** fix the issue and re-run the failing step before completing.
109
+
110
+ ### 2. Content Quality Validations (NEW)
111
+
112
+ **Check 10 — Language coherence:**
113
+ ```
114
+ Read FEATURE_DATA.metadata.language (or config.json language field)
115
+ IF language is set (e.g., "fr"):
116
+ FOR each module in FEATURE_DATA.modules:
117
+ const spec = FEATURE_DATA.moduleSpecs[module.code]
118
+
119
+ // Check UC names
120
+ FOR each uc in spec.useCases:
121
+ IF language == "fr" AND uc.name matches /^(Create|Update|Delete|View|List|Manage|Submit|Approve|Reject|Export)\b/:
122
+ WARNING("Module {module.code}: UC '{uc.name}' appears English (expected French)")
123
+
124
+ // Check BR statements
125
+ FOR each br in spec.businessRules:
126
+ IF language == "fr" AND br.statement matches /\b(must|should|cannot|when|if the|is required)\b/i:
127
+ WARNING("Module {module.code}: BR '{br.name}' statement appears English (expected French)")
128
+
129
+ Count total warnings. IF > 20% of items are in wrong language:
130
+ WARNING("⚠ Significant language mismatch: {count} items in wrong language")
131
+ ```
132
+
133
+ **Check 11 — Business rules have examples:**
134
+ ```
135
+ FOR each module in FEATURE_DATA.modules:
136
+ const brs = FEATURE_DATA.moduleSpecs[module.code].businessRules || []
137
+ IF brs.length === 0: SKIP
138
+ const withExamples = brs.filter(br => br.example && br.example.trim() !== '')
139
+ const rate = withExamples.length / brs.length
140
+ IF rate < 0.5:
141
+ WARNING("Module {module.code}: only {withExamples.length}/{brs.length} BRs have examples ({rate*100}%)")
142
+ ```
143
+
144
+ **Check 12 — Entity attributes have type field:**
145
+ ```
146
+ FOR each module in FEATURE_DATA.modules:
147
+ const entities = FEATURE_DATA.moduleSpecs[module.code].entities || []
148
+ FOR each entity in entities:
149
+ const attrs = entity.attributes || []
150
+ const withType = attrs.filter(a => a.type && a.type.trim() !== '' && a.type !== 'string')
151
+ IF attrs.length > 3 AND withType.length === 0:
152
+ WARNING("Module {module.code}: entity '{entity.name}' — all {attrs.length} attributes default to 'string' (types may be missing)")
153
+ ```
154
+
155
+ **Check 13 — Permissions populated per module:**
156
+ ```
157
+ FOR each module in FEATURE_DATA.modules:
158
+ const perms = FEATURE_DATA.moduleSpecs[module.code].permissions || []
159
+ IF perms.length === 0:
160
+ WARNING("Module {module.code}: 0 permissions — permission grid will be empty")
161
+ ```
162
+
163
+ **Check 14 — Mockups not empty (screens with actual resources):**
164
+ ```
165
+ FOR each module in FEATURE_DATA.modules:
166
+ const screens = FEATURE_DATA.moduleSpecs[module.code].screens || []
167
+ const wireframes = EMBEDDED_ARTIFACTS.wireframes?.[module.code] || []
168
+ IF screens.length === 0 AND wireframes.length === 0:
169
+ WARNING("Module {module.code}: no screens and no wireframes — Mockups tab will show 'Aucune maquette'")
170
+ ELSE IF screens.length > 0:
171
+ const totalResources = screens.reduce((sum, s) => sum + (s.resources || []).length, 0)
172
+ IF totalResources === 0:
173
+ WARNING("Module {module.code}: has screens[] but 0 resources — mockups will appear empty despite data existing")
174
+ ```
175
+
176
+ **Check 15 — MCD diagram present (multi-module projects):**
177
+ ```
178
+ const diagrams = FEATURE_DATA.consolidation?.mermaidDiagrams || {}
179
+ IF FEATURE_DATA.modules.length > 1:
180
+ IF !diagrams.erd:
181
+ WARNING("No ERD diagram — data model section will have no visual")
182
+ IF !diagrams.mcd:
183
+ WARNING("No MCD diagram — conceptual model not generated")
184
+ ```
185
+
186
+ **Check 16 — Use Case diagrams present:**
187
+ ```
188
+ const ucDiagrams = diagrams.useCases || {}
189
+ const totalUCs = Object.values(FEATURE_DATA.moduleSpecs).reduce((sum, s) => sum + (s.useCases?.length || 0), 0)
190
+ IF Object.keys(ucDiagrams).length === 0 AND totalUCs > 0:
191
+ WARNING("No use case diagrams generated — UC tabs will have no UML visual")
192
+ ```
193
+
194
+ > **Checks 10-16 produce WARNINGs (non-blocking).** Display all warnings in the completion summary so the user is aware of potential quality issues.
109
195
 
110
196
  ---
111
197
 
112
- ### 2. Display Completion Summary
198
+ ### 3. Display Completion Summary
113
199
 
114
200
  ```
115
201
  ══════════════════════════════════════════════════════════════
@@ -131,5 +217,8 @@ Modules: {count} ({names})
131
217
  4. If approved: /business-analyse-handoff then /business-analyse-develop to begin development
132
218
  5. If corrections needed: export ba-review.json from the HTML, then run /business-analyse-review
133
219
 
220
+ Quality Warnings: {warning_count}
221
+ {FOR each warning: display warning message}
222
+
134
223
  ══════════════════════════════════════════════════════════════
135
224
  ```