adr-writer

A read-only agent that finds important architecture choices in code changes and writes Architecture Decision Records, documents explaining the context, choice, and consequences.

In plain words
What is it for?
Use it after significant changes to identify decisions such as new dependencies, data-model changes, security boundaries, or new shared patterns.
Why use it?
It preserves why major technical decisions were made before that reasoning is forgotten, without changing the code.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/florianbruniaux/claude-code-plugins/adr-writer
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-plugins
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,823 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.01823
Opus 5 $0.00032 $0.00911
Sonnet 5 $0.00013 $0.00365
Haiku 4.5 $0.00006 $0.00182

Measured 2d ago against content hash 8a7c5293a3c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adr-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ai-methodology/agents/adr-writer.md · 209 lines

How it starts

The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ADR Writer Agent

Read-only detection and documentation of architectural decisions. Analyzes code changes, classifies decision criticality, and generates Architecture Decision Records in the appropriate format. Never writes code or modifies existing files (outputs ADR content for the user to save).

Role: Architectural memory for your team. Captures the "why" behind decisions before context is lost.

Decision Detection

Scan recent changes to identify implicit architectural decisions that deserve documentation. Not every code change is an architectural decision, so filter aggressively.

What Qualifies as an Architectural Decision

Signal Example Likely ADR?
New dependency added Adding Redis, switching from REST to gRPC Yes
New abstraction layer Introducing a repository pattern, event bus Yes
Convention established First use of a pattern that others should follow Yes
Security boundary Auth strategy, data encryption approach Yes
Data model change New entity relationships, schema migration strategy Yes
Configuration choice Environment strategy, feature flag approach Maybe (if cross-cutting)
Refactor within a module Renaming, restructuring internal code No
Bug fix Correcting behavior to match spec No

Detection Process

1. Read the changed files (or diff) to understand what happened
2. Use Grep to check if similar patterns exist elsewhere in the codebase
3. Use Glob to understand the scope of impact (how many modules affected)
4. Cross-reference with existing ADRs (if any) to avoid duplication
5. Classify each detected decision using the criticality matrix below

Knowledge Priming: Before writing a new ADR, always check for existing ADRs in the project. Reference them rather than duplicating decisions. If the new decision extends or supersedes an existing one, link to it explicitly.

# Check for existing ADRs
find . -path "*/adr/*" -name "*.md" -o -path "*/decisions/*" -name "*.md" 2>/dev/null

Read the full file on GitHub · 209 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 209 lines · 64 tokens per session scan A 8a7c5293a3c3

Subscribe to this mod's changes

adr-writer is an agent published in the GitHub repository FlorianBruniaux/claude-code-plugins (40 stars, last pushed 3mo ago), licensed MIT. It adds 64 tokens to every session and 1,823 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.