Phase 3: First-Class Twin API
Milestone 3 — Ditto-Style Twin Layer. Roadmap phase 3 of 6.
Goal
Twins become first-class resources: search, write, and graph navigation with embedded state.
Requirement
- R3 — Twin API primera clase:
GET /api/twins paginated search, attributes/features writes, graph expand with embedded state (tenant-scoped recursive CTEs), relationsQuery in REST, OpenAPI-first.
Plans (3)
Success Criteria
Next Action
Run /legion:build to execute Phase 3.
Phase 3: First-Class Twin API
Milestone 3 — Ditto-Style Twin Layer. Roadmap phase 3 of 6.
Goal
Twins become first-class resources: search, write, and graph navigation with embedded state.
Requirement
GET /api/twinspaginated search, attributes/features writes, graph expand with embedded state (tenant-scoped recursive CTEs),relationsQueryin REST, OpenAPI-first.Plans (3)
NeighborsTenant, dedup UNION,ExpandWithCTE, synthetic depth 5-10 benchmark fixing limits)GET /api/twinscursor pagination + filters;?expand=relations(depth)with embedded staterelationsQuery:PUT/PATCH .../attributes|featuresreusing the Phase 2 enforcer;relationsQueryin/api/entitiesQuerySuccess Criteria
GET /api/twins: search by tenant/kind/definition/text/relation filters, cursor pagination, OpenAPI-firstPUT/PATCH /api/twins/{thingId}/attributes|featuresvalidated against model + safe TB mirror?expand=relations(depth)via tenant-scoped recursive CTEs (add the tenant predicatetopology.Neighborslacks)relationsQuerysupported in REST/api/entitiesQuery(reuse proven WS BFS)Next Action
Run
/legion:buildto execute Phase 3.