@atlashub/smartstack-cli 1.11.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.documentation/agents.html +7 -2
  2. package/.documentation/apex.html +7 -2
  3. package/.documentation/business-analyse.html +7 -2
  4. package/.documentation/cli-commands.html +871 -0
  5. package/.documentation/commands.html +7 -2
  6. package/.documentation/efcore.html +7 -2
  7. package/.documentation/gitflow.html +7 -2
  8. package/.documentation/hooks.html +7 -2
  9. package/.documentation/index.html +7 -2
  10. package/.documentation/init.html +7 -2
  11. package/.documentation/installation.html +7 -2
  12. package/.documentation/ralph-loop.html +7 -2
  13. package/.documentation/test-web.html +7 -2
  14. package/dist/index.js +1932 -336
  15. package/dist/index.js.map +1 -1
  16. package/package.json +8 -2
  17. package/templates/agents/efcore/squash.md +67 -31
  18. package/templates/agents/gitflow/finish.md +68 -56
  19. package/templates/commands/business-analyse/0-orchestrate.md +72 -556
  20. package/templates/commands/business-analyse/1-init.md +23 -193
  21. package/templates/commands/business-analyse/2-discover.md +85 -462
  22. package/templates/commands/business-analyse/3-analyse.md +40 -342
  23. package/templates/commands/business-analyse/4-specify.md +72 -537
  24. package/templates/commands/business-analyse/5-validate.md +43 -237
  25. package/templates/commands/business-analyse/6-handoff.md +93 -682
  26. package/templates/commands/business-analyse/7-doc-html.md +45 -544
  27. package/templates/commands/business-analyse/_shared.md +176 -0
  28. package/templates/commands/business-analyse/bug.md +50 -257
  29. package/templates/commands/business-analyse/change-request.md +59 -283
  30. package/templates/commands/business-analyse/hotfix.md +36 -120
  31. package/templates/commands/business-analyse.md +55 -574
  32. package/templates/commands/efcore/_shared.md +206 -0
  33. package/templates/commands/efcore/conflicts.md +39 -201
  34. package/templates/commands/efcore/db-deploy.md +28 -237
  35. package/templates/commands/efcore/db-reset.md +41 -390
  36. package/templates/commands/efcore/db-seed.md +44 -323
  37. package/templates/commands/efcore/db-status.md +31 -210
  38. package/templates/commands/efcore/migration.md +45 -368
  39. package/templates/commands/efcore/rebase-snapshot.md +38 -241
  40. package/templates/commands/efcore/scan.md +35 -204
  41. package/templates/commands/efcore/squash.md +158 -251
  42. package/templates/commands/efcore.md +49 -177
  43. package/templates/commands/gitflow/1-init.md +94 -1318
  44. package/templates/commands/gitflow/10-start.md +86 -990
  45. package/templates/commands/gitflow/11-finish.md +264 -454
  46. package/templates/commands/gitflow/12-cleanup.md +40 -213
  47. package/templates/commands/gitflow/2-status.md +51 -386
  48. package/templates/commands/gitflow/3-commit.md +108 -801
  49. package/templates/commands/gitflow/4-plan.md +42 -13
  50. package/templates/commands/gitflow/5-exec.md +60 -5
  51. package/templates/commands/gitflow/6-abort.md +54 -277
  52. package/templates/commands/gitflow/7-pull-request.md +74 -717
  53. package/templates/commands/gitflow/8-review.md +51 -178
  54. package/templates/commands/gitflow/9-merge.md +74 -404
  55. package/templates/commands/gitflow/_shared.md +196 -0
  56. package/templates/commands/quickstart.md +154 -0
  57. package/templates/commands/ralph-loop/ralph-loop.md +104 -2
  58. package/templates/hooks/hooks.json +13 -0
  59. package/templates/hooks/ralph-mcp-logger.sh +46 -0
  60. package/templates/hooks/ralph-session-end.sh +69 -0
  61. package/templates/ralph/README.md +91 -0
  62. package/templates/ralph/ralph.config.yaml +113 -0
  63. package/templates/scripts/setup-ralph-loop.sh +173 -0
  64. package/templates/skills/_shared.md +117 -0
  65. package/templates/skills/ai-prompt/SKILL.md +87 -654
  66. package/templates/skills/application/SKILL.md +76 -499
  67. package/templates/skills/controller/SKILL.md +38 -165
  68. package/templates/skills/documentation/SKILL.md +2 -1
  69. package/templates/skills/feature-full/SKILL.md +107 -732
  70. package/templates/skills/notification/SKILL.md +85 -474
  71. package/templates/skills/ui-components/SKILL.md +62 -762
  72. package/templates/skills/workflow/SKILL.md +85 -489
  73. package/templates/commands/gitflow/rescue.md +0 -867
  74. package/templates/skills/business-analyse/SKILL.md +0 -191
@@ -4,637 +4,153 @@ argument-hint: "<description du besoin>"
4
4
  model: opus
5
5
  ---
6
6
 
7
- # Phase 0: Orchestration Automatique Business Analyse
7
+ # Phase 0: Orchestration Automatique
8
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
9
+ > **Ref:** Fonctions communes dans [_shared.md](_shared.md)
12
10
 
13
11
  ---
14
12
 
15
- ## MISSION
13
+ ## Mission
16
14
 
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
- ```
15
+ Orchestrer automatiquement: Besoin → Phases 1-7 → Implementation → Documentation HTML
45
16
 
46
17
  ---
47
18
 
48
- ## STEP 0: VERIFICATION MCP SMARTSTACK (CRITIQUE)
19
+ ## Step 0: Vérification MCP
49
20
 
50
21
  ```bash
51
- # Verifier la presence du MCP SmartStack
52
22
  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
23
+ [ -z "$MCP_CHECK" ] && echo "⚠️ MCP SmartStack non détecté - fonctionnalités limitées"
80
24
  ```
81
25
 
82
26
  ---
83
27
 
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
- ```
28
+ ## Step 1: Collecter le besoin
93
29
 
94
30
  ```javascript
95
31
  AskUserQuestion({
96
32
  questions: [{
97
- question: "Decrivez votre besoin en une phrase claire",
33
+ question: "Décrivez votre besoin",
98
34
  header: "Besoin",
99
35
  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" }
36
+ { label: "Nouvelle fonctionnalité", description: "Capacité métier" },
37
+ { label: "Amélioration", description: "Enrichir existant" },
38
+ { label: "Intégration", description: "Connecter système externe" }
103
39
  ],
104
40
  multiSelect: false
105
41
  }]
106
42
  })
107
43
  ```
108
44
 
109
- ### 1.2 Determiner le contexte SmartStack
110
-
111
- **ULTRATHINK: Analyser le besoin pour determiner:**
45
+ ---
112
46
 
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 |
47
+ ## Step 2: Déterminer contexte SmartStack
118
48
 
119
49
  ```javascript
120
50
  AskUserQuestion({
121
51
  questions: [
122
52
  {
123
- question: "Dans quelle application SmartStack?",
53
+ question: "Quelle application SmartStack?",
124
54
  header: "Application",
125
55
  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" }
56
+ { label: "CRM", description: "Relation client" },
57
+ { label: "Inventory", description: "Stocks" },
58
+ { label: "HR", description: "RH" },
59
+ { label: "Nouvelle", description: "Créer app" }
60
+ ],
61
+ multiSelect: false
62
+ },
63
+ {
64
+ question: "Niveau de granularité?",
65
+ header: "Niveau",
66
+ options: [
67
+ { label: "Muscle", description: "Fonctionnalité complète CRUD + UI" },
68
+ { label: "Section", description: "Sous-fonctionnalité" },
69
+ { label: "Resource", description: "Élément atomique" }
130
70
  ],
131
71
  multiSelect: false
132
72
  }
133
73
  ]
134
74
  })
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
75
  ```
240
76
 
241
77
  ---
242
78
 
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
79
+ ## Step 3: Intégrations SmartStack
282
80
 
283
81
  ```javascript
284
82
  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
- }]
83
+ questions: [
84
+ {
85
+ question: "Workflows automatiques?",
86
+ header: "Workflows",
87
+ options: [
88
+ { label: "Email", description: "Envoi sur événements" },
89
+ { label: "Rappels/SLA", description: "Notifications délais" },
90
+ { label: "Approbation", description: "Circuit validation" },
91
+ { label: "Aucun", description: "Pas de workflow" }
92
+ ],
93
+ multiSelect: true
94
+ },
95
+ {
96
+ question: "Notifications temps réel?",
97
+ header: "Notifs",
98
+ options: [
99
+ { label: "Création", description: "Nouvel élément" },
100
+ { label: "Modification", description: "Changements" },
101
+ { label: "Assignation", description: "Nouvel assigné" },
102
+ { label: "Aucune", description: "Pas de notif" }
103
+ ],
104
+ multiSelect: true
105
+ }
106
+ ]
296
107
  })
297
108
  ```
298
109
 
299
110
  ---
300
111
 
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
112
+ ## Step 4: Générer context.json
316
113
 
317
114
  ```json
318
115
  {
319
116
  "feature_id": "{FEATURE_ID}",
320
- "created_at": "{timestamp}",
321
- "mcp_available": "{true/false}",
322
-
323
117
  "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}"]
118
+ "application": "{APP}",
119
+ "module": "{MODULE}",
120
+ "granularity": "{muscle|section|resource}"
336
121
  },
337
-
338
122
  "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"
123
+ "workflows": { "types": [] },
124
+ "notifications": { "events": [] },
125
+ "ai": { "use_cases": [] }
358
126
  }
359
127
  }
360
128
  ```
361
129
 
362
130
  ---
363
131
 
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
132
+ ## Step 5: Lancement séquentiel
527
133
 
528
134
  ```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)
135
+ /business-analyse:1-init ${APP} ${MODULE}
136
+ /business-analyse:2-discover ${FEATURE_ID}
557
137
  /business-analyse:3-analyse ${FEATURE_ID}
558
138
  /business-analyse:4-specify ${FEATURE_ID}
559
-
560
- # Phase 5: Validation (GATE OBLIGATOIRE - attend l'utilisateur)
561
139
  /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
140
+ # Si APPROVED:
141
+ /business-analyse:6-handoff ${FEATURE_ID}
142
+ /implement ${FEATURE_ID}
575
143
  /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
144
  ```
596
145
 
597
146
  ---
598
147
 
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
148
+ ## Résumé
616
149
 
617
150
  ```
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
151
+ ORCHESTRATION - {FEATURE_ID}
152
+ ├── Application: {APP}
153
+ ├── Module: {MODULE}
154
+ ├── Intégrations: {workflows|notifs|ai}
155
+ └── Prochain: Phases 1-7 automatiques
640
156
  ```