@atlashub/smartstack-cli 2.6.2 → 2.7.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 (37) 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 +588 -339
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/templates/agents/ba-reader.md +23 -0
  19. package/templates/agents/ba-writer.md +63 -4
  20. package/templates/skills/business-analyse/questionnaire/00-application.md +1 -1
  21. package/templates/skills/business-analyse/questionnaire/03-scope.md +2 -2
  22. package/templates/skills/business-analyse/questionnaire.md +1 -1
  23. package/templates/skills/business-analyse/react/application-viewer.md +1 -1
  24. package/templates/skills/business-analyse/react/schema.md +88 -1
  25. package/templates/skills/business-analyse/schemas/application-schema.json +16 -1
  26. package/templates/skills/business-analyse/schemas/feature-schema.json +19 -986
  27. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +157 -0
  28. package/templates/skills/business-analyse/schemas/sections/discovery-schema.json +82 -0
  29. package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +80 -0
  30. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +69 -0
  31. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +445 -0
  32. package/templates/skills/business-analyse/schemas/sections/validation-schema.json +93 -0
  33. package/templates/skills/business-analyse/schemas/shared/common-defs.json +133 -0
  34. package/templates/skills/business-analyse/steps/step-01-cadrage.md +22 -3
  35. package/templates/skills/business-analyse/steps/step-03-specify.md +129 -0
  36. package/templates/skills/business-analyse/steps/step-04-consolidation.md +38 -5
  37. package/templates/skills/business-analyse/steps/step-05-handoff.md +94 -218
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "analysis-schema.json",
4
+ "title": "SmartStack BA - Analysis",
5
+ "description": "Module-level analysis: objectives, business rules, entities, process flows, integrations, data lifecycle. Enriched by step-03-specify.",
6
+ "type": "object",
7
+ "properties": {
8
+ "objectives": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "required": ["id", "objective"],
13
+ "properties": {
14
+ "id": { "type": "string", "pattern": "^OBJ-\\d{3}$" },
15
+ "objective": { "type": "string" },
16
+ "metric": { "type": "string" },
17
+ "target": { "type": "string" }
18
+ }
19
+ }
20
+ },
21
+ "businessRules": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "object",
25
+ "required": ["id", "name", "category", "statement"],
26
+ "properties": {
27
+ "id": { "type": "string", "pattern": "^BR-(VAL|CALC|WF|SEC|DATA)-[A-Z]{2,4}-\\d{3}$", "description": "Module-prefixed BR ID (e.g., BR-VAL-RM-001)" },
28
+ "name": { "type": "string" },
29
+ "category": { "type": "string", "enum": ["validation", "calculation", "workflow", "security", "data"] },
30
+ "statement": { "type": "string", "description": "IF ... THEN ... ELSE ..." },
31
+ "priority": { "type": "string", "enum": ["must", "should", "could"] },
32
+ "conditions": { "type": "array", "items": { "type": "string" } },
33
+ "examples": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "properties": {
38
+ "input": { "type": "string" },
39
+ "expected": { "type": "string" }
40
+ }
41
+ }
42
+ },
43
+ "testability": { "type": "string" }
44
+ }
45
+ }
46
+ },
47
+ "entities": {
48
+ "type": "array",
49
+ "description": "Business-view entities only. NO technical fields (Id, TenantId, CreatedBy, etc.)",
50
+ "items": {
51
+ "type": "object",
52
+ "required": ["name"],
53
+ "properties": {
54
+ "name": { "type": "string", "description": "PascalCase entity name" },
55
+ "description": { "type": "string" },
56
+ "attributes": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "required": ["name"],
61
+ "properties": {
62
+ "name": { "type": "string" },
63
+ "description": { "type": "string" },
64
+ "required": { "type": "boolean", "default": false },
65
+ "unique": { "type": "boolean", "default": false },
66
+ "validation": { "type": "string" }
67
+ }
68
+ }
69
+ },
70
+ "relationships": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "required": ["target", "type"],
75
+ "properties": {
76
+ "target": { "type": "string" },
77
+ "type": { "type": "string", "enum": ["1:1", "1:N", "N:1", "N:M"] },
78
+ "description": { "type": "string" }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "processFlow": {
86
+ "type": "object",
87
+ "properties": {
88
+ "entryPoints": { "type": "array", "items": { "type": "string" } },
89
+ "mainFlow": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "object",
93
+ "properties": {
94
+ "step": { "type": "integer" },
95
+ "actor": { "type": "string" },
96
+ "action": { "type": "string" },
97
+ "system": { "type": "string" }
98
+ }
99
+ }
100
+ },
101
+ "decisionPoints": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "object",
105
+ "properties": {
106
+ "condition": { "type": "string" },
107
+ "ifTrue": { "type": "string" },
108
+ "ifFalse": { "type": "string" },
109
+ "rule": { "type": "string", "description": "Reference to BR-XXX" }
110
+ }
111
+ }
112
+ },
113
+ "alternativeFlows": { "type": "array", "items": { "type": "object" } }
114
+ }
115
+ },
116
+ "integrations": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "system": { "type": "string" },
122
+ "direction": { "type": "string", "enum": ["in", "out", "bidirectional"] },
123
+ "data": { "type": "string" },
124
+ "frequency": { "type": "string" },
125
+ "errorStrategy": { "type": "string" }
126
+ }
127
+ }
128
+ },
129
+ "dataLifecycle": {
130
+ "type": "object",
131
+ "properties": {
132
+ "retentionPeriod": { "type": "string" },
133
+ "archiveStrategy": { "type": "string" },
134
+ "gdprCompliance": { "type": "string" },
135
+ "states": {
136
+ "type": "array",
137
+ "items": {
138
+ "type": "object",
139
+ "properties": {
140
+ "name": { "type": "string" },
141
+ "transitions": { "type": "array", "items": { "type": "string" } }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "crossModuleImpact": {
148
+ "type": "object",
149
+ "properties": {
150
+ "existingModules": { "type": "array", "items": { "type": "string" } },
151
+ "sharedData": { "type": "array", "items": { "type": "string" } },
152
+ "events": { "type": "array", "items": { "type": "string" } },
153
+ "modifications": { "type": "array", "items": { "type": "string" } }
154
+ }
155
+ }
156
+ }
157
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "discovery-schema.json",
4
+ "title": "SmartStack BA - Discovery",
5
+ "description": "Module-level discovery: problem, stakeholders, scope, risks. Enriched by step-01-cadrage (module mode) or derived from application cadrage.",
6
+ "type": "object",
7
+ "properties": {
8
+ "problem": { "type": "string", "description": "Q1.1 - Business problem to solve" },
9
+ "asIs": { "type": "string", "description": "Q1.2 - Current situation" },
10
+ "toBe": { "type": "string", "description": "Q1.3 - Target situation" },
11
+ "trigger": { "type": "string", "description": "Q1.4 - What triggered this need" },
12
+ "stakeholders": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "required": ["role"],
17
+ "properties": {
18
+ "role": { "type": "string" },
19
+ "function": { "type": "string" },
20
+ "involvement": { "type": "string", "enum": ["approver", "decision-maker", "consulted", "informed", "end-user"] },
21
+ "tasks": { "type": "array", "items": { "type": "string" } },
22
+ "frequency": { "type": "string" },
23
+ "painPoints": { "type": "array", "items": { "type": "string" } }
24
+ }
25
+ }
26
+ },
27
+ "scope": {
28
+ "type": "object",
29
+ "properties": {
30
+ "mustHave": { "type": "array", "items": { "type": "string" } },
31
+ "shouldHave": { "type": "array", "items": { "type": "string" } },
32
+ "couldHave": { "type": "array", "items": { "type": "string" } },
33
+ "outOfScope": { "type": "array", "items": { "type": "string" } },
34
+ "mainFlow": { "type": "string" },
35
+ "decisionPoints": { "type": "array", "items": { "type": "string" } },
36
+ "alternativeFlows": { "type": "array", "items": { "type": "string" } },
37
+ "errorCases": { "type": "array", "items": { "type": "string" } }
38
+ }
39
+ },
40
+ "risks": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "required": ["id", "type", "description"],
45
+ "properties": {
46
+ "id": { "type": "string", "pattern": "^RISK-\\d{3}$" },
47
+ "type": { "type": "string", "enum": ["business", "technical", "organizational"] },
48
+ "description": { "type": "string" },
49
+ "probability": { "type": "string", "enum": ["high", "medium", "low"] },
50
+ "impact": { "type": "string", "enum": ["high", "medium", "low"] },
51
+ "priority": { "type": "string", "enum": ["critical", "medium", "low"] },
52
+ "mitigation": { "type": "string" }
53
+ }
54
+ }
55
+ },
56
+ "acceptanceCriteria": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "required": ["id", "criterion"],
61
+ "properties": {
62
+ "id": { "type": "string", "pattern": "^AC-\\d{3}$" },
63
+ "criterion": { "type": "string" },
64
+ "validated": { "type": "boolean", "default": false }
65
+ }
66
+ }
67
+ },
68
+ "codebaseContext": { "type": "string", "description": "Summary of existing modules/patterns found during pre-research" },
69
+ "openQuestions": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "id": { "type": "string" },
75
+ "question": { "type": "string" },
76
+ "answer": { "type": ["string", "null"] },
77
+ "status": { "type": "string", "enum": ["pending", "answered", "deferred"] }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "handoff-schema.json",
4
+ "title": "SmartStack BA - Handoff",
5
+ "description": "Module-level handoff: file mapping (7 categories), BR-to-code mapping, API endpoint summary. Used by step-05-handoff.",
6
+ "type": "object",
7
+ "properties": {
8
+ "complexity": { "type": "string", "enum": ["simple", "medium", "complex"] },
9
+ "filesToCreate": {
10
+ "type": "object",
11
+ "properties": {
12
+ "domain": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } },
13
+ "application": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } },
14
+ "infrastructure": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } },
15
+ "api": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } },
16
+ "frontend": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } },
17
+ "seedData": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } },
18
+ "tests": { "type": "array", "items": { "$ref": "../shared/common-defs.json#/$defs/fileSpec" } }
19
+ }
20
+ },
21
+ "brToCodeMapping": {
22
+ "type": "array",
23
+ "description": "Maps each business rule to its implementation points across layers",
24
+ "items": {
25
+ "type": "object",
26
+ "required": ["ruleId", "implementationPoints"],
27
+ "properties": {
28
+ "ruleId": { "type": "string", "description": "BR-XXX identifier from analysis.businessRules" },
29
+ "title": { "type": "string" },
30
+ "implementationPoints": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "required": ["layer", "component"],
35
+ "properties": {
36
+ "layer": { "type": "string", "description": "Architecture layer (Domain, Application, Infrastructure, API, Frontend)" },
37
+ "component": { "type": "string", "description": "File name (e.g., Order.cs, OrdersController.cs)" },
38
+ "method": { "type": "string" },
39
+ "implementation": { "type": "string" }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "apiEndpointSummary": {
47
+ "type": "array",
48
+ "description": "Subset of specification.apiEndpoints enriched with linkedUC. MUST use EXACT same routes as specification.",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "operation": { "type": "string" },
53
+ "method": { "type": "string", "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"] },
54
+ "route": { "type": "string" },
55
+ "linkedUC": { "type": "string" },
56
+ "permissions": { "type": "string" }
57
+ }
58
+ }
59
+ },
60
+ "ralphPrd": {
61
+ "type": "object",
62
+ "description": "Embedded Ralph Loop task breakdown (also exported to .ralph/prd.json by ss derive-prd)",
63
+ "properties": {
64
+ "tasks": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "properties": {
69
+ "id": { "type": "integer" },
70
+ "description": { "type": "string" },
71
+ "category": { "type": "string", "enum": ["domain", "seedData", "seedDataCore", "application", "infrastructure", "api", "frontend", "i18n", "test", "validation"] },
72
+ "dependencies": { "type": "array", "items": { "type": "integer" } },
73
+ "acceptanceCriteria": { "type": "string" }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "metadata-schema.json",
4
+ "title": "SmartStack BA - Metadata & Application Context",
5
+ "description": "Module metadata and inherited application context. Used by step-00-init.",
6
+
7
+ "properties": {
8
+ "metadata": {
9
+ "type": "object",
10
+ "required": ["createdAt", "updatedAt", "application", "module", "context", "language", "featureDescription"],
11
+ "properties": {
12
+ "createdAt": { "type": "string", "format": "date-time" },
13
+ "updatedAt": { "type": "string", "format": "date-time" },
14
+ "application": { "type": "string", "description": "Application name (PascalCase)" },
15
+ "module": { "type": "string", "description": "Module name (PascalCase)" },
16
+ "context": { "type": "string", "const": "business" },
17
+ "language": { "type": "string", "enum": ["fr", "en", "it", "de"] },
18
+ "featureDescription": { "type": "string" },
19
+ "featureType": {
20
+ "type": "string",
21
+ "enum": ["data-centric", "integration", "ui-centric", "workflow", "reporting", "full-module", "micro"]
22
+ },
23
+ "useCase": { "type": "string", "enum": ["new", "refactoring", "micro"] },
24
+ "permissionBase": { "type": "string", "description": "e.g., business.sales.orders" },
25
+ "previousVersion": { "type": ["string", "null"] },
26
+ "changeReason": { "type": ["string", "null"] },
27
+ "mcpAvailable": { "type": "boolean" },
28
+ "economyMode": { "type": "boolean" },
29
+ "scope": { "type": "string", "enum": ["application", "module"], "default": "module" },
30
+ "applicationRef": { "type": ["string", "null"], "description": "Parent application feature ID (FEAT-XXX)" },
31
+ "applicationPath": { "type": ["string", "null"], "description": "Path to parent application-level feature.json" },
32
+ "moduleIndex": { "type": ["integer", "null"], "description": "Position in topological order (0-based)" },
33
+ "totalModules": { "type": ["integer", "null"] },
34
+ "inheritsRoles": { "type": "boolean", "default": false },
35
+ "steps": {
36
+ "type": "object",
37
+ "properties": {
38
+ "init": { "$ref": "../shared/common-defs.json#/$defs/stepStatus" },
39
+ "cadrage": { "$ref": "../shared/common-defs.json#/$defs/stepStatus" },
40
+ "specify": { "$ref": "../shared/common-defs.json#/$defs/stepStatus" },
41
+ "validate": { "$ref": "../shared/common-defs.json#/$defs/stepStatus" },
42
+ "handoff": { "$ref": "../shared/common-defs.json#/$defs/stepStatus" }
43
+ }
44
+ }
45
+ }
46
+ },
47
+
48
+ "applicationContext": {
49
+ "type": "object",
50
+ "description": "Inherited from parent application feature.json when part of multi-module analysis",
51
+ "properties": {
52
+ "applicationRoles": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "properties": {
57
+ "role": { "type": "string" },
58
+ "description": { "type": "string" },
59
+ "level": { "$ref": "../shared/common-defs.json#/$defs/roleLevel" },
60
+ "permissionPattern": { "type": "string" }
61
+ }
62
+ }
63
+ },
64
+ "permissionBase": { "type": "string" },
65
+ "relatedModules": { "type": "array", "items": { "type": "string" } }
66
+ }
67
+ }
68
+ }
69
+ }