docs/specs/20260703-113641-agent-feature.mdadded---
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 API2 endpoints for AssetType (create, get-one, list) scoped to a
project. AssetType already exists in the xyz schema; this feature adds
read/write stored procedures and functions plus API2 runtime code. No new
tables are introduced. Uniqueness of Name and Code within a project is
enforced. Note: the existing AssetType table has no "Code" column — see risks.
## Behavior changes
- POST /api/v2/projects/{projectId}/asset-types
- GET /api/v2/projects/{projectId}/asset-types/{assetTypeId}
- GET /api/v2/projects/{projectId}/asset-types
## 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) AssetType endpoint
- Delete AssetType endpoint
- Tenant-level scoping of AssetTypes
- Role-based access control beyond authentication (any authenticated user is authorized)
- Pagination / filtering / sorting on the list endpoint (flat list for v1)
- Backfilling Code for pre-existing AssetType rows (raised as a risk)
## Notes / open questions
- Generated by the feature pipeline from the approved architect plan. If any
acceptance criterion is ambiguous, ask the human before implementing.