@atlashub/smartstack-cli 2.6.3 → 2.7.1

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 (39) hide show
  1. package/.documentation/agents.html +1 -1
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +749 -1419
  4. package/.documentation/cli-commands.html +1 -1
  5. package/.documentation/commands.html +1 -1
  6. package/.documentation/css/styles.css +160 -0
  7. package/.documentation/efcore.html +1 -1
  8. package/.documentation/gitflow.html +3 -453
  9. package/.documentation/hooks.html +1 -1
  10. package/.documentation/index.html +177 -68
  11. package/.documentation/init.html +747 -290
  12. package/.documentation/installation.html +63 -8
  13. package/.documentation/ralph-loop.html +1 -1
  14. package/.documentation/test-web.html +1 -1
  15. package/dist/index.js +552 -304
  16. package/dist/index.js.map +1 -1
  17. package/dist/mcp-entry.mjs +12 -10
  18. package/dist/mcp-entry.mjs.map +1 -1
  19. package/package.json +2 -2
  20. package/templates/agents/ba-reader.md +23 -0
  21. package/templates/agents/ba-writer.md +63 -4
  22. package/templates/skills/business-analyse/questionnaire/00-application.md +1 -1
  23. package/templates/skills/business-analyse/questionnaire/03-scope.md +2 -2
  24. package/templates/skills/business-analyse/questionnaire.md +1 -1
  25. package/templates/skills/business-analyse/react/application-viewer.md +1 -1
  26. package/templates/skills/business-analyse/react/schema.md +88 -1
  27. package/templates/skills/business-analyse/schemas/application-schema.json +16 -1
  28. package/templates/skills/business-analyse/schemas/feature-schema.json +19 -986
  29. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +157 -0
  30. package/templates/skills/business-analyse/schemas/sections/discovery-schema.json +82 -0
  31. package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +80 -0
  32. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +69 -0
  33. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +445 -0
  34. package/templates/skills/business-analyse/schemas/sections/validation-schema.json +93 -0
  35. package/templates/skills/business-analyse/schemas/shared/common-defs.json +133 -0
  36. package/templates/skills/business-analyse/steps/step-01-cadrage.md +22 -3
  37. package/templates/skills/business-analyse/steps/step-03-specify.md +129 -0
  38. package/templates/skills/business-analyse/steps/step-04-consolidation.md +38 -5
  39. package/templates/skills/business-analyse/steps/step-05-handoff.md +94 -218
@@ -0,0 +1,445 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "specification-schema.json",
4
+ "title": "SmartStack BA - Specification",
5
+ "description": "Module-level specification: actors, use cases, FRs, permissions, navigation, wireframes, dashboards, sections, resources. Enriched by step-03-specify.",
6
+ "type": "object",
7
+ "properties": {
8
+ "actors": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "required": ["role", "permissions"],
13
+ "properties": {
14
+ "role": { "type": "string" },
15
+ "description": { "type": "string" },
16
+ "permissions": { "type": "array", "items": { "type": "string" } }
17
+ }
18
+ }
19
+ },
20
+ "useCases": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": ["id", "name", "primaryActor", "permission"],
25
+ "properties": {
26
+ "id": { "type": "string", "pattern": "^UC-[A-Z]{2,4}-\\d{3}$", "description": "Module-prefixed UC ID (e.g., UC-RM-001)" },
27
+ "name": { "type": "string" },
28
+ "primaryActor": { "type": "string" },
29
+ "permission": { "type": "string", "description": "business.{app}.{module}.{action}" },
30
+ "preconditions": { "type": "array", "items": { "type": "string" } },
31
+ "postconditions": { "type": "array", "items": { "type": "string" } },
32
+ "mainScenario": { "type": "array", "items": { "type": "string" } },
33
+ "alternativeScenarios": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "properties": {
38
+ "name": { "type": "string" },
39
+ "steps": { "type": "array", "items": { "type": "string" } }
40
+ }
41
+ }
42
+ },
43
+ "errorScenarios": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": { "type": "string" },
49
+ "steps": { "type": "array", "items": { "type": "string" } }
50
+ }
51
+ }
52
+ },
53
+ "linkedRules": {
54
+ "type": "array",
55
+ "items": { "type": "string" },
56
+ "description": "Cross-references to BR-XXX in analysis.businessRules"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "functionalRequirements": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "required": ["id", "statement", "priority"],
66
+ "properties": {
67
+ "id": { "type": "string", "pattern": "^FR-[A-Z]{2,4}-\\d{3}$", "description": "Module-prefixed FR ID (e.g., FR-RM-001)" },
68
+ "statement": { "type": "string", "description": "System MUST/SHOULD/COULD ..." },
69
+ "priority": { "type": "string", "enum": ["must", "should", "could"] },
70
+ "linkedRules": { "type": "array", "items": { "type": "string" } },
71
+ "linkedUseCases": { "type": "array", "items": { "type": "string" } },
72
+ "acceptanceCriteria": { "type": "array", "items": { "type": "string" } }
73
+ }
74
+ }
75
+ },
76
+ "permissionMatrix": {
77
+ "type": "object",
78
+ "properties": {
79
+ "permissions": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "required": ["path", "action"],
84
+ "properties": {
85
+ "path": { "type": "string", "description": "business.{app}.{module}.{action}" },
86
+ "action": { "type": "string", "enum": ["read", "create", "update", "delete", "export", "import", "admin", "*"] },
87
+ "description": { "type": "string" }
88
+ }
89
+ }
90
+ },
91
+ "roleAssignments": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "object",
95
+ "required": ["role", "permissions"],
96
+ "properties": {
97
+ "role": { "type": "string" },
98
+ "permissions": { "type": "array", "items": { "type": "string" } }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "navigation": {
105
+ "type": "object",
106
+ "description": "Navigation hierarchy for SeedData generation",
107
+ "properties": {
108
+ "entries": {
109
+ "type": "array",
110
+ "items": {
111
+ "type": "object",
112
+ "required": ["level", "code", "route"],
113
+ "properties": {
114
+ "level": { "type": "string", "enum": ["context", "application", "module", "section", "resource"] },
115
+ "code": { "type": "string" },
116
+ "labels": {
117
+ "type": "object",
118
+ "properties": {
119
+ "fr": { "type": "string" },
120
+ "en": { "type": "string" },
121
+ "it": { "type": "string" },
122
+ "de": { "type": "string" }
123
+ }
124
+ },
125
+ "route": { "type": "string" },
126
+ "icon": { "type": "string" },
127
+ "isNew": { "type": "boolean" }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "gherkinScenarios": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "object",
137
+ "properties": {
138
+ "feature": { "type": "string" },
139
+ "scenarios": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "properties": {
144
+ "name": { "type": "string" },
145
+ "tags": { "type": "array", "items": { "type": "string" } },
146
+ "given": { "type": "array", "items": { "type": "string" } },
147
+ "when": { "type": "array", "items": { "type": "string" } },
148
+ "then": { "type": "array", "items": { "type": "string" } }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ },
155
+ "validations": {
156
+ "type": "array",
157
+ "description": "Field-level validations for entities",
158
+ "items": {
159
+ "type": "object",
160
+ "properties": {
161
+ "entity": { "type": "string" },
162
+ "field": { "type": "string" },
163
+ "rules": { "type": "array", "items": { "type": "string" } },
164
+ "errorMessageKey": { "type": "string" }
165
+ }
166
+ }
167
+ },
168
+ "apiEndpoints": {
169
+ "type": "array",
170
+ "items": {
171
+ "type": "object",
172
+ "properties": {
173
+ "method": { "type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
174
+ "path": { "type": "string" },
175
+ "permission": { "type": "string" },
176
+ "requestDto": { "type": "string" },
177
+ "responseDto": { "type": "string" },
178
+ "description": { "type": "string" }
179
+ }
180
+ }
181
+ },
182
+ "i18nKeys": {
183
+ "type": "object",
184
+ "description": "Translation keys organized by section",
185
+ "additionalProperties": {
186
+ "type": "object",
187
+ "additionalProperties": { "type": "string" }
188
+ }
189
+ },
190
+ "uiWireframes": {
191
+ "type": "array",
192
+ "description": "MANDATORY wireframes for every module section. Each section MUST have at least one wireframe validated by the client.",
193
+ "items": {
194
+ "type": "object",
195
+ "required": ["screen", "mockup", "elements", "section"],
196
+ "properties": {
197
+ "screen": { "type": "string", "description": "Unique screen identifier: {module}-{section}" },
198
+ "description": { "type": "string" },
199
+ "elements": { "type": "array", "items": { "type": "string" } },
200
+ "actions": { "type": "array", "items": { "type": "string" } },
201
+ "permissionsRequired": { "type": "array", "items": { "type": "string" } },
202
+ "mockupFormat": { "type": "string", "enum": ["ascii", "svg"] },
203
+ "mockup": { "type": "string", "description": "ASCII art or SVG markup of the wireframe" },
204
+ "section": { "type": "string" },
205
+ "componentMapping": {
206
+ "type": "array",
207
+ "items": {
208
+ "type": "object",
209
+ "properties": {
210
+ "wireframeElement": { "type": "string" },
211
+ "reactComponent": { "type": "string" }
212
+ }
213
+ }
214
+ },
215
+ "layout": {
216
+ "type": "object",
217
+ "description": "Structural layout for deterministic consumption by ralph-loop. Source of truth for code generation.",
218
+ "properties": {
219
+ "type": { "type": "string", "enum": ["page", "dialog", "panel"] },
220
+ "regions": {
221
+ "type": "array",
222
+ "items": {
223
+ "type": "object",
224
+ "required": ["id", "position"],
225
+ "properties": {
226
+ "id": { "type": "string" },
227
+ "position": { "type": "string", "enum": ["top", "below-header", "main", "sidebar", "bottom", "left", "right"] },
228
+ "span": { "type": "integer", "description": "Grid columns (1-12)" },
229
+ "components": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "object",
233
+ "required": ["type"],
234
+ "properties": {
235
+ "type": { "type": "string" },
236
+ "resourceRef": { "type": "string" },
237
+ "props": { "type": "object", "additionalProperties": true },
238
+ "permission": { "type": "string" }
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "dashboards": {
251
+ "type": "array",
252
+ "description": "Dashboard specifications with KPIs and chart configurations",
253
+ "items": {
254
+ "type": "object",
255
+ "required": ["code", "title", "kpis"],
256
+ "properties": {
257
+ "code": { "type": "string" },
258
+ "title": { "type": "string" },
259
+ "description": { "type": "string" },
260
+ "linkedUCs": { "type": "array", "items": { "type": "string" } },
261
+ "refreshMode": { "type": "string", "enum": ["static", "polling", "signalr"], "default": "static" },
262
+ "defaultPeriod": { "type": "string", "enum": ["day", "week", "month", "quarter", "year"], "default": "month" },
263
+ "filters": {
264
+ "type": "array",
265
+ "items": {
266
+ "type": "object",
267
+ "properties": {
268
+ "field": { "type": "string" },
269
+ "type": { "type": "string", "enum": ["dateRange", "select", "multiselect", "search"] },
270
+ "label": { "type": "string" }
271
+ }
272
+ }
273
+ },
274
+ "kpis": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "object",
278
+ "required": ["code", "label", "metric", "visualization"],
279
+ "properties": {
280
+ "code": { "type": "string" },
281
+ "label": { "type": "string" },
282
+ "metric": { "type": "string" },
283
+ "format": { "type": "string", "enum": ["number", "currency", "percent", "duration"], "default": "number" },
284
+ "visualization": { "type": "string", "enum": ["kpi-card", "bar", "line", "pie", "area", "donut", "stacked-bar"] },
285
+ "dataSource": { "type": "string" },
286
+ "dimensions": { "type": "array", "items": { "type": "string" } },
287
+ "thresholds": {
288
+ "type": "object",
289
+ "properties": {
290
+ "warning": { "type": "number" },
291
+ "critical": { "type": "number" }
292
+ }
293
+ }
294
+ }
295
+ }
296
+ },
297
+ "permissionsRequired": { "type": "array", "items": { "type": "string" } }
298
+ }
299
+ }
300
+ },
301
+ "messages": {
302
+ "type": "array",
303
+ "description": "Business messages (success, error, warning, info) with i18n keys",
304
+ "items": {
305
+ "type": "object",
306
+ "required": ["code", "type", "i18nKey"],
307
+ "properties": {
308
+ "code": { "type": "string" },
309
+ "type": { "type": "string", "enum": ["success", "error", "warning", "info"] },
310
+ "title": { "type": "string" },
311
+ "message": { "type": "string" },
312
+ "i18nKey": { "type": "string" }
313
+ }
314
+ }
315
+ },
316
+ "lifeCycles": {
317
+ "type": "array",
318
+ "description": "Per-entity state machines for entities with Status fields",
319
+ "items": {
320
+ "type": "object",
321
+ "required": ["entity", "states"],
322
+ "properties": {
323
+ "entity": { "type": "string" },
324
+ "states": {
325
+ "type": "array",
326
+ "items": {
327
+ "type": "object",
328
+ "required": ["id", "allowedTransitions"],
329
+ "properties": {
330
+ "id": { "type": "string" },
331
+ "displayName": { "type": "string" },
332
+ "description": { "type": "string" },
333
+ "allowedTransitions": { "type": "array", "items": { "type": "string" } },
334
+ "isTerminal": { "type": "boolean", "default": false }
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ },
341
+ "seedDataCore": {
342
+ "type": "object",
343
+ "description": "5 mandatory SmartStack core SeedData definitions",
344
+ "properties": {
345
+ "navigationModules": {
346
+ "type": "array",
347
+ "items": {
348
+ "type": "object",
349
+ "required": ["code", "label", "icon", "route"],
350
+ "properties": {
351
+ "code": { "type": "string" },
352
+ "label": { "type": "string" },
353
+ "icon": { "type": "string" },
354
+ "route": { "type": "string" },
355
+ "parentCode": { "type": ["string", "null"] },
356
+ "sort": { "type": "integer" }
357
+ }
358
+ }
359
+ },
360
+ "navigationTranslations": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "object",
364
+ "required": ["moduleCode", "language", "label"],
365
+ "properties": {
366
+ "moduleCode": { "type": "string" },
367
+ "language": { "type": "string", "enum": ["fr", "en", "it", "de"] },
368
+ "label": { "type": "string" }
369
+ }
370
+ }
371
+ },
372
+ "permissions": {
373
+ "type": "array",
374
+ "items": {
375
+ "type": "object",
376
+ "required": ["path", "action"],
377
+ "properties": {
378
+ "path": { "type": "string" },
379
+ "action": { "type": "string" },
380
+ "description": { "type": "string" }
381
+ }
382
+ }
383
+ },
384
+ "rolePermissions": {
385
+ "type": "array",
386
+ "items": {
387
+ "type": "object",
388
+ "required": ["role", "permissionPath"],
389
+ "properties": {
390
+ "role": { "type": "string" },
391
+ "permissionPath": { "type": "string" }
392
+ }
393
+ }
394
+ },
395
+ "permissionConstants": {
396
+ "type": "array",
397
+ "items": {
398
+ "type": "object",
399
+ "required": ["constantName", "path"],
400
+ "properties": {
401
+ "constantName": { "type": "string" },
402
+ "path": { "type": "string" }
403
+ }
404
+ }
405
+ }
406
+ }
407
+ },
408
+ "sections": {
409
+ "type": "array",
410
+ "description": "Level 4 (Section) decomposition. Each section = 1 React page. MANDATORY for ralph-loop consumption.",
411
+ "items": {
412
+ "type": "object",
413
+ "required": ["code", "labels", "route", "permission", "wireframe", "useCases", "resources"],
414
+ "properties": {
415
+ "code": { "type": "string", "description": "Section code (kebab-case: list, detail, create, dashboard)" },
416
+ "labels": {
417
+ "type": "object",
418
+ "properties": {
419
+ "fr": { "type": "string" },
420
+ "en": { "type": "string" },
421
+ "it": { "type": "string" },
422
+ "de": { "type": "string" }
423
+ }
424
+ },
425
+ "route": { "type": "string" },
426
+ "icon": { "type": "string" },
427
+ "permission": { "type": "string" },
428
+ "wireframe": { "type": "string", "description": "Reference to uiWireframes[].screen" },
429
+ "useCases": { "type": "array", "items": { "type": "string" } },
430
+ "businessRules": { "type": "array", "items": { "type": "string" } },
431
+ "resources": {
432
+ "type": "array",
433
+ "description": "Level 5 (Resource) components within this section",
434
+ "items": { "$ref": "../shared/common-defs.json#/$defs/resource" }
435
+ }
436
+ }
437
+ }
438
+ },
439
+ "extensions": {
440
+ "type": "object",
441
+ "description": "Module-specific data not covered by standard schema. Use sparingly.",
442
+ "additionalProperties": true
443
+ }
444
+ }
445
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "validation-schema.json",
4
+ "title": "SmartStack BA - Validation",
5
+ "description": "Module-level validation: completeness, consistency, convention checks, semantic checks, approval decision. Used by step-04-consolidation.",
6
+ "type": "object",
7
+ "properties": {
8
+ "validatedAt": { "type": ["string", "null"], "format": "date-time" },
9
+ "completenessChecks": {
10
+ "type": "array",
11
+ "description": "Per-section completeness verification",
12
+ "items": {
13
+ "type": "object",
14
+ "properties": {
15
+ "section": { "type": "string" },
16
+ "count": { "type": "integer" },
17
+ "minimum": { "type": "integer" },
18
+ "status": { "type": "string", "enum": ["PASS", "FAIL", "WARNING"] }
19
+ }
20
+ }
21
+ },
22
+ "consistencyChecks": {
23
+ "type": "array",
24
+ "description": "Cross-reference consistency checks (UC<>FR, FR<>BR, Actor<>Matrix, etc.)",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "check": { "type": "string" },
29
+ "passed": { "type": "integer" },
30
+ "warnings": { "type": "integer" },
31
+ "errors": { "type": "integer" },
32
+ "status": { "type": "string", "enum": ["PASS", "FAIL", "WARNING"] }
33
+ }
34
+ }
35
+ },
36
+ "conventionChecks": {
37
+ "type": "array",
38
+ "description": "SmartStack convention validation (naming, permissions, routes, etc.)",
39
+ "items": {
40
+ "type": "object",
41
+ "properties": {
42
+ "check": { "type": "string" },
43
+ "status": { "type": "string", "enum": ["PASS", "FAIL", "WARNING"] },
44
+ "details": { "type": "string" }
45
+ }
46
+ }
47
+ },
48
+ "riskAssessments": {
49
+ "type": "array",
50
+ "description": "Scope and complexity risk evaluation",
51
+ "items": {
52
+ "type": "object",
53
+ "properties": {
54
+ "risk": { "type": "string" },
55
+ "value": { "type": "integer" },
56
+ "threshold": { "type": "integer" },
57
+ "status": { "type": "string", "enum": ["ACCEPTABLE", "WARNING", "CRITICAL", "MONITORED"] }
58
+ }
59
+ }
60
+ },
61
+ "warnings": {
62
+ "type": "array",
63
+ "description": "Non-blocking warnings and observations",
64
+ "items": { "type": "string" }
65
+ },
66
+ "decision": {
67
+ "type": "object",
68
+ "description": "Final approval decision",
69
+ "properties": {
70
+ "approved": { "type": "boolean" },
71
+ "reason": { "type": "string" },
72
+ "approvalMode": { "type": "string", "enum": ["standard", "micro", "delta", "force"] },
73
+ "approvedBy": { "type": "string" },
74
+ "approvedAt": { "type": "string", "format": "date-time" }
75
+ }
76
+ },
77
+ "semanticChecks": {
78
+ "type": "array",
79
+ "description": "Semantic validation results from step-04-consolidation (10 checks)",
80
+ "items": {
81
+ "type": "object",
82
+ "required": ["check", "status"],
83
+ "properties": {
84
+ "check": { "type": "string", "description": "Check identifier (e.g., permission-orpheline, uc-sans-fr)" },
85
+ "module": { "type": "string" },
86
+ "status": { "type": "string", "enum": ["PASS", "WARNING", "ERROR"] },
87
+ "details": { "type": "string" },
88
+ "autoFixed": { "type": "boolean" }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }