@atlashub/smartstack-cli 2.2.0 → 2.4.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.
- package/.documentation/business-analyse.html +1503 -1058
- package/.documentation/cli-commands.html +1 -1
- package/.documentation/init.html +1 -1
- package/.documentation/installation.html +1 -1
- package/dist/index.js +76 -47
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/templates/agents/ba-reader.md +114 -9
- package/templates/agents/ba-writer.md +108 -27
- package/templates/agents/mcp-healthcheck.md +1 -1
- package/templates/ralph/README.md +1 -1
- package/templates/ralph/ralph.config.yaml +1 -1
- package/templates/skills/_shared.md +60 -0
- package/templates/skills/application/steps/step-00-init.md +32 -8
- package/templates/skills/business-analyse/SKILL.md +65 -42
- package/templates/skills/business-analyse/_shared.md +161 -51
- package/templates/skills/business-analyse/questionnaire/00-application.md +166 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +7 -7
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire.md +63 -19
- package/templates/skills/business-analyse/react/application-viewer.md +242 -0
- package/templates/skills/business-analyse/react/components.md +60 -8
- package/templates/skills/business-analyse/react/schema.md +413 -34
- package/templates/skills/business-analyse/schemas/application-schema.json +389 -0
- package/templates/skills/business-analyse/schemas/feature-schema.json +287 -46
- package/templates/skills/business-analyse/steps/step-00-init.md +110 -44
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +259 -0
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +282 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +489 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +336 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +1119 -0
- package/templates/skills/business-analyse/templates/tpl-handoff.md +11 -2
- package/templates/skills/mcp/SKILL.md +2 -2
- package/templates/skills/business-analyse/steps/step-01-analyse.md +0 -505
- package/templates/skills/business-analyse/steps/step-02-specify.md +0 -833
- package/templates/skills/business-analyse/steps/step-03-validate.md +0 -862
- package/templates/skills/business-analyse/steps/step-04-handoff.md +0 -1593
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: business-analyse
|
|
3
|
-
description: Business Analysis -
|
|
3
|
+
description: Business Analysis v4.0 - Iterative multi-module workflow with 5-level navigation hierarchy, client checkpoints, and integrated documentation.
|
|
4
4
|
argument-hint: "[-a] [-e] [-q <FEAT-ID> \"question\"] [-r <FEAT-ID> \"change\"] [-m] <feature description>"
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -45,6 +45,7 @@ See `<parameters>` for complete flag list.
|
|
|
45
45
|
| `-q` | `--question` | Question mode: query an existing feature (requires FEAT-ID + question) |
|
|
46
46
|
| `-r` | `--refactor` | Refactoring mode: delta changes on existing feature (requires FEAT-ID + change description) |
|
|
47
47
|
| `-m` | `--micro` | Micro-feature mode: minimal questions, direct handoff |
|
|
48
|
+
| `-app` | `--application` | Application mode: multi-module analysis with module decomposition |
|
|
48
49
|
| `-i` | `--interactive` | Interactive mode: configure flags via AskUserQuestion |
|
|
49
50
|
|
|
50
51
|
**Disable flags (turn OFF):**
|
|
@@ -56,26 +57,26 @@ See `<parameters>` for complete flag list.
|
|
|
56
57
|
|
|
57
58
|
<examples>
|
|
58
59
|
```bash
|
|
59
|
-
# A. New feature analysis (full workflow)
|
|
60
|
+
# A. New feature analysis (single module - goes through full workflow)
|
|
60
61
|
/business-analyse Order management module
|
|
61
62
|
|
|
62
|
-
# B.
|
|
63
|
+
# B. Application analysis (multi-module)
|
|
64
|
+
/business-analyse -app Complete sales management system
|
|
65
|
+
|
|
66
|
+
# C. Question about existing feature
|
|
63
67
|
/business-analyse -q FEAT-001 "What permissions does the manager have?"
|
|
64
68
|
|
|
65
|
-
#
|
|
69
|
+
# D. Refactoring (create v1.1)
|
|
66
70
|
/business-analyse -r FEAT-001 "Add export PDF functionality"
|
|
67
71
|
|
|
68
|
-
#
|
|
72
|
+
# E. Micro-feature (minimal questions)
|
|
69
73
|
/business-analyse -m Add a status field to orders
|
|
70
74
|
|
|
71
|
-
# Autonomous mode
|
|
72
|
-
/business-analyse -a New
|
|
75
|
+
# Autonomous application mode
|
|
76
|
+
/business-analyse -app -a New HR management system
|
|
73
77
|
|
|
74
78
|
# Economy mode (no subagents)
|
|
75
79
|
/business-analyse -e Order management
|
|
76
|
-
|
|
77
|
-
# Combined flags
|
|
78
|
-
/business-analyse -a -e Order management
|
|
79
80
|
```
|
|
80
81
|
</examples>
|
|
81
82
|
|
|
@@ -95,22 +96,23 @@ See `<parameters>` for complete flag list.
|
|
|
95
96
|
**All outputs saved to PROJECT directory:**
|
|
96
97
|
|
|
97
98
|
```
|
|
98
|
-
docs/business/{app}/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
│ └── feature.json # Delta version (refactoring)
|
|
103
|
-
└── v2.0/
|
|
104
|
-
└── feature.json # Major version
|
|
99
|
+
docs/business/{app}/business-analyse/v{X.Y}/
|
|
100
|
+
feature.json # APPLICATION-level master (modules, dependencies, roles)
|
|
101
|
+
docs/business/{app}/{module}/business-analyse/v{X.Y}/
|
|
102
|
+
feature.json # MODULE-level detail (entities, UC, FR, permissions, mockups)
|
|
105
103
|
```
|
|
106
104
|
|
|
107
|
-
**Ralph Loop files (generated by step-
|
|
105
|
+
**Ralph Loop files (generated by step-05):**
|
|
108
106
|
```
|
|
109
107
|
.ralph/
|
|
110
108
|
├── prd.json # Task breakdown for /ralph-loop -r
|
|
111
109
|
└── progress.txt # Links to BA documents
|
|
112
110
|
```
|
|
113
111
|
|
|
112
|
+
**Documentation integrated in SmartStack app:**
|
|
113
|
+
- Application view: `/docs/business/{app}` (module overview, dependency graph, roles)
|
|
114
|
+
- Module view: `/docs/business/{app}/{module}` (full specification, mockups)
|
|
115
|
+
|
|
114
116
|
**No intermediate markdown files - all state in feature.json**
|
|
115
117
|
</output_structure>
|
|
116
118
|
|
|
@@ -139,19 +141,35 @@ When provided, step-00 will:
|
|
|
139
141
|
1. Parse flags and feature description
|
|
140
142
|
2. If `-q`: Load ba-reader, answer question → EXIT
|
|
141
143
|
3. If `-r`: Load existing feature.json, create new version
|
|
142
|
-
4. If `-m`: Create minimal feature.json
|
|
143
|
-
5. If
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
- **Step
|
|
148
|
-
- **Step
|
|
149
|
-
- **Step
|
|
150
|
-
- **Step
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
4. If `-m`: Create minimal feature.json → simplified handoff
|
|
145
|
+
5. If `-app` or auto-detected multi-module: Full application workflow
|
|
146
|
+
6. Default: Single module workflow (same phases, decomposition is trivial)
|
|
147
|
+
|
|
148
|
+
**Application workflow (multi-module):**
|
|
149
|
+
- **Step 00:** Parse flags, create master feature.json (draft)
|
|
150
|
+
- **Step 01:** Cadrage: context, stakeholders, scope, application roles (framed)
|
|
151
|
+
- **Step 02:** Decomposition: modules, dependencies, client checkpoint (decomposed)
|
|
152
|
+
- **Step 03:** Iterative specification per module (specified)
|
|
153
|
+
- For each module in dependency order:
|
|
154
|
+
- Walk through sections & resources with client
|
|
155
|
+
- Propose ASCII/SVG mockups per section
|
|
156
|
+
- Define entities + business rules
|
|
157
|
+
- Generate specification (UC, FR, permissions, SeedData)
|
|
158
|
+
- Per-module validation + client confirmation
|
|
159
|
+
- **Step 04:** Cross-module consolidation (consolidated)
|
|
160
|
+
- **Step 05:** Handoff with per-module prd.json (handed-off)
|
|
161
|
+
|
|
162
|
+
**Single module workflow (same phases, simplified):**
|
|
163
|
+
- **Step 00:** Parse flags, create master feature.json (draft)
|
|
164
|
+
- **Step 01:** Cadrage: context, stakeholders, scope, roles (framed)
|
|
165
|
+
- **Step 02:** Decomposition: trivial (1 module), quick checkpoint (decomposed)
|
|
166
|
+
- **Step 03:** Specification: single iteration (specified)
|
|
167
|
+
- **Step 04:** Consolidation: auto-pass (consolidated)
|
|
168
|
+
- **Step 05:** Handoff (handed-off)
|
|
169
|
+
|
|
170
|
+
**Micro workflow:**
|
|
153
171
|
- **Step 00:** Create minimal feature.json
|
|
154
|
-
- **Step
|
|
172
|
+
- **Step 05:** Direct handoff (skip 01-04)
|
|
155
173
|
</workflow>
|
|
156
174
|
|
|
157
175
|
<state_variables>
|
|
@@ -168,6 +186,7 @@ When provided, step-00 will:
|
|
|
168
186
|
| `{context}` | string | Always "business" for BA |
|
|
169
187
|
| `{auto_mode}` | boolean | Skip confirmations |
|
|
170
188
|
| `{economy_mode}` | boolean | No subagents, direct tool usage only |
|
|
189
|
+
| `{workflow_mode}` | string | "application" or "module" |
|
|
171
190
|
| `{docs_dir}` | string | `docs/business/{app}/{module}/business-analyse/v{X.Y}/` |
|
|
172
191
|
|
|
173
192
|
</state_variables>
|
|
@@ -181,13 +200,14 @@ When provided, step-00 will:
|
|
|
181
200
|
<step_files>
|
|
182
201
|
**Progressive loading - only load current step:**
|
|
183
202
|
|
|
184
|
-
| Step | File
|
|
185
|
-
| ---- |
|
|
186
|
-
| 00 | `steps/step-00-init.md`
|
|
187
|
-
| 01 | `steps/step-01-
|
|
188
|
-
| 02 | `steps/step-02-
|
|
189
|
-
| 03 | `steps/step-03-
|
|
190
|
-
| 04 | `steps/step-04-
|
|
203
|
+
| Step | File | Model | Purpose |
|
|
204
|
+
| ---- | --------------------------------- | ------ | ---------------------------------------------------- |
|
|
205
|
+
| 00 | `steps/step-00-init.md` | Haiku | Parse flags, route use case, create master feature.json |
|
|
206
|
+
| 01 | `steps/step-01-cadrage.md` | Opus | Framing: context, stakeholders, scope, application roles |
|
|
207
|
+
| 02 | `steps/step-02-decomposition.md` | Sonnet | Module decomposition, dependency graph, client checkpoint |
|
|
208
|
+
| 03 | `steps/step-03-specify.md` | Opus | Iterative per-module specification + validation |
|
|
209
|
+
| 04 | `steps/step-04-consolidation.md` | Sonnet | Cross-module validation, E2E flows, permissions coherence |
|
|
210
|
+
| 05 | `steps/step-05-handoff.md` | Opus | Development prompt + Ralph Loop prd.json |
|
|
191
211
|
|
|
192
212
|
</step_files>
|
|
193
213
|
|
|
@@ -198,6 +218,7 @@ Load ONLY relevant categories based on feature type:
|
|
|
198
218
|
|
|
199
219
|
| Category | File | Questions | When to load |
|
|
200
220
|
| -------- | ----------------------------------- | --------- | ------------ |
|
|
221
|
+
| 00 | `questionnaire/00-application.md` | 8 | If application mode |
|
|
201
222
|
| 01 | `questionnaire/01-context.md` | 4 | Always |
|
|
202
223
|
| 02 | `questionnaire/02-stakeholders.md` | 6 | Always |
|
|
203
224
|
| 03 | `questionnaire/03-scope.md` | 6 | Always |
|
|
@@ -239,10 +260,12 @@ Load ONLY relevant categories based on feature type:
|
|
|
239
260
|
|
|
240
261
|
<success_criteria>
|
|
241
262
|
|
|
242
|
-
- feature.json enriched progressively through all steps
|
|
243
|
-
-
|
|
263
|
+
- Master feature.json created and enriched progressively through all steps
|
|
264
|
+
- Module decomposition validated by client (step-02 checkpoint)
|
|
265
|
+
- Each module specified iteratively with client validation
|
|
266
|
+
- ASCII/SVG mockups proposed for each module's sections
|
|
267
|
+
- Cross-module consolidation passed (step-04)
|
|
244
268
|
- Development handoff ready for `/ralph-loop -r` or `/feature-full`
|
|
245
|
-
- Ralph Loop prd.json generated
|
|
246
|
-
-
|
|
247
|
-
- All outputs in `docs/business/{app}/{module}/business-analyse/v{X.Y}/`
|
|
269
|
+
- Ralph Loop prd.json generated (per module or consolidated)
|
|
270
|
+
- All outputs renderable by SmartStack app viewer at `/docs/business/{app}/`
|
|
248
271
|
</success_criteria>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Business Analysis - Shared Functions (
|
|
1
|
+
# Business Analysis - Shared Functions (v4 - Iterative Multi-Module Workflow)
|
|
2
2
|
|
|
3
3
|
> **Ref:** This file contains common functions for all BA phases.
|
|
4
|
-
> **Version:**
|
|
4
|
+
> **Version:** 4.0 - Iterative multi-module workflow with 5-level navigation hierarchy
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -12,15 +12,17 @@ The BusinessAnalyse skill uses **progressive loading** to minimize context:
|
|
|
12
12
|
```
|
|
13
13
|
SKILL.md (entry point) → routes to use case
|
|
14
14
|
↓
|
|
15
|
-
steps/step-00-init.md (parse flags, create feature.json via ba-writer)
|
|
15
|
+
steps/step-00-init.md (parse flags, create master feature.json via ba-writer)
|
|
16
16
|
↓
|
|
17
|
-
steps/step-01-
|
|
17
|
+
steps/step-01-cadrage.md (framing: context, stakeholders, scope, roles)
|
|
18
18
|
↓
|
|
19
|
-
steps/step-02-
|
|
19
|
+
steps/step-02-decomposition.md (module identification, dependency graph, CLIENT CHECKPOINT)
|
|
20
20
|
↓
|
|
21
|
-
steps/step-03-
|
|
21
|
+
steps/step-03-specify.md (ITERATIVE per module: sections, entities, BR, permissions, mockups)
|
|
22
|
+
↓ ↻ loops back for each module in dependency order
|
|
23
|
+
steps/step-04-consolidation.md (cross-module validation, E2E flows, permissions coherence)
|
|
22
24
|
↓
|
|
23
|
-
steps/step-
|
|
25
|
+
steps/step-05-handoff.md (generates ralph prd.json per module)
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
**No digest files needed** — each step reads/writes `feature.json` directly via `ba-writer` and `ba-reader` agents.
|
|
@@ -31,27 +33,143 @@ steps/step-04-handoff.md (generates ralph prd.json)
|
|
|
31
33
|
|
|
32
34
|
## JSON-First Architecture
|
|
33
35
|
|
|
34
|
-
All BA outputs are stored in
|
|
36
|
+
All BA outputs are stored in **two levels** of feature.json, enriched progressively:
|
|
37
|
+
|
|
38
|
+
### Application-Level (Master)
|
|
39
|
+
**Path:** `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
|
|
40
|
+
**Schema:** `schemas/application-schema.json`
|
|
35
41
|
|
|
36
42
|
| Step | Section enriched | Status after |
|
|
37
43
|
|------|-----------------|--------------|
|
|
38
44
|
| 00-init | metadata | draft |
|
|
39
|
-
| 01-
|
|
40
|
-
| 02-
|
|
41
|
-
| 03-
|
|
42
|
-
| 04-
|
|
45
|
+
| 01-cadrage | cadrage (problem, stakeholders, scope, roles) | framed |
|
|
46
|
+
| 02-decomposition | modules, dependencyGraph | decomposed |
|
|
47
|
+
| 03-specify | modules[].status updated per iteration | specified |
|
|
48
|
+
| 04-consolidation | consolidation | consolidated |
|
|
49
|
+
| 05-handoff | (per-module handoff) | handed-off |
|
|
50
|
+
|
|
51
|
+
### Module-Level (Per Module)
|
|
52
|
+
**Path:** `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
53
|
+
**Schema:** `schemas/feature-schema.json`
|
|
54
|
+
|
|
55
|
+
| Step | Section enriched | Status after |
|
|
56
|
+
|------|-----------------|--------------|
|
|
57
|
+
| 03-specify (init) | metadata, applicationContext | in-progress |
|
|
58
|
+
| 03-specify (sections) | specification.wireframes | in-progress |
|
|
59
|
+
| 03-specify (entities) | analysis.entities, analysis.businessRules | in-progress |
|
|
60
|
+
| 03-specify (spec) | specification (full) | specified |
|
|
61
|
+
| 03-specify (validate) | validation | validated |
|
|
43
62
|
|
|
44
63
|
**Agents:**
|
|
45
|
-
- **ba-writer**: Writes/updates feature.json (create, enrichSection, updateStatus, createVersion)
|
|
46
|
-
- **ba-reader**: Reads feature.json (findFeature, readSection, answerQuestion, getSummaryForSkill)
|
|
64
|
+
- **ba-writer**: Writes/updates feature.json (create, enrichSection, updateStatus, createVersion, createApplicationFeature, advanceModuleLoop)
|
|
65
|
+
- **ba-reader**: Reads feature.json (findFeature, readSection, answerQuestion, getSummaryForSkill, readApplicationContext, getCompletedModulesSummary)
|
|
47
66
|
|
|
48
|
-
**
|
|
67
|
+
**Schemas:** `schemas/application-schema.json` (master) + `schemas/feature-schema.json` (module)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 5-Level Navigation Hierarchy (SmartStack)
|
|
72
|
+
|
|
73
|
+
> **This is the structuring principle of the entire BA workflow.**
|
|
74
|
+
|
|
75
|
+
The BA aligns with the SmartStack navigation hierarchy:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Level 1: Context (business)
|
|
79
|
+
└── Level 2: Application (Sales)
|
|
80
|
+
├── Level 3: Module (Customers)
|
|
81
|
+
│ ├── Level 4: Section (list)
|
|
82
|
+
│ │ └── Level 5: Ressource (customer-card)
|
|
83
|
+
│ ├── Level 4: Section (detail)
|
|
84
|
+
│ │ └── Level 5: Ressource (customer-form)
|
|
85
|
+
│ └── Level 4: Section (create)
|
|
86
|
+
└── Level 3: Module (Orders)
|
|
87
|
+
├── Level 4: Section (list)
|
|
88
|
+
├── Level 4: Section (detail)
|
|
89
|
+
├── Level 4: Section (create)
|
|
90
|
+
└── Level 4: Section (approve)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
| BA Phase | Levels treated | What is defined |
|
|
94
|
+
|----------|---------------|-----------------|
|
|
95
|
+
| Cadrage (step-01) | Context + Application | Problem, stakeholders, scope, application-level roles |
|
|
96
|
+
| Decomposition (step-02) | Modules | Module list, dependencies, processing order |
|
|
97
|
+
| Specification (step-03) | Module → Sections → Resources | Entities, BR, UC, permissions, ASCII/SVG mockups per section |
|
|
98
|
+
| Consolidation (step-04) | Cross-module | Interactions, permission coherence, E2E flows |
|
|
99
|
+
| Handoff (step-05) | All levels | Implementation mapping, prd.json |
|
|
100
|
+
|
|
101
|
+
### Route pattern
|
|
102
|
+
```
|
|
103
|
+
/business/{application}/{module}/{section}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Standard Sections per Module
|
|
107
|
+
| Section | Purpose | Typical Components |
|
|
108
|
+
|---------|---------|-------------------|
|
|
109
|
+
| `list` | Main entity list with filters | DataGrid, FilterBar, Pagination |
|
|
110
|
+
| `detail` | Entity detail view | DetailCard, TabPanel, StatusBadge |
|
|
111
|
+
| `create` | Create new entity | Form, Validation, SubmitButton |
|
|
112
|
+
| `edit` | Edit existing entity | Form (pre-filled), Validation |
|
|
113
|
+
| `approve` | Approval workflow | ApprovalPanel, StatusTimeline |
|
|
114
|
+
| `dashboard` | Module overview/KPIs | Charts, StatCards, RecentActivity |
|
|
115
|
+
| `import` | Bulk data import | FileUpload, MappingTable, Preview |
|
|
116
|
+
| `export` | Data export | FormatSelector, FilterOptions |
|
|
117
|
+
|
|
118
|
+
---
|
|
49
119
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
120
|
+
## Module Loop Protocol
|
|
121
|
+
|
|
122
|
+
> **Step-03 iterates over modules.** State is persisted in the master feature.json.
|
|
123
|
+
|
|
124
|
+
### State Management
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"metadata": {
|
|
129
|
+
"workflow": {
|
|
130
|
+
"mode": "application",
|
|
131
|
+
"moduleOrder": ["Customers", "Products", "Orders", "Invoices"],
|
|
132
|
+
"currentModuleIndex": 2,
|
|
133
|
+
"completedModules": ["Customers", "Products"],
|
|
134
|
+
"currentModule": "Orders"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Loop Logic (end of each step-03 iteration)
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
1. Mark current module as "validated" in master feature.json
|
|
144
|
+
2. Add to completedModules[]
|
|
145
|
+
3. IF currentModuleIndex + 1 < moduleOrder.length:
|
|
146
|
+
currentModuleIndex++
|
|
147
|
+
currentModule = moduleOrder[currentModuleIndex]
|
|
148
|
+
Write master feature.json
|
|
149
|
+
Display: "Module {name} complete. Next: {next_name} ({N}/{total})"
|
|
150
|
+
RE-LOAD: steps/step-03-specify.md
|
|
151
|
+
4. ELSE:
|
|
152
|
+
master.status = "specified"
|
|
153
|
+
Load: steps/step-04-consolidation.md
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Context Management During Loop
|
|
157
|
+
|
|
158
|
+
To prevent context explosion as modules accumulate:
|
|
159
|
+
- **Current module:** Load full module feature.json
|
|
160
|
+
- **Completed modules:** Only load compact summary via `ba-reader.getCompletedModulesSummary()` (max 100 lines)
|
|
161
|
+
- **Master feature.json:** Only read workflow state + application roles
|
|
162
|
+
|
|
163
|
+
### Resume After Interruption
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
1. ba-reader.findApplicationFeature() → locate master feature.json
|
|
167
|
+
2. Read metadata.workflow.currentModuleIndex
|
|
168
|
+
3. IF currentModule has a feature.json with status != "validated":
|
|
169
|
+
Resume step-03-specify for that module
|
|
170
|
+
4. ELSE:
|
|
171
|
+
Start step-03-specify for next module
|
|
172
|
+
```
|
|
55
173
|
|
|
56
174
|
---
|
|
57
175
|
|
|
@@ -59,24 +177,11 @@ All BA outputs are stored in a single `feature.json` file, enriched progressivel
|
|
|
59
177
|
|
|
60
178
|
| Flag | Use Case | Workflow |
|
|
61
179
|
|------|----------|---------|
|
|
62
|
-
| (none) |
|
|
180
|
+
| (none) | Single module | step-00 → step-01 → step-02 (trivial) → step-03 (1 iteration) → step-04 (auto) → step-05 |
|
|
181
|
+
| `-app` | Application (multi-module) | step-00 → step-01 → step-02 → step-03 (N iterations) → step-04 → step-05 |
|
|
63
182
|
| `-q FEAT-ID "question"` | Question | ba-reader.answerQuestion → EXIT |
|
|
64
|
-
| `-r FEAT-ID "change"` | Refactoring | ba-writer.createVersion → step-01 (delta) → step-02 → step-03 → step-04 |
|
|
65
|
-
| `-m` | Micro-feature | step-00 (minimal) → step-
|
|
66
|
-
|
|
67
|
-
### Delta Mode (Refactoring)
|
|
68
|
-
- ba-reader loads existing feature.json
|
|
69
|
-
- ba-writer creates new version folder (v{X.Y+1})
|
|
70
|
-
- step-01 only asks questions about the CHANGE, not the entire module
|
|
71
|
-
- step-02 only adds/modifies affected UCs, FRs, permissions
|
|
72
|
-
- Existing data preserved, only delta applied
|
|
73
|
-
|
|
74
|
-
### Micro Mode
|
|
75
|
-
- Questions: entity, fields, values, who can change (4-6 questions max)
|
|
76
|
-
- step-01: simplified analysis (no ULTRATHINK, no proactive suggestions)
|
|
77
|
-
- step-02: minimal specification (1-2 UCs, standard CRUD)
|
|
78
|
-
- step-03: auto-validation (structural check only)
|
|
79
|
-
- step-04: simplified handoff
|
|
183
|
+
| `-r FEAT-ID "change"` | Refactoring | ba-writer.createVersion → step-01 (delta) → step-02 → step-03 → step-04 → step-05 |
|
|
184
|
+
| `-m` | Micro-feature | step-00 (minimal) → step-05 (simplified) |
|
|
80
185
|
|
|
81
186
|
---
|
|
82
187
|
|
|
@@ -218,18 +323,20 @@ Route pattern : `/business/{application}/{module}/{section}`
|
|
|
218
323
|
docs/
|
|
219
324
|
├── business/
|
|
220
325
|
│ └── {application}/
|
|
221
|
-
│
|
|
222
|
-
│
|
|
223
|
-
│
|
|
224
|
-
│
|
|
225
|
-
│
|
|
226
|
-
│
|
|
227
|
-
│ └──
|
|
326
|
+
│ ├── business-analyse/
|
|
327
|
+
│ │ └── v1.0/
|
|
328
|
+
│ │ └── feature.json ← APPLICATION master
|
|
329
|
+
│ ├── {module1}/
|
|
330
|
+
│ │ └── business-analyse/
|
|
331
|
+
│ │ └── v1.0/
|
|
332
|
+
│ │ └── feature.json ← MODULE detail
|
|
333
|
+
│ └── {module2}/
|
|
334
|
+
│ └── business-analyse/
|
|
228
335
|
│ └── v1.0/
|
|
229
|
-
│ └──
|
|
336
|
+
│ └── feature.json ← MODULE detail
|
|
230
337
|
```
|
|
231
338
|
|
|
232
|
-
**Ralph Loop Integration (generated by step-
|
|
339
|
+
**Ralph Loop Integration (generated by step-05):**
|
|
233
340
|
|
|
234
341
|
```
|
|
235
342
|
.ralph/
|
|
@@ -239,7 +346,9 @@ docs/
|
|
|
239
346
|
└── reports/
|
|
240
347
|
```
|
|
241
348
|
|
|
242
|
-
|
|
349
|
+
**Integrated Documentation (SmartStack app):**
|
|
350
|
+
- Application view: `/docs/business/{app}` → reads master feature.json
|
|
351
|
+
- Module view: `/docs/business/{app}/{module}` → reads module feature.json
|
|
243
352
|
|
|
244
353
|
---
|
|
245
354
|
|
|
@@ -260,10 +369,11 @@ generate_feature_id():
|
|
|
260
369
|
| Step | Model | Reason |
|
|
261
370
|
|------|-------|--------|
|
|
262
371
|
| 00-init | Haiku | Quick structure setup |
|
|
263
|
-
| 01-
|
|
264
|
-
| 02-
|
|
265
|
-
| 03-
|
|
266
|
-
| 04-
|
|
372
|
+
| 01-cadrage | **Opus** | ULTRATHINK framing |
|
|
373
|
+
| 02-decomposition | Sonnet | Module identification + dependency analysis |
|
|
374
|
+
| 03-specify | **Opus** | ULTRATHINK per-module specification |
|
|
375
|
+
| 04-consolidation | Sonnet | Cross-module validation |
|
|
376
|
+
| 05-handoff | **Opus** | Zero-ambiguity prompt |
|
|
267
377
|
|
|
268
378
|
---
|
|
269
379
|
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Category 00: Application Context
|
|
2
|
+
|
|
3
|
+
> **Loaded by:** step-01-cadrage.md (application mode only)
|
|
4
|
+
> **When:** Always loaded when workflow.mode = "application"
|
|
5
|
+
> **Purpose:** Define application-level scope, roles, and module landscape before decomposition
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Questions
|
|
10
|
+
|
|
11
|
+
### 0.1 Application Identity
|
|
12
|
+
|
|
13
|
+
| # | Question | Type | Options |
|
|
14
|
+
|---|----------|------|---------|
|
|
15
|
+
| Q0.1 | What is the name of this application? | Free text | PascalCase name (e.g., Sales, Operations, HumanResources) |
|
|
16
|
+
| Q0.2 | Briefly describe the application's purpose (1-2 sentences) | Free text | Business goal, target audience |
|
|
17
|
+
|
|
18
|
+
**AskUserQuestion batch 1:**
|
|
19
|
+
```
|
|
20
|
+
Q0.1: "Quel est le nom de cette application ?"
|
|
21
|
+
header: "Application"
|
|
22
|
+
options:
|
|
23
|
+
- label: "Ventes / Sales"
|
|
24
|
+
description: "Gestion des ventes, commandes, clients"
|
|
25
|
+
- label: "Opérations / Operations"
|
|
26
|
+
description: "Gestion des opérations, logistique, stocks"
|
|
27
|
+
- label: "RH / HR"
|
|
28
|
+
description: "Gestion des ressources humaines"
|
|
29
|
+
- label: "Finance"
|
|
30
|
+
description: "Gestion financière, facturation, comptabilité"
|
|
31
|
+
|
|
32
|
+
Q0.2: "Quel est l'objectif principal de cette application en 1-2 phrases ?"
|
|
33
|
+
header: "Objectif"
|
|
34
|
+
options:
|
|
35
|
+
- label: "Automatiser un processus"
|
|
36
|
+
description: "Remplacer un processus manuel par un système numérique"
|
|
37
|
+
- label: "Centraliser les données"
|
|
38
|
+
description: "Regrouper des informations dispersées dans plusieurs outils"
|
|
39
|
+
- label: "Améliorer la visibilité"
|
|
40
|
+
description: "Obtenir des tableaux de bord et du suivi en temps réel"
|
|
41
|
+
- label: "Conformité"
|
|
42
|
+
description: "Répondre à des obligations réglementaires ou de sécurité"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 0.2 Module Landscape
|
|
46
|
+
|
|
47
|
+
| # | Question | Type | Options |
|
|
48
|
+
|---|----------|------|---------|
|
|
49
|
+
| Q0.3 | How many distinct functional areas (modules) do you envision? | Number + list | Module names and brief descriptions |
|
|
50
|
+
| Q0.4 | Which modules are essential for the first release (must-have)? | Multi-select | From Q0.3 list |
|
|
51
|
+
|
|
52
|
+
**AskUserQuestion batch 2:**
|
|
53
|
+
```
|
|
54
|
+
Q0.3: "Combien de domaines fonctionnels distincts (modules) envisagez-vous ?"
|
|
55
|
+
header: "Modules"
|
|
56
|
+
options:
|
|
57
|
+
- label: "2-3 modules"
|
|
58
|
+
description: "Application ciblée avec peu de domaines fonctionnels"
|
|
59
|
+
- label: "4-6 modules"
|
|
60
|
+
description: "Application standard couvrant plusieurs domaines"
|
|
61
|
+
- label: "7-10 modules"
|
|
62
|
+
description: "Application complète avec de nombreux domaines"
|
|
63
|
+
- label: "10+ modules"
|
|
64
|
+
description: "Application d'entreprise très complète"
|
|
65
|
+
|
|
66
|
+
Q0.4: "Quels modules sont indispensables pour la première release ?"
|
|
67
|
+
header: "Priorité"
|
|
68
|
+
multiSelect: true
|
|
69
|
+
options: [Dynamic - populated from Q0.3 answers]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 0.3 Application Roles
|
|
73
|
+
|
|
74
|
+
| # | Question | Type | Options |
|
|
75
|
+
|---|----------|------|---------|
|
|
76
|
+
| Q0.5 | Do the standard 4-tier roles work for this application? (Admin/Manager/Contributor/Viewer) | Yes/Customize | Default SmartStack roles |
|
|
77
|
+
| Q0.6 | Are there roles specific to certain modules only? | List | Per-module role restrictions |
|
|
78
|
+
|
|
79
|
+
**AskUserQuestion batch 3:**
|
|
80
|
+
```
|
|
81
|
+
Q0.5: "Les 4 rôles standards conviennent-ils pour cette application ?"
|
|
82
|
+
header: "Rôles"
|
|
83
|
+
options:
|
|
84
|
+
- label: "Oui, 4 rôles standards"
|
|
85
|
+
description: "Admin (tout), Manager (gestion), Contributeur (saisie), Lecteur (consultation)"
|
|
86
|
+
- label: "Personnaliser les noms"
|
|
87
|
+
description: "Garder les 4 niveaux mais renommer les rôles (ex: Directeur, Responsable...)"
|
|
88
|
+
- label: "Ajouter des rôles"
|
|
89
|
+
description: "Plus de 4 rôles nécessaires (ex: Approbateur, Auditeur...)"
|
|
90
|
+
- label: "Moins de rôles"
|
|
91
|
+
description: "Seulement 2-3 rôles suffisent pour cette application"
|
|
92
|
+
|
|
93
|
+
Q0.6: "Y a-t-il des rôles limités à certains modules seulement ?"
|
|
94
|
+
header: "Restrictions"
|
|
95
|
+
options:
|
|
96
|
+
- label: "Non, tous les rôles sont globaux"
|
|
97
|
+
description: "Chaque rôle a accès à tous les modules (avec ses permissions)"
|
|
98
|
+
- label: "Oui, certains rôles sont restreints"
|
|
99
|
+
description: "Certains rôles ne voient que certains modules"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 0.4 Cross-Module Expectations
|
|
103
|
+
|
|
104
|
+
| # | Question | Type | Options |
|
|
105
|
+
|---|----------|------|---------|
|
|
106
|
+
| Q0.7 | Are there business processes that span multiple modules? | Yes/No + description | E2E flows |
|
|
107
|
+
| Q0.8 | What is the default role for new users? | Selection | From role list |
|
|
108
|
+
|
|
109
|
+
**AskUserQuestion batch 4:**
|
|
110
|
+
```
|
|
111
|
+
Q0.7: "Y a-t-il des processus métier qui traversent plusieurs modules ?"
|
|
112
|
+
header: "Flux E2E"
|
|
113
|
+
options:
|
|
114
|
+
- label: "Oui, plusieurs flux"
|
|
115
|
+
description: "Des processus impliquent 2+ modules (ex: commande → facturation → livraison)"
|
|
116
|
+
- label: "Oui, un flux principal"
|
|
117
|
+
description: "Un processus principal traverse les modules"
|
|
118
|
+
- label: "Non, modules indépendants"
|
|
119
|
+
description: "Chaque module fonctionne de manière autonome"
|
|
120
|
+
- label: "Pas encore défini"
|
|
121
|
+
description: "Les interactions seront identifiées pendant l'analyse"
|
|
122
|
+
|
|
123
|
+
Q0.8: "Quel rôle par défaut pour les nouveaux utilisateurs ?"
|
|
124
|
+
header: "Rôle défaut"
|
|
125
|
+
options:
|
|
126
|
+
- label: "Lecteur (Viewer)"
|
|
127
|
+
description: "Accès en lecture seule par défaut, droits ajoutés manuellement"
|
|
128
|
+
- label: "Contributeur"
|
|
129
|
+
description: "Peut créer et modifier, mais pas supprimer ni approuver"
|
|
130
|
+
- label: "Aucun accès"
|
|
131
|
+
description: "Pas d'accès tant qu'un admin n'assigne pas de rôle"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Elicitation Guide
|
|
137
|
+
|
|
138
|
+
### Follow-up probes (if answers are vague)
|
|
139
|
+
|
|
140
|
+
| Signal | Probe |
|
|
141
|
+
|--------|-------|
|
|
142
|
+
| "We need everything" | "Si vous ne pouviez garder que 3 modules pour le lancement, lesquels ?" |
|
|
143
|
+
| Vague module names | "Pouvez-vous décrire ce que fait concrètement le module {name} en 1 phrase ?" |
|
|
144
|
+
| "Standard roles are fine" | "Qui utilise l'application au quotidien ? Quel est son titre exact ?" |
|
|
145
|
+
| No cross-module flows | "Quand un {entity} est créé dans le module A, est-ce qu'un autre module doit en être informé ?" |
|
|
146
|
+
|
|
147
|
+
### Anti-patterns
|
|
148
|
+
|
|
149
|
+
| Anti-pattern | Signal | Action |
|
|
150
|
+
|--------------|--------|--------|
|
|
151
|
+
| Too many modules | > 10 modules for v1 | Suggest phased approach: core modules first |
|
|
152
|
+
| No clear priority | "Everything is must-have" | Apply MoSCoW: "If you could only ship 3 modules?" |
|
|
153
|
+
| Role confusion | Mixing business roles with system roles | Clarify: "We're defining system access levels, not job titles" |
|
|
154
|
+
| Monolithic thinking | "It's all one big module" | Challenge: "Could a user only need access to part of this?" |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Technical Mapping
|
|
159
|
+
|
|
160
|
+
| Answer | Maps to |
|
|
161
|
+
|--------|---------|
|
|
162
|
+
| Application name | `metadata.application`, `cadrage.applicationRoles[].role` prefix |
|
|
163
|
+
| Module list | `modules[]` in master feature.json |
|
|
164
|
+
| Roles | `cadrage.applicationRoles[]` |
|
|
165
|
+
| Cross-module flows | `consolidation.e2eFlows[]` (populated later in step-04) |
|
|
166
|
+
| Default role | `cadrage.applicationRoles[].isDefault` |
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| Q3.1 | List ESSENTIAL features (Must-Have) | List |
|
|
13
13
|
| Q3.2 | List DESIRED features (Should-Have) | List |
|
|
14
14
|
| Q3.3 | List OPTIONAL features (Could-Have) | List |
|
|
15
|
-
| Q3.4 | Any known constraints limiting
|
|
15
|
+
| Q3.4 | Any known constraints limiting scope? | List of constraints |
|
|
16
16
|
|
|
17
17
|
## 3.2 Business Process
|
|
18
18
|
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
| Priority | Criterion |
|
|
31
31
|
|----------|-----------|
|
|
32
|
-
| Must | Without this feature, the module has no value |
|
|
33
|
-
| Should | Brings significant value
|
|
34
|
-
| Could | Nice-to-have
|
|
35
|
-
| Won't |
|
|
32
|
+
| Must | Without this feature, the module has no value — implement first |
|
|
33
|
+
| Should | Brings significant value — implement right after Must items |
|
|
34
|
+
| Could | Nice-to-have — implement if no technical blocker |
|
|
35
|
+
| Won't | Out of scope for this feature — belongs to a different module or feature |
|
|
36
36
|
|
|
37
37
|
## Elicitation Guide
|
|
38
38
|
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
| Question | If answer is vague/insufficient | Probe |
|
|
42
42
|
|----------|-------------------------------|-------|
|
|
43
|
-
| Q3.1 (Must-Have) | > 10 items listed | "Si vous ne pouviez en garder que 3
|
|
43
|
+
| Q3.1 (Must-Have) | > 10 items listed | "Si vous ne pouviez en garder que 3 à implémenter en premier, lesquels ? Les autres sont peut-être Should-Have." |
|
|
44
44
|
| Q3.1 (Must-Have) | Mélange CRUD + complexe | "Le CRUD de base (liste, création, modification, suppression) est-il un Must, ou certaines actions sont Could ?" |
|
|
45
|
-
| Q3.2 (Should-Have) | Vide | "Y a-t-il des fonctionnalités utiles mais
|
|
45
|
+
| Q3.2 (Should-Have) | Vide | "Y a-t-il des fonctionnalités utiles mais moins critiques ? Export, filtres avancés, notifications ?" |
|
|
46
46
|
| Q3.4 (limites) | Vide | "Y a-t-il des contraintes connues qui pourraient limiter le périmètre ? (budget, délai, dépendance)" |
|
|
47
47
|
| Q3.5 (main flow) | < 3 étapes | "Détaillez : l'utilisateur arrive sur l'écran → que voit-il ? → que clique-t-il ? → que se passe-t-il ?" |
|
|
48
48
|
| Q3.7 (alt flows) | "Il n'y en a pas" | "Que se passe-t-il si l'utilisateur annule ? S'il n'a pas la permission ? Si les données sont invalides ?" |
|