Skip to content
LITHOEN

Evidence platform and governance

Document

ADR-0006: Controlled unit registry and predicate contract table

Repository path
docs/decisions/ADR-0006-units-and-predicate-contracts.md
Size · SHA-256
1.1 KB · 46e29b13f81c9f77eb1609cc3fcdcea30edb22e1f566f0cdac7e4ec013441faf

Status: accepted (2026-09-06)

Context

Silent unit ambiguity ("plate moves at 10") and form-valid-but-meaning-wrong values (a thickness recorded in cm/yr) are classic scientific-data defects. Checking a value's FORM while its MEANING is wrong is the recurring gate failure in data platforms.

Decision

  • A small explicit unit registry (@lithoen/scientific-units): every numeric claim value names a registered unit; conversion is dimension-checked and refuses cross-dimension requests; no general-purpose conversion framework.
  • A predicate registry (@lithoen/domain/predicates): every claim predicate must be registered with its expected value shape and physical dimension; validators reject unregistered predicates and dimension mismatches. This pins meaning, not just form.

Consequences

  • Adding a new kind of fact means registering its predicate first — a deliberate, reviewed act that documents semantics once, for every future claim of that kind.
  • The registry grows with the corpus; it is vocabulary, so it lives in domain.