@atlashub/smartstack-cli 1.3.0 → 1.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/package.json
CHANGED
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Orchestration automatique BA complete (ULTRATHINK + Ralph Loop)
|
|
3
|
+
argument-hint: "<description du besoin>"
|
|
4
|
+
model: opus
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Phase 0: Orchestration Automatique Business Analyse
|
|
8
|
+
|
|
9
|
+
> **Modele:** OPUS (orchestration complete, zero intervention)
|
|
10
|
+
> **Cout estime:** ~$15-50 (full flow avec Ralph Loop)
|
|
11
|
+
> **Prerequis:** Aucun - Point d'entree unique
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## MISSION
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
+==============================================================================+
|
|
19
|
+
| ORCHESTRATION COMPLETE: BESOIN → IMPLEMENTATION → DOCUMENTATION |
|
|
20
|
+
+==============================================================================+
|
|
21
|
+
| |
|
|
22
|
+
| Cette commande orchestre AUTOMATIQUEMENT tout le workflow BA: |
|
|
23
|
+
| |
|
|
24
|
+
| 1. ANALYSE DU BESOIN (ce fichier) |
|
|
25
|
+
| → Contexte SmartStack (MCP verification) |
|
|
26
|
+
| → Application/Module existant ou nouveau |
|
|
27
|
+
| → Niveau de granularite (Muscles/Section/Resources) |
|
|
28
|
+
| |
|
|
29
|
+
| 2. DISCOVERY + BRD + FRD (Phases 1-4) |
|
|
30
|
+
| → Ralph Loop si necessaire |
|
|
31
|
+
| → Validation automatique |
|
|
32
|
+
| |
|
|
33
|
+
| 3. VALIDATION UTILISATEUR (Phase 5) |
|
|
34
|
+
| → Gate obligatoire |
|
|
35
|
+
| |
|
|
36
|
+
| 4. HANDOFF + IMPLEMENTATION (Phases 6 + /implement) |
|
|
37
|
+
| → Ralph Loop obligatoire |
|
|
38
|
+
| → Skills SmartStack auto-executes |
|
|
39
|
+
| |
|
|
40
|
+
| 5. DOCUMENTATION HTML (Phase 7) |
|
|
41
|
+
| → Auto-generee apres implementation |
|
|
42
|
+
| |
|
|
43
|
+
+==============================================================================+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## STEP 0: VERIFICATION MCP SMARTSTACK (CRITIQUE)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Verifier la presence du MCP SmartStack
|
|
52
|
+
MCP_CHECK=$(claude mcp list 2>/dev/null | grep -i "smartstack" || echo "")
|
|
53
|
+
|
|
54
|
+
if [ -z "$MCP_CHECK" ]; then
|
|
55
|
+
echo ""
|
|
56
|
+
echo "╔══════════════════════════════════════════════════════════════════════════════╗"
|
|
57
|
+
echo "║ ⚠️ ALERTE: MCP SMARTSTACK NON DETECTE ║"
|
|
58
|
+
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
|
|
59
|
+
echo "║ ║"
|
|
60
|
+
echo "║ Le MCP SmartStack n'est pas configure dans cette session. ║"
|
|
61
|
+
echo "║ ║"
|
|
62
|
+
echo "║ CONSEQUENCES: ║"
|
|
63
|
+
echo "║ • Pas d'acces aux applications existantes ║"
|
|
64
|
+
echo "║ • Pas de validation des permissions ║"
|
|
65
|
+
echo "║ • Pas d'integration notifications/workflows/IA ║"
|
|
66
|
+
echo "║ ║"
|
|
67
|
+
echo "║ ACTIONS REQUISES: ║"
|
|
68
|
+
echo "║ 1. Verifier la configuration MCP: claude mcp list ║"
|
|
69
|
+
echo "║ 2. Ajouter SmartStack MCP si absent ║"
|
|
70
|
+
echo "║ 3. Relancer /business-analyse ║"
|
|
71
|
+
echo "║ ║"
|
|
72
|
+
echo "╚══════════════════════════════════════════════════════════════════════════════╝"
|
|
73
|
+
echo ""
|
|
74
|
+
# Ne pas bloquer mais alerter - continuer avec limitations
|
|
75
|
+
MCP_AVAILABLE=false
|
|
76
|
+
else
|
|
77
|
+
echo "✅ MCP SmartStack detecte: $MCP_CHECK"
|
|
78
|
+
MCP_AVAILABLE=true
|
|
79
|
+
fi
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## STEP 1: ANALYSE DU BESOIN UTILISATEUR
|
|
85
|
+
|
|
86
|
+
### 1.1 Collecter la description
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
BESOIN_UTILISATEUR = "$ARGUMENTS"
|
|
90
|
+
|
|
91
|
+
Si vide, utiliser AskUserQuestion:
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
AskUserQuestion({
|
|
96
|
+
questions: [{
|
|
97
|
+
question: "Decrivez votre besoin en une phrase claire",
|
|
98
|
+
header: "Besoin",
|
|
99
|
+
options: [
|
|
100
|
+
{ label: "Nouvelle fonctionnalite", description: "Ajouter une capacite metier" },
|
|
101
|
+
{ label: "Amelioration existante", description: "Enrichir une feature existante" },
|
|
102
|
+
{ label: "Integration", description: "Connecter avec systeme externe" }
|
|
103
|
+
],
|
|
104
|
+
multiSelect: false
|
|
105
|
+
}]
|
|
106
|
+
})
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 1.2 Determiner le contexte SmartStack
|
|
110
|
+
|
|
111
|
+
**ULTRATHINK: Analyser le besoin pour determiner:**
|
|
112
|
+
|
|
113
|
+
| Question | Options | Impact |
|
|
114
|
+
|----------|---------|--------|
|
|
115
|
+
| Application existante? | Liste des apps business | Reutilisation patterns |
|
|
116
|
+
| Module existant? | Liste des modules de l'app | Coherence architecture |
|
|
117
|
+
| Nouveau module? | Nom propose | Structure a creer |
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
AskUserQuestion({
|
|
121
|
+
questions: [
|
|
122
|
+
{
|
|
123
|
+
question: "Dans quelle application SmartStack?",
|
|
124
|
+
header: "Application",
|
|
125
|
+
options: [
|
|
126
|
+
{ label: "CRM", description: "Gestion relation client" },
|
|
127
|
+
{ label: "Inventory", description: "Gestion des stocks" },
|
|
128
|
+
{ label: "HR", description: "Ressources humaines" },
|
|
129
|
+
{ label: "Nouvelle application", description: "Creer une nouvelle app business" }
|
|
130
|
+
],
|
|
131
|
+
multiSelect: false
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
// Si MCP_AVAILABLE, lister les applications existantes dynamiquement
|
|
137
|
+
// via appel MCP: smartstack.applications.list()
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## STEP 2: DEFINIR LE NIVEAU DE GRANULARITE
|
|
143
|
+
|
|
144
|
+
### 2.1 Architecture SmartStack - 3 Niveaux
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
148
|
+
║ NIVEAUX DE GRANULARITE SMARTSTACK ║
|
|
149
|
+
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
150
|
+
║ ║
|
|
151
|
+
║ NIVEAU 1: MUSCLES (Fonctionnalites majeures) ║
|
|
152
|
+
║ ├── Definition: Capacite metier complete et autonome ║
|
|
153
|
+
║ ├── Exemple: "Gestion des Contacts", "Gestion des Produits" ║
|
|
154
|
+
║ ├── Contient: Entites + CRUD + Regles metier + UI complete ║
|
|
155
|
+
║ └── Permission: business.{app}.{muscle}.* ║
|
|
156
|
+
║ ║
|
|
157
|
+
║ NIVEAU 2: SECTIONS (Sous-fonctionnalites) ║
|
|
158
|
+
║ ├── Definition: Partie d'un Muscle avec logique specifique ║
|
|
159
|
+
║ ├── Exemple: "Import Contacts", "Export Produits", "Historique" ║
|
|
160
|
+
║ ├── Contient: Endpoints specifiques + UI partielle ║
|
|
161
|
+
║ └── Permission: business.{app}.{muscle}.{section}.* ║
|
|
162
|
+
║ ║
|
|
163
|
+
║ NIVEAU 3: RESOURCES (Elements atomiques) ║
|
|
164
|
+
║ ├── Definition: Donnee ou action unitaire ║
|
|
165
|
+
║ ├── Exemple: "Champ custom", "Action rapide", "Widget" ║
|
|
166
|
+
║ ├── Contient: 1 endpoint ou 1 composant ║
|
|
167
|
+
║ └── Permission: herite du parent ║
|
|
168
|
+
║ ║
|
|
169
|
+
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 2.2 Questionnaire de granularite
|
|
173
|
+
|
|
174
|
+
```javascript
|
|
175
|
+
AskUserQuestion({
|
|
176
|
+
questions: [{
|
|
177
|
+
question: "Quel niveau de granularite pour ce besoin?",
|
|
178
|
+
header: "Niveau",
|
|
179
|
+
options: [
|
|
180
|
+
{ label: "Muscle (Recommande)", description: "Fonctionnalite complete avec entites, CRUD, UI" },
|
|
181
|
+
{ label: "Section", description: "Sous-fonctionnalite d'un Muscle existant" },
|
|
182
|
+
{ label: "Resource", description: "Element atomique (champ, action, widget)" }
|
|
183
|
+
],
|
|
184
|
+
multiSelect: false
|
|
185
|
+
}]
|
|
186
|
+
})
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## STEP 3: DEFINIR LES OBJECTIFS
|
|
192
|
+
|
|
193
|
+
### 3.1 Objets a creer
|
|
194
|
+
|
|
195
|
+
```javascript
|
|
196
|
+
AskUserQuestion({
|
|
197
|
+
questions: [{
|
|
198
|
+
question: "Quels objets/entites sont necessaires?",
|
|
199
|
+
header: "Entites",
|
|
200
|
+
options: [
|
|
201
|
+
{ label: "Entite principale", description: "L'objet metier central (ex: Contact, Produit)" },
|
|
202
|
+
{ label: "Entites liees", description: "Objets dependants (ex: Adresse, Categorie)" },
|
|
203
|
+
{ label: "Lookup/Enum", description: "Listes de valeurs (ex: Status, Type)" }
|
|
204
|
+
],
|
|
205
|
+
multiSelect: true
|
|
206
|
+
}]
|
|
207
|
+
})
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 3.2 Permissions requises
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
PERMISSIONS A DEFINIR:
|
|
214
|
+
□ .read - Lecture des donnees
|
|
215
|
+
□ .create - Creation de nouvelles entrees
|
|
216
|
+
□ .update - Modification des entrees
|
|
217
|
+
□ .delete - Suppression des entrees
|
|
218
|
+
□ .export - Export des donnees
|
|
219
|
+
□ .import - Import des donnees
|
|
220
|
+
□ .admin - Administration du module
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### 3.3 Aspects legaux (RGPD, conformite)
|
|
224
|
+
|
|
225
|
+
```javascript
|
|
226
|
+
AskUserQuestion({
|
|
227
|
+
questions: [{
|
|
228
|
+
question: "Y a-t-il des contraintes legales/conformite?",
|
|
229
|
+
header: "Legal",
|
|
230
|
+
options: [
|
|
231
|
+
{ label: "RGPD", description: "Donnees personnelles, droit a l'oubli, consentement" },
|
|
232
|
+
{ label: "Audit Trail", description: "Tracabilite obligatoire des modifications" },
|
|
233
|
+
{ label: "Retention", description: "Duree de conservation des donnees" },
|
|
234
|
+
{ label: "Aucune", description: "Pas de contrainte specifique" }
|
|
235
|
+
],
|
|
236
|
+
multiSelect: true
|
|
237
|
+
}]
|
|
238
|
+
})
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## STEP 4: INTEGRATIONS SMARTSTACK
|
|
244
|
+
|
|
245
|
+
### 4.1 Workflows
|
|
246
|
+
|
|
247
|
+
```javascript
|
|
248
|
+
AskUserQuestion({
|
|
249
|
+
questions: [{
|
|
250
|
+
question: "Quels workflows automatiques sont necessaires?",
|
|
251
|
+
header: "Workflows",
|
|
252
|
+
options: [
|
|
253
|
+
{ label: "Email automatique", description: "Envoi d'emails sur evenements" },
|
|
254
|
+
{ label: "Rappels/SLA", description: "Notifications avec delais" },
|
|
255
|
+
{ label: "Approbation", description: "Circuit de validation" },
|
|
256
|
+
{ label: "Aucun", description: "Pas de workflow" }
|
|
257
|
+
],
|
|
258
|
+
multiSelect: true
|
|
259
|
+
}]
|
|
260
|
+
})
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### 4.2 Notifications
|
|
264
|
+
|
|
265
|
+
```javascript
|
|
266
|
+
AskUserQuestion({
|
|
267
|
+
questions: [{
|
|
268
|
+
question: "Quelles notifications en temps reel?",
|
|
269
|
+
header: "Notifs",
|
|
270
|
+
options: [
|
|
271
|
+
{ label: "Creation", description: "Notifier quand nouvel element cree" },
|
|
272
|
+
{ label: "Modification", description: "Notifier sur changements" },
|
|
273
|
+
{ label: "Assignation", description: "Notifier le nouvel assigne" },
|
|
274
|
+
{ label: "Aucune", description: "Pas de notification" }
|
|
275
|
+
],
|
|
276
|
+
multiSelect: true
|
|
277
|
+
}]
|
|
278
|
+
})
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### 4.3 Intelligence Artificielle
|
|
282
|
+
|
|
283
|
+
```javascript
|
|
284
|
+
AskUserQuestion({
|
|
285
|
+
questions: [{
|
|
286
|
+
question: "Utilisation de l'IA SmartStack?",
|
|
287
|
+
header: "IA",
|
|
288
|
+
options: [
|
|
289
|
+
{ label: "Generation texte", description: "Suggestions, descriptions auto" },
|
|
290
|
+
{ label: "Classification", description: "Categorisation automatique" },
|
|
291
|
+
{ label: "Extraction", description: "Parsing de documents" },
|
|
292
|
+
{ label: "Aucune", description: "Pas d'IA" }
|
|
293
|
+
],
|
|
294
|
+
multiSelect: true
|
|
295
|
+
}]
|
|
296
|
+
})
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## STEP 5: GENERER LE CONTEXTE COMPLET
|
|
302
|
+
|
|
303
|
+
### 5.1 Creer le fichier de contexte
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
FEATURE_ID="FEAT-$(date +%Y%m%d-%H%M%S)"
|
|
307
|
+
APP_NAME="{application}"
|
|
308
|
+
MODULE_NAME="{module}"
|
|
309
|
+
FEATURE_DIR=".business-analyse/business/${APP_NAME}/modules/${MODULE_NAME}/features/${FEATURE_ID}"
|
|
310
|
+
|
|
311
|
+
mkdir -p "$FEATURE_DIR"
|
|
312
|
+
mkdir -p "$FEATURE_DIR/.ralph"
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### 5.2 Generer context.json
|
|
316
|
+
|
|
317
|
+
```json
|
|
318
|
+
{
|
|
319
|
+
"feature_id": "{FEATURE_ID}",
|
|
320
|
+
"created_at": "{timestamp}",
|
|
321
|
+
"mcp_available": "{true/false}",
|
|
322
|
+
|
|
323
|
+
"smartstack_context": {
|
|
324
|
+
"application": "{APP_NAME}",
|
|
325
|
+
"module": "{MODULE_NAME}",
|
|
326
|
+
"granularity": "{muscle/section/resource}",
|
|
327
|
+
"is_new_app": "{true/false}",
|
|
328
|
+
"is_new_module": "{true/false}"
|
|
329
|
+
},
|
|
330
|
+
|
|
331
|
+
"requirements": {
|
|
332
|
+
"description": "{BESOIN_UTILISATEUR}",
|
|
333
|
+
"entities": ["{liste}"],
|
|
334
|
+
"permissions": ["{liste}"],
|
|
335
|
+
"legal_constraints": ["{liste}"]
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
"integrations": {
|
|
339
|
+
"workflows": {
|
|
340
|
+
"required": "{true/false}",
|
|
341
|
+
"types": ["{liste}"]
|
|
342
|
+
},
|
|
343
|
+
"notifications": {
|
|
344
|
+
"required": "{true/false}",
|
|
345
|
+
"events": ["{liste}"]
|
|
346
|
+
},
|
|
347
|
+
"ai": {
|
|
348
|
+
"required": "{true/false}",
|
|
349
|
+
"use_cases": ["{liste}"]
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
"ralph_config": {
|
|
354
|
+
"discovery_max_iterations": 15,
|
|
355
|
+
"handoff_max_iterations": 10,
|
|
356
|
+
"implement_max_iterations": 25,
|
|
357
|
+
"completion_promise": "FEATURE_COMPLETE"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## STEP 6: CREER LES FICHIERS RALPH LOOP
|
|
365
|
+
|
|
366
|
+
### 6.1 prd.json pour Discovery
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"feature_id": "{FEATURE_ID}",
|
|
371
|
+
"phase": "discovery",
|
|
372
|
+
"created_at": "{timestamp}",
|
|
373
|
+
"userStories": [
|
|
374
|
+
{ "id": "1", "title": "Contexte et objectifs", "passes": false },
|
|
375
|
+
{ "id": "2", "title": "Parties prenantes", "passes": false },
|
|
376
|
+
{ "id": "3", "title": "Processus metier actuels", "passes": false },
|
|
377
|
+
{ "id": "4", "title": "Besoins fonctionnels", "passes": false },
|
|
378
|
+
{ "id": "5", "title": "Besoins non-fonctionnels", "passes": false },
|
|
379
|
+
{ "id": "6", "title": "Contraintes techniques", "passes": false },
|
|
380
|
+
{ "id": "7", "title": "Integrations SmartStack", "passes": false },
|
|
381
|
+
{ "id": "8", "title": "Aspects legaux/conformite", "passes": false },
|
|
382
|
+
{ "id": "9", "title": "Criteres de succes", "passes": false }
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### 6.2 progress.txt initial
|
|
388
|
+
|
|
389
|
+
```markdown
|
|
390
|
+
# Progress - {FEATURE_ID}
|
|
391
|
+
|
|
392
|
+
## Initialisation
|
|
393
|
+
- Feature: {description}
|
|
394
|
+
- Application: {APP_NAME}
|
|
395
|
+
- Module: {MODULE_NAME}
|
|
396
|
+
- Date: {timestamp}
|
|
397
|
+
- MCP SmartStack: {disponible/non disponible}
|
|
398
|
+
|
|
399
|
+
## Contexte SmartStack
|
|
400
|
+
- Granularite: {muscle/section/resource}
|
|
401
|
+
- Application existante: {oui/non}
|
|
402
|
+
- Module existant: {oui/non}
|
|
403
|
+
|
|
404
|
+
## Integrations requises
|
|
405
|
+
- Workflows: {oui/non} - Types: {liste}
|
|
406
|
+
- Notifications: {oui/non} - Events: {liste}
|
|
407
|
+
- IA: {oui/non} - Use cases: {liste}
|
|
408
|
+
|
|
409
|
+
## Legal/Conformite
|
|
410
|
+
- Contraintes: {liste}
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Iterations Discovery
|
|
415
|
+
|
|
416
|
+
### Iteration 1 - {timestamp}
|
|
417
|
+
[A remplir par Claude lors de la premiere iteration]
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## STEP 7: DEFINIR LES CRITERES DE VALIDATION RALPH
|
|
423
|
+
|
|
424
|
+
### 7.1 Criteres pour COMPLETE
|
|
425
|
+
|
|
426
|
+
```markdown
|
|
427
|
+
## CRITERES DE VALIDATION RALPH LOOP
|
|
428
|
+
|
|
429
|
+
Pour signaler <promise>FEATURE_COMPLETE</promise>, TOUS ces criteres doivent etre vrais:
|
|
430
|
+
|
|
431
|
+
### Phase Discovery
|
|
432
|
+
□ Toutes les 9 sections de prd.json ont "passes": true
|
|
433
|
+
□ Aucune question en suspens
|
|
434
|
+
□ Contexte SmartStack clairement defini
|
|
435
|
+
|
|
436
|
+
### Phase Handoff
|
|
437
|
+
□ Toutes les 11 sections generees
|
|
438
|
+
□ Aucun placeholder {TBD} restant
|
|
439
|
+
□ Permissions completement definies
|
|
440
|
+
□ Integrations SmartStack specifiees
|
|
441
|
+
|
|
442
|
+
### Phase Implementation
|
|
443
|
+
□ 18 taches completees dans prd.json
|
|
444
|
+
□ Backend build OK
|
|
445
|
+
□ Frontend build OK
|
|
446
|
+
□ Tests passent
|
|
447
|
+
□ Migrations EF Core creees
|
|
448
|
+
□ Skills SmartStack executes (si requis)
|
|
449
|
+
|
|
450
|
+
### Phase Documentation
|
|
451
|
+
□ DocumentationPage.tsx genere
|
|
452
|
+
□ i18n 4 langues complete (FR, EN, IT, DE)
|
|
453
|
+
□ Routes ajoutees
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## STEP 8: GENERER LE PROMPT RALPH LOOP
|
|
459
|
+
|
|
460
|
+
### 8.1 Prompt pour Discovery
|
|
461
|
+
|
|
462
|
+
```markdown
|
|
463
|
+
## PROMPT RALPH LOOP - DISCOVERY
|
|
464
|
+
|
|
465
|
+
/ralph-loop "
|
|
466
|
+
Tu es un Business Analyst senior expert SmartStack.
|
|
467
|
+
|
|
468
|
+
CONTEXTE:
|
|
469
|
+
- Feature: {FEATURE_ID}
|
|
470
|
+
- Application: {APP_NAME}
|
|
471
|
+
- Module: {MODULE_NAME}
|
|
472
|
+
- Description: {BESOIN_UTILISATEUR}
|
|
473
|
+
|
|
474
|
+
FICHIERS:
|
|
475
|
+
- prd.json: Liste des sections a completer
|
|
476
|
+
- progress.txt: Memoire des iterations
|
|
477
|
+
|
|
478
|
+
PROCESSUS PAR ITERATION:
|
|
479
|
+
1. Lire prd.json → Trouver section 'passes': false
|
|
480
|
+
2. Lire progress.txt → Comprendre le contexte
|
|
481
|
+
3. Completer UNE section avec questions ULTRATHINK
|
|
482
|
+
4. Mettre a jour 1-discovery.md
|
|
483
|
+
5. Marquer section 'passes': true dans prd.json
|
|
484
|
+
6. Ajouter resume a progress.txt
|
|
485
|
+
|
|
486
|
+
SIGNAL DE FIN:
|
|
487
|
+
Quand TOUTES les sections sont 'passes': true:
|
|
488
|
+
<promise>DISCOVERY_COMPLETE</promise>
|
|
489
|
+
" --completion-promise "DISCOVERY_COMPLETE" --max-iterations 15
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### 8.2 Prompt pour Implementation complete
|
|
493
|
+
|
|
494
|
+
```markdown
|
|
495
|
+
## PROMPT RALPH LOOP - IMPLEMENTATION COMPLETE
|
|
496
|
+
|
|
497
|
+
/ralph-loop "
|
|
498
|
+
Tu es un Developpeur Senior expert SmartStack.
|
|
499
|
+
|
|
500
|
+
FEATURE: {FEATURE_ID}
|
|
501
|
+
HANDOFF: .business-analyse/.../4-development-handoff.md
|
|
502
|
+
|
|
503
|
+
PROCESSUS PAR ITERATION:
|
|
504
|
+
1. Lire prd.json → Prochaine tache 'passes': false
|
|
505
|
+
2. Lire progress.txt → Contexte et decisions
|
|
506
|
+
3. Implementer UNE tache (backend/frontend/test/integration)
|
|
507
|
+
4. git commit avec message conventionnel
|
|
508
|
+
5. Marquer 'passes': true dans prd.json
|
|
509
|
+
6. Documenter dans progress.txt
|
|
510
|
+
|
|
511
|
+
SKILLS SMARTSTACK A EXECUTER (si requis dans handoff section 9):
|
|
512
|
+
- /notification add {config} - Notifications temps reel
|
|
513
|
+
- /workflow create {config} - Workflows automatiques
|
|
514
|
+
- /ai-prompt create {config} - Prompts IA
|
|
515
|
+
|
|
516
|
+
SIGNAL DE FIN:
|
|
517
|
+
Quand TOUTES les 18+ taches sont 'passes': true:
|
|
518
|
+
<promise>FEATURE_COMPLETE</promise>
|
|
519
|
+
" --completion-promise "FEATURE_COMPLETE" --max-iterations 25
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## STEP 9: LANCEMENT AUTOMATIQUE
|
|
525
|
+
|
|
526
|
+
### 9.1 Workflow complet
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
echo "╔══════════════════════════════════════════════════════════════════════════════╗"
|
|
530
|
+
echo "║ LANCEMENT WORKFLOW BA AUTOMATISE ║"
|
|
531
|
+
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
|
|
532
|
+
echo "║ ║"
|
|
533
|
+
echo "║ Feature: ${FEATURE_ID} ║"
|
|
534
|
+
echo "║ Application: ${APP_NAME} ║"
|
|
535
|
+
echo "║ Module: ${MODULE_NAME} ║"
|
|
536
|
+
echo "║ ║"
|
|
537
|
+
echo "║ PHASES A EXECUTER: ║"
|
|
538
|
+
echo "║ 1. Discovery (Ralph Loop: 15 iterations max) ║"
|
|
539
|
+
echo "║ 2. Analysis (BRD generation) ║"
|
|
540
|
+
echo "║ 3. Specification (FRD generation) ║"
|
|
541
|
+
echo "║ 4. Validation (Gate utilisateur) ║"
|
|
542
|
+
echo "║ 5. Handoff (Ralph Loop: 10 iterations max) ║"
|
|
543
|
+
echo "║ 6. Implementation (Ralph Loop: 25 iterations max) ║"
|
|
544
|
+
echo "║ 7. Documentation HTML ║"
|
|
545
|
+
echo "║ ║"
|
|
546
|
+
echo "╚══════════════════════════════════════════════════════════════════════════════╝"
|
|
547
|
+
|
|
548
|
+
# Lancer Phase 1: Init
|
|
549
|
+
/business-analyse:1-init ${APP_NAME} ${MODULE_NAME}
|
|
550
|
+
|
|
551
|
+
# Lancer Phase 2: Discovery avec Ralph Loop
|
|
552
|
+
/ralph-loop "/business-analyse:2-discover ${FEATURE_ID}" \
|
|
553
|
+
--completion-promise "DISCOVERY_COMPLETE" \
|
|
554
|
+
--max-iterations 15
|
|
555
|
+
|
|
556
|
+
# Phases 3-4: Analysis et Specification (sequentielles)
|
|
557
|
+
/business-analyse:3-analyse ${FEATURE_ID}
|
|
558
|
+
/business-analyse:4-specify ${FEATURE_ID}
|
|
559
|
+
|
|
560
|
+
# Phase 5: Validation (GATE OBLIGATOIRE - attend l'utilisateur)
|
|
561
|
+
/business-analyse:5-validate ${FEATURE_ID}
|
|
562
|
+
|
|
563
|
+
# SI APPROVED:
|
|
564
|
+
# Phase 6: Handoff avec Ralph Loop
|
|
565
|
+
/ralph-loop "/business-analyse:6-handoff ${FEATURE_ID}" \
|
|
566
|
+
--completion-promise "HANDOFF_COMPLETE" \
|
|
567
|
+
--max-iterations 10
|
|
568
|
+
|
|
569
|
+
# Phase 7: Implementation avec Ralph Loop
|
|
570
|
+
/ralph-loop "/implement ${FEATURE_ID}" \
|
|
571
|
+
--completion-promise "FEATURE_COMPLETE" \
|
|
572
|
+
--max-iterations 25
|
|
573
|
+
|
|
574
|
+
# Phase 8: Documentation HTML
|
|
575
|
+
/business-analyse:7-doc-html ${FEATURE_ID}
|
|
576
|
+
|
|
577
|
+
echo ""
|
|
578
|
+
echo "╔══════════════════════════════════════════════════════════════════════════════╗"
|
|
579
|
+
echo "║ ✅ FEATURE COMPLETE ║"
|
|
580
|
+
echo "╠══════════════════════════════════════════════════════════════════════════════╣"
|
|
581
|
+
echo "║ ║"
|
|
582
|
+
echo "║ Feature: ${FEATURE_ID} ║"
|
|
583
|
+
echo "║ Backend: Implemente ║"
|
|
584
|
+
echo "║ Frontend: Implemente ║"
|
|
585
|
+
echo "║ Tests: Passes ║"
|
|
586
|
+
echo "║ Documentation: Generee ║"
|
|
587
|
+
echo "║ Integrations SmartStack: Configurees ║"
|
|
588
|
+
echo "║ ║"
|
|
589
|
+
echo "║ PROCHAINES ETAPES: ║"
|
|
590
|
+
echo "║ 1. Revue de code ║"
|
|
591
|
+
echo "║ 2. /gitflow:7-pull-request ║"
|
|
592
|
+
echo "║ 3. Deploy staging ║"
|
|
593
|
+
echo "║ ║"
|
|
594
|
+
echo "╚══════════════════════════════════════════════════════════════════════════════╝"
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## RESUME AUTOMATISATION
|
|
600
|
+
|
|
601
|
+
| Phase | Commande | Ralph Loop | Validation |
|
|
602
|
+
|-------|----------|------------|------------|
|
|
603
|
+
| 0 | `/business-analyse` | Non | MCP Check |
|
|
604
|
+
| 1 | Auto: 1-init | Non | Structure |
|
|
605
|
+
| 2 | Auto: 2-discover | Oui (15 iter) | prd.json 9/9 |
|
|
606
|
+
| 3 | Auto: 3-analyse | Non | BRD complet |
|
|
607
|
+
| 4 | Auto: 4-specify | Non | FRD complet |
|
|
608
|
+
| 5 | GATE: 5-validate | Non | UTILISATEUR |
|
|
609
|
+
| 6 | Auto: 6-handoff | Oui (10 iter) | prd.json 11/11 |
|
|
610
|
+
| 7 | Auto: /implement | Oui (25 iter) | prd.json 18/18 |
|
|
611
|
+
| 8 | Auto: 7-doc-html | Non | React + i18n |
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## FICHIERS CREES PAR CETTE ORCHESTRATION
|
|
616
|
+
|
|
617
|
+
```
|
|
618
|
+
.business-analyse/
|
|
619
|
+
└── business/{app}/modules/{module}/features/{FEAT-XXX}/
|
|
620
|
+
├── context.json ← Contexte SmartStack
|
|
621
|
+
├── .ralph/
|
|
622
|
+
│ ├── discovery/
|
|
623
|
+
│ │ ├── prd.json ← Tracking Discovery
|
|
624
|
+
│ │ └── progress.txt ← Memoire Discovery
|
|
625
|
+
│ ├── handoff/
|
|
626
|
+
│ │ ├── prd.json ← Tracking Handoff
|
|
627
|
+
│ │ └── progress.txt ← Memoire Handoff
|
|
628
|
+
│ └── implement/
|
|
629
|
+
│ ├── prd.json ← Tracking Implementation
|
|
630
|
+
│ └── progress.txt ← Memoire Implementation
|
|
631
|
+
├── 1-discovery.md
|
|
632
|
+
├── 2-business-requirements.md
|
|
633
|
+
├── 3-functional-specification.md
|
|
634
|
+
├── 4-development-handoff.md
|
|
635
|
+
├── validation.json
|
|
636
|
+
└── ralph-prompts/
|
|
637
|
+
├── discovery-prompt.md ← Prompt Ralph Discovery
|
|
638
|
+
├── handoff-prompt.md ← Prompt Ralph Handoff
|
|
639
|
+
└── implement-prompt.md ← Prompt Ralph Implementation
|
|
640
|
+
```
|
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Business Analysis - Complete business analysis workflow (BABOK/IEEE 830)
|
|
3
|
+
argument-hint: "<description du besoin>"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# Business Analysis - Expert Workflow
|
|
6
7
|
|
|
7
8
|
Senior Business Analyst expert. Complete business analysis without writing code.
|
|
8
9
|
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## MODE AUTOMATIQUE (RECOMMANDE)
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
+==============================================================================+
|
|
16
|
+
| /business-analyse "<description du besoin>" |
|
|
17
|
+
| |
|
|
18
|
+
| ORCHESTRE AUTOMATIQUEMENT TOUT LE WORKFLOW: |
|
|
19
|
+
| ├── 1. Verification MCP SmartStack (alerte si absent) |
|
|
20
|
+
| ├── 2. Analyse du contexte (Application/Module/Granularite) |
|
|
21
|
+
| ├── 3. Definition des integrations (Workflows/Notifs/IA) |
|
|
22
|
+
| ├── 4. Creation prd.json + progress.txt (Ralph Loop ready) |
|
|
23
|
+
| ├── 5. Execution phases 1-7 avec Ralph Loop |
|
|
24
|
+
| ├── 6. Validation utilisateur (gate obligatoire) |
|
|
25
|
+
| ├── 7. Implementation avec Ralph Loop |
|
|
26
|
+
| └── 8. Documentation HTML auto-generee |
|
|
27
|
+
| |
|
|
28
|
+
| RESULTAT: Feature complete en ~30 minutes avec validation |
|
|
29
|
+
+==============================================================================+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Usage:**
|
|
33
|
+
```bash
|
|
34
|
+
# Mode automatique complet (RECOMMANDE)
|
|
35
|
+
/business-analyse "Je veux gerer les contacts clients avec import/export"
|
|
36
|
+
|
|
37
|
+
# Mode manuel (phases individuelles)
|
|
38
|
+
/business-analyse:1-init
|
|
39
|
+
/business-analyse:2-discover ...
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
9
44
|
## Philosophy
|
|
10
45
|
|
|
11
46
|
```
|
|
@@ -91,7 +126,9 @@ Examples:
|
|
|
91
126
|
|
|
92
127
|
| Phase | Command | Model | Description | Output |
|
|
93
128
|
|-------|----------|-------|-------------|--------|
|
|
94
|
-
|
|
|
129
|
+
| **AUTO** | **`/business-analyse`** | **opus** | **Orchestration complete automatique** | **Feature complete** |
|
|
130
|
+
| 0 | `/business-analyse:0-orchestrate` | opus | Orchestration manuelle avec questions | context.json, prd.json |
|
|
131
|
+
| 0.5 | *Validation* | - | Context business check (automatic) | Block if not business |
|
|
95
132
|
| 1 | `/business-analyse:1-init` | haiku | Initialize project structure + code scan | `config.json`, structure |
|
|
96
133
|
| 2 | `/business-analyse:2-discover` | **opus** | Requirements elicitation (ultrathink) | `1-discovery.md` |
|
|
97
134
|
| 3 | `/business-analyse:3-analyse` | sonnet | Business analysis BRD + doc scan (ultrathink) | `2-business-requirements.md` |
|
|
@@ -552,8 +589,52 @@ The skill is triggered automatically when user asks about:
|
|
|
552
589
|
|
|
553
590
|
## Next
|
|
554
591
|
|
|
555
|
-
|
|
556
|
-
|
|
592
|
+
**Mode automatique (RECOMMANDE):**
|
|
593
|
+
```bash
|
|
594
|
+
/business-analyse "Description de votre besoin"
|
|
557
595
|
```
|
|
596
|
+
|
|
597
|
+
**Mode manuel:**
|
|
598
|
+
```bash
|
|
558
599
|
/business-analyse:1-init
|
|
559
600
|
```
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
## EXECUTION AUTOMATIQUE
|
|
605
|
+
|
|
606
|
+
Si cette commande est appelee avec un argument (description du besoin):
|
|
607
|
+
|
|
608
|
+
```
|
|
609
|
+
ARGUMENTS = "$ARGUMENTS"
|
|
610
|
+
|
|
611
|
+
SI ARGUMENTS non vide:
|
|
612
|
+
→ Executer /business-analyse:0-orchestrate $ARGUMENTS
|
|
613
|
+
→ Le workflow complet est lance automatiquement
|
|
614
|
+
|
|
615
|
+
SINON:
|
|
616
|
+
→ Afficher ce fichier d'aide
|
|
617
|
+
→ Proposer les options
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
**Lancer le mode automatique maintenant:**
|
|
621
|
+
|
|
622
|
+
```javascript
|
|
623
|
+
if (ARGUMENTS && ARGUMENTS.trim().length > 0) {
|
|
624
|
+
// Mode automatique - lancer l'orchestration
|
|
625
|
+
execute("/business-analyse:0-orchestrate " + ARGUMENTS);
|
|
626
|
+
} else {
|
|
627
|
+
// Mode manuel - afficher l'aide et proposer les options
|
|
628
|
+
AskUserQuestion({
|
|
629
|
+
questions: [{
|
|
630
|
+
question: "Comment souhaitez-vous proceder?",
|
|
631
|
+
header: "Mode",
|
|
632
|
+
options: [
|
|
633
|
+
{ label: "Mode automatique (Recommande)", description: "Orchestration complete avec Ralph Loop" },
|
|
634
|
+
{ label: "Mode manuel", description: "Executer les phases une par une" }
|
|
635
|
+
],
|
|
636
|
+
multiSelect: false
|
|
637
|
+
}]
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
```
|