Skip to content

Decisions (ADRs)

Hard-to-reverse or cross-cutting choices are recorded as Architecture Decision Records (ADRs). In a managed product repo, ADRs live in the /spec spine; for the plugin itself, decisions are captured in CHANGELOG.md and PRs.

When to write an ADR

The bar is reversal cost, not novelty. Use /steer:spec adr when undoing the choice later would mean changing work built on top of it - stack, database, auth, deployment, tenancy model - or when asked to record a decision.

The mode needs the spine to exist first: invoked outside a bootstrap on a repo with no spec/.version, it stops and routes to /steer:setup rather than writing an ADR with nowhere to put it. A bootstrap that invokes it mid-run is exempt - the spine is being installed around it.

A first-time pattern is not an ADR. Used in one place it is a contract.md line; it earns an ADR when a third use makes it the house style. In a young codebase almost every pattern is new, so treating novelty as the trigger turns ordinary work into a decision record nobody reads. The practical test: if you cannot name the work a reversal would force you to redo, it is not an ADR yet.

flowchart TD
    Q{"Would reversing it mean
    redoing work built on top?"} -->|No| SKIP[No ADR needed]
    Q -->|Yes| PROPOSED[ADR: Proposed]
    PROPOSED --> REVIEW{Ratified by a human?}
    REVIEW -->|Yes| ACCEPTED[ADR: Accepted]
    REVIEW -->|Superseded later| SUPERSEDED[ADR: Superseded]

ADR status

New ADRs default to Proposed - the fixture suite asserts this. An ADR becomes Accepted only on an explicit human decision.

That decision is answerable in-session. Having drafted and grounded an ADR, /steer:spec adr offers the three-option gate prompt (Approve / Reject / Decide later) carrying the ADR's rejected alternatives and negative consequences. On Approve it runs /steer:spec adr accept <n>, the single writer of Proposed -> Accepted, which stamps > Ratified by: / > Ratified at: / > Ratified via: (in-session or offline-review) and writes one /spec/history/ entry file. A Decider ratifying an ADR drafted in an earlier session invokes accept <n> directly. Decide later changes nothing, so an undecided ADR is never worse off. Self-ratification is legitimate - in a solo repo the author and decider are the same person, and the channel stamp is what keeps it auditable. See rule 61-gates and /steer:reference gates.

Grounding happens in the drafting flow, before the prompt: /steer:spec adr finds every place a setting, secret or role the decision changes is set or read, checks the paths and identifiers it cites, replaces citations of superseded ADRs, and for a high-risk decision runs one stress-test question round with the dev. A direct adr accept <n> does not re-ground.

ADRs and the tracker

An ADR's > Tracker: line names the issue where its decision was worked out (or none). Accepting the ADR closes that issue as completed, through the closing ref of the PR (or solo-trunk commit) that lands the acceptance. Superseding an ADR lists the old one's open issues - its own > Tracker: issue plus any that cite it by file stem or ADR NNNN - and proposes, once, to close each as superseded or keep it with a comment pointing at the replacement.

Anything that path misses - an ADR edited by hand, one written before the field existed, a Deprecated one - is caught by /steer:work issues reconcile --all, which proposes closing an accepted ADR's still-open > Tracker: issue, and a close or a keep-with-comment for open issues tied to a superseded or deprecated ADR. See Issues.

No ADR from inference

Reverse-engineering skills (/steer:setup adopt) must never infer a ratified ADR from code. An ADR records a decision a human made; the as-built spine records what exists. See Product spine.

Plugin-level decisions

ADRs are an artifact of the /spec spine in a managed product repo. The e22-plugins repo itself keeps no ADR log: changes to the plugin's own behavior are recorded as a changelog fragment under .changes/unreleased/, with the rationale - alternatives, consequences, what was rejected - in the PR description. See Release process.

A decision too large for a PR description is a signal to split the PR, not to introduce a record type. Adding a decision log for the plugin would be a change to how the repo works, so it goes through a convention-only PR first - see CONTRIBUTING.md -> "Working in this repo".