Skip to main content

adrinaline: Git-native Architecture Decision Records for humans and coding agents

CI PyPI Python OpenSSF Scorecard

Why

An Architecture Decision Record (ADR) is a short file that records one significant decision, the options considered and the consequences. Keeping them next to the code means new team members and coding agents can see why things are the way they are.

  • One command bootstraps the practice: adr init.
  • Plain Markdown with YAML frontmatter; hand edits stay first-class.
  • Sequential numbering, with collisions between branches detected early.
  • adr check validates the set in CI or pre-commit.
  • Read-only git integration: it never stages, commits or fetches.
  • The ADR set is a graph (text, Mermaid, DOT, JSON), tied to code via scope globs and queryable at any git revision.
  • Every command has --json; adr prime briefs an agent at session start.
adrinaline adr-tools log4brains MADR
What it is Python CLI Shell scripts Node CLI + static site Template only
Create, link, supersede yes yes create from template no CLI
Validation for CI (adr check) yes no no no
Decision graph export text, Mermaid, DOT, JSON graph generation web UI no
Agent briefing (adr prime) yes no no no

Cells for the other tools reflect their READMEs; "no" means the feature is not documented there.

Install

uv tool install adrinaline   # provides `adr` (and `adrinaline`)
# or run without installing:
uvx adrinaline --help
# or:
pipx install adrinaline

Requires git. Python 3.14+ is needed; uv tool install and uvx download it automatically if it is missing.

Quick start

adr init                                   # docs/adr/.template.md + 0001-record-architecture-decisions.md
adr new "Use PostgreSQL" --tag storage --scope "src/db/**"  # docs/adr/0002-use-postgresql.md (proposed)
adr accept 2
adr new "Use PostgreSQL 17" --supersedes 2 --accepted
adr list
adr graph --format mermaid                 # paste into any GitHub/GitLab Markdown file
adr check                                  # CI-friendly validation

An ADR is a Markdown file with frontmatter (docs/adr/0003-use-postgresql-17.md):

---
status: accepted
date: YYYY-MM-DD
supersedes: [2]
---
# Use PostgreSQL 17

## Context and Problem Statement

## Considered Options

## Decision Outcome

Chosen option: "…", because …

### Consequences

* Good, because …
* Bad, because …

Status lifecycle

Statuses: proposed, accepted, rejected, deprecated, superseded.

From To Command
(new) proposed adr new
(new) accepted adr new --accepted
proposed accepted adr accept
proposed rejected adr reject
accepted deprecated adr deprecate
accepted superseded adr supersede

Example output

adr list:

0001  accepted    YYYY-MM-DD  Record architecture decisions
0002  superseded  YYYY-MM-DD  Use PostgreSQL
0003  accepted    YYYY-MM-DD  Use PostgreSQL 17

adr prime --budget 150 (shortened):

# ADR briefing

ADRs live in `docs/adr`: 2 accepted, 1 superseded.

## Decisions in force

- 0001 Record architecture decisions
- 0003 Use PostgreSQL 17

## Proposed

None.

adr graph --format mermaid:

flowchart LR
  A1["0001 Record architecture decisions"]:::accepted
  A2["0002 Use PostgreSQL"]:::superseded
  A3["0003 Use PostgreSQL 17"]:::accepted
  A3 -->|supersedes| A2
  classDef proposed fill:#fff4cc
  classDef accepted fill:#d9f2d9
  classDef rejected fill:#f2d9d9
  classDef deprecated fill:#e6e6e6
  classDef superseded fill:#e6e6e6,stroke-dasharray:4 2
  classDef missing fill:#ffffff,stroke-dasharray:2 2

Tie decisions to code

Add scope globs to an ADR's frontmatter:

scope: ["src/db/**", "migrations/**"]

Then:

adr for src/db/pool.py                     # which decisions govern this file?
adr check --diff origin/main --strict      # CI gate: changed files governed by ADRs in force

CI

- uses: actions/checkout@v7
  with:
    fetch-depth: 0   # shallow or fresh clones lack origin/main history, so --diff fails
- uses: astral-sh/setup-uv@v10.3.3
- run: uvx adrinaline check --diff origin/main --strict

Exit codes: 0 success, 1 check found problems, 2 usage error, 3 domain error (for example not-found or no-adr-dir).

History

Every read command accepts --at REF:

adr list --at v1.2 --status accepted       # what was in force at release 1.2?
adr log 7                                  # git history of ADR 0007

Git access is read-only, and adr log only sees committed changes, so commit first.

For coding agents

Install the skill, which teaches agents when and how to write ADRs:

Agent Install
Claude Code adr skill --install .claude/skills/adr
Codex adr skill --install .agents/skills/adr
Cursor adr skill --install .cursor/skills/adr (also reads AGENTS.md)
GitHub Copilot adr skill --install .github/skills/adr

Codex, Cursor and Copilot all read .agents/skills/, so one install there covers all three. Rerun the install after upgrading adr.

Or add one line to AGENTS.md (or your agent's equivalent):

Run `adr prime` at the start of every session and follow the ADRs it lists.

adr prime --budget 400 limits the briefing to about 400 words, picking the most important and most relevant decisions first (the top-scored ADR is always shown). Agents create ADRs as proposed; humans accept them. Every command accepts --json.

Commands

Command What it does
init create the ADR directory, template and ADR 0001
new create a new ADR
show show one ADR
list list ADRs
index print a Markdown index table
accept / reject / deprecate set an ADR's status
supersede mark OLD as superseded by NEW
link / unlink add or remove a relation
graph render the ADR graph
renumber give an ADR a new number and update references
log show the git history of an ADR
for list the ADRs in force that govern each path
check validate all ADRs
prime print the agent briefing
skill print or install the bundled agent skill

Full documentation: https://maximiliancw.github.io/adrinaline/. Changelog: GitHub Releases. This repo's own decisions are in docs/adr/.

License

MIT

Metadata

Release files for adrinaline 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adrinaline 0.3.1
File Size Uploaded Provenance Actions
adrinaline-0.3.1.tar.gz 173.7 kB Without provenance Details for adrinaline-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adrinaline 0.3.1
File Interpreter ABI Platform Actions
adrinaline-0.3.1-py3-none-any.whl Python 3 none any Details for adrinaline-0.3.1-py3-none-any.whl

Total release size: 207.5 kB

Release files / adrinaline-0.3.1.tar.gz

Download URL adrinaline-0.3.1.tar.gz
Size 173.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3f759ed0a5033affe0cf46212e5278cd70af4ae013070d13f553769b59ba5e3e
BLAKE2b-256 checksum
How to use checksums
bfdfa5b95343cfebe3222b80220251a0b1a736282686df09cfc84549d2417526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / adrinaline-0.3.1-py3-none-any.whl

Download URL adrinaline-0.3.1-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
468eca57ec60ed28501323f00cd12dc53114d7ab7c593598072239721cda8d3f
BLAKE2b-256 checksum
How to use checksums
de54156e96743d576974bd3a3106a385ea7112473fa8e62a11c0dd9d9598b984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for adrinaline 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page