@atlashub/smartstack-cli 3.33.0 → 3.35.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 (65) hide show
  1. package/.documentation/agents.html +5 -1
  2. package/.documentation/apex.html +644 -0
  3. package/.documentation/business-analyse.html +81 -1
  4. package/.documentation/cli-commands.html +5 -1
  5. package/.documentation/commands.html +5 -1
  6. package/.documentation/efcore.html +5 -1
  7. package/.documentation/gitflow.html +5 -1
  8. package/.documentation/hooks.html +5 -1
  9. package/.documentation/index.html +60 -2
  10. package/.documentation/init.html +414 -1
  11. package/.documentation/installation.html +5 -1
  12. package/.documentation/ralph-loop.html +365 -216
  13. package/.documentation/test-web.html +5 -1
  14. package/dist/index.js +32 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/mcp-entry.mjs +7 -24
  17. package/dist/mcp-entry.mjs.map +1 -1
  18. package/package.json +1 -2
  19. package/templates/agents/ba-writer.md +142 -15
  20. package/templates/mcp-scaffolding/controller.cs.hbs +5 -1
  21. package/templates/skills/apex/SKILL.md +9 -3
  22. package/templates/skills/apex/_shared.md +49 -4
  23. package/templates/skills/{ralph-loop → apex}/references/core-seed-data.md +20 -11
  24. package/templates/skills/{ralph-loop → apex}/references/error-classification.md +2 -1
  25. package/templates/skills/apex/references/post-checks.md +463 -3
  26. package/templates/skills/apex/references/smartstack-api.md +76 -8
  27. package/templates/skills/apex/references/smartstack-frontend.md +74 -1
  28. package/templates/skills/apex/references/smartstack-layers.md +21 -3
  29. package/templates/skills/apex/steps/step-00-init.md +121 -1
  30. package/templates/skills/apex/steps/step-01-analyze.md +58 -0
  31. package/templates/skills/apex/steps/step-02-plan.md +36 -0
  32. package/templates/skills/apex/steps/step-03-execute.md +114 -7
  33. package/templates/skills/apex/steps/step-04-examine.md +116 -2
  34. package/templates/skills/business-analyse/SKILL.md +31 -20
  35. package/templates/skills/business-analyse/_module-loop.md +68 -9
  36. package/templates/skills/business-analyse/_shared.md +80 -21
  37. package/templates/skills/business-analyse/questionnaire/00-application.md +4 -2
  38. package/templates/skills/business-analyse/questionnaire/00b-project.md +85 -0
  39. package/templates/skills/business-analyse/references/deploy-modes.md +69 -0
  40. package/templates/skills/business-analyse/references/team-orchestration.md +158 -7
  41. package/templates/skills/business-analyse/schemas/application-schema.json +15 -1
  42. package/templates/skills/business-analyse/schemas/project-schema.json +490 -0
  43. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -1
  44. package/templates/skills/business-analyse/steps/step-00-init.md +220 -38
  45. package/templates/skills/business-analyse/steps/step-01-cadrage.md +184 -5
  46. package/templates/skills/business-analyse/steps/step-01b-applications.md +423 -0
  47. package/templates/skills/business-analyse/steps/step-02-decomposition.md +23 -6
  48. package/templates/skills/business-analyse/steps/step-03c-compile.md +14 -2
  49. package/templates/skills/business-analyse/steps/step-03d-validate.md +32 -7
  50. package/templates/skills/business-analyse/steps/step-04a-collect.md +111 -0
  51. package/templates/skills/business-analyse/steps/step-05a-handoff.md +296 -103
  52. package/templates/skills/business-analyse/steps/step-05b-deploy.md +46 -14
  53. package/templates/skills/documentation/SKILL.md +92 -2
  54. package/templates/skills/ralph-loop/SKILL.md +14 -17
  55. package/templates/skills/ralph-loop/references/category-rules.md +63 -683
  56. package/templates/skills/ralph-loop/references/compact-loop.md +188 -428
  57. package/templates/skills/ralph-loop/references/section-splitting.md +439 -0
  58. package/templates/skills/ralph-loop/references/team-orchestration.md +13 -14
  59. package/templates/skills/ralph-loop/steps/step-01-task.md +27 -0
  60. package/templates/skills/ralph-loop/steps/step-02-execute.md +80 -691
  61. package/templates/skills/ralph-loop/steps/step-03-commit.md +38 -79
  62. package/templates/skills/ralph-loop/steps/step-04-check.md +39 -58
  63. package/templates/skills/ralph-loop/steps/step-05-report.md +31 -123
  64. package/scripts/health-check.sh +0 -168
  65. package/scripts/postinstall.js +0 -18
@@ -0,0 +1,490 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "project-schema.json",
4
+ "title": "SmartStack Business Analysis - Project Level",
5
+ "description": "Master feature.json for multi-application project analysis. Published to docs/business-analyse/v{X.Y}/feature.json. Only created when 2+ applications are identified.",
6
+ "type": "object",
7
+ "required": ["id", "version", "status", "scope", "metadata"],
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "pattern": "^PROJ-\\d{3,}$",
12
+ "description": "Unique project identifier (e.g., PROJ-001)"
13
+ },
14
+ "version": {
15
+ "type": "string",
16
+ "pattern": "^\\d+\\.\\d+$",
17
+ "description": "Document version (e.g., 1.0, 1.1)"
18
+ },
19
+ "status": {
20
+ "type": "string",
21
+ "enum": ["draft", "framed", "decomposed", "specified", "consolidated", "handed-off"],
22
+ "description": "Project-level lifecycle status"
23
+ },
24
+ "scope": {
25
+ "type": "string",
26
+ "const": "project",
27
+ "description": "Marks this as a project-level feature.json (multi-application)"
28
+ },
29
+
30
+ "metadata": {
31
+ "type": "object",
32
+ "required": ["createdAt", "updatedAt", "projectName", "language"],
33
+ "properties": {
34
+ "createdAt": { "type": "string", "format": "date-time" },
35
+ "updatedAt": { "type": "string", "format": "date-time" },
36
+ "projectName": { "type": "string", "description": "Project name (e.g., Enterprise HR Platform)" },
37
+ "language": { "type": "string", "enum": ["fr", "en", "it", "de"] },
38
+ "featureDescription": { "type": "string", "description": "Original user description/brief" },
39
+ "workflowType": {
40
+ "type": "string",
41
+ "enum": ["new", "update"],
42
+ "description": "Whether this is a new project or an update"
43
+ },
44
+ "mcpAvailable": { "type": "boolean" },
45
+ "analysisMode": {
46
+ "type": "string",
47
+ "const": "interactive",
48
+ "description": "Analysis mode — always interactive"
49
+ },
50
+ "workflow": {
51
+ "type": "object",
52
+ "description": "Multi-application loop state",
53
+ "properties": {
54
+ "mode": { "type": "string", "const": "project" },
55
+ "applicationOrder": {
56
+ "type": "array",
57
+ "items": { "type": "string" },
58
+ "description": "Topologically sorted application codes"
59
+ },
60
+ "currentApplicationIndex": {
61
+ "type": "integer",
62
+ "minimum": 0,
63
+ "description": "Index into applicationOrder for current application being processed"
64
+ },
65
+ "completedApplications": {
66
+ "type": "array",
67
+ "items": { "type": "string" },
68
+ "description": "Application codes that have been fully specified (all modules done)"
69
+ },
70
+ "currentApplication": {
71
+ "type": ["string", "null"],
72
+ "description": "Code of the application currently being processed"
73
+ }
74
+ }
75
+ },
76
+ "steps": {
77
+ "type": "object",
78
+ "description": "Progress tracking per step",
79
+ "properties": {
80
+ "init": { "$ref": "#/$defs/stepStatus" },
81
+ "cadrage": { "$ref": "#/$defs/stepStatus" },
82
+ "applicationDecomposition": { "$ref": "#/$defs/stepStatus" },
83
+ "specify": { "$ref": "#/$defs/stepStatus" },
84
+ "consolidation": { "$ref": "#/$defs/stepStatus" },
85
+ "handoff": { "$ref": "#/$defs/stepStatus" }
86
+ }
87
+ }
88
+ }
89
+ },
90
+
91
+ "cadrage": {
92
+ "type": "object",
93
+ "description": "Enriched by step-01-cadrage: project-level global framing",
94
+ "properties": {
95
+ "problem": { "type": "string", "description": "Global business problem to solve" },
96
+ "asIs": { "type": "string", "description": "Current situation across all domains" },
97
+ "toBe": { "type": "string", "description": "Target situation for the full project" },
98
+ "trigger": { "type": "string", "description": "What triggered this project" },
99
+ "stakeholders": {
100
+ "type": "array",
101
+ "items": {
102
+ "type": "object",
103
+ "required": ["role"],
104
+ "properties": {
105
+ "role": { "type": "string" },
106
+ "function": { "type": "string" },
107
+ "involvement": { "type": "string", "enum": ["approver", "decision-maker", "consulted", "informed", "end-user"] },
108
+ "tasks": { "type": "array", "items": { "type": "string" } },
109
+ "frequency": { "type": "string" },
110
+ "painPoints": { "type": "array", "items": { "type": "string" } },
111
+ "applications": {
112
+ "type": "array",
113
+ "items": { "type": "string" },
114
+ "description": "Application codes this stakeholder is involved in (empty = all)"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "globalScope": {
120
+ "type": "object",
121
+ "description": "Project-wide MoSCoW scope",
122
+ "properties": {
123
+ "mustHave": { "type": "array", "items": { "type": "string" } },
124
+ "shouldHave": { "type": "array", "items": { "type": "string" } },
125
+ "couldHave": { "type": "array", "items": { "type": "string" } },
126
+ "outOfScope": { "type": "array", "items": { "type": "string" } }
127
+ }
128
+ },
129
+ "globalRoles": {
130
+ "type": "array",
131
+ "description": "Cross-application roles (may span multiple applications)",
132
+ "items": {
133
+ "type": "object",
134
+ "required": ["role", "level"],
135
+ "properties": {
136
+ "role": { "type": "string", "description": "Role name (e.g., System Admin)" },
137
+ "description": { "type": "string" },
138
+ "level": { "type": "string", "enum": ["admin", "manager", "contributor", "viewer"] },
139
+ "applications": {
140
+ "type": "array",
141
+ "items": { "type": "string" },
142
+ "description": "Application codes this role applies to (empty = all)"
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "risks": {
148
+ "type": "array",
149
+ "items": {
150
+ "type": "object",
151
+ "required": ["id", "type", "description"],
152
+ "properties": {
153
+ "id": { "type": "string", "pattern": "^RISK-\\d{3}$" },
154
+ "type": { "type": "string", "enum": ["business", "technical", "organizational"] },
155
+ "description": { "type": "string" },
156
+ "probability": { "type": "string", "enum": ["high", "medium", "low"] },
157
+ "impact": { "type": "string", "enum": ["high", "medium", "low"] },
158
+ "priority": { "type": "string", "enum": ["critical", "medium", "low"] },
159
+ "mitigation": { "type": "string" },
160
+ "applications": {
161
+ "type": "array",
162
+ "items": { "type": "string" },
163
+ "description": "Affected application codes (empty = project-wide)"
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "acceptanceCriteria": {
169
+ "type": "array",
170
+ "items": {
171
+ "type": "object",
172
+ "required": ["id", "criterion"],
173
+ "properties": {
174
+ "id": { "type": "string", "pattern": "^AC-\\d{3}$" },
175
+ "criterion": { "type": "string" },
176
+ "validated": { "type": "boolean", "default": false }
177
+ }
178
+ }
179
+ },
180
+ "codebaseContext": {
181
+ "type": "string",
182
+ "description": "Summary of existing applications/modules found during pre-research"
183
+ },
184
+ "coverageMatrix": {
185
+ "type": "array",
186
+ "description": "Maps every requirement to an application and optionally a module",
187
+ "items": {
188
+ "type": "object",
189
+ "required": ["item", "category"],
190
+ "properties": {
191
+ "item": { "type": "string", "description": "Requirement from the original brief" },
192
+ "category": { "type": "string", "enum": ["mustHave", "shouldHave", "couldHave", "outOfScope", "implicit"] },
193
+ "application": { "type": ["string", "null"], "description": "Application code (null if cross-cutting)" },
194
+ "module": { "type": ["string", "null"], "description": "Module code (null if application-level)" },
195
+ "notes": { "type": "string" },
196
+ "anticipatedSections": {
197
+ "type": "array",
198
+ "items": { "type": "string" }
199
+ },
200
+ "anticipatedResources": {
201
+ "type": "array",
202
+ "items": { "type": "string" }
203
+ }
204
+ }
205
+ }
206
+ },
207
+ "deploymentModel": {
208
+ "type": "string",
209
+ "enum": ["together", "phased"],
210
+ "description": "Whether applications are deployed together or in phases"
211
+ },
212
+ "sharedInfrastructure": {
213
+ "type": "array",
214
+ "items": { "type": "string" },
215
+ "description": "Shared infrastructure concerns (e.g., SSO, notifications, shared DB)"
216
+ }
217
+ }
218
+ },
219
+
220
+ "applications": {
221
+ "type": "array",
222
+ "description": "Enriched by step-01b-applications: application registry",
223
+ "items": {
224
+ "type": "object",
225
+ "required": ["code", "name", "context"],
226
+ "properties": {
227
+ "code": { "type": "string", "description": "Application code (PascalCase, e.g., HumanResources)" },
228
+ "name": { "type": "string", "description": "Display name (e.g., Ressources Humaines)" },
229
+ "context": {
230
+ "type": "string",
231
+ "enum": ["business", "platform", "personal"],
232
+ "description": "Navigation context for this application"
233
+ },
234
+ "tablePrefix": {
235
+ "type": "string",
236
+ "pattern": "^[a-z]{2,5}_$",
237
+ "description": "Table prefix for this application (e.g., rh_, ess_)"
238
+ },
239
+ "icon": { "type": "string", "description": "Icon identifier for navigation" },
240
+ "description": { "type": "string" },
241
+ "applicationRoles": {
242
+ "type": "array",
243
+ "description": "Application-specific roles (inherited from globalRoles + specialized)",
244
+ "items": {
245
+ "type": "object",
246
+ "required": ["role", "level"],
247
+ "properties": {
248
+ "role": { "type": "string" },
249
+ "description": { "type": "string" },
250
+ "level": { "type": "string", "enum": ["admin", "manager", "contributor", "viewer"] },
251
+ "permissionPattern": { "type": "string" }
252
+ }
253
+ }
254
+ },
255
+ "scope": {
256
+ "type": "object",
257
+ "description": "Application-specific scope (subset of global scope)",
258
+ "properties": {
259
+ "mustHave": { "type": "array", "items": { "type": "string" } },
260
+ "shouldHave": { "type": "array", "items": { "type": "string" } },
261
+ "couldHave": { "type": "array", "items": { "type": "string" } }
262
+ }
263
+ },
264
+ "modules": {
265
+ "type": "array",
266
+ "items": { "type": "string" },
267
+ "description": "Module codes belonging to this application (populated during step-02)"
268
+ },
269
+ "dependencies": {
270
+ "type": "array",
271
+ "items": { "type": "string" },
272
+ "description": "Application codes this application depends on"
273
+ },
274
+ "status": {
275
+ "type": "string",
276
+ "enum": ["pending", "in-progress", "decomposed", "specified", "consolidated"],
277
+ "description": "Application processing status within the project"
278
+ },
279
+ "featureJsonPath": {
280
+ "type": ["string", "null"],
281
+ "description": "Path to the application-level feature.json once created"
282
+ },
283
+ "estimatedComplexity": {
284
+ "type": "string",
285
+ "enum": ["simple", "medium", "complex"]
286
+ }
287
+ }
288
+ }
289
+ },
290
+
291
+ "applicationDependencyGraph": {
292
+ "type": "object",
293
+ "description": "Enriched by step-01b-applications: inter-application dependency graph",
294
+ "properties": {
295
+ "edges": {
296
+ "type": "array",
297
+ "items": {
298
+ "type": "object",
299
+ "required": ["from", "to", "type"],
300
+ "properties": {
301
+ "from": { "type": "string", "description": "Dependent application code" },
302
+ "to": { "type": "string", "description": "Dependency application code" },
303
+ "type": {
304
+ "type": "string",
305
+ "enum": ["data-dependency", "shared-entity", "event", "auth-dependency"],
306
+ "description": "Nature of the inter-application dependency"
307
+ },
308
+ "description": { "type": "string" }
309
+ }
310
+ }
311
+ },
312
+ "topologicalOrder": {
313
+ "type": "array",
314
+ "items": { "type": "string" },
315
+ "description": "Applications sorted by dependency (foundations first)"
316
+ },
317
+ "layers": {
318
+ "type": "array",
319
+ "description": "Applications grouped by dependency depth",
320
+ "items": {
321
+ "type": "object",
322
+ "properties": {
323
+ "layer": { "type": "integer" },
324
+ "applications": { "type": "array", "items": { "type": "string" } }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ },
330
+
331
+ "consolidation": {
332
+ "type": "object",
333
+ "description": "Enriched by step-04: cross-application and cross-module validation",
334
+ "properties": {
335
+ "crossApplicationInteractions": {
336
+ "type": "array",
337
+ "description": "Interactions between different applications",
338
+ "items": {
339
+ "type": "object",
340
+ "properties": {
341
+ "fromApplication": { "type": "string" },
342
+ "toApplication": { "type": "string" },
343
+ "interactionType": { "type": "string", "enum": ["shared-entity", "FK-reference", "event", "auth-delegation", "data-sync"] },
344
+ "description": { "type": "string" },
345
+ "entities": { "type": "array", "items": { "type": "string" } }
346
+ }
347
+ }
348
+ },
349
+ "crossModuleInteractions": {
350
+ "type": "array",
351
+ "items": {
352
+ "type": "object",
353
+ "properties": {
354
+ "fromApplication": { "type": "string" },
355
+ "fromModule": { "type": "string" },
356
+ "toApplication": { "type": "string" },
357
+ "toModule": { "type": "string" },
358
+ "interactionType": { "type": "string", "enum": ["FK-reference", "event-publish", "event-subscribe", "shared-lookup", "cascade-delete", "cascade-update"] },
359
+ "description": { "type": "string" },
360
+ "entities": { "type": "array", "items": { "type": "string" } }
361
+ }
362
+ }
363
+ },
364
+ "sharedEntities": {
365
+ "type": "array",
366
+ "items": {
367
+ "type": "object",
368
+ "properties": {
369
+ "entity": { "type": "string" },
370
+ "ownerApplication": { "type": "string" },
371
+ "ownerModule": { "type": "string" },
372
+ "referencedBy": {
373
+ "type": "array",
374
+ "items": {
375
+ "type": "object",
376
+ "properties": {
377
+ "application": { "type": "string" },
378
+ "module": { "type": "string" }
379
+ }
380
+ }
381
+ },
382
+ "sharedFields": { "type": "array", "items": { "type": "string" } }
383
+ }
384
+ }
385
+ },
386
+ "permissionCoherence": {
387
+ "type": "object",
388
+ "properties": {
389
+ "rolesConsistent": { "type": "boolean" },
390
+ "pathFormatConsistent": { "type": "boolean" },
391
+ "hierarchyRespected": { "type": "boolean" },
392
+ "crossAppConflicts": { "type": "array", "items": { "type": "string" } },
393
+ "warnings": { "type": "array", "items": { "type": "string" } }
394
+ }
395
+ },
396
+ "e2eFlows": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "object",
400
+ "properties": {
401
+ "name": { "type": "string" },
402
+ "applications": { "type": "array", "items": { "type": "string" } },
403
+ "modules": { "type": "array", "items": { "type": "string" } },
404
+ "steps": {
405
+ "type": "array",
406
+ "items": {
407
+ "type": "object",
408
+ "properties": {
409
+ "application": { "type": "string" },
410
+ "module": { "type": "string" },
411
+ "action": { "type": "string" },
412
+ "permission": { "type": "string" },
413
+ "dataFlow": { "type": "string" }
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+ },
420
+ "globalRiskAssessment": {
421
+ "type": "array",
422
+ "items": {
423
+ "type": "object",
424
+ "properties": {
425
+ "risk": { "type": "string" },
426
+ "category": { "type": "string", "enum": ["coupling", "complexity", "dependency-chain", "security", "scope", "cross-app-coupling"] },
427
+ "severity": { "type": "string", "enum": ["critical", "high", "medium", "low"] },
428
+ "mitigation": { "type": "string" }
429
+ }
430
+ }
431
+ },
432
+ "decision": {
433
+ "type": "object",
434
+ "properties": {
435
+ "approved": { "type": "boolean" },
436
+ "reason": { "type": "string" },
437
+ "approvedBy": { "type": "string" },
438
+ "approvedAt": { "type": "string", "format": "date-time" }
439
+ }
440
+ }
441
+ }
442
+ },
443
+
444
+ "suggestions": {
445
+ "type": "array",
446
+ "description": "Proactive AI suggestions for complementary applications/modules",
447
+ "items": {
448
+ "type": "object",
449
+ "required": ["type", "code", "reason"],
450
+ "properties": {
451
+ "type": { "type": "string", "enum": ["application", "module", "integration", "enhancement"] },
452
+ "code": { "type": "string" },
453
+ "title": { "type": "string" },
454
+ "reason": { "type": "string" },
455
+ "targetApplication": { "type": ["string", "null"], "description": "Application code for module-level suggestions" },
456
+ "accepted": { "type": ["boolean", "null"] }
457
+ }
458
+ }
459
+ },
460
+
461
+ "changelog": {
462
+ "type": "array",
463
+ "description": "Version history and change tracking",
464
+ "items": {
465
+ "type": "object",
466
+ "required": ["timestamp", "changes"],
467
+ "properties": {
468
+ "step": { "type": "string" },
469
+ "version": { "type": "string" },
470
+ "timestamp": { "type": "string", "format": "date-time" },
471
+ "author": { "type": "string" },
472
+ "changes": { "type": "array", "items": { "type": "string" } },
473
+ "warnings": { "type": "array", "items": { "type": "string" } },
474
+ "decision": { "type": "string" }
475
+ }
476
+ }
477
+ }
478
+ },
479
+
480
+ "$defs": {
481
+ "stepStatus": {
482
+ "type": "object",
483
+ "properties": {
484
+ "status": { "type": "string", "enum": ["pending", "in-progress", "completed", "skipped"] },
485
+ "startedAt": { "type": ["string", "null"], "format": "date-time" },
486
+ "completedAt": { "type": ["string", "null"], "format": "date-time" }
487
+ }
488
+ }
489
+ }
490
+ }
@@ -13,7 +13,8 @@
13
13
  "updatedAt": { "type": "string", "format": "date-time" },
14
14
  "application": { "type": "string", "description": "Application name (PascalCase)" },
15
15
  "module": { "type": "string", "description": "Module name (PascalCase)" },
16
- "context": { "type": "string", "const": "business" },
16
+ "context": { "type": "string", "enum": ["business", "platform", "personal"], "description": "Navigation context (inherited from application)" },
17
+ "projectRef": { "type": ["string", "null"], "description": "Parent project ID (PROJ-XXX) when part of a multi-application project" },
17
18
  "language": { "type": "string", "enum": ["fr", "en", "it", "de"] },
18
19
  "featureDescription": { "type": "string" },
19
20
  "featureType": {