@atlashub/smartstack-cli 2.1.0 → 2.3.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 (38) hide show
  1. package/.documentation/business-analyse.html +1503 -1058
  2. package/dist/index.js +92 -55
  3. package/dist/index.js.map +1 -1
  4. package/package.json +10 -7
  5. package/templates/agents/ba-reader.md +250 -0
  6. package/templates/agents/ba-writer.md +210 -0
  7. package/templates/agents/docs-context-reader.md +51 -33
  8. package/templates/skills/_shared.md +2 -0
  9. package/templates/skills/business-analyse/SKILL.md +120 -108
  10. package/templates/skills/business-analyse/_shared.md +136 -146
  11. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +478 -0
  12. package/templates/skills/business-analyse/questionnaire/01-context.md +3 -15
  13. package/templates/skills/business-analyse/questionnaire/03-scope.md +7 -7
  14. package/templates/skills/business-analyse/questionnaire/08-performance.md +7 -21
  15. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -13
  16. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -13
  17. package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
  18. package/templates/skills/business-analyse/questionnaire.md +72 -76
  19. package/templates/skills/business-analyse/react/components.md +317 -154
  20. package/templates/skills/business-analyse/react/i18n-template.md +167 -106
  21. package/templates/skills/business-analyse/react/schema.md +474 -107
  22. package/templates/skills/business-analyse/schemas/feature-schema.json +860 -0
  23. package/templates/skills/business-analyse/steps/step-00-init.md +395 -285
  24. package/templates/skills/business-analyse/steps/step-01-analyse.md +523 -0
  25. package/templates/skills/business-analyse/steps/step-02-specify.md +899 -0
  26. package/templates/skills/business-analyse/steps/step-03-validate.md +1009 -0
  27. package/templates/skills/business-analyse/steps/step-04-handoff.md +1802 -0
  28. package/templates/skills/business-analyse/templates/tpl-handoff.md +49 -64
  29. package/templates/skills/business-analyse/steps/step-01-discover.md +0 -737
  30. package/templates/skills/business-analyse/steps/step-02-analyse.md +0 -299
  31. package/templates/skills/business-analyse/steps/step-03-specify.md +0 -472
  32. package/templates/skills/business-analyse/steps/step-04-validate.md +0 -335
  33. package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -741
  34. package/templates/skills/business-analyse/steps/step-06-doc-html.md +0 -320
  35. package/templates/skills/business-analyse/templates/00-context.md +0 -105
  36. package/templates/skills/business-analyse/templates/tpl-brd.md +0 -97
  37. package/templates/skills/business-analyse/templates/tpl-discovery.md +0 -78
  38. package/templates/skills/business-analyse/tracking/change-template.md +0 -30
@@ -1,320 +0,0 @@
1
- ---
2
- name: step-06-doc-html
3
- description: Documentation phase - Generate React documentation page
4
- next_step: null
5
- ---
6
-
7
- ## YOUR TASK:
8
-
9
- Generate React documentation page integrated into SmartStack web app.
10
- Create i18n translations in 4 languages (FR, EN, IT, DE).
11
-
12
- <context7>
13
- CONTEXT7 REQUIRED for React generation:
14
-
15
- ```
16
- Use context7 with /facebook/react and /i18next/react-i18next
17
- to generate documentation components following SmartStack patterns
18
- ```
19
-
20
- Libraries to reference:
21
- - /facebook/react - React 19 patterns
22
- - /i18next/react-i18next - Internationalization
23
- - /remix-run/react-router - React Router v7
24
- - /lucide-icons/lucide-react - Icons
25
- </context7>
26
-
27
- ## EXECUTION SEQUENCE:
28
-
29
- ### 1. Read Current State
30
-
31
- Read `{output_dir}/00-context.md` for state variables.
32
- Read FRD: `{output_dir}/3-functional-specification.md`
33
-
34
- Update progress: `06-doc-html` -> "In Progress"
35
-
36
- **Read digest from previous step:**
37
- Read `{output_dir}/digest-05.md` for compressed context from previous step.
38
- **DO NOT read full output files** unless in resume mode (`-r`).
39
-
40
- ---
41
-
42
- ### 2. Load React Templates (Progressive)
43
-
44
- ```
45
- Read: react/components.md # ~250 lines (React components)
46
- Read: react/schema.md # ~100 lines (TypeScript interfaces)
47
- ```
48
-
49
- **NOT loaded:** Full templates-react.md (580 lines)
50
- **Savings:** ~230 lines (40% reduction)
51
-
52
- ---
53
-
54
- ### 3. Extract FRD Data
55
-
56
- Parse FRD to create structured data object:
57
-
58
- ```typescript
59
- interface FrdData {
60
- featureId: string; // From state
61
- moduleName: string; // From state
62
- applicationName: string; // From state
63
- version: string; // "1.0"
64
- useCases: UseCase[]; // From FRD section 2
65
- businessRules: BusinessRule[]; // From BRD section 3
66
- permissions: Permission[]; // From FRD section 6
67
- }
68
- ```
69
-
70
- ---
71
-
72
- ### 4. Generate React Component
73
-
74
- Using `react/components.md` template, generate:
75
-
76
- **File:** `web/smartstack-web/src/pages/docs/business/{app}/{module}/FrdDocPage.tsx`
77
-
78
- Key sections:
79
- - Breadcrumb navigation
80
- - Header with feature ID and version
81
- - Table of contents
82
- - Section 1: Overview with stats
83
- - Section 2: Use Cases cards
84
- - Section 3: Business Rules table
85
- - Section 4: Permissions list
86
- - Section 5: Wireframe preview
87
- - Section 6: API Endpoints table
88
- - Footer navigation
89
-
90
- **Use Context7** for:
91
- - Latest React patterns
92
- - Proper hook usage
93
- - TypeScript typing
94
-
95
- ---
96
-
97
- ### 5. Generate i18n Translations
98
-
99
- **Create 4 language files:**
100
-
101
- | Language | File |
102
- |----------|------|
103
- | FR | `web/smartstack-web/src/i18n/locales/fr/docs-{app}-{module}.json` |
104
- | EN | `web/smartstack-web/src/i18n/locales/en/docs-{app}-{module}.json` |
105
- | IT | `web/smartstack-web/src/i18n/locales/it/docs-{app}-{module}.json` |
106
- | DE | `web/smartstack-web/src/i18n/locales/de/docs-{app}-{module}.json` |
107
-
108
- **Structure:**
109
-
110
- ```json
111
- {
112
- "breadcrumb": {
113
- "docs": "Documentation",
114
- "business": "Business"
115
- },
116
- "common": {
117
- "tableOfContents": "Table of Contents",
118
- "wireframePreview": "Wireframe Preview"
119
- },
120
- "sections": {
121
- "overview": "Overview",
122
- "useCases": "Use Cases",
123
- "businessRules": "Business Rules",
124
- "permissions": "Permissions",
125
- "wireframes": "Wireframes",
126
- "api": "API Endpoints"
127
- },
128
- "labels": {
129
- "actor": "Actor",
130
- "rule": "Rule",
131
- "category": "Category",
132
- "priority": "Priority"
133
- },
134
- "stats": {
135
- "useCases": "Use Cases",
136
- "businessRules": "Business Rules",
137
- "permissions": "Permissions"
138
- },
139
- "warnings": {
140
- "permissionCheck": "Permission Check Required",
141
- "permissionCheckDescription": "Ensure all permissions are registered before deployment."
142
- },
143
- "nav": {
144
- "backToApp": "Back to Application",
145
- "allModules": "All Modules"
146
- },
147
- "apps": {
148
- "{app}": {
149
- "name": "{Application Name}",
150
- "description": "{Application description}"
151
- }
152
- },
153
- "modules": {
154
- "{module}": {
155
- "name": "{Module Name}",
156
- "title": "{Module Title}",
157
- "subtitle": "{Module subtitle}",
158
- "overview": "{Module overview from FRD}"
159
- }
160
- }
161
- }
162
- ```
163
-
164
- **Translation strategy:**
165
- - FR: Source language (from FRD)
166
- - EN: Translate from FR
167
- - IT: Translate from FR
168
- - DE: Translate from FR
169
-
170
- ---
171
-
172
- ### 6. Update Routing
173
-
174
- **Add route to App.tsx or routes config:**
175
-
176
- ```tsx
177
- {
178
- path: '/docs/business/{app}/{module}',
179
- element: <{Module}FrdDocPage />,
180
- handle: {
181
- permission: 'docs.read' // Public or minimal permission
182
- }
183
- }
184
- ```
185
-
186
- ---
187
-
188
- ### 7. Update Index Page (if needed)
189
-
190
- If this is a new module in existing application:
191
-
192
- Update `web/smartstack-web/src/pages/docs/business/{app}/index.tsx`:
193
-
194
- ```tsx
195
- const modules: ModuleLink[] = [
196
- // ... existing modules
197
- {
198
- id: '{module}',
199
- name: '{Module Name}',
200
- description: '{Module description}',
201
- features: {feature_count},
202
- path: '/docs/business/{app}/{module}'
203
- }
204
- ];
205
- ```
206
-
207
- ---
208
-
209
- ### 8. Save Outputs
210
-
211
- **Files created:**
212
-
213
- | File | Purpose |
214
- |------|---------|
215
- | `FrdDocPage.tsx` | React documentation component |
216
- | `fr/docs-{app}-{module}.json` | French translations |
217
- | `en/docs-{app}-{module}.json` | English translations |
218
- | `it/docs-{app}-{module}.json` | Italian translations |
219
- | `de/docs-{app}-{module}.json` | German translations |
220
-
221
- Update `00-context.md`:
222
- - Progress: `06-doc-html` -> "Complete"
223
-
224
- ---
225
-
226
- ### 9. Display Final Summary
227
-
228
- **Step Summary:**
229
-
230
- | Field | Value |
231
- |-------|-------|
232
- | Step | DOCUMENTATION |
233
- | Feature | {feature_id} |
234
- | Status | Complete |
235
- | React page | FrdDocPage.tsx |
236
- | i18n | 4 languages created |
237
- | Route | /docs/business/{app}/{module} |
238
- | Status | BA WORKFLOW COMPLETE |
239
-
240
- **Artifacts Summary:**
241
-
242
- | Document | Location | Status |
243
- |----------|----------|--------|
244
- | Discovery | {output_dir}/1-discovery.md | Complete |
245
- | BRD | {output_dir}/2-business-requirements.md | Complete |
246
- | FRD | {output_dir}/3-functional-specification.md | Complete |
247
- | Validation | {output_dir}/validation.json | APPROVED |
248
- | Handoff | {output_dir}/4-development-handoff.md | Complete |
249
- | Documentation | web/.../FrdDocPage.tsx | Complete |
250
-
251
- **Next steps:**
252
- 1. Review generated documentation at /docs/business/{app}/{module}
253
- 2. Execute /ralph-loop -r (iterative) or /feature-full (one-shot) to start development
254
- 3. Run tests after implementation
255
-
256
- Thank you for using Business Analysis skill!
257
- Contact: support@atlshub.ch
258
-
259
- ---
260
-
261
- ### 10. Update Documentation Manifest
262
-
263
- **Update `docs-manifest.json` at project root:**
264
-
265
- 1. Read existing `docs-manifest.json` (create if absent with `version: "1.0"`)
266
- 2. Add or update the module entry:
267
- ```json
268
- {
269
- "business/{application_name}/{module_name}": {
270
- "featureId": "{feature_id}",
271
- "displayName": "{module_name}",
272
- "codeFiles": [/* from handoff section 3 */],
273
- "docFiles": [
274
- "web/.../pages/docs/business/{app}/{module}/frd-data.ts",
275
- "web/.../i18n/locales/fr/docs-{app}-{module}.json"
276
- ],
277
- "baOutputs": ["{output_dir}"],
278
- "screenshots": {/* from frd-data screenshots field */},
279
- "lastCodeChange": "{current_timestamp}",
280
- "lastDocUpdate": "{current_timestamp}",
281
- "gitCommitCode": "",
282
- "gitCommitDoc": "",
283
- "status": "synced"
284
- }
285
- }
286
- ```
287
- 3. Update `lastUpdated` at manifest root level
288
- 4. Write updated manifest
289
-
290
- > **Schema reference:** See `_resources/docs-manifest-schema.md` for full schema documentation.
291
-
292
- ---
293
-
294
- ## OUTPUT FORMAT:
295
-
296
- This step produces:
297
- - React documentation page
298
- - 4 i18n translation files
299
- - Updated routing
300
- - Updated documentation manifest
301
- - Final BA summary
302
-
303
- **BA Workflow Complete.**
304
-
305
- ## ERROR HANDLING:
306
-
307
- **If React component generation fails:**
308
- 1. Save FRD data structure to `{output_dir}/frd-data-draft.json`
309
- 2. Skip React page generation
310
- 3. Mark step as "Partial - data extracted, page generation failed"
311
- 4. Suggest: "Run `/documentation {module}` manually to retry"
312
-
313
- **If i18n translation fails for non-FR language:**
314
- 1. Generate FR (source language) first
315
- 2. Mark other languages as "[TODO - translation pending]"
316
- 3. Log: "EN/IT/DE translations deferred to translation pipeline"
317
-
318
- ## NEXT STEP:
319
-
320
- After completion, the Business Analysis workflow is finalized. Implementation proceeds via `/ralph-loop -r` or `/feature-full`.
@@ -1,105 +0,0 @@
1
- # Business Analysis: {{feature_id}}
2
-
3
- **Created:** {{timestamp}}
4
- **Feature:** {{feature_description}}
5
- **Application:** business/{{application_name}}/{{module_name}}
6
-
7
- ---
8
-
9
- ## Configuration
10
-
11
- | Setting | Value |
12
- |---------|-------|
13
- | Auto mode | {{auto_mode}} |
14
- | Save mode | {{save_mode}} |
15
- | Economy mode | {{economy_mode}} |
16
-
17
- ---
18
-
19
- ## Progress
20
-
21
- | Step | Status | Started | Completed |
22
- |------|--------|---------|-----------|
23
- | 00-init | {{step_00_status}} | {{step_00_started}} | {{step_00_completed}} |
24
- | 01-discover | {{step_01_status}} | {{step_01_started}} | {{step_01_completed}} |
25
- | 02-analyse | {{step_02_status}} | {{step_02_started}} | {{step_02_completed}} |
26
- | 03-specify | {{step_03_status}} | {{step_03_started}} | {{step_03_completed}} |
27
- | 04-validate | {{step_04_status}} | {{step_04_started}} | {{step_04_completed}} |
28
- | 05-handoff | {{step_05_status}} | {{step_05_started}} | {{step_05_completed}} |
29
- | 06-doc-html | {{step_06_status}} | {{step_06_started}} | {{step_06_completed}} |
30
-
31
- ---
32
-
33
- ## State Variables
34
-
35
- | Variable | Value |
36
- |----------|-------|
37
- | feature_id | {{feature_id}} |
38
- | feature_description | {{feature_description}} |
39
- | application_name | {{application_name}} |
40
- | module_name | {{module_name}} |
41
- | context | business |
42
- | permission_base | business.{{application_name}}.{{module_name}} |
43
-
44
- ---
45
-
46
- ## Metrics
47
-
48
- | Metric | Value |
49
- |--------|-------|
50
- | Questionnaire categories loaded | {{categories_loaded}} |
51
- | Questions answered | {{questions_answered}} |
52
- | Open questions | {{open_questions}} |
53
- | Business objectives | {{obj_count}} |
54
- | Business rules | {{br_count}} |
55
- | Use cases | {{uc_count}} |
56
- | Functional requirements | {{fr_count}} |
57
- | Permissions | {{perm_count}} |
58
-
59
- ---
60
-
61
- ## Acceptance Criteria
62
-
63
- {{#acceptance_criteria}}
64
- - [ ] {{criterion}}
65
- {{/acceptance_criteria}}
66
-
67
- ---
68
-
69
- ## Validation Status
70
-
71
- | Check | Status |
72
- |-------|--------|
73
- | Discovery complete | {{discovery_status}} |
74
- | BRD complete | {{brd_status}} |
75
- | FRD complete | {{frd_status}} |
76
- | Validation decision | {{validation_decision}} |
77
- | Handoff ready | {{handoff_status}} |
78
-
79
- ---
80
-
81
- ## Files Generated
82
-
83
- | File | Status | Size |
84
- |------|--------|------|
85
- | 1-discovery.md | {{discovery_file_status}} | {{discovery_file_size}} |
86
- | 2-business-requirements.md | {{brd_file_status}} | {{brd_file_size}} |
87
- | 3-functional-specification.md | {{frd_file_status}} | {{frd_file_size}} |
88
- | validation.json | {{validation_file_status}} | {{validation_file_size}} |
89
- | 4-development-handoff.md | {{handoff_file_status}} | {{handoff_file_size}} |
90
-
91
- ---
92
-
93
- ## Notes
94
-
95
- {{notes}}
96
-
97
- ---
98
-
99
- ## History
100
-
101
- | Timestamp | Action | Details |
102
- |-----------|--------|---------|
103
- {{#history}}
104
- | {{timestamp}} | {{action}} | {{details}} |
105
- {{/history}}
@@ -1,97 +0,0 @@
1
- # Template Business Requirements Document
2
-
3
- > **Usage:** Template for 2-business-requirements.md
4
- > **Loaded in:** step-02-analyse.md
5
-
6
- ---
7
-
8
- ```markdown
9
- # BRD - {FEAT-XXX} {Feature Name}
10
-
11
- > **Module:** business/{application}/{module}
12
- > **Version:** 1.0
13
- > **Based on:** 1-discovery.md v1.0
14
-
15
- ## 1. Executive Summary
16
-
17
- {3-5 sentence summary of the business need and proposed solution}
18
-
19
- ## 2. Business Objectives
20
-
21
- | ID | Objective | Metric | Target |
22
- |----|----------|--------|--------|
23
- | OBJ-001 | {objective} | {Measurable KPI} | {target value} |
24
-
25
- ## 3. Business Rules
26
-
27
- | ID | Rule | Category | Priority |
28
- |----|------|----------|----------|
29
- | BR-001 | {Business rule description} | Validation/Calculation/Workflow | Must/Should/Could |
30
- | BR-002 | {Description} | {category} | {priority} |
31
-
32
- ### 3.1 Critical Rules Detail
33
-
34
- #### BR-001: {Rule Name}
35
-
36
- **Statement:** {Precise rule formulation}
37
-
38
- **Conditions:**
39
- - IF {condition A}
40
- - AND {condition B}
41
- - THEN {result}
42
- - ELSE {alternative result}
43
-
44
- **Examples:**
45
- | Input | Expected Output |
46
- |--------|-----------------|
47
- | {example 1} | {result 1} |
48
- | {example 2} | {result 2} |
49
-
50
- ## 4. Business Process
51
-
52
- ### 4.1 Main Process
53
-
54
- ```
55
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
56
- │ Step 1 │────►│ Step 2 │────►│ Step 3 │
57
- │ {action} │ │ {action} │ │ {action} │
58
- └─────────────┘ └─────────────┘ └─────────────┘
59
- │ │ │
60
- ▼ ▼ ▼
61
- {actor} {actor} {actor}
62
- ```
63
-
64
- ### 4.2 Alternative Flows
65
-
66
- | Trigger | Flow | Result |
67
- |---------|------|--------|
68
- | {condition} | {flow description} | {final state} |
69
-
70
- ## 5. Business Data
71
-
72
- ### 5.1 Main Entities
73
-
74
- | Entity | Description | Cardinality |
75
- |--------|-------------|-------------|
76
- | {Entity} | {description} | 1:N with {other entity} |
77
-
78
- ### 5.2 Key Attributes (NO technical types)
79
-
80
- | Entity | Attribute | Description | Required |
81
- |--------|-----------|-------------|----------|
82
- | {Entity} | {attribute} | {business description} | Yes/No |
83
-
84
- ## 6. Integrations
85
-
86
- | System | Direction | Data | Frequency |
87
- |--------|-----------|------|-----------|
88
- | {system} | Input/Output/Bidirectional | {data} | Real-time/Batch |
89
-
90
- ---
91
-
92
- ## Version History
93
-
94
- | Version | Date | Author | Changes |
95
- |---------|------|--------|---------|
96
- | 1.0 | {date} | BA | Initial creation |
97
- ```
@@ -1,78 +0,0 @@
1
- # Template Discovery Document
2
-
3
- > **Usage:** Template for 1-discovery.md
4
- > **Loaded in:** step-01-discover.md
5
-
6
- ---
7
-
8
- ```markdown
9
- # Discovery - {FEAT-XXX} {Feature Name}
10
-
11
- > **Module:** business/{application}/{module}
12
- > **Version:** 1.0
13
- > **Date:** {YYYY-MM-DD}
14
- > **Author:** Business Analyst
15
-
16
- ## 1. Business Context
17
-
18
- ### 1.1 Need Description
19
- {Clear description of the business need expressed by the stakeholder}
20
-
21
- ### 1.2 Current Problem
22
- {Current situation and its limitations}
23
-
24
- ### 1.3 Expected Value
25
- {Measurable business benefits}
26
-
27
- ## 2. Stakeholders
28
-
29
- | Role | Name/Function | Involvement | Decision Level |
30
- |------|--------------|-------------|-----------------|
31
- | Sponsor | {name} | {description} | Approver |
32
- | Product Owner | {name} | {description} | Decision Maker |
33
- | Key User | {name} | {description} | Consulted |
34
-
35
- ## 3. Scope
36
-
37
- ### 3.1 In Scope
38
- - [ ] {Included feature 1}
39
- - [ ] {Included feature 2}
40
-
41
- ### 3.2 Out of Scope
42
- - {Explicit exclusion 1}
43
- - {Explicit exclusion 2}
44
-
45
- ## 4. Open Questions
46
-
47
- | # | Question | Answer | Status |
48
- |---|----------|--------|--------|
49
- | Q1 | {Question} | {Answer or "Pending"} | ⏳/✅ |
50
-
51
- ## 5. Identified Constraints
52
-
53
- | Type | Constraint | Impact |
54
- |------|------------|--------|
55
- | Technical | {constraint} | {impact} |
56
- | Budget | {constraint} | {impact} |
57
- | Schedule | {constraint} | {impact} |
58
- | Regulatory | {constraint} | {impact} |
59
-
60
- ## 6. Dependencies
61
-
62
- | Dependency | Type | Module/System | Criticality |
63
- |------------|------|----------------|-----------|
64
- | {dep} | Internal/External | {module} | High/Medium/Low |
65
-
66
- ## 7. Acceptance Criteria (Inferred)
67
-
68
- - [ ] AC-001: {criterion}
69
- - [ ] AC-002: {criterion}
70
-
71
- ---
72
-
73
- ## Version History
74
-
75
- | Version | Date | Author | Changes |
76
- |---------|------|--------|---------|
77
- | 1.0 | {date} | BA | Initial creation |
78
- ```
@@ -1,30 +0,0 @@
1
- # Change Tracking Template
2
-
3
- ## CHANGE-NNN: {description}
4
-
5
- **Feature:** {feature_id}
6
- **Date:** {timestamp}
7
- **Type:** requirement-change | scope-change | bug-fix | enhancement
8
- **Impact:** {modules affected}
9
- **Doc sync required:** Yes | No
10
-
11
- ## Changes
12
-
13
- - {what changed and why}
14
-
15
- ## Documentation Impact
16
-
17
- | Section | Impact | Action Required |
18
- |---------|--------|-----------------|
19
- | Business Rules | Modified BR-XXX | Update frd-data.ts |
20
- | Permissions | New permission added | Update frd-data.ts + PermissionConfiguration.cs |
21
- | API Endpoints | New endpoint | Update frd-data.ts |
22
- | Use Cases | Modified UC-XXX | Update frd-data.ts + i18n FR |
23
-
24
- ## Validation
25
-
26
- - [ ] Code changes implemented
27
- - [ ] Documentation updated (frd-data.ts)
28
- - [ ] i18n FR updated
29
- - [ ] docs-manifest.json updated
30
- - [ ] Tests passing