adr-me
Use an AI agent to document architecture decisions, system architecture, and codebase rules, and to review code changes against them.
What Is This?
adr-me includes four skills with templates and validators.
- create-adr-md records accepted technical decisions in Architecture Decision Records (ADRs).
- create-update-architecture-md describes the current system in
ARCHITECTURE.md.
- extract-codebase-rules documents technical constraints in
CONSTRAINTS.md and recurring practices in CONVENTIONS.md. It generates brief (default), standard, or full reports.
- review-architecture-compliance reviews source code changes against the ADRs,
ARCHITECTURE.md, CONSTRAINTS.md, and CONVENTIONS.md. It reports each result with a documented requirement and implementation evidence. The engineer keeps all decisions.
Features
- Record technical decisions in
ADR.md from an agent session or Git history.
- Link
ADR.md to implementation commits and source symbols.
- Create
ARCHITECTURE.md from an agent session or Git history.
- Create and update
ARCHITECTURE.md with source links and PlantUML context and component diagrams.
- Analyzing the code base to identify constraints, conventions/rules, and create the
CONSTRAINTS.md and CONVENTIONS.md documents.
- Review code changes against
ADR.md, ARCHITECTURE.md, CONSTRAINTS.md, and CONVENTIONS.md. Report violations, deviations, conflicts, and unknown results with requirement and source references.
- Check
ADR.md and ARCHITECTURE.md documents structure, source references, and ADR.md commit links.
- Check
ADR.md and ARCHITECTURE.md documents before pushes to main.
- Report
ADR.md and ARCHITECTURE.md validation issues and code commits without valid ADR.md links as warnings in GitHub Actions.
Who is it for?
Developers and engineers who use agents in their work, but don’t want to lose control over the decisions made and what is happening with their system overall.
How to install
The installer requires Node.js 22 or later on macOS, Linux, or Windows.
Git is required for project installation, hooks, and GitHub Actions.
The installed validators need no npm packages.
For a published npm release, run the wizard from the target repository or any of its subdirectories:
npx adr-me
Or install directly from GitHub:
npx --package=github:Krusty84/adr-me adr-me
You can also download a package archive from GitHub Releases.
Select one or more agents, the installation scope, and All or one skill. Project installation and all skills are the defaults. Skill directories contain the instructions, scripts, templates, and references, tests are excluded.
| Agent |
Project |
Global |
| Codex |
.agents/skills/ |
~/.codex/skills/ |
| OpenCode |
.opencode/skills/ |
~/.config/opencode/skills/ |
| Claude Code |
.claude/skills/ |
~/.claude/skills/ |
| ZCode |
.zcode/skills/ |
~/.zcode/skills/ |
Project installation uses the Git repository root. Outside a Git working tree, only global skills are available. The wizard requires an interactive terminal. Cancellation during questions writes no files.
Existing files are kept. Identical files are skipped. A conflicting file skips the whole skill for that agent. Other components can still install. Repeating the same choices adds only missing files, changing existing generated files requires manual conflict resolution. The summary lists installed and skipped components, conflicts, and files to commit. The installer does not stage, commit, or push.
ADR.md validation requires a configured Git remote and the implementation commits in local history.
Install PlantUML (optional)
PlantUML is optional. Make plantuml available on PATH to check diagram syntax. Without it, the architecture validator checks the document and reports that diagram syntax was not checked.
macOS: With Homebrew installed, run:
brew install plantuml
plantuml -version
Linux (Debian/Ubuntu): Install PlantUML and Graphviz:
sudo apt update
sudo apt install plantuml graphviz
plantuml -version
These packages include the required Java dependencies. For other distributions or newer versions, follow the official installation guide. Prefer PlantUML 1.2026.4 or newer, older versions produce a validator warning.
Windows: With Chocolatey installed, open PowerShell as Administrator and run:
choco install plantuml -y
Open a new PowerShell window and check the console command:
plantumlc -version
Chocolatey uses plantumlc for console operations. adr-me runs on Windows natively the architecture validator calls plantumlc there. WSL remains an alternative if you prefer the Linux toolchain.
Optional push checks
Git pre-push and GitHub Actions checks are optional and off by default. Enable them independently in the wizard. Their shared scripts and resources use .github/scripts/adr-me/. Commit this directory and the selected workflow. See setup instructions.
How to use
Tell the agent to read the required skill’s SKILL.md. Example requests:
Use create-adr-md to record the accepted decision from this session.
Use create-update-architecture-md to describe the current system in docs/ARCHITECTURE.md
Use extract-codebase-rules to inspect the whole repository and summarize its constraints and conventions in docs/CONSTRAINTS.md and docs/CONVENTIONS.md.
Use extract-codebase-rules full to record the CONSTRAINTS and CONVENTIONS with complete evidence, implications, and rationale.
Use review-architecture-compliance to review my uncommitted changes against the documented architecture.
Use review-architecture-compliance to review the last three commits against the ADRs and the constraints.
extract-codebase-rules accepts one detail level: brief (the default), standard, or full. A missing level gives brief.
review-architecture-compliance reviews unstaged, staged, or all uncommitted changes, one commit, a commit range, or a branch against its base branch. Without a scope, it reviews all uncommitted changes, or the latest commit when the working tree is clean. The report lists each result with a documented requirement and implementation evidence. It is shown in the conversation and is saved as ARCHITECTURE-COMPLIANCE-REVIEW.md only on request. Reviews run only on request the skill is not part of the push checks.
ADR.md use docs/adr/NNNN-short-title.md. New architecture documents use docs/ARCHITECTURE.md existing documents keep their current path.
Validate documents after each change. Review facts and ASD-STE100 style separately.
See ADR and ARCHITECTURE workflows and push checks for validation commands.
评论