adr-new

A guided command for recording a long-lasting software architecture decision in an Architecture Decision Record, or ADR. An ADR explains what was decided, why it was chosen, and what alternatives were considered.

In plain words
What is it for?
Use it to create a new decision record in the project's designated documentation folder after confirming the decision affects multiple parts of the system and is expected to last.
Why use it?
It helps preserve the reasoning behind cross-cutting decisions so future developers do not have to reconstruct it from old pull requests. It also checks whether an ADR is appropriate before creating one.

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/mendixlabs/mxcli/adr-new
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code.

Per session 13 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,203 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.00013 $0.01203
Opus 5 $0.00006 $0.00602
Sonnet 5 $0.00003 $0.00241
Haiku 4.5 $0.00001 $0.00120

Measured yesterday against content hash 1ea17330a1a3, 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 yesterday.

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/mxcli-dev/adr-new.md · 144 lines

How it starts

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

/mxcli-dev:adr-new — Create a New Architecture Decision Record

Guide the contributor through writing a new ADR in docs/13-decisions/.

Read docs/13-decisions/README.md first. It defines the template, the naming convention, the when-to-write checklist, and the immutability rules. This command is the workflow; the README is the contract.

Process

Phase 1: Confirm an ADR is the right home

Ask the user:

  1. What decision are you recording? (one sentence)
  2. Is it cross-cutting? Does it shape more than one feature?
  3. Is it durable? Expected to hold for years, not weeks?
  4. Would the why be hard to reconstruct from PR history later?

If any answer is "no", route to the correct artifact:

If... Use instead
Feature-specific design /mxcli-dev:proposal
Active rule for everyday work Add a line to CLAUDE.md
Step-by-step procedure A skill in .claude/skills/
Synthesized current model A wiki page (use /mxcli-dev:wiki-sync after)

Do not write an ADR for trivia. The README's checklist exists to prevent the folder from filling with low-value records.

Phase 2: Check for existing ADRs

ls docs/13-decisions/
grep -l "<topic keyword>" docs/13-decisions/

Specifically:

  • Is there an ADR on this topic already? If so, does the user want to supersede it (new decision changes the previous one) or amend it (the existing one is fine, no new ADR needed)?
  • Is the topic listed in the README's "Candidates to back-fill"? If so, remove that bullet when you create the ADR.

Phase 3: Investigate the decision

Before drafting, gather context:

  1. What forces are at play? Performance, compatibility, ergonomics, external constraints (Mendix versions, library availability)?
  2. What alternatives were on the table? A good ADR documents the roads not taken, with one sentence each on why they were rejected.
  3. Who is affected? Contributors, end users, both?
  4. What evidence supports the decision? Link to proposals, PRs, benchmarks, prior bugs.

Read the full file on GitHub · 144 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. yesterday First seen · 144 lines · 13 tokens per session scan A 1ea17330a1a3

Subscribe to this mod's changes

adr-new is a command published in the GitHub repository mendixlabs/mxcli (115 stars, last pushed 2d ago), licensed Apache-2.0. It adds 13 tokens to every session and 1,203 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.