@atlashub/smartstack-cli 1.5.1 → 1.5.2
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/css/styles.css +2168 -2168
- package/.documentation/js/app.js +794 -794
- package/config/default-config.json +86 -86
- package/config/settings.json +53 -53
- package/config/settings.local.example.json +16 -16
- package/dist/index.js +0 -0
- package/dist/index.js.map +1 -1
- package/package.json +88 -88
- package/templates/agents/action.md +36 -36
- package/templates/agents/efcore/conflicts.md +84 -84
- package/templates/agents/efcore/db-deploy.md +51 -51
- package/templates/agents/efcore/db-reset.md +59 -59
- package/templates/agents/efcore/db-seed.md +56 -56
- package/templates/agents/efcore/db-status.md +64 -64
- package/templates/agents/efcore/migration.md +85 -85
- package/templates/agents/efcore/rebase-snapshot.md +62 -62
- package/templates/agents/efcore/scan.md +90 -90
- package/templates/agents/efcore/squash.md +67 -67
- package/templates/agents/explore-codebase.md +65 -65
- package/templates/agents/explore-docs.md +97 -97
- package/templates/agents/fix-grammar.md +49 -49
- package/templates/agents/gitflow/abort.md +45 -45
- package/templates/agents/gitflow/cleanup.md +85 -85
- package/templates/agents/gitflow/commit.md +40 -40
- package/templates/agents/gitflow/exec.md +48 -48
- package/templates/agents/gitflow/finish.md +92 -92
- package/templates/agents/gitflow/init.md +139 -139
- package/templates/agents/gitflow/merge.md +62 -62
- package/templates/agents/gitflow/plan.md +42 -42
- package/templates/agents/gitflow/pr.md +78 -78
- package/templates/agents/gitflow/review.md +49 -49
- package/templates/agents/gitflow/start.md +61 -61
- package/templates/agents/gitflow/status.md +32 -32
- package/templates/agents/snipper.md +36 -36
- package/templates/agents/websearch.md +46 -46
- package/templates/commands/_resources/formatting-guide.md +124 -124
- package/templates/commands/ai-prompt.md +315 -315
- package/templates/commands/apex/1-analyze.md +100 -100
- package/templates/commands/apex/2-plan.md +145 -145
- package/templates/commands/apex/3-execute.md +171 -171
- package/templates/commands/apex/4-examine.md +116 -116
- package/templates/commands/apex/5-tasks.md +209 -209
- package/templates/commands/apex.md +76 -76
- package/templates/commands/application/create.md +362 -362
- package/templates/commands/application/templates-backend.md +463 -463
- package/templates/commands/application/templates-frontend.md +517 -517
- package/templates/commands/application/templates-i18n.md +478 -478
- package/templates/commands/application/templates-seed.md +362 -362
- package/templates/commands/application.md +303 -303
- package/templates/commands/business-analyse/0-orchestrate.md +640 -640
- package/templates/commands/business-analyse/1-init.md +269 -269
- package/templates/commands/business-analyse/2-discover.md +520 -520
- package/templates/commands/business-analyse/3-analyse.md +408 -408
- package/templates/commands/business-analyse/4-specify.md +598 -598
- package/templates/commands/business-analyse/5-validate.md +326 -326
- package/templates/commands/business-analyse/6-handoff.md +746 -746
- package/templates/commands/business-analyse/7-doc-html.md +602 -602
- package/templates/commands/business-analyse/bug.md +325 -325
- package/templates/commands/business-analyse/change-request.md +368 -368
- package/templates/commands/business-analyse/hotfix.md +200 -200
- package/templates/commands/business-analyse.md +640 -640
- package/templates/commands/controller/create.md +216 -216
- package/templates/commands/controller/postman-templates.md +528 -528
- package/templates/commands/controller/templates.md +600 -600
- package/templates/commands/controller.md +337 -337
- package/templates/commands/create/agent.md +138 -138
- package/templates/commands/create/command.md +166 -166
- package/templates/commands/create/hook.md +234 -234
- package/templates/commands/create/plugin.md +329 -329
- package/templates/commands/create/project.md +507 -507
- package/templates/commands/create/skill.md +199 -199
- package/templates/commands/create.md +220 -220
- package/templates/commands/debug.md +95 -95
- package/templates/commands/documentation/module.md +202 -202
- package/templates/commands/documentation/templates.md +432 -432
- package/templates/commands/documentation.md +190 -190
- package/templates/commands/efcore/_env-check.md +153 -153
- package/templates/commands/efcore/conflicts.md +186 -186
- package/templates/commands/efcore/db-deploy.md +193 -193
- package/templates/commands/efcore/db-reset.md +426 -426
- package/templates/commands/efcore/db-seed.md +326 -326
- package/templates/commands/efcore/db-status.md +226 -226
- package/templates/commands/efcore/migration.md +400 -400
- package/templates/commands/efcore/rebase-snapshot.md +264 -264
- package/templates/commands/efcore/scan.md +198 -198
- package/templates/commands/efcore/squash.md +298 -298
- package/templates/commands/efcore.md +224 -224
- package/templates/commands/epct.md +69 -69
- package/templates/commands/explain.md +186 -186
- package/templates/commands/explore.md +45 -45
- package/templates/commands/feature-full.md +267 -267
- package/templates/commands/gitflow/1-init.md +1038 -1038
- package/templates/commands/gitflow/10-start.md +768 -768
- package/templates/commands/gitflow/11-finish.md +457 -457
- package/templates/commands/gitflow/12-cleanup.md +276 -276
- package/templates/commands/gitflow/13-sync.md +216 -216
- package/templates/commands/gitflow/14-rebase.md +251 -251
- package/templates/commands/gitflow/2-status.md +277 -277
- package/templates/commands/gitflow/3-commit.md +344 -344
- package/templates/commands/gitflow/4-plan.md +145 -145
- package/templates/commands/gitflow/5-exec.md +147 -147
- package/templates/commands/gitflow/6-abort.md +344 -344
- package/templates/commands/gitflow/7-pull-request.md +453 -355
- package/templates/commands/gitflow/8-review.md +240 -176
- package/templates/commands/gitflow/9-merge.md +451 -365
- package/templates/commands/gitflow.md +128 -128
- package/templates/commands/implement.md +663 -663
- package/templates/commands/init.md +567 -567
- package/templates/commands/mcp-integration.md +330 -330
- package/templates/commands/notification.md +129 -129
- package/templates/commands/oneshot.md +57 -57
- package/templates/commands/quick-search.md +72 -72
- package/templates/commands/ralph-loop/cancel-ralph.md +18 -18
- package/templates/commands/ralph-loop/help.md +126 -126
- package/templates/commands/ralph-loop/ralph-loop.md +18 -18
- package/templates/commands/review.md +106 -106
- package/templates/commands/utils/test-web-config.md +160 -160
- package/templates/commands/utils/test-web.md +151 -151
- package/templates/commands/validate.md +233 -233
- package/templates/commands/workflow.md +193 -193
- package/templates/gitflow/config.json +138 -138
- package/templates/hooks/ef-migration-check.md +139 -139
- package/templates/hooks/hooks.json +25 -25
- package/templates/hooks/stop-hook.sh +177 -177
- package/templates/skills/ai-prompt/SKILL.md +778 -778
- package/templates/skills/application/SKILL.md +563 -563
- package/templates/skills/application/templates-backend.md +450 -450
- package/templates/skills/application/templates-frontend.md +531 -531
- package/templates/skills/application/templates-i18n.md +520 -520
- package/templates/skills/application/templates-seed.md +647 -647
- package/templates/skills/business-analyse/SKILL.md +191 -191
- package/templates/skills/business-analyse/questionnaire.md +283 -283
- package/templates/skills/business-analyse/templates-frd.md +477 -477
- package/templates/skills/business-analyse/templates-react.md +580 -580
- package/templates/skills/controller/SKILL.md +240 -240
- package/templates/skills/controller/postman-templates.md +614 -614
- package/templates/skills/controller/templates.md +1468 -1468
- package/templates/skills/documentation/SKILL.md +133 -133
- package/templates/skills/documentation/templates.md +476 -476
- package/templates/skills/feature-full/SKILL.md +838 -838
- package/templates/skills/notification/SKILL.md +555 -555
- package/templates/skills/ui-components/SKILL.md +870 -870
- package/templates/skills/workflow/SKILL.md +582 -582
- package/templates/test-web/api-health.json +38 -38
- package/templates/test-web/minimal.json +19 -19
- package/templates/test-web/npm-package.json +46 -46
- package/templates/test-web/seo-check.json +54 -54
|
@@ -1,640 +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
|
+
---
|
|
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
|
+
```
|