--- spec: agent-feature status: ready owner: feature-pipeline-agent related-routes: files: - routes - controller - validator - service - routes - controller - service - routes - controller - service --- # agent-feature ## Goal Add three read/create REST endpoints in API2 for the existing xyz.Asset table: POST create, GET single, and GET list (cursor-paginated), all scoped under /api/v2/projects/:projectId/assets and gated on project membership. No new tables are introduced — Asset already exists in the schema. Work is API2 + Postgres (new procs/functions only). ## Behavior changes - POST /api/v2/projects/{projectId}/assets - GET /api/v2/projects/{projectId}/assets/{assetId} - GET /api/v2/projects/{projectId}/assets ## 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) asset endpoints. - Role-differentiated permissions — all project members have equal access in v1. - Cross-project asset queries. - Any changes to the xyz.Asset table schema (columns/constraints) — the table already exists and is used as-is. - AssetType creation/management endpoints (assetTypeId is expected to already exist). ## Notes / open questions - Generated by the feature pipeline from the approved architect plan. If any acceptance criterion is ambiguous, ask the human before implementing.