Enforce Architecture Decision Records as executable rules — for both humans and AI agents
Project description
Archgate
Archgate turns your Architecture Decision Records into a governance layer that runs in CI, enforces rules in pre-commit hooks, and feeds live context to AI coding agents — so architectural decisions don't stay in documents, they stay in the code.
Write an ADR once. Enforce it everywhere.
How it works
Archgate has two layers:
- ADRs as documents — markdown files with YAML frontmatter stored in
.archgate/adrs/. Each ADR records a decision: what was decided, why, and what to do and not do. - ADRs as rules — each ADR can have a companion
.rules.tsfile that exports automated checks. Archgate runs these checks against your codebase and reports violations.
.archgate/
└── adrs/
├── ARCH-001-command-structure.md # human-readable decision
├── ARCH-001-command-structure.rules.ts # machine-executable checks
├── ARCH-002-error-handling.md
└── ARCH-002-error-handling.rules.ts
When a rule is violated, archgate check reports the file, line, and which ADR was broken. Exit code 1 means violations — wire it into CI and it blocks merges automatically.
The CLI is free and open source. Writing ADRs, enforcing rules, running checks in CI, and wiring up pre-commit hooks all work without an account or subscription.
Installation
Install via standalone script, npm, pip, dotnet, Go, gem, Maven, or proto. See the installation guide for all options and platform support.
Quick start
# 1. Initialize governance in your project
cd my-project
archgate init
# 2. Edit the generated ADR to document a real decision
# .archgate/adrs/ARCH-001-*.md
# 3. Add a companion .rules.ts to enforce it automatically
# .archgate/adrs/ARCH-001-*.rules.ts
# 4. Run checks
archgate check
Writing rules
Each ADR can have a companion .rules.ts file that exports automated checks. See the writing rules guide for examples and the full rule API reference.
Supercharge with AI plugins
Make your AI agent architecture-aware. With the optional editor plugins, your AI coding agent reads ADRs before writing code, validates changes against your rules, and captures new architectural patterns back into ADRs — automatically.
Plugins are available for Claude Code and Cursor.
archgate login # one-time GitHub auth archgate init # installs the plugin automaticallyGet started with plugins — the CLI works fully without them, but plugins close the loop between decisions and code.
Documentation
Full documentation is available at cli.archgate.dev — including guides for writing ADRs, writing rules, CI integration, editor plugin setup, and the complete CLI reference.
Contributing
See CONTRIBUTING.md for development setup and workflow.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file archgate-0.45.2.tar.gz.
File metadata
- Download URL: archgate-0.45.2.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82304f9dc2c672fea43ce146e26d1d3f20d38b299427aa6651415c75a03104dc
|
|
| MD5 |
62296bee2da4cd217bed547662259ecd
|
|
| BLAKE2b-256 |
76050b4aa5a74d59bc7e1b364faae862a2e58c18fbe7968696a797f9225b3ed3
|
Provenance
The following attestation bundles were made for archgate-0.45.2.tar.gz:
Publisher:
publish-shims.yml on archgate/cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archgate-0.45.2.tar.gz -
Subject digest:
82304f9dc2c672fea43ce146e26d1d3f20d38b299427aa6651415c75a03104dc - Sigstore transparency entry: 1790215305
- Sigstore integration time:
-
Permalink:
archgate/cli@cb8d3d6de135efc1e8cce92f10752658ef3c4aa7 -
Branch / Tag:
refs/tags/v0.45.2 - Owner: https://github.com/archgate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-shims.yml@cb8d3d6de135efc1e8cce92f10752658ef3c4aa7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file archgate-0.45.2-py3-none-any.whl.
File metadata
- Download URL: archgate-0.45.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
578db684bca31d59a3c140c18af83aa004ac9d12cc1de1400facbd11f5022ddb
|
|
| MD5 |
bd65812725967973910c18e61e7bde77
|
|
| BLAKE2b-256 |
c0fb59c5d0d7ec65c865994f4aac7547d25223eda1eabb48434438f7dedc2618
|
Provenance
The following attestation bundles were made for archgate-0.45.2-py3-none-any.whl:
Publisher:
publish-shims.yml on archgate/cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archgate-0.45.2-py3-none-any.whl -
Subject digest:
578db684bca31d59a3c140c18af83aa004ac9d12cc1de1400facbd11f5022ddb - Sigstore transparency entry: 1790215320
- Sigstore integration time:
-
Permalink:
archgate/cli@cb8d3d6de135efc1e8cce92f10752658ef3c4aa7 -
Branch / Tag:
refs/tags/v0.45.2 - Owner: https://github.com/archgate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-shims.yml@cb8d3d6de135efc1e8cce92f10752658ef3c4aa7 -
Trigger Event:
release
-
Statement type: