@atlashub/smartstack-cli 2.0.0 → 2.2.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 +147 -40
- package/.documentation/apex.html +1 -1
- package/.documentation/business-analyse.html +3 -3
- package/.documentation/cli-commands.html +2 -2
- package/.documentation/commands.html +14 -14
- package/.documentation/efcore.html +14 -14
- package/.documentation/gitflow.html +12 -12
- package/.documentation/hooks.html +41 -3
- package/.documentation/index.html +1 -1
- package/.documentation/init.html +2 -2
- package/.documentation/installation.html +11 -11
- package/.documentation/js/app.js +1 -1
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +4 -4
- package/dist/index.js +19 -11
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +57595 -4569
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/ba-reader.md +250 -0
- package/templates/agents/ba-writer.md +210 -0
- package/templates/agents/docs-context-reader.md +51 -33
- package/templates/skills/_shared.md +2 -0
- package/templates/skills/business-analyse/SKILL.md +120 -108
- package/templates/skills/business-analyse/_shared.md +191 -160
- package/templates/skills/business-analyse/patterns/suggestion-catalog.md +478 -0
- package/templates/skills/business-analyse/questionnaire/01-context.md +3 -15
- package/templates/skills/business-analyse/questionnaire/08-performance.md +7 -21
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -13
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -13
- package/templates/skills/business-analyse/questionnaire.md +72 -76
- package/templates/skills/business-analyse/react/components.md +317 -154
- package/templates/skills/business-analyse/react/i18n-template.md +167 -106
- package/templates/skills/business-analyse/react/schema.md +325 -106
- package/templates/skills/business-analyse/schemas/feature-schema.json +690 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +395 -285
- package/templates/skills/business-analyse/steps/step-01-analyse.md +505 -0
- package/templates/skills/business-analyse/steps/step-02-specify.md +833 -0
- package/templates/skills/business-analyse/steps/step-03-validate.md +862 -0
- package/templates/skills/business-analyse/steps/step-04-handoff.md +1593 -0
- package/templates/skills/business-analyse/templates/tpl-handoff.md +95 -43
- package/templates/skills/controller/templates.md +82 -0
- package/templates/skills/efcore/references/zero-downtime-patterns.md +227 -0
- package/templates/skills/efcore/steps/migration/step-03-validate.md +19 -0
- package/templates/skills/review-code/SKILL.md +4 -2
- package/templates/skills/review-code/references/owasp-api-top10.md +243 -0
- package/templates/skills/review-code/references/security-checklist.md +86 -1
- package/templates/skills/review-code/references/smartstack-conventions.md +166 -0
- package/templates/skills/workflow/SKILL.md +27 -0
- package/templates/skills/business-analyse/steps/step-01-discover.md +0 -737
- package/templates/skills/business-analyse/steps/step-02-analyse.md +0 -299
- package/templates/skills/business-analyse/steps/step-03-specify.md +0 -409
- package/templates/skills/business-analyse/steps/step-04-validate.md +0 -313
- package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -658
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +0 -320
- package/templates/skills/business-analyse/templates/00-context.md +0 -105
- package/templates/skills/business-analyse/templates/tpl-brd.md +0 -97
- package/templates/skills/business-analyse/templates/tpl-discovery.md +0 -78
- package/templates/skills/business-analyse/tracking/change-template.md +0 -30
|
@@ -1,658 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-05-handoff
|
|
3
|
-
description: Handoff phase - Generate autonomous development prompt
|
|
4
|
-
next_step: steps/step-06-doc-html.md
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## YOUR TASK:
|
|
8
|
-
|
|
9
|
-
Generate a complete, autonomous development prompt with Ralph Loop task breakdown for iterative implementation.
|
|
10
|
-
The handoff must be zero-ambiguity: a developer (or Claude) can implement without questions.
|
|
11
|
-
|
|
12
|
-
> **ULTRATHINK MODE:**
|
|
13
|
-
> - Every implementation detail must be explicit
|
|
14
|
-
> - File paths must be exact
|
|
15
|
-
> - Patterns must reference existing code
|
|
16
|
-
> - No assumptions about "obvious" behavior
|
|
17
|
-
|
|
18
|
-
## EXECUTION SEQUENCE:
|
|
19
|
-
|
|
20
|
-
### 1. Read Current State
|
|
21
|
-
|
|
22
|
-
Read `{output_dir}/00-context.md` for state variables.
|
|
23
|
-
Read validation: `{output_dir}/validation.json`
|
|
24
|
-
Read specs: `{output_dir}/3-functional-specification.md`
|
|
25
|
-
|
|
26
|
-
Update progress: `05-handoff` -> "In Progress"
|
|
27
|
-
|
|
28
|
-
**Read digest from previous step:**
|
|
29
|
-
Read `{output_dir}/digest-04.md` for compressed context from previous step.
|
|
30
|
-
**DO NOT read full output files** unless in resume mode (`-r`).
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
### 2. Verify Validation Passed
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
IF validation.decision != "APPROVED" THEN
|
|
38
|
-
DISPLAY ERROR: "Validation must pass before handoff"
|
|
39
|
-
EXIT to step-04-validate
|
|
40
|
-
END IF
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
### 3. Load Handoff Template
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
Read: templates/tpl-handoff.md # ~100 lines
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
### 4. Explore Existing Patterns
|
|
54
|
-
|
|
55
|
-
**CRITICAL: Handoff must reference ACTUAL code patterns!**
|
|
56
|
-
|
|
57
|
-
If `{economy_mode}` = false, launch parallel agents:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
Agent 1: Backend patterns
|
|
61
|
-
"Explore src/SmartStack.Domain/Entities/ and
|
|
62
|
-
src/SmartStack.Application/Features/ to document:
|
|
63
|
-
- Entity naming pattern
|
|
64
|
-
- CQRS handler pattern
|
|
65
|
-
- Validation pattern
|
|
66
|
-
- Repository pattern"
|
|
67
|
-
|
|
68
|
-
Agent 2: Frontend patterns
|
|
69
|
-
"Explore web/smartstack-web/src/pages/business/ to document:
|
|
70
|
-
- Page component structure
|
|
71
|
-
- API service pattern
|
|
72
|
-
- i18n usage pattern
|
|
73
|
-
- Form handling pattern"
|
|
74
|
-
|
|
75
|
-
Agent 3: Infrastructure patterns
|
|
76
|
-
"Explore src/SmartStack.Infrastructure/ to document:
|
|
77
|
-
- EF Core configuration pattern
|
|
78
|
-
- DbContext registration
|
|
79
|
-
- Migration naming convention"
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
If `{economy_mode}` = true:
|
|
83
|
-
- Use Glob/Grep to find similar modules
|
|
84
|
-
- Read 2-3 reference files directly
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
### 5. Map Specifications to Files
|
|
89
|
-
|
|
90
|
-
**Backend files to create:**
|
|
91
|
-
|
|
92
|
-
| Layer | File | Template/Pattern |
|
|
93
|
-
|-------|------|------------------|
|
|
94
|
-
| Domain | `src/SmartStack.Domain/Entities/Business/{Entity}.cs` | Standard entity |
|
|
95
|
-
| Application | `src/SmartStack.Application/Features/{Module}/Commands/` | CQRS pattern |
|
|
96
|
-
| Application | `src/SmartStack.Application/Features/{Module}/Queries/` | CQRS pattern |
|
|
97
|
-
| Application | `src/SmartStack.Application/Features/{Module}/DTOs/` | Request/Response DTOs |
|
|
98
|
-
| Application | `src/SmartStack.Application/Features/{Module}/Validators/` | FluentValidation |
|
|
99
|
-
| Infrastructure | `src/SmartStack.Infrastructure/Persistence/Configurations/` | EF Core config |
|
|
100
|
-
| API | `src/SmartStack.Api/Controllers/Business/{Module}Controller.cs` | NavRoute controller |
|
|
101
|
-
|
|
102
|
-
**Frontend files to create:**
|
|
103
|
-
|
|
104
|
-
| Layer | File | Pattern |
|
|
105
|
-
|-------|------|---------|
|
|
106
|
-
| Pages | `web/smartstack-web/src/pages/business/{app}/{module}/` | Page components |
|
|
107
|
-
| Services | `web/smartstack-web/src/services/api/{module}Api.ts` | Axios service |
|
|
108
|
-
| i18n | `web/smartstack-web/src/i18n/locales/{lang}/{module}.json` | 4 languages |
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
### 6. Generate Implementation Instructions
|
|
113
|
-
|
|
114
|
-
For each file, provide explicit instructions:
|
|
115
|
-
|
|
116
|
-
```markdown
|
|
117
|
-
### Backend: {Entity}.cs
|
|
118
|
-
|
|
119
|
-
**Path:** `src/SmartStack.Domain/Entities/Business/{Entity}.cs`
|
|
120
|
-
|
|
121
|
-
**Reference:** Copy pattern from `src/SmartStack.Domain/Entities/Business/[ExistingEntity].cs`
|
|
122
|
-
|
|
123
|
-
**Properties to add:**
|
|
124
|
-
| Property | Type | Attributes | From BR |
|
|
125
|
-
|----------|------|------------|---------|
|
|
126
|
-
| Id | Guid | [Key] | - |
|
|
127
|
-
| {attr1} | string | [Required, MaxLength(100)] | BR-001 |
|
|
128
|
-
| {attr2} | decimal | [Precision(18,2)] | BR-002 |
|
|
129
|
-
| TenantId | Guid | [Required] | Multi-tenant |
|
|
130
|
-
| CreatedAt | DateTime | Audit | - |
|
|
131
|
-
| UpdatedAt | DateTime | Audit | - |
|
|
132
|
-
|
|
133
|
-
**Business rules to implement:**
|
|
134
|
-
- BR-001: {rule} -> Implement in Validator
|
|
135
|
-
- BR-002: {rule} -> Implement in Entity method
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
### 7. Map Business Rules to Code
|
|
141
|
-
|
|
142
|
-
| BR-ID | Rule | Implementation Location | Code Pattern |
|
|
143
|
-
|-------|------|------------------------|--------------|
|
|
144
|
-
| BR-001 | {rule} | `{Entity}Validator.cs` | `.RuleFor(x => x.Field).NotEmpty()` |
|
|
145
|
-
| BR-002 | {rule} | `{Entity}.cs` method | `public bool CanXXX() { ... }` |
|
|
146
|
-
| BR-003 | {rule} | `{Handler}.cs` | `if (!entity.CanXXX()) throw` |
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
### 8. Define API Endpoints
|
|
151
|
-
|
|
152
|
-
| Endpoint | Method | Handler | Permission | Request DTO | Response DTO |
|
|
153
|
-
|----------|--------|---------|------------|-------------|--------------|
|
|
154
|
-
| `/api/business/{module}` | GET | `GetAll{Entity}Query` | `.read` | - | `{Entity}ListResponse` |
|
|
155
|
-
| `/api/business/{module}` | POST | `Create{Entity}Command` | `.create` | `Create{Entity}Request` | `{Entity}Response` |
|
|
156
|
-
| `/api/business/{module}/{id}` | GET | `Get{Entity}ByIdQuery` | `.read` | - | `{Entity}Response` |
|
|
157
|
-
| `/api/business/{module}/{id}` | PUT | `Update{Entity}Command` | `.update` | `Update{Entity}Request` | `{Entity}Response` |
|
|
158
|
-
| `/api/business/{module}/{id}` | DELETE | `Delete{Entity}Command` | `.delete` | - | `204` |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
### 9. Generate Test Requirements
|
|
163
|
-
|
|
164
|
-
**Unit tests:**
|
|
165
|
-
- [ ] `{Entity}ValidatorTests.cs` - Validation rules
|
|
166
|
-
- [ ] `{Entity}Tests.cs` - Entity methods
|
|
167
|
-
|
|
168
|
-
**Integration tests:**
|
|
169
|
-
- [ ] `{Module}ControllerTests.cs` - All endpoints
|
|
170
|
-
- [ ] Permission tests - 403 for unauthorized
|
|
171
|
-
- [ ] Validation tests - 400 for invalid data
|
|
172
|
-
|
|
173
|
-
**Gherkin reference:** Copy scenarios from FRD section 7
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
### 10. Generate i18n Keys
|
|
178
|
-
|
|
179
|
-
**Keys to create:**
|
|
180
|
-
|
|
181
|
-
```json
|
|
182
|
-
{
|
|
183
|
-
"{module}": {
|
|
184
|
-
"title": "{Module display name}",
|
|
185
|
-
"fields": {
|
|
186
|
-
"{field1}": "{Label}",
|
|
187
|
-
"{field2}": "{Label}"
|
|
188
|
-
},
|
|
189
|
-
"messages": {
|
|
190
|
-
"created": "{Entity} created successfully",
|
|
191
|
-
"updated": "{Entity} updated successfully",
|
|
192
|
-
"deleted": "{Entity} deleted successfully"
|
|
193
|
-
},
|
|
194
|
-
"errors": {
|
|
195
|
-
"{field1}Required": "{Field1} is required",
|
|
196
|
-
"notFound": "{Entity} not found",
|
|
197
|
-
"permissionDenied": "You don't have permission to perform this action"
|
|
198
|
-
},
|
|
199
|
-
"buttons": {
|
|
200
|
-
"create": "Create {Entity}",
|
|
201
|
-
"edit": "Edit",
|
|
202
|
-
"delete": "Delete",
|
|
203
|
-
"save": "Save",
|
|
204
|
-
"cancel": "Cancel"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
### 11. Compile Handoff Document
|
|
213
|
-
|
|
214
|
-
```markdown
|
|
215
|
-
# Development Handoff - {feature_id} {feature_description}
|
|
216
|
-
|
|
217
|
-
> **Module:** business/{application_name}/{module_name}
|
|
218
|
-
> **Version:** 1.0
|
|
219
|
-
> **Validated Specs:** FRD v1.0 (validation.json: APPROVED)
|
|
220
|
-
> **Implementation:** `/ralph-loop -r` (iterative) | `/feature-full business/{application_name}/{module_name}` (one-shot)
|
|
221
|
-
|
|
222
|
-
## DEVELOPER INSTRUCTIONS
|
|
223
|
-
|
|
224
|
-
Ce document est un prompt autonome pour Claude Code.
|
|
225
|
-
|
|
226
|
-
**Option 1 - Itératif (recommandé) :**
|
|
227
|
-
```
|
|
228
|
-
/ralph-loop -r
|
|
229
|
-
```
|
|
230
|
-
> Le fichier `.ralph/prd.json` a été pré-généré avec le découpage en tâches atomiques.
|
|
231
|
-
> Ralph Loop exécute chaque tâche avec validation MCP entre chaque itération.
|
|
232
|
-
|
|
233
|
-
**Option 2 - One-shot :**
|
|
234
|
-
```
|
|
235
|
-
/feature-full business/{application_name}/{module_name}
|
|
236
|
-
```
|
|
237
|
-
> Génère l'implémentation full-stack complète en une seule passe
|
|
238
|
-
> (Domain → Application → Infrastructure → API → Web + Notifications + Workflows + AI).
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## 1. QUICK CONTEXT
|
|
243
|
-
|
|
244
|
-
| Attribute | Value |
|
|
245
|
-
|-----------|-------|
|
|
246
|
-
| Feature ID | {feature_id} |
|
|
247
|
-
| Module | business/{application_name}/{module_name} |
|
|
248
|
-
| Permission base | `business.{app}.{module}` |
|
|
249
|
-
| Complexity | {Simple/Medium/Complex} |
|
|
250
|
-
| Entities | {entity count} |
|
|
251
|
-
| Endpoints | {endpoint count} |
|
|
252
|
-
|
|
253
|
-
## 2. [EXPLORE] EXISTING PATTERNS
|
|
254
|
-
|
|
255
|
-
{Patterns discovered in step 4}
|
|
256
|
-
|
|
257
|
-
## 3. FILES TO CREATE
|
|
258
|
-
|
|
259
|
-
{File mapping table}
|
|
260
|
-
|
|
261
|
-
## 4. DETAILED SPECIFICATIONS
|
|
262
|
-
|
|
263
|
-
{Per-file instructions}
|
|
264
|
-
|
|
265
|
-
## 5. BUSINESS RULES → CODE
|
|
266
|
-
|
|
267
|
-
{BR to code mapping}
|
|
268
|
-
|
|
269
|
-
## 6. REQUIRED TESTS
|
|
270
|
-
|
|
271
|
-
{Test checklist}
|
|
272
|
-
|
|
273
|
-
## 7. POST-IMPLEMENTATION CHECKLIST
|
|
274
|
-
|
|
275
|
-
- [ ] Build backend OK (`dotnet build`)
|
|
276
|
-
- [ ] Build frontend OK (`pnpm build`)
|
|
277
|
-
- [ ] Tests pass (`dotnet test`)
|
|
278
|
-
- [ ] EF Core migration created
|
|
279
|
-
- [ ] Permissions in PermissionConfiguration.cs
|
|
280
|
-
- [ ] i18n complete (FR, EN, IT, DE)
|
|
281
|
-
- [ ] Documentation: `/business-analyse:6-doc-html {feature_id}`
|
|
282
|
-
- [ ] Documentation manifest updated: `docs-manifest.json`
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## EXECUTION
|
|
287
|
-
|
|
288
|
-
**Itératif (recommandé) :**
|
|
289
|
-
```bash
|
|
290
|
-
/ralph-loop -r
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
**One-shot :**
|
|
294
|
-
```bash
|
|
295
|
-
/feature-full business/{application_name}/{module_name}
|
|
296
|
-
```
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
### 12. Generate Context Digest
|
|
302
|
-
|
|
303
|
-
**Write digest to:** `{output_dir}/digest-05.md`
|
|
304
|
-
|
|
305
|
-
```markdown
|
|
306
|
-
# Digest: Step 05 - Handoff
|
|
307
|
-
|
|
308
|
-
## Changes
|
|
309
|
-
- {output_dir}/4-development-handoff.md: Handoff document created
|
|
310
|
-
- .ralph/prd.json: Ralph Loop task breakdown created
|
|
311
|
-
- .ralph/progress.txt: Progress file initialized
|
|
312
|
-
|
|
313
|
-
## Decisions
|
|
314
|
-
- Implementation mode: iterative (Ralph Loop) or one-shot (feature-full)
|
|
315
|
-
- Task count: {tasks_total} atomic tasks
|
|
316
|
-
- Complexity: {Simple/Medium/Complex}
|
|
317
|
-
|
|
318
|
-
## Findings
|
|
319
|
-
- Backend files to create: {count}
|
|
320
|
-
- Frontend files to create: {count}
|
|
321
|
-
- Test files to create: {count}
|
|
322
|
-
|
|
323
|
-
## State Updates
|
|
324
|
-
| Variable | New Value |
|
|
325
|
-
|----------|-----------|
|
|
326
|
-
| tasks_total | {count} |
|
|
327
|
-
| ralph_prd_created | true |
|
|
328
|
-
| handoff_ready | true |
|
|
329
|
-
|
|
330
|
-
## For Next Step
|
|
331
|
-
- Documentation generation ready (step-06)
|
|
332
|
-
- FRD data extraction needed for React components
|
|
333
|
-
- i18n: 4 languages to create
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
---
|
|
337
|
-
|
|
338
|
-
### 12a. Save Output
|
|
339
|
-
|
|
340
|
-
Write to: `{output_dir}/4-development-handoff.md`
|
|
341
|
-
|
|
342
|
-
Update `00-context.md`:
|
|
343
|
-
- Progress: `05-handoff` -> "Complete"
|
|
344
|
-
|
|
345
|
-
---
|
|
346
|
-
|
|
347
|
-
### 12b. Generate Ralph Loop Task Breakdown
|
|
348
|
-
|
|
349
|
-
**Purpose:** Generate `.ralph/prd.json` and `.ralph/progress.txt` so the implementation can be executed via `/ralph-loop -r`.
|
|
350
|
-
|
|
351
|
-
#### 12bis.1 Create .ralph/ directory structure
|
|
352
|
-
|
|
353
|
-
```bash
|
|
354
|
-
mkdir -p .ralph/logs
|
|
355
|
-
mkdir -p .ralph/reports
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
#### 12bis.2 Derive Task List from Handoff
|
|
359
|
-
|
|
360
|
-
**ULTRATHINK about task decomposition:**
|
|
361
|
-
- Each task must be atomic (implementable in one Ralph iteration)
|
|
362
|
-
- Tasks follow the SmartStack layer order: Domain → Application → Infrastructure → API → Frontend → i18n → Tests → Validation
|
|
363
|
-
- Conditionally include tasks based on feature scope (skip layers not present in the handoff document)
|
|
364
|
-
- Each task MUST include `category`, `dependencies`, and `acceptance_criteria` (schema v2)
|
|
365
|
-
|
|
366
|
-
**Granularity Rules:**
|
|
367
|
-
- 1 task per entity (domain, EF config, unit tests)
|
|
368
|
-
- 1 task per entity for CQRS (commands + queries + DTOs grouped per entity)
|
|
369
|
-
- 1 task per controller (API)
|
|
370
|
-
- 1 task per page (frontend)
|
|
371
|
-
- Max 1 entity per task — do NOT group multiple entities into a single task
|
|
372
|
-
- Enums and shared value objects can be grouped in 1 task if they belong to the same module
|
|
373
|
-
|
|
374
|
-
**Conditional Task Generation Rules (v2 schema):**
|
|
375
|
-
|
|
376
|
-
For each layer, generate tasks ONLY if the handoff document contains specifications for that layer.
|
|
377
|
-
Each task must have: `id`, `description`, `status: "pending"`, `category`, `dependencies`, `acceptance_criteria`.
|
|
378
|
-
|
|
379
|
-
```
|
|
380
|
-
LAYER 1 - DOMAIN (if entities defined in handoff section 3/4):
|
|
381
|
-
Task per entity:
|
|
382
|
-
description: "Create {Entity} entity in Domain/Entities/Business/ with properties: {property_list}"
|
|
383
|
-
category: "domain"
|
|
384
|
-
dependencies: []
|
|
385
|
-
acceptance_criteria: "Entity compiles, properties match handoff spec, correct base class (SoftDeletableEntity/AuditableEntity)"
|
|
386
|
-
Task (if enums needed):
|
|
387
|
-
description: "Create domain enums for {Module}: {EnumList} in Domain/Enums/{Module}/"
|
|
388
|
-
category: "domain"
|
|
389
|
-
dependencies: []
|
|
390
|
-
acceptance_criteria: "Enums compile, values match handoff spec"
|
|
391
|
-
|
|
392
|
-
LAYER 2 - APPLICATION (if CQRS handlers defined in handoff section 3/4):
|
|
393
|
-
Task per entity:
|
|
394
|
-
description: "Create CQRS for {Entity}: Commands ({Create/Update/Delete}Command + Handlers), Queries (GetAll/GetById + Handlers), DTOs ({Entity}Dto, Create/UpdateRequest), Validator"
|
|
395
|
-
category: "application"
|
|
396
|
-
dependencies: [ID of corresponding DOMAIN task for this entity]
|
|
397
|
-
acceptance_criteria: "Handlers compile, validators defined with business rules, DTOs match handoff properties"
|
|
398
|
-
Task (once per module):
|
|
399
|
-
description: "Register permissions in Permissions.cs and PermissionConfiguration.cs for business.{app}.{module}"
|
|
400
|
-
category: "application"
|
|
401
|
-
dependencies: [IDs of ALL application tasks for this module]
|
|
402
|
-
acceptance_criteria: "Permissions compile, HasData seed includes all permissions from handoff"
|
|
403
|
-
|
|
404
|
-
LAYER 3 - INFRASTRUCTURE (if EF Core config or services in handoff):
|
|
405
|
-
Task per entity:
|
|
406
|
-
description: "Create EF Core configuration for {Entity} with indexes, relationships, and schema"
|
|
407
|
-
category: "infrastructure"
|
|
408
|
-
dependencies: [ID of corresponding DOMAIN task for this entity]
|
|
409
|
-
acceptance_criteria: "Configuration compiles, DbSet registered in DbContext, indexes match handoff"
|
|
410
|
-
Task (once per module):
|
|
411
|
-
description: "Create EF Core migration for {Module} entities"
|
|
412
|
-
category: "infrastructure"
|
|
413
|
-
dependencies: [IDs of ALL EF Core configuration tasks]
|
|
414
|
-
acceptance_criteria: "Migration applies without errors, 3 files present (Migration.cs, Designer.cs, ModelSnapshot.cs)"
|
|
415
|
-
Task per service (if services needed):
|
|
416
|
-
description: "Create {Service} implementing I{Service} with DI registration"
|
|
417
|
-
category: "infrastructure"
|
|
418
|
-
dependencies: [IDs of relevant DOMAIN + APPLICATION tasks]
|
|
419
|
-
acceptance_criteria: "Service compiles, registered in DI, follows existing patterns"
|
|
420
|
-
|
|
421
|
-
LAYER 4 - API (if endpoints defined in handoff section 8):
|
|
422
|
-
Task per controller:
|
|
423
|
-
description: "Create {Entity}Controller with endpoints: {endpoint list} and [NavRoute] + [Authorize] attributes"
|
|
424
|
-
category: "api"
|
|
425
|
-
dependencies: [IDs of APPLICATION tasks for this entity + INFRASTRUCTURE migration task]
|
|
426
|
-
acceptance_criteria: "Controller compiles, endpoints respond, Swagger displays all routes"
|
|
427
|
-
|
|
428
|
-
LAYER 5 - FRONTEND (if frontend files in handoff section 5):
|
|
429
|
-
Task (API service):
|
|
430
|
-
description: "Create {module}Api.ts API service with Axios calls for all endpoints"
|
|
431
|
-
category: "frontend"
|
|
432
|
-
dependencies: [IDs of ALL API controller tasks]
|
|
433
|
-
acceptance_criteria: "API service compiles, all endpoints covered, types match DTOs"
|
|
434
|
-
Task per page:
|
|
435
|
-
description: "Create {PageName}.tsx with {description of page content}"
|
|
436
|
-
category: "frontend"
|
|
437
|
-
dependencies: [ID of frontend API service task]
|
|
438
|
-
acceptance_criteria: "Page renders, API calls work, navigation functional"
|
|
439
|
-
Task (routes):
|
|
440
|
-
description: "Add routes in App.tsx for business/{app}/{module} and register in navigation"
|
|
441
|
-
category: "frontend"
|
|
442
|
-
dependencies: [IDs of ALL frontend page tasks]
|
|
443
|
-
acceptance_criteria: "Routes resolve, navigation links appear in menu"
|
|
444
|
-
|
|
445
|
-
LAYER 6 - I18N (if i18n keys in handoff section 10):
|
|
446
|
-
Task:
|
|
447
|
-
description: "Create i18n translation files for {module} in 4 languages (fr, en, it, de)"
|
|
448
|
-
category: "i18n"
|
|
449
|
-
dependencies: [IDs of frontend page tasks]
|
|
450
|
-
acceptance_criteria: "4 language files created, all keys from handoff present, no missing translations"
|
|
451
|
-
|
|
452
|
-
LAYER 7 - TESTS (always included):
|
|
453
|
-
Task per entity:
|
|
454
|
-
description: "Create unit tests for {Entity}: {Entity}ValidatorTests + {Entity}Tests (entity methods)"
|
|
455
|
-
category: "test"
|
|
456
|
-
dependencies: [ID of APPLICATION task for this entity]
|
|
457
|
-
acceptance_criteria: "Tests pass, validator rules covered, entity methods tested"
|
|
458
|
-
Task per controller:
|
|
459
|
-
description: "Create integration tests for {Entity}Controller: 200, 201, 400, 403, 404 scenarios"
|
|
460
|
-
category: "test"
|
|
461
|
-
dependencies: [ID of API task for this controller]
|
|
462
|
-
acceptance_criteria: "Tests pass, all status codes covered, permission denial tested"
|
|
463
|
-
|
|
464
|
-
LAYER 8 - VALIDATION (always included):
|
|
465
|
-
Task 1:
|
|
466
|
-
description: "Run dotnet build + dotnet test - fix any build errors or test failures"
|
|
467
|
-
category: "validation"
|
|
468
|
-
dependencies: [IDs of ALL test tasks]
|
|
469
|
-
acceptance_criteria: "Build succeeds, all tests pass"
|
|
470
|
-
Task 2:
|
|
471
|
-
description: "Run MCP validate_conventions to verify all naming and structural conventions"
|
|
472
|
-
category: "validation"
|
|
473
|
-
dependencies: [ID of validation task 1]
|
|
474
|
-
acceptance_criteria: "MCP validation clean, no convention violations"
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
**Sizing rules:**
|
|
478
|
-
- Simple feature (1 entity, CRUD only): ~10-15 tasks
|
|
479
|
-
- Medium feature (2-3 entities, business rules): ~18-25 tasks
|
|
480
|
-
- Complex feature (multiple entities, integrations): ~25-35 tasks
|
|
481
|
-
|
|
482
|
-
#### 12bis.3 Write prd.json
|
|
483
|
-
|
|
484
|
-
Write to: `.ralph/prd.json`
|
|
485
|
-
|
|
486
|
-
```json
|
|
487
|
-
{
|
|
488
|
-
"$version": "2.0.0",
|
|
489
|
-
"feature": "{feature_id} - {feature_description}",
|
|
490
|
-
"status": "pending",
|
|
491
|
-
"created": "{ISO 8601 timestamp}",
|
|
492
|
-
"updated_at": "{ISO 8601 timestamp}",
|
|
493
|
-
"metadata": {
|
|
494
|
-
"cli_version": "{version from package.json}",
|
|
495
|
-
"branch": "{current git branch}",
|
|
496
|
-
"project_path": "{cwd}",
|
|
497
|
-
"mcp_servers": { "smartstack": true, "context7": true }
|
|
498
|
-
},
|
|
499
|
-
"config": {
|
|
500
|
-
"max_iterations": 30,
|
|
501
|
-
"completion_promise": "IMPLEMENTATION COMPLETE",
|
|
502
|
-
"current_iteration": 1
|
|
503
|
-
},
|
|
504
|
-
"source": {
|
|
505
|
-
"type": "ba-handoff",
|
|
506
|
-
"handoff_path": "{output_dir}/4-development-handoff.md",
|
|
507
|
-
"frd_path": "{output_dir}/3-functional-specification.md",
|
|
508
|
-
"brd_path": "{output_dir}/2-business-requirements.md"
|
|
509
|
-
},
|
|
510
|
-
"tasks": [
|
|
511
|
-
{
|
|
512
|
-
"id": 1,
|
|
513
|
-
"description": "Create {Entity} entity in Domain layer with properties: {list}",
|
|
514
|
-
"status": "pending",
|
|
515
|
-
"category": "domain",
|
|
516
|
-
"dependencies": [],
|
|
517
|
-
"acceptance_criteria": "Entity compiles, properties match handoff spec",
|
|
518
|
-
"started_at": null,
|
|
519
|
-
"completed_at": null,
|
|
520
|
-
"iteration": null,
|
|
521
|
-
"commit_hash": null,
|
|
522
|
-
"files_changed": { "created": [], "modified": [] },
|
|
523
|
-
"validation": null,
|
|
524
|
-
"error": null
|
|
525
|
-
}
|
|
526
|
-
],
|
|
527
|
-
"history": []
|
|
528
|
-
}
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
> **Schema v2.0.0** — Compatible avec ralph-loop step-01 sans migration. Chaque tache inclut `category`, `dependencies` et `acceptance_criteria` pour un pilotage precis de l'execution.
|
|
532
|
-
|
|
533
|
-
#### 12bis.4 Initialize progress.txt
|
|
534
|
-
|
|
535
|
-
Write to: `.ralph/progress.txt`
|
|
536
|
-
|
|
537
|
-
```markdown
|
|
538
|
-
# Ralph Loop Progress
|
|
539
|
-
|
|
540
|
-
## Task: {feature_id} - {feature_description}
|
|
541
|
-
## Source: {output_dir}/4-development-handoff.md
|
|
542
|
-
## Started: {timestamp}
|
|
543
|
-
## Generated by: Business Analysis skill (step-05-handoff)
|
|
544
|
-
|
|
545
|
-
---
|
|
546
|
-
|
|
547
|
-
## Handoff Reference
|
|
548
|
-
|
|
549
|
-
The detailed specifications for this implementation are in:
|
|
550
|
-
- **Handoff document:** `{output_dir}/4-development-handoff.md`
|
|
551
|
-
- **Functional Specification:** `{output_dir}/3-functional-specification.md`
|
|
552
|
-
- **Business Requirements:** `{output_dir}/2-business-requirements.md`
|
|
553
|
-
- **Validation:** `{output_dir}/validation.json`
|
|
554
|
-
|
|
555
|
-
Consult these documents for entity properties, business rules, API endpoints, and test requirements.
|
|
556
|
-
|
|
557
|
-
---
|
|
558
|
-
|
|
559
|
-
## Iteration 1
|
|
560
|
-
|
|
561
|
-
### Context
|
|
562
|
-
Starting fresh implementation from BA handoff.
|
|
563
|
-
Task breakdown generated from business analysis with {tasks_total} tasks.
|
|
564
|
-
|
|
565
|
-
### Learnings
|
|
566
|
-
(To be updated after each iteration)
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
---
|
|
570
|
-
|
|
571
|
-
### 12c. Display Summary and Offer Next Step
|
|
572
|
-
|
|
573
|
-
**Display:**
|
|
574
|
-
|
|
575
|
-
| Field | Value |
|
|
576
|
-
|-------|-------|
|
|
577
|
-
| Step | HANDOFF |
|
|
578
|
-
| Feature | {feature_id} |
|
|
579
|
-
| Status | Complete |
|
|
580
|
-
| Files to create | {file count} |
|
|
581
|
-
| Tests to write | {test count} |
|
|
582
|
-
| Output | {output_dir}/4-development-handoff.md |
|
|
583
|
-
| Ralph Loop | .ralph/prd.json ({tasks_total} tasks) |
|
|
584
|
-
| Execute (iterative) | /ralph-loop -r |
|
|
585
|
-
| Execute (one-shot) | /feature-full business/{application_name}/{module_name} |
|
|
586
|
-
| Optional | step-06-doc-html (React documentation) |
|
|
587
|
-
|
|
588
|
-
**Ask user:**
|
|
589
|
-
```json
|
|
590
|
-
{
|
|
591
|
-
"questions": [
|
|
592
|
-
{
|
|
593
|
-
"question": "What would you like to do now?",
|
|
594
|
-
"header": "Next",
|
|
595
|
-
"options": [
|
|
596
|
-
{"label": "Ralph Loop (itératif)", "description": "Exécuter /ralph-loop -r — recommandé pour les features complexes ({tasks_total} tâches atomiques)"},
|
|
597
|
-
{"label": "Feature Full (one-shot)", "description": "Exécuter /feature-full business/{application_name}/{module_name} — pour les features simples"},
|
|
598
|
-
{"label": "Generate HTML documentation", "description": "Créer la page de documentation React d'abord"},
|
|
599
|
-
{"label": "End BA", "description": "Terminer ici, implémenter plus tard"}
|
|
600
|
-
],
|
|
601
|
-
"multiSelect": false
|
|
602
|
-
}
|
|
603
|
-
]
|
|
604
|
-
}
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
If "Ralph Loop (itératif)":
|
|
608
|
-
```
|
|
609
|
-
DISPLAY: "Execute: /ralph-loop -r"
|
|
610
|
-
DISPLAY: "Le prd.json a été pré-généré avec {tasks_total} tâches."
|
|
611
|
-
```
|
|
612
|
-
|
|
613
|
-
If "Feature Full (one-shot)":
|
|
614
|
-
```
|
|
615
|
-
DISPLAY: "Execute: /feature-full business/{application_name}/{module_name}"
|
|
616
|
-
```
|
|
617
|
-
|
|
618
|
-
If "Generate HTML documentation":
|
|
619
|
-
```
|
|
620
|
-
Read and execute: steps/step-06-doc-html.md
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
If "End BA":
|
|
624
|
-
```
|
|
625
|
-
DISPLAY: "BA terminé. Pour implémenter plus tard :"
|
|
626
|
-
DISPLAY: " Itératif : /ralph-loop -r"
|
|
627
|
-
DISPLAY: " One-shot : /feature-full business/{application_name}/{module_name}"
|
|
628
|
-
```
|
|
629
|
-
|
|
630
|
-
---
|
|
631
|
-
|
|
632
|
-
## OUTPUT FORMAT:
|
|
633
|
-
|
|
634
|
-
This step produces:
|
|
635
|
-
- `{output_dir}/4-development-handoff.md` (created)
|
|
636
|
-
- `{output_dir}/00-context.md` (updated)
|
|
637
|
-
- `.ralph/prd.json` (created - Ralph Loop task breakdown)
|
|
638
|
-
- `.ralph/progress.txt` (created - with BA references)
|
|
639
|
-
|
|
640
|
-
Handoff is ready for:
|
|
641
|
-
- **Iterative:** `/ralph-loop -r`
|
|
642
|
-
- **One-shot:** `/feature-full business/{application_name}/{module_name}`
|
|
643
|
-
|
|
644
|
-
## ERROR HANDLING:
|
|
645
|
-
|
|
646
|
-
**If pattern exploration fails:**
|
|
647
|
-
1. Use minimal handoff template without code references
|
|
648
|
-
2. Mark as "Patterns not validated - manual review required"
|
|
649
|
-
3. Reduce task count in prd.json (simpler breakdown)
|
|
650
|
-
|
|
651
|
-
**If .ralph/ directory already exists:**
|
|
652
|
-
1. Warn user: "Existing Ralph Loop data found"
|
|
653
|
-
2. Ask: "Overwrite / Append / Cancel"
|
|
654
|
-
3. If append: add new tasks after existing ones
|
|
655
|
-
|
|
656
|
-
## NEXT STEP:
|
|
657
|
-
|
|
658
|
-
After completion, proceed to `steps/step-06-doc-html.md`
|