Yeda AI Tips · #059

Español

Docs Are Executable Context Now

Docs used to be for humans who never read them. Now your AI reads every word. That flips the economics of documentation: a page nobody opened last year is now injected into an agent's context on every task that touches your codebase. Documentation stopped being a chore for future humans and became executable context — text that directly steers what your coding agent builds next.

Code shows what. It never shows why

An agent (or a new teammate) can read your code and reconstruct what got built. What the code can never show is why: which constraint forced the design, which three alternatives you evaluated, and why you rejected them. Without that, an agent asked to "improve" a module will happily re-litigate a settled question — swapping your deliberately chosen queue for the shiny one you already ruled out.

The fix is a 15-year-old practice with new leverage: the Architecture Decision Record (ADR), introduced by Michael Nygard in 2011. One short file per significant decision, kept in the repo next to the code it governs. Thoughtworks' Technology Radar has held "lightweight architecture decision records" in its Adopt ring since 2018 — and specifically recommends storing them in source control, not a wiki, so they travel with the code. Source control is exactly where coding agents read.

The 10-minute record

Nygard's template is one or two pages, five sections. The lightweight version most teams use today needs four:

SectionQuestion it answersOne-liner example
ContextWhat forces were at play?"Bursts of 10k jobs/min; team already runs Postgres, no ops budget for new infra."
DecisionWhat did we choose? Active voice: "We will…""We will use Postgres SKIP LOCKED as the job queue."
AlternativesWhat did we consider and reject, and why?"Redis (another service to run), SQS (vendor lock-in for a portable product)."
ConsequencesWhat gets easier, what gets harder?"Zero new infra; queue throughput capped by DB — revisit past 50k jobs/min."

Number the files and never delete one. A superseded decision gets status: superseded by ADR-0012 — the history of changed minds is context too. If you want a maintained, machine-friendly format with YAML front matter, use MADR (Markdown Any Decision Records); it adds optional sections like Decision Drivers and Pros/Cons of the Options.

# ADR-0007: Postgres SKIP LOCKED as the job queue

Status: accepted
Context: 10k jobs/min bursts; team runs Postgres; no ops budget.
Decision: We will use Postgres SKIP LOCKED. No new broker.
Alternatives: Redis Streams (new service), SQS (vendor lock-in).
Consequences: zero new infra; revisit if we exceed 50k jobs/min.

Ten minutes to write. It pays out twice: your agent stops re-deciding the question, and the humans stop re-debating it six months later.

Power-user moves

Resources

Building an AI feature? Yeda AI designs, audits, and ships production LLM systems.

Talk to us · Read the blog