ADR 0170: Queries are an exact term lookup and a bounded trail, and infer nothing
- Status: Accepted
- Date: 2026-10-26
- Decision issue: #72
- Parent story: #27
- Parent epic: #16
- Builds on: ADR 0054, ADR 0168, ADR 0169
Context#
#72 puts "arbitrary graph queries" and a public write API out of scope, and the story puts open-web entity extraction and inferred relationships out of scope. What remains is a small, fixed set of read operations that #73 (linking prose to entries), #74 (previews) and #75 (relationship trails) need, with defined behaviour for ambiguity, unknown ids and cycles.
Decision#
- A closed set of operations on
AtlasQuery, all read-only over the projection:entry,edgeandsourceby id;lookupby term;edges_ofan entry;trailfrom an entry. There is no query language, no path search between two entries, no filtering by a property and no ranking. - Lookup is exact after normalization. A term is the text split on Unicode
White_Space, joined with single spaces and lowercased, nothing else (the exact rule is ADR 0171's): no stemming, translation, transliteration or fuzzy match. It matches an entry's label or alias. When two entries share a term, both are returned in id order and nothing picks one: choosing is the author's explicit link (#73), not the machine's. Prose is never scanned. - A trail is a bounded breadth-first walk over published relationships, across either
direction, from one published entry. Each step names the relationship, whether it was crossed
forward(fromtoto, as stored) orbackward, and the entry reached. A relationship is crossed once and an entry expanded once, so a cycle ends the walk instead of trapping it, and a step that closes a cycle is still shown as the relationship it is. Order is fixed: by depth, then by the order entries were reached, outgoing before incoming, each by id. The walk stops at depth 3 or 50 steps and reportstruncatedwhen more existed. - A trail means nothing beyond its steps. It is not a path of influence, a derivation or a
ranking. It does not combine relationships into a new one, infer a missing one, assume that
related-tois transitive, or treat proximity as strength. Each step carries its own asserter, confidence, standing and uncertainty, which a component must show with it. - Unknown ids answer nothing. An id the projection does not hold (including every private or withdrawn item) returns no entry, no edges and an empty trail, with no error text that could confirm the item exists.
Consequences#
- #75 renders a trail as a semantic list from
traildata and can mark a cycle by seeing an edge whose reached entry it has already shown. - Anything richer (path search, filters, relevance) needs its own decision and, if it reads more than the published atlas, a new projection.