agentleFS
ivanrvpereiraivanrvpereira/.agents/skills/auto/adr-writing/SKILL.md

adr-writing

Skill18 starsChanged 3 months agoApache-2.0View on GitHub

Write and maintain high-signal, low-noise ADRs. Use when writing or revising an ADR, amending or superseding old ADRs after a decision changes, recording a rejected alternative, or deciding where a decision, prohibition, or rule should live (ADR vs spec vs AGENTS.md).

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After any decision changes, grep all docs for names of the removed/changed thing.

    line 17
  2. Distinctive:

    Before writing any "never", ask which kind it is.

    line 24
  3. Distinctive:

    State what the decision breaks: If it invalidates an earlier ADR's headline claim, name the claim and write its honest, weaker replacement.

    line 30
  4. Very specific:

    Before: *"6. undo_mail_operation(operation_id) — considered and dropped.

    line 41
  5. Distinctive:

    After: *"6. Undo. Not built now: a second mutation path to secure, repairing a failure a human fixes in one drag.

    line 42
  6. Very specific:

    Never rewrite an ADR's body: Add a header note: Superseded in part by ADR-NNNN (date): stating *what survives* and *what no longer holds*.

    line 46
  7. Distinctive:

    Update the ADR index (statuses, titles).

    line 48
  8. Distinctive:

    When an ADR accumulates so many amendment breadcrumbs that current truth requires diffing prose, write one fresh superseding ADR and mark …

    line 49
  9. Distinctive:

    Delete every sentence that doesn't change what a reader would do or believe.

    line 53

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ADR Writing

ADRs record decisions and their reasoning. Everything else is noise that misleads future readers — especially agents, which pattern-match documented names as things to implement and stale claims as current truth.

For when a decision deserves an ADR and the minimal template, see ../domain-modeling/ADR-FORMAT.md (hard to reverse + surprising + real trade-off). This skill is about what goes in, what stays out, and how ADRs age.

Two document types — never mixed

  • ADRs are history. Append-only. They may discuss the past, rejected options, and superseded claims.
  • Specs, AGENTS.md, README are current truth. Present tense only. What exists, what the rules are. No "we used to", no "we considered", no removed features. If a current-truth doc needs history, that history belongs in an ADR and the doc gets a link at most.

After any decision changes, grep all docs for names of the removed/changed thing. A dead feature mentioned in a spec is a bug.

Two kinds of hard lines — always distinguish

  1. Invariants — rules that are the product (security guarantees, data-safety, "never send", "never log content"). Keep them hard. State them with the rationale inline, enforce them in CI or tests, and list them in AGENTS.md Never/Ask First. A rule without a stated why reads as arbitrary and gets "fixed".
  2. Process fencing — "rejected forever", "must get its own ADR first", "revisit only with data". Calibrate to the project: in an early-stage project with one present decider, soften to open doors ("not built now; nothing forecloses it") — re-proposing is how steering works there. In a mature or multi-team project, fencing earns its keep.

Before writing any "never", ask which kind it is.

Writing the ADR

  • Lead with the forcing constraint. The fact that makes the decision shaped the way it is (a platform limitation, a cost profile, a threat model). Every downstream choice should visibly flow from it.
  • Stratify guarantees by enforcement layer. "Impossible" enforced by a platform/credential is not the same claim as "impossible" enforced by your own code + CI. Conflating them is the most dangerous kind of noise. Say which layer enforces each guarantee.
  • State what the decision breaks. If it invalidates an earlier ADR's headline claim, name the claim and write its honest, weaker replacement. Accepting a loss explicitly beats papering over it.
  • State residual risks plainly. "Accepted residual risks:" with the mitigation for each. An ADR that lists no downsides wasn't thought through — or is hiding them.
  • No implementation mechanics. HTTP snippets, SQL DDL, config examples, test matrices, delivery order, effort estimates — those live in build briefs and specs. The ADR records decisions, forcing facts, trade-offs.
  • Sections: Status/Date/Kind header → Context (forcing facts) → Decision (numbered) → Alternatives considered → Consequences.

Rejected alternatives

  • One–two sentences each: what it was, why it lost. Give the strongest competitor honest treatment, including what it did better.
  • Never include API signatures, schemas, or design detail of dead things. An agent grepping later finds undo_operation(id) in a doc and reads it as a spec. Name the idea, not its interface.
  • Record a rejection only when someone would plausibly re-propose it without the context. Otherwise skip it.

Before: "6. undo_mail_operation(operation_id) — considered and dropped. A faithful undo needs retention windows, consumer-scoped eligibility, external-move conflict detection… Revisit with usage data." After: "6. Undo. Not built now: a second mutation path to secure, repairing a failure a human fixes in one drag. Nothing forecloses it later."

When decisions change

  • Never rewrite an ADR's body. Add a header note: **Superseded in part by [ADR-NNNN](…)** (date): stating what survives and what no longer holds. ADR bodies are the historical record; the header is where current validity lives.
  • Any ADR whose headline claim is now false must get a note. A reader who opens it cold must not walk away believing the stale claim.
  • Update the ADR index (statuses, titles).
  • When an ADR accumulates so many amendment breadcrumbs that current truth requires diffing prose, write one fresh superseding ADR and mark the old chain superseded.

Final pass

Delete every sentence that doesn't change what a reader would do or believe. If the ADR is longer than the decision warrants, the extra length is where future confusion will live.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.