AI-generated code is cheap. The judgment behind it is not. When a coding agent rewrites a file, it has no idea why your team picked PostgreSQL over DynamoDB, why AI-generated emails must stay drafts, or why suggestions live in a side panel instead of inline. That context lives in someone’s head, and when they leave or forget, it’s gone.
Decision records are the fix. Short, version-controlled Markdown files that capture what was decided, why, and what was rejected. They give both humans and agents a readable trail of intent, not just behavior.
Three Types of Decision Records
| Type | What It Captures | Example |
|---|---|---|
| ADR | Architecture and technical decisions | Use PostgreSQL as primary database |
| PDR | Product behavior and scope | AI-generated emails must remain drafts |
| DDR | Design and interaction decisions | Show AI suggestions in a side panel |
ADRs cover system boundaries, dependencies, and operational choices: event-driven processing, modular monolith, REST over GraphQL, idempotent jobs. PDRs cover decisions that look arbitrary in code. A free-tier limit of three projects is pricing strategy, not a magic constant. DDRs preserve interaction principles like keeping generated text beside a document instead of inside it so users can compare before accepting.
Why AI Agents Make This Urgent
Coding agents are partially stateless about project history. They read files and infer patterns, but they cannot tell an intentional decision from an accident or a settled debate from an open one. Four failure modes show up repeatedly:
- Reopened debates. Your team chose a modular monolith. The agent proposes extracting a service because it looks clean in isolation.
- Local optimization, global damage. A cleaner file violates a system boundary. A simpler component breaks a pricing assumption.
- Preserved code, lost intent. Patterns get copied without principles. Some code is a compromise, transitional, or externally constrained. None of that is visible in the file itself.
- Plausible invented rationale. Agents draft confident explanations that do not match the real decision. Human review of records is non-negotiable for this reason.
A Template Worth Actually Using
The template needs an AI guidance section. That is what turns a record into durable instructions for future agents rather than just documentation for humans:
# Decision: Short title
Status: Proposed | Accepted | Superseded | Deprecated
Date: YYYY-MM-DD
Type: Architecture | Product | Design
Owners: Team or names
## Context
Problem, constraints, goals, user needs, technical and business factors.
## Decision
State the decision clearly.
## Alternatives considered
### Option 1
Pros:
- ...
Cons:
- ...
## Consequences
What becomes easier, harder, riskier; follow-up work created.
## AI guidance
When an AI assistant works in this area, it should:
- Preserve ...
- Avoid ...
- Prefer ...
- Ask for review when ...
## Links
- Related issues, pull requests, files
- Supersedes / Superseded byRecord decisions that affect multiple system parts, encode product promises, resolve real debates, or that future agents might casually reverse. Skip tiny refactors, obvious fixes, experiments, and local naming. The rule of thumb from the source: if reversal would need a discussion, record it.
How to Wire Agents Into Records
Drafting is a good AI use case here. Prompt the agent to generate the record from pull request context:
Draft an Architecture Decision Record for the decision in this pull request.
Include context, alternatives, consequences, and AI guidance.
Save it as Markdown under docs/decisions/architecture.Then verify it like code: accurate context, real alternatives, honest consequences, guidance matching actual intent. Before implementation work, instruct the agent to read first:
Before modifying this feature, read docs/decisions.
Follow accepted decisions. If your change conflicts with one,
explain the conflict before changing code.That shifts the agent from predicting plausible code to operating inside documented constraints.
Lifecycle and Repo Layout
Four statuses cover everything: Proposed (under discussion), Accepted (guides current work), Superseded (replaced, kept for history with a link forward), Deprecated (not recommended, still describes existing parts, useful mid-migration). When direction changes, append a new record linking the old one. Silently rewriting history destroys the evolution trail that makes records valuable.
Suggested folder structure:
docs/
decisions/
architecture/
0001-use-postgresql-for-primary-storage.md
product/
0001-ai-generated-email-requires-human-review.md
design/
0001-use-inline-validation.mdA spec says the system shall do X. A record says X was chosen over Y under these tradeoffs. The rejected paths are what save future churn. Tests enforce behavior; records protect meaning. Comments explain surprising lines; records explain system direction.

