@atlashub/smartstack-cli 3.32.0 → 3.34.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.
Files changed (55) hide show
  1. package/.documentation/agents.html +5 -1
  2. package/.documentation/apex.html +644 -0
  3. package/.documentation/business-analyse.html +81 -1
  4. package/.documentation/cli-commands.html +5 -1
  5. package/.documentation/commands.html +5 -1
  6. package/.documentation/efcore.html +5 -1
  7. package/.documentation/gitflow.html +5 -1
  8. package/.documentation/hooks.html +5 -1
  9. package/.documentation/index.html +60 -2
  10. package/.documentation/init.html +5 -1
  11. package/.documentation/installation.html +5 -1
  12. package/.documentation/ralph-loop.html +365 -216
  13. package/.documentation/test-web.html +5 -1
  14. package/package.json +1 -1
  15. package/templates/agents/ba-writer.md +142 -15
  16. package/templates/skills/apex/SKILL.md +7 -1
  17. package/templates/skills/apex/_shared.md +49 -4
  18. package/templates/skills/{ralph-loop → apex}/references/core-seed-data.md +20 -11
  19. package/templates/skills/{ralph-loop → apex}/references/error-classification.md +2 -1
  20. package/templates/skills/apex/references/post-checks.md +238 -3
  21. package/templates/skills/apex/references/smartstack-api.md +47 -7
  22. package/templates/skills/apex/references/smartstack-frontend.md +47 -1
  23. package/templates/skills/apex/references/smartstack-layers.md +3 -1
  24. package/templates/skills/apex/steps/step-00-init.md +48 -1
  25. package/templates/skills/apex/steps/step-01-analyze.md +37 -0
  26. package/templates/skills/apex/steps/step-02-plan.md +36 -0
  27. package/templates/skills/apex/steps/step-03-execute.md +42 -2
  28. package/templates/skills/apex/steps/step-04-examine.md +110 -2
  29. package/templates/skills/business-analyse/SKILL.md +29 -19
  30. package/templates/skills/business-analyse/_module-loop.md +68 -9
  31. package/templates/skills/business-analyse/_shared.md +71 -21
  32. package/templates/skills/business-analyse/questionnaire/00-application.md +4 -2
  33. package/templates/skills/business-analyse/questionnaire/00b-project.md +85 -0
  34. package/templates/skills/business-analyse/references/deploy-modes.md +69 -0
  35. package/templates/skills/business-analyse/references/team-orchestration.md +158 -7
  36. package/templates/skills/business-analyse/schemas/application-schema.json +2 -1
  37. package/templates/skills/business-analyse/schemas/project-schema.json +490 -0
  38. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -1
  39. package/templates/skills/business-analyse/steps/step-00-init.md +30 -4
  40. package/templates/skills/business-analyse/steps/step-01-cadrage.md +62 -2
  41. package/templates/skills/business-analyse/steps/step-01b-applications.md +252 -0
  42. package/templates/skills/business-analyse/steps/step-02-decomposition.md +23 -6
  43. package/templates/skills/business-analyse/steps/step-03d-validate.md +27 -6
  44. package/templates/skills/business-analyse/steps/step-04a-collect.md +111 -0
  45. package/templates/skills/business-analyse/steps/step-05a-handoff.md +296 -103
  46. package/templates/skills/business-analyse/steps/step-05b-deploy.md +46 -14
  47. package/templates/skills/documentation/SKILL.md +92 -2
  48. package/templates/skills/ralph-loop/SKILL.md +9 -17
  49. package/templates/skills/ralph-loop/references/category-rules.md +43 -692
  50. package/templates/skills/ralph-loop/references/compact-loop.md +104 -427
  51. package/templates/skills/ralph-loop/references/team-orchestration.md +13 -14
  52. package/templates/skills/ralph-loop/steps/step-02-execute.md +49 -704
  53. package/templates/skills/ralph-loop/steps/step-03-commit.md +38 -79
  54. package/templates/skills/ralph-loop/steps/step-04-check.md +39 -58
  55. package/templates/skills/ralph-loop/steps/step-05-report.md +12 -123
@@ -12,7 +12,7 @@
12
12
  <header class="global-header">
13
13
  <div class="logo">SS</div>
14
14
  <span class="site-title">SmartStack CLI</span>
15
- <span class="version-badge">v3.0.0</span>
15
+ <span class="version-badge">v3.34.0</span>
16
16
  <div class="header-divider"></div>
17
17
  <span class="page-title">Ralph Loop</span>
18
18
  <nav class="breadcrumb">
@@ -94,25 +94,29 @@
94
94
  </a>
95
95
  <nav class="sidebar-toc">
96
96
  <a href="#introduction" class="sidebar-toc-link">Introduction</a>
97
- <a href="#concept" class="sidebar-toc-link">
98
- <span data-lang="fr">Concept</span>
99
- <span data-lang="en">Concept</span>
97
+ <a href="#architecture" class="sidebar-toc-link">
98
+ <span data-lang="fr">Architecture</span>
99
+ <span data-lang="en">Architecture</span>
100
100
  </a>
101
101
  <a href="#commands" class="sidebar-toc-link">
102
102
  <span data-lang="fr">Commandes</span>
103
103
  <span data-lang="en">Commands</span>
104
104
  </a>
105
- <a href="#completion-promise" class="sidebar-toc-link">Completion Promise</a>
106
- <a href="#examples" class="sidebar-toc-link">
107
- <span data-lang="fr">Exemples</span>
108
- <span data-lang="en">Examples</span>
105
+ <a href="#workflow" class="sidebar-toc-link">
106
+ <span data-lang="fr">Workflow</span>
107
+ <span data-lang="en">Workflow</span>
109
108
  </a>
109
+ <a href="#file-structure" class="sidebar-toc-link">File Structure</a>
110
110
  <a href="#when-to-use" class="sidebar-toc-link">
111
111
  <span data-lang="fr">Quand utiliser</span>
112
112
  <span data-lang="en">When to use</span>
113
113
  </a>
114
114
  </nav>
115
115
  </div>
116
+ <a href="apex.html" class="nav-item">
117
+ <span class="icon">&#9881;</span>
118
+ <span class="nav-text">APEX</span>
119
+ </a>
116
120
  </div>
117
121
 
118
122
  <div class="nav-section">
@@ -154,108 +158,214 @@
154
158
  <section id="introduction">
155
159
  <h2>Introduction</h2>
156
160
  <p data-lang="fr">
157
- <strong>Ralph Loop</strong> implemente la technique Ralph Wiggum - une methodologie de developpement iteratif basee sur des boucles IA continues, inventee par Geoffrey Huntley.
161
+ <strong>Ralph Loop</strong> est un orchestrateur pur qui pilote le processus de developpement iteratif depuis des specifications (PRDs) jusqu'a la livraison du code.
158
162
  </p>
159
163
  <p data-lang="en">
160
- <strong>Ralph Loop</strong> implements the Ralph Wiggum technique - an iterative development methodology based on continuous AI loops, pioneered by Geoffrey Huntley.
164
+ <strong>Ralph Loop</strong> is a pure orchestrator that drives iterative development from specifications (PRDs) to code delivery.
161
165
  </p>
162
166
 
163
167
  <div class="alert alert-info">
164
168
  <span class="alert-icon">&#128260;</span>
165
169
  <div class="alert-content">
166
- <h5 data-lang="fr">Principe fondamental</h5>
167
- <h5 data-lang="en">Core Principle</h5>
170
+ <h5 data-lang="fr">Architecture de delegation</h5>
171
+ <h5 data-lang="en">Delegation Architecture</h5>
168
172
  <p data-lang="fr">
169
- Le meme prompt est envoye a Claude de maniere repetee. L'aspect "auto-referentiel" vient du fait que Claude voit son propre travail precedent dans les fichiers et l'historique git.
173
+ Ralph Load ne genere JAMAIS du code. Il:
170
174
  </p>
171
175
  <p data-lang="en">
172
- The same prompt is fed to Claude repeatedly. The "self-referential" aspect comes from Claude seeing its own previous work in the files and git history.
176
+ Ralph Loop NEVER generates code. It:
173
177
  </p>
178
+ <ul style="margin-top: 10px;">
179
+ <li data-lang="fr">Lit les PRDs depuis le handoff Business Analyse</li>
180
+ <li data-lang="en">Reads PRDs from Business Analyse handoff</li>
181
+ <li data-lang="fr">Resout les dependances et ordonne les modules</li>
182
+ <li data-lang="en">Resolves dependencies and module ordering</li>
183
+ <li data-lang="fr">Delegue TOUT generation de code a `/apex -d`</li>
184
+ <li data-lang="en">Delegates ALL code generation to `/apex -d`</li>
185
+ <li data-lang="fr">Suit la progression, valide les resultats, genere des rapports</li>
186
+ <li data-lang="en">Tracks progress, validates results, generates reports</li>
187
+ </ul>
174
188
  </div>
175
189
  </div>
176
190
 
177
- <div class="alert alert-warning">
178
- <span class="alert-icon">&#9888;</span>
191
+ <div class="alert alert-success">
192
+ <span class="alert-icon">&#128160;</span>
179
193
  <div class="alert-content">
180
- <h5 data-lang="fr">Determinisme</h5>
181
- <h5 data-lang="en">Determinism</h5>
194
+ <h5 data-lang="fr">Execution garantie</h5>
195
+ <h5 data-lang="en">Execution Guarantee</h5>
182
196
  <p data-lang="fr">
183
- La technique est decrite comme "deterministically bad in an undeterministic world" - les echecs sont previsibles, permettant une amelioration systematique par ajustement des prompts.
197
+ Ralph Loop execute TOUTES les taches du debut a la fin sans interaction utilisateur. Il s'arrete seulement quand: toutes les taches sont completes, le max d'iterations est atteint, une impasse, ou Ctrl+C.
184
198
  </p>
185
199
  <p data-lang="en">
186
- The technique is described as "deterministically bad in an undeterministic world" - failures are predictable, enabling systematic improvement through prompt tuning.
200
+ Ralph Loop executes ALL tasks from start to finish with no user interaction. It stops only when: all tasks complete, max iterations reached, dead-end, or Ctrl+C.
187
201
  </p>
188
202
  </div>
189
203
  </div>
190
204
  </section>
191
205
 
192
- <!-- Concept -->
193
- <section id="concept">
206
+ <!-- Architecture -->
207
+ <section id="architecture">
194
208
  <h2>
195
- <span data-lang="fr">Concept</span>
196
- <span data-lang="en">Concept</span>
209
+ <span data-lang="fr">Architecture</span>
210
+ <span data-lang="en">Architecture</span>
197
211
  </h2>
198
212
 
199
- <h4 data-lang="fr">Chaque iteration</h4>
200
- <h4 data-lang="en">Each iteration</h4>
213
+ <h4 data-lang="fr">6 Etapes</h4>
214
+ <h4 data-lang="en">6 Steps</h4>
201
215
 
202
- <ol>
203
- <li data-lang="fr">Claude recoit le MEME prompt</li>
204
- <li data-lang="en">Claude receives the SAME prompt</li>
205
- <li data-lang="fr">Travaille sur la tache, modifie les fichiers</li>
206
- <li data-lang="en">Works on the task, modifying files</li>
207
- <li data-lang="fr">Essaie de quitter</li>
208
- <li data-lang="en">Tries to exit</li>
209
- <li data-lang="fr">Le Stop hook intercepte et renvoie le meme prompt</li>
210
- <li data-lang="en">Stop hook intercepts and feeds the same prompt again</li>
211
- <li data-lang="fr">Claude voit son travail precedent dans les fichiers</li>
212
- <li data-lang="en">Claude sees its previous work in the files</li>
213
- <li data-lang="fr">Ameliore iterativement jusqu'a completion</li>
214
- <li data-lang="en">Iteratively improves until completion</li>
215
- </ol>
216
+ <div class="table-container">
217
+ <table class="reference-table">
218
+ <thead>
219
+ <tr>
220
+ <th data-lang="fr">Etape</th>
221
+ <th data-lang="en">Step</th>
222
+ <th data-lang="fr">Description</th>
223
+ <th data-lang="en">Description</th>
224
+ </tr>
225
+ </thead>
226
+ <tbody>
227
+ <tr>
228
+ <td><strong>00 - Init</strong></td>
229
+ <td><strong>00 - Init</strong></td>
230
+ <td data-lang="fr">Parse args (-m N, -c TEXT, -v, -r), verifie MCP, setup .ralph/, detecte multi-module</td>
231
+ <td data-lang="en">Parse args (-m N, -c TEXT, -v, -r), verify MCP, setup .ralph/, detect multi-module</td>
232
+ </tr>
233
+ <tr>
234
+ <td><strong>01 - Task Loading</strong></td>
235
+ <td><strong>01 - Task Loading</strong></td>
236
+ <td data-lang="fr">Charge/cree les taches depuis prd.json (format v3 unifie avec pre-calcul des taches)</td>
237
+ <td data-lang="en">Load/create tasks from prd.json (unified v3 format with pre-computed tasks)</td>
238
+ </tr>
239
+ <tr>
240
+ <td><strong>02 - Execute</strong></td>
241
+ <td><strong>02 - Execute</strong></td>
242
+ <td data-lang="fr">Delegue le module a `/apex -d .ralph/prd.json` (mode delegation)</td>
243
+ <td data-lang="en">Delegate module to `/apex -d .ralph/prd.json` (delegate mode)</td>
244
+ </tr>
245
+ <tr>
246
+ <td><strong>03 - Commit</strong></td>
247
+ <td><strong>03 - Commit</strong></td>
248
+ <td data-lang="fr">Valide changements, commit git, update prd.json/progress.txt</td>
249
+ <td data-lang="en">Validate changes, git commit, update prd.json/progress.txt</td>
250
+ </tr>
251
+ <tr>
252
+ <td><strong>04 - Check</strong></td>
253
+ <td><strong>04 - Check</strong></td>
254
+ <td data-lang="fr">Verifie completion, entre en COMPACT LOOP (voir compact-loop.md)</td>
255
+ <td data-lang="en">Check completion, enter COMPACT LOOP (see compact-loop.md)</td>
256
+ </tr>
257
+ <tr>
258
+ <td><strong>05 - Report</strong></td>
259
+ <td><strong>05 - Report</strong></td>
260
+ <td data-lang="fr">Genere rapports finaux dans .ralph/reports/</td>
261
+ <td data-lang="en">Generate final reports in .ralph/reports/</td>
262
+ </tr>
263
+ </tbody>
264
+ </table>
265
+ </div>
266
+
267
+ <h4 data-lang="fr">Delegation flow</h4>
268
+ <h4 data-lang="en">Delegation flow</h4>
216
269
 
217
270
  <div class="svg-diagram">
218
- <svg viewBox="0 0 600 300" xmlns="http://www.w3.org/2000/svg" style="font-family: 'Inter', system-ui, sans-serif;">
271
+ <svg viewBox="0 0 700 350" xmlns="http://www.w3.org/2000/svg" style="font-family: 'Inter', system-ui, sans-serif;">
219
272
  <defs>
220
- <marker id="arrowRalph" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
221
- <polygon points="0 0, 10 3.5, 0 7" fill="#0d9488"/>
273
+ <marker id="arrowFlow" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
274
+ <polygon points="0 0, 10 3.5, 0 7" fill="#3b82f6"/>
275
+ </marker>
276
+ <marker id="arrowApex" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
277
+ <polygon points="0 0, 10 3.5, 0 7" fill="#8b5cf6"/>
222
278
  </marker>
223
279
  </defs>
224
280
 
225
- <!-- Loop circle -->
226
- <circle cx="300" cy="150" r="100" fill="none" stroke="#0d9488" stroke-width="3" stroke-dasharray="10,5"/>
281
+ <!-- Ralph Loop Box -->
282
+ <rect x="20" y="50" width="160" height="250" rx="8" fill="#f0f9ff" stroke="#3b82f6" stroke-width="2" stroke-dasharray="5,5"/>
283
+ <text x="100" y="75" text-anchor="middle" fill="#1e40af" font-size="13" font-weight="700">Ralph Loop</text>
284
+ <text x="100" y="92" text-anchor="middle" fill="#1e40af" font-size="11">(Orchestrator)</text>
285
+
286
+ <!-- Ralph steps -->
287
+ <rect x="30" y="105" width="140" height="35" rx="4" fill="#dbeafe" stroke="#3b82f6" stroke-width="1"/>
288
+ <text x="100" y="128" text-anchor="middle" fill="#0c4a6e" font-size="10" font-weight="600">00 Init / 01 Load</text>
289
+
290
+ <rect x="30" y="150" width="140" height="35" rx="4" fill="#dbeafe" stroke="#3b82f6" stroke-width="1"/>
291
+ <text x="100" y="173" text-anchor="middle" fill="#0c4a6e" font-size="10" font-weight="600">03 Commit PRD</text>
292
+
293
+ <rect x="30" y="195" width="140" height="35" rx="4" fill="#dbeafe" stroke="#3b82f6" stroke-width="1"/>
294
+ <text x="100" y="218" text-anchor="middle" fill="#0c4a6e" font-size="10" font-weight="600">04 Check / 05 Report</text>
227
295
 
228
- <!-- Boxes -->
229
- <rect x="240" y="30" width="120" height="40" rx="6" fill="#134e4a" stroke="#0d9488" stroke-width="2"/>
230
- <text x="300" y="55" text-anchor="middle" fill="#f1f5f9" font-size="12" font-weight="600">PROMPT</text>
296
+ <!-- Arrow Ralph -> Apex -->
297
+ <path d="M170,125 L280,160" fill="none" stroke="#3b82f6" stroke-width="2.5" marker-end="url(#arrowFlow)"/>
298
+ <text x="210" y="135" fill="#3b82f6" font-size="10" font-weight="600">/apex -d</text>
231
299
 
232
- <rect x="380" y="130" width="120" height="40" rx="6" fill="#1e3a5f" stroke="#3b82f6" stroke-width="2"/>
233
- <text x="440" y="155" text-anchor="middle" fill="#f1f5f9" font-size="12" font-weight="600">CLAUDE</text>
300
+ <!-- Arrow Apex -> Ralph -->
301
+ <path d="M280,210 L170,185" fill="none" stroke="#8b5cf6" stroke-width="2.5" marker-end="url(#arrowApex)"/>
302
+ <text x="210" y="200" fill="#8b5cf6" font-size="10" font-weight="600">PRD state</text>
234
303
 
235
- <rect x="240" y="230" width="120" height="40" rx="6" fill="#1e293b" stroke="#94a3b8" stroke-width="2"/>
236
- <text x="300" y="255" text-anchor="middle" fill="#f1f5f9" font-size="12" font-weight="600">STOP HOOK</text>
304
+ <!-- Apex Box -->
305
+ <rect x="280" y="70" width="160" height="230" rx="8" fill="#faf5ff" stroke="#8b5cf6" stroke-width="2" stroke-dasharray="5,5"/>
306
+ <text x="360" y="95" text-anchor="middle" fill="#6b21a8" font-size="13" font-weight="700">APEX</text>
307
+ <text x="360" y="112" text-anchor="middle" fill="#6b21a8" font-size="11">(Executor)</text>
237
308
 
238
- <rect x="100" y="130" width="120" height="40" rx="6" fill="#134e4a" stroke="#0d9488" stroke-width="2"/>
239
- <text x="160" y="155" text-anchor="middle" fill="#f1f5f9" font-size="12" font-weight="600">FILES</text>
309
+ <!-- Apex steps -->
310
+ <rect x="290" y="125" width="140" height="35" rx="4" fill="#e9d5ff" stroke="#8b5cf6" stroke-width="1"/>
311
+ <text x="360" y="148" text-anchor="middle" fill="#4c1d95" font-size="10" font-weight="600">Analysis + Planning</text>
240
312
 
241
- <!-- Arrows -->
242
- <path d="M360,50 Q420,50 420,130" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrowRalph)"/>
243
- <path d="M440,170 Q440,230 360,250" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrowRalph)"/>
244
- <path d="M240,250 Q180,250 180,170" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrowRalph)"/>
245
- <path d="M160,130 Q160,50 240,50" fill="none" stroke="#0d9488" stroke-width="2" marker-end="url(#arrowRalph)"/>
313
+ <rect x="290" y="170" width="140" height="35" rx="4" fill="#e9d5ff" stroke="#8b5cf6" stroke-width="1"/>
314
+ <text x="360" y="193" text-anchor="middle" fill="#4c1d95" font-size="10" font-weight="600">Code Generation</text>
246
315
 
247
- <!-- Labels -->
248
- <text x="430" y="90" fill="#94a3b8" font-size="10">1. Execute</text>
249
- <text x="400" y="210" fill="#94a3b8" font-size="10">2. Exit</text>
250
- <text x="150" y="210" fill="#94a3b8" font-size="10">3. Intercept</text>
251
- <text x="130" y="90" fill="#94a3b8" font-size="10">4. Repeat</text>
316
+ <!-- Arrow Apex to Code -->
317
+ <path d="M440,190 L540,160" fill="none" stroke="#8b5cf6" stroke-width="2.5" marker-end="url(#arrowApex)"/>
252
318
 
253
- <!-- Center label -->
254
- <text x="300" y="145" text-anchor="middle" fill="#0d9488" font-size="14" font-weight="700" data-lang="fr">BOUCLE</text>
255
- <text x="300" y="145" text-anchor="middle" fill="#0d9488" font-size="14" font-weight="700" data-lang="en">LOOP</text>
256
- <text x="300" y="165" text-anchor="middle" fill="#5eead4" font-size="10">until complete</text>
319
+ <!-- Code Box -->
320
+ <rect x="540" y="60" width="140" height="200" rx="8" fill="#f0fdfa" stroke="#0d9488" stroke-width="2"/>
321
+ <text x="610" y="85" text-anchor="middle" fill="#134e4a" font-size="13" font-weight="700">Generated Code</text>
322
+
323
+ <!-- Code items -->
324
+ <circle cx="555" cy="110" r="3" fill="#0d9488"/>
325
+ <text x="570" y="115" fill="#134e4a" font-size="9">Entities</text>
326
+
327
+ <circle cx="555" cy="135" r="3" fill="#0d9488"/>
328
+ <text x="570" y="140" fill="#134e4a" font-size="9">Services</text>
329
+
330
+ <circle cx="555" cy="160" r="3" fill="#0d9488"/>
331
+ <text x="570" y="165" fill="#134e4a" font-size="9">Controllers</text>
332
+
333
+ <circle cx="555" cy="185" r="3" fill="#0d9488"/>
334
+ <text x="570" y="190" fill="#134e4a" font-size="9">Tests</text>
335
+
336
+ <circle cx="555" cy="210" r="3" fill="#0d9488"/>
337
+ <text x="570" y="215" fill="#134e4a" font-size="9">Frontend Pages</text>
338
+
339
+ <!-- Bottom flow arrow -->
340
+ <path d="M100,300 L100,320" fill="none" stroke="#3b82f6" stroke-width="2.5" marker-end="url(#arrowFlow)"/>
341
+ <text x="100" y="340" text-anchor="middle" fill="#3b82f6" font-size="10" font-weight="600">Loop until complete</text>
257
342
  </svg>
258
343
  </div>
344
+
345
+ <h4 data-lang="fr">Compact Loop (etape 04)</h4>
346
+ <h4 data-lang="en">Compact Loop (step 04)</h4>
347
+
348
+ <p data-lang="fr">
349
+ Quand une boucle principale se termine, Ralph entre en Compact Loop pour finaliser les taches restantes:
350
+ </p>
351
+ <p data-lang="en">
352
+ When a main loop finishes, Ralph enters Compact Loop to finalize remaining tasks:
353
+ </p>
354
+
355
+ <ol>
356
+ <li data-lang="fr">Identifie les taches eligibles (dependances satisfaites)</li>
357
+ <li data-lang="en">Find eligible tasks (dependencies satisfied)</li>
358
+ <li data-lang="fr">Regroupe par categorie (max 5 par batch)</li>
359
+ <li data-lang="en">Batch by category (max 5 per batch)</li>
360
+ <li data-lang="fr">Delegue a `/apex -d`</li>
361
+ <li data-lang="en">Delegate to `/apex -d`</li>
362
+ <li data-lang="fr">Teste et valide</li>
363
+ <li data-lang="en">Test and validate</li>
364
+ <li data-lang="fr">Commit le PRD</li>
365
+ <li data-lang="en">Commit PRD</li>
366
+ <li data-lang="fr">Boucle jusqu'a completion</li>
367
+ <li data-lang="en">Loop until completion</li>
368
+ </ol>
259
369
  </section>
260
370
 
261
371
  <!-- Commands -->
@@ -267,43 +377,59 @@
267
377
 
268
378
  <div class="command-card">
269
379
  <div class="command-header">
270
- <code class="command-name">/ralph-loop</code>
380
+ <code class="command-name">/ralph-loop [description]</code>
271
381
  <span class="badge badge-green" data-lang="fr">Principal</span>
272
382
  <span class="badge badge-green" data-lang="en">Main</span>
273
383
  </div>
274
384
  <div class="command-body">
275
385
  <p data-lang="fr">
276
- Demarre une boucle Ralph dans votre session actuelle.
386
+ Demarre une nouvelle boucle Ralph avec une description de feature.
277
387
  </p>
278
388
  <p data-lang="en">
279
- Start a Ralph loop in your current session.
389
+ Start a new Ralph loop with a feature description.
280
390
  </p>
281
391
 
282
392
  <div class="code-block">
283
393
  <button class="copy-btn">Copy</button>
284
- <pre><code>/ralph-loop "Refactor the cache layer" --max-iterations 20
285
- /ralph-loop "Add tests" --completion-promise "TESTS COMPLETE"</code></pre>
394
+ <pre><code>/ralph-loop implement user authentication
395
+ /ralph-loop -c "COMPLETE" -m 20 refactor cache
396
+ /ralph-loop -v add payment processing</code></pre>
286
397
  </div>
287
398
 
288
- <h4>Options</h4>
399
+ <h4>Flags</h4>
289
400
  <table class="reference-table">
290
401
  <thead>
291
402
  <tr>
292
- <th>Option</th>
403
+ <th data-lang="fr">Flag</th>
404
+ <th data-lang="en">Flag</th>
293
405
  <th data-lang="fr">Description</th>
294
406
  <th data-lang="en">Description</th>
295
407
  </tr>
296
408
  </thead>
297
409
  <tbody>
298
410
  <tr>
299
- <td><code>--max-iterations &lt;n&gt;</code></td>
300
- <td data-lang="fr">Nombre max d'iterations avant arret auto</td>
301
- <td data-lang="en">Max iterations before auto-stop</td>
411
+ <td><code>-m N</code></td>
412
+ <td><code>-m N</code></td>
413
+ <td data-lang="fr">Max iterations avant arret (defaut: 50)</td>
414
+ <td data-lang="en">Max iterations before stop (default: 50)</td>
302
415
  </tr>
303
416
  <tr>
304
- <td><code>--completion-promise &lt;text&gt;</code></td>
305
- <td data-lang="fr">Phrase promise pour signaler la completion</td>
306
- <td data-lang="en">Promise phrase to signal completion</td>
417
+ <td><code>-c TEXT</code></td>
418
+ <td><code>-c TEXT</code></td>
419
+ <td data-lang="fr">Completion promise text (optionnel)</td>
420
+ <td data-lang="en">Completion promise text (optional)</td>
421
+ </tr>
422
+ <tr>
423
+ <td><code>-v</code></td>
424
+ <td><code>-v</code></td>
425
+ <td data-lang="fr">Logging verbose</td>
426
+ <td data-lang="en">Verbose logging</td>
427
+ </tr>
428
+ <tr>
429
+ <td><code>-r</code></td>
430
+ <td><code>-r</code></td>
431
+ <td data-lang="fr">Resume session precedente</td>
432
+ <td data-lang="en">Resume previous session</td>
307
433
  </tr>
308
434
  </tbody>
309
435
  </table>
@@ -312,149 +438,149 @@
312
438
 
313
439
  <div class="command-card">
314
440
  <div class="command-header">
315
- <code class="command-name">/cancel-ralph</code>
316
- <span class="badge badge-orange" data-lang="fr">Annulation</span>
317
- <span class="badge badge-orange" data-lang="en">Cancel</span>
441
+ <code class="command-name">/ralph-loop -r</code>
442
+ <span class="badge badge-blue">Resume</span>
318
443
  </div>
319
444
  <div class="command-body">
320
445
  <p data-lang="fr">
321
- Annule une boucle Ralph active (supprime le fichier d'etat).
446
+ Resume la derniere session Ralph en cours.
322
447
  </p>
323
448
  <p data-lang="en">
324
- Cancel an active Ralph loop (removes the loop state file).
449
+ Resume the last Ralph session in progress.
325
450
  </p>
326
451
 
327
452
  <div class="code-block">
328
453
  <button class="copy-btn">Copy</button>
329
- <pre><code>/cancel-ralph</code></pre>
454
+ <pre><code>/ralph-loop -r
455
+ /ralph-loop -r -v
456
+ /ralph-loop -r -m 10</code></pre>
330
457
  </div>
331
-
332
- <p data-lang="fr">
333
- <strong>Fonctionnement:</strong> Verifie le fichier d'etat actif et supprime <code>.claude/ralph-loop.local.md</code>.
334
- </p>
335
- <p data-lang="en">
336
- <strong>How it works:</strong> Checks for active loop state file and removes <code>.claude/ralph-loop.local.md</code>.
337
- </p>
338
458
  </div>
339
459
  </div>
340
460
 
341
461
  <div class="command-card">
342
462
  <div class="command-header">
343
- <code class="command-name">/ralph-loop help</code>
344
- <span class="badge badge-blue">Help</span>
463
+ <code class="command-name">/ralph-loop:cancel-ralph</code>
464
+ <span class="badge badge-orange">Cancel</span>
345
465
  </div>
346
466
  <div class="command-body">
347
467
  <p data-lang="fr">
348
- Affiche l'aide complete du plugin Ralph Loop.
468
+ Annule la boucle Ralph active.
349
469
  </p>
350
470
  <p data-lang="en">
351
- Display complete help for the Ralph Loop plugin.
471
+ Cancel the active Ralph loop.
352
472
  </p>
473
+
474
+ <div class="code-block">
475
+ <button class="copy-btn">Copy</button>
476
+ <pre><code>/ralph-loop:cancel-ralph</code></pre>
477
+ </div>
353
478
  </div>
354
479
  </div>
355
480
  </section>
356
481
 
357
- <!-- Completion Promise -->
358
- <section id="completion-promise">
359
- <h2>Completion Promise</h2>
482
+ <!-- Workflow -->
483
+ <section id="workflow">
484
+ <h2>
485
+ <span data-lang="fr">Workflow</span>
486
+ <span data-lang="en">Workflow</span>
487
+ </h2>
488
+
489
+ <h4 data-lang="fr">Cas 1: Module unique</h4>
490
+ <h4 data-lang="en">Case 1: Single Module</h4>
360
491
 
361
492
  <p data-lang="fr">
362
- Pour signaler la completion, Claude doit outputter un tag <code>&lt;promise&gt;</code>:
493
+ L'agent principal execute la Compact Loop directement (pas de sub-agents).
363
494
  </p>
364
495
  <p data-lang="en">
365
- To signal completion, Claude must output a <code>&lt;promise&gt;</code> tag:
496
+ Main agent runs Compact Loop directly (no sub-agents).
366
497
  </p>
367
498
 
368
- <div class="code-block">
369
- <button class="copy-btn">Copy</button>
370
- <pre><code>&lt;promise&gt;TASK COMPLETE&lt;/promise&gt;</code></pre>
371
- </div>
372
-
373
- <div class="alert alert-warning">
374
- <span class="alert-icon">&#9888;</span>
375
- <div class="alert-content">
376
- <h5 data-lang="fr">Important</h5>
377
- <h5 data-lang="en">Important</h5>
378
- <p data-lang="fr">
379
- Le stop hook recherche ce tag specifique. Sans lui (ou sans <code>--max-iterations</code>), Ralph tourne indefiniment.
380
- </p>
381
- <p data-lang="en">
382
- The stop hook looks for this specific tag. Without it (or <code>--max-iterations</code>), Ralph runs infinitely.
383
- </p>
384
- </div>
385
- </div>
499
+ <ol>
500
+ <li data-lang="fr">Init + Load tasks</li>
501
+ <li data-lang="en">Init + Load tasks</li>
502
+ <li data-lang="fr">Loop: delegue a /apex -d → valide → commit → prochain batch</li>
503
+ <li data-lang="en">Loop: delegate to /apex -d → validate → commit → next batch</li>
504
+ <li data-lang="fr">Report final</li>
505
+ <li data-lang="en">Final report</li>
506
+ </ol>
386
507
 
387
- <h4 data-lang="fr">Mecanisme d'auto-reference</h4>
388
- <h4 data-lang="en">Self-reference mechanism</h4>
508
+ <h4 data-lang="fr">Cas 2: Modules multiples</h4>
509
+ <h4 data-lang="en">Case 2: Multi-Module</h4>
389
510
 
390
511
  <p data-lang="fr">
391
- La "boucle" ne signifie pas que Claude se parle a lui-meme. Cela signifie:
512
+ Utilise Agent Teams pour parallelisation (2+ modules depuis BA handoff).
392
513
  </p>
393
514
  <p data-lang="en">
394
- The "loop" doesn't mean Claude talks to itself. It means:
515
+ Uses Agent Teams for parallelization (2+ modules from BA handoff).
395
516
  </p>
396
517
 
397
518
  <ul>
398
- <li data-lang="fr">Meme prompt repete</li>
399
- <li data-lang="en">Same prompt repeated</li>
400
- <li data-lang="fr">Le travail de Claude persiste dans les fichiers</li>
401
- <li data-lang="en">Claude's work persists in files</li>
402
- <li data-lang="fr">Chaque iteration voit les tentatives precedentes</li>
403
- <li data-lang="en">Each iteration sees previous attempts</li>
404
- <li data-lang="fr">Construit incrementalement vers l'objectif</li>
405
- <li data-lang="en">Builds incrementally toward goal</li>
519
+ <li data-lang="fr">Team Lead cree une team (TeamCreate)</li>
520
+ <li data-lang="en">Team Lead creates team (TeamCreate)</li>
521
+ <li data-lang="fr">Layer 0: modules fondation (spawned first)</li>
522
+ <li data-lang="en">Layer 0: Foundation modules (spawned first)</li>
523
+ <li data-lang="fr">Layer 1+: modules dependant de couches precedentes (spawned en parallel)</li>
524
+ <li data-lang="en">Layer 1+: Modules depending on previous layers (spawned in parallel)</li>
525
+ <li data-lang="fr">Verification cross-module report final → TeamDelete</li>
526
+ <li data-lang="en">Cross-module verification final report → TeamDelete</li>
406
527
  </ul>
407
- </section>
408
528
 
409
- <!-- Examples -->
410
- <section id="examples">
411
- <h2>
412
- <span data-lang="fr">Exemples</span>
413
- <span data-lang="en">Examples</span>
414
- </h2>
415
-
416
- <h4 data-lang="fr">Correction de bug iterative</h4>
417
- <h4 data-lang="en">Iterative bug fix</h4>
529
+ <h4 data-lang="fr">Flux complet recommande</h4>
530
+ <h4 data-lang="en">Recommended complete flow</h4>
418
531
 
419
532
  <div class="code-block">
420
533
  <button class="copy-btn">Copy</button>
421
- <pre><code>/ralph-loop "Fix the token refresh logic in auth.ts. Output &lt;promise&gt;FIXED&lt;/promise&gt; when all tests pass." --completion-promise "FIXED" --max-iterations 10</code></pre>
422
- </div>
534
+ <pre><code># 1. Effectuer Business Analyse (interactive)
535
+ /business-analyse MyFeature
423
536
 
424
- <p data-lang="fr">Ralph va:</p>
425
- <p data-lang="en">Ralph will:</p>
426
- <ul>
427
- <li data-lang="fr">Tenter des corrections</li>
428
- <li data-lang="en">Attempt fixes</li>
429
- <li data-lang="fr">Executer les tests</li>
430
- <li data-lang="en">Run tests</li>
431
- <li data-lang="fr">Voir les echecs</li>
432
- <li data-lang="en">See failures</li>
433
- <li data-lang="fr">Iterer sur la solution</li>
434
- <li data-lang="en">Iterate on solution</li>
435
- <li data-lang="fr">Dans votre session actuelle</li>
436
- <li data-lang="en">In your current session</li>
437
- </ul>
537
+ # 2. Attendre handoff - verifie que .ralph/prd.json est genere
438
538
 
439
- <h4 data-lang="fr">Refactoring avec limite</h4>
440
- <h4 data-lang="en">Refactoring with limit</h4>
539
+ # 3. Lancer Ralph Loop pour implementation
540
+ /ralph-loop -r
441
541
 
442
- <div class="code-block">
443
- <button class="copy-btn">Copy</button>
444
- <pre><code>/ralph-loop "Refactor all database queries to use the new repository pattern. Output &lt;promise&gt;REFACTORING COMPLETE&lt;/promise&gt; when done." --completion-promise "REFACTORING COMPLETE" --max-iterations 20</code></pre>
542
+ # 4. Ou directement avec description
543
+ /ralph-loop -m 50 implement MyFeature</code></pre>
445
544
  </div>
545
+ </section>
446
546
 
447
- <h4 data-lang="fr">Integration avec Business Analyse</h4>
448
- <h4 data-lang="en">Integration with Business Analyse</h4>
547
+ <!-- File Structure -->
548
+ <section id="file-structure">
549
+ <h2>File Structure</h2>
550
+
551
+ <p data-lang="fr">
552
+ Ralph cree et gere la structure .ralph/:
553
+ </p>
554
+ <p data-lang="en">
555
+ Ralph creates and manages .ralph/ structure:
556
+ </p>
449
557
 
450
558
  <div class="code-block">
451
559
  <button class="copy-btn">Copy</button>
452
- <pre><code># Le mode automatique de Business Analyse genere automatiquement
453
- # des prompts Ralph Loop optimises apres le handoff
454
- /business-analyse "Ajouter une fonctionnalite d'export PDF"
560
+ <pre><code>.ralph/
561
+ ├── prd.json # Active task list (unified v3 format)
562
+ ├── progress.txt # Persistent memory / state
563
+ ├── modules-queue.json # Multi-module tracking
564
+ ├── prd-{module}.json # Per-module PRDs
565
+ ├── logs/
566
+ │ ├── ralph-2026-02-16.log
567
+ │ └── apex-2026-02-16.log
568
+ └── reports/
569
+ ├── {feature}.md # Final markdown report
570
+ └── {feature}.json # Structured report data</code></pre>
571
+ </div>
455
572
 
456
- # Le prompt genere ressemble a:
457
- /ralph-loop "Implement PDF export feature according to .claude/ba/pdf-export/06-implementation-brief.md. Output &lt;promise&gt;IMPLEMENTATION COMPLETE&lt;/promise&gt; when all acceptance criteria pass." --completion-promise "IMPLEMENTATION COMPLETE" --max-iterations 15</code></pre>
573
+ <div class="alert alert-info">
574
+ <span class="alert-icon">&#128187;</span>
575
+ <div class="alert-content">
576
+ <h5>prd.json format (v3)</h5>
577
+ <p data-lang="fr">
578
+ Format unifie avec metadata, liste de taches pre-calculees, dependances, statuts.
579
+ </p>
580
+ <p data-lang="en">
581
+ Unified format with metadata, pre-computed task list, dependencies, statuses.
582
+ </p>
583
+ </div>
458
584
  </div>
459
585
  </section>
460
586
 
@@ -465,56 +591,79 @@
465
591
  <span data-lang="en">When to use</span>
466
592
  </h2>
467
593
 
468
- <div class="table-container">
469
- <table>
470
- <thead>
471
- <tr>
472
- <th data-lang="fr">Bon pour</th>
473
- <th data-lang="en">Good for</th>
474
- <th data-lang="fr">Pas recommande pour</th>
475
- <th data-lang="en">Not recommended for</th>
476
- </tr>
477
- </thead>
478
- <tbody>
479
- <tr>
480
- <td data-lang="fr">Taches bien definies avec criteres de succes clairs</td>
481
- <td data-lang="en">Well-defined tasks with clear success criteria</td>
482
- <td data-lang="fr">Taches necessitant jugement humain ou decisions de design</td>
483
- <td data-lang="en">Tasks requiring human judgment or design decisions</td>
484
- </tr>
485
- <tr>
486
- <td data-lang="fr">Taches necessitant iteration et raffinement</td>
487
- <td data-lang="en">Tasks requiring iteration and refinement</td>
488
- <td data-lang="fr">Operations one-shot</td>
489
- <td data-lang="en">One-shot operations</td>
490
- </tr>
491
- <tr>
492
- <td data-lang="fr">Developpement iteratif avec auto-correction</td>
493
- <td data-lang="en">Iterative development with self-correction</td>
494
- <td data-lang="fr">Taches sans criteres de succes clairs</td>
495
- <td data-lang="en">Tasks with unclear success criteria</td>
496
- </tr>
497
- <tr>
498
- <td data-lang="fr">Projets greenfield</td>
499
- <td data-lang="en">Greenfield projects</td>
500
- <td data-lang="fr">Debugging de problemes production (utiliser debugging cible)</td>
501
- <td data-lang="en">Debugging production issues (use targeted debugging)</td>
502
- </tr>
503
- </tbody>
504
- </table>
594
+ <div class="alert alert-success">
595
+ <span class="alert-icon">&#9989;</span>
596
+ <div class="alert-content">
597
+ <h5 data-lang="fr">Recommande pour</h5>
598
+ <h5 data-lang="en">Recommended for</h5>
599
+ <ul style="margin-top: 10px;">
600
+ <li data-lang="fr">Implementation de features apres Business Analyse (recommended flow)</li>
601
+ <li data-lang="en">Implementing features after Business Analyse (recommended flow)</li>
602
+ <li data-lang="fr">Modules avec specifications completes en PRD</li>
603
+ <li data-lang="en">Modules with complete specifications in PRD</li>
604
+ <li data-lang="fr">Projets multi-modules avec dependances claires</li>
605
+ <li data-lang="en">Multi-module projects with clear dependencies</li>
606
+ <li data-lang="fr">Workflows iteratifs avec tests automatiques</li>
607
+ <li data-lang="en">Iterative workflows with automated tests</li>
608
+ </ul>
609
+ </div>
505
610
  </div>
506
611
 
507
- <div class="alert alert-success">
508
- <span class="alert-icon">&#128161;</span>
612
+ <div class="alert alert-warning">
613
+ <span class="alert-icon">&#9888;</span>
509
614
  <div class="alert-content">
510
- <h5 data-lang="fr">En savoir plus</h5>
511
- <h5 data-lang="en">Learn more</h5>
512
- <p>
513
- <a href="https://ghuntley.com/ralph/" target="_blank">Technique originale par Geoffrey Huntley</a><br>
514
- <a href="https://github.com/mikeyobrien/ralph-orchestrator" target="_blank">Ralph Orchestrator sur GitHub</a>
515
- </p>
615
+ <h5 data-lang="fr">Non recommande pour</h5>
616
+ <h5 data-lang="en">Not recommended for</h5>
617
+ <ul style="margin-top: 10px;">
618
+ <li data-lang="fr">Taches sans PRD predefini (utiliser /apex ou /business-analyse d'abord)</li>
619
+ <li data-lang="en">Tasks without predefined PRD (use /apex or /business-analyse first)</li>
620
+ <li data-lang="fr">Operations one-shot simples</li>
621
+ <li data-lang="en">Simple one-shot operations</li>
622
+ <li data-lang="fr">Decisions de design necessitant jugement humain</li>
623
+ <li data-lang="en">Design decisions requiring human judgment</li>
624
+ </ul>
516
625
  </div>
517
626
  </div>
627
+
628
+ <h4 data-lang="fr">Integration avec la pile SmartStack</h4>
629
+ <h4 data-lang="en">Integration with SmartStack Stack</h4>
630
+
631
+ <table class="reference-table">
632
+ <thead>
633
+ <tr>
634
+ <th data-lang="fr">Flux</th>
635
+ <th data-lang="en">Flow</th>
636
+ <th data-lang="fr">Outils</th>
637
+ <th data-lang="en">Tools</th>
638
+ </tr>
639
+ </thead>
640
+ <tbody>
641
+ <tr>
642
+ <td data-lang="fr">Specification</td>
643
+ <td data-lang="en">Specification</td>
644
+ <td><code>/business-analyse</code></td>
645
+ <td><code>/business-analyse</code></td>
646
+ </tr>
647
+ <tr>
648
+ <td data-lang="fr">Implementation</td>
649
+ <td data-lang="en">Implementation</td>
650
+ <td><code>/ralph-loop</code> → <code>/apex -d</code></td>
651
+ <td><code>/ralph-loop</code> → <code>/apex -d</code></td>
652
+ </tr>
653
+ <tr>
654
+ <td data-lang="fr">Validation</td>
655
+ <td data-lang="en">Validation</td>
656
+ <td><code>/validate-feature</code></td>
657
+ <td><code>/validate-feature</code></td>
658
+ </tr>
659
+ <tr>
660
+ <td data-lang="fr">Release</td>
661
+ <td data-lang="en">Release</td>
662
+ <td><code>/gitflow:10-start release</code></td>
663
+ <td><code>/gitflow:10-start release</code></td>
664
+ </tr>
665
+ </tbody>
666
+ </table>
518
667
  </section>
519
668
 
520
669
  </div>