adr-draft

adr-draft is a command for Claude Code from mbeacom/adrkit. It costs 25 tokens per session (1,903 once invoked), scanned A, original, Apache-2.0.

A command that creates one proposed architecture decision record (ADR) from a current decision or a selected audit finding.

In plain words
What is it for?
Use it to draft a record from a named decision or backfill candidate, including its context, alternatives, evidence, and affected files.
Why use it?
It preserves important technical choices and their supporting evidence instead of leaving them only in a plan or audit report.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the adrkit plugin — 2 skills, 5 commands, 1 agent shipped together

Good fit Use it to draft a record from a named decision or backfill candidate, including its context, alternatives, evidence, and affected files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mbeacom/adrkit/adr-draft
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.

Clone the repo
git clone --depth 1 https://github.com/mbeacom/adrkit

Made for: Claude Code.

Or install adrkit, the plugin that ships this one along with the rest of its 2 skills, 5 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adr-draft

README.md
[![agentmods](https://agentmods.dev/badge/commands/mbeacom/adrkit/adr-draft/github.svg)](https://agentmods.dev/commands/mbeacom/adrkit/adr-draft)
Your own site
<a href="https://agentmods.dev/commands/mbeacom/adrkit/adr-draft"><img src="https://agentmods.dev/badge/commands/mbeacom/adrkit/adr-draft/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adr-draft

Your own site · 80×15
<a href="https://agentmods.dev/commands/mbeacom/adrkit/adr-draft"><img src="https://agentmods.dev/badge/commands/mbeacom/adrkit/adr-draft.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 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,903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.01903
Opus 5.5 $0.00010 $0.00761
Sonnet 5.5 $0.00005 $0.00381
Haiku 4.5 $0.00003 $0.00190

Measured 1mo ago against content hash f3796c363564, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adr-draft 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 1mo 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.

packages/adapters/agent-plugin/commands/adr-draft.md · 153 lines

How it starts

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

Resolve the CLI first

Try, in order: $ADRKIT_CLI, then ./node_modules/.bin/adr, then adr on PATH. @adrkit/cli is normally a dev dependency, so a bare adr is not on PATH in most projects — trying only that and concluding "no CLI is available" is a false negative. If all three fail, say so and tell the user to install @adrkit/cli. Never fall back to reading ADR frontmatter by hand: it cannot expand glob matchers, cannot read inbound @adr markers, and has no exit code, so it produces an answer that looks complete and is not.

Draft one architecture decision record for $ARGUMENTS.

Backfill mode

When $ARGUMENTS names a candidate key such as BF-001, resolve it only from the most recent /adr-backfill report still present in context. Require one complete backfillHandoff containing:

  • candidateKey
  • title
  • corpusDir
  • candidatePaths
  • sourceArtifact
  • citations
  • missingEvidence
  • affects
  • alternatives
  • reconciliation
  • reconciliationSnapshot with corpusFingerprint, governing, activeProposals, and history
  • statusTreatment: proposed

If the handoff is absent, ambiguous, stale, marked covered or unverified, or missing any field, stop without writing and ask the caller to rerun /adr-backfill or provide the complete block. Do not reconstruct provenance, paths, alternatives, or gaps from memory.

In backfill mode, use the handoff title for the scaffold, set provenance.sourceArtifact, cite every source and known gap in the body, copy the reviewed affects matchers, and state the reconciliation result. The handoff supplies evidence, not authority: the new record remains proposed. Use the handoff's corpusDir as ADR_DIR. Honor the trust confirmation recorded by /adr-backfill; if the resolved writer is inside the worktree and no explicit confirmation is present, stop before executing it.

Check first, then write. Before scaffolding anything:

  1. Outside backfill mode, resolve ADR_DIR from $ADRKIT_DIR, defaulting to docs/adr.

Read the full file on GitHub · 153 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. 1mo ago Changed · +7 lines f3796c363564
  2. 1mo ago First seen · 146 lines · 25 tokens per session scan A 2a57870847b7

Subscribe to this mod's changes

adr-draft is a command published in the GitHub repository mbeacom/adrkit (20 stars, last pushed 4d ago), licensed Apache-2.0. It adds 25 tokens to every session and 1,903 once invoked, about $0.0001 per session on Opus 5.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.