agentleFS
leroyguillaumeleroyguillaume/skills/adr-conventions/SKILL.md

adr-conventions

Skill7 starsChanged 4 days agoMITView on GitHub

Architecture Decision Records in `docs/adr/`. TRIGGER when: adding or removing a component, datastore or external service (no library), changing how parts communicate, accepting an outside constraint; editing anything under `docs/adr/`; user asks whether something warrants an ADR. SKIP when: describing the system as it stands (`architecture-conventions`), or the decision leaves the architecture diagram unchanged (its reasoning goes in ARCHITECTURE.md).

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    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:

    Write one when, and only when, the diagram changes because:

    line 56
  2. Distinctive:

    Keep it to one page. Past ~150 lines it is usually several decisions wearing one number — split it.

    line 128
  3. Distinctive:

    When adopting ADRs in a repository that already exists:

    line 151
  4. Distinctive:

    write ADRs only for the architectural decisions still shaping the code, the ones people keep re-litigating — and ask the user which those …

    line 153
  5. Distinctive:

    do not invent alternatives that were never weighed — leave the section out rather than fabricate a deliberation.

    line 158
  6. Distinctive:

    Never write an ADR for a decision that leaves the architecture unchanged, and never write one unasked when the call is not clear-cut — ask …

    line 163
  7. Distinctive:

    Never edit an accepted ADR beyond its status line, a typo or a dead link — supersede it instead.

    line 165
  8. Distinctive:

    Never delete or renumber an ADR, superseded or rejected included.

    line 167
  9. Very specific:

    Never put a decision log inside ARCHITECTURE.md, and never let an ADR drift into describing the whole system.

    line 168
  10. Distinctive:

    Never ship an ADR whose Consequences section lists only upsides.

    line 170
  11. Very specific:

    Never leave docs/adr/README.md out of date with the directory.

    line 171

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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 conventions

An Architecture Decision Record captures one decision, at the moment it is taken, and is then frozen. It answers a question no other file can: what did we know, what else was on the table, and why did we pick this?

In English, like every document (documentation-conventions).

The split with ARCHITECTURE.md

These two are complementary and must not drift into each other:

ARCHITECTURE.mddocs/adr/
Tensepresent — what ispast — what was decided, then
Scopethe whole system, coherentone decision, isolated
Lifecyclerewritten as the system changesimmutable once accepted
Historyneverthat is the point

ARCHITECTURE.md is where history is banned precisely because the ADRs hold it. Without them, the pressure to narrate the past leaks into the design doc and rots it (see architecture-conventions).

A decision that changes the design updates both, in the same change: the ADR records what was decided, and ARCHITECTURE.md is rewritten to describe the new state as though it had always been that way. ARCHITECTURE.md may link an ADR as the record; it must never narrate the change.

When to write one

The hard part, and where most ADR practices die — either nobody writes any, or everything gets one and nobody reads them. The second failure is the common one, and it is the expensive one: a repository with forty ADRs has no ADRs, and since they are immutable, nobody can quietly tidy them away afterwards.

The gate is architectural impact, not interestingness. An ADR is for a decision that changes the shape of the system: what the components are, what each owns, how they talk to each other, what the whole thing depends on. The test is blunt — would someone drawing the architecture diagram have to redraw it? If not, then however good the decision is, however hard the call was, however credible the alternative, it is not an ADR.

Write one when, and only when, the diagram changes because:

  • a component, a datastore, or an external service or system the project depends on is added or removed — a library is not one;
  • how the parts talk changes — protocol, sync to async, who owns what data;
  • a constraint from outside — org policy, a platform limit, a quota, a compliance rule — forces the design to bend around it.

An ADR's diagram, when it carries one, follows diagram-conventions.

Do not write one for anything that leaves the diagram unchanged: an endpoint or a screen, a dependency bump, a refactor with no interface change, a naming or ergonomics choice, a default value, a config or file format, a CLI flag, an error-handling policy, a library picked over a near-identical one, or a deliberate deviation from one of these conventions. Those are real decisions and their reasoning is worth keeping — it goes in ARCHITECTURE.md as standing rationale, in the present tense, unless architecture-conventions sends it elsewhere (CI and contributor tooling, a repository with no code), or in a code comment where it is genuinely farfelu.

When it is not clear-cut, ask — and do not write it meanwhile. How load-bearing and how permanent a decision feels is a judgement about this project, which the user holds and the diff does not. One question costs a sentence; a directory of ADRs nobody asked for costs every future reader's attention, permanently. Never write an ADR unasked unless it is unambiguously one of the three cases above — and never, unasked, write a batch of them to document a project retrospectively.

Files

  • docs/adr/NNNN-kebab-case-title.md — four-digit zero-padded sequence from 0001, allocated in order and never renumbered, never reused. A number is a permanent address: it is cited from ARCHITECTURE.md, from commit messages, from other ADRs.
  • The title states the decision, not the topic. 0007-store-sessions-in-redis.md, not 0007-session-storage.md. Someone scanning the directory should read the decisions, not the agenda.
  • docs/adr/README.md — the index: a table of number, title and status, updated in the same change. Undiscoverable ADRs get rewritten by accident.

Template

# NNNN. <the decision, as a sentence>

- **Status**: accepted
- **Date**: YYYY-MM-DD

## Context

What forced a decision: the constraint, the problem, what was already true.
Enough that someone who was not there can weigh the options themselves — and
no more. Facts, not the narrative of the meeting.

## Decision

What was decided, in the active voice: "we store sessions in Redis". A few
lines. This is the part people come back for.

## Consequences

What this makes easy, what it makes hard, and what it commits us to. The
negative half is not optional — an ADR listing only benefits is an
advertisement, and it is the part a future reader needs most.

## Alternatives considered

Each credible option, and the specific reason it lost. "Postgres: another
service to operate for a workload that fits in memory." One or two lines
each; an option nobody seriously weighed does not belong here.

Keep it to one page. Past ~150 lines it is usually several decisions wearing one number — split it.

Status and the immutability rule

proposed → accepted → superseded by [ADR-NNNN](NNNN-….md), plus rejected for a decision that was weighed and turned down.

An accepted ADR is never edited again, except its Status line, a typo or a dead link. Not to fix the reasoning, not to add what was learned, not to reflect how things turned out. The record is of what was decided then, with what was known then; edited in place it stops being a record and becomes a second, worse ARCHITECTURE.md.

  • Changed your mind? Write a new ADR that supersedes the old one, and set the old one's status to point at it. Both stay in the tree.
  • Never delete a superseded or rejected ADR, and never renumber around a gap. The trail is the value — a rejected option that keeps coming up is answered by pointing at its ADR.

Writing them for an existing project

Retro-fitting an ADR for every past decision is fiction, and reads like it. When adopting ADRs in a repository that already exists:

  • write ADRs only for the architectural decisions still shaping the code, the ones people keep re-litigating — and ask the user which those are rather than deciding for them;
  • date them the day they are written, not the day the decision was taken, and say in the Context that the decision predates the record;
  • do not invent alternatives that were never weighed — leave the section out rather than fabricate a deliberation.

Never:

  • Never write an ADR for a decision that leaves the architecture unchanged, and never write one unasked when the call is not clear-cut — ask instead.
  • Never edit an accepted ADR beyond its status line, a typo or a dead link — supersede it instead.
  • Never delete or renumber an ADR, superseded or rejected included.
  • Never put a decision log inside ARCHITECTURE.md, and never let an ADR drift into describing the whole system.
  • Never ship an ADR whose Consequences section lists only upsides.
  • Never leave docs/adr/README.md out of date with the directory.

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.