@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,299 +0,0 @@
1
- ---
2
- name: step-02-analyse
3
- description: Analysis phase - BRD formalization with business rules
4
- next_step: steps/step-03-specify.md
5
- ---
6
-
7
- ## YOUR TASK:
8
-
9
- Transform discovery findings into a formal Business Requirements Document (BRD).
10
- Identify and formalize all business rules with BR-XXX identifiers.
11
-
12
- > **ULTRATHINK MODE:**
13
- > - Extract IMPLICIT rules from discovery responses
14
- > - Challenge completeness of each rule
15
- > - Verify no rule contradicts another
16
- > - Ensure rules are testable
17
-
18
- ## EXECUTION SEQUENCE:
19
-
20
- ### 1. Read Current State
21
-
22
- Read `{output_dir}/00-context.md` to restore state variables.
23
- Read `{output_dir}/1-discovery.md` for discovery findings.
24
-
25
- Update progress: `02-analyse` -> "In Progress"
26
-
27
- **Read digest from previous step:**
28
- Read `{output_dir}/digest-01.md` for compressed context from previous step.
29
- **DO NOT read full output files** unless in resume mode (`-r`).
30
-
31
- ---
32
-
33
- ### 2. Load BRD Template
34
-
35
- ```
36
- Read: templates/tpl-brd.md # ~90 lines only (vs 477 lines full template)
37
- ```
38
-
39
- This template contains ONLY the BRD structure, not FRD or Handoff.
40
-
41
- ---
42
-
43
- ### 3. Extract Business Objectives
44
-
45
- From discovery section 1 (Contexte Business), formalize:
46
-
47
- | ID | Objective | Metric | Target |
48
- |----|----------|----------|-------|
49
- | OBJ-001 | {objective} | {measurable KPI} | {target value} |
50
- | OBJ-002 | ... | ... | ... |
51
-
52
- **ULTRATHINK checkpoint:**
53
- - Each objective is measurable?
54
- - Target values are realistic?
55
- - Objectives align with stakeholder needs?
56
-
57
- ---
58
-
59
- ### 4. Identify Business Rules
60
-
61
- Scan discovery document for implicit and explicit rules:
62
-
63
- **Sources to analyze:**
64
- - Scope section (constraints)
65
- - Stakeholder needs (role-specific rules)
66
- - Data requirements (validation rules)
67
- - Process flows (workflow rules)
68
-
69
- **Rule categories:**
70
- | Category | Example | BR-ID pattern |
71
- |----------|---------|---------------|
72
- | Validation | "Email must be unique" | BR-VAL-XXX |
73
- | Calculation | "Total = sum of lines" | BR-CALC-XXX |
74
- | Workflow | "Manager must approve > 1000$" | BR-WF-XXX |
75
- | Security | "Only admin can delete" | BR-SEC-XXX |
76
- | Data | "Created date is immutable" | BR-DATA-XXX |
77
-
78
- ---
79
-
80
- ### 5. Formalize Each Business Rule
81
-
82
- For each identified rule, create detailed specification:
83
-
84
- ```markdown
85
- #### BR-XXX: {Rule Name}
86
-
87
- **Statement:** {Clear, unambiguous statement}
88
-
89
- **Conditions:**
90
- - IF {condition A}
91
- - AND {condition B}
92
- - THEN {result}
93
- - ELSE {alternative result}
94
-
95
- **Examples:**
96
- | Input | Expected Output |
97
- |-------|-----------------|
98
- | {example input 1} | {expected output 1} |
99
- | {example input 2} | {expected output 2} |
100
-
101
- **Testability:** {How to verify this rule}
102
- ```
103
-
104
- ---
105
-
106
- ### 6. Model Business Process
107
-
108
- Create process diagram for main flow:
109
-
110
- ```
111
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
112
- │ Step 1 │────►│ Step 2 │────►│ Step 3 │
113
- │ {action} │ │ {action} │ │ {action} │
114
- └─────────────┘ └─────────────┘ └─────────────┘
115
- │ │ │
116
- ▼ ▼ ▼
117
- {actor} {actor} {actor}
118
- ```
119
-
120
- Identify:
121
- - Entry points
122
- - Decision points (apply BR-WF rules)
123
- - Exit points
124
- - Alternative flows
125
-
126
- ---
127
-
128
- ### 7. Define Data Entities (Business View)
129
-
130
- **IMPORTANT: Business attributes only - NO technical types!**
131
-
132
- | Entity | Description | Cardinality |
133
- |--------|-------------|-------------|
134
- | {Entity} | {business description} | 1:N with {other} |
135
-
136
- | Entity | Attribute | Description | Required |
137
- |--------|-----------|-------------|----------|
138
- | {Entity} | {attribute} | {business meaning} | Yes/No |
139
-
140
- **ULTRATHINK checkpoint:**
141
- - All entities from discovery captured?
142
- - Relationships are complete?
143
- - No orphan entities?
144
- - **RBAC CHECK:** No role/permission/access-level modeled as entity attribute?
145
- - `User.Role`, `User.AccessLevel`, `User.IsAdmin` = **FORBIDDEN**
146
- - Roles are SmartStack RBAC permission sets, not data model concepts
147
- - If stakeholders described roles, they belong in the Permission Matrix (step-03), not here
148
-
149
- ---
150
-
151
- ### 8. Identify Integrations
152
-
153
- | System | Direction | Data | Frequency |
154
- |--------|-----------|------|-----------|
155
- | {system} | In/Out/Bi | {data} | Real-time/Batch |
156
-
157
- For each integration, note:
158
- - Data format expected
159
- - Error handling strategy
160
- - Fallback behavior
161
-
162
- ---
163
-
164
- ### 9. Compile BRD Document
165
-
166
- Assemble using `templates/tpl-brd.md` structure:
167
-
168
- ```markdown
169
- # BRD - {feature_id} {feature_description}
170
-
171
- > **Module:** business/{application_name}/{module_name}
172
- > **Version:** 1.0
173
- > **Based on:** 1-discovery.md v1.0
174
-
175
- ## 1. Executive Summary
176
- {3-5 sentence synthesis}
177
-
178
- ## 2. Business Objectives
179
- {OBJ table}
180
-
181
- ## 3. Business Rules
182
- {BR summary table}
183
-
184
- ### 3.1 Critical Rules Detail
185
- {BR-XXX detailed specs}
186
-
187
- ## 4. Business Process
188
- {Process diagrams}
189
-
190
- ## 5. Business Data
191
- {Entity tables - business view}
192
-
193
- ## 6. Integrations
194
- {Integration table}
195
-
196
- ---
197
-
198
- ## Version History
199
-
200
- | Version | Date | Author | Changes |
201
- |---------|------|--------|---------|
202
- | 1.0 | {date} | BA | Initial creation |
203
- ```
204
-
205
- ---
206
-
207
- ### 9b. Generate Context Digest
208
-
209
- **Write digest to:** `{output_dir}/digest-02.md`
210
-
211
- ```markdown
212
- # Digest: Step 02 - Analyse
213
-
214
- ## Changes
215
- - {output_dir}/2-business-requirements.md: BRD created
216
-
217
- ## Decisions
218
- - {count} business objectives formalized
219
- - {count} business rules identified (categories: VAL, CALC, WF, SEC, DATA)
220
-
221
- ## Findings
222
- - {count} entities with {count} total attributes
223
- - {count} integrations identified
224
- - Process flow: {summary of main flow}
225
-
226
- ## State Updates
227
- | Variable | New Value |
228
- |----------|-----------|
229
- | br_count | {count} |
230
- | entity_count | {count} |
231
- | integration_count | {count} |
232
-
233
- ## For Next Step
234
- - BR-IDs to trace: {list of BR-IDs}
235
- - Entities to specify: {list}
236
- - Permission paths needed for: {list of entities}
237
- ```
238
-
239
- ---
240
-
241
- ### 10. Save Output
242
-
243
- Write to: `{output_dir}/2-business-requirements.md`
244
-
245
- Update `00-context.md`:
246
- - Progress: `02-analyse` -> "Complete"
247
- - Add BR count to state
248
-
249
- ---
250
-
251
- ### 11. Display Summary and Load Next Step
252
-
253
- **Display:**
254
-
255
- | Field | Value |
256
- |-------|-------|
257
- | Step | ANALYSE |
258
- | Feature | {feature_id} |
259
- | Status | Complete |
260
- | Objectives | {OBJ count} |
261
- | Business Rules | {BR count} |
262
- | Entities | {entity count} |
263
- | Integrations | {integration count} |
264
- | Output | {output_dir}/2-business-requirements.md |
265
- | Next | step-03-specify (FRD + Use Cases) |
266
-
267
- **If NOT auto_mode:**
268
- Ask: "Proceed with functional specification?"
269
-
270
- **Load next step:**
271
- ```
272
- Read and execute: steps/step-03-specify.md
273
- ```
274
-
275
- ---
276
-
277
- ## OUTPUT FORMAT:
278
-
279
- This step produces:
280
- - `{output_dir}/2-business-requirements.md` (created)
281
- - `{output_dir}/00-context.md` (updated)
282
-
283
- Template loaded: **~90 lines** (vs 477 lines full file)
284
-
285
- ## ERROR HANDLING:
286
-
287
- **If discovery document is incomplete:**
288
- 1. List missing sections
289
- 2. Ask user: "Return to discovery to complete, or proceed with available data?"
290
- 3. If proceeding: mark BRD sections with "[INCOMPLETE - based on partial discovery]"
291
-
292
- **If business rules contradict each other:**
293
- 1. Identify conflicting rules (BR-XXX vs BR-YYY)
294
- 2. Ask user to resolve contradiction via AskUserQuestion
295
- 3. Document resolution in BRD
296
-
297
- ## NEXT STEP:
298
-
299
- After completion, proceed to `steps/step-03-specify.md`