adrinaline 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. adrinaline-0.1.0/.github/workflows/ci.yml +27 -0
  2. adrinaline-0.1.0/.github/workflows/docs.yml +30 -0
  3. adrinaline-0.1.0/.github/workflows/release.yml +47 -0
  4. adrinaline-0.1.0/.gitignore +220 -0
  5. adrinaline-0.1.0/.python-version +1 -0
  6. adrinaline-0.1.0/AGENTS.md +7 -0
  7. adrinaline-0.1.0/LICENSE +21 -0
  8. adrinaline-0.1.0/PKG-INFO +100 -0
  9. adrinaline-0.1.0/README.md +83 -0
  10. adrinaline-0.1.0/assets/adrenaline-molecule-large.png +0 -0
  11. adrinaline-0.1.0/assets/adrenaline-molecule-small.png +0 -0
  12. adrinaline-0.1.0/docs/SPEC.md +489 -0
  13. adrinaline-0.1.0/docs/adr/.template.md +18 -0
  14. adrinaline-0.1.0/docs/adr/0001-record-architecture-decisions.md +28 -0
  15. adrinaline-0.1.0/docs/adr/0002-python-with-argparse-pydantic-and-ruamel-yaml.md +24 -0
  16. adrinaline-0.1.0/docs/adr/0003-store-only-forward-relations-plus-superseded-by.md +25 -0
  17. adrinaline-0.1.0/docs/adr/0004-read-only-git-integration.md +24 -0
  18. adrinaline-0.1.0/docs/adr/0005-cli-as-the-agent-interface.md +24 -0
  19. adrinaline-0.1.0/docs/adr/0006-release-from-main-with-commitizen-and-hatch-vcs.md +28 -0
  20. adrinaline-0.1.0/docs/index.md +1 -0
  21. adrinaline-0.1.0/docs/reference.md +7 -0
  22. adrinaline-0.1.0/docs/superpowers/plans/2026-10-26-wp1-core.md +1817 -0
  23. adrinaline-0.1.0/docs/superpowers/plans/2026-10-26-wp2-graph.md +1071 -0
  24. adrinaline-0.1.0/docs/superpowers/plans/2026-10-26-wp3-git-scope.md +640 -0
  25. adrinaline-0.1.0/docs/superpowers/plans/2026-10-26-wp4-agents.md +424 -0
  26. adrinaline-0.1.0/docs/superpowers/plans/2026-10-26-wp5-release.md +372 -0
  27. adrinaline-0.1.0/pyproject.toml +61 -0
  28. adrinaline-0.1.0/src/adrinaline/__init__.py +5 -0
  29. adrinaline-0.1.0/src/adrinaline/__main__.py +3 -0
  30. adrinaline-0.1.0/src/adrinaline/check.py +155 -0
  31. adrinaline-0.1.0/src/adrinaline/cli.py +504 -0
  32. adrinaline-0.1.0/src/adrinaline/data/0001.md +27 -0
  33. adrinaline-0.1.0/src/adrinaline/data/SKILL.md +55 -0
  34. adrinaline-0.1.0/src/adrinaline/data/template.md +18 -0
  35. adrinaline-0.1.0/src/adrinaline/frontmatter.py +52 -0
  36. adrinaline-0.1.0/src/adrinaline/git.py +132 -0
  37. adrinaline-0.1.0/src/adrinaline/graph.py +256 -0
  38. adrinaline-0.1.0/src/adrinaline/model.py +147 -0
  39. adrinaline-0.1.0/src/adrinaline/output.py +78 -0
  40. adrinaline-0.1.0/src/adrinaline/prime.py +103 -0
  41. adrinaline-0.1.0/src/adrinaline/repo.py +360 -0
  42. adrinaline-0.1.0/tests/conftest.py +99 -0
  43. adrinaline-0.1.0/tests/snapshots/sample.dot +12 -0
  44. adrinaline-0.1.0/tests/snapshots/sample.mmd +15 -0
  45. adrinaline-0.1.0/tests/test_check.py +94 -0
  46. adrinaline-0.1.0/tests/test_cli_core.py +252 -0
  47. adrinaline-0.1.0/tests/test_cli_git.py +139 -0
  48. adrinaline-0.1.0/tests/test_cli_graph.py +145 -0
  49. adrinaline-0.1.0/tests/test_cli_scope.py +82 -0
  50. adrinaline-0.1.0/tests/test_frontmatter.py +57 -0
  51. adrinaline-0.1.0/tests/test_graph.py +152 -0
  52. adrinaline-0.1.0/tests/test_guards.py +47 -0
  53. adrinaline-0.1.0/tests/test_model.py +63 -0
  54. adrinaline-0.1.0/tests/test_packaging.py +18 -0
  55. adrinaline-0.1.0/tests/test_prime.py +93 -0
  56. adrinaline-0.1.0/tests/test_rank.py +62 -0
  57. adrinaline-0.1.0/tests/test_repo.py +107 -0
  58. adrinaline-0.1.0/tests/test_smoke.py +5 -0
  59. adrinaline-0.1.0/uv.lock +977 -0
  60. adrinaline-0.1.0/zensical.toml +16 -0
@@ -0,0 +1,27 @@
1
+ name: ci
2
+
3
+ # Checks run on PRs only; branch protection requires an up-to-date branch,
4
+ # so the commit that lands on main is the one that was tested.
5
+ on:
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ strategy:
11
+ matrix:
12
+ os: [ubuntu-latest, macos-latest]
13
+ runs-on: ${{ matrix.os }}
14
+ steps:
15
+ - uses: actions/checkout@v7
16
+ with:
17
+ fetch-depth: 0
18
+ - uses: astral-sh/setup-uv@v10.3.2
19
+ with:
20
+ python-version: "3.14"
21
+ - run: uv sync --locked
22
+ - run: uv run cz check --rev-range origin/${{ github.base_ref }}..HEAD
23
+ - run: uv run ruff check
24
+ - run: uv run ruff format --check
25
+ - run: uv run ty check
26
+ - run: uv run pytest -q
27
+ - run: uv run adr check --strict
@@ -0,0 +1,30 @@
1
+ name: docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths: ["docs/**", "src/**", "README.md", "zensical.toml"]
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ deploy:
15
+ environment:
16
+ name: github-pages
17
+ url: ${{ steps.deployment.outputs.page_url }}
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/configure-pages@v6
21
+ - uses: actions/checkout@v7
22
+ - uses: astral-sh/setup-uv@v10.3.2
23
+ with:
24
+ python-version: "3.14"
25
+ - run: uv run --locked --group docs zensical build --clean
26
+ - uses: actions/upload-pages-artifact@v5
27
+ with:
28
+ path: site
29
+ - uses: actions/deploy-pages@v5
30
+ id: deployment
@@ -0,0 +1,47 @@
1
+ name: release
2
+
3
+ # Every push to main releases if its commits warrant a bump (feat, fix, breaking).
4
+ # The version lives only in the git tag (hatch-vcs); nothing is committed back.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+
9
+ concurrency: release
10
+
11
+ jobs:
12
+ release:
13
+ runs-on: ubuntu-latest
14
+ environment: pypi
15
+ permissions:
16
+ contents: write
17
+ id-token: write
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ with:
21
+ fetch-depth: 0
22
+ - uses: astral-sh/setup-uv@v10.3.2
23
+ with:
24
+ python-version: "3.14"
25
+ - name: Next version
26
+ id: next
27
+ run: |
28
+ set +e
29
+ next=$(uv run cz bump --get-next --yes)
30
+ code=$?
31
+ set -e
32
+ if [ "$code" = 21 ]; then exit 0; fi # nothing to release
33
+ [ "$code" = 0 ] || exit "$code"
34
+ echo "tag=v$next" >> "$GITHUB_OUTPUT"
35
+ - if: steps.next.outputs.tag
36
+ run: git tag "${{ steps.next.outputs.tag }}"
37
+ - if: steps.next.outputs.tag
38
+ run: uv build
39
+ - if: steps.next.outputs.tag
40
+ run: uv publish
41
+ - if: steps.next.outputs.tag
42
+ env:
43
+ GH_TOKEN: ${{ github.token }}
44
+ TAG: ${{ steps.next.outputs.tag }}
45
+ run: |
46
+ git push origin "$TAG"
47
+ uv run cz changelog "$TAG" --dry-run | gh release create "$TAG" --title "$TAG" --notes-file -
@@ -0,0 +1,220 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs/Zensical documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
201
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
203
+ # could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,7 @@
1
+ # Agent instructions
2
+
3
+ - Run `adr prime` at the start of every session and follow the ADRs it lists.
4
+ - Python 3.14 with uv. Before finishing: `uv run ruff check && uv run ruff format --check && uv run ty check && uv run pytest -q`.
5
+ - The specification is `docs/SPEC.md`; implementation plans are in `docs/superpowers/plans/`.
6
+ - Work on a short-lived branch, open a PR with `gh pr create`, then `gh pr merge --auto --rebase`; it merges once CI is green. Never push to `main`.
7
+ - Commit messages are Conventional Commits and decide the next version (ADR 0006): `feat` → minor, `fix` → patch, `docs`/`ci`/`chore`/`test`/`refactor` → no release.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Max Wolf
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.5
2
+ Name: adrinaline
3
+ Version: 0.1.0
4
+ Summary: Git-native Architecture Decision Records for humans and coding agents
5
+ Project-URL: Repository, https://github.com/maximiliancw/adrinaline
6
+ Project-URL: Issues, https://github.com/maximiliancw/adrinaline/issues
7
+ Author: Max Wolf
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Environment :: Console
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Classifier: Topic :: Software Development :: Documentation
13
+ Requires-Python: >=3.14
14
+ Requires-Dist: pydantic>=2.14.1
15
+ Requires-Dist: ruamel-yaml>=0.19.1
16
+ Description-Content-Type: text/markdown
17
+
18
+ # adrinaline
19
+
20
+ ADRs in a line: git-native Architecture Decision Records for humans and coding agents.
21
+
22
+ `adr` keeps decisions as Markdown files with YAML frontmatter in your repository, numbers them sequentially, links them into a graph, ties them to the code they govern, and answers every question in plain text or JSON.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ uv tool install adrinaline # provides `adr` (and `adrinaline`)
28
+ # or run without installing:
29
+ uvx adrinaline --help
30
+ ```
31
+
32
+ Requires Python 3.14+ and git.
33
+
34
+ ## Quick start
35
+
36
+ ```bash
37
+ adr init # docs/adr/.template.md + 0001-record-architecture-decisions.md
38
+ adr new "Use PostgreSQL" --tag storage # docs/adr/0002-use-postgresql.md (proposed)
39
+ adr accept 2
40
+ adr new "Use PostgreSQL 17" --supersedes 2 --accepted
41
+ adr list
42
+ adr graph --format mermaid # paste into any GitHub/GitLab Markdown file
43
+ adr check # CI-friendly validation
44
+ ```
45
+
46
+ ## Tie decisions to code
47
+
48
+ Add `scope` globs to an ADR's frontmatter:
49
+
50
+ ```yaml
51
+ scope: ["src/db/**", "migrations/**"]
52
+ ```
53
+
54
+ Then:
55
+
56
+ ```bash
57
+ adr for src/db/pool.py # which decisions govern this file?
58
+ adr check --diff origin/main --strict # CI gate: changed files governed by ADRs in force
59
+ ```
60
+
61
+ ## History
62
+
63
+ Every read command accepts `--at REF`:
64
+
65
+ ```bash
66
+ adr list --at v1.2 --status accepted # what was in force at release 1.2?
67
+ adr log 7 # git history of ADR 0007
68
+ ```
69
+
70
+ ## For coding agents
71
+
72
+ Add one line to `AGENTS.md` (or your agent's equivalent):
73
+
74
+ ```markdown
75
+ Run `adr prime` at the start of every session and follow the ADRs it lists.
76
+ ```
77
+
78
+ `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). `adr skill` prints a skill that teaches agents when and how to write ADRs; redirect it into your agent's skill directory (for example `adr skill > .claude/skills/adr/SKILL.md`). Every command accepts `--json` and returns a stable error envelope with exit code 3 on domain errors. Global flags (`--json`, `--dir`, `-q`, `--at`) work before or after the subcommand.
79
+
80
+ ## Commands
81
+
82
+ | Command | Purpose |
83
+ |---|---|
84
+ | `adr init` | Create the ADR directory, template and ADR 0001 |
85
+ | `adr new TITLE` | Create an ADR (`--supersedes`, `--amends`, `--depends-on`, `--relates-to`, `--body-file -`) |
86
+ | `adr show REF` / `adr list` / `adr index` | Read ADRs |
87
+ | `adr accept` / `reject` / `deprecate` / `supersede` | Change status |
88
+ | `adr link` / `unlink` | Manage relations |
89
+ | `adr graph [REF]` | Text, Mermaid, DOT or JSON graph; `--reverse` for impact, `--rank` for keystones (text or JSON only) |
90
+ | `adr for PATH` | ADRs governing a file |
91
+ | `adr check` | Validate everything |
92
+ | `adr renumber REF --to N` | Fix numbering collisions after merges |
93
+ | `adr log REF` | Git history of an ADR |
94
+ | `adr prime` / `adr skill` | Agent briefing and skill |
95
+
96
+ The full specification is in [docs/SPEC.md](docs/SPEC.md).
97
+
98
+ ## Licence
99
+
100
+ MIT
@@ -0,0 +1,83 @@
1
+ # adrinaline
2
+
3
+ ADRs in a line: git-native Architecture Decision Records for humans and coding agents.
4
+
5
+ `adr` keeps decisions as Markdown files with YAML frontmatter in your repository, numbers them sequentially, links them into a graph, ties them to the code they govern, and answers every question in plain text or JSON.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ uv tool install adrinaline # provides `adr` (and `adrinaline`)
11
+ # or run without installing:
12
+ uvx adrinaline --help
13
+ ```
14
+
15
+ Requires Python 3.14+ and git.
16
+
17
+ ## Quick start
18
+
19
+ ```bash
20
+ adr init # docs/adr/.template.md + 0001-record-architecture-decisions.md
21
+ adr new "Use PostgreSQL" --tag storage # docs/adr/0002-use-postgresql.md (proposed)
22
+ adr accept 2
23
+ adr new "Use PostgreSQL 17" --supersedes 2 --accepted
24
+ adr list
25
+ adr graph --format mermaid # paste into any GitHub/GitLab Markdown file
26
+ adr check # CI-friendly validation
27
+ ```
28
+
29
+ ## Tie decisions to code
30
+
31
+ Add `scope` globs to an ADR's frontmatter:
32
+
33
+ ```yaml
34
+ scope: ["src/db/**", "migrations/**"]
35
+ ```
36
+
37
+ Then:
38
+
39
+ ```bash
40
+ adr for src/db/pool.py # which decisions govern this file?
41
+ adr check --diff origin/main --strict # CI gate: changed files governed by ADRs in force
42
+ ```
43
+
44
+ ## History
45
+
46
+ Every read command accepts `--at REF`:
47
+
48
+ ```bash
49
+ adr list --at v1.2 --status accepted # what was in force at release 1.2?
50
+ adr log 7 # git history of ADR 0007
51
+ ```
52
+
53
+ ## For coding agents
54
+
55
+ Add one line to `AGENTS.md` (or your agent's equivalent):
56
+
57
+ ```markdown
58
+ Run `adr prime` at the start of every session and follow the ADRs it lists.
59
+ ```
60
+
61
+ `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). `adr skill` prints a skill that teaches agents when and how to write ADRs; redirect it into your agent's skill directory (for example `adr skill > .claude/skills/adr/SKILL.md`). Every command accepts `--json` and returns a stable error envelope with exit code 3 on domain errors. Global flags (`--json`, `--dir`, `-q`, `--at`) work before or after the subcommand.
62
+
63
+ ## Commands
64
+
65
+ | Command | Purpose |
66
+ |---|---|
67
+ | `adr init` | Create the ADR directory, template and ADR 0001 |
68
+ | `adr new TITLE` | Create an ADR (`--supersedes`, `--amends`, `--depends-on`, `--relates-to`, `--body-file -`) |
69
+ | `adr show REF` / `adr list` / `adr index` | Read ADRs |
70
+ | `adr accept` / `reject` / `deprecate` / `supersede` | Change status |
71
+ | `adr link` / `unlink` | Manage relations |
72
+ | `adr graph [REF]` | Text, Mermaid, DOT or JSON graph; `--reverse` for impact, `--rank` for keystones (text or JSON only) |
73
+ | `adr for PATH` | ADRs governing a file |
74
+ | `adr check` | Validate everything |
75
+ | `adr renumber REF --to N` | Fix numbering collisions after merges |
76
+ | `adr log REF` | Git history of an ADR |
77
+ | `adr prime` / `adr skill` | Agent briefing and skill |
78
+
79
+ The full specification is in [docs/SPEC.md](docs/SPEC.md).
80
+
81
+ ## Licence
82
+
83
+ MIT