@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.
Files changed (147) hide show
  1. package/.documentation/css/styles.css +2168 -2168
  2. package/.documentation/js/app.js +794 -794
  3. package/config/default-config.json +86 -86
  4. package/config/settings.json +53 -53
  5. package/config/settings.local.example.json +16 -16
  6. package/dist/index.js +0 -0
  7. package/dist/index.js.map +1 -1
  8. package/package.json +88 -88
  9. package/templates/agents/action.md +36 -36
  10. package/templates/agents/efcore/conflicts.md +84 -84
  11. package/templates/agents/efcore/db-deploy.md +51 -51
  12. package/templates/agents/efcore/db-reset.md +59 -59
  13. package/templates/agents/efcore/db-seed.md +56 -56
  14. package/templates/agents/efcore/db-status.md +64 -64
  15. package/templates/agents/efcore/migration.md +85 -85
  16. package/templates/agents/efcore/rebase-snapshot.md +62 -62
  17. package/templates/agents/efcore/scan.md +90 -90
  18. package/templates/agents/efcore/squash.md +67 -67
  19. package/templates/agents/explore-codebase.md +65 -65
  20. package/templates/agents/explore-docs.md +97 -97
  21. package/templates/agents/fix-grammar.md +49 -49
  22. package/templates/agents/gitflow/abort.md +45 -45
  23. package/templates/agents/gitflow/cleanup.md +85 -85
  24. package/templates/agents/gitflow/commit.md +40 -40
  25. package/templates/agents/gitflow/exec.md +48 -48
  26. package/templates/agents/gitflow/finish.md +92 -92
  27. package/templates/agents/gitflow/init.md +139 -139
  28. package/templates/agents/gitflow/merge.md +62 -62
  29. package/templates/agents/gitflow/plan.md +42 -42
  30. package/templates/agents/gitflow/pr.md +78 -78
  31. package/templates/agents/gitflow/review.md +49 -49
  32. package/templates/agents/gitflow/start.md +61 -61
  33. package/templates/agents/gitflow/status.md +32 -32
  34. package/templates/agents/snipper.md +36 -36
  35. package/templates/agents/websearch.md +46 -46
  36. package/templates/commands/_resources/formatting-guide.md +124 -124
  37. package/templates/commands/ai-prompt.md +315 -315
  38. package/templates/commands/apex/1-analyze.md +100 -100
  39. package/templates/commands/apex/2-plan.md +145 -145
  40. package/templates/commands/apex/3-execute.md +171 -171
  41. package/templates/commands/apex/4-examine.md +116 -116
  42. package/templates/commands/apex/5-tasks.md +209 -209
  43. package/templates/commands/apex.md +76 -76
  44. package/templates/commands/application/create.md +362 -362
  45. package/templates/commands/application/templates-backend.md +463 -463
  46. package/templates/commands/application/templates-frontend.md +517 -517
  47. package/templates/commands/application/templates-i18n.md +478 -478
  48. package/templates/commands/application/templates-seed.md +362 -362
  49. package/templates/commands/application.md +303 -303
  50. package/templates/commands/business-analyse/0-orchestrate.md +640 -640
  51. package/templates/commands/business-analyse/1-init.md +269 -269
  52. package/templates/commands/business-analyse/2-discover.md +520 -520
  53. package/templates/commands/business-analyse/3-analyse.md +408 -408
  54. package/templates/commands/business-analyse/4-specify.md +598 -598
  55. package/templates/commands/business-analyse/5-validate.md +326 -326
  56. package/templates/commands/business-analyse/6-handoff.md +746 -746
  57. package/templates/commands/business-analyse/7-doc-html.md +602 -602
  58. package/templates/commands/business-analyse/bug.md +325 -325
  59. package/templates/commands/business-analyse/change-request.md +368 -368
  60. package/templates/commands/business-analyse/hotfix.md +200 -200
  61. package/templates/commands/business-analyse.md +640 -640
  62. package/templates/commands/controller/create.md +216 -216
  63. package/templates/commands/controller/postman-templates.md +528 -528
  64. package/templates/commands/controller/templates.md +600 -600
  65. package/templates/commands/controller.md +337 -337
  66. package/templates/commands/create/agent.md +138 -138
  67. package/templates/commands/create/command.md +166 -166
  68. package/templates/commands/create/hook.md +234 -234
  69. package/templates/commands/create/plugin.md +329 -329
  70. package/templates/commands/create/project.md +507 -507
  71. package/templates/commands/create/skill.md +199 -199
  72. package/templates/commands/create.md +220 -220
  73. package/templates/commands/debug.md +95 -95
  74. package/templates/commands/documentation/module.md +202 -202
  75. package/templates/commands/documentation/templates.md +432 -432
  76. package/templates/commands/documentation.md +190 -190
  77. package/templates/commands/efcore/_env-check.md +153 -153
  78. package/templates/commands/efcore/conflicts.md +186 -186
  79. package/templates/commands/efcore/db-deploy.md +193 -193
  80. package/templates/commands/efcore/db-reset.md +426 -426
  81. package/templates/commands/efcore/db-seed.md +326 -326
  82. package/templates/commands/efcore/db-status.md +226 -226
  83. package/templates/commands/efcore/migration.md +400 -400
  84. package/templates/commands/efcore/rebase-snapshot.md +264 -264
  85. package/templates/commands/efcore/scan.md +198 -198
  86. package/templates/commands/efcore/squash.md +298 -298
  87. package/templates/commands/efcore.md +224 -224
  88. package/templates/commands/epct.md +69 -69
  89. package/templates/commands/explain.md +186 -186
  90. package/templates/commands/explore.md +45 -45
  91. package/templates/commands/feature-full.md +267 -267
  92. package/templates/commands/gitflow/1-init.md +1038 -1038
  93. package/templates/commands/gitflow/10-start.md +768 -768
  94. package/templates/commands/gitflow/11-finish.md +457 -457
  95. package/templates/commands/gitflow/12-cleanup.md +276 -276
  96. package/templates/commands/gitflow/13-sync.md +216 -216
  97. package/templates/commands/gitflow/14-rebase.md +251 -251
  98. package/templates/commands/gitflow/2-status.md +277 -277
  99. package/templates/commands/gitflow/3-commit.md +344 -344
  100. package/templates/commands/gitflow/4-plan.md +145 -145
  101. package/templates/commands/gitflow/5-exec.md +147 -147
  102. package/templates/commands/gitflow/6-abort.md +344 -344
  103. package/templates/commands/gitflow/7-pull-request.md +453 -355
  104. package/templates/commands/gitflow/8-review.md +240 -176
  105. package/templates/commands/gitflow/9-merge.md +451 -365
  106. package/templates/commands/gitflow.md +128 -128
  107. package/templates/commands/implement.md +663 -663
  108. package/templates/commands/init.md +567 -567
  109. package/templates/commands/mcp-integration.md +330 -330
  110. package/templates/commands/notification.md +129 -129
  111. package/templates/commands/oneshot.md +57 -57
  112. package/templates/commands/quick-search.md +72 -72
  113. package/templates/commands/ralph-loop/cancel-ralph.md +18 -18
  114. package/templates/commands/ralph-loop/help.md +126 -126
  115. package/templates/commands/ralph-loop/ralph-loop.md +18 -18
  116. package/templates/commands/review.md +106 -106
  117. package/templates/commands/utils/test-web-config.md +160 -160
  118. package/templates/commands/utils/test-web.md +151 -151
  119. package/templates/commands/validate.md +233 -233
  120. package/templates/commands/workflow.md +193 -193
  121. package/templates/gitflow/config.json +138 -138
  122. package/templates/hooks/ef-migration-check.md +139 -139
  123. package/templates/hooks/hooks.json +25 -25
  124. package/templates/hooks/stop-hook.sh +177 -177
  125. package/templates/skills/ai-prompt/SKILL.md +778 -778
  126. package/templates/skills/application/SKILL.md +563 -563
  127. package/templates/skills/application/templates-backend.md +450 -450
  128. package/templates/skills/application/templates-frontend.md +531 -531
  129. package/templates/skills/application/templates-i18n.md +520 -520
  130. package/templates/skills/application/templates-seed.md +647 -647
  131. package/templates/skills/business-analyse/SKILL.md +191 -191
  132. package/templates/skills/business-analyse/questionnaire.md +283 -283
  133. package/templates/skills/business-analyse/templates-frd.md +477 -477
  134. package/templates/skills/business-analyse/templates-react.md +580 -580
  135. package/templates/skills/controller/SKILL.md +240 -240
  136. package/templates/skills/controller/postman-templates.md +614 -614
  137. package/templates/skills/controller/templates.md +1468 -1468
  138. package/templates/skills/documentation/SKILL.md +133 -133
  139. package/templates/skills/documentation/templates.md +476 -476
  140. package/templates/skills/feature-full/SKILL.md +838 -838
  141. package/templates/skills/notification/SKILL.md +555 -555
  142. package/templates/skills/ui-components/SKILL.md +870 -870
  143. package/templates/skills/workflow/SKILL.md +582 -582
  144. package/templates/test-web/api-health.json +38 -38
  145. package/templates/test-web/minimal.json +19 -19
  146. package/templates/test-web/npm-package.json +46 -46
  147. package/templates/test-web/seo-check.json +54 -54
@@ -1,640 +1,640 @@
1
- ---
2
- description: Business Analysis - Complete business analysis workflow (BABOK/IEEE 830)
3
- argument-hint: "<description du besoin>"
4
- ---
5
-
6
- # Business Analysis - Expert Workflow
7
-
8
- Senior Business Analyst expert. Complete business analysis without writing code.
9
-
10
- ---
11
-
12
- ## MODE AUTOMATIQUE (RECOMMANDE)
13
-
14
- ```
15
- +==============================================================================+
16
- | /business-analyse "<description du besoin>" |
17
- | |
18
- | ORCHESTRE AUTOMATIQUEMENT TOUT LE WORKFLOW: |
19
- | ├── 1. Verification MCP SmartStack (alerte si absent) |
20
- | ├── 2. Analyse du contexte (Application/Module/Granularite) |
21
- | ├── 3. Definition des integrations (Workflows/Notifs/IA) |
22
- | ├── 4. Creation prd.json + progress.txt (Ralph Loop ready) |
23
- | ├── 5. Execution phases 1-7 avec Ralph Loop |
24
- | ├── 6. Validation utilisateur (gate obligatoire) |
25
- | ├── 7. Implementation avec Ralph Loop |
26
- | └── 8. Documentation HTML auto-generee |
27
- | |
28
- | RESULTAT: Feature complete en ~30 minutes avec validation |
29
- +==============================================================================+
30
- ```
31
-
32
- **Usage:**
33
- ```bash
34
- # Mode automatique complet (RECOMMANDE)
35
- /business-analyse "Je veux gerer les contacts clients avec import/export"
36
-
37
- # Mode manuel (phases individuelles)
38
- /business-analyse:1-init
39
- /business-analyse:2-discover ...
40
- ```
41
-
42
- ---
43
-
44
- ## Philosophy
45
-
46
- ```
47
- +==============================================================================+
48
- | THE BUSINESS ANALYST NEVER CODES |
49
- | |
50
- | They produce: |
51
- | - Clear and complete SPECIFICATIONS |
52
- | - Actionable business DOCUMENTATION |
53
- | - Optimized development PROMPTS |
54
- | - HTML DOCUMENTATION (React components) |
55
- | |
56
- | They let the DEVELOPER implement according to specs |
57
- +==============================================================================+
58
- ```
59
-
60
- ---
61
-
62
- ## PHASE 0: BUSINESS CONTEXT RESTRICTION (CRITICAL)
63
-
64
- ```
65
- +==============================================================================+
66
- | CONTEXTE BUSINESS UNIQUEMENT |
67
- +==============================================================================+
68
- | |
69
- | La Business Analyse est EXCLUSIVEMENT pour le contexte "business": |
70
- | |
71
- | ALLOWED: |
72
- | - business/{application}/{module} |
73
- | - Applications client/metier |
74
- | - Nouveaux modules fonctionnels |
75
- | |
76
- | FORBIDDEN (reserved for SmartStack core): |
77
- | - platform/* (administration core) |
78
- | - personal/* (user core) |
79
- | - system/* (technical infrastructure) |
80
- | |
81
- | VALIDATION: |
82
- | Each BA command MUST validate context before proceeding. |
83
- | If non-business context detected -> BLOCK with error message. |
84
- | |
85
- +==============================================================================+
86
- ```
87
-
88
- ### Permission Path Format
89
-
90
- ```
91
- business.{application}.{module}.{action}
92
-
93
- Examples:
94
- - business.crm.contacts.read
95
- - business.inventory.products.create
96
- - business.hr.employees.update
97
- ```
98
-
99
- ---
100
-
101
- ## 7-Phase Workflow (Updated)
102
-
103
- ```
104
- ================================================================================
105
-
106
- INIT DISCOVER ANALYSE SPECIFY VALIDATE HANDOFF DOC-HTML
107
- +-----+ +---------+ +---------+ +---------+ +--------+ +---------+ +---------+
108
- |Setup|---+|Elicit |--+|Model |--+|Specify |--+|Approve |--+|Prompt |->|React Doc|
109
- +-----+ +---------+ +---------+ +---------+ +--------+ +---------+ +---------+
110
- | | | | | | |
111
- v v v v v v v
112
- Structure Discovery.md BRD.md FRD.md Approval Dev Prompt FrdDocPage
113
- Config (40+ Q) Process Use Cases Gate Autonomous i18n 4 lang
114
- Code Scan Rules Wireframes v NOK Routes
115
- Doc Scan -> ANALYSE
116
- (revise)
117
-
118
- [ULTRATHINK] [ULTRATHINK] [ULTRATHINK] [ULTRATHINK] [CONTEXT7]
119
-
120
- ================================================================================
121
- ```
122
-
123
- ---
124
-
125
- ## Available Commands
126
-
127
- | Phase | Command | Model | Description | Output |
128
- |-------|----------|-------|-------------|--------|
129
- | **AUTO** | **`/business-analyse`** | **opus** | **Orchestration complete automatique** | **Feature complete** |
130
- | 0 | `/business-analyse:0-orchestrate` | opus | Orchestration manuelle avec questions | context.json, prd.json |
131
- | 0.5 | *Validation* | - | Context business check (automatic) | Block if not business |
132
- | 1 | `/business-analyse:1-init` | haiku | Initialize project structure + code scan | `config.json`, structure |
133
- | 2 | `/business-analyse:2-discover` | **opus** | Requirements elicitation (ultrathink) | `1-discovery.md` |
134
- | 3 | `/business-analyse:3-analyse` | sonnet | Business analysis BRD + doc scan (ultrathink) | `2-business-requirements.md` |
135
- | 4 | `/business-analyse:4-specify` | sonnet | Functional specifications FRD (ultrathink) | `3-functional-specification.md` |
136
- | 5 | `/business-analyse:5-validate` | haiku | User validation gate | `validation.json` |
137
- | 6 | `/business-analyse:6-handoff` | **opus** | Development prompt (ultrathink) | `4-development-handoff.md` |
138
- | -> | **`/implement FEAT-XXX`** | **opus** | **Implement from handoff (skip explore)** | Code files |
139
- | 7 | `/business-analyse:7-doc-html` | sonnet | **React HTML documentation + Context7** | `FrdDocPage.tsx`, i18n |
140
- | + | `/business-analyse:bug` | sonnet | Bug documentation | `tracking/bugs/BUG-XXX.md` |
141
- | * | `/business-analyse:hotfix` | haiku | Urgent fix (lightweight template) | `tracking/hotfixes/HF-XXX.md` |
142
- | ~ | `/business-analyse:change-request` | sonnet | Formal spec change during dev | `tracking/changes/CR-XXX.md` |
143
-
144
- ---
145
-
146
- ## Context7 Integration (MANDATORY for Code Generation)
147
-
148
- ```
149
- +==============================================================================+
150
- | CONTEXT7: Documentation a jour pour generation React |
151
- +==============================================================================+
152
- | |
153
- | Phase 7 (doc-html) MUST use Context7 for React generation: |
154
- | |
155
- | Libraries to reference: |
156
- | - /facebook/react - React 19 patterns, hooks |
157
- | - /i18next/react-i18next - useTranslation, Trans |
158
- | - /remix-run/react-router - Link, useParams, useNavigate |
159
- | - /lucide-icons/lucide-react - Icons coherents |
160
- | |
161
- | Usage pattern in prompts: |
162
- | "use context7 with /facebook/react and /i18next/react-i18next |
163
- | to generate {component} following SmartStack documentation patterns" |
164
- | |
165
- | WHY: |
166
- | - Ensures up-to-date React 19 syntax |
167
- | - Correct i18n hook usage |
168
- | - Router v7 patterns |
169
- | - Consistent icon imports |
170
- | |
171
- +==============================================================================+
172
- ```
173
-
174
- ---
175
-
176
- ## Artifact Structure
177
-
178
- ```
179
- .business-analyse/
180
- |-- config.json # Global configuration
181
- |-- glossary.md # Unified business glossary
182
- |-- .claudeignore # Files ignored by Claude
183
- |
184
- |-- business/ # CONTEXT: business ONLY
185
- | +-- {application}/ # APPLICATION level
186
- | |-- context.md # Application context
187
- | |-- stakeholders.md # Stakeholders
188
- | +-- modules/ # MODULE level
189
- | +-- {module-name}/
190
- | |-- context.md # Module context
191
- | +-- features/
192
- | +-- {FEAT-XXX-name}/
193
- | |-- 1-discovery.md
194
- | |-- 2-business-requirements.md
195
- | |-- 3-functional-specification.md
196
- | |-- 4-development-handoff.md
197
- | |-- validation.json
198
- | +-- tracking/
199
- | |-- changes/
200
- | | +-- CR-FEAT-XXX-001.md
201
- | |-- bugs/
202
- | +-- hotfixes/
203
- |
204
- |-- documentation/
205
- | |-- data-dictionary/
206
- | |-- process-flows/
207
- | +-- architecture-decisions/
208
- |
209
- +-- templates/
210
- |-- discovery.md
211
- |-- business-requirements.md
212
- |-- functional-specification.md
213
- |-- development-handoff.md
214
- +-- bug-report.md
215
- ```
216
-
217
- ---
218
-
219
- ## HTML Documentation Output (Phase 7)
220
-
221
- ```
222
- +==============================================================================+
223
- | OUTPUT HTML: Documentation integree dans chaque module Business |
224
- +==============================================================================+
225
- | |
226
- | Phase 7 genere la documentation DANS le module (pas dans /docs): |
227
- | |
228
- | ROUTE: |
229
- | /business/{application}/{module}/documentation |
230
- | |
231
- | STRUCTURE: |
232
- | web/smartstack-web/src/pages/business/{app}/{module}/ |
233
- | |-- IndexPage.tsx # Page principale du module |
234
- | |-- ListPage.tsx # Liste des entites |
235
- | |-- CreatePage.tsx # Creation |
236
- | |-- DetailPage.tsx # Detail |
237
- | +-- DocumentationPage.tsx # Documentation FRD (PHASE 7) |
238
- | |
239
- | I18N: |
240
- | web/smartstack-web/src/i18n/locales/ |
241
- | |-- fr/{app}-{module}.json # Cles documentation.* |
242
- | |-- en/{app}-{module}.json |
243
- | |-- it/{app}-{module}.json |
244
- | +-- de/{app}-{module}.json |
245
- | |
246
- | ACCES: |
247
- | - URL: http://localhost:5173/business/{app}/{module}/documentation |
248
- | - Onglet "Documentation" dans la navigation du module |
249
- | |
250
- +==============================================================================+
251
- ```
252
-
253
- ---
254
-
255
- ## Applied Standards
256
-
257
- | Standard | Application |
258
- |----------|-------------|
259
- | **BABOK v3** | 6 Knowledge Areas, elicitation techniques |
260
- | **IEEE 830** | SRS structure, requirements traceability |
261
- | **BRD/FRD** | Business needs / specifications separation |
262
-
263
- ## Feature ID Standards
264
-
265
- ```
266
- +==============================================================================+
267
- | FEATURE ID FORMAT: FEAT-XXX (where XXX is 3-digit number) |
268
- +==============================================================================+
269
- | |
270
- | Format: FEAT-001, FEAT-002, ..., FEAT-999 |
271
- | Regex: ^FEAT-\d{3}$ |
272
- | |
273
- | RELATED IDs: |
274
- | - Business Rules: BR-XXX (e.g., BR-001) |
275
- | - Functional Reqs: FR-XXX (e.g., FR-001) |
276
- | - Use Cases: UC-XXX (e.g., UC-001) |
277
- | - Bugs: BUG-XXX (e.g., BUG-001) |
278
- | - Hotfixes: HF-YYYYMMDD-NNN (e.g., HF-20260112-001) |
279
- | - Change Requests: CR-FEAT-XXX-N (e.g., CR-FEAT-001-001) |
280
- | |
281
- | VALIDATION: Each command validates ID format before proceeding. |
282
- | |
283
- +==============================================================================+
284
- ```
285
-
286
- ## Document Versioning
287
-
288
- ```
289
- +==============================================================================+
290
- | SPECIFICATION VERSIONING: Track changes to documents |
291
- +==============================================================================+
292
- | |
293
- | VERSION FORMAT: Major.Minor (e.g., 1.0, 1.1, 2.0) |
294
- | |
295
- | Major version (X.0): |
296
- | - Significant scope change |
297
- | - Major revision after validation rejection |
298
- | - Breaking changes to previously approved specs |
299
- | |
300
- | Minor version (X.Y): |
301
- | - Clarifications, typo fixes |
302
- | - Minor additions within scope |
303
- | - Change request implementations |
304
- | |
305
- | VERSION HISTORY: Each document maintains a changelog |
306
- | LOCKED AT HANDOFF: Version is locked when handoff is generated |
307
- | POST-HANDOFF CHANGES: Require Change Request (CR) process |
308
- | |
309
- +==============================================================================+
310
- ```
311
-
312
- ## ULTRATHINK Mode Definition
313
-
314
- ```
315
- +==============================================================================+
316
- | ULTRATHINK: Deep Thinking Mode for Complex Analysis |
317
- +==============================================================================+
318
- | |
319
- | ULTRATHINK is a BEHAVIORAL MODE, not a tool or skill to invoke. |
320
- | |
321
- | WHEN TO USE: |
322
- | Phases marked with (ultrathink): discover, analyse, specify, handoff |
323
- | |
324
- | HOW IT WORKS: |
325
- | Claude activates extended thinking to: |
326
- | - Consider all edge cases before responding |
327
- | - Challenge assumptions aggressively |
328
- | - Generate comprehensive outputs |
329
- | - Validate completeness before outputting |
330
- | |
331
- | MODEL REQUIREMENT: |
332
- | ULTRATHINK phases require OPUS model for best results. |
333
- | Other models may produce less thorough analysis. |
334
- | |
335
- | NOT A SKILL INVOCATION: |
336
- | Do NOT call Skill("ultrathink"). It is a behavioral instruction. |
337
- | |
338
- +==============================================================================+
339
- ```
340
-
341
- ## Model Strategy
342
-
343
- ```
344
- +==============================================================================+
345
- | MODEL REQUIREMENTS: Quality First, Then Cost Optimization |
346
- +==============================================================================+
347
- | |
348
- | OPUS (Critical phases - deep reasoning required): |
349
- | - 2-discover: Exhaustive elicitation, challenge assumptions |
350
- | - 6-handoff: One-shot prompt generation, zero ambiguity |
351
- | - /implement: Production code generation |
352
- | |
353
- | SONNET (Analysis phases - balanced reasoning): |
354
- | - 3-analyse: Business modeling, process documentation |
355
- | - 4-specify: Technical specifications, edge cases |
356
- | - 7-doc-html: React component generation with Context7 |
357
- | - change-request: Impact analysis, decision matrix |
358
- | - bug: Root cause analysis |
359
- | |
360
- | HAIKU (Simple phases - template execution): |
361
- | - 1-init: Structure setup, no decisions |
362
- | - 5-validate: Approval gate, yes/no |
363
- | - hotfix: Lightweight urgent fix |
364
- | |
365
- | PRINCIPLE: Never sacrifice quality for cost savings. |
366
- | Each model is the MINIMUM capable of delivering quality output. |
367
- | |
368
- +==============================================================================+
369
- ```
370
-
371
- ## Permission Specifications
372
-
373
- ```
374
- +==============================================================================+
375
- | PERMISSIONS IN HANDOFF: Must be EXPLICIT and IMPLEMENTABLE |
376
- +==============================================================================+
377
- | |
378
- | CONTEXT RESTRICTION: |
379
- | All permissions MUST start with "business." prefix |
380
- | Format: business.{application}.{module}.{action} |
381
- | |
382
- | The 6-handoff includes a dedicated Section 7 for permissions: |
383
- | |
384
- | 7.1 [EXPLORE] - Discover existing permission patterns |
385
- | 7.2 Permission Keys - Exact string codes (e.g., "business.crm.contacts.read")|
386
- | 7.3 Role-Permission Matrix - Who can do what |
387
- | 7.4 Endpoint-Permission Mapping - API protection |
388
- | 7.5 UI Permission Checks - Button visibility rules |
389
- | 7.6 Implementation Checklist - Step-by-step |
390
- | |
391
- | MANDATORY in Gherkin scenarios: |
392
- | - At least 1 permission denial scenario |
393
- | - API 403 response test |
394
- | - UI element visibility test |
395
- | |
396
- | "Admin can create" is NOT enough. |
397
- | "POST /api/business/crm/contacts requires business.crm.contacts.create" IS. |
398
- | |
399
- +==============================================================================+
400
- ```
401
-
402
- ## Golden Rules
403
-
404
- 1. **NEVER code** - BA produces specs, not code. NO C#, JS, SQL, Razor in any document.
405
- 2. **BUSINESS ONLY** - Only business context allowed. Platform/Personal/System are forbidden.
406
- 3. **ULTRATHINK mandatory** - Phases 2, 3, 4, 6 use deep thinking
407
- 4. **Model per phase** - Use correct model (opus/sonnet/haiku) per phase complexity
408
- 5. **Structure respected** - Business > Application > Module > Feature
409
- 6. **Traceability** - Each requirement has a unique ID
410
- 7. **User validation** - Phase 5 MUST be approved before handoff
411
- 8. **NOK -> Revise** - Rejected specs return to ANALYSE phase
412
- 9. **Maintained glossary** - Business terms documented
413
- 10. **Optimized prompts** - Handoff ready for one-shot implementation
414
- 11. **Tables over code** - Use attribute tables, not class definitions
415
- 12. **Explore-First** - Handoff instructs developer to explore existing patterns
416
- 13. **Explicit permissions** - business.* prefix, endpoint mapping, Gherkin tests mandatory
417
- 14. **Context7 for React** - Phase 7 MUST use Context7 for React generation
418
- 15. **4-language i18n** - FR, EN, IT, DE mandatory for HTML documentation
419
-
420
- ---
421
-
422
- ## Quick Start
423
-
424
- ```bash
425
- # 1. Initialize project (scans code structure)
426
- /business-analyse:1-init
427
-
428
- # 2. New feature - Discovery (OPUS + ULTRATHINK)
429
- /business-analyse:2-discover {application} {module} "Need description"
430
-
431
- # 3. Analyze (scans existing docs for consistency)
432
- /business-analyse:3-analyse FEAT-001
433
-
434
- # 4. Specify functional requirements
435
- /business-analyse:4-specify FEAT-001
436
-
437
- # 5. User validates (REQUIRED before handoff)
438
- /business-analyse:5-validate FEAT-001
439
- # -> If NOK: Return to /business-analyse:3-analyse with feedback
440
-
441
- # 6. Generate dev prompt (after approval)
442
- /business-analyse:6-handoff FEAT-001
443
-
444
- # 7. IMPLEMENT the feature from handoff (RECOMMENDED)
445
- /implement FEAT-001
446
- # -> Reads handoff, discovers patterns, generates code
447
- # -> Skips exploration (already done by BA)
448
-
449
- # 8. Generate HTML documentation (Context7 + React)
450
- /business-analyse:7-doc-html FEAT-001
451
- # -> Creates DocumentationPage.tsx in module folder
452
- # -> Adds documentation.* keys to i18n (4 languages)
453
- # -> Adds route: /business/{app}/{module}/documentation
454
- # -> Adds "Documentation" tab in module navigation
455
- ```
456
-
457
- ---
458
-
459
- ## One-Shot Feature avec Ralph-Loop (RECOMMANDE)
460
-
461
- ```
462
- ╔══════════════════════════════════════════════════════════════════════════════╗
463
- ║ RALPH-LOOP: Iteration autonome avec tracking d'état ║
464
- ╠══════════════════════════════════════════════════════════════════════════════╣
465
- ║ ║
466
- ║ Ralph-Loop permet a Claude d'iterer automatiquement avec MEMOIRE ║
467
- ║ persistante via fichiers: ║
468
- ║ ║
469
- ║ FICHIERS RALPH (créés automatiquement): ║
470
- ║ ├── prd.json → Liste des tâches avec statut "passes": true/false ║
471
- ║ └── progress.txt → Mémoire persistante entre itérations ║
472
- ║ ║
473
- ║ PROCESSUS PAR ITERATION: ║
474
- ║ 1. Lire prd.json → Trouver prochaine tâche "passes": false ║
475
- ║ 2. Lire progress.txt → Comprendre le contexte ║
476
- ║ 3. Travailler sur UNE SEULE tâche ║
477
- ║ 4. git commit ║
478
- ║ 5. Mettre à jour prd.json → "passes": true ║
479
- ║ 6. Ajouter apprentissages à progress.txt ║
480
- ║ 7. Si TOUTES tâches "passes": true → <promise>COMPLETE</promise> ║
481
- ║ ║
482
- ║ SIGNAL DE FIN UNIFIÉ: <promise>COMPLETE</promise> ║
483
- ║ ║
484
- ╚══════════════════════════════════════════════════════════════════════════════╝
485
- ```
486
-
487
- ### Usage recommande
488
-
489
- ```bash
490
- # DISCOVERY avec ralph-loop (specs en beton)
491
- /ralph-loop "/business-analyse:2-discover FEAT-001" \
492
- --completion-promise "COMPLETE" \
493
- --max-iterations 15
494
-
495
- # ... phases 3-5 normales (analyse, specify, validate) ...
496
-
497
- # HANDOFF avec ralph-loop (optionnel - garantie completude)
498
- /ralph-loop "/business-analyse:6-handoff FEAT-001" \
499
- --completion-promise "COMPLETE" \
500
- --max-iterations 10
501
-
502
- # IMPLEMENTATION avec ralph-loop (one-shot complet)
503
- /ralph-loop "/implement FEAT-001" \
504
- --completion-promise "COMPLETE" \
505
- --max-iterations 25
506
- ```
507
-
508
- ### Flux simplifie
509
-
510
- ```
511
- DISCOVERY (Ralph) PHASES 3-5 HANDOFF (Ralph?) VALIDATE IMPLEMENT (Ralph)
512
- +------------------+ +-----------+ +----------------+ +---------+ +------------------+
513
- | prd.json: 9 tasks|>| Analyse |->| prd.json: 11 |>| HUMAIN |>| prd.json: 18 |
514
- | progress.txt | | Specify | | tasks | | OK/NOK | | tasks |
515
- | UNE tâche/iter | | | | progress.txt | | | | progress.txt |
516
- +------------------+ +-----------+ +----------------+ +---------+ +------------------+
517
- OPUS + Ralph OPUS + Ralph? OPUS + Ralph
518
- ```
519
-
520
- ### Couts estimes
521
-
522
- | Phase | Mode | Iterations | Cout |
523
- |-------|------|------------|------|
524
- | Discovery | One-shot | 1 | ~$0.30 |
525
- | Discovery | Ralph-loop | 5-15 | ~$1.50-4.50 |
526
- | Handoff | One-shot | 1 | ~$0.35 |
527
- | Handoff | Ralph-loop | 3-10 | ~$1.00-2.50 |
528
- | Implement | One-shot | 1 | ~$2.00 |
529
- | Implement | Ralph-loop | 10-25 | ~$5.00-15.00 |
530
-
531
- ### Prerequis
532
-
533
- Le plugin `ralph-loop` doit etre installe:
534
- ```bash
535
- smartstack install # Installe automatiquement ralph-loop
536
- # ou manuellement:
537
- claude plugin install ralph-loop@claude-plugins-official
538
- ```
539
-
540
- ### Fichiers Ralph créés par phase
541
-
542
- | Phase | prd.json tasks | Description |
543
- |-------|----------------|-------------|
544
- | Discovery | 9 tâches | Catégories du 1-discovery.md |
545
- | Handoff | 11 tâches | Sections du 4-development-handoff.md |
546
- | Implement | 18 tâches | Backend/Frontend/Integrations/Tests |
547
-
548
- ---
549
-
550
- ## Post-Implementation Changes
551
-
552
- ```bash
553
- # Bug discovered after implementation:
554
- /business-analyse:bug FEAT-001
555
- # -> Root cause analysis (5 Whys)
556
- # -> Links to impacted BR/FR/UC
557
-
558
- # Urgent fix needed in production:
559
- /business-analyse:hotfix
560
- # -> Lightweight template
561
- # -> Quick fix prompt
562
-
563
- # Scope change requested after handoff:
564
- /business-analyse:change-request FEAT-001 "Add preview feature to page X"
565
- # -> Documents change, generates implementation prompt
566
- # -> For small changes: offers immediate implementation
567
- ```
568
-
569
- ---
570
-
571
- ## Skill Reference
572
-
573
- The BA workflow also has a skill for automatic invocation:
574
-
575
- ```yaml
576
- # Skill: /skills/business-analyse/SKILL.md
577
- name: business-analyse
578
- description: |
579
- Analyses business requirements and generates functional specifications (FRD) for SmartStack.
580
- Produces HTML documentation in the web project. Restricted to Business context only.
581
- ```
582
-
583
- The skill is triggered automatically when user asks about:
584
- - Business analysis, specifications, FRD
585
- - User stories, business rules
586
- - Functional requirements
587
-
588
- ---
589
-
590
- ## Next
591
-
592
- **Mode automatique (RECOMMANDE):**
593
- ```bash
594
- /business-analyse "Description de votre besoin"
595
- ```
596
-
597
- **Mode manuel:**
598
- ```bash
599
- /business-analyse:1-init
600
- ```
601
-
602
- ---
603
-
604
- ## EXECUTION AUTOMATIQUE
605
-
606
- Si cette commande est appelee avec un argument (description du besoin):
607
-
608
- ```
609
- ARGUMENTS = "$ARGUMENTS"
610
-
611
- SI ARGUMENTS non vide:
612
- → Executer /business-analyse:0-orchestrate $ARGUMENTS
613
- → Le workflow complet est lance automatiquement
614
-
615
- SINON:
616
- → Afficher ce fichier d'aide
617
- → Proposer les options
618
- ```
619
-
620
- **Lancer le mode automatique maintenant:**
621
-
622
- ```javascript
623
- if (ARGUMENTS && ARGUMENTS.trim().length > 0) {
624
- // Mode automatique - lancer l'orchestration
625
- execute("/business-analyse:0-orchestrate " + ARGUMENTS);
626
- } else {
627
- // Mode manuel - afficher l'aide et proposer les options
628
- AskUserQuestion({
629
- questions: [{
630
- question: "Comment souhaitez-vous proceder?",
631
- header: "Mode",
632
- options: [
633
- { label: "Mode automatique (Recommande)", description: "Orchestration complete avec Ralph Loop" },
634
- { label: "Mode manuel", description: "Executer les phases une par une" }
635
- ],
636
- multiSelect: false
637
- }]
638
- });
639
- }
640
- ```
1
+ ---
2
+ description: Business Analysis - Complete business analysis workflow (BABOK/IEEE 830)
3
+ argument-hint: "<description du besoin>"
4
+ ---
5
+
6
+ # Business Analysis - Expert Workflow
7
+
8
+ Senior Business Analyst expert. Complete business analysis without writing code.
9
+
10
+ ---
11
+
12
+ ## MODE AUTOMATIQUE (RECOMMANDE)
13
+
14
+ ```
15
+ +==============================================================================+
16
+ | /business-analyse "<description du besoin>" |
17
+ | |
18
+ | ORCHESTRE AUTOMATIQUEMENT TOUT LE WORKFLOW: |
19
+ | ├── 1. Verification MCP SmartStack (alerte si absent) |
20
+ | ├── 2. Analyse du contexte (Application/Module/Granularite) |
21
+ | ├── 3. Definition des integrations (Workflows/Notifs/IA) |
22
+ | ├── 4. Creation prd.json + progress.txt (Ralph Loop ready) |
23
+ | ├── 5. Execution phases 1-7 avec Ralph Loop |
24
+ | ├── 6. Validation utilisateur (gate obligatoire) |
25
+ | ├── 7. Implementation avec Ralph Loop |
26
+ | └── 8. Documentation HTML auto-generee |
27
+ | |
28
+ | RESULTAT: Feature complete en ~30 minutes avec validation |
29
+ +==============================================================================+
30
+ ```
31
+
32
+ **Usage:**
33
+ ```bash
34
+ # Mode automatique complet (RECOMMANDE)
35
+ /business-analyse "Je veux gerer les contacts clients avec import/export"
36
+
37
+ # Mode manuel (phases individuelles)
38
+ /business-analyse:1-init
39
+ /business-analyse:2-discover ...
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Philosophy
45
+
46
+ ```
47
+ +==============================================================================+
48
+ | THE BUSINESS ANALYST NEVER CODES |
49
+ | |
50
+ | They produce: |
51
+ | - Clear and complete SPECIFICATIONS |
52
+ | - Actionable business DOCUMENTATION |
53
+ | - Optimized development PROMPTS |
54
+ | - HTML DOCUMENTATION (React components) |
55
+ | |
56
+ | They let the DEVELOPER implement according to specs |
57
+ +==============================================================================+
58
+ ```
59
+
60
+ ---
61
+
62
+ ## PHASE 0: BUSINESS CONTEXT RESTRICTION (CRITICAL)
63
+
64
+ ```
65
+ +==============================================================================+
66
+ | CONTEXTE BUSINESS UNIQUEMENT |
67
+ +==============================================================================+
68
+ | |
69
+ | La Business Analyse est EXCLUSIVEMENT pour le contexte "business": |
70
+ | |
71
+ | ALLOWED: |
72
+ | - business/{application}/{module} |
73
+ | - Applications client/metier |
74
+ | - Nouveaux modules fonctionnels |
75
+ | |
76
+ | FORBIDDEN (reserved for SmartStack core): |
77
+ | - platform/* (administration core) |
78
+ | - personal/* (user core) |
79
+ | - system/* (technical infrastructure) |
80
+ | |
81
+ | VALIDATION: |
82
+ | Each BA command MUST validate context before proceeding. |
83
+ | If non-business context detected -> BLOCK with error message. |
84
+ | |
85
+ +==============================================================================+
86
+ ```
87
+
88
+ ### Permission Path Format
89
+
90
+ ```
91
+ business.{application}.{module}.{action}
92
+
93
+ Examples:
94
+ - business.crm.contacts.read
95
+ - business.inventory.products.create
96
+ - business.hr.employees.update
97
+ ```
98
+
99
+ ---
100
+
101
+ ## 7-Phase Workflow (Updated)
102
+
103
+ ```
104
+ ================================================================================
105
+
106
+ INIT DISCOVER ANALYSE SPECIFY VALIDATE HANDOFF DOC-HTML
107
+ +-----+ +---------+ +---------+ +---------+ +--------+ +---------+ +---------+
108
+ |Setup|---+|Elicit |--+|Model |--+|Specify |--+|Approve |--+|Prompt |->|React Doc|
109
+ +-----+ +---------+ +---------+ +---------+ +--------+ +---------+ +---------+
110
+ | | | | | | |
111
+ v v v v v v v
112
+ Structure Discovery.md BRD.md FRD.md Approval Dev Prompt FrdDocPage
113
+ Config (40+ Q) Process Use Cases Gate Autonomous i18n 4 lang
114
+ Code Scan Rules Wireframes v NOK Routes
115
+ Doc Scan -> ANALYSE
116
+ (revise)
117
+
118
+ [ULTRATHINK] [ULTRATHINK] [ULTRATHINK] [ULTRATHINK] [CONTEXT7]
119
+
120
+ ================================================================================
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Available Commands
126
+
127
+ | Phase | Command | Model | Description | Output |
128
+ |-------|----------|-------|-------------|--------|
129
+ | **AUTO** | **`/business-analyse`** | **opus** | **Orchestration complete automatique** | **Feature complete** |
130
+ | 0 | `/business-analyse:0-orchestrate` | opus | Orchestration manuelle avec questions | context.json, prd.json |
131
+ | 0.5 | *Validation* | - | Context business check (automatic) | Block if not business |
132
+ | 1 | `/business-analyse:1-init` | haiku | Initialize project structure + code scan | `config.json`, structure |
133
+ | 2 | `/business-analyse:2-discover` | **opus** | Requirements elicitation (ultrathink) | `1-discovery.md` |
134
+ | 3 | `/business-analyse:3-analyse` | sonnet | Business analysis BRD + doc scan (ultrathink) | `2-business-requirements.md` |
135
+ | 4 | `/business-analyse:4-specify` | sonnet | Functional specifications FRD (ultrathink) | `3-functional-specification.md` |
136
+ | 5 | `/business-analyse:5-validate` | haiku | User validation gate | `validation.json` |
137
+ | 6 | `/business-analyse:6-handoff` | **opus** | Development prompt (ultrathink) | `4-development-handoff.md` |
138
+ | -> | **`/implement FEAT-XXX`** | **opus** | **Implement from handoff (skip explore)** | Code files |
139
+ | 7 | `/business-analyse:7-doc-html` | sonnet | **React HTML documentation + Context7** | `FrdDocPage.tsx`, i18n |
140
+ | + | `/business-analyse:bug` | sonnet | Bug documentation | `tracking/bugs/BUG-XXX.md` |
141
+ | * | `/business-analyse:hotfix` | haiku | Urgent fix (lightweight template) | `tracking/hotfixes/HF-XXX.md` |
142
+ | ~ | `/business-analyse:change-request` | sonnet | Formal spec change during dev | `tracking/changes/CR-XXX.md` |
143
+
144
+ ---
145
+
146
+ ## Context7 Integration (MANDATORY for Code Generation)
147
+
148
+ ```
149
+ +==============================================================================+
150
+ | CONTEXT7: Documentation a jour pour generation React |
151
+ +==============================================================================+
152
+ | |
153
+ | Phase 7 (doc-html) MUST use Context7 for React generation: |
154
+ | |
155
+ | Libraries to reference: |
156
+ | - /facebook/react - React 19 patterns, hooks |
157
+ | - /i18next/react-i18next - useTranslation, Trans |
158
+ | - /remix-run/react-router - Link, useParams, useNavigate |
159
+ | - /lucide-icons/lucide-react - Icons coherents |
160
+ | |
161
+ | Usage pattern in prompts: |
162
+ | "use context7 with /facebook/react and /i18next/react-i18next |
163
+ | to generate {component} following SmartStack documentation patterns" |
164
+ | |
165
+ | WHY: |
166
+ | - Ensures up-to-date React 19 syntax |
167
+ | - Correct i18n hook usage |
168
+ | - Router v7 patterns |
169
+ | - Consistent icon imports |
170
+ | |
171
+ +==============================================================================+
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Artifact Structure
177
+
178
+ ```
179
+ .business-analyse/
180
+ |-- config.json # Global configuration
181
+ |-- glossary.md # Unified business glossary
182
+ |-- .claudeignore # Files ignored by Claude
183
+ |
184
+ |-- business/ # CONTEXT: business ONLY
185
+ | +-- {application}/ # APPLICATION level
186
+ | |-- context.md # Application context
187
+ | |-- stakeholders.md # Stakeholders
188
+ | +-- modules/ # MODULE level
189
+ | +-- {module-name}/
190
+ | |-- context.md # Module context
191
+ | +-- features/
192
+ | +-- {FEAT-XXX-name}/
193
+ | |-- 1-discovery.md
194
+ | |-- 2-business-requirements.md
195
+ | |-- 3-functional-specification.md
196
+ | |-- 4-development-handoff.md
197
+ | |-- validation.json
198
+ | +-- tracking/
199
+ | |-- changes/
200
+ | | +-- CR-FEAT-XXX-001.md
201
+ | |-- bugs/
202
+ | +-- hotfixes/
203
+ |
204
+ |-- documentation/
205
+ | |-- data-dictionary/
206
+ | |-- process-flows/
207
+ | +-- architecture-decisions/
208
+ |
209
+ +-- templates/
210
+ |-- discovery.md
211
+ |-- business-requirements.md
212
+ |-- functional-specification.md
213
+ |-- development-handoff.md
214
+ +-- bug-report.md
215
+ ```
216
+
217
+ ---
218
+
219
+ ## HTML Documentation Output (Phase 7)
220
+
221
+ ```
222
+ +==============================================================================+
223
+ | OUTPUT HTML: Documentation integree dans chaque module Business |
224
+ +==============================================================================+
225
+ | |
226
+ | Phase 7 genere la documentation DANS le module (pas dans /docs): |
227
+ | |
228
+ | ROUTE: |
229
+ | /business/{application}/{module}/documentation |
230
+ | |
231
+ | STRUCTURE: |
232
+ | web/smartstack-web/src/pages/business/{app}/{module}/ |
233
+ | |-- IndexPage.tsx # Page principale du module |
234
+ | |-- ListPage.tsx # Liste des entites |
235
+ | |-- CreatePage.tsx # Creation |
236
+ | |-- DetailPage.tsx # Detail |
237
+ | +-- DocumentationPage.tsx # Documentation FRD (PHASE 7) |
238
+ | |
239
+ | I18N: |
240
+ | web/smartstack-web/src/i18n/locales/ |
241
+ | |-- fr/{app}-{module}.json # Cles documentation.* |
242
+ | |-- en/{app}-{module}.json |
243
+ | |-- it/{app}-{module}.json |
244
+ | +-- de/{app}-{module}.json |
245
+ | |
246
+ | ACCES: |
247
+ | - URL: http://localhost:5173/business/{app}/{module}/documentation |
248
+ | - Onglet "Documentation" dans la navigation du module |
249
+ | |
250
+ +==============================================================================+
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Applied Standards
256
+
257
+ | Standard | Application |
258
+ |----------|-------------|
259
+ | **BABOK v3** | 6 Knowledge Areas, elicitation techniques |
260
+ | **IEEE 830** | SRS structure, requirements traceability |
261
+ | **BRD/FRD** | Business needs / specifications separation |
262
+
263
+ ## Feature ID Standards
264
+
265
+ ```
266
+ +==============================================================================+
267
+ | FEATURE ID FORMAT: FEAT-XXX (where XXX is 3-digit number) |
268
+ +==============================================================================+
269
+ | |
270
+ | Format: FEAT-001, FEAT-002, ..., FEAT-999 |
271
+ | Regex: ^FEAT-\d{3}$ |
272
+ | |
273
+ | RELATED IDs: |
274
+ | - Business Rules: BR-XXX (e.g., BR-001) |
275
+ | - Functional Reqs: FR-XXX (e.g., FR-001) |
276
+ | - Use Cases: UC-XXX (e.g., UC-001) |
277
+ | - Bugs: BUG-XXX (e.g., BUG-001) |
278
+ | - Hotfixes: HF-YYYYMMDD-NNN (e.g., HF-20260112-001) |
279
+ | - Change Requests: CR-FEAT-XXX-N (e.g., CR-FEAT-001-001) |
280
+ | |
281
+ | VALIDATION: Each command validates ID format before proceeding. |
282
+ | |
283
+ +==============================================================================+
284
+ ```
285
+
286
+ ## Document Versioning
287
+
288
+ ```
289
+ +==============================================================================+
290
+ | SPECIFICATION VERSIONING: Track changes to documents |
291
+ +==============================================================================+
292
+ | |
293
+ | VERSION FORMAT: Major.Minor (e.g., 1.0, 1.1, 2.0) |
294
+ | |
295
+ | Major version (X.0): |
296
+ | - Significant scope change |
297
+ | - Major revision after validation rejection |
298
+ | - Breaking changes to previously approved specs |
299
+ | |
300
+ | Minor version (X.Y): |
301
+ | - Clarifications, typo fixes |
302
+ | - Minor additions within scope |
303
+ | - Change request implementations |
304
+ | |
305
+ | VERSION HISTORY: Each document maintains a changelog |
306
+ | LOCKED AT HANDOFF: Version is locked when handoff is generated |
307
+ | POST-HANDOFF CHANGES: Require Change Request (CR) process |
308
+ | |
309
+ +==============================================================================+
310
+ ```
311
+
312
+ ## ULTRATHINK Mode Definition
313
+
314
+ ```
315
+ +==============================================================================+
316
+ | ULTRATHINK: Deep Thinking Mode for Complex Analysis |
317
+ +==============================================================================+
318
+ | |
319
+ | ULTRATHINK is a BEHAVIORAL MODE, not a tool or skill to invoke. |
320
+ | |
321
+ | WHEN TO USE: |
322
+ | Phases marked with (ultrathink): discover, analyse, specify, handoff |
323
+ | |
324
+ | HOW IT WORKS: |
325
+ | Claude activates extended thinking to: |
326
+ | - Consider all edge cases before responding |
327
+ | - Challenge assumptions aggressively |
328
+ | - Generate comprehensive outputs |
329
+ | - Validate completeness before outputting |
330
+ | |
331
+ | MODEL REQUIREMENT: |
332
+ | ULTRATHINK phases require OPUS model for best results. |
333
+ | Other models may produce less thorough analysis. |
334
+ | |
335
+ | NOT A SKILL INVOCATION: |
336
+ | Do NOT call Skill("ultrathink"). It is a behavioral instruction. |
337
+ | |
338
+ +==============================================================================+
339
+ ```
340
+
341
+ ## Model Strategy
342
+
343
+ ```
344
+ +==============================================================================+
345
+ | MODEL REQUIREMENTS: Quality First, Then Cost Optimization |
346
+ +==============================================================================+
347
+ | |
348
+ | OPUS (Critical phases - deep reasoning required): |
349
+ | - 2-discover: Exhaustive elicitation, challenge assumptions |
350
+ | - 6-handoff: One-shot prompt generation, zero ambiguity |
351
+ | - /implement: Production code generation |
352
+ | |
353
+ | SONNET (Analysis phases - balanced reasoning): |
354
+ | - 3-analyse: Business modeling, process documentation |
355
+ | - 4-specify: Technical specifications, edge cases |
356
+ | - 7-doc-html: React component generation with Context7 |
357
+ | - change-request: Impact analysis, decision matrix |
358
+ | - bug: Root cause analysis |
359
+ | |
360
+ | HAIKU (Simple phases - template execution): |
361
+ | - 1-init: Structure setup, no decisions |
362
+ | - 5-validate: Approval gate, yes/no |
363
+ | - hotfix: Lightweight urgent fix |
364
+ | |
365
+ | PRINCIPLE: Never sacrifice quality for cost savings. |
366
+ | Each model is the MINIMUM capable of delivering quality output. |
367
+ | |
368
+ +==============================================================================+
369
+ ```
370
+
371
+ ## Permission Specifications
372
+
373
+ ```
374
+ +==============================================================================+
375
+ | PERMISSIONS IN HANDOFF: Must be EXPLICIT and IMPLEMENTABLE |
376
+ +==============================================================================+
377
+ | |
378
+ | CONTEXT RESTRICTION: |
379
+ | All permissions MUST start with "business." prefix |
380
+ | Format: business.{application}.{module}.{action} |
381
+ | |
382
+ | The 6-handoff includes a dedicated Section 7 for permissions: |
383
+ | |
384
+ | 7.1 [EXPLORE] - Discover existing permission patterns |
385
+ | 7.2 Permission Keys - Exact string codes (e.g., "business.crm.contacts.read")|
386
+ | 7.3 Role-Permission Matrix - Who can do what |
387
+ | 7.4 Endpoint-Permission Mapping - API protection |
388
+ | 7.5 UI Permission Checks - Button visibility rules |
389
+ | 7.6 Implementation Checklist - Step-by-step |
390
+ | |
391
+ | MANDATORY in Gherkin scenarios: |
392
+ | - At least 1 permission denial scenario |
393
+ | - API 403 response test |
394
+ | - UI element visibility test |
395
+ | |
396
+ | "Admin can create" is NOT enough. |
397
+ | "POST /api/business/crm/contacts requires business.crm.contacts.create" IS. |
398
+ | |
399
+ +==============================================================================+
400
+ ```
401
+
402
+ ## Golden Rules
403
+
404
+ 1. **NEVER code** - BA produces specs, not code. NO C#, JS, SQL, Razor in any document.
405
+ 2. **BUSINESS ONLY** - Only business context allowed. Platform/Personal/System are forbidden.
406
+ 3. **ULTRATHINK mandatory** - Phases 2, 3, 4, 6 use deep thinking
407
+ 4. **Model per phase** - Use correct model (opus/sonnet/haiku) per phase complexity
408
+ 5. **Structure respected** - Business > Application > Module > Feature
409
+ 6. **Traceability** - Each requirement has a unique ID
410
+ 7. **User validation** - Phase 5 MUST be approved before handoff
411
+ 8. **NOK -> Revise** - Rejected specs return to ANALYSE phase
412
+ 9. **Maintained glossary** - Business terms documented
413
+ 10. **Optimized prompts** - Handoff ready for one-shot implementation
414
+ 11. **Tables over code** - Use attribute tables, not class definitions
415
+ 12. **Explore-First** - Handoff instructs developer to explore existing patterns
416
+ 13. **Explicit permissions** - business.* prefix, endpoint mapping, Gherkin tests mandatory
417
+ 14. **Context7 for React** - Phase 7 MUST use Context7 for React generation
418
+ 15. **4-language i18n** - FR, EN, IT, DE mandatory for HTML documentation
419
+
420
+ ---
421
+
422
+ ## Quick Start
423
+
424
+ ```bash
425
+ # 1. Initialize project (scans code structure)
426
+ /business-analyse:1-init
427
+
428
+ # 2. New feature - Discovery (OPUS + ULTRATHINK)
429
+ /business-analyse:2-discover {application} {module} "Need description"
430
+
431
+ # 3. Analyze (scans existing docs for consistency)
432
+ /business-analyse:3-analyse FEAT-001
433
+
434
+ # 4. Specify functional requirements
435
+ /business-analyse:4-specify FEAT-001
436
+
437
+ # 5. User validates (REQUIRED before handoff)
438
+ /business-analyse:5-validate FEAT-001
439
+ # -> If NOK: Return to /business-analyse:3-analyse with feedback
440
+
441
+ # 6. Generate dev prompt (after approval)
442
+ /business-analyse:6-handoff FEAT-001
443
+
444
+ # 7. IMPLEMENT the feature from handoff (RECOMMENDED)
445
+ /implement FEAT-001
446
+ # -> Reads handoff, discovers patterns, generates code
447
+ # -> Skips exploration (already done by BA)
448
+
449
+ # 8. Generate HTML documentation (Context7 + React)
450
+ /business-analyse:7-doc-html FEAT-001
451
+ # -> Creates DocumentationPage.tsx in module folder
452
+ # -> Adds documentation.* keys to i18n (4 languages)
453
+ # -> Adds route: /business/{app}/{module}/documentation
454
+ # -> Adds "Documentation" tab in module navigation
455
+ ```
456
+
457
+ ---
458
+
459
+ ## One-Shot Feature avec Ralph-Loop (RECOMMANDE)
460
+
461
+ ```
462
+ ╔══════════════════════════════════════════════════════════════════════════════╗
463
+ ║ RALPH-LOOP: Iteration autonome avec tracking d'état ║
464
+ ╠══════════════════════════════════════════════════════════════════════════════╣
465
+ ║ ║
466
+ ║ Ralph-Loop permet a Claude d'iterer automatiquement avec MEMOIRE ║
467
+ ║ persistante via fichiers: ║
468
+ ║ ║
469
+ ║ FICHIERS RALPH (créés automatiquement): ║
470
+ ║ ├── prd.json → Liste des tâches avec statut "passes": true/false ║
471
+ ║ └── progress.txt → Mémoire persistante entre itérations ║
472
+ ║ ║
473
+ ║ PROCESSUS PAR ITERATION: ║
474
+ ║ 1. Lire prd.json → Trouver prochaine tâche "passes": false ║
475
+ ║ 2. Lire progress.txt → Comprendre le contexte ║
476
+ ║ 3. Travailler sur UNE SEULE tâche ║
477
+ ║ 4. git commit ║
478
+ ║ 5. Mettre à jour prd.json → "passes": true ║
479
+ ║ 6. Ajouter apprentissages à progress.txt ║
480
+ ║ 7. Si TOUTES tâches "passes": true → <promise>COMPLETE</promise> ║
481
+ ║ ║
482
+ ║ SIGNAL DE FIN UNIFIÉ: <promise>COMPLETE</promise> ║
483
+ ║ ║
484
+ ╚══════════════════════════════════════════════════════════════════════════════╝
485
+ ```
486
+
487
+ ### Usage recommande
488
+
489
+ ```bash
490
+ # DISCOVERY avec ralph-loop (specs en beton)
491
+ /ralph-loop "/business-analyse:2-discover FEAT-001" \
492
+ --completion-promise "COMPLETE" \
493
+ --max-iterations 15
494
+
495
+ # ... phases 3-5 normales (analyse, specify, validate) ...
496
+
497
+ # HANDOFF avec ralph-loop (optionnel - garantie completude)
498
+ /ralph-loop "/business-analyse:6-handoff FEAT-001" \
499
+ --completion-promise "COMPLETE" \
500
+ --max-iterations 10
501
+
502
+ # IMPLEMENTATION avec ralph-loop (one-shot complet)
503
+ /ralph-loop "/implement FEAT-001" \
504
+ --completion-promise "COMPLETE" \
505
+ --max-iterations 25
506
+ ```
507
+
508
+ ### Flux simplifie
509
+
510
+ ```
511
+ DISCOVERY (Ralph) PHASES 3-5 HANDOFF (Ralph?) VALIDATE IMPLEMENT (Ralph)
512
+ +------------------+ +-----------+ +----------------+ +---------+ +------------------+
513
+ | prd.json: 9 tasks|>| Analyse |->| prd.json: 11 |>| HUMAIN |>| prd.json: 18 |
514
+ | progress.txt | | Specify | | tasks | | OK/NOK | | tasks |
515
+ | UNE tâche/iter | | | | progress.txt | | | | progress.txt |
516
+ +------------------+ +-----------+ +----------------+ +---------+ +------------------+
517
+ OPUS + Ralph OPUS + Ralph? OPUS + Ralph
518
+ ```
519
+
520
+ ### Couts estimes
521
+
522
+ | Phase | Mode | Iterations | Cout |
523
+ |-------|------|------------|------|
524
+ | Discovery | One-shot | 1 | ~$0.30 |
525
+ | Discovery | Ralph-loop | 5-15 | ~$1.50-4.50 |
526
+ | Handoff | One-shot | 1 | ~$0.35 |
527
+ | Handoff | Ralph-loop | 3-10 | ~$1.00-2.50 |
528
+ | Implement | One-shot | 1 | ~$2.00 |
529
+ | Implement | Ralph-loop | 10-25 | ~$5.00-15.00 |
530
+
531
+ ### Prerequis
532
+
533
+ Le plugin `ralph-loop` doit etre installe:
534
+ ```bash
535
+ smartstack install # Installe automatiquement ralph-loop
536
+ # ou manuellement:
537
+ claude plugin install ralph-loop@claude-plugins-official
538
+ ```
539
+
540
+ ### Fichiers Ralph créés par phase
541
+
542
+ | Phase | prd.json tasks | Description |
543
+ |-------|----------------|-------------|
544
+ | Discovery | 9 tâches | Catégories du 1-discovery.md |
545
+ | Handoff | 11 tâches | Sections du 4-development-handoff.md |
546
+ | Implement | 18 tâches | Backend/Frontend/Integrations/Tests |
547
+
548
+ ---
549
+
550
+ ## Post-Implementation Changes
551
+
552
+ ```bash
553
+ # Bug discovered after implementation:
554
+ /business-analyse:bug FEAT-001
555
+ # -> Root cause analysis (5 Whys)
556
+ # -> Links to impacted BR/FR/UC
557
+
558
+ # Urgent fix needed in production:
559
+ /business-analyse:hotfix
560
+ # -> Lightweight template
561
+ # -> Quick fix prompt
562
+
563
+ # Scope change requested after handoff:
564
+ /business-analyse:change-request FEAT-001 "Add preview feature to page X"
565
+ # -> Documents change, generates implementation prompt
566
+ # -> For small changes: offers immediate implementation
567
+ ```
568
+
569
+ ---
570
+
571
+ ## Skill Reference
572
+
573
+ The BA workflow also has a skill for automatic invocation:
574
+
575
+ ```yaml
576
+ # Skill: /skills/business-analyse/SKILL.md
577
+ name: business-analyse
578
+ description: |
579
+ Analyses business requirements and generates functional specifications (FRD) for SmartStack.
580
+ Produces HTML documentation in the web project. Restricted to Business context only.
581
+ ```
582
+
583
+ The skill is triggered automatically when user asks about:
584
+ - Business analysis, specifications, FRD
585
+ - User stories, business rules
586
+ - Functional requirements
587
+
588
+ ---
589
+
590
+ ## Next
591
+
592
+ **Mode automatique (RECOMMANDE):**
593
+ ```bash
594
+ /business-analyse "Description de votre besoin"
595
+ ```
596
+
597
+ **Mode manuel:**
598
+ ```bash
599
+ /business-analyse:1-init
600
+ ```
601
+
602
+ ---
603
+
604
+ ## EXECUTION AUTOMATIQUE
605
+
606
+ Si cette commande est appelee avec un argument (description du besoin):
607
+
608
+ ```
609
+ ARGUMENTS = "$ARGUMENTS"
610
+
611
+ SI ARGUMENTS non vide:
612
+ → Executer /business-analyse:0-orchestrate $ARGUMENTS
613
+ → Le workflow complet est lance automatiquement
614
+
615
+ SINON:
616
+ → Afficher ce fichier d'aide
617
+ → Proposer les options
618
+ ```
619
+
620
+ **Lancer le mode automatique maintenant:**
621
+
622
+ ```javascript
623
+ if (ARGUMENTS && ARGUMENTS.trim().length > 0) {
624
+ // Mode automatique - lancer l'orchestration
625
+ execute("/business-analyse:0-orchestrate " + ARGUMENTS);
626
+ } else {
627
+ // Mode manuel - afficher l'aide et proposer les options
628
+ AskUserQuestion({
629
+ questions: [{
630
+ question: "Comment souhaitez-vous proceder?",
631
+ header: "Mode",
632
+ options: [
633
+ { label: "Mode automatique (Recommande)", description: "Orchestration complete avec Ralph Loop" },
634
+ { label: "Mode manuel", description: "Executer les phases une par une" }
635
+ ],
636
+ multiSelect: false
637
+ }]
638
+ });
639
+ }
640
+ ```