--- spec: agent-feature status: ready owner: feature-pipeline-agent related-routes: files: - src/api/v2/projects/systems/systems.routes.ts - src/api/v2/projects/systems/systems.controller.ts - src/api/v2/projects/systems/systems.validator.ts - src/services/systems.service.ts - src/api/v2/projects/systems/systems.routes.ts - src/api/v2/projects/systems/systems.controller.ts - src/services/systems.service.ts - src/api/v2/projects/systems/systems.routes.ts - src/api/v2/projects/systems/systems.controller.ts - src/services/systems.service.ts --- # agent-feature ## Goal Add three read/create API2 endpoints for the existing xyz.CommissioningSystem entity (exposed as "systems"): POST create, GET-by-id, and paginated GET list, all project-scoped under /api/v2/projects/{projectId}/systems. No new Postgres table is created — CommissioningSystem already exists in the schema. Follows the AssetType endpoint pattern. Revised per review: no new permissions; reuse existing Project Edit / System View permissions. ## Behavior changes - POST /api/v2/projects/{projectId}/systems - GET /api/v2/projects/{projectId}/systems/{id} - GET /api/v2/projects/{projectId}/systems ## Acceptance criteria - [ ] The behavior described above is implemented on the listed files. - [ ] Existing behavior is unchanged when the new feature is not exercised. - [ ] Unit and (where observable) e2e tests cover the new behavior. ## Out of scope - Update (PUT/PATCH) and Delete (DELETE) endpoints for systems. - Exposing System via API1 / MongoDB. - Any migration or sync with existing API1 System data. - New Postgres columns/fields on CommissioningSystem (table used as-is). ## Notes / open questions - Generated by the feature pipeline from the approved architect plan. If any acceptance criterion is ambiguous, ask the human before implementing.