@devtrack-solution/codesdd 1.2.4-rc3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/.sdd/skills/curated/devtrack-api/SKILL.md +91 -12
  2. package/.sdd/skills/curated/devtrack-api/agents/claude-code.yaml +2 -0
  3. package/.sdd/skills/curated/devtrack-api/agents/codex.yaml +2 -0
  4. package/.sdd/skills/curated/devtrack-api/agents/cursor.yaml +2 -0
  5. package/.sdd/skills/curated/devtrack-api/agents/gemini.yaml +2 -0
  6. package/.sdd/skills/curated/devtrack-api/agents/kimi.yaml +2 -0
  7. package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +3 -3
  8. package/.sdd/skills/curated/devtrack-api/agents/opencode.yaml +2 -0
  9. package/.sdd/skills/curated/devtrack-api/references/application-presentation.md +59 -3
  10. package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +15 -3
  11. package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +1898 -2
  12. package/.sdd/skills/curated/devtrack-api/references/domain-modeling.md +3 -1
  13. package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +40 -0
  14. package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +20 -2
  15. package/.sdd/skills/curated/devtrack-api/references/generated-artifact-invalidation.md +97 -0
  16. package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +30 -1
  17. package/.sdd/skills/curated/devtrack-api/references/portable-agent-contract.md +4 -3
  18. package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +22 -1
  19. package/.sdd/skills/curated/devtrack-api/references/typeorm-infrastructure.md +9 -5
  20. package/README.md +122 -25
  21. package/dist/cli/program.js +180 -11
  22. package/dist/commands/config.js +27 -1
  23. package/dist/commands/sdd/execution.js +64 -2
  24. package/dist/commands/sdd.js +119 -4
  25. package/dist/core/cli/command-matrix.d.ts +18 -0
  26. package/dist/core/cli/command-matrix.js +148 -0
  27. package/dist/core/cli-command-quality.js +2 -0
  28. package/dist/core/config-schema.d.ts +14 -1
  29. package/dist/core/config-schema.js +32 -1
  30. package/dist/core/config.d.ts +1 -0
  31. package/dist/core/config.js +11 -0
  32. package/dist/core/global-config.d.ts +13 -0
  33. package/dist/core/init.d.ts +2 -2
  34. package/dist/core/init.js +13 -14
  35. package/dist/core/sdd/agent-binding.d.ts +9 -9
  36. package/dist/core/sdd/agent-runtime-contract.d.ts +4 -4
  37. package/dist/core/sdd/allocator-recovery.d.ts +14 -0
  38. package/dist/core/sdd/allocator-recovery.js +30 -0
  39. package/dist/core/sdd/allocator-security.d.ts +18 -0
  40. package/dist/core/sdd/allocator-security.js +36 -0
  41. package/dist/core/sdd/api-foundation-baseline.d.ts +111 -0
  42. package/dist/core/sdd/api-foundation-baseline.js +151 -0
  43. package/dist/core/sdd/api-foundation-parity.d.ts +114 -0
  44. package/dist/core/sdd/api-foundation-parity.js +131 -0
  45. package/dist/core/sdd/api-profile-catalog.d.ts +36 -0
  46. package/dist/core/sdd/api-profile-catalog.js +132 -0
  47. package/dist/core/sdd/api-profile-dry-run-projection.d.ts +93 -0
  48. package/dist/core/sdd/api-profile-dry-run-projection.js +370 -0
  49. package/dist/core/sdd/api-profile-recipes.d.ts +82 -0
  50. package/dist/core/sdd/api-profile-recipes.js +484 -0
  51. package/dist/core/sdd/artifact-id-allocator.d.ts +368 -0
  52. package/dist/core/sdd/artifact-id-allocator.js +510 -0
  53. package/dist/core/sdd/check.d.ts +50 -1
  54. package/dist/core/sdd/check.js +286 -9
  55. package/dist/core/sdd/deepagent-contracts.d.ts +4 -4
  56. package/dist/core/sdd/deepagents/reversa-subagents.d.ts +3 -3
  57. package/dist/core/sdd/default-bootstrap-files.d.ts +1 -1
  58. package/dist/core/sdd/default-bootstrap-files.js +0 -2
  59. package/dist/core/sdd/default-skills.js +7 -5
  60. package/dist/core/sdd/devtrack-api-appliance.d.ts +34 -0
  61. package/dist/core/sdd/devtrack-api-appliance.js +138 -34
  62. package/dist/core/sdd/devtrack-api-architecture.d.ts +16 -0
  63. package/dist/core/sdd/devtrack-api-architecture.js +86 -0
  64. package/dist/core/sdd/docs-sync.js +3 -3
  65. package/dist/core/sdd/enterprise-mutating-command-gate.d.ts +27 -0
  66. package/dist/core/sdd/enterprise-mutating-command-gate.js +104 -0
  67. package/dist/core/sdd/enterprise-provenance-gates.d.ts +20 -0
  68. package/dist/core/sdd/enterprise-provenance-gates.js +63 -0
  69. package/dist/core/sdd/enterprise-provisioning-policy.d.ts +26 -0
  70. package/dist/core/sdd/enterprise-provisioning-policy.js +104 -0
  71. package/dist/core/sdd/governance-schemas.d.ts +2 -2
  72. package/dist/core/sdd/governance-schemas.js +11 -2
  73. package/dist/core/sdd/json-schema.js +4 -0
  74. package/dist/core/sdd/legacy-operations.js +93 -4
  75. package/dist/core/sdd/package-security-gates.js +2 -0
  76. package/dist/core/sdd/package-structure-gate.d.ts +85 -3
  77. package/dist/core/sdd/package-structure-gate.js +386 -8
  78. package/dist/core/sdd/parallel-feat-automation.d.ts +6 -6
  79. package/dist/core/sdd/plugin-policy.js +6 -1
  80. package/dist/core/sdd/plugin-registry.d.ts +3 -3
  81. package/dist/core/sdd/quality-validation.d.ts +5 -5
  82. package/dist/core/sdd/release-readiness.d.ts +49 -0
  83. package/dist/core/sdd/release-readiness.js +303 -8
  84. package/dist/core/sdd/reversa-architecture-extractor.d.ts +13 -0
  85. package/dist/core/sdd/reversa-architecture-extractor.js +89 -0
  86. package/dist/core/sdd/reversa-artifact-writer.d.ts +18 -0
  87. package/dist/core/sdd/reversa-artifact-writer.js +40 -0
  88. package/dist/core/sdd/reversa-command-policy.d.ts +136 -0
  89. package/dist/core/sdd/reversa-command-policy.js +361 -0
  90. package/dist/core/sdd/reversa-data-extractor.d.ts +11 -0
  91. package/dist/core/sdd/reversa-data-extractor.js +73 -0
  92. package/dist/core/sdd/reversa-equivalence.d.ts +20 -0
  93. package/dist/core/sdd/reversa-equivalence.js +34 -0
  94. package/dist/core/sdd/reversa-evidence.d.ts +298 -0
  95. package/dist/core/sdd/reversa-evidence.js +118 -0
  96. package/dist/core/sdd/reversa-reconstruction.d.ts +29 -0
  97. package/dist/core/sdd/reversa-reconstruction.js +32 -0
  98. package/dist/core/sdd/reversa-rules-extractor.d.ts +12 -0
  99. package/dist/core/sdd/reversa-rules-extractor.js +86 -0
  100. package/dist/core/sdd/reversa-source-safety.d.ts +19 -0
  101. package/dist/core/sdd/reversa-source-safety.js +105 -0
  102. package/dist/core/sdd/reversa-surface-scout.d.ts +13 -0
  103. package/dist/core/sdd/reversa-surface-scout.js +85 -0
  104. package/dist/core/sdd/reversa-ux-mapper.d.ts +11 -0
  105. package/dist/core/sdd/reversa-ux-mapper.js +73 -0
  106. package/dist/core/sdd/sdk-agent-plugin-quality-gates.d.ts +1 -1
  107. package/dist/core/sdd/services/archive-quality-coherence.service.d.ts +17 -0
  108. package/dist/core/sdd/services/archive-quality-coherence.service.js +141 -0
  109. package/dist/core/sdd/services/decide.service.js +1 -1
  110. package/dist/core/sdd/services/finalize.service.d.ts +2 -0
  111. package/dist/core/sdd/services/finalize.service.js +48 -2
  112. package/dist/core/sdd/services/historical-quality-regression.service.d.ts +35 -0
  113. package/dist/core/sdd/services/historical-quality-regression.service.js +228 -0
  114. package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
  115. package/dist/core/sdd/services/planning-execution-coherence.service.d.ts +45 -0
  116. package/dist/core/sdd/services/planning-execution-coherence.service.js +225 -0
  117. package/dist/core/sdd/state.js +15 -5
  118. package/dist/core/sdd/types.d.ts +3 -3
  119. package/dist/core/sdd/workspace-schemas.d.ts +45 -4
  120. package/dist/core/sdd/workspace-schemas.js +27 -6
  121. package/dist/core/shared/skill-generation.d.ts +2 -0
  122. package/dist/core/shared/skill-generation.js +19 -2
  123. package/dist/core/shared/tool-detection.d.ts +19 -0
  124. package/dist/core/shared/tool-detection.js +89 -0
  125. package/package.json +6 -5
  126. package/schemas/sdd/5-quality.schema.json +43 -0
  127. package/schemas/sdd/reversa-evidence-bundle.schema.json +466 -0
  128. package/schemas/sdd/workspace-catalog.schema.json +511 -0
@@ -50,6 +50,1517 @@ portable_agents:
50
50
  - agents/kimi.yaml
51
51
  - agents/opencode.yaml
52
52
  - references/portable-agent-contract.md
53
+ - references/generated-artifact-invalidation.md
54
+ codesdd_api_profile_family:
55
+ id: codesdd-api-profile-family
56
+ status: active
57
+ foundation_reference: devtrack-foundation-api
58
+ shared_baseline_ref: foundation-api-shared-baseline
59
+ public_identity_rule: Future CodeSDD API work exposes named API profiles, not devtrack-api, as the normal public identity.
60
+ default_profile: minimal-rest
61
+ legacy_aliases:
62
+ devtrack-api:
63
+ status: compatibility-only
64
+ resolves_to: full-foundation-compatible
65
+ migration_notice: Use full-foundation-compatible for new CodeSDD API profile requests.
66
+ profile_ids:
67
+ - minimal-rest
68
+ - rest-auth-rbac
69
+ - rest-crud-typeorm
70
+ - evented-api
71
+ - ai-agent-api
72
+ - full-foundation-compatible
73
+ shared_baseline_requirements:
74
+ - openapi-swagger-docs
75
+ - env-example
76
+ - package-json-scripts
77
+ - application-usecase-boundary
78
+ - dto-validation
79
+ - structured-api-errors
80
+ - auth-authz-planning
81
+ - route-and-usecase-tests
82
+ profiles:
83
+ minimal-rest:
84
+ inherits_shared_baseline: true
85
+ purpose: Smallest production-grade REST API baseline.
86
+ adds:
87
+ - health route
88
+ - root REST module
89
+ - controller DTOs
90
+ - single use-case slice
91
+ - structured error DTO
92
+ - health route/use-case tests
93
+ required_proof:
94
+ - OpenAPI docs
95
+ - .env.example
96
+ - package scripts
97
+ - DTO validation
98
+ - structured errors
99
+ - health/root wiring
100
+ - route/use-case tests
101
+ rest-auth-rbac:
102
+ inherits_shared_baseline: true
103
+ purpose: REST API with authentication, authorization, guards, and permission boundaries.
104
+ adds:
105
+ - auth strategy
106
+ - route guards
107
+ - permission decorators
108
+ - current-user boundary
109
+ - RBAC policy examples
110
+ required_proof:
111
+ - protected OpenAPI docs
112
+ - allow/deny route tests
113
+ - guard/decorator artifacts
114
+ rest-crud-typeorm:
115
+ inherits_shared_baseline: true
116
+ purpose: REST CRUD API with TypeORM persistence and application/repository boundaries.
117
+ adds:
118
+ - TypeORM entity
119
+ - repository port
120
+ - migration scripts
121
+ - pagination
122
+ - filtering
123
+ - uniqueness checks
124
+ required_proof:
125
+ - repository boundary tests
126
+ - migration script evidence
127
+ - CRUD integration evidence
128
+ evented-api:
129
+ inherits_shared_baseline: true
130
+ purpose: API with application events, handlers, queue delivery, idempotency, and retry policy.
131
+ adds:
132
+ - application event contracts
133
+ - application handlers
134
+ - queue delivery strategy
135
+ - idempotency
136
+ - retry/error policy
137
+ required_proof:
138
+ - event contract docs
139
+ - handler tests
140
+ - idempotency/retry evidence
141
+ ai-agent-api:
142
+ inherits_shared_baseline: true
143
+ purpose: API for AI agent workflows with tool boundaries, safety, redaction, and deterministic tests.
144
+ adds:
145
+ - agent endpoint conventions
146
+ - tool/action boundaries
147
+ - provider config redaction
148
+ - audit trail
149
+ required_proof:
150
+ - no live credential tests
151
+ - tool boundary validation
152
+ - redaction evidence
153
+ - auditability evidence
154
+ full-foundation-compatible:
155
+ inherits_shared_baseline: true
156
+ purpose: Strict profile for full compatibility with devtrack-foundation-api architecture and conventions.
157
+ adds:
158
+ - Foundation parity matrix
159
+ - full layer structure
160
+ - strict contract validation
161
+ - legacy alias compatibility
162
+ required_proof:
163
+ - Foundation parity matrix
164
+ - artifact map evidence
165
+ - strict validation gates
166
+ foundation_api_shared_baseline:
167
+ id: foundation-api-shared-baseline
168
+ version: 1
169
+ foundation_reference: devtrack-foundation-api
170
+ inherited_by_profiles:
171
+ - minimal-rest
172
+ - rest-auth-rbac
173
+ - rest-crud-typeorm
174
+ - evented-api
175
+ - ai-agent-api
176
+ - full-foundation-compatible
177
+ requirements:
178
+ - id: openapi-swagger-docs
179
+ title: Swagger/OpenAPI documentation
180
+ severity: P0
181
+ phase: scaffold
182
+ quality_gate: openapi-docs-required
183
+ contract_rule_refs:
184
+ - DTAPI-P0-SHARED-BASELINE-001
185
+ - DTAPI-P0-OPENAPI-001
186
+ - DTAPI-P0-TOOL-BASELINE-001
187
+ required_artifacts:
188
+ - package.json
189
+ - .env.example
190
+ - src/main.ts
191
+ - src/presentation/**
192
+ required_evidence:
193
+ - "@nestjs/swagger dependency is present"
194
+ - DocumentBuilder and SwaggerModule bootstrap /docs
195
+ - controllers and DTOs include Swagger decorators
196
+ - id: env-example
197
+ title: .env.example placeholder contract
198
+ severity: P0
199
+ phase: scaffold
200
+ quality_gate: env-example-required
201
+ contract_rule_refs:
202
+ - DTAPI-P0-SHARED-BASELINE-001
203
+ - DTAPI-P0-TOOL-BASELINE-001
204
+ required_artifacts:
205
+ - .env.example
206
+ required_evidence:
207
+ - runtime variables have placeholder values
208
+ - Swagger server settings are represented when OpenAPI is enabled
209
+ - no secret or credential values are emitted
210
+ - id: package-json-scripts
211
+ title: Operational package scripts and runtime bootstrap
212
+ severity: P0
213
+ phase: scaffold
214
+ quality_gate: package-scripts-required
215
+ contract_rule_refs:
216
+ - DTAPI-P0-SHARED-BASELINE-001
217
+ - DTAPI-P0-TOOL-BASELINE-001
218
+ - DTAPI-P0-RUNTIME-SCRIPTS-001
219
+ required_artifacts:
220
+ - package.json
221
+ - scripts/cleanup.sh
222
+ - scripts/kill-port.js
223
+ required_evidence:
224
+ - build, start, start:dev, start:prod, lint, test, coverage, e2e, cleanup, and cleanup:install scripts are present
225
+ - cleanup removes dependency installs, build outputs, caches, lockfiles, and compilation residue unless an ADR preserves a canonical lockfile
226
+ - start and start:dev run a configured-port preflight that terminates the listener before Nest starts
227
+ - scripts can be invoked with npm or pnpm, while nested package-script calls use npm run/npm install so Docker images do not require pnpm
228
+ - migration scripts are present when persistence is included
229
+ - id: application-usecase-boundary
230
+ title: Application use-case and input-port boundary
231
+ severity: P0
232
+ phase: implementation
233
+ quality_gate: application-usecase-route-boundary
234
+ contract_rule_refs:
235
+ - DTAPI-P0-SHARED-BASELINE-001
236
+ - DTAPI-P0-USECASE-001
237
+ - DTAPI-P0-TOOL-BASELINE-001
238
+ required_artifacts:
239
+ - src/application/**
240
+ - src/presentation/**
241
+ required_evidence:
242
+ - each user-facing route calls an application input port
243
+ - each input port delegates business orchestration to a use case
244
+ - id: dto-validation
245
+ title: DTO validation and documented request shape
246
+ severity: P0
247
+ phase: implementation
248
+ quality_gate: dto-validation-required
249
+ contract_rule_refs:
250
+ - DTAPI-P0-SHARED-BASELINE-001
251
+ - DTAPI-P0-OPENAPI-001
252
+ required_artifacts:
253
+ - src/main.ts
254
+ - src/presentation/**/dtos/**
255
+ required_evidence:
256
+ - global validation pipe is configured
257
+ - request DTOs use class-validator decorators
258
+ - DTOs include Swagger property metadata
259
+ - id: structured-api-errors
260
+ title: Structured API error responses
261
+ severity: P0
262
+ phase: implementation
263
+ quality_gate: structured-error-contract-required
264
+ contract_rule_refs:
265
+ - DTAPI-P0-SHARED-BASELINE-001
266
+ - DTAPI-P0-TOOL-BASELINE-001
267
+ required_artifacts:
268
+ - src/presentation/dtos/api-error-response.dto.ts
269
+ - src/presentation/**
270
+ required_evidence:
271
+ - controllers document error responses
272
+ - error DTO avoids leaking internal provider or secret data
273
+ - id: auth-authz-planning
274
+ title: Authentication and authorization planning
275
+ severity: P0
276
+ phase: planning
277
+ quality_gate: authz-planning-required
278
+ contract_rule_refs:
279
+ - DTAPI-P0-SHARED-BASELINE-001
280
+ - DTAPI-P0-AUTH-PLAN-001
281
+ - DTAPI-P0-TOOL-BASELINE-001
282
+ required_artifacts:
283
+ - FEAT quality evidence
284
+ - src/presentation/**/guards/**
285
+ required_evidence:
286
+ - route public/protected decision is recorded
287
+ - guard, decorator, role, permission, or policy choice is recorded
288
+ - Swagger security scheme is documented for protected routes
289
+ - id: route-and-usecase-tests
290
+ title: Route and use-case test evidence
291
+ severity: P0
292
+ phase: validation
293
+ quality_gate: route-usecase-tests-required
294
+ contract_rule_refs:
295
+ - DTAPI-P0-SHARED-BASELINE-001
296
+ - DTAPI-P1-EVIDENCE-001
297
+ required_artifacts:
298
+ - test/**
299
+ - coverage/**
300
+ required_evidence:
301
+ - route/controller behavior is covered
302
+ - application use-case behavior is covered
303
+ - validation evidence is recorded in the FEAT quality artifact
304
+ profile_aware_dry_run_evidence:
305
+ id: profile-aware-dry-run-evidence
306
+ version: 1
307
+ mode: dry-run
308
+ mutation_policy: planning-only
309
+ required_manifest_field: profile_projection
310
+ required_fields:
311
+ - selected_profile
312
+ - requested_profile
313
+ - legacy_alias
314
+ - inherited_baseline
315
+ - expected_write_scope
316
+ - expected_writes
317
+ - expected_quality_gates
318
+ - artifact_map_refs
319
+ - validation_results
320
+ - migration_warnings
321
+ applies_to_profiles:
322
+ - minimal-rest
323
+ - rest-auth-rbac
324
+ - rest-crud-typeorm
325
+ - evented-api
326
+ - ai-agent-api
327
+ - full-foundation-compatible
328
+ profile_quality_gates:
329
+ minimal-rest:
330
+ - profile-minimal-rest-route-usecase-projection
331
+ - minimal-rest-recipe-required
332
+ - minimal-rest-openapi-docs-required
333
+ - minimal-rest-env-example-required
334
+ - minimal-rest-package-scripts-required
335
+ - minimal-rest-dto-usecase-boundary-required
336
+ - minimal-rest-structured-errors-required
337
+ - minimal-rest-health-root-wiring-required
338
+ - minimal-rest-route-usecase-tests-required
339
+ rest-auth-rbac:
340
+ - profile-rest-auth-rbac-guard-policy-projection
341
+ - rest-auth-rbac-recipe-required
342
+ - rest-auth-rbac-auth-plan-required
343
+ - rest-auth-rbac-jwt-strategy-required
344
+ - rest-auth-rbac-route-guards-required
345
+ - rest-auth-rbac-permission-decorator-required
346
+ - rest-auth-rbac-current-user-boundary-required
347
+ - rest-auth-rbac-protected-openapi-docs-required
348
+ - rest-auth-rbac-allow-deny-tests-required
349
+ rest-crud-typeorm:
350
+ - profile-rest-crud-typeorm-persistence-projection
351
+ - rest-crud-typeorm-recipe-required
352
+ - rest-crud-typeorm-bo-pattern-required
353
+ - rest-crud-typeorm-application-repository-port-required
354
+ - rest-crud-typeorm-usecase-transaction-boundary-required
355
+ - rest-crud-typeorm-infrastructure-orm-required
356
+ - rest-crud-typeorm-migration-required
357
+ - rest-crud-typeorm-pagination-filtering-required
358
+ - rest-crud-typeorm-uniqueness-required
359
+ - rest-crud-typeorm-crud-tests-required
360
+ - rest-crud-typeorm-no-prisma-required
361
+ evented-api:
362
+ - profile-evented-api-event-contract-projection
363
+ - evented-api-recipe-required
364
+ - evented-api-event-contract-required
365
+ - evented-api-application-handler-required
366
+ - evented-api-event-publisher-port-required
367
+ - evented-api-outbox-or-queue-required
368
+ - evented-api-idempotency-required
369
+ - evented-api-retry-error-policy-required
370
+ - evented-api-event-docs-required
371
+ - evented-api-event-tests-required
372
+ ai-agent-api:
373
+ - profile-ai-agent-api-tool-boundary-projection
374
+ - ai-agent-api-recipe-required
375
+ - ai-agent-api-endpoint-contract-required
376
+ - ai-agent-api-tool-boundary-required
377
+ - ai-agent-api-provider-config-redaction-required
378
+ - ai-agent-api-prompt-safety-required
379
+ - ai-agent-api-audit-trail-required
380
+ - ai-agent-api-deterministic-tests-required
381
+ - ai-agent-api-no-live-credentials-required
382
+ full-foundation-compatible:
383
+ - profile-full-foundation-compatible-parity-projection
384
+ - foundation-parity-matrix-required
385
+ - foundation-architecture-roots-parity
386
+ - foundation-contract-boundaries-parity
387
+ - foundation-api-documentation-parity
388
+ - foundation-env-runtime-config-parity
389
+ - foundation-package-scripts-parity
390
+ - foundation-auth-authorization-parity
391
+ - foundation-typeorm-persistence-parity
392
+ - foundation-validation-errors-parity
393
+ - foundation-evidence-quality-gates-parity
394
+ expected_writes:
395
+ minimal-rest:
396
+ - src/presentation/rest/rest.module.ts
397
+ - src/presentation/rest/health/health.controller.ts
398
+ - src/application/business/health/ports/in/read-health.use-case.port.ts
399
+ - src/application/business/health/use-cases/read-health.use-case.ts
400
+ - tests/health.e2e-spec.ts
401
+ rest-auth-rbac:
402
+ - src/presentation/rest/auth/auth.module.ts
403
+ - src/presentation/rest/auth/controllers/login.controller.ts
404
+ - src/presentation/rest/auth/controllers/create-role.controller.ts
405
+ - src/presentation/rest/auth/controllers/list-roles.controller.ts
406
+ - src/presentation/rest/auth/dtos/auth-session-output.dto.ts
407
+ - src/presentation/rest/auth/guards/jwt-auth.guard.ts
408
+ - src/presentation/rest/auth/guards/permission.guard.ts
409
+ - src/presentation/rest/auth/decorators/permission.decorator.ts
410
+ - src/application/business/auth/ports/in/authenticated-user.type.ts
411
+ - src/application/business/auth/ports/in/login.use-case.port.ts
412
+ - src/application/business/auth/use-cases/login.use-case.ts
413
+ - src/application/business/auth/ports/out/access-control.service.port.ts
414
+ - src/application/business/auth/services/access-control.service.ts
415
+ - src/infrastructure/adapters/auth/jwt.strategy.ts
416
+ - tests/auth-rbac.e2e-spec.ts
417
+ rest-crud-typeorm:
418
+ - src/domain/categories/business-objects/category.bo.ts
419
+ - src/domain/categories/types/category.type.ts
420
+ - src/application/business/categories/ports/out/category-repository.port.ts
421
+ - src/application/business/categories/ports/in/create-category.use-case.port.ts
422
+ - src/application/business/categories/use-cases/create-category.use-case.ts
423
+ - src/application/business/categories/ports/in/list-categories.use-case.port.ts
424
+ - src/application/business/categories/use-cases/list-categories.use-case.ts
425
+ - src/infrastructure/adapters/orm/entities/category.orm-entity.ts
426
+ - src/infrastructure/adapters/orm/repositories/category.typeorm-repository.ts
427
+ - src/infrastructure/adapters/orm/mappers/category.mapper.ts
428
+ - src/infrastructure/adapters/orm/typeorm.module.ts
429
+ - src/infrastructure/adapters/orm/categories-orm.module.ts
430
+ - src/infrastructure/adapters/orm/migrations/0000000000000-create-categories.migration.ts
431
+ - src/presentation/rest/categories/categories.module.ts
432
+ - src/presentation/rest/categories/controllers/create-category.controller.ts
433
+ - src/presentation/rest/categories/controllers/list-categories.controller.ts
434
+ - src/presentation/rest/categories/dtos/create-category-input.dto.ts
435
+ - src/presentation/rest/categories/dtos/category-output.dto.ts
436
+ - tests/categories-crud.e2e-spec.ts
437
+ evented-api:
438
+ - src/application/business/categories/events/category-created.event.ts
439
+ - src/application/business/categories/ports/out/category-event-publisher.port.ts
440
+ - src/application/business/categories/ports/out/event-idempotency-store.port.ts
441
+ - src/application/business/categories/handlers/category-created.handler.ts
442
+ - src/application/business/categories/use-cases/create-category.use-case.ts
443
+ - src/infrastructure/adapters/queue/category-event-publisher.adapter.ts
444
+ - src/infrastructure/adapters/queue/category-events.consumer.ts
445
+ - src/infrastructure/adapters/queue/event-idempotency-store.adapter.ts
446
+ - docs/events/category-created.md
447
+ - tests/categories-events.e2e-spec.ts
448
+ ai-agent-api:
449
+ - src/presentation/rest/agents/agents.module.ts
450
+ - src/presentation/rest/agents/controllers/agent-runs.controller.ts
451
+ - src/presentation/rest/agents/dtos/run-agent-input.dto.ts
452
+ - src/presentation/rest/agents/dtos/agent-run-output.dto.ts
453
+ - src/application/intelligence/agents/ports/in/run-agent.use-case.port.ts
454
+ - src/application/intelligence/agents/use-cases/run-agent.use-case.ts
455
+ - src/application/intelligence/agents/ports/out/llm-provider.port.ts
456
+ - src/application/intelligence/agents/ports/out/agent-tool-registry.port.ts
457
+ - src/application/intelligence/agents/ports/out/agent-audit.port.ts
458
+ - src/application/intelligence/agents/services/prompt-safety.service.ts
459
+ - src/application/intelligence/agents/services/redaction.service.ts
460
+ - src/infrastructure/adapters/llm/llm-provider.adapter.ts
461
+ - src/infrastructure/adapters/audit/agent-audit.adapter.ts
462
+ - docs/agents/ai-agent-api.md
463
+ - tests/agents.e2e-spec.ts
464
+ - tests/agents-safety.spec.ts
465
+ full-foundation-compatible:
466
+ - src/application/application.module.ts
467
+ - src/domain/auth/business-objects/api-keys.bo.ts
468
+ - src/infrastructure/adapters/orm/typeorm.module.ts
469
+ - src/infrastructure/adapters/orm/auth-orm.module.ts
470
+ - src/infrastructure/infrastructure.module.ts
471
+ - src/presentation/presentation.module.ts
472
+ - src/shared/domain/generic-business-object.ts
473
+ - .sdd/plugin-evidence/<FEAT>/<operation>/evidence-manifest.yaml
474
+ minimal_rest_profile_recipe:
475
+ id: minimal-rest-profile-recipe
476
+ version: 1
477
+ profile_id: minimal-rest
478
+ title: Minimal REST profile recipe
479
+ foundation_reference: devtrack-foundation-api
480
+ inherits_shared_baseline: true
481
+ required_baseline_requirements:
482
+ - openapi-swagger-docs
483
+ - env-example
484
+ - package-json-scripts
485
+ - application-usecase-boundary
486
+ - dto-validation
487
+ - structured-api-errors
488
+ - auth-authz-planning
489
+ - route-and-usecase-tests
490
+ required_artifacts:
491
+ - path: package.json
492
+ category: scripts
493
+ content_markers:
494
+ - '"build"'
495
+ - '"start"'
496
+ - '"start:dev"'
497
+ - '"start:prod"'
498
+ - '"lint"'
499
+ - '"test"'
500
+ - '"test:cov"'
501
+ - '"test:e2e"'
502
+ - '"cleanup"'
503
+ - '"cleanup:install"'
504
+ - node scripts/kill-port.js
505
+ - npm run
506
+ - npm install
507
+ - path: scripts/cleanup.sh
508
+ category: scripts
509
+ content_markers:
510
+ - node_modules
511
+ - dist
512
+ - build
513
+ - coverage
514
+ - .cache
515
+ - .turbo
516
+ - .nest
517
+ - package-lock.json
518
+ - pnpm-lock.yaml
519
+ - yarn.lock
520
+ - bun.lock
521
+ - tsbuildinfo
522
+ - path: scripts/kill-port.js
523
+ category: scripts
524
+ content_markers:
525
+ - process.argv[2]
526
+ - process.env.PORT
527
+ - process.env.APP_PORT
528
+ - lsof -ti
529
+ - netstat -ano
530
+ - kill -9
531
+ - taskkill
532
+ - path: .env.example
533
+ category: environment
534
+ content_markers:
535
+ - PORT=
536
+ - SWAGGER_SERVER_LOCAL=
537
+ - path: src/main.ts
538
+ category: documentation
539
+ content_markers:
540
+ - ValidationPipe
541
+ - DocumentBuilder
542
+ - SwaggerModule.createDocument
543
+ - SwaggerModule.setup
544
+ - path: src/presentation/rest/rest.module.ts
545
+ category: root-wiring
546
+ content_markers:
547
+ - "@Module"
548
+ - HealthController
549
+ - path: src/presentation/rest/health/health.controller.ts
550
+ category: health
551
+ content_markers:
552
+ - "@Controller"
553
+ - "@Get"
554
+ - ApiOperation
555
+ - path: src/application/business/health/ports/in/read-health.use-case.port.ts
556
+ category: use-case
557
+ content_markers:
558
+ - ReadHealthUseCasePort
559
+ - path: src/application/business/health/use-cases/read-health.use-case.ts
560
+ category: use-case
561
+ content_markers:
562
+ - ReadHealthUseCase
563
+ - path: src/application/business/auth/ports/in/register.use-case.port.ts
564
+ category: use-case
565
+ content_markers:
566
+ - RegisterUseCasePort
567
+ - path: src/application/business/auth/use-cases/register.use-case.ts
568
+ category: use-case
569
+ content_markers:
570
+ - RegisterUseCase
571
+ - path: src/presentation/rest/auth/controllers/register.controller.ts
572
+ category: documentation
573
+ content_markers:
574
+ - "@Controller"
575
+ - ApiOperation
576
+ - path: src/presentation/rest/auth/dtos/register-input.dto.ts
577
+ category: dto
578
+ content_markers:
579
+ - ApiProperty
580
+ - Is
581
+ - path: src/presentation/dtos/api-error-response.dto.ts
582
+ category: structured-errors
583
+ content_markers:
584
+ - ApiProperty
585
+ - path: tests/app.e2e-spec.ts
586
+ category: tests
587
+ content_markers:
588
+ - request
589
+ - expect
590
+ - path: tests/health.e2e-spec.ts
591
+ category: tests
592
+ content_markers:
593
+ - /health
594
+ - expect
595
+ required_quality_gates:
596
+ - openapi-docs-required
597
+ - env-example-required
598
+ - package-scripts-required
599
+ - application-usecase-route-boundary
600
+ - dto-validation-required
601
+ - structured-error-contract-required
602
+ - authz-planning-required
603
+ - route-usecase-tests-required
604
+ - minimal-rest-recipe-required
605
+ - minimal-rest-openapi-docs-required
606
+ - minimal-rest-env-example-required
607
+ - minimal-rest-package-scripts-required
608
+ - minimal-rest-dto-usecase-boundary-required
609
+ - minimal-rest-structured-errors-required
610
+ - minimal-rest-health-root-wiring-required
611
+ - minimal-rest-route-usecase-tests-required
612
+ required_validation_commands:
613
+ - pnpm run build
614
+ - pnpm run lint
615
+ - pnpm test
616
+ - pnpm run test:e2e
617
+ validator:
618
+ runtime_function: validateMinimalRestProfileRecipe
619
+ failure_codes:
620
+ - MINIMAL_REST_PROFILE_MISMATCH
621
+ - MINIMAL_REST_ARTIFACT_MISSING
622
+ - MINIMAL_REST_CONTENT_MARKER_MISSING
623
+ - MINIMAL_REST_QUALITY_GATE_MISSING
624
+ - MINIMAL_REST_VALIDATION_COMMAND_MISSING
625
+ rest_auth_rbac_profile_recipe:
626
+ id: rest-auth-rbac-profile-recipe
627
+ version: 1
628
+ profile_id: rest-auth-rbac
629
+ title: REST Auth RBAC profile recipe
630
+ foundation_reference: devtrack-foundation-api
631
+ inherits_shared_baseline: true
632
+ required_baseline_requirements:
633
+ - openapi-swagger-docs
634
+ - env-example
635
+ - package-json-scripts
636
+ - application-usecase-boundary
637
+ - dto-validation
638
+ - structured-api-errors
639
+ - auth-authz-planning
640
+ - route-and-usecase-tests
641
+ required_artifacts:
642
+ - path: package.json
643
+ category: scripts
644
+ content_markers:
645
+ - '"build"'
646
+ - '"start"'
647
+ - '"start:dev"'
648
+ - '"start:prod"'
649
+ - '"lint"'
650
+ - '"test"'
651
+ - '"test:cov"'
652
+ - '"test:e2e"'
653
+ - '"cleanup"'
654
+ - '"cleanup:install"'
655
+ - node scripts/kill-port.js
656
+ - npm run
657
+ - npm install
658
+ - path: scripts/cleanup.sh
659
+ category: scripts
660
+ content_markers:
661
+ - node_modules
662
+ - dist
663
+ - build
664
+ - coverage
665
+ - .cache
666
+ - .turbo
667
+ - .nest
668
+ - package-lock.json
669
+ - pnpm-lock.yaml
670
+ - yarn.lock
671
+ - bun.lock
672
+ - tsbuildinfo
673
+ - path: scripts/kill-port.js
674
+ category: scripts
675
+ content_markers:
676
+ - process.argv[2]
677
+ - process.env.PORT
678
+ - process.env.APP_PORT
679
+ - lsof -ti
680
+ - netstat -ano
681
+ - kill -9
682
+ - taskkill
683
+ - path: .env.example
684
+ category: auth-configuration
685
+ content_markers:
686
+ - JWT_SECRET=
687
+ - JWT_EXPIRES_IN=
688
+ - SWAGGER_SERVER_LOCAL=
689
+ - path: src/main.ts
690
+ category: documentation
691
+ content_markers:
692
+ - ValidationPipe
693
+ - DocumentBuilder
694
+ - SwaggerModule.setup
695
+ - addBearerAuth
696
+ - path: src/presentation/rest/auth/auth.module.ts
697
+ category: root-wiring
698
+ content_markers:
699
+ - "@Module"
700
+ - JwtAuthGuard
701
+ - PermissionGuard
702
+ - path: src/presentation/rest/auth/controllers/login.controller.ts
703
+ category: auth-controller
704
+ content_markers:
705
+ - "@Controller"
706
+ - LoginUseCasePortSymbol
707
+ - ApiOperation
708
+ - path: src/presentation/rest/auth/controllers/create-role.controller.ts
709
+ category: rbac-policy
710
+ content_markers:
711
+ - ApiBearerAuth
712
+ - UseGuards
713
+ - Permission("rbac.roles.write")
714
+ - AuthenticatedRequestType
715
+ - path: src/presentation/rest/auth/controllers/list-roles.controller.ts
716
+ category: rbac-policy
717
+ content_markers:
718
+ - ApiBearerAuth
719
+ - UseGuards
720
+ - Permission("rbac.roles.read")
721
+ - AuthenticatedRequestType
722
+ - path: src/presentation/rest/auth/dtos/auth-session-output.dto.ts
723
+ category: auth-session
724
+ content_markers:
725
+ - ApiProperty
726
+ - accessToken
727
+ - permissions
728
+ - path: src/presentation/rest/auth/guards/jwt-auth.guard.ts
729
+ category: guard
730
+ content_markers:
731
+ - AuthGuard("jwt")
732
+ - CanActivate
733
+ - JwtAuthGuard
734
+ - path: src/presentation/rest/auth/guards/permission.guard.ts
735
+ category: guard
736
+ content_markers:
737
+ - Reflector
738
+ - PERMISSION_METADATA_KEY
739
+ - canActivate
740
+ - path: src/presentation/rest/auth/decorators/permission.decorator.ts
741
+ category: decorator
742
+ content_markers:
743
+ - SetMetadata
744
+ - PERMISSION_METADATA_KEY
745
+ - required-permission
746
+ - path: src/application/business/auth/ports/in/authenticated-user.type.ts
747
+ category: current-user
748
+ content_markers:
749
+ - AuthenticatedUserType
750
+ - AuthenticatedRequestType
751
+ - user
752
+ - path: src/application/business/auth/ports/in/login.use-case.port.ts
753
+ category: use-case
754
+ content_markers:
755
+ - LoginUseCasePort
756
+ - execute
757
+ - path: src/application/business/auth/use-cases/login.use-case.ts
758
+ category: use-case
759
+ content_markers:
760
+ - LoginUseCase
761
+ - PasswordHashServicePort
762
+ - JwtPort
763
+ - path: src/application/business/auth/ports/out/access-control.service.port.ts
764
+ category: rbac-policy
765
+ content_markers:
766
+ - AccessControlServicePort
767
+ - ensurePermission
768
+ - path: src/application/business/auth/services/access-control.service.ts
769
+ category: rbac-policy
770
+ content_markers:
771
+ - AccessControlService
772
+ - ensurePermission
773
+ - UnauthorizedException
774
+ - path: src/infrastructure/adapters/auth/jwt.strategy.ts
775
+ category: auth-strategy
776
+ content_markers:
777
+ - PassportStrategy
778
+ - ExtractJwt.fromAuthHeaderAsBearerToken
779
+ - secretOrKey
780
+ - path: tests/auth-rbac.e2e-spec.ts
781
+ category: auth-tests
782
+ content_markers:
783
+ - expect(401)
784
+ - Authorization
785
+ - rbac.roles
786
+ required_quality_gates:
787
+ - openapi-docs-required
788
+ - env-example-required
789
+ - package-scripts-required
790
+ - application-usecase-route-boundary
791
+ - dto-validation-required
792
+ - structured-error-contract-required
793
+ - authz-planning-required
794
+ - route-usecase-tests-required
795
+ - rest-auth-rbac-recipe-required
796
+ - rest-auth-rbac-auth-plan-required
797
+ - rest-auth-rbac-jwt-strategy-required
798
+ - rest-auth-rbac-route-guards-required
799
+ - rest-auth-rbac-permission-decorator-required
800
+ - rest-auth-rbac-current-user-boundary-required
801
+ - rest-auth-rbac-protected-openapi-docs-required
802
+ - rest-auth-rbac-allow-deny-tests-required
803
+ required_validation_commands:
804
+ - pnpm run build
805
+ - pnpm run lint
806
+ - pnpm test
807
+ - pnpm run test:e2e
808
+ validator:
809
+ runtime_function: validateRestAuthRbacProfileRecipe
810
+ failure_codes:
811
+ - REST_AUTH_RBAC_PROFILE_MISMATCH
812
+ - REST_AUTH_RBAC_ARTIFACT_MISSING
813
+ - REST_AUTH_RBAC_CONTENT_MARKER_MISSING
814
+ - REST_AUTH_RBAC_QUALITY_GATE_MISSING
815
+ - REST_AUTH_RBAC_VALIDATION_COMMAND_MISSING
816
+ rest_crud_typeorm_profile_recipe:
817
+ id: rest-crud-typeorm-profile-recipe
818
+ version: 1
819
+ profile_id: rest-crud-typeorm
820
+ title: REST CRUD TypeORM profile recipe
821
+ foundation_reference: devtrack-foundation-api
822
+ inherits_shared_baseline: true
823
+ required_baseline_requirements:
824
+ - openapi-swagger-docs
825
+ - env-example
826
+ - package-json-scripts
827
+ - application-usecase-boundary
828
+ - dto-validation
829
+ - structured-api-errors
830
+ - auth-authz-planning
831
+ - route-and-usecase-tests
832
+ required_artifacts:
833
+ - path: package.json
834
+ category: scripts
835
+ content_markers:
836
+ - '"build"'
837
+ - '"start"'
838
+ - '"start:dev"'
839
+ - '"start:prod"'
840
+ - '"lint"'
841
+ - '"test"'
842
+ - '"test:cov"'
843
+ - '"test:e2e"'
844
+ - '"cleanup"'
845
+ - '"cleanup:install"'
846
+ - node scripts/kill-port.js
847
+ - npm run
848
+ - npm install
849
+ - '"migration:run"'
850
+ - '"migration:revert"'
851
+ - '"migration:show"'
852
+ - '"typeorm"'
853
+ - '"@nestjs/typeorm"'
854
+ - path: scripts/cleanup.sh
855
+ category: scripts
856
+ content_markers:
857
+ - node_modules
858
+ - dist
859
+ - build
860
+ - coverage
861
+ - .cache
862
+ - .turbo
863
+ - .nest
864
+ - package-lock.json
865
+ - pnpm-lock.yaml
866
+ - yarn.lock
867
+ - bun.lock
868
+ - tsbuildinfo
869
+ - path: scripts/kill-port.js
870
+ category: scripts
871
+ content_markers:
872
+ - process.argv[2]
873
+ - process.env.PORT
874
+ - process.env.APP_PORT
875
+ - lsof -ti
876
+ - netstat -ano
877
+ - kill -9
878
+ - taskkill
879
+ - path: .env.example
880
+ category: persistence-configuration
881
+ content_markers:
882
+ - DB_HOST=
883
+ - DB_NAME=
884
+ - TYPEORM_SYNCHRONIZE=
885
+ - path: src/domain/categories/business-objects/category.bo.ts
886
+ category: business-object
887
+ content_markers:
888
+ - CategoryBusinessObject
889
+ - validate
890
+ - name
891
+ - path: src/domain/categories/types/category.type.ts
892
+ category: domain-type
893
+ content_markers:
894
+ - CategoryType
895
+ - id
896
+ - name
897
+ - path: src/application/business/categories/ports/out/category-repository.port.ts
898
+ category: repository-port
899
+ content_markers:
900
+ - CategoryRepositoryPort
901
+ - findById
902
+ - findByName
903
+ - findPage
904
+ - save
905
+ - path: src/application/business/categories/ports/in/create-category.use-case.port.ts
906
+ category: use-case
907
+ content_markers:
908
+ - CreateCategoryUseCasePort
909
+ - execute
910
+ - path: src/application/business/categories/use-cases/create-category.use-case.ts
911
+ category: use-case
912
+ content_markers:
913
+ - CreateCategoryUseCase
914
+ - CategoryRepositoryPort
915
+ - findByName
916
+ - transaction
917
+ - path: src/application/business/categories/ports/in/list-categories.use-case.port.ts
918
+ category: pagination-filtering
919
+ content_markers:
920
+ - ListCategoriesUseCasePort
921
+ - page
922
+ - limit
923
+ - path: src/application/business/categories/use-cases/list-categories.use-case.ts
924
+ category: pagination-filtering
925
+ content_markers:
926
+ - ListCategoriesUseCase
927
+ - findPage
928
+ - filter
929
+ - path: src/infrastructure/adapters/orm/entities/category.orm-entity.ts
930
+ category: orm-entity
931
+ content_markers:
932
+ - "@Entity"
933
+ - "@Column"
934
+ - "@Index"
935
+ - path: src/infrastructure/adapters/orm/repositories/category.typeorm-repository.ts
936
+ category: orm-repository
937
+ content_markers:
938
+ - InjectRepository
939
+ - Repository<CategoryOrmEntity>
940
+ - CategoryRepositoryPort
941
+ - path: src/infrastructure/adapters/orm/mappers/category.mapper.ts
942
+ category: orm-mapper
943
+ content_markers:
944
+ - CategoryMapper
945
+ - toDomain
946
+ - toOrm
947
+ - path: src/infrastructure/adapters/orm/typeorm.module.ts
948
+ category: orm-module
949
+ content_markers:
950
+ - TypeOrmRootModule
951
+ - TypeOrmModule.forRootAsync
952
+ - typeOrmConfig
953
+ - path: src/infrastructure/adapters/orm/categories-orm.module.ts
954
+ category: orm-module
955
+ content_markers:
956
+ - "@Global"
957
+ - TypeOrmModule.forFeature
958
+ - CategoryRepositoryPortSymbol
959
+ - path: src/infrastructure/adapters/orm/migrations/0000000000000-create-categories.migration.ts
960
+ category: migration
961
+ content_markers:
962
+ - MigrationInterface
963
+ - createTable
964
+ - categories
965
+ - path: src/presentation/rest/categories/categories.module.ts
966
+ category: root-wiring
967
+ content_markers:
968
+ - "@Module"
969
+ - CreateCategoryController
970
+ - ListCategoriesController
971
+ - path: src/presentation/rest/categories/controllers/create-category.controller.ts
972
+ category: crud-controller
973
+ content_markers:
974
+ - "@Controller"
975
+ - "@Post"
976
+ - ApiOperation
977
+ - CreateCategoryUseCasePortSymbol
978
+ - path: src/presentation/rest/categories/controllers/list-categories.controller.ts
979
+ category: pagination-filtering
980
+ content_markers:
981
+ - "@Controller"
982
+ - "@Get"
983
+ - ApiQuery
984
+ - ListCategoriesUseCasePortSymbol
985
+ - path: src/presentation/rest/categories/dtos/create-category-input.dto.ts
986
+ category: dto
987
+ content_markers:
988
+ - ApiProperty
989
+ - IsString
990
+ - MaxLength
991
+ - path: src/presentation/rest/categories/dtos/category-output.dto.ts
992
+ category: dto
993
+ content_markers:
994
+ - ApiProperty
995
+ - id
996
+ - name
997
+ - path: tests/categories-crud.e2e-spec.ts
998
+ category: crud-tests
999
+ content_markers:
1000
+ - POST /categories
1001
+ - GET /categories
1002
+ - expect(409)
1003
+ - page=1
1004
+ required_quality_gates:
1005
+ - openapi-docs-required
1006
+ - env-example-required
1007
+ - package-scripts-required
1008
+ - application-usecase-route-boundary
1009
+ - dto-validation-required
1010
+ - structured-error-contract-required
1011
+ - authz-planning-required
1012
+ - route-usecase-tests-required
1013
+ - rest-crud-typeorm-recipe-required
1014
+ - rest-crud-typeorm-bo-pattern-required
1015
+ - rest-crud-typeorm-application-repository-port-required
1016
+ - rest-crud-typeorm-usecase-transaction-boundary-required
1017
+ - rest-crud-typeorm-infrastructure-orm-required
1018
+ - rest-crud-typeorm-migration-required
1019
+ - rest-crud-typeorm-pagination-filtering-required
1020
+ - rest-crud-typeorm-uniqueness-required
1021
+ - rest-crud-typeorm-crud-tests-required
1022
+ - rest-crud-typeorm-no-prisma-required
1023
+ required_validation_commands:
1024
+ - pnpm run build
1025
+ - pnpm run lint
1026
+ - pnpm test
1027
+ - pnpm run test:e2e
1028
+ - pnpm run migration:show
1029
+ forbidden_artifact_patterns:
1030
+ - prisma/**
1031
+ - "**/*.prisma"
1032
+ - src/domain/categories/entities/**
1033
+ - src/domain/categories/repository-ports/**
1034
+ - typeorm-artifacts-outside-src/infrastructure/adapters/orm/**
1035
+ forbidden_content_markers:
1036
+ - PrismaClient
1037
+ - "@prisma/client"
1038
+ - prisma.
1039
+ validator:
1040
+ runtime_function: validateRestCrudTypeormProfileRecipe
1041
+ failure_codes:
1042
+ - REST_CRUD_TYPEORM_PROFILE_MISMATCH
1043
+ - REST_CRUD_TYPEORM_ARTIFACT_MISSING
1044
+ - REST_CRUD_TYPEORM_CONTENT_MARKER_MISSING
1045
+ - REST_CRUD_TYPEORM_QUALITY_GATE_MISSING
1046
+ - REST_CRUD_TYPEORM_VALIDATION_COMMAND_MISSING
1047
+ - REST_CRUD_TYPEORM_FORBIDDEN_ARTIFACT
1048
+ - REST_CRUD_TYPEORM_FORBIDDEN_CONTENT_MARKER
1049
+ evented_api_profile_recipe:
1050
+ id: evented-api-profile-recipe
1051
+ version: 1
1052
+ profile_id: evented-api
1053
+ title: Evented API profile recipe
1054
+ foundation_reference: devtrack-foundation-api
1055
+ inherits_shared_baseline: true
1056
+ required_baseline_requirements:
1057
+ - openapi-swagger-docs
1058
+ - env-example
1059
+ - package-json-scripts
1060
+ - application-usecase-boundary
1061
+ - dto-validation
1062
+ - structured-api-errors
1063
+ - auth-authz-planning
1064
+ - route-and-usecase-tests
1065
+ required_artifacts:
1066
+ - path: package.json
1067
+ category: scripts
1068
+ content_markers:
1069
+ - '"build"'
1070
+ - '"start"'
1071
+ - '"start:dev"'
1072
+ - '"start:prod"'
1073
+ - '"lint"'
1074
+ - '"test"'
1075
+ - '"test:cov"'
1076
+ - '"test:e2e"'
1077
+ - '"cleanup"'
1078
+ - '"cleanup:install"'
1079
+ - node scripts/kill-port.js
1080
+ - npm run
1081
+ - npm install
1082
+ - '"@nestjs/bullmq"'
1083
+ - '"bullmq"'
1084
+ - path: scripts/cleanup.sh
1085
+ category: scripts
1086
+ content_markers:
1087
+ - node_modules
1088
+ - dist
1089
+ - build
1090
+ - coverage
1091
+ - .cache
1092
+ - .turbo
1093
+ - .nest
1094
+ - package-lock.json
1095
+ - pnpm-lock.yaml
1096
+ - yarn.lock
1097
+ - bun.lock
1098
+ - tsbuildinfo
1099
+ - path: scripts/kill-port.js
1100
+ category: scripts
1101
+ content_markers:
1102
+ - process.argv[2]
1103
+ - process.env.PORT
1104
+ - process.env.APP_PORT
1105
+ - lsof -ti
1106
+ - netstat -ano
1107
+ - kill -9
1108
+ - taskkill
1109
+ - path: .env.example
1110
+ category: event-configuration
1111
+ content_markers:
1112
+ - EVENT_QUEUE_NAME=
1113
+ - EVENT_RETRY_ATTEMPTS=
1114
+ - EVENT_IDEMPOTENCY_TTL_SECONDS=
1115
+ - path: src/application/business/categories/events/category-created.event.ts
1116
+ category: event-contract
1117
+ content_markers:
1118
+ - CategoryCreatedEvent
1119
+ - eventId
1120
+ - categoryId
1121
+ - occurredAt
1122
+ - path: src/application/business/categories/ports/out/category-event-publisher.port.ts
1123
+ category: event-publisher-port
1124
+ content_markers:
1125
+ - CategoryEventPublisherPort
1126
+ - publishCategoryCreated
1127
+ - idempotencyKey
1128
+ - path: src/application/business/categories/ports/out/event-idempotency-store.port.ts
1129
+ category: idempotency
1130
+ content_markers:
1131
+ - EventIdempotencyStorePort
1132
+ - hasProcessed
1133
+ - markProcessed
1134
+ - path: src/application/business/categories/handlers/category-created.handler.ts
1135
+ category: event-handler
1136
+ content_markers:
1137
+ - CategoryCreatedHandler
1138
+ - CategoryCreatedEvent
1139
+ - EventIdempotencyStorePort
1140
+ - publishCategoryCreated
1141
+ - path: src/application/business/categories/use-cases/create-category.use-case.ts
1142
+ category: event-handler
1143
+ content_markers:
1144
+ - CreateCategoryUseCase
1145
+ - CategoryCreatedEvent
1146
+ - CategoryCreatedHandler
1147
+ - path: src/infrastructure/adapters/queue/category-event-publisher.adapter.ts
1148
+ category: outbox-queue
1149
+ content_markers:
1150
+ - CategoryEventPublisherAdapter
1151
+ - Queue
1152
+ - idempotencyKey
1153
+ - retry
1154
+ - path: src/infrastructure/adapters/queue/category-events.consumer.ts
1155
+ category: event-consumer
1156
+ content_markers:
1157
+ - Processor
1158
+ - Process
1159
+ - CategoryCreatedHandler
1160
+ - deadLetter
1161
+ - path: src/infrastructure/adapters/queue/event-idempotency-store.adapter.ts
1162
+ category: idempotency
1163
+ content_markers:
1164
+ - EventIdempotencyStoreAdapter
1165
+ - hasProcessed
1166
+ - markProcessed
1167
+ - ttl
1168
+ - path: docs/events/category-created.md
1169
+ category: event-docs
1170
+ content_markers:
1171
+ - category.created
1172
+ - payload
1173
+ - idempotencyKey
1174
+ - retry
1175
+ - path: tests/categories-events.e2e-spec.ts
1176
+ category: event-tests
1177
+ content_markers:
1178
+ - category.created
1179
+ - idempotency
1180
+ - retry
1181
+ - expect
1182
+ required_quality_gates:
1183
+ - openapi-docs-required
1184
+ - env-example-required
1185
+ - package-scripts-required
1186
+ - application-usecase-route-boundary
1187
+ - dto-validation-required
1188
+ - structured-error-contract-required
1189
+ - authz-planning-required
1190
+ - route-usecase-tests-required
1191
+ - evented-api-recipe-required
1192
+ - evented-api-event-contract-required
1193
+ - evented-api-application-handler-required
1194
+ - evented-api-event-publisher-port-required
1195
+ - evented-api-outbox-or-queue-required
1196
+ - evented-api-idempotency-required
1197
+ - evented-api-retry-error-policy-required
1198
+ - evented-api-event-docs-required
1199
+ - evented-api-event-tests-required
1200
+ required_validation_commands:
1201
+ - pnpm run build
1202
+ - pnpm run lint
1203
+ - pnpm test
1204
+ - pnpm run test:e2e
1205
+ validator:
1206
+ runtime_function: validateEventedApiProfileRecipe
1207
+ failure_codes:
1208
+ - EVENTED_API_PROFILE_MISMATCH
1209
+ - EVENTED_API_ARTIFACT_MISSING
1210
+ - EVENTED_API_CONTENT_MARKER_MISSING
1211
+ - EVENTED_API_QUALITY_GATE_MISSING
1212
+ - EVENTED_API_VALIDATION_COMMAND_MISSING
1213
+ ai_agent_api_profile_recipe:
1214
+ id: ai-agent-api-profile-recipe
1215
+ version: 1
1216
+ profile_id: ai-agent-api
1217
+ title: AI Agent API profile recipe
1218
+ foundation_reference: devtrack-foundation-api
1219
+ inherits_shared_baseline: true
1220
+ required_baseline_requirements:
1221
+ - openapi-swagger-docs
1222
+ - env-example
1223
+ - package-json-scripts
1224
+ - application-usecase-boundary
1225
+ - dto-validation
1226
+ - structured-api-errors
1227
+ - auth-authz-planning
1228
+ - route-and-usecase-tests
1229
+ required_artifacts:
1230
+ - path: package.json
1231
+ category: scripts
1232
+ content_markers:
1233
+ - '"build"'
1234
+ - '"start"'
1235
+ - '"start:dev"'
1236
+ - '"start:prod"'
1237
+ - '"lint"'
1238
+ - '"test"'
1239
+ - '"test:cov"'
1240
+ - '"test:e2e"'
1241
+ - '"cleanup"'
1242
+ - '"cleanup:install"'
1243
+ - node scripts/kill-port.js
1244
+ - npm run
1245
+ - npm install
1246
+ - path: scripts/cleanup.sh
1247
+ category: scripts
1248
+ content_markers:
1249
+ - node_modules
1250
+ - dist
1251
+ - build
1252
+ - coverage
1253
+ - .cache
1254
+ - .turbo
1255
+ - .nest
1256
+ - package-lock.json
1257
+ - pnpm-lock.yaml
1258
+ - yarn.lock
1259
+ - bun.lock
1260
+ - tsbuildinfo
1261
+ - path: scripts/kill-port.js
1262
+ category: scripts
1263
+ content_markers:
1264
+ - process.argv[2]
1265
+ - process.env.PORT
1266
+ - process.env.APP_PORT
1267
+ - lsof -ti
1268
+ - netstat -ano
1269
+ - kill -9
1270
+ - taskkill
1271
+ - path: .env.example
1272
+ category: agent-configuration
1273
+ content_markers:
1274
+ - AI_PROVIDER=
1275
+ - AI_MODEL=
1276
+ - AI_API_KEY=
1277
+ - AI_AUDIT_ENABLED=
1278
+ - path: src/presentation/rest/agents/agents.module.ts
1279
+ category: root-wiring
1280
+ content_markers:
1281
+ - "@Module"
1282
+ - AgentRunsController
1283
+ - RunAgentUseCasePortSymbol
1284
+ - path: src/presentation/rest/agents/controllers/agent-runs.controller.ts
1285
+ category: agent-controller
1286
+ content_markers:
1287
+ - "@Controller"
1288
+ - "@Post"
1289
+ - ApiOperation
1290
+ - RunAgentUseCasePortSymbol
1291
+ - path: src/presentation/rest/agents/dtos/run-agent-input.dto.ts
1292
+ category: agent-dto
1293
+ content_markers:
1294
+ - ApiProperty
1295
+ - IsString
1296
+ - prompt
1297
+ - allowedTools
1298
+ - path: src/presentation/rest/agents/dtos/agent-run-output.dto.ts
1299
+ category: agent-dto
1300
+ content_markers:
1301
+ - ApiProperty
1302
+ - runId
1303
+ - output
1304
+ - auditId
1305
+ - path: src/application/intelligence/agents/ports/in/run-agent.use-case.port.ts
1306
+ category: agent-use-case
1307
+ content_markers:
1308
+ - RunAgentUseCasePort
1309
+ - execute
1310
+ - path: src/application/intelligence/agents/use-cases/run-agent.use-case.ts
1311
+ category: agent-use-case
1312
+ content_markers:
1313
+ - RunAgentUseCase
1314
+ - LlmProviderPort
1315
+ - AgentToolRegistryPort
1316
+ - PromptSafetyPolicyPort
1317
+ - redact
1318
+ - path: src/application/intelligence/agents/ports/out/llm-provider.port.ts
1319
+ category: agent-provider-port
1320
+ content_markers:
1321
+ - LlmProviderPort
1322
+ - complete
1323
+ - model
1324
+ - path: src/application/intelligence/agents/ports/out/agent-tool-registry.port.ts
1325
+ category: agent-tool-port
1326
+ content_markers:
1327
+ - AgentToolRegistryPort
1328
+ - executeTool
1329
+ - allowedTools
1330
+ - path: src/application/intelligence/agents/ports/out/agent-audit.port.ts
1331
+ category: agent-audit
1332
+ content_markers:
1333
+ - AgentAuditPort
1334
+ - recordToolCall
1335
+ - redactedInput
1336
+ - path: src/application/intelligence/agents/services/prompt-safety.service.ts
1337
+ category: agent-safety
1338
+ content_markers:
1339
+ - PromptSafetyPolicy
1340
+ - validatePrompt
1341
+ - blockedPatterns
1342
+ - path: src/application/intelligence/agents/services/redaction.service.ts
1343
+ category: agent-redaction
1344
+ content_markers:
1345
+ - RedactionService
1346
+ - redact
1347
+ - secret
1348
+ - token
1349
+ - path: src/infrastructure/adapters/llm/llm-provider.adapter.ts
1350
+ category: agent-provider-adapter
1351
+ content_markers:
1352
+ - LlmProviderAdapter
1353
+ - LlmProviderPort
1354
+ - AI_API_KEY
1355
+ - redact
1356
+ - path: src/infrastructure/adapters/audit/agent-audit.adapter.ts
1357
+ category: agent-audit
1358
+ content_markers:
1359
+ - AgentAuditAdapter
1360
+ - AgentAuditPort
1361
+ - recordToolCall
1362
+ - redacted
1363
+ - path: docs/agents/ai-agent-api.md
1364
+ category: agent-docs
1365
+ content_markers:
1366
+ - tool boundary
1367
+ - redaction
1368
+ - audit trail
1369
+ - deterministic tests
1370
+ - path: tests/agents.e2e-spec.ts
1371
+ category: agent-tests
1372
+ content_markers:
1373
+ - POST /agents/runs
1374
+ - deterministic
1375
+ - no live credentials
1376
+ - expect
1377
+ - path: tests/agents-safety.spec.ts
1378
+ category: agent-tests
1379
+ content_markers:
1380
+ - PromptSafetyPolicy
1381
+ - RedactionService
1382
+ - blocked
1383
+ - redact
1384
+ required_quality_gates:
1385
+ - openapi-docs-required
1386
+ - env-example-required
1387
+ - package-scripts-required
1388
+ - application-usecase-route-boundary
1389
+ - dto-validation-required
1390
+ - structured-error-contract-required
1391
+ - authz-planning-required
1392
+ - route-usecase-tests-required
1393
+ - ai-agent-api-recipe-required
1394
+ - ai-agent-api-endpoint-contract-required
1395
+ - ai-agent-api-tool-boundary-required
1396
+ - ai-agent-api-provider-config-redaction-required
1397
+ - ai-agent-api-prompt-safety-required
1398
+ - ai-agent-api-audit-trail-required
1399
+ - ai-agent-api-deterministic-tests-required
1400
+ - ai-agent-api-no-live-credentials-required
1401
+ required_validation_commands:
1402
+ - pnpm run build
1403
+ - pnpm run lint
1404
+ - pnpm test
1405
+ - pnpm run test:e2e
1406
+ forbidden_content_markers:
1407
+ - AI_API_KEY=sk-
1408
+ - OPENAI_API_KEY=sk-
1409
+ - ANTHROPIC_API_KEY=sk-
1410
+ - LIVE_PROVIDER_CALL=true
1411
+ validator:
1412
+ runtime_function: validateAiAgentApiProfileRecipe
1413
+ failure_codes:
1414
+ - AI_AGENT_API_PROFILE_MISMATCH
1415
+ - AI_AGENT_API_ARTIFACT_MISSING
1416
+ - AI_AGENT_API_CONTENT_MARKER_MISSING
1417
+ - AI_AGENT_API_QUALITY_GATE_MISSING
1418
+ - AI_AGENT_API_VALIDATION_COMMAND_MISSING
1419
+ - AI_AGENT_API_FORBIDDEN_CONTENT_MARKER
1420
+ full_foundation_compatible_profile:
1421
+ id: full-foundation-compatible-parity-matrix
1422
+ version: 1
1423
+ profile_id: full-foundation-compatible
1424
+ foundation_reference: devtrack-foundation-api
1425
+ dimensions:
1426
+ - id: architecture-roots
1427
+ title: Foundation-compatible source roots
1428
+ severity: P0
1429
+ quality_gate: foundation-architecture-roots-parity
1430
+ contract_rule_refs:
1431
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1432
+ - DTAPI-P0-PATH-001
1433
+ - DTAPI-P0-IMPORTS-001
1434
+ required_artifacts:
1435
+ - src/application/**
1436
+ - src/domain/**
1437
+ - src/infrastructure/**
1438
+ - src/presentation/**
1439
+ - src/shared/**
1440
+ required_evidence:
1441
+ - generated roots use Foundation-compatible singular output structure
1442
+ - artifact map records Foundation source references
1443
+ - id: contract-boundaries
1444
+ title: Application and domain contract boundaries
1445
+ severity: P0
1446
+ quality_gate: foundation-contract-boundaries-parity
1447
+ contract_rule_refs:
1448
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1449
+ - DTAPI-P0-COMPOSITION-001
1450
+ - DTAPI-P0-PORTS-001
1451
+ required_artifacts:
1452
+ - src/application/**/ports/**
1453
+ - src/application/**/use-cases/**
1454
+ - src/domain/**
1455
+ required_evidence:
1456
+ - ports and use cases are present for user-facing flows
1457
+ - presentation does not call infrastructure directly
1458
+ - id: api-documentation
1459
+ title: Swagger/OpenAPI parity
1460
+ severity: P0
1461
+ quality_gate: foundation-api-documentation-parity
1462
+ contract_rule_refs:
1463
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1464
+ - DTAPI-P0-OPENAPI-001
1465
+ required_artifacts:
1466
+ - src/main.ts
1467
+ - src/presentation/rest/**
1468
+ - .env.example
1469
+ required_evidence:
1470
+ - Swagger bootstrap and /docs route are present
1471
+ - controllers and DTOs expose documented request and response shapes
1472
+ - id: env-and-runtime-config
1473
+ title: Environment and typed runtime configuration parity
1474
+ severity: P0
1475
+ quality_gate: foundation-env-runtime-config-parity
1476
+ contract_rule_refs:
1477
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1478
+ - DTAPI-P0-TOOL-BASELINE-001
1479
+ required_artifacts:
1480
+ - .env.example
1481
+ - src/infrastructure/settings/**
1482
+ required_evidence:
1483
+ - all runtime variables are represented as placeholders
1484
+ - typed configuration reads environment without exposing secrets
1485
+ - id: package-scripts
1486
+ title: Package scripts and operational bootstrap parity
1487
+ severity: P0
1488
+ quality_gate: foundation-package-scripts-parity
1489
+ contract_rule_refs:
1490
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1491
+ - DTAPI-P0-TOOL-BASELINE-001
1492
+ - DTAPI-P0-RUNTIME-SCRIPTS-001
1493
+ required_artifacts:
1494
+ - package.json
1495
+ - scripts/cleanup.sh
1496
+ - scripts/kill-port.js
1497
+ required_evidence:
1498
+ - build, lint, test, coverage, e2e, cleanup, cleanup:install, start, start:dev, and start:prod scripts are present
1499
+ - start and start:dev kill the configured port listener before continuing bootstrap
1500
+ - nested package-script calls use npm run/npm install so npm and pnpm invocations both work without requiring pnpm in Docker
1501
+ - migration scripts are present when persistence is included
1502
+ - id: auth-and-authorization
1503
+ title: Authentication, authorization, guards, and security docs parity
1504
+ severity: P0
1505
+ quality_gate: foundation-auth-authorization-parity
1506
+ contract_rule_refs:
1507
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1508
+ - DTAPI-P0-AUTH-PLAN-001
1509
+ - DTAPI-P0-OPENAPI-001
1510
+ required_artifacts:
1511
+ - src/presentation/**/guards/**
1512
+ - src/presentation/**/decorators/**
1513
+ - FEAT quality evidence
1514
+ required_evidence:
1515
+ - auth/authz decisions are recorded
1516
+ - protected routes include guards/decorators and documented security schemes
1517
+ - id: persistence-typeorm
1518
+ title: TypeORM persistence parity
1519
+ severity: P0
1520
+ quality_gate: foundation-typeorm-persistence-parity
1521
+ contract_rule_refs:
1522
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1523
+ - DTAPI-P0-TYPEORM-001
1524
+ - DTAPI-P1-RUNTIME-001
1525
+ required_artifacts:
1526
+ - src/infrastructure/adapters/orm/typeorm.module.ts
1527
+ - src/infrastructure/adapters/orm/*-orm.module.ts
1528
+ - src/infrastructure/adapters/orm/**
1529
+ - src/application/**/ports/out/**
1530
+ required_evidence:
1531
+ - persistence uses TypeORM only
1532
+ - typeorm.module.ts owns root TypeORM wiring
1533
+ - <context>-orm.module.ts exports repository/service port providers
1534
+ - application depends on output ports instead of ORM entities
1535
+ - id: validation-and-errors
1536
+ title: Validation and structured API errors parity
1537
+ severity: P0
1538
+ quality_gate: foundation-validation-errors-parity
1539
+ contract_rule_refs:
1540
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1541
+ - DTAPI-P0-USECASE-001
1542
+ - DTAPI-P0-OPENAPI-001
1543
+ required_artifacts:
1544
+ - src/main.ts
1545
+ - src/presentation/**/dtos/**
1546
+ - src/presentation/dtos/api-error-response.dto.ts
1547
+ required_evidence:
1548
+ - validation pipe is configured
1549
+ - DTO validators and structured error response docs are present
1550
+ - id: evidence-and-quality-gates
1551
+ title: Evidence manifest and quality gates parity
1552
+ severity: P0
1553
+ quality_gate: foundation-evidence-quality-gates-parity
1554
+ contract_rule_refs:
1555
+ - DTAPI-P0-FULL-FOUNDATION-PARITY-001
1556
+ - DTAPI-P1-EVIDENCE-001
1557
+ required_artifacts:
1558
+ - .sdd/plugin-evidence/**
1559
+ - coverage/**
1560
+ - test/**
1561
+ required_evidence:
1562
+ - artifact and evidence manifests are emitted
1563
+ - validation commands and FEAT quality evidence are recorded
53
1564
  derivation_profiles:
54
1565
  prototype:
55
1566
  default: false
@@ -99,6 +1610,88 @@ severity_model:
99
1610
  P2:
100
1611
  meaning: Lower-risk drift, documentation gap, or profile-specific variance.
101
1612
  required_action: Record evidence, exception, or follow-up before closure.
1613
+ tool_level_api_minimums:
1614
+ applies_to:
1615
+ - API/backend/scaffold requests governed by devtrack-api
1616
+ - REST route generation
1617
+ - CRUD or bounded-context generation
1618
+ - devtrack-api appliance scaffold previews
1619
+ inferred_when_unspecified:
1620
+ - package_json_scripts
1621
+ - env_example
1622
+ - swagger_openapi
1623
+ - application_use_cases
1624
+ - route_guards
1625
+ - auth_authorization_planning
1626
+ required_root_artifacts:
1627
+ - package.json
1628
+ - .env.example
1629
+ - tsconfig.json
1630
+ - nest-cli.json
1631
+ - src/main.ts
1632
+ required_package_scripts:
1633
+ - build
1634
+ - start
1635
+ - start:dev
1636
+ - start:prod
1637
+ - lint
1638
+ - test
1639
+ - test:cov
1640
+ - test:e2e
1641
+ - cleanup
1642
+ - cleanup:install
1643
+ - migration:run when persistent schema changes exist
1644
+ - migration:revert when persistent schema changes exist
1645
+ - migration:show when persistent schema changes exist
1646
+ operational_runtime_bootstrap:
1647
+ required_artifacts:
1648
+ - scripts/cleanup.sh
1649
+ - scripts/kill-port.js
1650
+ cleanup_contract:
1651
+ - removes dependency installs such as node_modules
1652
+ - removes build outputs, coverage, caches, and TypeScript compilation residue
1653
+ - removes lockfiles unless an ADR preserves a canonical lockfile for the target project
1654
+ port_preflight_contract:
1655
+ - start and start:dev call node scripts/kill-port.js before Nest starts
1656
+ - port is resolved from explicit script argument or PORT/APP_PORT environment
1657
+ - Unix and Windows process termination paths are represented
1658
+ package_manager_contract:
1659
+ - scripts are invokable through npm run and pnpm run
1660
+ - nested script composition uses npm run and npm install
1661
+ - Docker runtime does not require pnpm unless the target explicitly opts in with ADR evidence
1662
+ swagger_openapi:
1663
+ docs_route: /docs
1664
+ required_bootstrap:
1665
+ - DocumentBuilder
1666
+ - SwaggerModule.createDocument
1667
+ - SwaggerModule.setup
1668
+ required_controller_decorators:
1669
+ - ApiTags
1670
+ - ApiOperation
1671
+ - ApiResponse or method-specific response decorators
1672
+ - ApiBearerAuth when protected by bearer auth
1673
+ required_dto_decorators:
1674
+ - ApiProperty
1675
+ - ApiPropertyOptional when optional fields exist
1676
+ env_placeholders:
1677
+ - SWAGGER_SERVER_LOCAL
1678
+ - SWAGGER_SERVER_PROD when production docs are configured
1679
+ application_slice:
1680
+ route_requirement: Every user-facing route maps to one application input port and one use case.
1681
+ forbidden_shortcuts:
1682
+ - controller calling repository directly
1683
+ - controller calling TypeORM directly
1684
+ - controller calling infrastructure adapter directly
1685
+ - controller using domain validators as transport/application orchestration
1686
+ auth_authorization_planning:
1687
+ required_plan_questions:
1688
+ - Is authentication required?
1689
+ - Which authentication mechanism applies?
1690
+ - Is authorization required?
1691
+ - Which role, permission, policy, ownership, or tenancy rule applies?
1692
+ - Which routes are intentionally public?
1693
+ - Which Swagger security scheme must be documented?
1694
+ safest_default_when_unanswered: Protect non-health, non-login, non-registration, non-public write routes with the local guard pattern and record the assumption.
102
1695
  rules:
103
1696
  - id: DTAPI-P0-FOUNDATION-001
104
1697
  severity: P0
@@ -127,6 +1720,195 @@ rules:
127
1720
  required_response:
128
1721
  - ask the human planner to approve the profile
129
1722
  - record profile in the debate, FEAT workspace, or policy pool
1723
+ - id: DTAPI-P0-CODESDD-PROFILE-FAMILY-001
1724
+ severity: P0
1725
+ title: CodeSDD API profile family must expose canonical profile ids.
1726
+ applies_to:
1727
+ - DEB
1728
+ - EPIC
1729
+ - FEAT
1730
+ - source
1731
+ - validator
1732
+ detect:
1733
+ - API profile catalog omits one of minimal-rest, rest-auth-rbac, rest-crud-typeorm, evented-api, ai-agent-api, or full-foundation-compatible
1734
+ - devtrack-api is exposed as the normal public identity for new CodeSDD API work
1735
+ - devtrack-api alias does not resolve to full-foundation-compatible with migration messaging
1736
+ required_response:
1737
+ - expose the six canonical profile ids
1738
+ - route devtrack-api through compatibility-only alias handling
1739
+ - record selected profile and inherited shared baseline in FEAT quality evidence
1740
+ - id: DTAPI-P0-SHARED-BASELINE-001
1741
+ severity: P0
1742
+ title: Shared Foundation API baseline must be structurally synchronized.
1743
+ applies_to:
1744
+ - DEB
1745
+ - EPIC
1746
+ - FEAT
1747
+ - source
1748
+ - validator
1749
+ - appliance
1750
+ detect:
1751
+ - foundation_api_shared_baseline.requirements ids diverge from codesdd_api_profile_family.shared_baseline_requirements
1752
+ - runtime API profile catalog omits a shared baseline item, gate, artifact expectation, or evidence expectation
1753
+ - appliance evidence omits foundation_baseline requirement inventory or any baseline quality gate
1754
+ - a profile claims inherits_shared_baseline without proving inherited requirement ids
1755
+ required_response:
1756
+ - synchronize the structured baseline in contract-pack, runtime catalog, appliance evidence, and tests
1757
+ - record per-item baseline inventory in FEAT quality evidence
1758
+ - add or update profile-specific exceptions only through a documented FEAT/ADR exception
1759
+ - id: DTAPI-P0-RUNTIME-SCRIPTS-001
1760
+ severity: P0
1761
+ title: Linked DevTrack API projects must ship cleanup and port-safe runtime bootstrap scripts.
1762
+ applies_to:
1763
+ - DEB
1764
+ - EPIC
1765
+ - FEAT
1766
+ - source
1767
+ - validator
1768
+ - appliance
1769
+ detect:
1770
+ - package.json omits cleanup or cleanup:install scripts
1771
+ - cleanup script does not remove dependency installs, build outputs, caches, lockfiles, or TypeScript compilation residue
1772
+ - start or start:dev can fail on an occupied configured port instead of terminating the listener first
1773
+ - package-script composition requires pnpm inside Docker when npm would be sufficient
1774
+ - runtime API profile catalog or generated artifact map omits scripts/cleanup.sh or scripts/kill-port.js
1775
+ required_response:
1776
+ - require package.json, scripts/cleanup.sh, and scripts/kill-port.js in every linked devtrack-api profile
1777
+ - keep generated start and start:dev scripts guarded by node scripts/kill-port.js
1778
+ - make nested package scripts use npm run/npm install so npm and pnpm entrypoints both work
1779
+ - record per-feature conformance evidence before finalize
1780
+ - id: DTAPI-P0-PROFILE-DRY-RUN-EVIDENCE-001
1781
+ severity: P0
1782
+ title: Appliance dry-run evidence must expose profile-aware planning semantics.
1783
+ applies_to:
1784
+ - DEB
1785
+ - EPIC
1786
+ - FEAT
1787
+ - source
1788
+ - validator
1789
+ - appliance
1790
+ detect:
1791
+ - appliance scaffold dry-run evidence omits profile_projection
1792
+ - profile_projection omits selected_profile, requested_profile, legacy_alias, expected_writes, expected_quality_gates, artifact_map_refs, validation_results, or migration_warnings
1793
+ - validation_results claim executed pass or fail status during dry-run instead of not_executed_dry_run with pending status
1794
+ - devtrack-api compatibility alias resolves to full-foundation-compatible without a migration warning
1795
+ - non-full profiles emit full_foundation_compatibility or full parity gates without governed FEAT approval
1796
+ required_response:
1797
+ - emit profile_projection for every canonical CodeSDD API profile dry-run
1798
+ - include profile-specific expected writes and gates while keeping actual mutation disabled
1799
+ - record dry-run validation results as pending not_executed_dry_run expectations
1800
+ - restrict full_foundation_compatibility to full-foundation-compatible and the devtrack-api compatibility alias
1801
+ - id: DTAPI-P0-MINIMAL-REST-RECIPE-001
1802
+ severity: P0
1803
+ title: minimal-rest profile must keep the production-grade API minimum recipe.
1804
+ applies_to:
1805
+ - DEB
1806
+ - EPIC
1807
+ - FEAT
1808
+ - source
1809
+ - validator
1810
+ - appliance
1811
+ detect:
1812
+ - minimal_rest_profile_recipe omits OpenAPI docs, .env.example, package scripts, DTOs, application use cases, structured errors, health/root wiring, or route/use-case tests
1813
+ - runtime minimal-rest recipe validator passes while required artifacts, quality gates, or validation commands are missing
1814
+ - minimal-rest dry-run expected writes diverge from the recipe overlay artifacts
1815
+ required_response:
1816
+ - synchronize minimal_rest_profile_recipe with runtime recipe and dry-run expectations
1817
+ - fail validation when any required minimal-rest artifact, quality gate, or command is missing
1818
+ - record route/use-case test and OpenAPI evidence before claiming the smallest REST profile is production-grade
1819
+ - id: DTAPI-P0-REST-AUTH-RBAC-RECIPE-001
1820
+ severity: P0
1821
+ title: rest-auth-rbac profile must keep authentication and authorization enforceable.
1822
+ applies_to:
1823
+ - DEB
1824
+ - EPIC
1825
+ - FEAT
1826
+ - source
1827
+ - validator
1828
+ - appliance
1829
+ detect:
1830
+ - rest_auth_rbac_profile_recipe omits auth planning, JWT strategy, route guards, permission decorators, current-user boundary, protected OpenAPI docs, or allow/deny tests
1831
+ - runtime rest-auth-rbac recipe validator passes while required artifacts, quality gates, content markers, or validation commands are missing
1832
+ - rest-auth-rbac dry-run expected writes diverge from the auth/RBAC recipe overlay artifacts
1833
+ required_response:
1834
+ - synchronize rest_auth_rbac_profile_recipe with runtime recipe and dry-run expectations
1835
+ - fail validation when any required rest-auth-rbac artifact, content marker, quality gate, or command is missing
1836
+ - record protected-docs and allow/deny route evidence before claiming auth/RBAC readiness
1837
+ - id: DTAPI-P0-REST-CRUD-TYPEORM-RECIPE-001
1838
+ severity: P0
1839
+ title: rest-crud-typeorm profile must keep CRUD persistence boundaries enforceable.
1840
+ applies_to:
1841
+ - DEB
1842
+ - EPIC
1843
+ - FEAT
1844
+ - source
1845
+ - validator
1846
+ - appliance
1847
+ detect:
1848
+ - rest_crud_typeorm_profile_recipe omits BO-pattern domain artifact, application repository port, transactional use cases, TypeORM entity/repository/mapper, migration, pagination/filtering, uniqueness, or CRUD persistence tests
1849
+ - runtime rest-crud-typeorm recipe validator passes while required artifacts, quality gates, content markers, or validation commands are missing
1850
+ - rest-crud-typeorm dry-run expected writes diverge from the persistence recipe overlay artifacts
1851
+ - CRUD persistence profile introduces Prisma, domain repository ports for a BO-pattern context, or TypeORM files outside infrastructure/adapters/orm
1852
+ required_response:
1853
+ - synchronize rest_crud_typeorm_profile_recipe with runtime recipe and dry-run expectations
1854
+ - fail validation when any required rest-crud-typeorm artifact, content marker, quality gate, or command is missing
1855
+ - record migration, repository-boundary, and CRUD integration evidence before claiming persistence readiness
1856
+ - id: DTAPI-P0-EVENTED-API-RECIPE-001
1857
+ severity: P0
1858
+ title: evented-api profile must keep event contracts and delivery policy enforceable.
1859
+ applies_to:
1860
+ - DEB
1861
+ - EPIC
1862
+ - FEAT
1863
+ - source
1864
+ - validator
1865
+ - appliance
1866
+ detect:
1867
+ - evented_api_profile_recipe omits application event contract, application handler, event publisher port, queue delivery adapter, idempotency boundary, retry/error policy, event docs, or event tests
1868
+ - runtime evented-api recipe validator passes while required artifacts, quality gates, content markers, or validation commands are missing
1869
+ - evented-api dry-run expected writes diverge from the event recipe overlay artifacts
1870
+ required_response:
1871
+ - synchronize evented_api_profile_recipe with runtime recipe and dry-run expectations
1872
+ - fail validation when any required evented-api artifact, content marker, quality gate, or command is missing
1873
+ - record event contract docs, handler tests, idempotency, and retry/error evidence before claiming event readiness
1874
+ - id: DTAPI-P0-AI-AGENT-API-RECIPE-001
1875
+ severity: P0
1876
+ title: ai-agent-api profile must keep agent tool, safety, redaction, and audit boundaries enforceable.
1877
+ applies_to:
1878
+ - DEB
1879
+ - EPIC
1880
+ - FEAT
1881
+ - source
1882
+ - validator
1883
+ - appliance
1884
+ detect:
1885
+ - ai_agent_api_profile_recipe omits agent endpoint contract, DTOs, input port, use case, provider port, tool registry port, safety policy, redaction service, audit port, provider/audit adapters, docs, or deterministic tests
1886
+ - runtime ai-agent-api recipe validator passes while required artifacts, quality gates, content markers, validation commands, or forbidden live credential markers are missing
1887
+ - ai-agent-api dry-run expected writes diverge from the agent recipe overlay artifacts
1888
+ - ai-agent-api artifacts include live provider credentials, raw API key literals, or live credential test seams
1889
+ required_response:
1890
+ - synchronize ai_agent_api_profile_recipe with runtime recipe and dry-run expectations
1891
+ - fail validation when any required ai-agent-api artifact, content marker, quality gate, command, or no-live-credential rule is missing
1892
+ - record tool boundary, redaction, auditability, deterministic test, and no-live-credential evidence before claiming agent readiness
1893
+ - id: DTAPI-P0-FULL-FOUNDATION-PARITY-001
1894
+ severity: P0
1895
+ title: full-foundation-compatible profile must emit a Foundation parity matrix.
1896
+ applies_to:
1897
+ - DEB
1898
+ - EPIC
1899
+ - FEAT
1900
+ - source
1901
+ - validator
1902
+ - appliance
1903
+ detect:
1904
+ - full-foundation-compatible profile lacks full_foundation_compatible_profile matrix in contract-pack
1905
+ - runtime profile catalog omits the full-foundation-compatible parity matrix reference
1906
+ - appliance evidence for full-foundation-compatible omits full_foundation_compatibility or any parity quality gate
1907
+ - devtrack-api compatibility alias resolves to full-foundation-compatible without emitting parity evidence
1908
+ required_response:
1909
+ - synchronize full_foundation_compatible_profile dimensions across contract-pack, runtime catalog, appliance evidence, and tests
1910
+ - include roots, contracts, docs, env, scripts, auth, persistence, validation, and evidence dimensions
1911
+ - record matrix inventory in FEAT quality evidence before finalize
130
1912
  - id: DTAPI-P0-PREVIEW-001
131
1913
  severity: P0
132
1914
  title: Early devtrack-api planning must include package structure preview.
@@ -139,6 +1921,75 @@ rules:
139
1921
  required_response:
140
1922
  - generate package structure preview
141
1923
  - request human approval before FEAT execution
1924
+ - id: DTAPI-P0-TOOL-BASELINE-001
1925
+ severity: P0
1926
+ title: API tool requests must include the minimum operational API baseline.
1927
+ applies_to:
1928
+ - DEB
1929
+ - FEAT
1930
+ - source
1931
+ - validator
1932
+ detect:
1933
+ - devtrack-api plan or scaffold lacks package.json scripts, .env.example, tsconfig aliases, Nest CLI config, validation commands, or src/main.ts bootstrap
1934
+ - devtrack-api appliance scaffold preview omits baseline root artifacts, OpenAPI docs, use-case/input-port slice, or auth guard/decorator artifacts
1935
+ - implementation claims Foundation compatibility while any tool_level_api_minimums item is omitted without profile-compatible exception
1936
+ required_response:
1937
+ - infer and add the missing minimum baseline from Foundation evidence
1938
+ - or downgrade to prototype with explicit exception and follow-up
1939
+ - record baseline inventory in the FEAT quality evidence
1940
+ - id: DTAPI-P0-OPENAPI-001
1941
+ severity: P0
1942
+ title: REST APIs must expose Swagger/OpenAPI documentation.
1943
+ applies_to:
1944
+ - DEB
1945
+ - FEAT
1946
+ - source
1947
+ - validator
1948
+ detect:
1949
+ - REST API plan or source lacks @nestjs/swagger dependency, DocumentBuilder, SwaggerModule.createDocument, or SwaggerModule.setup
1950
+ - controllers lack ApiTags, ApiOperation, or response decorators
1951
+ - DTOs or presentation validators lack ApiProperty/ApiPropertyOptional for documented request shape
1952
+ - protected bearer routes lack ApiBearerAuth("bearer")
1953
+ required_response:
1954
+ - add root OpenAPI bootstrap and /docs route
1955
+ - add controller and DTO Swagger decorators
1956
+ - add .env.example placeholders for Swagger server settings
1957
+ - or record an explicit prototype exception before implementation/finalize
1958
+ - id: DTAPI-P0-USECASE-001
1959
+ severity: P0
1960
+ title: User-facing routes must go through application input ports and use cases.
1961
+ applies_to:
1962
+ - DEB
1963
+ - FEAT
1964
+ - source
1965
+ - validator
1966
+ detect:
1967
+ - controller, resolver, CLI command, WebSocket gateway, agent, or tool calls repositories, TypeORM, infrastructure adapters, or domain validators directly
1968
+ - user-facing route lacks matching src/application/business/<context>/ports/in/<verb-noun>.use-case.port.ts
1969
+ - user-facing route lacks matching src/application/business/<context>/use-cases/<verb-noun>.use-case.ts
1970
+ required_response:
1971
+ - add an application input port with exported Symbol and interface
1972
+ - add a use case implementing the input port
1973
+ - inject the input port symbol from presentation
1974
+ - keep transport mapping in presentation only
1975
+ - id: DTAPI-P0-AUTH-PLAN-001
1976
+ severity: P0
1977
+ title: API plans must resolve authentication, authorization, and route guard decisions.
1978
+ applies_to:
1979
+ - DEB
1980
+ - FEAT
1981
+ - source
1982
+ - validator
1983
+ detect:
1984
+ - plan for new API, route, scaffold, CRUD, or bounded context does not ask or record authentication decision
1985
+ - plan for protected behavior does not ask or record authorization role, permission, policy, ownership, or tenancy decision
1986
+ - non-public route lacks guard/decorator and Swagger security documentation
1987
+ - route is treated as public by omission instead of explicit decision
1988
+ required_response:
1989
+ - ask the human planner about authentication and authorization before implementation
1990
+ - record public route exceptions explicitly
1991
+ - add guards/decorators and ApiBearerAuth or equivalent documented security scheme for protected routes
1992
+ - if the human is unavailable and work must proceed, use the safest local guard pattern and record the assumption
142
1993
  - id: DTAPI-P0-PATH-001
143
1994
  severity: P0
144
1995
  title: Proposed paths must match canonical Foundation-compatible paths.
@@ -150,7 +2001,8 @@ rules:
150
2001
  - forbidden paths from SKILL.md or foundation-layout.md
151
2002
  - new domain entities folder outside approved legacy contexts
152
2003
  - context-owned infrastructure adapters
153
- - per-context or per-entity TypeORM modules under src/infrastructure/adapters/orm
2004
+ - TypeORM modules outside src/infrastructure/adapters/orm/typeorm.module.ts or src/infrastructure/adapters/orm/<context>-orm.module.ts
2005
+ - per-entity TypeORM modules under src/infrastructure/adapters/orm
154
2006
  - transport-less presentation context folders
155
2007
  required_response:
156
2008
  - replace with canonical path
@@ -181,9 +2033,11 @@ rules:
181
2033
  - files ending in .typeorm-repository.ts without InjectRepository or Repository usage
182
2034
  - in-memory Map persistence inside TypeORM-named repositories
183
2035
  - missing TypeOrmModule.forFeature wiring for concrete ORM repositories
184
- - concrete ORM repositories not provided and exported through src/infrastructure/adapters/orm/orm.module.ts
2036
+ - concrete ORM repositories not provided and exported through the owning src/infrastructure/adapters/orm/<context>-orm.module.ts
185
2037
  required_response:
186
2038
  - implement real TypeORM repository wiring
2039
+ - register root TypeORM configuration in src/infrastructure/adapters/orm/typeorm.module.ts
2040
+ - bind and export repository/service port symbols from the owning <context>-orm.module.ts
187
2041
  - rename prototype adapters so they do not claim TypeORM compatibility
188
2042
  - or downgrade to prototype with explicit exception
189
2043
  - id: DTAPI-P0-COMPOSITION-001
@@ -339,6 +2193,14 @@ codesdd_validate_drift_map:
339
2193
  mapped_rules:
340
2194
  - DTAPI-P1-APPONLY-001
341
2195
  - DTAPI-P0-PATH-001
2196
+ CVD-10:
2197
+ observed: Derived API scaffolds could pass structural checks while omitting operational API minimums such as Swagger/OpenAPI bootstrap, .env.example, package scripts, auth planning, route guards, and application use cases.
2198
+ mapped_rules:
2199
+ - DTAPI-P0-TOOL-BASELINE-001
2200
+ - DTAPI-P0-RUNTIME-SCRIPTS-001
2201
+ - DTAPI-P0-OPENAPI-001
2202
+ - DTAPI-P0-USECASE-001
2203
+ - DTAPI-P0-AUTH-PLAN-001
342
2204
  field_evidence_drift_map:
343
2205
  WCA-01:
344
2206
  observed: A derived API planned/implemented before devtrack-api became required evidence, then required a later corrective FEAT.
@@ -354,14 +2216,47 @@ field_evidence_drift_map:
354
2216
  mapped_rules:
355
2217
  - DTAPI-P0-TYPEORM-001
356
2218
  - DTAPI-P1-RUNTIME-001
2219
+ WCA-04:
2220
+ observed: A generated API slice exposed routes without a complete application use-case path, OpenAPI documentation, .env.example, package scripts, or guard/authz planning.
2221
+ mapped_rules:
2222
+ - DTAPI-P0-TOOL-BASELINE-001
2223
+ - DTAPI-P0-RUNTIME-SCRIPTS-001
2224
+ - DTAPI-P0-OPENAPI-001
2225
+ - DTAPI-P0-USECASE-001
2226
+ - DTAPI-P0-AUTH-PLAN-001
357
2227
  early_debate_gate:
358
2228
  applies_to: first two or three DEBs that plan a new devtrack-api project or major API theme
359
2229
  required_outputs:
360
2230
  - selected derivation profile
361
2231
  - package structure preview
2232
+ - tool-level API baseline inventory
2233
+ - authentication and authorization planning decision
362
2234
  - human approval or correction
363
2235
  - exception list with ADR refs when applicable
364
2236
  - policy pool seed derived from this contract pack
2237
+ legacy_generated_artifact_policy:
2238
+ reference: references/generated-artifact-invalidation.md
2239
+ default_classification: invalidated
2240
+ allowed_classifications:
2241
+ - revalidated
2242
+ - invalidated
2243
+ - grandfathered
2244
+ - not_applicable
2245
+ revalidation_required_for:
2246
+ - foundation-compatible compatibility claims
2247
+ - enterprise-strict compatibility claims
2248
+ - approved or corrected human_validation_gate reuse
2249
+ - artifact-map evidence reused across source or profile changes
2250
+ invalidation_triggers:
2251
+ - predates ADR-FEAT-0373
2252
+ - predates ADR-FEAT-0374 artifact-map gate evidence
2253
+ - missing FEAT-0375 preview material signature
2254
+ - missing FEAT-0376 semantic drift classes or profile outcomes
2255
+ - consumer field-validation references changed after ADR-FEAT-0378
2256
+ - uses plural CodeSDD roots as devtrack-api output
2257
+ - omits Foundation-compatible aliases or tests projection
2258
+ - omits cleanup or port-safe runtime bootstrap artifacts
2259
+ grandfathering_rule: Grandfathered artifacts are historical evidence only and must not support Foundation-compatible claims without revalidation.
365
2260
  future_consumers:
366
2261
  - FEAT-0233 package preview gate
367
2262
  - FEAT-0234 project-local skill policy pool
@@ -369,4 +2264,5 @@ future_consumers:
369
2264
  - FEAT-0236 semantic architecture validator
370
2265
  - FEAT-0237 finalize lifecycle gate
371
2266
  - FEAT-0238 skill provenance and applied-policy evidence
2267
+ - FEAT-0379 legacy generated artifact invalidation
372
2268
  - FEAT-0239 future field validation protocol