Est.

Architecture Decision Records in Agent-First Teams

Machine-readable ADRs let agents see constraints and CI enforce them.

Sponsored by Graphide

Shipped by Agents Editors
· 9 min read · Updated
Cover illustration for “Architecture Decision Records in Agent-First Teams”
Software Architecture · October 21, 2026 · 9 min read · 1,957 words

Architecture Decision Records in agent-first teams must become more than explanations for future engineers. They must expose structured, machine-readable constraints that agents can retrieve before writing code and that CI can enforce before a merge. An agent that cannot see why a decision was made can remove the code that preserves it.

Why agents erase architectural reasoning that was never written down for them to read

An AI agent refactoring “verbose” retry logic sees what looks like redundant code and removes it. What it cannot see is that the verbosity was deliberate, introduced after an incident that caused serious customer harm. The refactor therefore reintroduces the bug while appearing to simplify the implementation. The agent has not knowingly rejected an architectural decision. It has erased a safeguard whose purpose was never made legible to it.

That missing reasoning is a familiar feature of engineering systems. Teams make many decisions but record only a small fraction, leaving the rest in Slack threads, inaccessible slide decks, and the heads of departed colleagues. Salesforce describes the underlying loss directly, with original architects taking institutional knowledge of critical decisions with them when they leave. Agents accelerate the cost because they act quickly on the evidence available to them. Better prompts cannot fill in this missing reasoning, because even an agent with clear instructions cannot follow a constraint it cannot read.

What a classical ADR captures and why that is no longer enough

The Nygard format captures a title, status, context, decision, and consequences, keeping one decision in a short document written for an engineer inheriting the system. Its strength is that a future reader can understand both the choice and its rationale without having attended the original discussion. An agent must also establish the decision’s scope over the code being changed, its current authority, and its relationships with other records. Those relationships cannot safely depend on the reader supplying implicit context.

Immutability remains essential to the format’s value. Once an ADR is accepted, its substance should not be rewritten, and a material change should appear in a new record that explicitly supersedes it. This preserves the history of committed architecture. What needs to change is the structure around that reasoning, including stable machine-readable IDs, discovery terms, explicit scope, classified consequences, and reconsideration triggers. Those fields help an agent distinguish a relevant constraint from background explanation, and an enforceable rule from an aspiration.

The fields that make an ADR legible to an agent

A stable ID makes an ADR citation reviewable across sessions and across the codebase. An explicit status prevents a proposed idea from being treated as an accepted decision. Discovery terms connect the title a human chose to the query an agent issues. For example, “delete account”, “hard delete”, “retention”, and “restore user” may all need to retrieve the same record. An explicit scope then limits where that record applies, so a decision governing services/accounts does not become a rule for a payments module.

Rejected alternatives explain why plausible options were unsuitable under the stated constraints, with evidence where available. This gives agents a reason not to cycle through paths already evaluated and discarded. Consequences need a separate classification as guidance, review-required, or deterministically enforceable. A requirement that “all access must be intuitive” cannot be verified by a gate, whereas a prohibition on importing a specific package within a path may be mechanically checkable. The classification makes that distinction explicit without pretending that CI can judge every architectural concern.

Reconsideration triggers name the changed assumptions that should reopen a decision. They give the record a lifecycle that guards against it becoming silently stale. YAML frontmatter can expose the fields id, title, status, decided, scope, relates_to, and discovery while keeping the reasoning readable as Markdown. The relates_to field makes dependencies between decisions available for retrieval. These additions should follow the repository’s existing ADR convention unless there is a reason to add a second format.

Where ADRs should live and how their authority is established at agent speed

An ADR stored in Confluence, a wiki, or a shared drive is separated from the artifact it governs. Keeping it in the same version-controlled repository as the code preserves the relationship between the decision and the system state against which it was accepted. A later commit that supersedes the record then becomes part of the same history. Location is therefore an architectural concern.

An agent finding a relevant record must be able to distinguish an accepted constraint from a proposal or a superseded choice. The ADR explains what was decided and why, while AGENTS.md states what must always happen or must never happen when the code changes. OpenAI documented Codex as able to follow project rules from AGENTS.md and clone the repository into a sandboxed environment, giving those rules a place in the agent’s working context.

Writing ADRs before the code, not after it

Retrospective ADRs can explain a completed implementation, but they cannot govern an agent that has already written it. When the record follows the commit, documentation risks becoming a rationalization of the chosen path. ADR-first development reverses the sequence by establishing the decision before implementation begins. The implementing agent then has current constraints to consult rather than having to infer intent from existing code. Format and location matter only if the record is available when the choice is made.

As the corpus grew, agents began drafting new records unprompted and citing prior reasoning, making the established pattern useful to subsequent decisions. Enforcement nevertheless depended on hooks that fired a rule on every file edit in governed directories, preventing an agent from bypassing the constraint simply by not consulting the record.

The same sequencing applies to incident investigation. Before an agent patches a symptom, a structured investigation record can require multiple hypotheses, evaluation of evidence, and identification of the root cause. In the practitioner workflow, that discipline caught a root-cause misattribution that would otherwise have directed a patch at the wrong problem.

How architectural constraints encoded in ADRs get enforced in CI

A structured ADR is necessary, but its mechanically checkable constraints need a gate that can reject a non-compliant change. Otherwise, whoever reads the document can treat an accepted rule as a suggestion. The connection begins with a consequence classified as deterministically enforceable. An objective check tests that consequence against a dependency edge, configuration value, API shape, or another fact that can be evaluated mechanically. The constraint takes effect when breaking it fails the build, even if no one leaves a comment.

The failure message is part of that enforcement design. An unexplained error gives the receiving agent or engineer little basis for making the correct repair. A useful gate identifies the governing ADR, affected files, detected violation, approved alternatives, and exception path. That context shows which decision led to the failed check and why it blocks the build. It also distinguishes an approved way forward from another implementation that would violate the same rule.

Deterministic gates work with two other layers, a context index and clear anti-pattern definitions. The index reduces each ADR to one actionable sentence, bridging the full corpus and the context an agent can hold in a session. Anti-pattern definitions describe violations that reviewers and agents can spot even when a binary check is not possible. Production teams following this approach have extended build systems to detect architectural violations, dependency misuse, and departures from encoded implementation constraints. The build becomes the arbiter of objective rules, while the remaining guidance stays visible without being misrepresented as automated protection. Graphide CI, a faster GitHub Actions runner service, runs a team's existing jobs with warm caches, splitting long test steps only where a check shows every result stays the same, and returns the same verdict with less waiting; a failing check still fails the job.

What agent-generated code does to review when architectural constraints are absent

When rules are not enforced upstream, code review has to protect the architecture. In enterprise settings, AI-assisted pull requests tend to be larger than unassisted submissions, increasing the amount of reasoning a reviewer must reconstruct across files. That pattern is not universal, since research on fully autonomous agent-generated open-source pull requests has found smaller, more localized changes. The structural concern is the burden placed on review when change volume outpaces a reviewer’s ability to hold the relevant behavior in mind. An unstated business invariant is particularly difficult to defend through a diff because the reviewer must recover the rule as well as detect its violation.

The code can also look correct by the usual surface measures. It may compile, follow style guides, and pass baseline tests while failing under load, edge cases, or invalid inputs. These are failures of logic rather than syntax, so test coverage alone cannot stand in for architectural correctness. An ADR-backed gate moves a defined part of that burden away from reconstructing intent line by line. Instead of depending on a reviewer to rediscover a prohibition within a large change, it blocks the prohibited condition directly and leaves human attention for judgments that cannot be reduced to a check.

How multi-agent systems change the scope of what ADRs must govern

In a single-agent workflow, a module-level ADR constrains one actor working within a defined scope. In a multi-agent pipeline, a decision about orchestration or data access can govern every downstream agent. An authority boundary therefore cascades through the system rather than stopping at an individual file. This makes explicit relationships between ADRs essential. An agent may satisfy two records independently while violating the dependency between them if that relationship is not visible.

The corpus must consequently govern more than implementation structure. Architecturally significant choices include what an agent may do autonomously, what requires human approval, which data sources it may query, and under what legal basis. They also include how agents communicate, who owns the fallback, and what retention and deletion policies apply. These choices are difficult to reverse, and their consequences compound as other agents depend on them. Recording their scope and relationships makes the system’s authority model part of the architecture rather than an assumption scattered through individual instructions.

The RAD-AI paper identifies the broader mismatch between documentation designed for deterministic software and ecosystems of interacting AI components. The EU AI Act’s Article 11 and Annex IV technical documentation requirements apply to providers of high-risk AI systems from 2 December 2027 and require documentation demonstrating how and why the system was designed as it was. Machine-readable ADRs with cross-references that can be audited are a practical way to keep that reasoning, though systems need it for technical reasons even when compliance does not require it.

The developer's role when agents can read and enforce the architecture themselves

When agents can retrieve decisions, draft records, and act within enforced constraints, the developer’s responsibility shifts toward deliberate constraint authorship. The central work is defining the problem that forces a choice, the alternatives seriously considered, the trade-offs accepted, and the conditions that would justify reconsideration. These judgments depend on stakeholder knowledge and accountability. Salesforce assigns humans the nuanced, project-specific context and stakeholder empathy needed to establish assessment criteria, while describing AI as effective at research and formatting. The architect is still accountable for each key decision, whether or not AI helped make it.

An ADR with the right scope and a connection to CI can govern every agent that touches the code in that scope without its author having to check every line of the implementation. Human review remains necessary for consequences classified as review-required and for the judgment behind the constraints themselves. But it no longer has to carry the entire burden of preserving architectural intent. The developer retains control by writing the reasoning into constraints that agents can read before they act and that the build can enforce afterward.

Sources

  1. An architecture decision record template for AI-assisted development
  2. RAD-AI: Rethinking Architecture Documentation for AI-Augmented Ecosystems

More in Software Architecture