Agent Decision Records (AgDR)

Your AI agent just picked one library over another, chose a data model, and settled an architecture question — faster than you could read this sentence. Where's the record of why?
AI coding agents (Claude Code, Codex, Copilot, Cursor, Windsurf) now make consequential technical decisions at machine speed: libraries, patterns, migrations, whole architectures. You skim the diff, approve the PR, and it ships. Six weeks later a test breaks, a cost spikes, or a new hire asks "why is it built this way?" — and nobody, human or agent, can reconstruct the reasoning. The context evaporated the moment that session ended.
An Agent Decision Record (AgDR) is that missing record. It's a small, structured Markdown file — context, the options weighed, the decision, and the trade-off accepted — written by the agent at the moment it makes the call and committed alongside the code it governs. Think Architecture Decision Record, but authored by the agent in real time, carrying the metadata (model, trigger, timestamp) an audit actually needs.
It's an open standard: a Markdown representation, a JSON serialisation, schemas for both, and validators that CI runs on every PR. Drop it into any repo, with any agent — no framework required. This README is the tour; SPEC.md is the normative reference for every field, enum, representation, and body rule.
What an AgDR looks like
A real one, spec-valid, in about ten seconds of reading:
---
id: AgDR-0001
timestamp: 2026-01-30T18:45:00Z
agent: claude-code
model: claude-opus-4-5-20251101
trigger: user-prompt
status: executed
---
# Use Vitest for unit testing
> In the context of a new TypeScript + Vite monorepo, facing the need for fast feedback loops, I decided to use Vitest to achieve near-instant test runs, accepting that it is newer than Jest with a smaller plugin ecosystem.
## Options Considered
| Option | Pros | Cons |
|--------|------|------|
| Jest | Industry standard, huge ecosystem | Slower, awkward ESM config |
| Vitest | Native Vite support, fast, Jest-compatible API | Newer, smaller ecosystem |
## Decision
Chosen: **Vitest**, because it runs on our existing Vite pipeline and executes
tests 3–5× faster while keeping a Jest-compatible API the team already knows.
## Consequences
- Test suite runs 3–5× faster than the Jest equivalent
- Team reuses Jest knowledge (compatible API)
- May need workarounds for a few Jest-only plugins
That's the whole shape: frontmatter you can lint, a one-line Y-statement, the alternatives that were actually on the table, and the trade-off owned out loud. See more in examples/.
Why it matters now
Agents write code faster than any team can narrate its own reasoning. Without a record that keeps pace, the decisions still happen — they just become invisible:
- Decisions are invisible — no record of why the agent chose React over Vue
- Context is lost — the next session starts fresh, with no memory of the last call
- Teams can't audit — PR review sees what changed, never why it was chosen
- Knowledge doesn't transfer — new engineers can't reconstruct AI-made decisions
AgDR closes the gap by having the agent document each decision in a structured, human-readable file that lives with the code — so the reasoning survives the session that produced it.
Key Differences from ADR