@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.
- package/dist/index.js +152 -31
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +14 -3
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/ba-reader.md +17 -15
- package/templates/agents/ba-writer.md +49 -51
- package/templates/skills/apex/SKILL.md +2 -2
- package/templates/skills/apex/_shared.md +1 -1
- package/templates/skills/apex/references/checks/backend-checks.sh +21 -7
- package/templates/skills/apex/references/checks/frontend-checks.sh +26 -0
- package/templates/skills/apex/references/checks/infrastructure-checks.sh +47 -10
- package/templates/skills/apex/references/checks/seed-checks.sh +47 -7
- package/templates/skills/apex/references/core-seed-data.md +20 -18
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +3 -0
- package/templates/skills/apex/references/post-checks.md +23 -3
- package/templates/skills/apex/references/smartstack-api.md +4 -4
- package/templates/skills/apex/references/smartstack-frontend.md +54 -8
- package/templates/skills/apex/references/smartstack-layers.md +6 -6
- package/templates/skills/apex/steps/step-00-init.md +75 -1
- package/templates/skills/apex/steps/step-03-execute.md +16 -4
- package/templates/skills/apex/steps/step-03b-layer1-seed.md +65 -6
- package/templates/skills/apex/steps/step-03c-layer2-backend.md +50 -5
- package/templates/skills/apex/steps/step-03d-layer3-frontend.md +226 -4
- package/templates/skills/apex/steps/step-04-examine.md +163 -0
- package/templates/skills/apex-verify/SKILL.md +110 -0
- package/templates/skills/apex-verify/references/audit-rules.md +50 -0
- package/templates/skills/apex-verify/steps/step-00-init.md +119 -0
- package/templates/skills/apex-verify/steps/step-01-nav-audit.md +92 -0
- package/templates/skills/apex-verify/steps/step-02-crud-audit.md +127 -0
- package/templates/skills/apex-verify/steps/step-03-perm-audit.md +119 -0
- package/templates/skills/apex-verify/steps/step-04-route-audit.md +98 -0
- package/templates/skills/apex-verify/steps/step-05-report.md +110 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +3 -0
- package/templates/skills/application/templates-frontend.md +2 -2
- package/templates/skills/business-analyse/SKILL.md +17 -3
- package/templates/skills/business-analyse/_shared.md +64 -0
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +34 -26
- package/templates/skills/business-analyse/questionnaire/01-context.md +13 -9
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +20 -27
- package/templates/skills/business-analyse/questionnaire.md +86 -9
- package/templates/skills/business-analyse/references/03-json-schemas.md +221 -0
- package/templates/skills/business-analyse/references/03-post-check-validation.md +208 -0
- package/templates/skills/business-analyse/references/03-smartstack-entity-guards.md +32 -0
- package/templates/skills/business-analyse/references/04-cross-module-validation.md +95 -0
- package/templates/skills/business-analyse/references/04-file-allocation.md +162 -0
- package/templates/skills/business-analyse/references/04-naming-audit-checks.md +174 -0
- package/templates/skills/business-analyse/references/04-semantic-validation-matrix.md +118 -0
- package/templates/skills/business-analyse/references/canonical-json-formats.md +7 -3
- package/templates/skills/business-analyse/references/domain-research-playbook.md +234 -0
- package/templates/skills/business-analyse/references/entity-sourcing-presentation.md +166 -0
- package/templates/skills/business-analyse/references/init-resume-logic.md +70 -0
- package/templates/skills/business-analyse/references/module-completeness-challenge.md +174 -0
- package/templates/skills/business-analyse/references/multi-app-detection.md +149 -0
- package/templates/skills/business-analyse/references/portal-classification.md +52 -0
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/validation-checklist.md +35 -6
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +50 -6
- package/templates/skills/business-analyse/steps/step-00-init.md +22 -190
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +365 -269
- package/templates/skills/business-analyse/steps/step-02-structure.md +98 -20
- package/templates/skills/business-analyse/steps/step-03-specify.md +810 -229
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +509 -278
- package/templates/skills/business-analyse-design/SKILL.md +10 -0
- package/templates/skills/business-analyse-design/references/screens-post-check.md +221 -0
- package/templates/skills/business-analyse-design/references/screens-type-mapping.md +138 -0
- package/templates/skills/business-analyse-design/references/smartcomponents-templates.md +225 -0
- package/templates/skills/{business-analyse → business-analyse-design}/references/spec-auto-inference.md +117 -117
- package/templates/skills/business-analyse-design/steps/step-01-screens.md +36 -162
- package/templates/skills/business-analyse-design/steps/step-02-wireframes.md +8 -7
- package/templates/skills/business-analyse-design/steps/step-03-navigation.md +89 -42
- package/templates/skills/business-analyse-develop/references/compact-loop.md +9 -0
- package/templates/skills/business-analyse-develop/references/handoff-quality-gate.md +132 -0
- package/templates/skills/business-analyse-develop/references/prd-v3-transformation.md +326 -0
- package/templates/skills/business-analyse-develop/references/report-reconciliation.md +140 -0
- package/templates/skills/business-analyse-develop/references/report-template.md +142 -0
- package/templates/skills/business-analyse-develop/steps/step-01-task.md +5 -177
- package/templates/skills/business-analyse-develop/steps/step-02-execute.md +17 -4
- package/templates/skills/business-analyse-develop/steps/step-03-commit.md +6 -2
- package/templates/skills/business-analyse-develop/steps/step-04-check.md +6 -0
- package/templates/skills/business-analyse-develop/steps/step-05-report.md +3 -269
- package/templates/skills/business-analyse-handoff/SKILL.md +10 -0
- package/templates/skills/business-analyse-handoff/references/agent-handoff-transform-prompt.md +211 -0
- package/templates/skills/business-analyse-handoff/references/context-isolation-pattern.md +47 -0
- package/templates/skills/business-analyse-handoff/references/handoff-file-inventory.md +49 -0
- package/templates/skills/business-analyse-handoff/references/handoff-global-validation.md +142 -0
- package/templates/skills/business-analyse-handoff/references/prd-validation-checks.md +125 -0
- package/templates/skills/business-analyse-handoff/references/project-index-update.md +98 -0
- package/templates/skills/business-analyse-handoff/steps/step-01-transform.md +9 -160
- package/templates/skills/business-analyse-handoff/steps/step-02-export.md +10 -99
- package/templates/skills/business-analyse-html/SKILL.md +10 -0
- package/templates/skills/business-analyse-html/html/ba-interactive.html +504 -97
- package/templates/skills/business-analyse-html/html/src/scripts/01-data-init.js +79 -2
- package/templates/skills/business-analyse-html/html/src/scripts/02-navigation.js +6 -46
- package/templates/skills/business-analyse-html/html/src/scripts/05-render-specs.js +80 -11
- package/templates/skills/business-analyse-html/html/src/scripts/06-render-consolidation.js +2 -2
- package/templates/skills/business-analyse-html/html/src/scripts/06-render-mockups.js +94 -36
- package/templates/skills/business-analyse-html/html/src/scripts/12-render-diagrams.js +162 -0
- package/templates/skills/business-analyse-html/html/src/styles/10-diagrams.css +73 -0
- package/templates/skills/business-analyse-html/html/src/template.html +2 -0
- package/templates/skills/business-analyse-html/references/02-embedded-artifacts-building.md +144 -0
- package/templates/skills/business-analyse-html/references/02-feature-data-building.md +143 -0
- package/templates/skills/business-analyse-html/references/02-mapping-tables.md +442 -0
- package/templates/skills/business-analyse-html/references/02-normalization-helpers.md +139 -0
- package/templates/skills/business-analyse-html/references/02-screen-format-detection.md +283 -0
- package/templates/skills/business-analyse-html/references/02-self-check-validation.md +199 -0
- package/templates/skills/business-analyse-html/references/data-build.md +24 -1
- package/templates/skills/business-analyse-html/references/data-mapping.md +119 -17
- package/templates/skills/business-analyse-html/steps/step-02-build-data.md +18 -555
- package/templates/skills/business-analyse-html/steps/step-04-verify.md +92 -3
- package/templates/skills/business-analyse-quick/SKILL.md +807 -0
- package/templates/skills/{sketch → business-analyse-quick}/references/domain-heuristics.md +59 -3
- package/templates/skills/business-analyse-quick/references/prd-schema.md +268 -0
- package/templates/skills/business-analyse-review/SKILL.md +10 -0
- package/templates/skills/business-analyse-review/references/review-data-mapping.md +6 -0
- package/templates/skills/business-analyse-status/SKILL.md +8 -0
- package/templates/skills/dev-start/SKILL.md +143 -307
- package/templates/skills/efcore/SKILL.md +13 -0
- package/templates/skills/sketch/SKILL.md +15 -153
- package/templates/skills/ui-components/SKILL.md +1 -1
- package/templates/skills/ui-components/patterns/data-table.md +1 -1
|
@@ -51,9 +51,16 @@ Build a JSON object following this **exact mapping** from index.json to the HTML
|
|
|
51
51
|
validated: ac.validated || false
|
|
52
52
|
}))
|
|
53
53
|
},
|
|
54
|
+
// Multi-app support: applications[] from navigation.json or index.json
|
|
55
|
+
applications: (collected_data.navigation?.applications || master.applications || []).map(app => ({
|
|
56
|
+
code: app.code,
|
|
57
|
+
name: app.name || app.code,
|
|
58
|
+
icon: app.icon || ""
|
|
59
|
+
})),
|
|
54
60
|
modules: master.modules.map(m => ({
|
|
55
61
|
code: m.code,
|
|
56
62
|
name: m.name || m.code, // display name (MANDATORY, separate from code)
|
|
63
|
+
applicationCode: m.applicationCode || "", // for multi-app sidebar grouping
|
|
57
64
|
description: m.description || "",
|
|
58
65
|
featureType: m.featureType || "data-centric",
|
|
59
66
|
entities: m.entities || [],
|
|
@@ -115,6 +122,7 @@ moduleSpecs[moduleCode] = {
|
|
|
115
122
|
name: uc.name || uc.title || uc.id || "", // Format A: "name", Format B: "title" or "id"
|
|
116
123
|
sectionCode: uc.sectionCode || "",
|
|
117
124
|
actor: uc.primaryActor || uc.actor || "", // Format A: "primaryActor", Format B: "actor"
|
|
125
|
+
description: uc.description || "", // Optional description field
|
|
118
126
|
// SAFETY NET: steps may be string[] or object[] ({step, action})
|
|
119
127
|
steps: (uc.mainScenario || uc.steps || []).map(s =>
|
|
120
128
|
typeof s === 'string' ? s : (s.action || s.description || "")
|
|
@@ -123,7 +131,10 @@ moduleSpecs[moduleCode] = {
|
|
|
123
131
|
(a.name || a.trigger || "") + ": " + (a.steps || a.actions || []).map(s =>
|
|
124
132
|
typeof s === 'string' ? s : (s.action || s.description || "")
|
|
125
133
|
).join(", ")
|
|
126
|
-
).join("\n")
|
|
134
|
+
).join("\n"),
|
|
135
|
+
preconditions: uc.preconditions || [], // Array of precondition objects or strings
|
|
136
|
+
postconditions: uc.postconditions || [], // Array of postcondition objects or strings
|
|
137
|
+
errorScenarios: uc.errorScenarios || [] // Array of error scenario objects
|
|
127
138
|
})),
|
|
128
139
|
businessRules: rawBRs.map(br => ({
|
|
129
140
|
name: br.name || br.id || "",
|
|
@@ -159,33 +170,124 @@ The HTML uses `"Role|Action"` format (e.g. `"RH Admin|Consulter"`):
|
|
|
159
170
|
|
|
160
171
|
```javascript
|
|
161
172
|
// Input: permissions object from flat file (mod.permissions), NOT moduleFeature
|
|
162
|
-
|
|
173
|
+
// lang: optional language override ('fr' or 'en'), defaults to 'fr'
|
|
174
|
+
function buildPermissionKeys(permissionsData, lang = 'fr') {
|
|
163
175
|
const keys = [];
|
|
176
|
+
|
|
177
|
+
// Bilingual actionMap based on language parameter
|
|
178
|
+
const actionMap = lang === 'en'
|
|
179
|
+
? {
|
|
180
|
+
read: 'Read', create: 'Create', update: 'Update', delete: 'Delete',
|
|
181
|
+
approve: 'Approve', export: 'Export', validate: 'Validate', admin: 'Admin',
|
|
182
|
+
Read: 'Read', Create: 'Create', Update: 'Update', Delete: 'Delete',
|
|
183
|
+
Approve: 'Approve', Export: 'Export', Validate: 'Validate', Admin: 'Admin',
|
|
184
|
+
submit: 'Validate', import: 'Create', Submit: 'Validate', Import: 'Create'
|
|
185
|
+
}
|
|
186
|
+
: {
|
|
187
|
+
read: 'Consulter', create: 'Créer', update: 'Modifier', delete: 'Supprimer',
|
|
188
|
+
approve: 'Valider', export: 'Exporter', validate: 'Valider', admin: 'Administrer',
|
|
189
|
+
Read: 'Consulter', Create: 'Créer', Update: 'Modifier', Delete: 'Supprimer',
|
|
190
|
+
Approve: 'Valider', Export: 'Exporter', Validate: 'Valider', Admin: 'Administrer',
|
|
191
|
+
submit: 'Valider', import: 'Créer', Submit: 'Valider', Import: 'Créer'
|
|
192
|
+
};
|
|
193
|
+
|
|
164
194
|
const matrix = permissionsData?.matrix || permissionsData?.permissionMatrix;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
195
|
+
|
|
196
|
+
// Format A: matrix is array of { role, permissions[] } (ba-009+ format)
|
|
197
|
+
if (Array.isArray(matrix)) {
|
|
198
|
+
matrix.forEach(entry => {
|
|
199
|
+
const role = entry.role || "";
|
|
200
|
+
(entry.permissions || []).forEach(perm => {
|
|
201
|
+
const action = perm.split(".").pop(); // "Read" or "HumanResources.Employees.Read"
|
|
202
|
+
if (action === "*") {
|
|
203
|
+
Object.values(actionMap).forEach(uiAction => {
|
|
204
|
+
const key = role + "|" + uiAction;
|
|
205
|
+
if (!keys.includes(key)) keys.push(key);
|
|
206
|
+
});
|
|
207
|
+
} else {
|
|
208
|
+
const uiAction = actionMap[action] || action;
|
|
209
|
+
const key = role + "|" + uiAction;
|
|
210
|
+
if (!keys.includes(key)) keys.push(key);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
return keys;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Format B: legacy matrix.roleAssignments[] format
|
|
218
|
+
if (matrix && matrix.roleAssignments) {
|
|
219
|
+
(matrix.roleAssignments || []).forEach(ra => {
|
|
220
|
+
(ra.permissions || []).forEach(permPath => {
|
|
221
|
+
const action = permPath.split(".").pop();
|
|
222
|
+
if (action === "*") {
|
|
223
|
+
Object.values(actionMap).forEach(uiAction => {
|
|
224
|
+
const key = ra.role + "|" + uiAction;
|
|
225
|
+
if (!keys.includes(key)) keys.push(key);
|
|
226
|
+
});
|
|
227
|
+
} else {
|
|
228
|
+
const uiAction = actionMap[action] || action;
|
|
175
229
|
const key = ra.role + "|" + uiAction;
|
|
176
230
|
if (!keys.includes(key)) keys.push(key);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
return keys;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Format C: permissions.json from step-03 with top-level roles[]
|
|
238
|
+
if (keys.length === 0 && permissionsData?.roles) {
|
|
239
|
+
const actionMap_C = lang === 'en'
|
|
240
|
+
? { read: 'Read', create: 'Create', update: 'Update', delete: 'Delete', approve: 'Approve', export: 'Export', validate: 'Validate', admin: 'Admin' }
|
|
241
|
+
: { read: 'Consulter', create: 'Créer', update: 'Modifier', delete: 'Supprimer', approve: 'Valider', export: 'Exporter', validate: 'Valider', admin: 'Administrer' };
|
|
242
|
+
|
|
243
|
+
permissionsData.roles.forEach(entry => {
|
|
244
|
+
const role = entry.role || entry.name || '';
|
|
245
|
+
(entry.permissions || entry.actions || []).forEach(perm => {
|
|
246
|
+
const action = typeof perm === 'string' ? perm.split('.').pop().toLowerCase() : (perm.action || '').toLowerCase();
|
|
247
|
+
const uiAction = actionMap_C[action] || action;
|
|
248
|
+
const key = role + '|' + uiAction;
|
|
249
|
+
if (role && !keys.includes(key)) keys.push(key);
|
|
250
|
+
});
|
|
251
|
+
// Handle wildcard patterns like "HumanResources.*"
|
|
252
|
+
if ((entry.permissionPattern || '').endsWith('*')) {
|
|
253
|
+
Object.values(actionMap_C).forEach(a => {
|
|
254
|
+
const key = (entry.role || entry.name) + '|' + a;
|
|
255
|
+
if (!keys.includes(key)) keys.push(key);
|
|
177
256
|
});
|
|
178
|
-
} else {
|
|
179
|
-
const uiAction = actionMap[action] || action;
|
|
180
|
-
keys.push(ra.role + "|" + uiAction);
|
|
181
257
|
}
|
|
182
258
|
});
|
|
183
|
-
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Format D: permissionMatrix.roleAssignments[]
|
|
262
|
+
if (keys.length === 0 && permissionsData?.permissionMatrix?.roleAssignments) {
|
|
263
|
+
const actionMap_D = lang === 'en'
|
|
264
|
+
? { read: 'Read', create: 'Create', update: 'Update', delete: 'Delete', approve: 'Approve', export: 'Export', validate: 'Validate', admin: 'Admin' }
|
|
265
|
+
: { read: 'Consulter', create: 'Créer', update: 'Modifier', delete: 'Supprimer', approve: 'Valider', export: 'Exporter', validate: 'Valider', admin: 'Administrer' };
|
|
266
|
+
|
|
267
|
+
permissionsData.permissionMatrix.roleAssignments.forEach(entry => {
|
|
268
|
+
const role = entry.role || '';
|
|
269
|
+
(entry.permissions || []).forEach(perm => {
|
|
270
|
+
if (typeof perm === 'string' && perm.endsWith('.*')) {
|
|
271
|
+
// Wildcard: expand to all standard actions
|
|
272
|
+
Object.values(actionMap_D).forEach(a => {
|
|
273
|
+
const key = role + '|' + a;
|
|
274
|
+
if (!keys.includes(key)) keys.push(key);
|
|
275
|
+
});
|
|
276
|
+
} else {
|
|
277
|
+
const action = typeof perm === 'string' ? perm.split('.').pop().toLowerCase() : '';
|
|
278
|
+
const uiAction = actionMap_D[action] || action;
|
|
279
|
+
const key = role + '|' + uiAction;
|
|
280
|
+
if (role && action && !keys.includes(key)) keys.push(key);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
|
|
184
286
|
return keys;
|
|
185
287
|
}
|
|
186
288
|
```
|
|
187
289
|
|
|
188
|
-
> **Language handling:** The
|
|
290
|
+
> **Language handling:** The function accepts an optional `lang` parameter ('fr' or 'en'). Defaults to 'fr' (French). For English labels: Read/Create/Update/Delete/Export/Validate. For French: Consulter/Créer/Modifier/Supprimer/Exporter/Valider.
|
|
189
291
|
|
|
190
292
|
### Frequency Mapping
|
|
191
293
|
|