Skip to content
Toolkit

ADR-0140 — A debt marker names a record that outlives it

Status: Accepted · Date: 2026-08-31 · Supersedes: —

Context

Audit 03 counted zero TODO/FIXME/HACK markers in 80,000 lines and declined to read that as cleanliness. Its closing note is the finding: "the one thing worth changing immediately regardless of priority is the absence of markers … every finding in this document had to be discovered rather than read."

The debt is not unrecorded. It is in ROADMAP rows, SESSION open items, close-out reports and ADRs — 140 of them by this one. What none of those reach is the person editing the function. A block whose settings are collected and drawn by nothing looks, from inside block_types.go, exactly like a block that works.

So why did nobody write a marker? Because the bare form is genuinely worse than none. // TODO: fix this outlives whoever meant something by it, and a codebase that accumulates them trains its readers to skim past the word. A marker is only worth having if a reader can get from it to the reasoning, and the reasoning is never in the comment.

Decision

A debt marker is admissible when it names a record that outlives it:

// TODO(003): `theme` is collected here and drawn by nothing …
// FIXME(ADR-0066): the level is bounded here, not validated on write.
// HACK(#480): stored h1 rows predate migration 000044.

Three attribution forms, and no fourth: an ADR number that is a file in docs/decisions/, a track number that is a directory under .station/jobs/, or a pull request number. Each is a record somebody maintains, so the marker is a pointer rather than the only account of itself. A person's name is deliberately not a form — it decays fastest of anything available, and the audit's complaint is about followability, not blame.

npm run check:debt holds it, in verify. D1 refuses the bare form, D2 refuses an attribution that resolves to nothing, D3 refuses a marker whose text is under three words, D4 refuses XXX/WIP/REFACTOR outright — those have no attributed form and no convention behind them.

Two things are read as data rather than debt. A marker inside a string is a fixture, so the scan blanks strings, templates and regexes before looking (check:test-hygiene's reader, one subject over). And a marker quoted inside a comment is being talked about: two gates in scripts/ document their own rules by reproducing the bare form as the failure they catch, and a repo must be able to describe the convention it enforces.

Consequences

The gate does not require markers to exist. A tree with none passes. The point is that a marker written from here on is followable — manufacturing debt to satisfy a counter would be the audit's finding inverted.

Three markers ship with it, so the convention has subjects rather than being a rule about a hypothetical: code's undrawn theme select, and the donation and appointment_calendar blocks that cannot take a donation or book an appointment. All three are already recorded as 003's open items and all three are owner decisions rather than repairs — which is exactly the class a reader of the field spec cannot see and most needs told.

A marker is not a substitute for the record. It points at one. A finding that exists only in a comment has the same problem the bare form has, one indirection along, and D2 is what keeps the pointer honest: delete the ADR or rename the track and the build says so.

Source: docs/decisions/0140-a-debt-marker-names-a-record-that-outlives-it.md

Library