@atlashub/smartstack-cli 1.11.0 → 1.12.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.
- package/.documentation/agents.html +7 -2
- package/.documentation/apex.html +7 -2
- package/.documentation/business-analyse.html +7 -2
- package/.documentation/cli-commands.html +871 -0
- package/.documentation/commands.html +7 -2
- package/.documentation/efcore.html +7 -2
- package/.documentation/gitflow.html +7 -2
- package/.documentation/hooks.html +7 -2
- package/.documentation/index.html +7 -2
- package/.documentation/init.html +7 -2
- package/.documentation/installation.html +7 -2
- package/.documentation/ralph-loop.html +7 -2
- package/.documentation/test-web.html +7 -2
- package/dist/index.js +1932 -336
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/templates/agents/efcore/squash.md +67 -31
- package/templates/agents/gitflow/finish.md +68 -56
- package/templates/commands/business-analyse/0-orchestrate.md +72 -556
- package/templates/commands/business-analyse/1-init.md +23 -193
- package/templates/commands/business-analyse/2-discover.md +85 -462
- package/templates/commands/business-analyse/3-analyse.md +40 -342
- package/templates/commands/business-analyse/4-specify.md +72 -537
- package/templates/commands/business-analyse/5-validate.md +43 -237
- package/templates/commands/business-analyse/6-handoff.md +93 -682
- package/templates/commands/business-analyse/7-doc-html.md +45 -544
- package/templates/commands/business-analyse/_shared.md +176 -0
- package/templates/commands/business-analyse/bug.md +50 -257
- package/templates/commands/business-analyse/change-request.md +59 -283
- package/templates/commands/business-analyse/hotfix.md +36 -120
- package/templates/commands/business-analyse.md +55 -574
- package/templates/commands/efcore/_shared.md +206 -0
- package/templates/commands/efcore/conflicts.md +39 -201
- package/templates/commands/efcore/db-deploy.md +28 -237
- package/templates/commands/efcore/db-reset.md +41 -390
- package/templates/commands/efcore/db-seed.md +44 -323
- package/templates/commands/efcore/db-status.md +31 -210
- package/templates/commands/efcore/migration.md +45 -368
- package/templates/commands/efcore/rebase-snapshot.md +38 -241
- package/templates/commands/efcore/scan.md +35 -204
- package/templates/commands/efcore/squash.md +158 -251
- package/templates/commands/efcore.md +49 -177
- package/templates/commands/gitflow/1-init.md +94 -1318
- package/templates/commands/gitflow/10-start.md +86 -990
- package/templates/commands/gitflow/11-finish.md +264 -454
- package/templates/commands/gitflow/12-cleanup.md +40 -213
- package/templates/commands/gitflow/2-status.md +51 -386
- package/templates/commands/gitflow/3-commit.md +108 -801
- package/templates/commands/gitflow/4-plan.md +42 -13
- package/templates/commands/gitflow/5-exec.md +60 -5
- package/templates/commands/gitflow/6-abort.md +54 -277
- package/templates/commands/gitflow/7-pull-request.md +74 -717
- package/templates/commands/gitflow/8-review.md +51 -178
- package/templates/commands/gitflow/9-merge.md +74 -404
- package/templates/commands/gitflow/_shared.md +196 -0
- package/templates/commands/quickstart.md +154 -0
- package/templates/commands/ralph-loop/ralph-loop.md +104 -2
- package/templates/hooks/hooks.json +13 -0
- package/templates/hooks/ralph-mcp-logger.sh +46 -0
- package/templates/hooks/ralph-session-end.sh +69 -0
- package/templates/ralph/README.md +91 -0
- package/templates/ralph/ralph.config.yaml +113 -0
- package/templates/scripts/setup-ralph-loop.sh +173 -0
- package/templates/skills/_shared.md +117 -0
- package/templates/skills/ai-prompt/SKILL.md +87 -654
- package/templates/skills/application/SKILL.md +76 -499
- package/templates/skills/controller/SKILL.md +38 -165
- package/templates/skills/documentation/SKILL.md +2 -1
- package/templates/skills/feature-full/SKILL.md +107 -732
- package/templates/skills/notification/SKILL.md +85 -474
- package/templates/skills/ui-components/SKILL.md +62 -762
- package/templates/skills/workflow/SKILL.md +85 -489
- package/templates/commands/gitflow/rescue.md +0 -867
- package/templates/skills/business-analyse/SKILL.md +0 -191
|
@@ -6,741 +6,152 @@ model: opus
|
|
|
6
6
|
|
|
7
7
|
# Phase 6: Handoff Développement
|
|
8
8
|
|
|
9
|
-
> **
|
|
10
|
-
> **Coût estimé:** ~$0.35 (one-shot) / ~$1.00-2.50 (avec ralph-loop)
|
|
11
|
-
> **Prérequis:** validation.json avec status "APPROVED"
|
|
9
|
+
> **Ref:** Fonctions communes dans [_shared.md](_shared.md)
|
|
12
10
|
|
|
13
11
|
---
|
|
14
12
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
19
|
-
║ UTILISATION AVEC RALPH-LOOP POUR GARANTIE DE COMPLÉTUDE ║
|
|
20
|
-
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
21
|
-
║ ║
|
|
22
|
-
║ /ralph-loop "/business-analyse:6-handoff FEAT-XXX" ║
|
|
23
|
-
║ --completion-promise "COMPLETE" --max-iterations 10 ║
|
|
24
|
-
║ ║
|
|
25
|
-
║ FICHIERS RALPH (créés automatiquement): ║
|
|
26
|
-
║ ├── prd.json → Sections du handoff avec statut ║
|
|
27
|
-
║ └── progress.txt → Mémoire des sections générées ║
|
|
28
|
-
║ ║
|
|
29
|
-
║ PROCESSUS PAR ITERATION: ║
|
|
30
|
-
║ 1. Lire prd.json → Trouver prochaine section "passes": false ║
|
|
31
|
-
║ 2. Lire progress.txt → Voir sections déjà générées ║
|
|
32
|
-
║ 3. Générer UNE section du handoff ║
|
|
33
|
-
║ 4. Mettre à jour 4-development-handoff.md ║
|
|
34
|
-
║ 5. Mettre à jour prd.json → "passes": true ║
|
|
35
|
-
║ 6. Ajouter résumé section à progress.txt ║
|
|
36
|
-
║ 7. Si TOUTES sections "passes": true → <promise>COMPLETE</promise> ║
|
|
37
|
-
║ ║
|
|
38
|
-
║ SIGNAL DE FIN: <promise>COMPLETE</promise> ║
|
|
39
|
-
║ ║
|
|
40
|
-
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Structure prd.json pour Handoff
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"feature_id": "FEAT-XXX",
|
|
48
|
-
"phase": "handoff",
|
|
49
|
-
"userStories": [
|
|
50
|
-
{ "id": "1", "title": "Section 1: Header et Contexte", "passes": false },
|
|
51
|
-
{ "id": "2", "title": "Section 2: Entités Domain", "passes": false },
|
|
52
|
-
{ "id": "3", "title": "Section 3: Configuration EF Core", "passes": false },
|
|
53
|
-
{ "id": "4", "title": "Section 4: Commands/Queries Application", "passes": false },
|
|
54
|
-
{ "id": "5", "title": "Section 5: Endpoints API avec permissions", "passes": false },
|
|
55
|
-
{ "id": "6", "title": "Section 6: Service API Frontend", "passes": false },
|
|
56
|
-
{ "id": "7", "title": "Section 7: Pages Frontend", "passes": false },
|
|
57
|
-
{ "id": "8", "title": "Section 8: i18n (4 langues)", "passes": false },
|
|
58
|
-
{ "id": "9", "title": "Section 9: Intégrations SmartStack", "passes": false },
|
|
59
|
-
{ "id": "10", "title": "Section 10: Checklist validation", "passes": false },
|
|
60
|
-
{ "id": "11", "title": "Validation: aucun TBD/? restant", "passes": false }
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## OBJECTIF
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
71
|
-
║ GÉNÉRER UN PROMPT AUTONOME POUR IMPLÉMENTATION ONE-SHOT ║
|
|
72
|
-
╠══════════════════════════════════════════════════════════════════════════════╣
|
|
73
|
-
║ ║
|
|
74
|
-
║ Le handoff est un document AUTONOME qui permet au développeur Claude ║
|
|
75
|
-
║ d'implémenter la feature SANS poser de questions. ║
|
|
76
|
-
║ ║
|
|
77
|
-
║ EXIGENCES: ║
|
|
78
|
-
║ • Zéro ambiguïté sur les spécifications ║
|
|
79
|
-
║ • Instructions EXPLORE pour découvrir les patterns existants ║
|
|
80
|
-
║ • Checklist complète de validation ║
|
|
81
|
-
║ • Permissions explicites avec paths complets ║
|
|
82
|
-
║ ║
|
|
83
|
-
║ USAGE: /implement {FEATURE_ID} ║
|
|
84
|
-
║ ║
|
|
85
|
-
╚══════════════════════════════════════════════════════════════════════════════╝
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## STEP 1: Vérifier la validation
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
FEATURE_ID=$1
|
|
94
|
-
FEATURE_DIR=$(find .business-analyse -type d -name "${FEATURE_ID}*" | head -1)
|
|
95
|
-
VALIDATION_FILE="$FEATURE_DIR/validation.json"
|
|
96
|
-
|
|
97
|
-
if [ ! -f "$VALIDATION_FILE" ]; then
|
|
98
|
-
echo "❌ ERREUR: validation.json non trouvé"
|
|
99
|
-
echo " Lancez d'abord: /business-analyse:5-validate $FEATURE_ID"
|
|
100
|
-
exit 1
|
|
101
|
-
fi
|
|
102
|
-
|
|
103
|
-
# Vérifier le status
|
|
104
|
-
STATUS=$(grep -oP '"status":\s*"\K[^"]+' "$VALIDATION_FILE")
|
|
105
|
-
|
|
106
|
-
if [ "$STATUS" != "APPROVED" ]; then
|
|
107
|
-
echo "❌ ERREUR: Validation non approuvée (status: $STATUS)"
|
|
108
|
-
echo " Les spécifications doivent être validées avant le handoff."
|
|
109
|
-
exit 1
|
|
110
|
-
fi
|
|
111
|
-
|
|
112
|
-
echo "✅ Validation approuvée - Génération du handoff..."
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## STEP 2: Charger tous les documents
|
|
13
|
+
## Prérequis
|
|
118
14
|
|
|
119
15
|
```bash
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
# Extraire les informations clés
|
|
125
|
-
APPLICATION=$(echo $FEATURE_DIR | grep -oP 'business/\K[^/]+')
|
|
126
|
-
MODULE=$(echo $FEATURE_DIR | grep -oP 'modules/\K[^/]+')
|
|
127
|
-
FEATURE_NAME=$(echo $FEATURE_DIR | grep -oP 'FEAT-\d+-\K.*')
|
|
16
|
+
find_feature_dir "$1" || exit 1
|
|
17
|
+
STATUS=$(grep -oP '"decision":\s*"\K[^"]+' "$FEATURE_DIR/validation.json")
|
|
18
|
+
[ "$STATUS" != "APPROVED" ] && { echo "❌ Validation requise"; exit 1; }
|
|
128
19
|
```
|
|
129
20
|
|
|
130
21
|
---
|
|
131
22
|
|
|
132
|
-
##
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
HANDOFF_FILE="$FEATURE_DIR/4-development-handoff.md"
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Template 4-development-handoff.md
|
|
23
|
+
## Objectif
|
|
139
24
|
|
|
140
|
-
|
|
141
|
-
|
|
25
|
+
Générer un prompt AUTONOME permettant d'implémenter SANS questions:
|
|
26
|
+
- Instructions EXPLORE pour patterns existants
|
|
27
|
+
- Specs détaillées
|
|
28
|
+
- Permissions explicites
|
|
29
|
+
- Checklist validation
|
|
142
30
|
|
|
143
|
-
|
|
144
|
-
> **Version:** 1.0 (locked)
|
|
145
|
-
> **Specs validées:** FRD v1.0
|
|
146
|
-
> **Implémentation:** `/implement {FEATURE_ID}`
|
|
31
|
+
**Usage:** `/implement {FEATURE_ID}`
|
|
147
32
|
|
|
148
33
|
---
|
|
149
34
|
|
|
150
|
-
##
|
|
151
|
-
|
|
152
|
-
Ce document est un **prompt autonome** pour Claude Code.
|
|
153
|
-
Exécutez la commande suivante pour implémenter cette feature:
|
|
35
|
+
## Template 4-development-handoff.md
|
|
154
36
|
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Options disponibles:**
|
|
160
|
-
- `--phase=1` : Backend seulement (Domain + Application + Infrastructure)
|
|
161
|
-
- `--phase=2` : Frontend seulement (Pages + Services + i18n)
|
|
162
|
-
- `--phase=3` : Tests seulement (Unit + Integration + Postman)
|
|
163
|
-
- `--phase=4` : Documentation HTML seulement
|
|
164
|
-
|
|
165
|
-
---
|
|
37
|
+
```markdown
|
|
38
|
+
# Handoff - {FEATURE_ID}
|
|
166
39
|
|
|
167
|
-
|
|
40
|
+
> **Module:** business/{app}/{module}
|
|
41
|
+
> **Implémentation:** /implement {FEATURE_ID}
|
|
168
42
|
|
|
169
|
-
|
|
170
|
-
|----------|--------|
|
|
43
|
+
## 1. Contexte
|
|
171
44
|
| Feature ID | {FEATURE_ID} |
|
|
172
|
-
|
|
|
173
|
-
| Permission base | `business.{application}.{module}` |
|
|
45
|
+
| Permission base | business.{app}.{module} |
|
|
174
46
|
| Complexité | {Simple/Moyenne/Complexe} |
|
|
175
|
-
| Entités | {N} à créer |
|
|
176
|
-
| Endpoints | {N} à implémenter |
|
|
177
|
-
| Pages | {N} à créer |
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## 2. [EXPLORE] DÉCOUVERTE DES PATTERNS
|
|
182
|
-
|
|
183
|
-
**AVANT de coder, explorer ces fichiers pour comprendre les patterns existants:**
|
|
184
|
-
|
|
185
|
-
### 2.1 Backend - Patterns à suivre
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
DOMAIN:
|
|
189
|
-
→ src/SmartStack.Domain/Entities/
|
|
190
|
-
Explorer: Structure des entités existantes, BaseEntity, interfaces
|
|
191
|
-
Pattern: Propriétés, méthodes métier, validations
|
|
192
|
-
|
|
193
|
-
→ src/SmartStack.Domain/Constants/
|
|
194
|
-
Explorer: Permissions.cs pour voir le format des constantes
|
|
195
|
-
Pattern: public static class {Module} { public const string View = "..."; }
|
|
196
|
-
|
|
197
|
-
APPLICATION:
|
|
198
|
-
→ src/SmartStack.Application/Features/
|
|
199
|
-
Explorer: Structure CQRS (Commands/Queries/Handlers)
|
|
200
|
-
Pattern: Un dossier par feature, DTOs séparés
|
|
201
|
-
|
|
202
|
-
→ src/SmartStack.Application/Common/
|
|
203
|
-
Explorer: Interfaces, comportements, validators
|
|
204
|
-
Pattern: IRepository, IUnitOfWork, FluentValidation
|
|
205
|
-
|
|
206
|
-
INFRASTRUCTURE:
|
|
207
|
-
→ src/SmartStack.Infrastructure/Persistence/Configurations/
|
|
208
|
-
Explorer: EntityTypeConfiguration existantes
|
|
209
|
-
Pattern: HasData pour seed, relations, indexes
|
|
210
|
-
|
|
211
|
-
→ src/SmartStack.Infrastructure/Persistence/Configurations/Authorization/
|
|
212
|
-
Explorer: PermissionConfiguration.cs pour seed permissions
|
|
213
|
-
Pattern: HasData avec GUID aléatoires
|
|
214
|
-
|
|
215
|
-
API:
|
|
216
|
-
→ src/SmartStack.Api/Controllers/
|
|
217
|
-
Explorer: Structure des controllers Business area
|
|
218
|
-
Pattern: [RequirePermission], [ProducesResponseType], routes
|
|
219
|
-
|
|
220
|
-
→ src/SmartStack.Api/Areas/Business/
|
|
221
|
-
Explorer: Controllers existants dans l'area Business
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### 2.2 Frontend - Patterns à suivre
|
|
225
47
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
→ web/smartstack-web/src/pages/admin/
|
|
233
|
-
Explorer: RolesPage, UsersPage pour patterns CRUD
|
|
234
|
-
Pattern: DataTable, filtres, modals
|
|
235
|
-
|
|
236
|
-
COMPOSANTS:
|
|
237
|
-
→ web/smartstack-web/src/components/
|
|
238
|
-
Explorer: Composants réutilisables
|
|
239
|
-
Pattern: Button, Modal, DataTable, Form
|
|
240
|
-
|
|
241
|
-
SERVICES:
|
|
242
|
-
→ web/smartstack-web/src/services/api/
|
|
243
|
-
Explorer: Services API existants
|
|
244
|
-
Pattern: apiClient, endpoints, types
|
|
245
|
-
|
|
246
|
-
I18N:
|
|
247
|
-
→ web/smartstack-web/src/i18n/locales/fr/
|
|
248
|
-
Explorer: Structure des fichiers de traduction
|
|
249
|
-
Pattern: Clés hiérarchiques, pluriels
|
|
250
|
-
|
|
251
|
-
HOOKS:
|
|
252
|
-
→ web/smartstack-web/src/hooks/
|
|
253
|
-
Explorer: Hooks customs existants
|
|
254
|
-
Pattern: useApi, usePermission, useToast
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## 3. ENTITÉ(S) À CRÉER
|
|
260
|
-
|
|
261
|
-
### 3.1 {EntityName}
|
|
262
|
-
|
|
263
|
-
**Description:** {description métier de l'entité}
|
|
264
|
-
|
|
265
|
-
**Attributs:**
|
|
266
|
-
|
|
267
|
-
| Attribut | Description métier | Obligatoire | Validation | Règle BR |
|
|
268
|
-
|----------|-------------------|-------------|------------|----------|
|
|
269
|
-
| Id | Identifiant unique | Oui | GUID aléatoire | - |
|
|
270
|
-
| {attr1} | {description} | Oui | {règle} | BR-001 |
|
|
271
|
-
| {attr2} | {description} | Non | {règle} | - |
|
|
272
|
-
| {attr3} | {description} | Oui | {règle} | BR-002 |
|
|
273
|
-
| Status | État de l'entité | Oui | Enum | - |
|
|
274
|
-
| CreatedAt | Date création | Oui | Auto | - |
|
|
275
|
-
| CreatedBy | Créateur | Oui | Auto (current user) | - |
|
|
276
|
-
| UpdatedAt | Date modification | Non | Auto | - |
|
|
277
|
-
| UpdatedBy | Modificateur | Non | Auto (current user) | - |
|
|
278
|
-
|
|
279
|
-
**Relations:**
|
|
280
|
-
|
|
281
|
-
| Relation | Type | Entité cible | Navigation |
|
|
282
|
-
|----------|------|--------------|------------|
|
|
283
|
-
| {rel1} | 1:N | {Entity} | Collection |
|
|
284
|
-
| {rel2} | N:1 | {Entity} | Reference |
|
|
285
|
-
|
|
286
|
-
**Status Enum:**
|
|
287
|
-
|
|
288
|
-
| Valeur | Description | Transitions possibles |
|
|
289
|
-
|--------|-------------|----------------------|
|
|
290
|
-
| Draft | Brouillon | → Active |
|
|
291
|
-
| Active | Actif | → Inactive, Archived |
|
|
292
|
-
| Inactive | Désactivé | → Active, Archived |
|
|
293
|
-
| Archived | Archivé | (terminal) |
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
## 4. PERMISSIONS À IMPLÉMENTER
|
|
298
|
-
|
|
299
|
-
### 4.1 Constantes (Permissions.cs)
|
|
300
|
-
|
|
301
|
-
**Ajouter dans `src/SmartStack.Application/Common/Constants/Permissions.cs`:**
|
|
302
|
-
|
|
303
|
-
```
|
|
304
|
-
Emplacement: public static class Business > public static class {Module}
|
|
305
|
-
|
|
306
|
-
Paths à créer:
|
|
307
|
-
• business.{application}.{module}.read
|
|
308
|
-
• business.{application}.{module}.create
|
|
309
|
-
• business.{application}.{module}.update
|
|
310
|
-
• business.{application}.{module}.delete
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### 4.2 Seed EF Core (PermissionConfiguration.cs)
|
|
314
|
-
|
|
315
|
-
**Ajouter dans `PermissionConfiguration.cs` avec HasData:**
|
|
316
|
-
|
|
317
|
-
| Permission Path | Description | ModuleId |
|
|
318
|
-
|-----------------|-------------|----------|
|
|
319
|
-
| `business.{app}.{module}.read` | View {module} data | {moduleId} |
|
|
320
|
-
| `business.{app}.{module}.create` | Create {module} entries | {moduleId} |
|
|
321
|
-
| `business.{app}.{module}.update` | Modify {module} entries | {moduleId} |
|
|
322
|
-
| `business.{app}.{module}.delete` | Delete {module} entries | {moduleId} |
|
|
323
|
-
|
|
324
|
-
**⚠️ IMPORTANT:** Utiliser des GUIDs ALÉATOIRES (pas de patterns prévisibles)
|
|
325
|
-
|
|
326
|
-
### 4.3 Matrice Rôle-Permission
|
|
327
|
-
|
|
328
|
-
| Permission | SuperAdmin | Admin | Manager | User | ReadOnly |
|
|
329
|
-
|------------|------------|-------|---------|------|----------|
|
|
330
|
-
| `.read` | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
331
|
-
| `.create` | ✅ | ✅ | ✅ | ❌ | ❌ |
|
|
332
|
-
| `.update` | ✅ | ✅ | ✅ | ❌ | ❌ |
|
|
333
|
-
| `.delete` | ✅ | ✅ | ❌ | ❌ | ❌ |
|
|
48
|
+
## 2. [EXPLORE] Patterns
|
|
49
|
+
### Backend
|
|
50
|
+
- src/SmartStack.Domain/Entities/
|
|
51
|
+
- src/SmartStack.Application/Features/
|
|
52
|
+
- src/SmartStack.Infrastructure/Persistence/Configurations/
|
|
53
|
+
- src/SmartStack.Api/Controllers/
|
|
334
54
|
|
|
335
|
-
|
|
55
|
+
### Frontend
|
|
56
|
+
- web/smartstack-web/src/pages/business/
|
|
57
|
+
- web/smartstack-web/src/services/api/
|
|
58
|
+
- web/smartstack-web/src/i18n/locales/
|
|
336
59
|
|
|
337
|
-
##
|
|
60
|
+
## 3. Entités
|
|
61
|
+
| Attribut | Description | Requis | Validation | BR |
|
|
338
62
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
| `/api/business/{module}` | POST | `.create` | CreateDto | 201: Entité créée |
|
|
343
|
-
| `/api/business/{module}/{id}` | GET | `.read` | - | 200: Entité |
|
|
344
|
-
| `/api/business/{module}/{id}` | PUT | `.update` | UpdateDto | 200: Entité modifiée |
|
|
345
|
-
| `/api/business/{module}/{id}` | DELETE | `.delete` | - | 204: No Content |
|
|
346
|
-
| `/api/business/{module}/{id}/activate` | PATCH | `.update` | - | 204: Activé |
|
|
347
|
-
| `/api/business/{module}/{id}/deactivate` | PATCH | `.update` | - | 204: Désactivé |
|
|
63
|
+
## 4. Permissions
|
|
64
|
+
### Paths
|
|
65
|
+
business.{app}.{module}.read|create|update|delete
|
|
348
66
|
|
|
349
|
-
###
|
|
67
|
+
### Matrice
|
|
68
|
+
| Permission | Admin | Manager | User | ReadOnly |
|
|
350
69
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
| page | int | 1 | Numéro de page |
|
|
354
|
-
| pageSize | int | 10 | Items par page (max 100) |
|
|
355
|
-
| sortBy | string | createdAt | Champ de tri |
|
|
356
|
-
| sortOrder | string | desc | asc/desc |
|
|
357
|
-
| search | string | - | Recherche textuelle |
|
|
358
|
-
| status | string | - | Filtre par status |
|
|
70
|
+
### Seed (PermissionConfiguration.cs)
|
|
71
|
+
GUIDs aléatoires obligatoires
|
|
359
72
|
|
|
360
|
-
|
|
73
|
+
## 5. Endpoints API
|
|
74
|
+
| Endpoint | Method | Permission | Response |
|
|
361
75
|
|
|
76
|
+
### DTOs
|
|
362
77
|
| Champ | Type | Requis | Validation |
|
|
363
|
-
|-------|------|--------|------------|
|
|
364
|
-
| {field1} | string | Oui | MaxLength(100) |
|
|
365
|
-
| {field2} | string | Oui | Enum values |
|
|
366
|
-
| {field3} | string | Non | MaxLength(500) |
|
|
367
|
-
|
|
368
|
-
### 5.3 UpdateDto
|
|
369
|
-
|
|
370
|
-
Identique à CreateDto.
|
|
371
|
-
|
|
372
|
-
### 5.4 ResponseDto
|
|
373
|
-
|
|
374
|
-
| Champ | Type | Description |
|
|
375
|
-
|-------|------|-------------|
|
|
376
|
-
| id | Guid | Identifiant |
|
|
377
|
-
| {field1} | string | {description} |
|
|
378
|
-
| {field2} | string | {description} |
|
|
379
|
-
| status | string | Status actuel |
|
|
380
|
-
| createdAt | DateTime | Date création |
|
|
381
|
-
| updatedAt | DateTime? | Date modification |
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
## 6. RÈGLES MÉTIER À IMPLÉMENTER
|
|
386
78
|
|
|
79
|
+
## 6. Règles métier
|
|
387
80
|
| BR-ID | Règle | Où implémenter |
|
|
388
|
-
|-------|-------|----------------|
|
|
389
|
-
| BR-001 | {règle} | Domain Entity / Validator |
|
|
390
|
-
| BR-002 | {règle} | Command Handler |
|
|
391
|
-
| BR-003 | {règle} | Domain Service |
|
|
392
81
|
|
|
393
|
-
|
|
82
|
+
## 7. Pages Frontend
|
|
83
|
+
### Liste - Route: /business/{app}/{module}
|
|
84
|
+
Composants: Header, Filtres, DataTable, Modal
|
|
394
85
|
|
|
395
|
-
|
|
86
|
+
### Permissions UI
|
|
87
|
+
| Élément | Permission | Si absent |
|
|
396
88
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
SINON {erreur avec message}
|
|
402
|
-
```
|
|
89
|
+
## 8. i18n (4 langues)
|
|
90
|
+
| Fichier | Clés |
|
|
91
|
+
| fr/{module}.json | title, fields.*, actions.*, messages.* |
|
|
92
|
+
| en, it, de | idem |
|
|
403
93
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
94
|
+
## 9. Intégrations SmartStack
|
|
95
|
+
| Type | Requis | Skill | Quand |
|
|
96
|
+
| Notifications | {oui/non} | /notification add | Après service |
|
|
97
|
+
| Workflows | {oui/non} | /workflow create | Après triggers |
|
|
98
|
+
| IA | {oui/non} | /ai-prompt create | Pendant service |
|
|
407
99
|
|
|
408
|
-
##
|
|
100
|
+
## 10. Tests
|
|
101
|
+
### Unitaires
|
|
102
|
+
- [ ] Entity validation
|
|
103
|
+
- [ ] Validators
|
|
409
104
|
|
|
410
|
-
###
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
**Composants requis:**
|
|
415
|
-
- Header avec titre + bouton Nouveau
|
|
416
|
-
- Filtres (status, recherche, dates)
|
|
417
|
-
- DataTable avec pagination
|
|
418
|
-
- Actions par ligne (view, edit, delete)
|
|
419
|
-
- Modal création/édition
|
|
420
|
-
|
|
421
|
-
**Permissions UI:**
|
|
422
|
-
- Bouton Nouveau: visible si `.create`
|
|
423
|
-
- Bouton Edit: visible si `.update`
|
|
424
|
-
- Bouton Delete: visible si `.delete`
|
|
425
|
-
|
|
426
|
-
### 7.2 Détail ({Module}DetailPage.tsx)
|
|
427
|
-
|
|
428
|
-
**Route:** `/business/{application}/{module}/:id`
|
|
429
|
-
|
|
430
|
-
**Composants:**
|
|
431
|
-
- Breadcrumb
|
|
432
|
-
- Card informations principales
|
|
433
|
-
- Actions (edit, delete, activate/deactivate)
|
|
434
|
-
- Historique des modifications (si audit)
|
|
435
|
-
|
|
436
|
-
---
|
|
437
|
-
|
|
438
|
-
## 8. INTERNATIONALISATION (i18n)
|
|
439
|
-
|
|
440
|
-
**Fichiers à créer/modifier:**
|
|
441
|
-
|
|
442
|
-
| Fichier | Clés à ajouter |
|
|
443
|
-
|---------|----------------|
|
|
444
|
-
| `fr/{module}.json` | Toutes les clés |
|
|
445
|
-
| `en/{module}.json` | Toutes les clés |
|
|
446
|
-
| `it/{module}.json` | Toutes les clés |
|
|
447
|
-
| `de/{module}.json` | Toutes les clés |
|
|
448
|
-
|
|
449
|
-
**Structure des clés:**
|
|
450
|
-
|
|
451
|
-
```json
|
|
452
|
-
{
|
|
453
|
-
"{module}": {
|
|
454
|
-
"title": "{Module Name}",
|
|
455
|
-
"subtitle": "{Description}",
|
|
456
|
-
"fields": {
|
|
457
|
-
"{field1}": "{Label}",
|
|
458
|
-
"{field2}": "{Label}"
|
|
459
|
-
},
|
|
460
|
-
"actions": {
|
|
461
|
-
"create": "Nouveau",
|
|
462
|
-
"edit": "Modifier",
|
|
463
|
-
"delete": "Supprimer"
|
|
464
|
-
},
|
|
465
|
-
"messages": {
|
|
466
|
-
"created": "{Entity} créé avec succès",
|
|
467
|
-
"updated": "{Entity} modifié avec succès",
|
|
468
|
-
"deleted": "{Entity} supprimé avec succès"
|
|
469
|
-
},
|
|
470
|
-
"errors": {
|
|
471
|
-
"notFound": "{Entity} non trouvé",
|
|
472
|
-
"validation": "Données invalides"
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
---
|
|
479
|
-
|
|
480
|
-
## 9. INTÉGRATIONS SMARTSTACK ⭐
|
|
481
|
-
|
|
482
|
-
> **Importé depuis FRD Section 9 - Skills à exécuter automatiquement**
|
|
483
|
-
|
|
484
|
-
### 9.1 Notifications (si requis)
|
|
485
|
-
|
|
486
|
-
| Événement | NotificationType | Destinataire | Message |
|
|
487
|
-
|-----------|------------------|--------------|---------|
|
|
488
|
-
| {Entity}Created | `{Entity}Created` | Créateur | `{module}.notifications.created` |
|
|
489
|
-
| {Entity}Updated | `{Entity}Updated` | Assigné | `{module}.notifications.updated` |
|
|
490
|
-
| {Entity}Assigned | `{Entity}Assigned` | Nouvel assigné | `{module}.notifications.assigned` |
|
|
491
|
-
|
|
492
|
-
**Skill:** `/notification add`
|
|
493
|
-
**Service à modifier:** `{Entity}Service.cs`
|
|
494
|
-
|
|
495
|
-
**Template intégration:**
|
|
496
|
-
```csharp
|
|
497
|
-
await _notificationService.SendNotificationAsync(
|
|
498
|
-
userId: {destinataire}.Id,
|
|
499
|
-
type: NotificationType.{Entity}Created,
|
|
500
|
-
title: _localizer["{module}.notifications.created.title"],
|
|
501
|
-
message: _localizer["{module}.notifications.created.message", entity.Name],
|
|
502
|
-
relatedEntityType: nameof({Entity}),
|
|
503
|
-
relatedEntityId: entity.Id,
|
|
504
|
-
actionUrl: $"/{module}/{entity.Id}",
|
|
505
|
-
cancellationToken: ct);
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
### 9.2 Workflows (si requis)
|
|
509
|
-
|
|
510
|
-
| Workflow Code | Trigger | Steps | Variables |
|
|
511
|
-
|---------------|---------|-------|-----------|
|
|
512
|
-
| `{workflow-code}` | `{entity}.created` | SendEmail, Wait | entityId, entityName, userEmail |
|
|
513
|
-
|
|
514
|
-
**Skill:** `/workflow create`
|
|
515
|
-
|
|
516
|
-
**Template déclenchement:**
|
|
517
|
-
```csharp
|
|
518
|
-
await _workflowService.TriggerAsync(
|
|
519
|
-
"{entity}.created",
|
|
520
|
-
new Dictionary<string, object>
|
|
521
|
-
{
|
|
522
|
-
["entityId"] = entity.Id,
|
|
523
|
-
["entityName"] = entity.Name,
|
|
524
|
-
["userEmail"] = _currentUser.Email
|
|
525
|
-
},
|
|
526
|
-
language: _currentUser.Language ?? "fr",
|
|
527
|
-
cancellationToken: ct);
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### 9.3 Assistance IA (si requis)
|
|
531
|
-
|
|
532
|
-
| Prompt Code | Fonction | Input | Output | Schema |
|
|
533
|
-
|-------------|----------|-------|--------|--------|
|
|
534
|
-
| `{prompt-code}` | {génération/classification} | {context} | {format} | {schema} |
|
|
535
|
-
|
|
536
|
-
**Skill:** `/ai-prompt create`
|
|
537
|
-
|
|
538
|
-
**Template intégration:**
|
|
539
|
-
```csharp
|
|
540
|
-
var result = await _aiCompletionService.CompleteAsync<{OutputType}>(
|
|
541
|
-
"{prompt-code}",
|
|
542
|
-
new Dictionary<string, object>
|
|
543
|
-
{
|
|
544
|
-
["context"] = context,
|
|
545
|
-
["entity"] = entity
|
|
546
|
-
},
|
|
547
|
-
cancellationToken: ct);
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
### 9.4 Résumé des Skills à exécuter
|
|
551
|
-
|
|
552
|
-
| Intégration | Requis | Skill | Moment d'exécution |
|
|
553
|
-
|-------------|--------|-------|-------------------|
|
|
554
|
-
| Notifications | {oui/non} | `/notification add` | Après service backend |
|
|
555
|
-
| Workflows | {oui/non} | `/workflow create` | Après triggers définis |
|
|
556
|
-
| IA | {oui/non} | `/ai-prompt create` | Pendant service backend |
|
|
557
|
-
|
|
558
|
-
**⚠️ IMPORTANT:** Ces skills sont exécutés automatiquement par `/implement` si requis=oui.
|
|
559
|
-
|
|
560
|
-
---
|
|
561
|
-
|
|
562
|
-
## 10. TESTS REQUIS
|
|
563
|
-
|
|
564
|
-
### 10.1 Tests unitaires
|
|
565
|
-
|
|
566
|
-
- [ ] Entity validation rules
|
|
567
|
-
- [ ] Command validators (FluentValidation)
|
|
568
|
-
- [ ] Business rules in handlers
|
|
569
|
-
|
|
570
|
-
### 10.2 Tests d'intégration
|
|
571
|
-
|
|
572
|
-
- [ ] GET /api/business/{module} - 200 OK
|
|
573
|
-
- [ ] GET /api/business/{module}/{id} - 200 OK
|
|
574
|
-
- [ ] GET /api/business/{module}/{id} - 404 Not Found
|
|
575
|
-
- [ ] POST /api/business/{module} - 201 Created
|
|
576
|
-
- [ ] POST /api/business/{module} - 400 Bad Request (validation)
|
|
577
|
-
- [ ] PUT /api/business/{module}/{id} - 200 OK
|
|
578
|
-
- [ ] DELETE /api/business/{module}/{id} - 204 No Content
|
|
579
|
-
|
|
580
|
-
### 10.3 Tests de permission
|
|
581
|
-
|
|
582
|
-
- [ ] GET sans permission - 403 Forbidden
|
|
583
|
-
- [ ] POST avec ReadOnly - 403 Forbidden
|
|
584
|
-
- [ ] DELETE avec User - 403 Forbidden
|
|
585
|
-
|
|
586
|
-
### 10.4 Collection Postman
|
|
587
|
-
|
|
588
|
-
Générer automatiquement avec `/controller:create`
|
|
589
|
-
|
|
590
|
-
---
|
|
591
|
-
|
|
592
|
-
## 11. CHECKLIST POST-IMPLÉMENTATION
|
|
105
|
+
### Intégration
|
|
106
|
+
- [ ] GET 200, POST 201, PUT 200, DELETE 204
|
|
107
|
+
- [ ] 403 sans permission
|
|
593
108
|
|
|
109
|
+
## 11. Checklist
|
|
594
110
|
### Backend
|
|
595
|
-
|
|
596
|
-
- [ ]
|
|
597
|
-
- [ ]
|
|
598
|
-
- [ ]
|
|
599
|
-
- [ ] Commands/Queries créés dans Application
|
|
600
|
-
- [ ] Validators FluentValidation créés
|
|
601
|
-
- [ ] Controller créé dans Api/Areas/Business
|
|
602
|
-
- [ ] Permissions ajoutées dans Permissions.cs
|
|
603
|
-
- [ ] Permissions seedées dans PermissionConfiguration.cs
|
|
604
|
-
- [ ] Build backend OK
|
|
111
|
+
- [ ] Entity + Config EF Core + Migration
|
|
112
|
+
- [ ] Commands/Queries + Validators
|
|
113
|
+
- [ ] Controller + Permissions
|
|
114
|
+
- [ ] Build OK
|
|
605
115
|
|
|
606
116
|
### Frontend
|
|
117
|
+
- [ ] Pages + Service API + i18n 4 langues
|
|
118
|
+
- [ ] Routes + Build OK
|
|
607
119
|
|
|
608
|
-
|
|
609
|
-
- [ ]
|
|
610
|
-
- [ ] Service API créé
|
|
611
|
-
- [ ] i18n complet (4 langues)
|
|
612
|
-
- [ ] Routes ajoutées dans App.tsx
|
|
613
|
-
- [ ] Build frontend OK
|
|
614
|
-
|
|
615
|
-
### Tests
|
|
616
|
-
|
|
617
|
-
- [ ] Tests unitaires passent
|
|
618
|
-
- [ ] Tests intégration passent
|
|
619
|
-
- [ ] Collection Postman créée
|
|
620
|
-
|
|
621
|
-
### Documentation
|
|
622
|
-
|
|
623
|
-
- [ ] `/business-analyse:7-doc-html {FEATURE_ID}` exécuté
|
|
624
|
-
|
|
625
|
-
### Intégrations SmartStack
|
|
626
|
-
|
|
627
|
-
- [ ] Notifications ajoutées (si requis)
|
|
628
|
-
- [ ] Workflows créés (si requis)
|
|
629
|
-
- [ ] Prompts IA créés (si requis)
|
|
630
|
-
- [ ] Hooks frontend SignalR (si notifications)
|
|
631
|
-
|
|
632
|
-
---
|
|
633
|
-
|
|
634
|
-
## 12. COMMANDE D'IMPLÉMENTATION
|
|
120
|
+
### Intégrations
|
|
121
|
+
- [ ] Notifications/Workflows/IA si requis
|
|
635
122
|
|
|
636
|
-
|
|
637
|
-
# Implémentation complète
|
|
123
|
+
## 12. Commande
|
|
638
124
|
/implement {FEATURE_ID}
|
|
639
|
-
|
|
640
|
-
# Par phase
|
|
641
125
|
/implement {FEATURE_ID} --phase=1 # Backend
|
|
642
126
|
/implement {FEATURE_ID} --phase=2 # Frontend
|
|
643
|
-
/implement {FEATURE_ID} --phase=3 # Tests
|
|
644
|
-
/implement {FEATURE_ID} --phase=4 # Documentation HTML
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
---
|
|
648
|
-
|
|
649
|
-
## Historique des versions
|
|
650
|
-
|
|
651
|
-
| Version | Date | Auteur | Modifications |
|
|
652
|
-
|---------|------|--------|---------------|
|
|
653
|
-
| 1.0 | {date} | BA (Opus) | Création initiale (locked) |
|
|
654
127
|
```
|
|
655
128
|
|
|
656
129
|
---
|
|
657
130
|
|
|
658
|
-
##
|
|
131
|
+
## Checklist complétude
|
|
659
132
|
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
133
|
+
- [ ] Contexte complet
|
|
134
|
+
- [ ] EXPLORE patterns listés
|
|
135
|
+
- [ ] Entités avec attributs complets
|
|
136
|
+
- [ ] Permissions paths + matrice + seed
|
|
137
|
+
- [ ] Endpoints + DTOs
|
|
138
|
+
- [ ] Règles métier référencées
|
|
139
|
+
- [ ] Pages + permissions UI
|
|
140
|
+
- [ ] i18n 4 langues
|
|
141
|
+
- [ ] Intégrations Oui/Non
|
|
142
|
+
- [ ] Tests listés
|
|
143
|
+
- [ ] Aucun "TBD" ou "?"
|
|
669
144
|
|
|
670
145
|
---
|
|
671
146
|
|
|
672
|
-
##
|
|
673
|
-
|
|
674
|
-
Avant de terminer, vérifier que TOUS les critères sont remplis:
|
|
147
|
+
## Résumé
|
|
675
148
|
|
|
676
149
|
```
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
□ Section 7 (Pages) - Routes, composants, permissions UI
|
|
685
|
-
□ Section 8 (i18n) - Structure clés pour 4 langues
|
|
686
|
-
□ Section 9 (Intégrations) - Notifications/Workflows/IA spécifiés (oui/non)
|
|
687
|
-
□ Section 10 (Tests) - Checklist unitaires + intégration
|
|
688
|
-
□ Section 11 (Checklist) - Tous les items listés (incluant intégrations)
|
|
689
|
-
□ Section 12 (Commande) - /implement documenté
|
|
690
|
-
□ Aucun marqueur "TBD", "?", "{...}" restant dans le document
|
|
150
|
+
HANDOFF - {FEATURE_ID}
|
|
151
|
+
├── Entités: {N}
|
|
152
|
+
├── Endpoints: {N}
|
|
153
|
+
├── Permissions: {N}
|
|
154
|
+
├── Pages: {N}
|
|
155
|
+
├── Intégrations: {liste}
|
|
156
|
+
└── Prochain: /implement {FEATURE_ID}
|
|
691
157
|
```
|
|
692
|
-
|
|
693
|
-
---
|
|
694
|
-
|
|
695
|
-
## STEP 6: Résumé
|
|
696
|
-
|
|
697
|
-
**SI TOUS LES CRITÈRES SONT REMPLIS:**
|
|
698
|
-
|
|
699
|
-
```
|
|
700
|
-
================================================================================
|
|
701
|
-
HANDOFF GÉNÉRÉ - {FEATURE_ID}
|
|
702
|
-
================================================================================
|
|
703
|
-
|
|
704
|
-
DOCUMENT: {FEATURE_DIR}/4-development-handoff.md
|
|
705
|
-
MODÈLE UTILISÉ: Opus avec ULTRATHINK
|
|
706
|
-
STATUS: Prêt pour implémentation
|
|
707
|
-
|
|
708
|
-
CONTENU:
|
|
709
|
-
• Instructions EXPLORE complètes
|
|
710
|
-
• {N} entité(s) spécifiée(s)
|
|
711
|
-
• {N} endpoint(s) API
|
|
712
|
-
• {N} permission(s) définies
|
|
713
|
-
• {N} page(s) frontend
|
|
714
|
-
• {N} intégration(s) SmartStack (Notif/Workflow/IA)
|
|
715
|
-
• Checklist de 25+ points
|
|
716
|
-
|
|
717
|
-
DOCUMENTS VERROUILLÉS:
|
|
718
|
-
✓ 1-discovery.md v1.0
|
|
719
|
-
✓ 2-business-requirements.md v1.0
|
|
720
|
-
✓ 3-functional-specification.md v1.0
|
|
721
|
-
✓ 4-development-handoff.md v1.0
|
|
722
|
-
|
|
723
|
-
================================================================================
|
|
724
|
-
PROCHAINE ÉTAPE
|
|
725
|
-
================================================================================
|
|
726
|
-
|
|
727
|
-
Lancez l'implémentation:
|
|
728
|
-
|
|
729
|
-
/implement {FEATURE_ID}
|
|
730
|
-
|
|
731
|
-
Ou avec ralph-loop pour one-shot complet:
|
|
732
|
-
|
|
733
|
-
/ralph-loop "/implement {FEATURE_ID}" \
|
|
734
|
-
--completion-promise "FEATURE_COMPLETE" \
|
|
735
|
-
--max-iterations 25
|
|
736
|
-
|
|
737
|
-
================================================================================
|
|
738
|
-
|
|
739
|
-
<promise>COMPLETE</promise>
|
|
740
|
-
|
|
741
|
-
Contact support: support@atlshub.ch
|
|
742
|
-
```
|
|
743
|
-
|
|
744
|
-
**SI DES CRITÈRES MANQUENT:**
|
|
745
|
-
|
|
746
|
-
Ne pas afficher le signal de complétion. Compléter les sections manquantes en relisant les documents source (Discovery, BRD, FRD).
|