adr-new

A command that creates an Architectural Decision Record, a document that records an important design choice and its reasoning. It selects a number, format, filename, template, and index entry.

In plain words
What is it for?
Use it to create a numbered decision document, gather the needed context, apply a configured template, and add the document to the project index.
Why use it?
It keeps design decisions consistent and searchable instead of leaving them scattered in discussions or undocumented.

Command

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 commands/zircote-plugins/adr/adr-new
Clone the repo
git clone --depth 1 https://github.com/zircote-plugins/adr
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 760 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.00009 $0.00760
Opus 5 $0.00005 $0.00380
Sonnet 5 $0.00002 $0.00152
Haiku 4.5 $0.00001 $0.00076

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

Security

Grade A, and why

adr-new 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.

commands/adr-new.md · 113 lines

How it starts

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

Create New ADR

Create a new Architectural Decision Record with the specified title.

Process

  1. Read configuration from .claude/adr.local.md if present
  2. Determine next ADR number by scanning existing ADRs
  3. Ask for format if not specified in config (default: MADR)
  4. Gather context through elicitation questions
  5. Create ADR file using selected template
  6. Update index (README.md) with new entry

Configuration Reading

Check for .claude/adr.local.md:

  • adr_paths: Where to create the ADR
  • default_format: Template format (madr, nygard, y-statement, etc.)
  • numbering.pattern: How to number (4digit, 3digit, date)
  • madr_variant: Which MADR variant (full, minimal, bare, bare-minimal)

Numbering Logic

  1. Scan existing ADRs in the configured directory
  2. Extract highest number
  3. Increment by 1
  4. Format according to numbering.pattern:
    • 4digit: 0001, 0002, etc.
    • 3digit: 001, 002, etc.
    • date: 20250115, etc.
    • custom: Apply custom pattern

Title Slug Generation

Convert title to slug:

  • Lowercase
  • Replace spaces with hyphens
  • Remove special characters
  • Truncate if too long

Example: "Use PostgreSQL for Primary Storage" → "use-postgresql-for-primary-storage"

Elicitation

If argument is just a title, ask clarifying questions:

  1. Context: "What is the problem or situation requiring this decision?"
  2. Options (if using MADR): "What alternatives are being considered?"
  3. Decision Drivers: "What factors are influencing this decision?"

Use AskUserQuestion for structured input when helpful.

Template Selection

Use template from ${CLAUDE_PLUGIN_ROOT}/templates/{format}/:

  • madr/adr-template-full.md
  • madr/adr-template-minimal.md
  • structured-madr/adr-template.md (comprehensive with frontmatter and audit)
  • nygard/adr-template.md
  • y-statement/adr-template.md
  • alexandrian/adr-template.md
  • business-case/adr-template.md
  • tyree-akerman/adr-template.md

File Creation

Read the full file on GitHub · 113 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 · 113 lines · 9 tokens per session scan A d8b397a99162

Subscribe to this mod's changes

adr-new is a command published in the GitHub repository zircote-plugins/adr (5 stars, last pushed 15d ago), licensed MIT. It adds 9 tokens to every session and 760 once invoked, about $0.0000 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-31.