Unified retrieve contract (CLI · MCP · API)
One mental model for reading at scale across Topics, Collections, and Broker, so an agent never has to learn per-surface rules. Every retrieval read on every surface converges on the same vocabulary, defaults, and output shape. Thenavigation.md plan says which plane to
move to; this contract says how every read behaves once you’re there.
It is deliberately composable surfaces, not one mega-tool: each plane keeps its
own bounded read, and they share this contract so results line up. A unified
primitive is only earned once every plane passes the retrieval-scale gate.
The shared vocabulary
The shared output shape
Every bounded read returns, in some form:shown+has_more(and anextCursorwhen more exist) — bounded, pageable.results/records/operations— the rows, at the requestedview.trustwhere governance applies (knowledge|proposed|note) — an agent must never confuse a hint with team truth.stale/ drift flag where drift applies — verify before relying.next_action— the next bounded call (the navigation rail).
The invariants (hold on every surface)
- Bounded by default. No read returns an unbounded set; the default page is
small and
fullbodies are always an explicit opt-in. - Filter + privacy BEFORE limit. Visibility (the draft-privacy predicate) and
all filters run in SQL before
LIMIT— a page never leaks across the visibility boundary, and the caller’s OWN Notes are never false-empty. next_actionis the rail. Every read names the next bounded call; the chain composes the planes (seenavigation.md).- No list-all to find one thing. Searching is a server-side filter call (query + keyset), never a client-side scan of a full list.
Where each surface implements it
The matrix of names + default views is
surface-matrix.md;
the retrieve-first routing for agents is skills/driftless/references/retrieve.md.