create-adr

An Architecture Decision Record creator for md.html. An Architecture Decision Record is a short document that records an important technical choice, its alternatives, and its consequences.

In plain words
What is it for?
Creating numbered records in docs/adr/ for decisions about dependencies, storage, platforms, core abstractions, hosting, secrets, and cross-cutting project patterns.
Why use it?
It helps future contributors understand why structural decisions were made instead of having to reconstruct that history from code or old discussions.

Command for Claude Code

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/feliperun/md.html/create-adr
Clone the repo
git clone --depth 1 https://github.com/feliperun/md.html

Made for: Claude Code.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 689 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.00011 $0.00689
Opus 5 $0.00005 $0.00345
Sonnet 5 $0.00002 $0.00138
Haiku 4.5 $0.00001 $0.00069

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

Security

Grade A, and why

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

.claude/commands/create-adr.md · 45 lines

What it actually says

Create a new ADR in docs/adr/ documenting a structural decision for md.html.

Steps

  1. Read docs/adr/README.md for the format, lifecycle rules, and the current index. Note the next available number (max existing + 1, four-digit zero-padded).

  2. Confirm the decision is ADR-worthy. ADRs document:

    • New dependencies that change the surface area (new backend, new external service, new provider).
    • Storage strategy or schema convention changes.
    • New platform target or distribution channel.
    • Core abstractions (new trait/protocol, new domain model, change to a central store).
    • Hosting or secrets strategy changes.
    • Cross-cutting patterns future contributors must follow.

    ADRs do not document bug fixes, behavior-preserving refactors, dependency version bumps, or formatting changes. If the change is one of those, do not create an ADR — explain why and stop.

  3. Gather the inputs before writing. Ask the user (or read context) for:

    • A short title (≤ 70 chars).
    • The forces / constraints that led to the decision (context).
    • The decision in one or two sentences.
    • At least two alternatives considered, with the chosen one marked.
    • Consequences — what gets easier, what gets harder, what invariants the codebase must now hold, what would trigger re-evaluation.
  4. Create the file at docs/adr/NNNN-short-title.md using the template from docs/adr/0000-template.md. Use kebab-case for the slug. Frontmatter:

    • id: "NNNN" (four-digit, quoted)
    • status: active (new ADRs default to active when the decision has been made; use proposed only if it's still under discussion)
    • date: YYYY-MM-DD (today)
    • Omit superseded_by unless this ADR supersedes a previous one (in which case also update the previous ADR to status: superseded + superseded_by link in the same commit).
  5. Update the index in docs/adr/README.md: add a row to the index table at the bottom in numeric order.

  6. Update docs/ARCHITECTURE.md if the decision changes the active architecture state. ARCHITECTURE.md reflects active decisions only — a superseded decision must be replaced, not appended.

  7. Commit in a single Conventional Commit with the rest of the change that implements the decision:

    docs(adr): NNNN <short title>
    

    or as part of a feat: / refactor: commit if landing the implementation in the same change.

  8. Never edit an active ADR. If the decision changes, create a new ADR that supersedes the previous one and update the previous ADR's frontmatter only to record status: superseded and superseded_by.

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 · 45 lines · 11 tokens per session scan A ae052f23ce76

Subscribe to this mod's changes

create-adr is a command published in the GitHub repository feliperun/md.html (11 stars, last pushed 7d ago), licensed MIT. It adds 11 tokens to every session and 689 once invoked, about $0.0001 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.