@atlashub/smartstack-cli 1.5.1 → 1.5.3

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,477 +1,477 @@
1
- # Templates FRD - Business Analyse
2
-
3
- > **Usage:** Templates pour les documents de spécification fonctionnelle (FRD)
4
- > **Contexte:** Business > Application > Module > Section
5
-
6
- ---
7
-
8
- ## Template 1-discovery.md
9
-
10
- ```markdown
11
- # Discovery - {FEAT-XXX} {Feature Name}
12
-
13
- > **Module:** business/{application}/{module}
14
- > **Version:** 1.0
15
- > **Date:** {YYYY-MM-DD}
16
- > **Auteur:** Business Analyst
17
-
18
- ## 1. Contexte Business
19
-
20
- ### 1.1 Description du besoin
21
- {Description claire du besoin métier exprimé par le stakeholder}
22
-
23
- ### 1.2 Problème actuel
24
- {Situation actuelle et ses limitations}
25
-
26
- ### 1.3 Valeur attendue
27
- {Bénéfices business mesurables}
28
-
29
- ## 2. Stakeholders
30
-
31
- | Rôle | Nom/Fonction | Implication | Niveau décision |
32
- |------|--------------|-------------|-----------------|
33
- | Sponsor | {nom} | {description} | Approbateur |
34
- | Product Owner | {nom} | {description} | Décideur |
35
- | Utilisateur clé | {nom} | {description} | Consulté |
36
-
37
- ## 3. Périmètre
38
-
39
- ### 3.1 In Scope
40
- - [ ] {Fonctionnalité incluse 1}
41
- - [ ] {Fonctionnalité incluse 2}
42
-
43
- ### 3.2 Out of Scope
44
- - {Exclusion explicite 1}
45
- - {Exclusion explicite 2}
46
-
47
- ## 4. Questions ouvertes
48
-
49
- | # | Question | Réponse | Statut |
50
- |---|----------|---------|--------|
51
- | Q1 | {Question} | {Réponse ou "En attente"} | ⏳/✅ |
52
-
53
- ## 5. Contraintes identifiées
54
-
55
- | Type | Contrainte | Impact |
56
- |------|------------|--------|
57
- | Technique | {contrainte} | {impact} |
58
- | Budget | {contrainte} | {impact} |
59
- | Délai | {contrainte} | {impact} |
60
- | Réglementaire | {contrainte} | {impact} |
61
-
62
- ## 6. Dépendances
63
-
64
- | Dépendance | Type | Module/Système | Criticité |
65
- |------------|------|----------------|-----------|
66
- | {dép} | Interne/Externe | {module} | Haute/Moyenne/Basse |
67
-
68
- ---
69
-
70
- ## Historique des versions
71
-
72
- | Version | Date | Auteur | Modifications |
73
- |---------|------|--------|---------------|
74
- | 1.0 | {date} | BA | Création initiale |
75
- ```
76
-
77
- ---
78
-
79
- ## Template 2-brd.md (Business Requirements Document)
80
-
81
- ```markdown
82
- # BRD - {FEAT-XXX} {Feature Name}
83
-
84
- > **Module:** business/{application}/{module}
85
- > **Version:** 1.0
86
- > **Basé sur:** 1-discovery.md v1.0
87
-
88
- ## 1. Résumé exécutif
89
-
90
- {Synthèse en 3-5 phrases du besoin business et de la solution proposée}
91
-
92
- ## 2. Objectifs business
93
-
94
- | ID | Objectif | Métrique | Cible |
95
- |----|----------|----------|-------|
96
- | OBJ-001 | {objectif} | {KPI mesurable} | {valeur cible} |
97
-
98
- ## 3. Règles métier
99
-
100
- | ID | Règle | Catégorie | Priorité |
101
- |----|-------|-----------|----------|
102
- | BR-001 | {Description de la règle métier} | Validation/Calcul/Workflow | Must/Should/Could |
103
- | BR-002 | {Description} | {catégorie} | {priorité} |
104
-
105
- ### 3.1 Détail des règles critiques
106
-
107
- #### BR-001: {Nom règle}
108
-
109
- **Énoncé:** {Formulation précise de la règle}
110
-
111
- **Conditions:**
112
- - SI {condition A}
113
- - ET {condition B}
114
- - ALORS {résultat}
115
- - SINON {résultat alternatif}
116
-
117
- **Exemples:**
118
- | Entrée | Sortie attendue |
119
- |--------|-----------------|
120
- | {exemple 1} | {résultat 1} |
121
- | {exemple 2} | {résultat 2} |
122
-
123
- ## 4. Processus métier
124
-
125
- ### 4.1 Processus principal
126
-
127
- ```
128
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
129
- │ Étape 1 │────►│ Étape 2 │────►│ Étape 3 │
130
- │ {action} │ │ {action} │ │ {action} │
131
- └─────────────┘ └─────────────┘ └─────────────┘
132
- │ │ │
133
- ▼ ▼ ▼
134
- {acteur} {acteur} {acteur}
135
- ```
136
-
137
- ### 4.2 Flux alternatifs
138
-
139
- | Déclencheur | Flux | Résultat |
140
- |-------------|------|----------|
141
- | {condition} | {description du flux} | {état final} |
142
-
143
- ## 5. Données métier
144
-
145
- ### 5.1 Entités principales
146
-
147
- | Entité | Description | Cardinalité |
148
- |--------|-------------|-------------|
149
- | {Entité} | {description} | 1:N avec {autre entité} |
150
-
151
- ### 5.2 Attributs clés (PAS de types techniques)
152
-
153
- | Entité | Attribut | Description | Obligatoire |
154
- |--------|----------|-------------|-------------|
155
- | {Entité} | {attribut} | {description métier} | Oui/Non |
156
-
157
- ## 6. Intégrations
158
-
159
- | Système | Direction | Données | Fréquence |
160
- |---------|-----------|---------|-----------|
161
- | {système} | Entrée/Sortie/Bidirectionnel | {données} | Temps réel/Batch |
162
-
163
- ---
164
-
165
- ## Historique des versions
166
-
167
- | Version | Date | Auteur | Modifications |
168
- |---------|------|--------|---------------|
169
- | 1.0 | {date} | BA | Création initiale |
170
- ```
171
-
172
- ---
173
-
174
- ## Template 3-frd.md (Functional Requirements Document)
175
-
176
- ```markdown
177
- # FRD - {FEAT-XXX} {Feature Name}
178
-
179
- > **Module:** business/{application}/{module}
180
- > **Version:** 1.0
181
- > **Basé sur:** 2-brd.md v1.0
182
- > **Permission path:** business.{application}.{module}.*
183
-
184
- ## 1. Vue d'ensemble
185
-
186
- ### 1.1 Objectif fonctionnel
187
- {Description de ce que le système doit faire}
188
-
189
- ### 1.2 Acteurs
190
-
191
- | Acteur | Description | Permissions requises |
192
- |--------|-------------|---------------------|
193
- | {Rôle} | {description} | `business.{app}.{module}.{action}` |
194
-
195
- ## 2. Cas d'utilisation
196
-
197
- ### UC-001: {Nom du cas d'utilisation}
198
-
199
- | Attribut | Valeur |
200
- |----------|--------|
201
- | **ID** | UC-001 |
202
- | **Nom** | {Nom} |
203
- | **Acteur principal** | {Rôle} |
204
- | **Préconditions** | {conditions requises} |
205
- | **Postconditions** | {état final} |
206
- | **Permission** | `business.{app}.{module}.{action}` |
207
-
208
- **Scénario principal:**
209
- 1. L'utilisateur {action}
210
- 2. Le système {réponse}
211
- 3. L'utilisateur {action}
212
- 4. Le système {réponse}
213
-
214
- **Scénarios alternatifs:**
215
-
216
- | # | Condition | Étapes |
217
- |---|-----------|--------|
218
- | 3a | {condition} | 3a.1 {action}, 3a.2 {action} |
219
-
220
- **Scénarios d'erreur:**
221
-
222
- | # | Erreur | Message | Action |
223
- |---|--------|---------|--------|
224
- | E1 | {erreur} | {message utilisateur} | {comportement} |
225
-
226
- ## 3. Exigences fonctionnelles
227
-
228
- | ID | Exigence | UC lié | Priorité |
229
- |----|----------|--------|----------|
230
- | FR-001 | {Le système DOIT...} | UC-001 | Must |
231
- | FR-002 | {Le système DEVRAIT...} | UC-001 | Should |
232
-
233
- ### 3.1 Détail FR-001
234
-
235
- **Énoncé:** Le système DOIT {action spécifique}
236
-
237
- **Critères d'acceptation:**
238
- - [ ] {Critère mesurable 1}
239
- - [ ] {Critère mesurable 2}
240
-
241
- **Règles associées:** BR-001, BR-002
242
-
243
- ## 4. Interface utilisateur
244
-
245
- ### 4.1 Wireframe - Écran principal
246
-
247
- ```
248
- ┌─────────────────────────────────────────────────────────────┐
249
- │ [Logo] {Module Name} [User] [Menu] │
250
- ├─────────────────────────────────────────────────────────────┤
251
- │ │
252
- │ ┌─────────────────────────────────────────────────────┐ │
253
- │ │ FILTRE │ │
254
- │ │ [Champ 1 ▼] [Champ 2 ▼] [Rechercher] │ │
255
- │ └─────────────────────────────────────────────────────┘ │
256
- │ │
257
- │ ┌─────────────────────────────────────────────────────┐ │
258
- │ │ TABLEAU │ │
259
- │ │ ┌────────┬────────┬────────┬─────────┐ │ │
260
- │ │ │ Col 1 │ Col 2 │ Col 3 │ Actions │ │ │
261
- │ │ ├────────┼────────┼────────┼─────────┤ │ │
262
- │ │ │ data │ data │ data │ [E] [D] │ │ │
263
- │ │ └────────┴────────┴────────┴─────────┘ │ │
264
- │ └─────────────────────────────────────────────────────┘ │
265
- │ │
266
- │ [+ Nouveau] [< Prev] [Next >] │
267
- │ │
268
- └─────────────────────────────────────────────────────────────┘
269
- ```
270
-
271
- ### 4.2 Description des éléments UI
272
-
273
- | Élément | Type | Comportement | Permission |
274
- |---------|------|--------------|------------|
275
- | [+ Nouveau] | Bouton | Ouvre modal création | `{module}.create` |
276
- | [E] | Icône | Ouvre modal édition | `{module}.update` |
277
- | [D] | Icône | Confirmation + suppression | `{module}.delete` |
278
-
279
- ## 5. Validation et messages
280
-
281
- ### 5.1 Validations
282
-
283
- | Champ | Règle | Message erreur |
284
- |-------|-------|----------------|
285
- | {champ} | {règle de validation} | {message i18n key} |
286
-
287
- ### 5.2 Messages système
288
-
289
- | Code | Type | Message (clé i18n) |
290
- |------|------|-------------------|
291
- | MSG-001 | Success | `{module}.messages.created` |
292
- | MSG-002 | Error | `{module}.errors.notFound` |
293
-
294
- ## 6. Permissions détaillées
295
-
296
- ### 6.1 Matrice Rôle-Permission
297
-
298
- | Permission | Admin | Manager | User | ReadOnly |
299
- |------------|-------|---------|------|----------|
300
- | `business.{app}.{module}.read` | ✅ | ✅ | ✅ | ✅ |
301
- | `business.{app}.{module}.create` | ✅ | ✅ | ❌ | ❌ |
302
- | `business.{app}.{module}.update` | ✅ | ✅ | ❌ | ❌ |
303
- | `business.{app}.{module}.delete` | ✅ | ❌ | ❌ | ❌ |
304
-
305
- ### 6.2 Mapping Endpoint-Permission
306
-
307
- | Endpoint | Méthode | Permission requise |
308
- |----------|---------|-------------------|
309
- | `/api/business/{module}` | GET | `{module}.read` |
310
- | `/api/business/{module}` | POST | `{module}.create` |
311
- | `/api/business/{module}/{id}` | PUT | `{module}.update` |
312
- | `/api/business/{module}/{id}` | DELETE | `{module}.delete` |
313
-
314
- ## 7. Scénarios Gherkin
315
-
316
- ```gherkin
317
- Feature: {FEAT-XXX} {Feature Name}
318
-
319
- @permission @403
320
- Scenario: User without permission cannot create
321
- Given I am logged in as "user@test.com" with role "ReadOnly"
322
- When I send POST to "/api/business/{module}"
323
- Then the response status should be 403
324
- And the response should contain "Permission denied"
325
-
326
- @happy-path
327
- Scenario: Admin creates new item
328
- Given I am logged in as "admin@test.com" with role "Admin"
329
- And I have permission "business.{app}.{module}.create"
330
- When I send POST to "/api/business/{module}" with:
331
- | field1 | value1 |
332
- | field2 | value2 |
333
- Then the response status should be 201
334
- And the response should contain "id"
335
- ```
336
-
337
- ---
338
-
339
- ## Historique des versions
340
-
341
- | Version | Date | Auteur | Modifications |
342
- |---------|------|--------|---------------|
343
- | 1.0 | {date} | BA | Création initiale |
344
- ```
345
-
346
- ---
347
-
348
- ## Template 4-handoff.md
349
-
350
- ```markdown
351
- # Development Handoff - {FEAT-XXX} {Feature Name}
352
-
353
- > **Module:** business/{application}/{module}
354
- > **Version:** 1.0
355
- > **Specs validées:** FRD v1.0 (validation.json)
356
- > **Implémentation:** `/implement FEAT-XXX`
357
-
358
- ## INSTRUCTIONS DÉVELOPPEUR
359
-
360
- Ce document est un prompt autonome pour Claude Code. Exécutez:
361
- ```
362
- /implement FEAT-XXX
363
- ```
364
-
365
- ---
366
-
367
- ## 1. CONTEXTE RAPIDE
368
-
369
- | Attribut | Valeur |
370
- |----------|--------|
371
- | Feature ID | FEAT-XXX |
372
- | Module | business/{application}/{module} |
373
- | Permission base | `business.{app}.{module}` |
374
- | Complexité | {Simple/Moyenne/Complexe} |
375
-
376
- ## 2. [EXPLORE] PATTERNS EXISTANTS
377
-
378
- AVANT de coder, explorer ces fichiers pour comprendre les patterns:
379
-
380
- ```
381
- BACKEND:
382
- - src/SmartStack.Domain/Entities/ → Structure entités
383
- - src/SmartStack.Application/Features/ → Pattern CQRS
384
- - src/SmartStack.Infrastructure/Persistence/Configurations/ → EF Core
385
-
386
- FRONTEND:
387
- - web/smartstack-web/src/pages/business/ → Pages existantes
388
- - web/smartstack-web/src/components/ → Composants réutilisables
389
- - web/smartstack-web/src/services/api/ → Appels API
390
- ```
391
-
392
- ## 3. FICHIERS À CRÉER
393
-
394
- ### 3.1 Backend
395
-
396
- | Fichier | Template | Description |
397
- |---------|----------|-------------|
398
- | `Domain/Entities/{Entity}.cs` | Entité Domain | Propriétés + règles métier |
399
- | `Application/Features/{Module}/` | CQRS Commands/Queries | Handlers MediatR |
400
- | `Infrastructure/.../Configurations/` | EF Core Config | HasData si seed |
401
- | `Api/Controllers/Business/` | Controller API | Endpoints REST |
402
-
403
- ### 3.2 Frontend
404
-
405
- | Fichier | Template | Description |
406
- |---------|----------|-------------|
407
- | `pages/business/{app}/{module}/` | Page React | Liste + détail |
408
- | `services/api/{module}Api.ts` | Service API | Appels axios |
409
- | `i18n/locales/{lang}/{module}.json` | Traductions | FR, EN, IT, DE |
410
-
411
- ## 4. SPÉCIFICATIONS DÉTAILLÉES
412
-
413
- ### 4.1 Entité (attributs business, pas types C#)
414
-
415
- | Attribut | Description | Obligatoire | Règles |
416
- |----------|-------------|-------------|--------|
417
- | Id | Identifiant unique | Oui | GUID aléatoire |
418
- | {attr} | {description} | {Oui/Non} | {validation} |
419
-
420
- ### 4.2 Endpoints API
421
-
422
- | Endpoint | Méthode | Permission | Body | Response |
423
- |----------|---------|------------|------|----------|
424
- | `/api/business/{module}` | GET | `.read` | - | Liste paginée |
425
- | `/api/business/{module}` | POST | `.create` | CreateDto | 201 + entité |
426
- | `/api/business/{module}/{id}` | GET | `.read` | - | Entité |
427
- | `/api/business/{module}/{id}` | PUT | `.update` | UpdateDto | 200 + entité |
428
- | `/api/business/{module}/{id}` | DELETE | `.delete` | - | 204 |
429
-
430
- ### 4.3 Règles métier à implémenter
431
-
432
- | BR-ID | Règle | Implémentation |
433
- |-------|-------|----------------|
434
- | BR-001 | {règle} | {où l'implémenter} |
435
-
436
- ## 5. TESTS REQUIS
437
-
438
- - [ ] Test unitaire: Validation entité
439
- - [ ] Test integration: Endpoints API (200, 201, 400, 403, 404)
440
- - [ ] Test permission: Refus 403 sans permission
441
- - [ ] Test Postman: Collection générée
442
-
443
- ## 6. CHECKLIST POST-IMPLÉMENTATION
444
-
445
- - [ ] Build backend OK
446
- - [ ] Build frontend OK
447
- - [ ] Tests passent
448
- - [ ] Migration EF Core créée si entité
449
- - [ ] Permissions ajoutées dans PermissionConfiguration.cs
450
- - [ ] i18n complet (4 langues)
451
- - [ ] Documentation générée: `/business-analyse:7-doc-html FEAT-XXX`
452
-
453
- ---
454
-
455
- ## EXÉCUTION
456
-
457
- ```bash
458
- /implement FEAT-XXX
459
- ```
460
-
461
- Options:
462
- - `--phase=1` : Backend seulement
463
- - `--phase=2` : Frontend seulement
464
- - `--phase=3` : Tests seulement
465
- - `--phase=4` : Documentation seulement
466
- ```
467
-
468
- ---
469
-
470
- ## Validation des templates
471
-
472
- Chaque template DOIT:
473
- - [ ] Être en Markdown pur (pas de code technique)
474
- - [ ] Utiliser des tables pour les données structurées
475
- - [ ] Inclure les permissions avec le path complet
476
- - [ ] Avoir un historique de versions
477
- - [ ] Référencer les BR/FR/UC avec des IDs uniques
1
+ # Templates FRD - Business Analyse
2
+
3
+ > **Usage:** Templates pour les documents de spécification fonctionnelle (FRD)
4
+ > **Contexte:** Business > Application > Module > Section
5
+
6
+ ---
7
+
8
+ ## Template 1-discovery.md
9
+
10
+ ```markdown
11
+ # Discovery - {FEAT-XXX} {Feature Name}
12
+
13
+ > **Module:** business/{application}/{module}
14
+ > **Version:** 1.0
15
+ > **Date:** {YYYY-MM-DD}
16
+ > **Auteur:** Business Analyst
17
+
18
+ ## 1. Contexte Business
19
+
20
+ ### 1.1 Description du besoin
21
+ {Description claire du besoin métier exprimé par le stakeholder}
22
+
23
+ ### 1.2 Problème actuel
24
+ {Situation actuelle et ses limitations}
25
+
26
+ ### 1.3 Valeur attendue
27
+ {Bénéfices business mesurables}
28
+
29
+ ## 2. Stakeholders
30
+
31
+ | Rôle | Nom/Fonction | Implication | Niveau décision |
32
+ |------|--------------|-------------|-----------------|
33
+ | Sponsor | {nom} | {description} | Approbateur |
34
+ | Product Owner | {nom} | {description} | Décideur |
35
+ | Utilisateur clé | {nom} | {description} | Consulté |
36
+
37
+ ## 3. Périmètre
38
+
39
+ ### 3.1 In Scope
40
+ - [ ] {Fonctionnalité incluse 1}
41
+ - [ ] {Fonctionnalité incluse 2}
42
+
43
+ ### 3.2 Out of Scope
44
+ - {Exclusion explicite 1}
45
+ - {Exclusion explicite 2}
46
+
47
+ ## 4. Questions ouvertes
48
+
49
+ | # | Question | Réponse | Statut |
50
+ |---|----------|---------|--------|
51
+ | Q1 | {Question} | {Réponse ou "En attente"} | ⏳/✅ |
52
+
53
+ ## 5. Contraintes identifiées
54
+
55
+ | Type | Contrainte | Impact |
56
+ |------|------------|--------|
57
+ | Technique | {contrainte} | {impact} |
58
+ | Budget | {contrainte} | {impact} |
59
+ | Délai | {contrainte} | {impact} |
60
+ | Réglementaire | {contrainte} | {impact} |
61
+
62
+ ## 6. Dépendances
63
+
64
+ | Dépendance | Type | Module/Système | Criticité |
65
+ |------------|------|----------------|-----------|
66
+ | {dép} | Interne/Externe | {module} | Haute/Moyenne/Basse |
67
+
68
+ ---
69
+
70
+ ## Historique des versions
71
+
72
+ | Version | Date | Auteur | Modifications |
73
+ |---------|------|--------|---------------|
74
+ | 1.0 | {date} | BA | Création initiale |
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Template 2-brd.md (Business Requirements Document)
80
+
81
+ ```markdown
82
+ # BRD - {FEAT-XXX} {Feature Name}
83
+
84
+ > **Module:** business/{application}/{module}
85
+ > **Version:** 1.0
86
+ > **Basé sur:** 1-discovery.md v1.0
87
+
88
+ ## 1. Résumé exécutif
89
+
90
+ {Synthèse en 3-5 phrases du besoin business et de la solution proposée}
91
+
92
+ ## 2. Objectifs business
93
+
94
+ | ID | Objectif | Métrique | Cible |
95
+ |----|----------|----------|-------|
96
+ | OBJ-001 | {objectif} | {KPI mesurable} | {valeur cible} |
97
+
98
+ ## 3. Règles métier
99
+
100
+ | ID | Règle | Catégorie | Priorité |
101
+ |----|-------|-----------|----------|
102
+ | BR-001 | {Description de la règle métier} | Validation/Calcul/Workflow | Must/Should/Could |
103
+ | BR-002 | {Description} | {catégorie} | {priorité} |
104
+
105
+ ### 3.1 Détail des règles critiques
106
+
107
+ #### BR-001: {Nom règle}
108
+
109
+ **Énoncé:** {Formulation précise de la règle}
110
+
111
+ **Conditions:**
112
+ - SI {condition A}
113
+ - ET {condition B}
114
+ - ALORS {résultat}
115
+ - SINON {résultat alternatif}
116
+
117
+ **Exemples:**
118
+ | Entrée | Sortie attendue |
119
+ |--------|-----------------|
120
+ | {exemple 1} | {résultat 1} |
121
+ | {exemple 2} | {résultat 2} |
122
+
123
+ ## 4. Processus métier
124
+
125
+ ### 4.1 Processus principal
126
+
127
+ ```
128
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
129
+ │ Étape 1 │────►│ Étape 2 │────►│ Étape 3 │
130
+ │ {action} │ │ {action} │ │ {action} │
131
+ └─────────────┘ └─────────────┘ └─────────────┘
132
+ │ │ │
133
+ ▼ ▼ ▼
134
+ {acteur} {acteur} {acteur}
135
+ ```
136
+
137
+ ### 4.2 Flux alternatifs
138
+
139
+ | Déclencheur | Flux | Résultat |
140
+ |-------------|------|----------|
141
+ | {condition} | {description du flux} | {état final} |
142
+
143
+ ## 5. Données métier
144
+
145
+ ### 5.1 Entités principales
146
+
147
+ | Entité | Description | Cardinalité |
148
+ |--------|-------------|-------------|
149
+ | {Entité} | {description} | 1:N avec {autre entité} |
150
+
151
+ ### 5.2 Attributs clés (PAS de types techniques)
152
+
153
+ | Entité | Attribut | Description | Obligatoire |
154
+ |--------|----------|-------------|-------------|
155
+ | {Entité} | {attribut} | {description métier} | Oui/Non |
156
+
157
+ ## 6. Intégrations
158
+
159
+ | Système | Direction | Données | Fréquence |
160
+ |---------|-----------|---------|-----------|
161
+ | {système} | Entrée/Sortie/Bidirectionnel | {données} | Temps réel/Batch |
162
+
163
+ ---
164
+
165
+ ## Historique des versions
166
+
167
+ | Version | Date | Auteur | Modifications |
168
+ |---------|------|--------|---------------|
169
+ | 1.0 | {date} | BA | Création initiale |
170
+ ```
171
+
172
+ ---
173
+
174
+ ## Template 3-frd.md (Functional Requirements Document)
175
+
176
+ ```markdown
177
+ # FRD - {FEAT-XXX} {Feature Name}
178
+
179
+ > **Module:** business/{application}/{module}
180
+ > **Version:** 1.0
181
+ > **Basé sur:** 2-brd.md v1.0
182
+ > **Permission path:** business.{application}.{module}.*
183
+
184
+ ## 1. Vue d'ensemble
185
+
186
+ ### 1.1 Objectif fonctionnel
187
+ {Description de ce que le système doit faire}
188
+
189
+ ### 1.2 Acteurs
190
+
191
+ | Acteur | Description | Permissions requises |
192
+ |--------|-------------|---------------------|
193
+ | {Rôle} | {description} | `business.{app}.{module}.{action}` |
194
+
195
+ ## 2. Cas d'utilisation
196
+
197
+ ### UC-001: {Nom du cas d'utilisation}
198
+
199
+ | Attribut | Valeur |
200
+ |----------|--------|
201
+ | **ID** | UC-001 |
202
+ | **Nom** | {Nom} |
203
+ | **Acteur principal** | {Rôle} |
204
+ | **Préconditions** | {conditions requises} |
205
+ | **Postconditions** | {état final} |
206
+ | **Permission** | `business.{app}.{module}.{action}` |
207
+
208
+ **Scénario principal:**
209
+ 1. L'utilisateur {action}
210
+ 2. Le système {réponse}
211
+ 3. L'utilisateur {action}
212
+ 4. Le système {réponse}
213
+
214
+ **Scénarios alternatifs:**
215
+
216
+ | # | Condition | Étapes |
217
+ |---|-----------|--------|
218
+ | 3a | {condition} | 3a.1 {action}, 3a.2 {action} |
219
+
220
+ **Scénarios d'erreur:**
221
+
222
+ | # | Erreur | Message | Action |
223
+ |---|--------|---------|--------|
224
+ | E1 | {erreur} | {message utilisateur} | {comportement} |
225
+
226
+ ## 3. Exigences fonctionnelles
227
+
228
+ | ID | Exigence | UC lié | Priorité |
229
+ |----|----------|--------|----------|
230
+ | FR-001 | {Le système DOIT...} | UC-001 | Must |
231
+ | FR-002 | {Le système DEVRAIT...} | UC-001 | Should |
232
+
233
+ ### 3.1 Détail FR-001
234
+
235
+ **Énoncé:** Le système DOIT {action spécifique}
236
+
237
+ **Critères d'acceptation:**
238
+ - [ ] {Critère mesurable 1}
239
+ - [ ] {Critère mesurable 2}
240
+
241
+ **Règles associées:** BR-001, BR-002
242
+
243
+ ## 4. Interface utilisateur
244
+
245
+ ### 4.1 Wireframe - Écran principal
246
+
247
+ ```
248
+ ┌─────────────────────────────────────────────────────────────┐
249
+ │ [Logo] {Module Name} [User] [Menu] │
250
+ ├─────────────────────────────────────────────────────────────┤
251
+ │ │
252
+ │ ┌─────────────────────────────────────────────────────┐ │
253
+ │ │ FILTRE │ │
254
+ │ │ [Champ 1 ▼] [Champ 2 ▼] [Rechercher] │ │
255
+ │ └─────────────────────────────────────────────────────┘ │
256
+ │ │
257
+ │ ┌─────────────────────────────────────────────────────┐ │
258
+ │ │ TABLEAU │ │
259
+ │ │ ┌────────┬────────┬────────┬─────────┐ │ │
260
+ │ │ │ Col 1 │ Col 2 │ Col 3 │ Actions │ │ │
261
+ │ │ ├────────┼────────┼────────┼─────────┤ │ │
262
+ │ │ │ data │ data │ data │ [E] [D] │ │ │
263
+ │ │ └────────┴────────┴────────┴─────────┘ │ │
264
+ │ └─────────────────────────────────────────────────────┘ │
265
+ │ │
266
+ │ [+ Nouveau] [< Prev] [Next >] │
267
+ │ │
268
+ └─────────────────────────────────────────────────────────────┘
269
+ ```
270
+
271
+ ### 4.2 Description des éléments UI
272
+
273
+ | Élément | Type | Comportement | Permission |
274
+ |---------|------|--------------|------------|
275
+ | [+ Nouveau] | Bouton | Ouvre modal création | `{module}.create` |
276
+ | [E] | Icône | Ouvre modal édition | `{module}.update` |
277
+ | [D] | Icône | Confirmation + suppression | `{module}.delete` |
278
+
279
+ ## 5. Validation et messages
280
+
281
+ ### 5.1 Validations
282
+
283
+ | Champ | Règle | Message erreur |
284
+ |-------|-------|----------------|
285
+ | {champ} | {règle de validation} | {message i18n key} |
286
+
287
+ ### 5.2 Messages système
288
+
289
+ | Code | Type | Message (clé i18n) |
290
+ |------|------|-------------------|
291
+ | MSG-001 | Success | `{module}.messages.created` |
292
+ | MSG-002 | Error | `{module}.errors.notFound` |
293
+
294
+ ## 6. Permissions détaillées
295
+
296
+ ### 6.1 Matrice Rôle-Permission
297
+
298
+ | Permission | Admin | Manager | User | ReadOnly |
299
+ |------------|-------|---------|------|----------|
300
+ | `business.{app}.{module}.read` | ✅ | ✅ | ✅ | ✅ |
301
+ | `business.{app}.{module}.create` | ✅ | ✅ | ❌ | ❌ |
302
+ | `business.{app}.{module}.update` | ✅ | ✅ | ❌ | ❌ |
303
+ | `business.{app}.{module}.delete` | ✅ | ❌ | ❌ | ❌ |
304
+
305
+ ### 6.2 Mapping Endpoint-Permission
306
+
307
+ | Endpoint | Méthode | Permission requise |
308
+ |----------|---------|-------------------|
309
+ | `/api/business/{module}` | GET | `{module}.read` |
310
+ | `/api/business/{module}` | POST | `{module}.create` |
311
+ | `/api/business/{module}/{id}` | PUT | `{module}.update` |
312
+ | `/api/business/{module}/{id}` | DELETE | `{module}.delete` |
313
+
314
+ ## 7. Scénarios Gherkin
315
+
316
+ ```gherkin
317
+ Feature: {FEAT-XXX} {Feature Name}
318
+
319
+ @permission @403
320
+ Scenario: User without permission cannot create
321
+ Given I am logged in as "user@test.com" with role "ReadOnly"
322
+ When I send POST to "/api/business/{module}"
323
+ Then the response status should be 403
324
+ And the response should contain "Permission denied"
325
+
326
+ @happy-path
327
+ Scenario: Admin creates new item
328
+ Given I am logged in as "admin@test.com" with role "Admin"
329
+ And I have permission "business.{app}.{module}.create"
330
+ When I send POST to "/api/business/{module}" with:
331
+ | field1 | value1 |
332
+ | field2 | value2 |
333
+ Then the response status should be 201
334
+ And the response should contain "id"
335
+ ```
336
+
337
+ ---
338
+
339
+ ## Historique des versions
340
+
341
+ | Version | Date | Auteur | Modifications |
342
+ |---------|------|--------|---------------|
343
+ | 1.0 | {date} | BA | Création initiale |
344
+ ```
345
+
346
+ ---
347
+
348
+ ## Template 4-handoff.md
349
+
350
+ ```markdown
351
+ # Development Handoff - {FEAT-XXX} {Feature Name}
352
+
353
+ > **Module:** business/{application}/{module}
354
+ > **Version:** 1.0
355
+ > **Specs validées:** FRD v1.0 (validation.json)
356
+ > **Implémentation:** `/implement FEAT-XXX`
357
+
358
+ ## INSTRUCTIONS DÉVELOPPEUR
359
+
360
+ Ce document est un prompt autonome pour Claude Code. Exécutez:
361
+ ```
362
+ /implement FEAT-XXX
363
+ ```
364
+
365
+ ---
366
+
367
+ ## 1. CONTEXTE RAPIDE
368
+
369
+ | Attribut | Valeur |
370
+ |----------|--------|
371
+ | Feature ID | FEAT-XXX |
372
+ | Module | business/{application}/{module} |
373
+ | Permission base | `business.{app}.{module}` |
374
+ | Complexité | {Simple/Moyenne/Complexe} |
375
+
376
+ ## 2. [EXPLORE] PATTERNS EXISTANTS
377
+
378
+ AVANT de coder, explorer ces fichiers pour comprendre les patterns:
379
+
380
+ ```
381
+ BACKEND:
382
+ - src/SmartStack.Domain/Entities/ → Structure entités
383
+ - src/SmartStack.Application/Features/ → Pattern CQRS
384
+ - src/SmartStack.Infrastructure/Persistence/Configurations/ → EF Core
385
+
386
+ FRONTEND:
387
+ - web/smartstack-web/src/pages/business/ → Pages existantes
388
+ - web/smartstack-web/src/components/ → Composants réutilisables
389
+ - web/smartstack-web/src/services/api/ → Appels API
390
+ ```
391
+
392
+ ## 3. FICHIERS À CRÉER
393
+
394
+ ### 3.1 Backend
395
+
396
+ | Fichier | Template | Description |
397
+ |---------|----------|-------------|
398
+ | `Domain/Entities/{Entity}.cs` | Entité Domain | Propriétés + règles métier |
399
+ | `Application/Features/{Module}/` | CQRS Commands/Queries | Handlers MediatR |
400
+ | `Infrastructure/.../Configurations/` | EF Core Config | HasData si seed |
401
+ | `Api/Controllers/Business/` | Controller API | Endpoints REST |
402
+
403
+ ### 3.2 Frontend
404
+
405
+ | Fichier | Template | Description |
406
+ |---------|----------|-------------|
407
+ | `pages/business/{app}/{module}/` | Page React | Liste + détail |
408
+ | `services/api/{module}Api.ts` | Service API | Appels axios |
409
+ | `i18n/locales/{lang}/{module}.json` | Traductions | FR, EN, IT, DE |
410
+
411
+ ## 4. SPÉCIFICATIONS DÉTAILLÉES
412
+
413
+ ### 4.1 Entité (attributs business, pas types C#)
414
+
415
+ | Attribut | Description | Obligatoire | Règles |
416
+ |----------|-------------|-------------|--------|
417
+ | Id | Identifiant unique | Oui | GUID aléatoire |
418
+ | {attr} | {description} | {Oui/Non} | {validation} |
419
+
420
+ ### 4.2 Endpoints API
421
+
422
+ | Endpoint | Méthode | Permission | Body | Response |
423
+ |----------|---------|------------|------|----------|
424
+ | `/api/business/{module}` | GET | `.read` | - | Liste paginée |
425
+ | `/api/business/{module}` | POST | `.create` | CreateDto | 201 + entité |
426
+ | `/api/business/{module}/{id}` | GET | `.read` | - | Entité |
427
+ | `/api/business/{module}/{id}` | PUT | `.update` | UpdateDto | 200 + entité |
428
+ | `/api/business/{module}/{id}` | DELETE | `.delete` | - | 204 |
429
+
430
+ ### 4.3 Règles métier à implémenter
431
+
432
+ | BR-ID | Règle | Implémentation |
433
+ |-------|-------|----------------|
434
+ | BR-001 | {règle} | {où l'implémenter} |
435
+
436
+ ## 5. TESTS REQUIS
437
+
438
+ - [ ] Test unitaire: Validation entité
439
+ - [ ] Test integration: Endpoints API (200, 201, 400, 403, 404)
440
+ - [ ] Test permission: Refus 403 sans permission
441
+ - [ ] Test Postman: Collection générée
442
+
443
+ ## 6. CHECKLIST POST-IMPLÉMENTATION
444
+
445
+ - [ ] Build backend OK
446
+ - [ ] Build frontend OK
447
+ - [ ] Tests passent
448
+ - [ ] Migration EF Core créée si entité
449
+ - [ ] Permissions ajoutées dans PermissionConfiguration.cs
450
+ - [ ] i18n complet (4 langues)
451
+ - [ ] Documentation générée: `/business-analyse:7-doc-html FEAT-XXX`
452
+
453
+ ---
454
+
455
+ ## EXÉCUTION
456
+
457
+ ```bash
458
+ /implement FEAT-XXX
459
+ ```
460
+
461
+ Options:
462
+ - `--phase=1` : Backend seulement
463
+ - `--phase=2` : Frontend seulement
464
+ - `--phase=3` : Tests seulement
465
+ - `--phase=4` : Documentation seulement
466
+ ```
467
+
468
+ ---
469
+
470
+ ## Validation des templates
471
+
472
+ Chaque template DOIT:
473
+ - [ ] Être en Markdown pur (pas de code technique)
474
+ - [ ] Utiliser des tables pour les données structurées
475
+ - [ ] Inclure les permissions avec le path complet
476
+ - [ ] Avoir un historique de versions
477
+ - [ ] Référencer les BR/FR/UC avec des IDs uniques