@atlashub/smartstack-cli 3.5.0 → 3.6.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/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/skills/business-analyse/SKILL.md +26 -15
- package/templates/skills/business-analyse/_architecture.md +1 -1
- package/templates/skills/business-analyse/_elicitation.md +1 -1
- package/templates/skills/business-analyse/_module-loop.md +4 -4
- package/templates/skills/business-analyse/html/ba-interactive.html +39 -10
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire.md +2 -2
- package/templates/skills/business-analyse/react/components.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +1 -1
- package/templates/skills/business-analyse/references/html-data-mapping.md +4 -3
- package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +1 -0
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +29 -0
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +166 -6
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +4 -4
- package/templates/skills/business-analyse/steps/{step-03a-specify.md → step-03a-data.md} +10 -359
- package/templates/skills/business-analyse/steps/step-03b-ui.md +414 -0
- package/templates/skills/business-analyse/steps/step-03c-compile.md +343 -0
- package/templates/skills/business-analyse/steps/{step-03b-compile.md → step-03d-validate.md} +26 -308
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +2 -2
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +49 -292
- package/templates/skills/business-analyse/steps/step-05b-mapping.md +302 -0
- package/templates/skills/business-analyse/steps/step-05c-deploy.md +296 -0
- package/templates/skills/business-analyse/steps/step-05d-html.md +326 -0
- package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
- package/templates/skills/business-analyse/templates/tpl-launch-displays.md +1 -1
- package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
- package/templates/skills/controller/steps/step-03-generate.md +2 -1
- package/templates/skills/ralph-loop/SKILL.md +17 -2
- package/templates/skills/ralph-loop/references/core-seed-data.md +538 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +2 -0
- package/templates/skills/ralph-loop/steps/step-01-task.md +25 -2
- package/templates/skills/ralph-loop/steps/step-02-execute.md +39 -15
- package/templates/skills/ralph-loop/steps/step-04-check.md +87 -4
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -475
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: step-05a-handoff
|
|
3
|
-
description: Build handoff data -
|
|
3
|
+
description: Build the development handoff data - verify consolidation, choose implementation strategy, calculate complexity, and map specification to files (7 categories)
|
|
4
4
|
model: sonnet
|
|
5
|
-
next_step: steps/step-05b-
|
|
5
|
+
next_step: steps/step-05b-mapping.md
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
> **Context files:** `_shared.md` | `_architecture.md`
|
|
@@ -21,7 +21,7 @@ next_step: steps/step-05b-deploy.md
|
|
|
21
21
|
|
|
22
22
|
## YOUR TASK
|
|
23
23
|
|
|
24
|
-
Build the development handoff data
|
|
24
|
+
Build the development handoff data: verify consolidation, choose implementation strategy, calculate complexity, and map specification to files (7 categories). BR-to-code mapping, API summary, and writing to feature.json are handled in step-05b.
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
@@ -122,6 +122,26 @@ Example:
|
|
|
122
122
|
|
|
123
123
|
For **EACH module** in topological order:
|
|
124
124
|
|
|
125
|
+
> **PATH HIERARCHY CONVENTION:** All backend file paths MUST include the context and application hierarchy.
|
|
126
|
+
> Derive from module feature.json metadata:
|
|
127
|
+
> - `{ContextPascal}` = PascalCase of `metadata.context` (e.g., `"business"` → `"Business"`)
|
|
128
|
+
> - `{ApplicationName}` = `metadata.application` (e.g., `"HumanResources"`)
|
|
129
|
+
> - `{ModuleName}` = `metadata.module` (e.g., `"Projects"`)
|
|
130
|
+
>
|
|
131
|
+
> **Controller context-to-folder mapping (`{ContextShort}`):**
|
|
132
|
+
> | metadata.context | Controller Folder |
|
|
133
|
+
> |-----------------|-------------------|
|
|
134
|
+
> | `business` | `Business` |
|
|
135
|
+
> | `platform` | `Admin` |
|
|
136
|
+
> | `personal` | `User` |
|
|
137
|
+
>
|
|
138
|
+
> **Example** for context=business, application=HumanResources, module=Projects:
|
|
139
|
+
> - Domain: `src/Domain/Entities/Business/HumanResources/Projects/Project.cs`
|
|
140
|
+
> - Application: `src/Application/Services/Business/HumanResources/Projects/ProjectService.cs`
|
|
141
|
+
> - Infrastructure: `src/Infrastructure/Persistence/Configurations/Business/HumanResources/Projects/ProjectConfiguration.cs`
|
|
142
|
+
> - API: `src/API/Controllers/Business/HumanResources/ProjectsController.cs`
|
|
143
|
+
> - Tests: `src/Tests/Unit/Domain/Business/HumanResources/Projects/ProjectTests.cs`
|
|
144
|
+
|
|
125
145
|
#### 4.1 Domain Files
|
|
126
146
|
|
|
127
147
|
From `analysis.entities[]` of the module:
|
|
@@ -129,7 +149,7 @@ From `analysis.entities[]` of the module:
|
|
|
129
149
|
```json
|
|
130
150
|
"domain": [
|
|
131
151
|
{
|
|
132
|
-
"path": "src/Domain/Entities/{ModuleName}/{EntityName}.cs",
|
|
152
|
+
"path": "src/Domain/Entities/{ContextPascal}/{ApplicationName}/{ModuleName}/{EntityName}.cs",
|
|
133
153
|
"type": "Entity",
|
|
134
154
|
"linkedFRs": ["FR-001", "FR-002"],
|
|
135
155
|
"linkedUCs": ["UC-001"],
|
|
@@ -139,9 +159,9 @@ From `analysis.entities[]` of the module:
|
|
|
139
159
|
```
|
|
140
160
|
|
|
141
161
|
Include:
|
|
142
|
-
- Value objects referenced by entities
|
|
143
|
-
- Enums used in domain
|
|
144
|
-
- Domain exceptions specific to module
|
|
162
|
+
- Value objects referenced by entities (`src/Domain/Entities/{ContextPascal}/{ApplicationName}/{ModuleName}/{ValueObject}.cs`)
|
|
163
|
+
- Enums used in domain (`src/Domain/Enums/{ContextPascal}/{ApplicationName}/{ModuleName}/{EnumName}.cs`)
|
|
164
|
+
- Domain exceptions specific to module (`src/Domain/Exceptions/{ContextPascal}/{ApplicationName}/{ModuleName}/{ExceptionName}.cs`)
|
|
145
165
|
|
|
146
166
|
#### 4.2 Application Files
|
|
147
167
|
|
|
@@ -150,20 +170,20 @@ From `analysis.useCases[]` of the module:
|
|
|
150
170
|
```json
|
|
151
171
|
"application": [
|
|
152
172
|
{
|
|
153
|
-
"path": "src/Application/Services/{ModuleName}/{ServiceName}Service.cs",
|
|
173
|
+
"path": "src/Application/Services/{ContextPascal}/{ApplicationName}/{ModuleName}/{ServiceName}Service.cs",
|
|
154
174
|
"type": "Service",
|
|
155
175
|
"linkedFRs": ["FR-001"],
|
|
156
176
|
"linkedUCs": ["UC-001", "UC-002"],
|
|
157
177
|
"module": "{moduleCode}"
|
|
158
178
|
},
|
|
159
179
|
{
|
|
160
|
-
"path": "src/Application/DTOs/{ModuleName}/{DtoName}Dto.cs",
|
|
180
|
+
"path": "src/Application/DTOs/{ContextPascal}/{ApplicationName}/{ModuleName}/{DtoName}Dto.cs",
|
|
161
181
|
"type": "Dto",
|
|
162
182
|
"linkedUCs": ["UC-001"],
|
|
163
183
|
"module": "{moduleCode}"
|
|
164
184
|
},
|
|
165
185
|
{
|
|
166
|
-
"path": "src/Application/Validators/{ModuleName}/{ValidatorName}Validator.cs",
|
|
186
|
+
"path": "src/Application/Validators/{ContextPascal}/{ApplicationName}/{ModuleName}/{ValidatorName}Validator.cs",
|
|
167
187
|
"type": "Validator",
|
|
168
188
|
"linkedFRs": ["FR-001"],
|
|
169
189
|
"module": "{moduleCode}"
|
|
@@ -184,24 +204,18 @@ From `analysis.entities[]` of the module:
|
|
|
184
204
|
```json
|
|
185
205
|
"infrastructure": [
|
|
186
206
|
{
|
|
187
|
-
"path": "src/Infrastructure/
|
|
188
|
-
"type": "
|
|
207
|
+
"path": "src/Infrastructure/Persistence/Configurations/{ContextPascal}/{ApplicationName}/{ModuleName}/{EntityName}Configuration.cs",
|
|
208
|
+
"type": "EFConfiguration",
|
|
189
209
|
"linkedFRs": ["FR-001"],
|
|
190
210
|
"module": "{moduleCode}"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"path": "src/Infrastructure/Persistence/{ModuleName}DbContext.cs",
|
|
194
|
-
"type": "DbContext",
|
|
195
|
-
"linkedFRs": ["FR-001", "FR-002"],
|
|
196
|
-
"module": "{moduleCode}"
|
|
197
211
|
}
|
|
198
212
|
]
|
|
199
213
|
```
|
|
200
214
|
|
|
201
215
|
Include:
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
216
|
+
- EF Core configuration per entity (`Persistence/Configurations/{ContextPascal}/{ApplicationName}/{ModuleName}/`)
|
|
217
|
+
- DbSet registration in `IExtensionsDbContext` / `ExtensionsDbContext`
|
|
218
|
+
- DI registration in `DependencyInjection.cs`
|
|
205
219
|
- Specifications if complex queries
|
|
206
220
|
|
|
207
221
|
#### 4.4 API Files
|
|
@@ -211,7 +225,7 @@ From `specification.apiEndpoints[]` of the module:
|
|
|
211
225
|
```json
|
|
212
226
|
"api": [
|
|
213
227
|
{
|
|
214
|
-
"path": "src/API/Controllers/{
|
|
228
|
+
"path": "src/API/Controllers/{ContextShort}/{ApplicationName}/{EntityName}Controller.cs",
|
|
215
229
|
"type": "ApiController",
|
|
216
230
|
"linkedUCs": ["UC-001", "UC-002"],
|
|
217
231
|
"linkedFRs": ["FR-001"],
|
|
@@ -220,6 +234,8 @@ From `specification.apiEndpoints[]` of the module:
|
|
|
220
234
|
]
|
|
221
235
|
```
|
|
222
236
|
|
|
237
|
+
> **Context-to-folder mapping (`{ContextShort}`):** `business` → `Business`, `platform` → `Admin`, `personal` → `User`
|
|
238
|
+
|
|
223
239
|
Include:
|
|
224
240
|
- One controller per domain aggregate root (or logical grouping)
|
|
225
241
|
- Include all HTTP methods (GET, POST, PUT, DELETE, PATCH)
|
|
@@ -415,26 +431,26 @@ Business categories (from specification.seedDataBusiness):
|
|
|
415
431
|
```json
|
|
416
432
|
"tests": [
|
|
417
433
|
{
|
|
418
|
-
"path": "src/Tests/Unit/Domain/{ModuleName}/{Entity}Tests.cs",
|
|
434
|
+
"path": "src/Tests/Unit/Domain/{ContextPascal}/{ApplicationName}/{ModuleName}/{Entity}Tests.cs",
|
|
419
435
|
"type": "UnitTests",
|
|
420
436
|
"linkedFRs": ["FR-001"],
|
|
421
437
|
"module": "{moduleCode}"
|
|
422
438
|
},
|
|
423
439
|
{
|
|
424
|
-
"path": "src/Tests/Unit/Application/{ModuleName}/{ServiceName}ServiceTests.cs",
|
|
440
|
+
"path": "src/Tests/Unit/Application/{ContextPascal}/{ApplicationName}/{ModuleName}/{ServiceName}ServiceTests.cs",
|
|
425
441
|
"type": "UnitTests",
|
|
426
442
|
"linkedFRs": ["FR-001"],
|
|
427
443
|
"linkedUCs": ["UC-001"],
|
|
428
444
|
"module": "{moduleCode}"
|
|
429
445
|
},
|
|
430
446
|
{
|
|
431
|
-
"path": "src/Tests/Integration/{ModuleName}/{ApiControllerName}ControllerTests.cs",
|
|
447
|
+
"path": "src/Tests/Integration/{ContextPascal}/{ApplicationName}/{ModuleName}/{ApiControllerName}ControllerTests.cs",
|
|
432
448
|
"type": "IntegrationTests",
|
|
433
449
|
"linkedUCs": ["UC-001"],
|
|
434
450
|
"module": "{moduleCode}"
|
|
435
451
|
},
|
|
436
452
|
{
|
|
437
|
-
"path": "src/Tests/Security/{ModuleName}/{ModuleName}SecurityTests.cs",
|
|
453
|
+
"path": "src/Tests/Security/{ContextPascal}/{ApplicationName}/{ModuleName}/{ModuleName}SecurityTests.cs",
|
|
438
454
|
"type": "SecurityTests",
|
|
439
455
|
"linkedFRs": ["FR-001"],
|
|
440
456
|
"module": "{moduleCode}"
|
|
@@ -451,277 +467,18 @@ Test files:
|
|
|
451
467
|
|
|
452
468
|
---
|
|
453
469
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Derive from `analysis.businessRules[]` of **EACH module**.
|
|
457
|
-
|
|
458
|
-
Generate complete mapping for each BR:
|
|
459
|
-
|
|
460
|
-
```json
|
|
461
|
-
{
|
|
462
|
-
"brToCodeMapping": [
|
|
463
|
-
{
|
|
464
|
-
"ruleId": "BR-VAL-001",
|
|
465
|
-
"title": "Order total must equal sum of item prices",
|
|
466
|
-
"module": "{moduleCode}",
|
|
467
|
-
"severity": "critical",
|
|
468
|
-
"implementationPoints": [
|
|
469
|
-
{
|
|
470
|
-
"layer": "Domain",
|
|
471
|
-
"component": "Order.cs",
|
|
472
|
-
"method": "CalculateTotal()",
|
|
473
|
-
"implementation": "Validate sum equals sum of OrderItems.Price"
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"layer": "Application",
|
|
477
|
-
"component": "CreateOrderService.cs",
|
|
478
|
-
"method": "Handle()",
|
|
479
|
-
"implementation": "Calculate total before persisting"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"layer": "API",
|
|
483
|
-
"component": "OrdersController.cs",
|
|
484
|
-
"method": "CreateOrder()",
|
|
485
|
-
"implementation": "Return validation error if total mismatch"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"layer": "Frontend",
|
|
489
|
-
"component": "OrderForm.tsx",
|
|
490
|
-
"method": "calculateTotal()",
|
|
491
|
-
"implementation": "Real-time calculation on item change"
|
|
492
|
-
}
|
|
493
|
-
]
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"ruleId": "BR-SEC-002",
|
|
497
|
-
"title": "User can only view orders from their tenant",
|
|
498
|
-
"module": "{moduleCode}",
|
|
499
|
-
"severity": "critical",
|
|
500
|
-
"implementationPoints": [
|
|
501
|
-
{
|
|
502
|
-
"layer": "Domain",
|
|
503
|
-
"component": "Order.cs",
|
|
504
|
-
"method": "Validate()",
|
|
505
|
-
"implementation": "Check TenantId matches user context"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
"layer": "Infrastructure",
|
|
509
|
-
"component": "OrderRepository.cs",
|
|
510
|
-
"method": "GetUserOrders()",
|
|
511
|
-
"implementation": "Filter by TenantId in WHERE clause"
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
"layer": "API",
|
|
515
|
-
"component": "OrdersController.cs",
|
|
516
|
-
"method": "GetOrders()",
|
|
517
|
-
"implementation": "Enforce permission check + tenant filter"
|
|
518
|
-
}
|
|
519
|
-
]
|
|
520
|
-
}
|
|
521
|
-
]
|
|
522
|
-
}
|
|
523
|
-
```
|
|
524
|
-
|
|
525
|
-
For each BR include:
|
|
526
|
-
- **ruleId**: Reference to analysis.businessRules[].id
|
|
527
|
-
- **title**: The rule statement
|
|
528
|
-
- **module**: Which module it belongs to
|
|
529
|
-
- **severity**: "critical", "high", "medium", "low"
|
|
530
|
-
- **implementationPoints**: Array of {layer, component, method, implementation}
|
|
531
|
-
|
|
532
|
-
Layers: Domain, Application, Infrastructure, API, Frontend
|
|
533
|
-
|
|
534
|
-
---
|
|
535
|
-
|
|
536
|
-
### 6. API Endpoint Summary
|
|
537
|
-
|
|
538
|
-
> **ABSOLUTE RULE:** Copy **EXACTLY** from `specification.apiEndpoints[]`. **NEVER** reinvent routes.
|
|
539
|
-
|
|
540
|
-
Generate summary with full details:
|
|
541
|
-
|
|
542
|
-
```json
|
|
543
|
-
{
|
|
544
|
-
"apiEndpointSummary": [
|
|
545
|
-
{
|
|
546
|
-
"operation": "ListOrders",
|
|
547
|
-
"method": "GET",
|
|
548
|
-
"route": "/api/business/orders",
|
|
549
|
-
"linkedUC": "UC-001",
|
|
550
|
-
"linkedFR": "FR-001",
|
|
551
|
-
"permissions": ["business.orders.read"],
|
|
552
|
-
"requestSchema": { "type": "query", "params": ["pageNumber", "pageSize", "status"] },
|
|
553
|
-
"responseSchema": { "type": "PaginatedOrderDto[]" },
|
|
554
|
-
"errorCodes": [401, 403, 400, 500],
|
|
555
|
-
"module": "{moduleCode}"
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
"operation": "CreateOrder",
|
|
559
|
-
"method": "POST",
|
|
560
|
-
"route": "/api/business/orders",
|
|
561
|
-
"linkedUC": "UC-002",
|
|
562
|
-
"linkedFR": "FR-002",
|
|
563
|
-
"permissions": ["business.orders.create"],
|
|
564
|
-
"requestSchema": { "type": "body", "schema": "CreateOrderDto" },
|
|
565
|
-
"responseSchema": { "type": "OrderDto" },
|
|
566
|
-
"errorCodes": [400, 401, 403, 422, 500],
|
|
567
|
-
"module": "{moduleCode}"
|
|
568
|
-
}
|
|
569
|
-
]
|
|
570
|
-
}
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
For each endpoint:
|
|
574
|
-
- **operation**: Use case name or operation name
|
|
575
|
-
- **method**: HTTP method (GET, POST, PUT, DELETE, PATCH)
|
|
576
|
-
- **route**: Full API path from specification
|
|
577
|
-
- **linkedUC**: Use case ID(s) this endpoint implements
|
|
578
|
-
- **linkedFR**: Feature requirement ID(s)
|
|
579
|
-
- **permissions**: Array of exact permission paths
|
|
580
|
-
- **requestSchema**: Input contract (query params or body)
|
|
581
|
-
- **responseSchema**: Output contract
|
|
582
|
-
- **errorCodes**: Expected HTTP error codes
|
|
583
|
-
- **module**: Which module
|
|
584
|
-
|
|
585
|
-
Total endpoints = count of specification.apiEndpoints[] across all modules.
|
|
586
|
-
|
|
587
|
-
---
|
|
588
|
-
|
|
589
|
-
### 7. Write Handoff to Feature.json
|
|
590
|
-
|
|
591
|
-
> **BLOCKING RULE: The handoff MUST be written in EACH module feature.json.**
|
|
592
|
-
> A handoff at master level alone is INSUFFICIENT. Ralph-loop consumes module-level handoffs.
|
|
593
|
-
> An empty module handoff (`"handoff": {}`) is a CRITICAL BUG that blocks all downstream generation.
|
|
594
|
-
|
|
595
|
-
#### 7a. Module Handoff Loop (MANDATORY)
|
|
596
|
-
|
|
597
|
-
> **STRUCTURE CARD: handoff** — Field names are EXACT. Include ALL fields below.
|
|
598
|
-
> ```json
|
|
599
|
-
> {
|
|
600
|
-
> "complexity": "simple|medium|complex",
|
|
601
|
-
> "filesToCreate": {
|
|
602
|
-
> "domain": [{"path": "...", "type": "Entity|ValueObject|Enum", "linkedFRs": [], "linkedUCs": [], "module": "..."}],
|
|
603
|
-
> "application": [{"path": "...", "type": "Service|Dto|Validator", "linkedFRs": [], "linkedUCs": [], "module": "..."}],
|
|
604
|
-
> "infrastructure": [{"path": "...", "type": "Repository|DbContext", "linkedFRs": [], "module": "..."}],
|
|
605
|
-
> "api": [{"path": "...", "type": "ApiController", "linkedUCs": [], "linkedFRs": [], "module": "..."}],
|
|
606
|
-
> "frontend": [{"path": "...", "type": "Page|Component|Hook|DashboardPage", "linkedUCs": [], "linkedWireframes": [], "module": "..."}],
|
|
607
|
-
> "seedData": [{"path": "...", "type": "HasData", "category": "core|business", "source": "...", "module": "..."}],
|
|
608
|
-
> "tests": [{"path": "...", "type": "UnitTests|IntegrationTests|SecurityTests", "linkedFRs": [], "linkedUCs": [], "module": "..."}]
|
|
609
|
-
> },
|
|
610
|
-
> "brToCodeMapping": [{"ruleId": "BR-...", "files": ["path1", "path2"], "implementation": "description"}],
|
|
611
|
-
> "apiEndpointSummary": [{"method": "GET|POST|PUT|DELETE", "path": "/api/...", "permission": "business.{app}.{module}.{action}", "linkedUC": "UC-..."}],
|
|
612
|
-
> "prdFile": ".ralph/prd-{module}.json",
|
|
613
|
-
> "totalFiles": 0,
|
|
614
|
-
> "totalTasks": 0,
|
|
615
|
-
> "handedOffAt": "{ISO timestamp}"
|
|
616
|
-
> }
|
|
617
|
-
> ```
|
|
618
|
-
> **MANDATORY fields:** ALL of the above. `filesToCreate` MUST have all 7 categories (even if empty arrays).
|
|
619
|
-
> **FORBIDDEN:** `handoff: {}` (empty object is a CRITICAL BUG). Missing `brToCodeMapping` or `apiEndpointSummary`.
|
|
620
|
-
|
|
621
|
-
**For i = 0; i < modules.length; i++:**
|
|
622
|
-
|
|
623
|
-
```
|
|
624
|
-
1. moduleCode = modules[i].code
|
|
625
|
-
2. moduleFeatureId = modules[i].featureJsonPath or find via ba-reader.findFeature()
|
|
626
|
-
3. Read the module feature.json via ba-reader.findFeature(moduleFeatureId)
|
|
627
|
-
4. Build the handoff payload for THIS module:
|
|
628
|
-
- complexity (from step 3 calculation)
|
|
629
|
-
- filesToCreate (full 7-category structure from step 4, filtered for this module)
|
|
630
|
-
- brToCodeMapping (from step 5, filtered for this module)
|
|
631
|
-
- apiEndpointSummary (from step 6, filtered for this module)
|
|
632
|
-
- prdFile path
|
|
633
|
-
- totalFiles count
|
|
634
|
-
- totalTasks count
|
|
635
|
-
- handedOffAt timestamp
|
|
636
|
-
|
|
637
|
-
5. Write via ba-writer:
|
|
638
|
-
ba-writer.enrichModuleHandoff({
|
|
639
|
-
moduleFeatureId: {moduleFeatureId},
|
|
640
|
-
handoffData: {
|
|
641
|
-
complexity: "{simple|medium|complex}",
|
|
642
|
-
filesToCreate: {...},
|
|
643
|
-
brToCodeMapping: [...],
|
|
644
|
-
apiEndpointSummary: [...],
|
|
645
|
-
prdFile: ".ralph/prd-{moduleCode}.json",
|
|
646
|
-
totalFiles: {count},
|
|
647
|
-
totalTasks: {count},
|
|
648
|
-
handedOffAt: "{ISO timestamp}"
|
|
649
|
-
}
|
|
650
|
-
})
|
|
651
|
-
|
|
652
|
-
6. VERIFICATION (MANDATORY - done automatically by enrichModuleHandoff):
|
|
653
|
-
- handoff !== {}
|
|
654
|
-
- handoff.filesToCreate has 7 categories
|
|
655
|
-
- handoff.brToCodeMapping.length > 0
|
|
656
|
-
IF verification fails → STOP, report error, do NOT continue
|
|
657
|
-
|
|
658
|
-
7. Display progress:
|
|
659
|
-
"✓ Handoff module {i+1}/{N} : {moduleCode} ({fileCount} fichiers, {brCount} BRs mappées)"
|
|
660
|
-
```
|
|
661
|
-
|
|
662
|
-
#### 7b. Master Handoff (after ALL modules written successfully)
|
|
663
|
-
|
|
664
|
-
```
|
|
665
|
-
ba-writer.enrichSection({
|
|
666
|
-
featureId: {feature_id},
|
|
667
|
-
section: "handoff",
|
|
668
|
-
data: {
|
|
669
|
-
status: "handed-off",
|
|
670
|
-
complexity: "{simple|medium|complex}",
|
|
671
|
-
implementationStrategy: "{strategy}",
|
|
672
|
-
moduleCount: {count},
|
|
673
|
-
moduleOrder: [...],
|
|
674
|
-
totalFilesToCreate: {sum across all modules},
|
|
675
|
-
totalTasks: {sum across all modules},
|
|
676
|
-
prdStructure: "per-module | consolidated",
|
|
677
|
-
prdFiles: [
|
|
678
|
-
{ module: "{module1}", path: ".ralph/prd-{module1}.json" },
|
|
679
|
-
{ module: "{module2}", path: ".ralph/prd-{module2}.json" }
|
|
680
|
-
],
|
|
681
|
-
progressTrackerPath: ".ralph/progress.txt",
|
|
682
|
-
handedOffAt: "{ISO timestamp}"
|
|
683
|
-
}
|
|
684
|
-
})
|
|
685
|
-
```
|
|
686
|
-
|
|
687
|
-
#### 7c. Final Verification (BLOCKING)
|
|
688
|
-
|
|
689
|
-
```
|
|
690
|
-
count = 0
|
|
691
|
-
FOR each module in modules[]:
|
|
692
|
-
Read module feature.json
|
|
693
|
-
IF module.handoff !== {} AND module.status === "handed-off":
|
|
694
|
-
count++
|
|
695
|
-
|
|
696
|
-
IF count < modules.length:
|
|
697
|
-
→ BLOCKING ERROR: {modules.length - count} modules missing handoff
|
|
698
|
-
→ List the missing modules by name
|
|
699
|
-
→ DO NOT proceed to step 10
|
|
700
|
-
→ Return to 9a for missing modules only
|
|
701
|
-
|
|
702
|
-
IF count === modules.length:
|
|
703
|
-
ba-writer.updateStatus({feature_id}, "handed-off")
|
|
704
|
-
Display: "✓ Handoff complet: {count}/{modules.length} modules avec handoff valide"
|
|
705
|
-
```
|
|
706
|
-
|
|
707
|
-
Status journey: analyze → consolidate → **handed-off**
|
|
708
|
-
|
|
709
|
-
---
|
|
710
|
-
|
|
711
|
-
## SELF-VERIFICATION (MANDATORY before loading step-05b)
|
|
470
|
+
## SELF-VERIFICATION (MANDATORY before loading step-05b-mapping)
|
|
712
471
|
|
|
713
|
-
Before proceeding to step-05b-
|
|
472
|
+
Before proceeding to step-05b-mapping.md, VERIFY:
|
|
714
473
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
4. **Master feature.json** has `handoff` section with implementationStrategy, moduleOrder, totalFilesToCreate
|
|
719
|
-
5. **Master status** = "handed-off"
|
|
474
|
+
- **filesToCreate** has all 7 categories populated (domain, application, infrastructure, api, frontend, seedData, tests) for each module
|
|
475
|
+
- **Complexity** calculated for all modules using the matrix from section 3
|
|
476
|
+
- **Implementation strategy** chosen (for multi-module features)
|
|
720
477
|
|
|
721
|
-
**IF any check fails → FIX before proceeding.**
|
|
478
|
+
**IF any check fails → FIX before proceeding.** The mapping and write operations in step-05b depend on complete handoff data structure.
|
|
722
479
|
|
|
723
480
|
---
|
|
724
481
|
|
|
725
482
|
## NEXT STEP
|
|
726
483
|
|
|
727
|
-
Load: `steps/step-05b-
|
|
484
|
+
Load: `steps/step-05b-mapping.md`
|