@atlashub/smartstack-cli 3.8.0 → 3.9.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 +365 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/templates/agents/action.md +1 -0
- package/templates/agents/ba-writer.md +33 -0
- package/templates/agents/explore-codebase.md +1 -0
- package/templates/agents/explore-docs.md +1 -0
- package/templates/agents/fix-grammar.md +1 -0
- package/templates/agents/snipper.md +1 -0
- package/templates/skills/admin/SKILL.md +6 -0
- package/templates/skills/ai-prompt/SKILL.md +32 -136
- package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
- package/templates/skills/apex/SKILL.md +120 -0
- package/templates/skills/apex/_shared.md +86 -0
- package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
- package/templates/skills/apex/references/smartstack-layers.md +173 -0
- package/templates/skills/apex/steps/step-00-init.md +156 -0
- package/templates/skills/apex/steps/step-01-analyze.md +169 -0
- package/templates/skills/apex/steps/step-02-plan.md +160 -0
- package/templates/skills/apex/steps/step-03-execute.md +166 -0
- package/templates/skills/apex/steps/step-04-validate.md +138 -0
- package/templates/skills/apex/steps/step-05-examine.md +124 -0
- package/templates/skills/apex/steps/step-06-resolve.md +105 -0
- package/templates/skills/apex/steps/step-07-tests.md +130 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
- package/templates/skills/application/SKILL.md +10 -0
- package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
- package/templates/skills/application/references/backend-entity-seeding.md +72 -0
- package/templates/skills/application/references/backend-verification.md +88 -0
- package/templates/skills/application/references/frontend-verification.md +111 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
- package/templates/skills/application/references/provider-template.md +134 -0
- package/templates/skills/application/references/test-frontend.md +73 -0
- package/templates/skills/application/references/test-prerequisites.md +72 -0
- package/templates/skills/application/steps/step-01-navigation.md +7 -198
- package/templates/skills/application/steps/step-03b-provider.md +4 -128
- package/templates/skills/application/steps/step-04-backend.md +20 -350
- package/templates/skills/application/steps/step-05-frontend.md +12 -101
- package/templates/skills/application/steps/step-07-tests.md +12 -132
- package/templates/skills/business-analyse/SKILL.md +11 -2
- package/templates/skills/business-analyse/html/ba-interactive.html +176 -14
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +1 -0
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +16 -4
- package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +7 -2
- package/templates/skills/business-analyse/html/src/scripts/09-export.js +103 -0
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +12 -6
- package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +24 -2
- package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +12 -0
- package/templates/skills/business-analyse/html/src/template.html +1 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
- package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
- package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
- package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
- package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
- package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
- package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
- package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
- package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +35 -68
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
- package/templates/skills/business-analyse/steps/step-03a-data.md +6 -49
- package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
- package/templates/skills/business-analyse/steps/step-03d-validate.md +3 -48
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +9 -104
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +25 -441
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +19 -187
- package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
- package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
- package/templates/skills/check-version/SKILL.md +7 -0
- package/templates/skills/controller/references/controller-code-templates.md +159 -0
- package/templates/skills/controller/references/permission-sync-templates.md +152 -0
- package/templates/skills/controller/steps/step-03-generate.md +6 -158
- package/templates/skills/controller/steps/step-04-perms.md +5 -144
- package/templates/skills/debug/SKILL.md +7 -0
- package/templates/skills/explore/SKILL.md +6 -0
- package/templates/skills/feature-full/SKILL.md +39 -142
- package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
- package/templates/skills/gitflow/references/init-config-template.md +135 -0
- package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
- package/templates/skills/gitflow/references/plan-template.md +69 -0
- package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
- package/templates/skills/gitflow/references/start-local-config.md +110 -0
- package/templates/skills/gitflow/steps/step-init.md +18 -289
- package/templates/skills/gitflow/steps/step-plan.md +6 -63
- package/templates/skills/gitflow/steps/step-start.md +16 -126
- package/templates/skills/mcp/SKILL.md +9 -213
- package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
- package/templates/skills/mcp/steps/step-02-tools.md +73 -0
- package/templates/skills/notification/SKILL.md +7 -0
- package/templates/skills/quick-search/SKILL.md +5 -0
- package/templates/skills/ralph-loop/SKILL.md +99 -381
- package/templates/skills/ralph-loop/references/category-rules.md +259 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
- package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
- package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
- package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
- package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
- package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
- package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
- package/templates/skills/refactor/SKILL.md +12 -176
- package/templates/skills/refactor/steps/step-01-discover.md +60 -0
- package/templates/skills/refactor/steps/step-02-execute.md +67 -0
- package/templates/skills/review-code/SKILL.md +19 -257
- package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
- package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
- package/templates/skills/review-code/steps/step-03-react.md +44 -0
- package/templates/skills/ui-components/SKILL.md +7 -0
- package/templates/skills/utils/SKILL.md +6 -0
- package/templates/skills/validate/SKILL.md +6 -0
- package/templates/skills/validate-feature/SKILL.md +8 -0
- package/templates/skills/workflow/SKILL.md +40 -118
- package/templates/skills/workflow/steps/step-01-implementation.md +84 -0
|
@@ -142,410 +142,35 @@ For **EACH module** in topological order:
|
|
|
142
142
|
> - API: `src/API/Controllers/Business/HumanResources/ProjectsController.cs`
|
|
143
143
|
> - Tests: `src/Tests/Unit/Domain/Business/HumanResources/Projects/ProjectTests.cs`
|
|
144
144
|
|
|
145
|
-
#### 4.1
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
- Domain exceptions specific to module (`src/Domain/Exceptions/{ContextPascal}/{ApplicationName}/{ModuleName}/{ExceptionName}.cs`)
|
|
165
|
-
|
|
166
|
-
#### 4.2 Application Files
|
|
167
|
-
|
|
168
|
-
From `analysis.useCases[]` of the module:
|
|
169
|
-
|
|
170
|
-
```json
|
|
171
|
-
"application": [
|
|
172
|
-
{
|
|
173
|
-
"path": "src/Application/Services/{ContextPascal}/{ApplicationName}/{ModuleName}/{ServiceName}Service.cs",
|
|
174
|
-
"type": "Service",
|
|
175
|
-
"linkedFRs": ["FR-001"],
|
|
176
|
-
"linkedUCs": ["UC-001", "UC-002"],
|
|
177
|
-
"module": "{moduleCode}"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"path": "src/Application/DTOs/{ContextPascal}/{ApplicationName}/{ModuleName}/{DtoName}Dto.cs",
|
|
181
|
-
"type": "Dto",
|
|
182
|
-
"linkedUCs": ["UC-001"],
|
|
183
|
-
"module": "{moduleCode}"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"path": "src/Application/Validators/{ContextPascal}/{ApplicationName}/{ModuleName}/{ValidatorName}Validator.cs",
|
|
187
|
-
"type": "Validator",
|
|
188
|
-
"linkedFRs": ["FR-001"],
|
|
189
|
-
"module": "{moduleCode}"
|
|
190
|
-
}
|
|
191
|
-
]
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Include:
|
|
195
|
-
- Service per use case cluster (or per domain entity if applicable)
|
|
196
|
-
- DTOs for API contracts
|
|
197
|
-
- Validators for FluentValidation
|
|
198
|
-
- Query handlers
|
|
199
|
-
|
|
200
|
-
#### 4.3 Infrastructure Files
|
|
201
|
-
|
|
202
|
-
From `analysis.entities[]` of the module:
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
"infrastructure": [
|
|
206
|
-
{
|
|
207
|
-
"path": "src/Infrastructure/Persistence/Configurations/{ContextPascal}/{ApplicationName}/{ModuleName}/{EntityName}Configuration.cs",
|
|
208
|
-
"type": "EFConfiguration",
|
|
209
|
-
"linkedFRs": ["FR-001"],
|
|
210
|
-
"module": "{moduleCode}"
|
|
211
|
-
}
|
|
212
|
-
]
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Include:
|
|
216
|
-
- EF Core configuration per entity (`Persistence/Configurations/{ContextPascal}/{ApplicationName}/{ModuleName}/`)
|
|
217
|
-
- DbSet registration in `IExtensionsDbContext` / `ExtensionsDbContext`
|
|
218
|
-
- DI registration in `DependencyInjection.cs`
|
|
219
|
-
- Specifications if complex queries
|
|
220
|
-
|
|
221
|
-
#### 4.4 API Files
|
|
222
|
-
|
|
223
|
-
From `specification.apiEndpoints[]` of the module:
|
|
224
|
-
|
|
225
|
-
```json
|
|
226
|
-
"api": [
|
|
227
|
-
{
|
|
228
|
-
"path": "src/API/Controllers/{ContextShort}/{ApplicationName}/{EntityName}Controller.cs",
|
|
229
|
-
"type": "ApiController",
|
|
230
|
-
"linkedUCs": ["UC-001", "UC-002"],
|
|
231
|
-
"linkedFRs": ["FR-001"],
|
|
232
|
-
"module": "{moduleCode}"
|
|
233
|
-
}
|
|
234
|
-
]
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
> **Context-to-folder mapping (`{ContextShort}`):** `business` → `Business`, `platform` → `Admin`, `personal` → `User`
|
|
238
|
-
|
|
239
|
-
Include:
|
|
240
|
-
- One controller per domain aggregate root (or logical grouping)
|
|
241
|
-
- Include all HTTP methods (GET, POST, PUT, DELETE, PATCH)
|
|
242
|
-
- Error handling and validation responses
|
|
243
|
-
|
|
244
|
-
#### 4.5 Frontend Files
|
|
245
|
-
|
|
246
|
-
From `specification.uiWireframes[]`, `specification.dashboards[]` and `analysis.useCases[]` of the module:
|
|
247
|
-
|
|
248
|
-
> **WIREFRAME TRACEABILITY RULE:** Every frontend file (Page, DashboardPage, Component) MUST include `linkedWireframes[]` referencing the wireframe `screen` identifiers from `specification.uiWireframes[]`. This ensures the BA mockups validated by the client are respected during implementation.
|
|
249
|
-
|
|
250
|
-
```json
|
|
251
|
-
"frontend": [
|
|
252
|
-
{
|
|
253
|
-
"path": "src/pages/{ModuleName}/{PageName}Page.tsx",
|
|
254
|
-
"type": "Page",
|
|
255
|
-
"linkedUCs": ["UC-001", "UC-002"],
|
|
256
|
-
"linkedWireframes": ["{module}-list"],
|
|
257
|
-
"module": "{moduleCode}",
|
|
258
|
-
"wireframeAcceptanceCriteria": "Layout MUST match wireframe '{module}-list': elements [{elements}], actions [{actions}]. See specification.uiWireframes[] for exact mockup."
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"path": "src/pages/{ModuleName}/{PageName}DetailPage.tsx",
|
|
262
|
-
"type": "Page",
|
|
263
|
-
"linkedUCs": ["UC-003"],
|
|
264
|
-
"linkedWireframes": ["{module}-detail"],
|
|
265
|
-
"module": "{moduleCode}",
|
|
266
|
-
"wireframeAcceptanceCriteria": "Layout MUST match wireframe '{module}-detail': elements [{elements}], actions [{actions}]. See specification.uiWireframes[] for exact mockup."
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"path": "src/pages/{ModuleName}/{DashboardName}DashboardPage.tsx",
|
|
270
|
-
"type": "DashboardPage",
|
|
271
|
-
"linkedUCs": ["UC-060"],
|
|
272
|
-
"linkedWireframes": ["{module}-dashboard"],
|
|
273
|
-
"module": "{moduleCode}",
|
|
274
|
-
"dashboardRef": "{module}-dashboard",
|
|
275
|
-
"instructions": "Use Recharts library. See specification.dashboards[] for KPI definitions, chart types, filters, and data sources.",
|
|
276
|
-
"wireframeAcceptanceCriteria": "Layout MUST match wireframe '{module}-dashboard': KPI card positions, chart placement, filter bar location. See specification.uiWireframes[] AND specification.dashboards[] for exact mockup and KPI specs."
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"path": "src/components/{ModuleName}/{ComponentName}.tsx",
|
|
280
|
-
"type": "Component",
|
|
281
|
-
"linkedUCs": ["UC-001"],
|
|
282
|
-
"linkedWireframes": ["{module}-{section}"],
|
|
283
|
-
"module": "{moduleCode}"
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"path": "src/hooks/use{ModuleName}{Hook}.ts",
|
|
287
|
-
"type": "Hook",
|
|
288
|
-
"linkedUCs": ["UC-001", "UC-002"],
|
|
289
|
-
"module": "{moduleCode}"
|
|
290
|
-
}
|
|
291
|
-
]
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
**Wireframe Acceptance Criteria (ALL frontend pages):**
|
|
295
|
-
> **MANDATORY** for every Page and DashboardPage task. These criteria ensure the BA mockups are respected.
|
|
296
|
-
- Layout structure matches the validated ASCII/SVG wireframe from `specification.uiWireframes[]`
|
|
297
|
-
- All `elements` listed in the wireframe are present in the generated component
|
|
298
|
-
- All `actions` listed in the wireframe are implemented with correct permissions
|
|
299
|
-
- Component mapping follows the wireframe-to-component table (see step-03 section 3b-bis)
|
|
300
|
-
- If wireframe shows a DataGrid → implement with `SmartTable` or `EntityCard` grid
|
|
301
|
-
- If wireframe shows FilterBar → implement with `SmartFilter`
|
|
302
|
-
- If wireframe shows ActionButton → wrap in `RequirePermission`
|
|
303
|
-
|
|
304
|
-
**Dashboard pages (type: DashboardPage):**
|
|
305
|
-
- Generated from `specification.dashboards[]` entries
|
|
306
|
-
- `dashboardRef` links to the dashboard code in specification.dashboards[]
|
|
307
|
-
- `linkedWireframes` links to the dashboard wireframe in specification.uiWireframes[]
|
|
308
|
-
- `instructions` MUST reference chart types, KPI definitions, and data sources
|
|
309
|
-
- Acceptance criteria for DashboardPage tasks MUST include:
|
|
310
|
-
- Chart library (Recharts) installed in package.json
|
|
311
|
-
- Chart types matching specification.dashboards[].kpis[].visualization
|
|
312
|
-
- KPI cards for kpi-card type visualizations
|
|
313
|
-
- Filters functional (dateRange, select, etc.)
|
|
314
|
-
- CSS variables used (no hardcoded colors) - see ui-components/patterns/dashboard-chart.md
|
|
315
|
-
- Responsive layout (1-col mobile, 2-col tablet, 3-col desktop)
|
|
316
|
-
- **KPI card positions match wireframe layout** (e.g., 4 cards in a row if wireframe shows 4)
|
|
317
|
-
- **Chart placement matches wireframe** (e.g., 2-column grid if wireframe shows side-by-side)
|
|
318
|
-
|
|
319
|
-
**Standard pages (type: Page):**
|
|
320
|
-
- Pages for major use cases
|
|
321
|
-
- Components for reusable UI elements
|
|
322
|
-
- Custom hooks for business logic
|
|
323
|
-
- Forms for data entry
|
|
324
|
-
- List/Detail views
|
|
325
|
-
- **ALL pages MUST reference their wireframe via `linkedWireframes`**
|
|
326
|
-
|
|
327
|
-
#### 4.6 SeedData Files
|
|
328
|
-
|
|
329
|
-
**OBLIGATORY:** 5 CORE SeedData entries per module + business seed data:
|
|
330
|
-
|
|
331
|
-
```json
|
|
332
|
-
"seedData": [
|
|
333
|
-
{
|
|
334
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/{ModuleName}/NavigationModuleSeedData.cs",
|
|
335
|
-
"type": "SeedData",
|
|
336
|
-
"category": "core",
|
|
337
|
-
"source": "specification.seedDataCore.navigationModules",
|
|
338
|
-
"module": "{moduleCode}"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/{ModuleName}/PermissionsSeedData.cs",
|
|
342
|
-
"type": "SeedData",
|
|
343
|
-
"category": "core",
|
|
344
|
-
"source": "specification.seedDataCore.permissions",
|
|
345
|
-
"module": "{moduleCode}"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/{ModuleName}/RolesSeedData.cs",
|
|
349
|
-
"type": "SeedData",
|
|
350
|
-
"category": "core",
|
|
351
|
-
"source": "specification.seedDataCore.roles",
|
|
352
|
-
"module": "{moduleCode}"
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/{ModuleName}/TenantSeedData.cs",
|
|
356
|
-
"type": "SeedData",
|
|
357
|
-
"category": "core",
|
|
358
|
-
"source": "specification.seedDataCore.tenants",
|
|
359
|
-
"module": "{moduleCode}"
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/{ModuleName}/UserSeedData.cs",
|
|
363
|
-
"type": "SeedData",
|
|
364
|
-
"category": "core",
|
|
365
|
-
"source": "specification.seedDataCore.users",
|
|
366
|
-
"module": "{moduleCode}"
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/{ModuleName}/{Entity}SeedData.cs",
|
|
370
|
-
"type": "SeedData",
|
|
371
|
-
"category": "business",
|
|
372
|
-
"source": "specification.seedDataBusiness.{module}",
|
|
373
|
-
"module": "{moduleCode}"
|
|
374
|
-
}
|
|
375
|
-
]
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
**For client projects (ExtensionsDbContext), add these MANDATORY infrastructure files:**
|
|
379
|
-
|
|
380
|
-
```json
|
|
381
|
-
"seedData": [
|
|
382
|
-
// ... 5 core + business entries above ...
|
|
383
|
-
{
|
|
384
|
-
"path": "src/Infrastructure/Persistence/Seeding/{AppPascalName}SeedDataProvider.cs",
|
|
385
|
-
"type": "IClientSeedDataProvider",
|
|
386
|
-
"category": "infrastructure",
|
|
387
|
-
"description": "Runtime provider that injects core seed data (navigation, permissions, roles) into Core schema",
|
|
388
|
-
"source": "specification.seedDataCore",
|
|
389
|
-
"module": "{moduleCode}"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"path": "src/Infrastructure/Persistence/Seeding/DevDataSeeder.cs",
|
|
393
|
-
"type": "DevDataSeeder",
|
|
394
|
-
"category": "infrastructure",
|
|
395
|
-
"description": "Seeds development/demo data for domain entities at startup",
|
|
396
|
-
"module": "{moduleCode}"
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"path": "src/Infrastructure/Persistence/Seeding/Data/SeedConstants.cs",
|
|
400
|
-
"type": "SeedConstants",
|
|
401
|
-
"category": "infrastructure",
|
|
402
|
-
"description": "Shared constants for deterministic seed data",
|
|
403
|
-
"module": "{moduleCode}"
|
|
404
|
-
}
|
|
405
|
-
]
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
**Path convention:** All seed data files MUST be under `Persistence/Seeding/Data/` (matching SmartStack.app architecture).
|
|
409
|
-
NEVER use `Data/SeedData/` or `Infrastructure/Data/SeedData/`.
|
|
410
|
-
|
|
411
|
-
**IClientSeedDataProvider (MANDATORY for client projects):** This provider injects core seed data
|
|
412
|
-
(navigation, permissions, roles) into the Core schema at runtime. Generated at
|
|
413
|
-
`src/Infrastructure/Persistence/Seeding/{AppPascalName}SeedDataProvider.cs`.
|
|
414
|
-
See `/application` skill step-03b-provider for the full pattern.
|
|
415
|
-
Without this provider, the 5 core SeedData files are DEAD CODE and will have no effect.
|
|
416
|
-
|
|
417
|
-
Core categories (ALWAYS 5):
|
|
418
|
-
1. NavigationModuleSeedData (navigation items for module)
|
|
419
|
-
2. PermissionsSeedData (RBAC permissions)
|
|
420
|
-
3. RolesSeedData (roles using permissions)
|
|
421
|
-
4. TenantSeedData (test tenants)
|
|
422
|
-
5. UserSeedData (test users)
|
|
423
|
-
|
|
424
|
-
Business categories (from specification.seedDataBusiness):
|
|
425
|
-
- Domain-specific reference data
|
|
426
|
-
- Test data fixtures
|
|
427
|
-
- Lookup tables (statuses, categories, etc.)
|
|
428
|
-
|
|
429
|
-
#### 4.7 Test Files
|
|
430
|
-
|
|
431
|
-
```json
|
|
432
|
-
"tests": [
|
|
433
|
-
{
|
|
434
|
-
"path": "src/Tests/Unit/Domain/{ContextPascal}/{ApplicationName}/{ModuleName}/{Entity}Tests.cs",
|
|
435
|
-
"type": "UnitTests",
|
|
436
|
-
"linkedFRs": ["FR-001"],
|
|
437
|
-
"module": "{moduleCode}"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"path": "src/Tests/Unit/Application/{ContextPascal}/{ApplicationName}/{ModuleName}/{ServiceName}ServiceTests.cs",
|
|
441
|
-
"type": "UnitTests",
|
|
442
|
-
"linkedFRs": ["FR-001"],
|
|
443
|
-
"linkedUCs": ["UC-001"],
|
|
444
|
-
"module": "{moduleCode}"
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"path": "src/Tests/Integration/{ContextPascal}/{ApplicationName}/{ModuleName}/{ApiControllerName}ControllerTests.cs",
|
|
448
|
-
"type": "IntegrationTests",
|
|
449
|
-
"linkedUCs": ["UC-001"],
|
|
450
|
-
"module": "{moduleCode}"
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
"path": "src/Tests/Security/{ContextPascal}/{ApplicationName}/{ModuleName}/{ModuleName}SecurityTests.cs",
|
|
454
|
-
"type": "SecurityTests",
|
|
455
|
-
"linkedFRs": ["FR-001"],
|
|
456
|
-
"module": "{moduleCode}"
|
|
457
|
-
}
|
|
458
|
-
]
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
Test files:
|
|
462
|
-
- Unit tests for domain entities and value objects
|
|
463
|
-
- Unit tests for services and validators
|
|
464
|
-
- Integration tests for API endpoints
|
|
465
|
-
- Security tests for authorization and tenant isolation
|
|
466
|
-
- E2E tests for critical user flows
|
|
145
|
+
#### 4.1-4.7 File Category Templates
|
|
146
|
+
|
|
147
|
+
See [references/handoff-file-templates.md](../references/handoff-file-templates.md) for the complete JSON templates for all 7 categories:
|
|
148
|
+
|
|
149
|
+
| Category | Source | Key rules |
|
|
150
|
+
|----------|--------|-----------|
|
|
151
|
+
| **4.1 Domain** | `analysis.entities[]` | Entities, ValueObjects, Enums, Exceptions |
|
|
152
|
+
| **4.2 Application** | `analysis.useCases[]` | Services, DTOs, Validators |
|
|
153
|
+
| **4.3 Infrastructure** | `analysis.entities[]` | EF Configurations, DbSet, DI |
|
|
154
|
+
| **4.4 API** | `specification.apiEndpoints[]` | Controllers with `{ContextShort}` mapping |
|
|
155
|
+
| **4.5 Frontend** | `specification.uiWireframes[]` | Pages, Components, Hooks + wireframe traceability |
|
|
156
|
+
| **4.6 SeedData** | `specification.seedDataCore` | 5 CORE + business + IClientSeedDataProvider |
|
|
157
|
+
| **4.7 Tests** | All layers | Unit, Integration, Security tests |
|
|
158
|
+
|
|
159
|
+
**Critical rules:**
|
|
160
|
+
- All backend paths include `{ContextPascal}/{ApplicationName}/` hierarchy
|
|
161
|
+
- Frontend pages MUST have `linkedWireframes[]` + `wireframeAcceptanceCriteria`
|
|
162
|
+
- SeedData: 5 CORE entries ALWAYS + IClientSeedDataProvider for client projects
|
|
163
|
+
- Path convention: `Persistence/Seeding/Data/` (NEVER `Data/SeedData/`)
|
|
467
164
|
|
|
468
165
|
---
|
|
469
166
|
|
|
470
167
|
### 5. Map Business Rules to Code
|
|
471
168
|
|
|
472
|
-
|
|
169
|
+
See [references/handoff-mappings.md](../references/handoff-mappings.md) — Section "Business Rules to Code Mapping".
|
|
473
170
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
{
|
|
478
|
-
"brToCodeMapping": [
|
|
479
|
-
{
|
|
480
|
-
"ruleId": "BR-VAL-001",
|
|
481
|
-
"title": "Order total must equal sum of item prices",
|
|
482
|
-
"module": "{moduleCode}",
|
|
483
|
-
"severity": "critical",
|
|
484
|
-
"implementationPoints": [
|
|
485
|
-
{
|
|
486
|
-
"layer": "Domain",
|
|
487
|
-
"component": "Order.cs",
|
|
488
|
-
"method": "CalculateTotal()",
|
|
489
|
-
"implementation": "Validate sum equals sum of OrderItems.Price"
|
|
490
|
-
},
|
|
491
|
-
{
|
|
492
|
-
"layer": "Application",
|
|
493
|
-
"component": "CreateOrderService.cs",
|
|
494
|
-
"method": "Handle()",
|
|
495
|
-
"implementation": "Calculate total before persisting"
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
"layer": "API",
|
|
499
|
-
"component": "OrdersController.cs",
|
|
500
|
-
"method": "CreateOrder()",
|
|
501
|
-
"implementation": "Return validation error if total mismatch"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"layer": "Frontend",
|
|
505
|
-
"component": "OrderForm.tsx",
|
|
506
|
-
"method": "calculateTotal()",
|
|
507
|
-
"implementation": "Real-time calculation on item change"
|
|
508
|
-
}
|
|
509
|
-
]
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
"ruleId": "BR-SEC-002",
|
|
513
|
-
"title": "User can only view orders from their tenant",
|
|
514
|
-
"module": "{moduleCode}",
|
|
515
|
-
"severity": "critical",
|
|
516
|
-
"implementationPoints": [
|
|
517
|
-
{
|
|
518
|
-
"layer": "Domain",
|
|
519
|
-
"component": "Order.cs",
|
|
520
|
-
"method": "Validate()",
|
|
521
|
-
"implementation": "Check TenantId matches user context"
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
"layer": "Infrastructure",
|
|
525
|
-
"component": "OrderRepository.cs",
|
|
526
|
-
"method": "GetUserOrders()",
|
|
527
|
-
"implementation": "Filter by TenantId in WHERE clause"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
"layer": "API",
|
|
531
|
-
"component": "OrdersController.cs",
|
|
532
|
-
"method": "GetOrders()",
|
|
533
|
-
"implementation": "Enforce permission check + tenant filter"
|
|
534
|
-
}
|
|
535
|
-
]
|
|
536
|
-
}
|
|
537
|
-
]
|
|
538
|
-
}
|
|
539
|
-
```
|
|
540
|
-
|
|
541
|
-
For each BR include:
|
|
542
|
-
- **ruleId**: Reference to analysis.businessRules[].id
|
|
543
|
-
- **title**: The rule statement
|
|
544
|
-
- **module**: Which module it belongs to
|
|
545
|
-
- **severity**: "critical", "high", "medium", "low"
|
|
546
|
-
- **implementationPoints**: Array of {layer, component, method, implementation}
|
|
547
|
-
|
|
548
|
-
Layers: Domain, Application, Infrastructure, API, Frontend
|
|
171
|
+
For each BR in `analysis.businessRules[]` of EACH module, generate:
|
|
172
|
+
- **ruleId**, **title**, **module**, **severity** (critical/high/medium/low)
|
|
173
|
+
- **implementationPoints**: Array of `{layer, component, method, implementation}` across Domain, Application, Infrastructure, API, Frontend
|
|
549
174
|
|
|
550
175
|
---
|
|
551
176
|
|
|
@@ -553,50 +178,9 @@ Layers: Domain, Application, Infrastructure, API, Frontend
|
|
|
553
178
|
|
|
554
179
|
> **ABSOLUTE RULE:** Copy **EXACTLY** from `specification.apiEndpoints[]`. **NEVER** reinvent routes.
|
|
555
180
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
```json
|
|
559
|
-
{
|
|
560
|
-
"apiEndpointSummary": [
|
|
561
|
-
{
|
|
562
|
-
"operation": "ListOrders",
|
|
563
|
-
"method": "GET",
|
|
564
|
-
"route": "/api/business/orders",
|
|
565
|
-
"linkedUC": "UC-001",
|
|
566
|
-
"linkedFR": "FR-001",
|
|
567
|
-
"permissions": ["business.orders.read"],
|
|
568
|
-
"requestSchema": { "type": "query", "params": ["pageNumber", "pageSize", "status"] },
|
|
569
|
-
"responseSchema": { "type": "PaginatedOrderDto[]" },
|
|
570
|
-
"errorCodes": [401, 403, 400, 500],
|
|
571
|
-
"module": "{moduleCode}"
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
"operation": "CreateOrder",
|
|
575
|
-
"method": "POST",
|
|
576
|
-
"route": "/api/business/orders",
|
|
577
|
-
"linkedUC": "UC-002",
|
|
578
|
-
"linkedFR": "FR-002",
|
|
579
|
-
"permissions": ["business.orders.create"],
|
|
580
|
-
"requestSchema": { "type": "body", "schema": "CreateOrderDto" },
|
|
581
|
-
"responseSchema": { "type": "OrderDto" },
|
|
582
|
-
"errorCodes": [400, 401, 403, 422, 500],
|
|
583
|
-
"module": "{moduleCode}"
|
|
584
|
-
}
|
|
585
|
-
]
|
|
586
|
-
}
|
|
587
|
-
```
|
|
181
|
+
See [references/handoff-mappings.md](../references/handoff-mappings.md) — Section "API Endpoint Summary".
|
|
588
182
|
|
|
589
|
-
For each endpoint:
|
|
590
|
-
- **operation**: Use case name or operation name
|
|
591
|
-
- **method**: HTTP method (GET, POST, PUT, DELETE, PATCH)
|
|
592
|
-
- **route**: Full API path from specification
|
|
593
|
-
- **linkedUC**: Use case ID(s) this endpoint implements
|
|
594
|
-
- **linkedFR**: Feature requirement ID(s)
|
|
595
|
-
- **permissions**: Array of exact permission paths
|
|
596
|
-
- **requestSchema**: Input contract (query params or body)
|
|
597
|
-
- **responseSchema**: Output contract
|
|
598
|
-
- **errorCodes**: Expected HTTP error codes
|
|
599
|
-
- **module**: Which module
|
|
183
|
+
For each endpoint: operation, method, route, linkedUC, linkedFR, permissions, requestSchema, responseSchema, errorCodes, module.
|
|
600
184
|
|
|
601
185
|
Total endpoints = count of specification.apiEndpoints[] across all modules.
|
|
602
186
|
|