Documents / Decisions / adr-bd7c4f3c5764
Staleness as data (owner + verified + review cadence)
Why staleness is owner + verified + review cadence data rather than a heuristic.
Context¶
Read-only doc systems drift; docir's write path keeps docs consistent but says
nothing about whether they are still true. created/updated track edits, not
confirmations — a doc nobody has touched in a year is indistinguishable from one
verified yesterday. There was no honest signal for "this needs a human to
re-check it".
Decision¶
Model staleness explicitly, as data rather than a heuristic:
- Two optional frontmatter fields:
owner(a steward) andverified(the date a human last confirmed the doc is still correct). Both areNULL/empty by default and written only when set, so untyped/unowned docs keep clean frontmatter. Persisted asdocuments.owner/documents.verified(migration0002). - A per-type
review_dayscadence in the schema. A doc is stale whentoday - (verified or updated) > review_days;review_days: 0means the type is never stale. - Surfacing is Tier 1 (non-blocking
docir check, astalefinding) plus a computedstaleflag on every read view. Stamp the clock withdocir update <id> --verified; set the steward with--set-owner.
This keeps the three-tier discipline (§ validation): staleness is a graph-level warning, never a write-blocking Tier 0 error and never a Tier 2 guess.
Consequences¶
- Easier: an honest, explicit re-verification mechanism for any doc type, dev or not; owners are accountable; CI can surface overdue docs.
- Scoped out: AST-anchored staleness for code-backed docs (tie a doc to code
symbols and flag it when they change) is deliberately not implemented here.
It needs a code-analysis subsystem and a language-aware anchor format; doing it
half-way would violate "never promote a heuristic to a hard error". Human
re-verification is the honest baseline; AST anchoring is a future, additive
layer that can set
verifiedautomatically without changing this model.