@atlashub/smartstack-cli 1.11.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.documentation/agents.html +7 -2
  2. package/.documentation/apex.html +7 -2
  3. package/.documentation/business-analyse.html +7 -2
  4. package/.documentation/cli-commands.html +871 -0
  5. package/.documentation/commands.html +7 -2
  6. package/.documentation/efcore.html +7 -2
  7. package/.documentation/gitflow.html +7 -2
  8. package/.documentation/hooks.html +7 -2
  9. package/.documentation/index.html +7 -2
  10. package/.documentation/init.html +7 -2
  11. package/.documentation/installation.html +7 -2
  12. package/.documentation/ralph-loop.html +7 -2
  13. package/.documentation/test-web.html +7 -2
  14. package/dist/index.js +1932 -336
  15. package/dist/index.js.map +1 -1
  16. package/package.json +8 -2
  17. package/templates/agents/efcore/squash.md +67 -31
  18. package/templates/agents/gitflow/finish.md +68 -56
  19. package/templates/commands/business-analyse/0-orchestrate.md +72 -556
  20. package/templates/commands/business-analyse/1-init.md +23 -193
  21. package/templates/commands/business-analyse/2-discover.md +85 -462
  22. package/templates/commands/business-analyse/3-analyse.md +40 -342
  23. package/templates/commands/business-analyse/4-specify.md +72 -537
  24. package/templates/commands/business-analyse/5-validate.md +43 -237
  25. package/templates/commands/business-analyse/6-handoff.md +93 -682
  26. package/templates/commands/business-analyse/7-doc-html.md +45 -544
  27. package/templates/commands/business-analyse/_shared.md +176 -0
  28. package/templates/commands/business-analyse/bug.md +50 -257
  29. package/templates/commands/business-analyse/change-request.md +59 -283
  30. package/templates/commands/business-analyse/hotfix.md +36 -120
  31. package/templates/commands/business-analyse.md +55 -574
  32. package/templates/commands/efcore/_shared.md +206 -0
  33. package/templates/commands/efcore/conflicts.md +39 -201
  34. package/templates/commands/efcore/db-deploy.md +28 -237
  35. package/templates/commands/efcore/db-reset.md +41 -390
  36. package/templates/commands/efcore/db-seed.md +44 -323
  37. package/templates/commands/efcore/db-status.md +31 -210
  38. package/templates/commands/efcore/migration.md +45 -368
  39. package/templates/commands/efcore/rebase-snapshot.md +38 -241
  40. package/templates/commands/efcore/scan.md +35 -204
  41. package/templates/commands/efcore/squash.md +158 -251
  42. package/templates/commands/efcore.md +49 -177
  43. package/templates/commands/gitflow/1-init.md +94 -1318
  44. package/templates/commands/gitflow/10-start.md +86 -990
  45. package/templates/commands/gitflow/11-finish.md +264 -454
  46. package/templates/commands/gitflow/12-cleanup.md +40 -213
  47. package/templates/commands/gitflow/2-status.md +51 -386
  48. package/templates/commands/gitflow/3-commit.md +108 -801
  49. package/templates/commands/gitflow/4-plan.md +42 -13
  50. package/templates/commands/gitflow/5-exec.md +60 -5
  51. package/templates/commands/gitflow/6-abort.md +54 -277
  52. package/templates/commands/gitflow/7-pull-request.md +74 -717
  53. package/templates/commands/gitflow/8-review.md +51 -178
  54. package/templates/commands/gitflow/9-merge.md +74 -404
  55. package/templates/commands/gitflow/_shared.md +196 -0
  56. package/templates/commands/quickstart.md +154 -0
  57. package/templates/commands/ralph-loop/ralph-loop.md +104 -2
  58. package/templates/hooks/hooks.json +13 -0
  59. package/templates/hooks/ralph-mcp-logger.sh +46 -0
  60. package/templates/hooks/ralph-session-end.sh +69 -0
  61. package/templates/ralph/README.md +91 -0
  62. package/templates/ralph/ralph.config.yaml +113 -0
  63. package/templates/scripts/setup-ralph-loop.sh +173 -0
  64. package/templates/skills/_shared.md +117 -0
  65. package/templates/skills/ai-prompt/SKILL.md +87 -654
  66. package/templates/skills/application/SKILL.md +76 -499
  67. package/templates/skills/controller/SKILL.md +38 -165
  68. package/templates/skills/documentation/SKILL.md +2 -1
  69. package/templates/skills/feature-full/SKILL.md +107 -732
  70. package/templates/skills/notification/SKILL.md +85 -474
  71. package/templates/skills/ui-components/SKILL.md +62 -762
  72. package/templates/skills/workflow/SKILL.md +85 -489
  73. package/templates/commands/gitflow/rescue.md +0 -867
  74. package/templates/skills/business-analyse/SKILL.md +0 -191
@@ -5,636 +5,117 @@ argument-hint: "<description du besoin>"
5
5
 
6
6
  # Business Analysis - Expert Workflow
7
7
 
8
- Senior Business Analyst expert. Complete business analysis without writing code.
8
+ > **Ref:** Fonctions communes dans [_shared.md](business-analyse/_shared.md)
9
9
 
10
- ---
10
+ Senior BA expert. Produce specs, NOT code.
11
11
 
12
- ## MODE AUTOMATIQUE (RECOMMANDE)
12
+ ---
13
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
- ```
14
+ ## Mode Automatique (Recommandé)
31
15
 
32
- **Usage:**
33
16
  ```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 ...
17
+ /business-analyse "Je veux gérer les contacts clients avec import/export"
40
18
  ```
41
19
 
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
- ```
20
+ Orchestre: MCP check → Contexte → Phases 1-7 → Implementation → Documentation HTML
59
21
 
60
22
  ---
61
23
 
62
- ## PHASE 0: BUSINESS CONTEXT RESTRICTION (CRITICAL)
24
+ ## Workflow 7 Phases
63
25
 
64
26
  ```
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
27
+ INIT → DISCOVER → ANALYSE → SPECIFY → VALIDATE → HANDOFF → DOC-HTML
28
+ │ │ │ │ │ │ │
29
+ v v v v v v v
30
+ Setup Discovery BRD.md FRD.md Approval Prompt React
31
+ Haiku Opus Sonnet Sonnet Haiku Opus Sonnet
97
32
  ```
98
33
 
99
34
  ---
100
35
 
101
- ## 7-Phase Workflow (Updated)
36
+ ## Commandes
102
37
 
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
- ```
38
+ | Phase | Commande | Modèle | Output |
39
+ |-------|----------|--------|--------|
40
+ | AUTO | `/business-analyse` | opus | Feature complète |
41
+ | 0 | `:0-orchestrate` | opus | context.json, prd.json |
42
+ | 1 | `:1-init` | haiku | Structure + config.json |
43
+ | 2 | `:2-discover` | opus | 1-discovery.md |
44
+ | 3 | `:3-analyse` | sonnet | 2-brd.md |
45
+ | 4 | `:4-specify` | sonnet | 3-frd.md |
46
+ | 5 | `:5-validate` | haiku | validation.json |
47
+ | 6 | `:6-handoff` | opus | 4-handoff.md |
48
+ | 7 | `:7-doc-html` | sonnet | DocumentationPage.tsx |
49
+ | + | `:bug` | sonnet | BUG-XXX.md |
50
+ | | `:hotfix` | haiku | HF-XXX.md |
51
+ | 🔄 | `:change-request` | sonnet | CR-XXX.md |
122
52
 
123
53
  ---
124
54
 
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` |
55
+ ## Restriction Contexte
143
56
 
144
- ---
57
+ **BUSINESS uniquement** - Refuser platform/personal/system
145
58
 
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
- ```
59
+ Permission path: `business.{application}.{module}.{action}`
173
60
 
174
61
  ---
175
62
 
176
- ## Artifact Structure
63
+ ## Règles Absolues
177
64
 
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
- ```
65
+ 1. **JAMAIS de code** dans les specs (tables, diagrammes textuels uniquement)
66
+ 2. **ULTRATHINK** obligatoire phases 2, 3, 4, 6
67
+ 3. **Validation Phase 5** obligatoire avant handoff
68
+ 4. **NOK ANALYSE** (réviser si rejeté)
69
+ 5. **Context7** obligatoire pour génération React (phase 7)
70
+ 6. **4 langues i18n** (FR, EN, IT, DE)
216
71
 
217
72
  ---
218
73
 
219
- ## HTML Documentation Output (Phase 7)
74
+ ## Feature ID Format
220
75
 
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
76
+ - Feature: `FEAT-XXX`
77
+ - Business Rule: `BR-XXX`
78
+ - Functional Req: `FR-XXX`
79
+ - Use Case: `UC-XXX`
80
+ - Bug: `BUG-XXX`
81
+ - Hotfix: `HF-YYYYMMDD-NNN`
82
+ - Change Request: `CR-FEAT-XXX-N`
419
83
 
420
84
  ---
421
85
 
422
86
  ## Quick Start
423
87
 
424
88
  ```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"
89
+ # Mode automatique
90
+ /business-analyse "Description du besoin"
430
91
 
431
- # 3. Analyze (scans existing docs for consistency)
92
+ # Mode manuel
93
+ /business-analyse:1-init
94
+ /business-analyse:2-discover {app} {module} "Description"
432
95
  /business-analyse:3-analyse FEAT-001
433
-
434
- # 4. Specify functional requirements
435
96
  /business-analyse:4-specify FEAT-001
436
-
437
- # 5. User validates (REQUIRED before handoff)
438
97
  /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
98
  /business-analyse:6-handoff FEAT-001
443
-
444
- # 7. IMPLEMENT the feature from handoff (RECOMMENDED)
445
99
  /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
100
  /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
101
  ```
539
102
 
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
103
  ---
589
104
 
590
- ## Next
105
+ ## Post-Implementation
591
106
 
592
- **Mode automatique (RECOMMANDE):**
593
107
  ```bash
594
- /business-analyse "Description de votre besoin"
595
- ```
596
-
597
- **Mode manuel:**
598
- ```bash
599
- /business-analyse:1-init
108
+ /business-analyse:bug FEAT-001 # Bug découvert
109
+ /business-analyse:hotfix # Fix urgent
110
+ /business-analyse:change-request FEAT-001 # Changement scope
600
111
  ```
601
112
 
602
113
  ---
603
114
 
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:**
115
+ ## Exécution Auto
621
116
 
622
117
  ```javascript
623
118
  if (ARGUMENTS && ARGUMENTS.trim().length > 0) {
624
- // Mode automatique - lancer l'orchestration
625
119
  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
120
  }
640
121
  ```