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