@atlashub/smartstack-cli 2.0.0 → 2.2.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 (59) hide show
  1. package/.documentation/agents.html +147 -40
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +3 -3
  4. package/.documentation/cli-commands.html +2 -2
  5. package/.documentation/commands.html +14 -14
  6. package/.documentation/efcore.html +14 -14
  7. package/.documentation/gitflow.html +12 -12
  8. package/.documentation/hooks.html +41 -3
  9. package/.documentation/index.html +1 -1
  10. package/.documentation/init.html +2 -2
  11. package/.documentation/installation.html +11 -11
  12. package/.documentation/js/app.js +1 -1
  13. package/.documentation/ralph-loop.html +1 -1
  14. package/.documentation/test-web.html +4 -4
  15. package/dist/index.js +19 -11
  16. package/dist/index.js.map +1 -1
  17. package/dist/mcp-entry.mjs +57595 -4569
  18. package/dist/mcp-entry.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/templates/agents/ba-reader.md +250 -0
  21. package/templates/agents/ba-writer.md +210 -0
  22. package/templates/agents/docs-context-reader.md +51 -33
  23. package/templates/skills/_shared.md +2 -0
  24. package/templates/skills/business-analyse/SKILL.md +120 -108
  25. package/templates/skills/business-analyse/_shared.md +191 -160
  26. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +478 -0
  27. package/templates/skills/business-analyse/questionnaire/01-context.md +3 -15
  28. package/templates/skills/business-analyse/questionnaire/08-performance.md +7 -21
  29. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -13
  30. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -13
  31. package/templates/skills/business-analyse/questionnaire.md +72 -76
  32. package/templates/skills/business-analyse/react/components.md +317 -154
  33. package/templates/skills/business-analyse/react/i18n-template.md +167 -106
  34. package/templates/skills/business-analyse/react/schema.md +325 -106
  35. package/templates/skills/business-analyse/schemas/feature-schema.json +690 -0
  36. package/templates/skills/business-analyse/steps/step-00-init.md +395 -285
  37. package/templates/skills/business-analyse/steps/step-01-analyse.md +505 -0
  38. package/templates/skills/business-analyse/steps/step-02-specify.md +833 -0
  39. package/templates/skills/business-analyse/steps/step-03-validate.md +862 -0
  40. package/templates/skills/business-analyse/steps/step-04-handoff.md +1593 -0
  41. package/templates/skills/business-analyse/templates/tpl-handoff.md +95 -43
  42. package/templates/skills/controller/templates.md +82 -0
  43. package/templates/skills/efcore/references/zero-downtime-patterns.md +227 -0
  44. package/templates/skills/efcore/steps/migration/step-03-validate.md +19 -0
  45. package/templates/skills/review-code/SKILL.md +4 -2
  46. package/templates/skills/review-code/references/owasp-api-top10.md +243 -0
  47. package/templates/skills/review-code/references/security-checklist.md +86 -1
  48. package/templates/skills/review-code/references/smartstack-conventions.md +166 -0
  49. package/templates/skills/workflow/SKILL.md +27 -0
  50. package/templates/skills/business-analyse/steps/step-01-discover.md +0 -737
  51. package/templates/skills/business-analyse/steps/step-02-analyse.md +0 -299
  52. package/templates/skills/business-analyse/steps/step-03-specify.md +0 -409
  53. package/templates/skills/business-analyse/steps/step-04-validate.md +0 -313
  54. package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -658
  55. package/templates/skills/business-analyse/steps/step-06-doc-html.md +0 -320
  56. package/templates/skills/business-analyse/templates/00-context.md +0 -105
  57. package/templates/skills/business-analyse/templates/tpl-brd.md +0 -97
  58. package/templates/skills/business-analyse/templates/tpl-discovery.md +0 -78
  59. package/templates/skills/business-analyse/tracking/change-template.md +0 -30
@@ -1,40 +1,36 @@
1
1
  ---
2
2
  name: business-analyse
3
- description: Business Analysis - Complete business analysis workflow (BABOK/IEEE 830) with progressive step loading and context refresh.
4
- argument-hint: "[-a] [-s] [-e] [-r <task-id>] <feature description>"
3
+ description: Business Analysis - VibeCoding-focused workflow with JSON output, proactive suggestions, and 4 use cases (new, question, refactoring, micro).
4
+ argument-hint: "[-a] [-e] [-q <FEAT-ID> \"question\"] [-r <FEAT-ID> \"change\"] [-m] <feature description>"
5
5
  ---
6
6
 
7
7
  <objective>
8
- Execute systematic business analysis workflows following BABOK v3 and IEEE 830 standards.
9
- This skill uses progressive step loading to minimize context usage and maintain fresh context throughout the workflow.
8
+ Execute VibeCoding-focused business analysis workflows. This skill produces a single feature.json progressively enriched at each step, published to docs/business/ for web app rendering. Supports 4 use cases: new feature analysis, questions about existing features, feature refactoring, and one-shot micro-features.
10
9
  </objective>
11
10
 
12
11
  <quick_start>
13
- **Basic usage:**
12
+ **Four use cases:**
14
13
 
15
14
  ```bash
16
- /business-analyse Module de gestion des clients
17
- ```
15
+ # A. New feature (full workflow)
16
+ /business-analyse Order management module
18
17
 
19
- **Recommended workflow (autonomous with save):**
18
+ # B. Question about existing feature
19
+ /business-analyse -q FEAT-001 "What permissions does the manager have?"
20
20
 
21
- ```bash
22
- /business-analyse -a -s Gestion des commandes avec workflow validation
21
+ # C. Refactoring (delta on existing)
22
+ /business-analyse -r FEAT-001 "Add export PDF functionality"
23
+
24
+ # D. Micro-feature (one-shot, minimal questions)
25
+ /business-analyse -m Add a status field to orders
23
26
  ```
24
27
 
25
- **Resume a previous analysis:**
28
+ **Recommended autonomous workflow:**
26
29
 
27
30
  ```bash
28
- /business-analyse -r FEAT-001
31
+ /business-analyse -a New payment gateway integration
29
32
  ```
30
33
 
31
- **Flags:**
32
-
33
- - `-a` (auto): Skip confirmations
34
- - `-s` (save): Save outputs to `.business-analyse/`
35
- - `-e` (economy): No subagents, direct tool usage
36
- - `-r` (resume): Resume from a previous FEAT-ID
37
-
38
34
  See `<parameters>` for complete flag list.
39
35
  </quick_start>
40
36
 
@@ -44,37 +40,42 @@ See `<parameters>` for complete flag list.
44
40
  **Enable flags (turn ON):**
45
41
  | Short | Long | Description |
46
42
  |-------|------|-------------|
47
- | `-a` | `--auto` | Autonomous mode: skip confirmations, auto-approve |
48
- | `-s` | `--save` | Save mode: output to `.business-analyse/` (default: true) |
49
- | `-e` | `--economy` | Economy mode: no subagents, save tokens |
50
- | `-r` | `--resume` | Resume mode: continue from a previous FEAT-ID |
43
+ | `-a` | `--auto` | Autonomous mode: skip confirmations |
44
+ | `-e` | `--economy` | Economy mode: no subagents |
45
+ | `-q` | `--question` | Question mode: query an existing feature (requires FEAT-ID + question) |
46
+ | `-r` | `--refactor` | Refactoring mode: delta changes on existing feature (requires FEAT-ID + change description) |
47
+ | `-m` | `--micro` | Micro-feature mode: minimal questions, direct handoff |
51
48
  | `-i` | `--interactive` | Interactive mode: configure flags via AskUserQuestion |
52
49
 
53
50
  **Disable flags (turn OFF):**
54
51
  | Short | Long | Description |
55
52
  |-------|------|-------------|
56
53
  | `-A` | `--no-auto` | Disable auto mode |
57
- | `-S` | `--no-save` | Disable save mode |
58
54
  | `-E` | `--no-economy` | Disable economy mode |
59
55
  </flags>
60
56
 
61
57
  <examples>
62
58
  ```bash
63
- # Basic usage
64
- /business-analyse Module gestion clients
59
+ # A. New feature analysis (full workflow)
60
+ /business-analyse Order management module
65
61
 
66
- # Autonomous mode (no confirmations)
67
- /business-analyse -a Module gestion clients
62
+ # B. Question about existing feature
63
+ /business-analyse -q FEAT-001 "What permissions does the manager have?"
68
64
 
69
- # Economy mode (save tokens)
70
- /business-analyse -e Module gestion clients
65
+ # C. Refactoring (create v1.1)
66
+ /business-analyse -r FEAT-001 "Add export PDF functionality"
71
67
 
72
- # Resume a previous feature
73
- /business-analyse -r FEAT-001
74
- /business-analyse -r 001 # Partial match supported
68
+ # D. Micro-feature (minimal questions)
69
+ /business-analyse -m Add a status field to orders
70
+
71
+ # Autonomous mode
72
+ /business-analyse -a New payment gateway
73
+
74
+ # Economy mode (no subagents)
75
+ /business-analyse -e Order management
75
76
 
76
77
  # Combined flags
77
- /business-analyse -a -e Module gestion clients
78
+ /business-analyse -a -e Order management
78
79
  ```
79
80
  </examples>
80
81
 
@@ -84,77 +85,90 @@ See `<parameters>` for complete flag list.
84
85
  1. Defaults loaded from `steps/step-00-init.md` `<defaults>` section
85
86
  2. Command-line flags override defaults
86
87
  3. Flags removed from input, remainder becomes `{feature_description}`
87
- 4. Feature ID generated as `FEAT-NNN`
88
+ 4. Use case determined by flags: question > refactor > micro > new (default)
89
+ 5. Feature ID generated as `FEAT-NNN` for new features
88
90
  </parsing_rules>
89
91
 
90
92
  </parameters>
91
93
 
92
94
  <output_structure>
93
- **When `{save_mode}` = true (default):**
95
+ **All outputs saved to PROJECT directory:**
94
96
 
95
- All outputs saved to PROJECT directory:
96
97
  ```
97
- .business-analyse/business/{app}/modules/{module}/features/{FEAT-NNN}/
98
- ├── 00-context.md # Params, user request, timestamp, progress
99
- ├── 1-discovery.md # Phase 1: Discovery findings
100
- ├── 2-business-requirements.md # Phase 2: BRD
101
- ├── 3-functional-specification.md # Phase 3: FRD
102
- ├── validation.json # Phase 4: Validation gate
103
- ├── 4-development-handoff.md # Phase 5: Dev prompt
104
- └── tracking/
105
- ├── changes/
106
- ├── bugs/
107
- └── hotfixes/
98
+ docs/business/{app}/{module}/business-analyse/
99
+ ├── v1.0/
100
+ │ └── feature.json # Single JSON enriched progressively (new)
101
+ ├── v1.1/
102
+ │ └── feature.json # Delta version (refactoring)
103
+ └── v2.0/
104
+ └── feature.json # Major version
108
105
  ```
109
106
 
110
- **Ralph Loop files (generated by step-05):**
107
+ **Ralph Loop files (generated by step-04):**
111
108
  ```
112
109
  .ralph/
113
- ├── prd.json # Task breakdown for /ralph-loop -r
114
- ├── progress.txt # Links to BA documents
115
- ├── logs/
116
- └── reports/
110
+ ├── prd.json # Task breakdown for /ralph-loop -r
111
+ └── progress.txt # Links to BA documents
117
112
  ```
113
+
114
+ **No intermediate markdown files - all state in feature.json**
118
115
  </output_structure>
119
116
 
120
117
  <resume_workflow>
121
- **Resume mode (`-r {FEAT-ID}`):**
118
+ **Question mode (`-q {FEAT-ID} "question"`):**
122
119
 
123
120
  When provided, step-00 will:
124
121
 
125
- 1. Locate the feature folder in `.business-analyse/`
126
- 2. Read `00-context.md` to restore state
127
- 3. Find the last completed step
128
- 4. Continue from the next step
122
+ 1. Locate the feature.json in `docs/business/{app}/{module}/business-analyse/v{X.Y}/`
123
+ 2. Load ba-reader agent to answer question from existing feature.json
124
+ 3. Return answer and EXIT (no further steps)
125
+
126
+ **Refactoring mode (`-r {FEAT-ID} "change description"`):**
127
+
128
+ When provided, step-00 will:
129
+
130
+ 1. Locate existing feature.json
131
+ 2. Create new version folder (v1.1 from v1.0, etc.)
132
+ 3. Load existing feature context
133
+ 4. Continue through steps 01-04 with delta focus
129
134
  </resume_workflow>
130
135
 
131
136
  <workflow>
132
- **Standard flow:**
137
+ **Use case routing (step-00):**
138
+
133
139
  1. Parse flags and feature description
134
- 2. If `-r`: Execute resume workflow
135
- 3. Create output folder and 00-context.md
136
- 4. Load step-01-discover.md -> elicitation with ULTRATHINK
137
- 5. Load step-02-analyse.md -> BRD + business rules
138
- 6. Load step-03-specify.md -> FRD + use cases
139
- 7. Load step-04-validate.md -> validation gate
140
- 8. Load step-05-handoff.md -> development prompt
141
- 9. Load step-06-doc-html.md -> React documentation (optional)
140
+ 2. If `-q`: Load ba-reader, answer question → EXIT
141
+ 3. If `-r`: Load existing feature.json, create new version
142
+ 4. If `-m`: Create minimal feature.json, skip discovery/analysis handoff
143
+ 5. If default: Full workflow (steps 01-04)
144
+
145
+ **Full workflow (new features):**
146
+ - **Step 00:** Parse flags, route use case, create feature.json (draft)
147
+ - **Step 01:** Merged discovery + BRD, proactive suggestions (analysed)
148
+ - **Step 02:** FRD + use cases + permissions + navigation (specified)
149
+ - **Step 03:** Validation gate (APPROVED/REJECTED)
150
+ - **Step 04:** Development prompt + Ralph Loop prd.json (handed-off)
151
+
152
+ **Micro workflow (micro features):**
153
+ - **Step 00:** Create minimal feature.json
154
+ - **Step 04:** Direct handoff (skip 01-03)
142
155
  </workflow>
143
156
 
144
157
  <state_variables>
145
- **Persist throughout all steps:**
158
+ **Persist throughout all steps via feature.json:**
146
159
 
147
160
  | Variable | Type | Description |
148
161
  | ----------------------- | ------- | ------------------------------------------------------ |
149
- | `{feature_description}` | string | What to analyze (flags removed) |
150
162
  | `{feature_id}` | string | Unique identifier (e.g., `FEAT-001`) |
163
+ | `{feature_description}` | string | What to analyze (flags removed) |
164
+ | `{use_case}` | string | One of: new, question, refactoring, micro |
165
+ | `{version}` | string | SemVer (1.0, 1.1, 2.0, etc.) |
151
166
  | `{application_name}` | string | Target application name |
152
167
  | `{module_name}` | string | Target module name |
153
168
  | `{context}` | string | Always "business" for BA |
154
169
  | `{auto_mode}` | boolean | Skip confirmations |
155
- | `{save_mode}` | boolean | Save outputs (default: true) |
156
170
  | `{economy_mode}` | boolean | No subagents, direct tool usage only |
157
- | `{output_dir}` | string | Full path to feature output directory |
171
+ | `{docs_dir}` | string | `docs/business/{app}/{module}/business-analyse/v{X.Y}/` |
158
172
 
159
173
  </state_variables>
160
174
 
@@ -169,13 +183,11 @@ When provided, step-00 will:
169
183
 
170
184
  | Step | File | Model | Purpose |
171
185
  | ---- | ---------------------------- | ------ | ---------------------------------------------------- |
172
- | 00 | `steps/step-00-init.md` | Haiku | Parse flags, create structure, initialize state |
173
- | 01 | `steps/step-01-discover.md` | Opus | Elicitation with ULTRATHINK (load questionnaire) |
174
- | 02 | `steps/step-02-analyse.md` | Sonnet | BRD + business rules formalization |
175
- | 03 | `steps/step-03-specify.md` | Sonnet | FRD + use cases + permissions |
176
- | 04 | `steps/step-04-validate.md` | Haiku | Validation gate (APPROVED/REJECTED) |
177
- | 05 | `steps/step-05-handoff.md` | Opus | Development prompt generation |
178
- | 06 | `steps/step-06-doc-html.md` | Sonnet | React documentation (optional) |
186
+ | 00 | `steps/step-00-init.md` | Haiku | Parse flags, route use case, create feature.json |
187
+ | 01 | `steps/step-01-analyse.md` | Opus | Merged discovery+BRD, proactive suggestions |
188
+ | 02 | `steps/step-02-specify.md` | Sonnet | FRD + use cases + permissions + navigation |
189
+ | 03 | `steps/step-03-validate.md` | Haiku | Validation gate (APPROVED/REJECTED) |
190
+ | 04 | `steps/step-04-handoff.md` | Opus | Development prompt + Ralph Loop prd.json |
179
191
 
180
192
  </step_files>
181
193
 
@@ -184,53 +196,53 @@ When provided, step-00 will:
184
196
 
185
197
  Load ONLY relevant categories based on feature type:
186
198
 
187
- | Category | File | When to load |
188
- | -------- | ----------------------------------- | ------------ |
189
- | 01 | `questionnaire/01-context.md` | Always |
190
- | 02 | `questionnaire/02-stakeholders.md` | Always |
191
- | 03 | `questionnaire/03-scope.md` | Always |
192
- | 04 | `questionnaire/04-data.md` | If data-centric |
193
- | 05 | `questionnaire/05-integrations.md` | If integrations |
194
- | 06 | `questionnaire/06-security.md` | Always (minimal) |
195
- | 07 | `questionnaire/07-ui.md` | If UI-centric |
196
- | 08 | `questionnaire/08-performance.md` | If performance-critical |
197
- | 09 | `questionnaire/09-constraints.md` | If constraints exist |
198
- | 10 | `questionnaire/10-documentation.md` | If doc required |
199
- | 11 | `questionnaire/11-data-lifecycle.md` | If data-centric or full module |
200
- | 12 | `questionnaire/12-migration.md` | Always for new modules |
201
- | 13 | `questionnaire/13-cross-module.md` | Always for new modules |
199
+ | Category | File | Questions | When to load |
200
+ | -------- | ----------------------------------- | --------- | ------------ |
201
+ | 01 | `questionnaire/01-context.md` | 4 | Always |
202
+ | 02 | `questionnaire/02-stakeholders.md` | 6 | Always |
203
+ | 03 | `questionnaire/03-scope.md` | 6 | Always |
204
+ | 04 | `questionnaire/04-data.md` | 6 | If data-centric |
205
+ | 05 | `questionnaire/05-integrations.md` | 6 | If integrations |
206
+ | 06 | `questionnaire/06-security.md` | 4 | Always (minimal) |
207
+ | 07 | `questionnaire/07-ui.md` | 6 | If UI-centric |
208
+ | 08 | `questionnaire/08-performance.md` | 4 | If performance-critical |
209
+ | 09 | `questionnaire/09-constraints.md` | 4 | If constraints exist |
210
+ | 10 | `questionnaire/10-documentation.md` | 4 | If doc required |
211
+
212
+ **Total: ~60 questions (trimmed from 100+)**
202
213
 
203
214
  </questionnaire_files>
204
215
 
205
216
  <template_files>
206
217
  **Progressive template loading:**
207
218
 
208
- | Template | File | Used in step |
209
- | -------- | ----------------------------- | ------------ |
210
- | discovery | `templates/tpl-discovery.md` | 01 |
211
- | brd | `templates/tpl-brd.md` | 02 |
212
- | frd | `templates/tpl-frd.md` | 03 |
213
- | handoff | `templates/tpl-handoff.md` | 05 |
219
+ | Template | File | Used in step |
220
+ | -------- | ----------------------------------- | ------------ |
221
+ | schema | `schemas/feature-schema.json` | All steps |
222
+ | frd | `templates/tpl-frd.md` | 02 |
223
+ | handoff | `templates/tpl-handoff.md` | 04 |
224
+ | suggestions | `patterns/suggestion-catalog.md` | 01 |
214
225
 
215
226
  </template_files>
216
227
 
217
228
  <execution_rules>
218
229
 
219
230
  - **Load one step at a time** - Only load the current step file
220
- - **ULTRATHINK** for phases 01, 02, 03, 05 (critical thinking)
221
- - **Persist state variables** across all steps via 00-context.md
231
+ - **ULTRATHINK** for steps 01, 02, 04 (critical thinking)
232
+ - **State persisted in feature.json** (NOT markdown files)
233
+ - **Use ba-writer agent** for all JSON writes
234
+ - **Use ba-reader agent** for all JSON reads
222
235
  - **Follow next_step directive** at end of each step
223
- - **Save outputs** immediately after each phase
224
- - **Use parallel agents** for exploration (unless economy_mode)
225
236
  - **Context: business only** - Reject platform/personal/system contexts
237
+ - **Use parallel agents** for exploration (unless economy_mode)
226
238
  </execution_rules>
227
239
 
228
240
  <success_criteria>
229
241
 
230
- - Each step loaded progressively (max 300-400 lines/step)
231
- - All outputs saved to feature folder
242
+ - feature.json enriched progressively through all steps
232
243
  - Validation gate passed (APPROVED)
233
- - Development handoff ready for `/ralph-loop -r` (iterative) or `/feature-full` (one-shot)
234
- - Ralph Loop prd.json generated with atomic task breakdown
235
- - Clear completion summary with next steps
244
+ - Development handoff ready for `/ralph-loop -r` or `/feature-full`
245
+ - Ralph Loop prd.json generated
246
+ - Proactive suggestions presented to user
247
+ - All outputs in `docs/business/{app}/{module}/business-analyse/v{X.Y}/`
236
248
  </success_criteria>