@atlashub/smartstack-cli 3.1.0 → 3.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.
- package/.documentation/prd-json-v2.0.0.md +396 -0
- package/.documentation/testing-ba-e2e.md +462 -0
- package/dist/index.js +605 -25
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/templates/agents/ba-reader.md +1 -1
- package/templates/agents/ba-writer.md +8 -1
- package/templates/skills/business-analyse/SKILL.md +46 -31
- package/templates/skills/business-analyse/_architecture.md +123 -0
- package/templates/skills/business-analyse/_elicitation.md +206 -0
- package/templates/skills/business-analyse/_module-loop.md +56 -0
- package/templates/skills/business-analyse/_shared.md +75 -531
- package/templates/skills/business-analyse/_suggestions.md +34 -0
- package/templates/skills/business-analyse/html/ba-interactive.html +146 -57
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire.md +22 -17
- package/templates/skills/business-analyse/react/components.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +1 -1
- package/templates/skills/business-analyse/references/html-data-mapping.md +294 -0
- package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +85 -59
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +2 -0
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +5 -3
- package/templates/skills/business-analyse/steps/{step-03-specify.md → step-03a-specify.md} +16 -606
- package/templates/skills/business-analyse/steps/step-03b-compile.md +670 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +7 -5
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +727 -0
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +479 -0
- package/templates/skills/business-analyse/steps/step-06-extract.md +134 -4
- package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
- package/templates/skills/business-analyse/templates/tpl-launch-displays.md +161 -0
- package/templates/skills/business-analyse/templates/tpl-progress.md +171 -0
- package/templates/skills/ralph-loop/SKILL.md +138 -20
- package/templates/skills/ralph-loop/steps/step-01-task.md +75 -18
- package/templates/skills/ralph-loop/steps/step-04-check.md +72 -5
- package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -1414
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
# Business Analysis - Shared
|
|
1
|
+
# Business Analysis - Shared Core
|
|
2
2
|
|
|
3
|
-
> **Ref:**
|
|
4
|
-
>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
The BusinessAnalyse skill uses **progressive loading** to minimize context:
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
SKILL.md (entry point) → routes to use case
|
|
14
|
-
↓
|
|
15
|
-
steps/step-00-init.md (parse flags, create master feature.json via ba-writer)
|
|
16
|
-
↓
|
|
17
|
-
steps/step-01-cadrage.md (framing: context, stakeholders, scope, roles)
|
|
18
|
-
↓
|
|
19
|
-
steps/step-02-decomposition.md (module identification, dependency graph, CLIENT CHECKPOINT)
|
|
20
|
-
↓
|
|
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)
|
|
24
|
-
↓
|
|
25
|
-
steps/step-05-handoff.md (generates ralph prd.json per module)
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**No digest files needed** — each step reads/writes `feature.json` directly via `ba-writer` and `ba-reader` agents.
|
|
29
|
-
|
|
30
|
-
**Benefit:** ~70% context reduction per phase
|
|
3
|
+
> **Ref:** Core shared functions loaded by ALL BA steps.
|
|
4
|
+
>
|
|
5
|
+
> **Conditional files (loaded per-step as needed):**
|
|
6
|
+
> - `_elicitation.md` — Interactive protocol, techniques 1-8, AskUserQuestion format, ULTRATHINK
|
|
7
|
+
> - `_architecture.md` — SmartStack 5 layers, entity base classes, DB conventions, SeedData Core
|
|
8
|
+
> - `_module-loop.md` — Module iteration protocol, state management, resume logic
|
|
9
|
+
> - `_suggestions.md` — Proactive suggestions, Context7 libraries
|
|
31
10
|
|
|
32
11
|
---
|
|
33
12
|
|
|
@@ -78,25 +57,25 @@ The BA aligns with the SmartStack navigation hierarchy:
|
|
|
78
57
|
|
|
79
58
|
```
|
|
80
59
|
Level 1: Context (business)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
60
|
+
Level 2: Application (Sales)
|
|
61
|
+
Level 3: Module (Customers)
|
|
62
|
+
Level 4: Section (list)
|
|
63
|
+
Level 5: Ressource (customer-card)
|
|
64
|
+
Level 4: Section (detail)
|
|
65
|
+
Level 5: Ressource (customer-form)
|
|
66
|
+
Level 4: Section (create)
|
|
67
|
+
Level 3: Module (Orders)
|
|
68
|
+
Level 4: Section (list)
|
|
69
|
+
Level 4: Section (detail)
|
|
70
|
+
Level 4: Section (create)
|
|
71
|
+
Level 4: Section (approve)
|
|
93
72
|
```
|
|
94
73
|
|
|
95
74
|
| BA Phase | Levels treated | What is defined |
|
|
96
75
|
|----------|---------------|-----------------|
|
|
97
76
|
| Cadrage (step-01) | Context + Application | Problem, stakeholders, scope, application-level roles |
|
|
98
77
|
| Decomposition (step-02) | Modules | Module list, dependencies, processing order |
|
|
99
|
-
| Specification (step-03) | Module
|
|
78
|
+
| Specification (step-03) | Module -> Sections -> Resources | Entities, BR, UC, permissions, ASCII/SVG mockups per section |
|
|
100
79
|
| Consolidation (step-04) | Cross-module | Interactions, permission coherence, E2E flows |
|
|
101
80
|
| Handoff (step-05) | All levels | Implementation mapping, prd.json |
|
|
102
81
|
|
|
@@ -119,74 +98,6 @@ Level 1: Context (business)
|
|
|
119
98
|
|
|
120
99
|
---
|
|
121
100
|
|
|
122
|
-
## Module Loop Protocol
|
|
123
|
-
|
|
124
|
-
> **Step-03 iterates over modules.** State is persisted in the master feature.json.
|
|
125
|
-
|
|
126
|
-
### State Management
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"metadata": {
|
|
131
|
-
"workflow": {
|
|
132
|
-
"mode": "application",
|
|
133
|
-
"moduleOrder": ["Customers", "Products", "Orders", "Invoices"],
|
|
134
|
-
"currentModuleIndex": 2,
|
|
135
|
-
"completedModules": ["Customers", "Products"],
|
|
136
|
-
"currentModule": "Orders"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Loop Logic (end of each step-03 iteration)
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
1. Mark current module as "validated" in master feature.json
|
|
146
|
-
2. Add to completedModules[]
|
|
147
|
-
3. IF currentModuleIndex + 1 < moduleOrder.length:
|
|
148
|
-
currentModuleIndex++
|
|
149
|
-
currentModule = moduleOrder[currentModuleIndex]
|
|
150
|
-
Write master feature.json
|
|
151
|
-
Display: "Module {name} complete. Next: {next_name} ({N}/{total})"
|
|
152
|
-
RE-LOAD: steps/step-03-specify.md
|
|
153
|
-
4. ELSE:
|
|
154
|
-
master.status = "specified"
|
|
155
|
-
Load: steps/step-04-consolidation.md
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Context Management During Loop
|
|
159
|
-
|
|
160
|
-
To prevent context explosion as modules accumulate:
|
|
161
|
-
- **Current module:** Load full module feature.json
|
|
162
|
-
- **Completed modules:** Only load compact summary via `ba-reader.getCompletedModulesSummary()` (max 100 lines)
|
|
163
|
-
- **Master feature.json:** Only read workflow state + application roles
|
|
164
|
-
|
|
165
|
-
### Resume After Interruption
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
1. ba-reader.findApplicationFeature() → locate master feature.json
|
|
169
|
-
2. Read metadata.workflow.currentModuleIndex
|
|
170
|
-
3. IF currentModule has a feature.json with status != "validated":
|
|
171
|
-
Resume step-03-specify for that module
|
|
172
|
-
4. ELSE:
|
|
173
|
-
Start step-03-specify for next module
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Use Case Routing
|
|
179
|
-
|
|
180
|
-
| Flag | Use Case | Workflow |
|
|
181
|
-
|------|----------|---------|
|
|
182
|
-
| (none) | Single module | step-00 → step-01 → step-02 (trivial) → step-03 (1 iteration) → step-04 (auto) → step-05 |
|
|
183
|
-
| `-app` | Application (multi-module) | step-00 → step-01 → step-02 → step-03 (N iterations) → step-04 → step-05 |
|
|
184
|
-
| `-q FEAT-ID "question"` | Question | ba-reader.answerQuestion → EXIT |
|
|
185
|
-
| `-r FEAT-ID "change"` | Refactoring | ba-writer.createVersion → step-01 (delta) → step-02 → step-03 → step-04 → step-05 |
|
|
186
|
-
| `-m` | Micro-feature | step-00 (minimal) → step-05 (simplified) |
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
101
|
## Business Context Validation
|
|
191
102
|
|
|
192
103
|
```
|
|
@@ -202,168 +113,47 @@ validate_business_context(context):
|
|
|
202
113
|
|
|
203
114
|
---
|
|
204
115
|
|
|
205
|
-
## Architecture SmartStack (Référence BA)
|
|
206
|
-
|
|
207
|
-
> **Objectif :** Fournir le contexte architectural au BA pour des questions pertinentes et des recommandations alignées.
|
|
208
|
-
|
|
209
|
-
### 5 Couches (Clean Architecture)
|
|
210
|
-
|
|
211
|
-
| Couche | Projet | Contenu | Impact BA |
|
|
212
|
-
|--------|--------|---------|-----------|
|
|
213
|
-
| **Domain** | `SmartStack.Domain` | Entités, enums, interfaces | Entités identifiées en discovery |
|
|
214
|
-
| **Application** | `SmartStack.Application` | CQRS (Commands/Queries), validations, DTOs | Use cases de la spécification |
|
|
215
|
-
| **Infrastructure** | `SmartStack.Infrastructure` | EF Core, services externes, jobs | Intégrations et contraintes techniques |
|
|
216
|
-
| **API** | `SmartStack.API` | Controllers REST, permissions | Endpoints et sécurité |
|
|
217
|
-
| **Web** | `smartstack-web` | React 19, pages, composants | UI/UX et navigation |
|
|
218
|
-
|
|
219
|
-
### Hiérarchie de Navigation
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
Context (business) → Application (Sales) → Module (Orders) → Section (list/detail)
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Route pattern : `/business/{application}/{module}/{section}`
|
|
226
|
-
|
|
227
|
-
### Classes de Base des Entités
|
|
228
|
-
|
|
229
|
-
| Classe | Interface | Champs auto-inclus | Quand utiliser |
|
|
230
|
-
|--------|-----------|---------------------|----------------|
|
|
231
|
-
| `BaseEntity` | - | `Id` (Guid), `TenantId`, `CreatedAt`, `UpdatedAt` | **Défaut pour toute entité métier** |
|
|
232
|
-
| `BaseEntity` | `IAuditableEntity` | + `CreatedBy`, `UpdatedBy` | Entité avec audit complet |
|
|
233
|
-
| `SystemEntity` | - | `Id` (Guid), `CreatedAt` (pas de TenantId) | Entités système (navigation, permissions) |
|
|
234
|
-
| `BaseEntity` | `ISoftDeletable` | + `IsDeleted`, `DeletedBy`, `DeletedAt` | Entité avec suppression logique |
|
|
235
|
-
| `HierarchicalEntity` | - | + `ParentId`, `Level`, `Path` | Arborescences (catégories, menus) |
|
|
236
|
-
|
|
237
|
-
> **IMPORTANT :** Ne JAMAIS proposer `CreatedBy`, `UpdatedBy`, `IsDeleted`, `TenantId` comme champs explicites — ils sont AUTOMATIQUES via la classe de base ou l'interface.
|
|
238
|
-
|
|
239
|
-
### Services d'Intégration Disponibles
|
|
240
|
-
|
|
241
|
-
| Service | Interface | Quand le proposer |
|
|
242
|
-
|---------|-----------|-------------------|
|
|
243
|
-
| Notifications in-app | `INotificationService` | Alertes, événements, rappels |
|
|
244
|
-
| Workflow automatisé | `IWorkflowService` | Emails transactionnels, webhooks, actions chaînées |
|
|
245
|
-
| Complétion IA | `IAICompletionService` | Suggestions, classification, génération contenu |
|
|
246
|
-
| SignalR temps réel | `IHubContext<BusinessHub>` | Mises à jour en temps réel |
|
|
247
|
-
| Jobs planifiés | Hangfire `IBackgroundJobClient` | Traitements différés, purges, imports |
|
|
248
|
-
|
|
249
|
-
### Conventions Base de Données
|
|
250
|
-
|
|
251
|
-
| Aspect | Convention | Exemple |
|
|
252
|
-
|--------|------------|---------|
|
|
253
|
-
| Schema | `core` (socle SmartStack) vs `extensions` (entités client/métier) | `core.auth_Roles`, `extensions.bik_FreeBickes` |
|
|
254
|
-
| Tables | `{prefix}_{EntityPlural}` (préfixe domaine + PascalCase pluriel) | `auth_Users`, `nav_Applications`, `supp_Tickets` |
|
|
255
|
-
| Préfixes domaine | `auth_` (auth), `nav_` (navigation), `cfg_` (config), `ref_` (références), `wkf_` (workflows), `ai_` (IA), `loc_` (i18n), `lic_` (licences), `tenant_` (tenants), `support_` (support) | Pour un nouveau module métier : choisir un préfixe court (3-5 chars) |
|
|
256
|
-
| FK | `{Entity}Id` (ex: `ClientId`, `OrderId`) | |
|
|
257
|
-
| Index | `IX_{Table}_{Column}` | `IX_bik_FreeBickes_TenantId_Code` |
|
|
258
|
-
| Migration | 1 migration par feature, nommée via MCP (`suggest_migration`) | `extensions_v1.0.0_001_AddFreeBicke` |
|
|
259
|
-
|
|
260
|
-
### Conventions de Dossiers (Clean Architecture)
|
|
261
|
-
|
|
262
|
-
| Couche | Pattern de dossiers | Exemple (module FreeBicke dans business > operations) |
|
|
263
|
-
|--------|--------------------|---------------------------------------------------------|
|
|
264
|
-
| **Domain** | `{Project}.Domain/Business/{Application}/{Module}/` | `Domain/Business/Operations/FreeBicke/FreeBicke.cs` |
|
|
265
|
-
| **Application/DTOs** | `{Project}.Application/Business/{Application}/{Module}/DTOs/` | `Application/Business/Operations/FreeBicke/DTOs/FreeBickeDto.cs` |
|
|
266
|
-
| **Application/Interfaces** | `{Project}.Application/Common/Interfaces/` | `Application/Common/Interfaces/IFreeBickeService.cs` |
|
|
267
|
-
| **Infrastructure/Config** | `{Project}.Infrastructure/Persistence/Configurations/{Module}/` | `Configurations/FreeBicke/FreeBickeConfiguration.cs` |
|
|
268
|
-
| **Infrastructure/Services** | `{Project}.Infrastructure/Services/{Module}/` | `Services/FreeBicke/FreeBickeService.cs` |
|
|
269
|
-
| **Infrastructure/SeedData** | `{Project}.Infrastructure/Persistence/Seeding/Data/{Module}/` | `Seeding/Data/FreeBicke/FreeBickeSeedData.cs` |
|
|
270
|
-
| **API/Controllers** | `{Project}.Api/Controllers/Business/{Application}/` | `Controllers/Business/Operations/FreeBickeController.cs` |
|
|
271
|
-
| **Frontend/Pages** | `web/src/pages/business/{application}/{module}/` | `pages/business/operations/freebicke/page.tsx` |
|
|
272
|
-
| **Frontend/i18n** | `web/src/i18n/locales/{lang}/{module}.json` | `locales/fr/freebicke.json` |
|
|
273
|
-
|
|
274
|
-
> **IMPORTANT :** Chaque module a son **propre sous-dossier** dans chaque couche. Ne JAMAIS mettre tous les fichiers à la racine d'une couche.
|
|
275
|
-
|
|
276
|
-
### SeedData Core (Obligatoire pour chaque feature)
|
|
277
|
-
|
|
278
|
-
> **Chaque nouvelle feature nécessite des SeedData dans 5 fichiers core** pour être fonctionnelle (navigation visible, permissions actives, rôles assignés).
|
|
279
|
-
|
|
280
|
-
| # | Fichier | Contenu | Mécanisme |
|
|
281
|
-
|---|---------|---------|-----------|
|
|
282
|
-
| 1 | `NavigationModuleConfiguration.cs` | Entrée module dans `nav_Modules` (HasData) | EF Core Migration |
|
|
283
|
-
| 2 | `NavigationTranslationConfiguration.cs` | Traductions du module (4 langues × chaque entité nav) | EF Core Migration |
|
|
284
|
-
| 3 | `PermissionConfiguration.cs` | Permissions CRUD + wildcards dans `nav_Permissions` (HasData) | EF Core Migration |
|
|
285
|
-
| 4 | `Permissions.cs` (Application layer) | Constantes compile-time pour `[RequirePermission]` | Code |
|
|
286
|
-
| 5 | `RolePermissionConfiguration.cs` | Associations rôle-permission dans `auth_RolePermissions` (HasData) | EF Core Migration |
|
|
287
|
-
|
|
288
|
-
**Rôles par défaut pour chaque application (4 niveaux) :**
|
|
289
|
-
|
|
290
|
-
| Rôle | Permissions | Description |
|
|
291
|
-
|------|-------------|-------------|
|
|
292
|
-
| **{App} Admin** | `{context}.{app}.*` (wildcard) | Accès complet à l'application |
|
|
293
|
-
| **{App} Manager** | `read`, `create`, `update`, `assign` | Gestion complète sans suppression |
|
|
294
|
-
| **{App} Contributor** | `read`, `create`, `update` | Contribution active |
|
|
295
|
-
| **{App} Viewer** | `read` uniquement | Consultation seule |
|
|
296
|
-
|
|
297
|
-
> **CRITIQUE :** Si les SeedData ne sont pas créés, le module sera invisible dans la navigation et les permissions retourneront 403.
|
|
298
|
-
|
|
299
|
-
### Contraintes Non-Négociables
|
|
300
|
-
|
|
301
|
-
| Contrainte | Détail |
|
|
302
|
-
|------------|--------|
|
|
303
|
-
| **Multi-tenant** | `TenantId` sur toute entité métier, isolation automatique |
|
|
304
|
-
| **RBAC** | Permissions `business.{app}.{module}.{action}`, HasData pattern |
|
|
305
|
-
| **CQRS** | Commands (write) et Queries (read) séparés via MediatR |
|
|
306
|
-
| **Validation** | FluentValidation pour toute commande |
|
|
307
|
-
| **i18n** | 4 langues obligatoires (fr, en, it, de) |
|
|
308
|
-
| **Soft Delete** | Pas de DELETE physique sauf purge RGPD planifiée |
|
|
309
|
-
|
|
310
|
-
### Outils MCP Pertinents pour le BA
|
|
311
|
-
|
|
312
|
-
| Phase BA | Outil MCP | Usage |
|
|
313
|
-
|----------|-----------|-------|
|
|
314
|
-
| Pre-research (01) | `analyze_extension_points` | Découvrir modules/entités existants |
|
|
315
|
-
| Pre-research (01) | `api_docs` | Consulter la documentation API existante |
|
|
316
|
-
| Analyse (02) | `validate_conventions` | Vérifier les noms d'entités proposés |
|
|
317
|
-
| Spécification (03) | `generate_permissions` | Générer la matrice de permissions |
|
|
318
|
-
| Handoff (05) | `scaffold_extension` | Préparer le scaffolding |
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
116
|
## Feature Directory Structure
|
|
323
117
|
|
|
324
118
|
```
|
|
325
119
|
docs/
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
120
|
+
business/
|
|
121
|
+
{application}/
|
|
122
|
+
business-analyse/
|
|
123
|
+
schemas/ <- JSON SCHEMAS (deployed by step-00)
|
|
124
|
+
feature-schema.json
|
|
125
|
+
application-schema.json
|
|
126
|
+
sections/
|
|
127
|
+
analysis-schema.json
|
|
128
|
+
discovery-schema.json
|
|
129
|
+
handoff-schema.json
|
|
130
|
+
metadata-schema.json
|
|
131
|
+
specification-schema.json
|
|
132
|
+
validation-schema.json
|
|
133
|
+
shared/
|
|
134
|
+
common-defs.json
|
|
135
|
+
v1.0/
|
|
136
|
+
feature.json <- APPLICATION master ($schema: ../schemas/application-schema.json)
|
|
137
|
+
{module1}/
|
|
138
|
+
business-analyse/
|
|
139
|
+
v1.0/
|
|
140
|
+
feature.json <- MODULE detail ($schema: ../../../business-analyse/schemas/feature-schema.json)
|
|
141
|
+
{module2}/
|
|
142
|
+
business-analyse/
|
|
143
|
+
v1.0/
|
|
144
|
+
feature.json <- MODULE detail
|
|
351
145
|
```
|
|
352
146
|
|
|
353
147
|
**Ralph Loop Integration (generated by step-05):**
|
|
354
148
|
|
|
355
149
|
```
|
|
356
150
|
.ralph/
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
151
|
+
prd.json # Task breakdown derived from handoff (for /ralph-loop -r)
|
|
152
|
+
progress.txt # Links back to BA feature documents
|
|
153
|
+
logs/
|
|
154
|
+
reports/
|
|
361
155
|
```
|
|
362
156
|
|
|
363
|
-
**Integrated Documentation (SmartStack app):**
|
|
364
|
-
- Application view: `/docs/business/{app}` → reads master feature.json
|
|
365
|
-
- Module view: `/docs/business/{app}/{module}` → reads module feature.json
|
|
366
|
-
|
|
367
157
|
---
|
|
368
158
|
|
|
369
159
|
## Feature ID Generation
|
|
@@ -378,252 +168,6 @@ generate_feature_id():
|
|
|
378
168
|
|
|
379
169
|
---
|
|
380
170
|
|
|
381
|
-
## Models by Phase (Step)
|
|
382
|
-
|
|
383
|
-
| Step | Model | Reason |
|
|
384
|
-
|------|-------|--------|
|
|
385
|
-
| 00-init | Haiku | Quick structure setup |
|
|
386
|
-
| 01-cadrage | **Opus** | ULTRATHINK framing |
|
|
387
|
-
| 02-decomposition | Sonnet | Module identification + dependency analysis |
|
|
388
|
-
| 03-specify | **Opus** | ULTRATHINK per-module specification |
|
|
389
|
-
| 04-consolidation | Sonnet | Cross-module validation |
|
|
390
|
-
| 05-handoff | **Opus** | Zero-ambiguity prompt |
|
|
391
|
-
|
|
392
|
-
---
|
|
393
|
-
|
|
394
|
-
## Interactive Elicitation Protocol
|
|
395
|
-
|
|
396
|
-
> **RULE: ALL questions MUST be asked interactively using `AskUserQuestion`.**
|
|
397
|
-
> **NEVER dump a list of questions as text. ALWAYS use the tool.**
|
|
398
|
-
|
|
399
|
-
### Protocol
|
|
400
|
-
|
|
401
|
-
1. **Group questions by theme** — max 4 questions per `AskUserQuestion` call (tool limit)
|
|
402
|
-
2. **Propose predefined options** — for questions with predictable answers, provide 2-4 options
|
|
403
|
-
3. **The user can always choose "Other"** — the tool adds this automatically for free-text answers
|
|
404
|
-
4. **Process answers immediately** — apply ULTRATHINK + follow-ups before moving to next group
|
|
405
|
-
5. **Adapt next questions** — based on previous answers, skip irrelevant questions
|
|
406
|
-
|
|
407
|
-
### Batching Strategy
|
|
408
|
-
|
|
409
|
-
| Category | Questions | Batches |
|
|
410
|
-
|----------|-----------|---------|
|
|
411
|
-
| 01-context | Q1.1-Q1.4 | 1 call |
|
|
412
|
-
| 02-stakeholders | Q2.1-Q2.8 | 2 calls |
|
|
413
|
-
| 03-scope | Q3.1-Q3.8 | 2 calls |
|
|
414
|
-
| 04-data | Q4.1-Q4.8 | 2 calls |
|
|
415
|
-
| 05-integrations | Q5.1-Q5.8 | 2 calls |
|
|
416
|
-
| 06-security | Q6.1-Q6.8 | 2 calls |
|
|
417
|
-
| 07-ui | Q7.1-Q7.8 | 2 calls |
|
|
418
|
-
| 08-performance | Q8.1-Q8.4 | 1 call |
|
|
419
|
-
| 09-constraints | Q9.1-Q9.4 | 1 call |
|
|
420
|
-
| 10-documentation | Q10.1-Q10.4 | 1 call |
|
|
421
|
-
| 11-data-lifecycle | Q11.1-Q11.8 | 2 calls |
|
|
422
|
-
| 12-migration | Q12.1-Q12.8 | 2 calls |
|
|
423
|
-
| 13-cross-module | Q13.1-Q13.8 | 2 calls |
|
|
424
|
-
|
|
425
|
-
### AskUserQuestion Format
|
|
426
|
-
|
|
427
|
-
> **⚠️ FORMATTING CRITICAL: `AskUserQuestion` does NOT support markdown or line breaks.**
|
|
428
|
-
> Le champ `question` est rendu en texte brut (plain text). Il n'y a pas de retour à la ligne,
|
|
429
|
-
> pas de gras, pas de puces. Une question simple reste lisible meme longue. Mais du contenu
|
|
430
|
-
> structuré (listes, résumés multi-points, tableaux) devient un mur de texte illisible.
|
|
431
|
-
|
|
432
|
-
| Field | Rule |
|
|
433
|
-
|-------|------|
|
|
434
|
-
| `question` | **1 question ou 1 phrase.** Jamais de liste, résumé multi-points ou contenu structuré. |
|
|
435
|
-
| `header` | 1-2 mots (max 12 chars) |
|
|
436
|
-
| `label` (option) | Court et clair (~20 chars) |
|
|
437
|
-
| `description` (option) | 1 phrase explicative (~60 chars) |
|
|
438
|
-
|
|
439
|
-
> **Pour afficher du contenu structuré** (résumés, listes, tableaux, synthèses) :
|
|
440
|
-
> **TOUJOURS** utiliser du **texte direct** (output text) AVANT l'appel `AskUserQuestion`.
|
|
441
|
-
> Le texte direct supporte le markdown et sera correctement formaté avec titres, puces, gras, etc.
|
|
442
|
-
>
|
|
443
|
-
> **Exemple — Validation de synthèse :**
|
|
444
|
-
> 1. Afficher le résumé structuré en markdown (texte direct)
|
|
445
|
-
> 2. Puis poser une question courte : "Cette synthèse est-elle correcte ?"
|
|
446
|
-
|
|
447
|
-
```
|
|
448
|
-
AskUserQuestion({
|
|
449
|
-
questions: [
|
|
450
|
-
{
|
|
451
|
-
question: "Quel problème métier ce module doit-il résoudre ?",
|
|
452
|
-
header: "Problème", // max 12 chars
|
|
453
|
-
options: [
|
|
454
|
-
{ label: "Processus manuel", description: "Automatiser un processus existant fait manuellement" },
|
|
455
|
-
{ label: "Données dispersées", description: "Centraliser des données éparpillées dans plusieurs outils" },
|
|
456
|
-
{ label: "Manque visibilité", description: "Obtenir des indicateurs et du suivi inexistants aujourd'hui" },
|
|
457
|
-
{ label: "Conformité", description: "Répondre à une obligation réglementaire ou de sécurité" }
|
|
458
|
-
],
|
|
459
|
-
multiSelect: false
|
|
460
|
-
},
|
|
461
|
-
// ... up to 4 questions per call
|
|
462
|
-
]
|
|
463
|
-
})
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
### After Each Batch
|
|
467
|
-
|
|
468
|
-
1. **Evaluate answer quality** (see Answer Quality Indicators)
|
|
469
|
-
2. **If insufficient** → follow-up AskUserQuestion with targeted probes from the Elicitation Guide
|
|
470
|
-
3. **If solution-oriented** → reframe using Technique 1 before proceeding
|
|
471
|
-
4. **If sufficient/excellent** → record and move to next batch
|
|
472
|
-
5. **Summarize** what was understood before moving to the next category
|
|
473
|
-
|
|
474
|
-
---
|
|
475
|
-
|
|
476
|
-
## Techniques d'elicitation
|
|
477
|
-
|
|
478
|
-
> **Charge par :** step-01-cadrage (Opus ULTRATHINK)
|
|
479
|
-
> **Objectif :** Guider COMMENT questionner, pas seulement QUOI demander.
|
|
480
|
-
> **Principe :** Chaque technique doit etre appliquee naturellement dans le flux de la conversation,
|
|
481
|
-
> pas comme un outil supplementaire. L'analyste choisit la technique adaptee a la situation.
|
|
482
|
-
|
|
483
|
-
### Technique 1 : Reformulation du besoin
|
|
484
|
-
|
|
485
|
-
Quand le client decrit une **solution** (bouton, ecran, champ, outil), reformuler en **besoin** :
|
|
486
|
-
|
|
487
|
-
| Le client dit | L'analyste demande |
|
|
488
|
-
|---------------|-------------------|
|
|
489
|
-
| "Il me faut un menu deroulant pour les roles" | "Quel probleme rencontrez-vous aujourd'hui avec la gestion des acces ? Pourquoi certaines personnes doivent-elles avoir des acces differents ?" |
|
|
490
|
-
| "On a besoin d'un bouton d'export" | "Que faites-vous avec les donnees une fois exportees ? Qui en a besoin et pourquoi ?" |
|
|
491
|
-
| "Ajoutez un champ statut" | "Quel parcours suit cet element du debut a la fin ? Quels evenements declenchent un changement d'etat ?" |
|
|
492
|
-
|
|
493
|
-
### Technique 2 : Chaine des pourquoi
|
|
494
|
-
|
|
495
|
-
Quand le besoin semble superficiel, enchainez jusqu'a 5 "Pourquoi ?" pour trouver la cause racine :
|
|
496
|
-
|
|
497
|
-
```
|
|
498
|
-
Client : "On a besoin de suivre l'activite des utilisateurs"
|
|
499
|
-
→ Pourquoi ? "Pour savoir qui a modifie quoi"
|
|
500
|
-
→ Pourquoi ? "Parce qu'on a eu des problemes de donnees incorrectes"
|
|
501
|
-
→ Pourquoi ? "Parce que plusieurs personnes modifient les memes fiches"
|
|
502
|
-
→ CAUSE RACINE : Conflit d'edition simultanee → Besoin de journal d'activite + protection des modifications
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
### Technique 3 : Extraction de scenario concret
|
|
506
|
-
|
|
507
|
-
Ne jamais accepter de descriptions abstraites. Toujours demander un **scenario de vie reelle** :
|
|
508
|
-
|
|
509
|
-
```
|
|
510
|
-
"Racontez-moi une journee type : vous arrivez au bureau, vous ouvrez l'application.
|
|
511
|
-
Quelle est la PREMIERE chose que vous devez faire ?
|
|
512
|
-
Puis ensuite ? Quelles informations consultez-vous ? Quelles decisions prenez-vous ?"
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
### Technique 4 : Test d'absence
|
|
516
|
-
|
|
517
|
-
Valider la necessite en demandant ce qui se passe SANS :
|
|
518
|
-
|
|
519
|
-
```
|
|
520
|
-
"Si cette fonctionnalite N'EXISTAIT PAS, que feriez-vous a la place ?
|
|
521
|
-
Combien de temps ou d'argent le contournement actuel coute-t-il ?"
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
### Technique 5 : Verification de completude
|
|
525
|
-
|
|
526
|
-
Pour chaque reponse sous forme de liste, verifier qu'il ne manque rien :
|
|
527
|
-
|
|
528
|
-
| Type de reponse | Relance |
|
|
529
|
-
|-----------------|---------|
|
|
530
|
-
| "Il y a 3 types d'utilisateurs" | "Y a-t-il des acteurs externes ? Des auditeurs ? Des administrateurs systeme ? Des processus automatiques ?" |
|
|
531
|
-
| "Le flux principal est A puis B puis C" | "Que se passe-t-il si l'utilisateur annule a l'etape B ? Si l'etape C echoue ? S'il veut revenir a A ?" |
|
|
532
|
-
| "Champs obligatoires : nom et email" | "Quelles contraintes d'unicite ? Quel format ? Que se passe-t-il en cas de doublon ?" |
|
|
533
|
-
|
|
534
|
-
### Technique 6 : Projection dans le futur
|
|
535
|
-
|
|
536
|
-
Demander au client de se projeter pour decouvrir des besoins non exprimes :
|
|
537
|
-
|
|
538
|
-
```
|
|
539
|
-
"Imaginons que nous sommes 2 ans dans le futur et que l'application fonctionne parfaitement.
|
|
540
|
-
Qu'est-ce qui a change dans votre facon de travailler ?
|
|
541
|
-
Quels nouveaux besoins sont apparus auxquels vous ne pensez pas aujourd'hui ?"
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
### Technique 7 : Test de contradiction
|
|
545
|
-
|
|
546
|
-
Quand deux reponses semblent contradictoires, les confronter pour clarifier :
|
|
547
|
-
|
|
548
|
-
```
|
|
549
|
-
"Vous avez mentionne que [affirmation A], mais vous dites aussi que [affirmation B].
|
|
550
|
-
Ces deux elements semblent en tension. Pouvez-vous m'aider a comprendre
|
|
551
|
-
comment ils coexistent dans la realite ?"
|
|
552
|
-
```
|
|
553
|
-
|
|
554
|
-
### Technique 8 : Escalade d'impact
|
|
555
|
-
|
|
556
|
-
Augmenter progressivement l'echelle pour tester les limites :
|
|
557
|
-
|
|
558
|
-
```
|
|
559
|
-
"Aujourd'hui vous avez 50 fiches. Que se passe-t-il avec 500 ? Avec 5000 ?
|
|
560
|
-
Est-ce que le processus reste le meme ou faudrait-il faire differemment ?"
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
### Indicateurs de qualite des reponses
|
|
564
|
-
|
|
565
|
-
| Qualite | Signal | Action |
|
|
566
|
-
|---------|--------|--------|
|
|
567
|
-
| **Insuffisante** | Moins d'une phrase, "je ne sais pas", adjectif vague | Appliquer les techniques 1 a 8, demander un exemple concret |
|
|
568
|
-
| **Orientee solution** | Contient des termes d'interface ou techniques (bouton, champ, base de donnees) | Appliquer la technique 1 (reformuler en besoin) |
|
|
569
|
-
| **Suffisante** | Contient QUI, QUOI, POURQUOI et un exemple concret | Continuer, noter le niveau de confiance |
|
|
570
|
-
| **Excellente** | Inclut les cas limites, les contraintes et des criteres mesurables | Continuer, marquer comme "Confirme" |
|
|
571
|
-
|
|
572
|
-
---
|
|
573
|
-
|
|
574
|
-
## ULTRATHINK
|
|
575
|
-
|
|
576
|
-
Behavioral mode for critical phases (01, 02, 04):
|
|
577
|
-
|
|
578
|
-
```
|
|
579
|
-
ULTRATHINK MODE:
|
|
580
|
-
- Consider ALL edge cases
|
|
581
|
-
- Challenge EVERY assumption
|
|
582
|
-
- Anticipate UNEXPRESSED needs
|
|
583
|
-
- Validate completeness before output
|
|
584
|
-
- Apply Elicitation Techniques (see above)
|
|
585
|
-
|
|
586
|
-
DO NOT:
|
|
587
|
-
- Accept vague answers
|
|
588
|
-
- Skip question categories
|
|
589
|
-
- Assume stakeholder thought of everything
|
|
590
|
-
- Accept solutions without understanding the problem first
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
**DO NOT invoke** as a skill/tool - it is a thinking mode.
|
|
594
|
-
|
|
595
|
-
---
|
|
596
|
-
|
|
597
|
-
## Proactive Suggestions
|
|
598
|
-
|
|
599
|
-
After scope definition in step-01, the skill suggests complementary modules/sections:
|
|
600
|
-
|
|
601
|
-
1. Analyze feature type and scope from questionnaire answers
|
|
602
|
-
2. Load `patterns/suggestion-catalog.md`
|
|
603
|
-
3. Match against catalog patterns
|
|
604
|
-
4. Present suggestions via AskUserQuestion (accept/reject per suggestion)
|
|
605
|
-
5. Store in feature.json.suggestions[]
|
|
606
|
-
|
|
607
|
-
Accepted suggestions become candidates for future /business-analyse runs.
|
|
608
|
-
|
|
609
|
-
---
|
|
610
|
-
|
|
611
|
-
## Context7 (Step 04)
|
|
612
|
-
|
|
613
|
-
```
|
|
614
|
-
Prompt pattern:
|
|
615
|
-
"use context7 with /facebook/react and /i18next/react-i18next
|
|
616
|
-
to generate {component} following SmartStack patterns"
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
Libraries:
|
|
620
|
-
- `/facebook/react` - React 19 patterns
|
|
621
|
-
- `/i18next/react-i18next` - Internationalization
|
|
622
|
-
- `/remix-run/react-router` - React Router v7
|
|
623
|
-
- `/lucide-icons/lucide-react` - Icons
|
|
624
|
-
|
|
625
|
-
---
|
|
626
|
-
|
|
627
171
|
## Permission Path Format
|
|
628
172
|
|
|
629
173
|
**Format:** `business.{application}.{module}.{action}`
|
|
@@ -685,8 +229,8 @@ State is persisted in `feature.json.metadata` and `feature.json.metadata.steps`.
|
|
|
685
229
|
|
|
686
230
|
```
|
|
687
231
|
resume_workflow(feat_id):
|
|
688
|
-
1. ba-reader.findFeature(feat_id)
|
|
689
|
-
2. Read feature.json.metadata.steps
|
|
232
|
+
1. ba-reader.findFeature(feat_id) -> latest feature.json
|
|
233
|
+
2. Read feature.json.metadata.steps -> find last completed step
|
|
690
234
|
3. Load next step file
|
|
691
235
|
4. If not found in docs/: fallback to .business-analyse/ (legacy)
|
|
692
236
|
```
|
|
@@ -697,10 +241,10 @@ resume_workflow(feat_id):
|
|
|
697
241
|
|
|
698
242
|
```
|
|
699
243
|
{STEP_NAME} - {feature_id}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
244
|
+
Status: {status in feature.json}
|
|
245
|
+
Section enriched: {discovery|analysis|specification|validation|handoff}
|
|
246
|
+
feature.json: {path}
|
|
247
|
+
Next: {next step name}
|
|
704
248
|
```
|
|
705
249
|
|
|
706
250
|
---
|
|
@@ -709,42 +253,42 @@ resume_workflow(feat_id):
|
|
|
709
253
|
|
|
710
254
|
> **Objectif :** La langue de communication avec le client est configurable.
|
|
711
255
|
> Toute interaction via `AskUserQuestion` (questions, options, reformulations, relances)
|
|
712
|
-
> doit
|
|
256
|
+
> doit etre dans la langue configuree.
|
|
713
257
|
|
|
714
258
|
### Configuration
|
|
715
259
|
|
|
716
|
-
Le champ `language` dans `feature.json.metadata.language`
|
|
260
|
+
Le champ `language` dans `feature.json.metadata.language` definit la langue :
|
|
717
261
|
|
|
718
|
-
| Langue | Code |
|
|
262
|
+
| Langue | Code | Defaut |
|
|
719
263
|
|--------|------|--------|
|
|
720
|
-
|
|
|
264
|
+
| Francais | `fr` | **Oui** |
|
|
721
265
|
| English | `en` | Non |
|
|
722
266
|
| Italiano | `it` | Non |
|
|
723
267
|
| Deutsch | `de` | Non |
|
|
724
268
|
|
|
725
|
-
###
|
|
269
|
+
### Portee
|
|
726
270
|
|
|
727
|
-
|
|
|
271
|
+
| Element | Adapte a la langue ? |
|
|
728
272
|
|---------|---------------------|
|
|
729
273
|
| Questions `AskUserQuestion` (labels, descriptions, options) | **OUI** — toujours dans `{language}` |
|
|
730
|
-
| Reformulations et
|
|
731
|
-
| Relances et follow-ups (Elicitation Guide) | **OUI** — traduire les probes
|
|
732
|
-
| Documents
|
|
733
|
-
|
|
|
734
|
-
| Noms de code (
|
|
274
|
+
| Reformulations et resumes de categorie | **OUI** — toujours dans `{language}` |
|
|
275
|
+
| Relances et follow-ups (Elicitation Guide) | **OUI** — traduire les probes a la volee |
|
|
276
|
+
| Documents generes (discovery, analysis, specification, handoff) | **OUI** — rediges dans `{language}` |
|
|
277
|
+
| Reference technique interne (patterns, architecture) | NON — reste en langue du fichier |
|
|
278
|
+
| Noms de code (entites, permissions, paths) | NON — toujours en anglais (convention plateforme) |
|
|
735
279
|
|
|
736
|
-
###
|
|
280
|
+
### Regle
|
|
737
281
|
|
|
738
282
|
```
|
|
739
|
-
1. Lire {language} depuis feature.json.metadata.language (
|
|
283
|
+
1. Lire {language} depuis feature.json.metadata.language (defaut: "fr")
|
|
740
284
|
2. Adapter TOUTE communication AskUserQuestion dans {language}
|
|
741
|
-
3. Les exemples de probes/relances dans les questionnaires sont en
|
|
742
|
-
|
|
743
|
-
4. Les documents
|
|
744
|
-
5. Le code, les noms d'
|
|
285
|
+
3. Les exemples de probes/relances dans les questionnaires sont en francais
|
|
286
|
+
-> Si {language} != "fr", les traduire a la volee
|
|
287
|
+
4. Les documents generes sont rediges dans {language}
|
|
288
|
+
5. Le code, les noms d'entites et les paths restent TOUJOURS en anglais
|
|
745
289
|
6. Ne JAMAIS utiliser "SmartStack" dans les communications utilisateur
|
|
746
|
-
|
|
747
|
-
|
|
290
|
+
-> Utiliser "la plateforme", "l'application" ou "le systeme" a la place
|
|
291
|
+
-> SmartStack est le nom interne du framework, le projet client a son propre nom
|
|
748
292
|
```
|
|
749
293
|
|
|
750
294
|
---
|