Skip to main content

Enforce Architecture Decision Records as executable rules — for both humans and AI agents

Project description

Archgate

Enforce Architecture Decision Records as executable rules — for both humans and AI agents.

License: Apache-2.0 Release Docs OpenSSF Best Practices


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:

  1. 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.
  2. ADRs as rules — each ADR can have a companion .rules.ts file 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

Standalone (no Node.js required):

# macOS / Linux
curl -fsSL https://cli.archgate.dev/install-unix | sh

# Windows (PowerShell)
irm https://cli.archgate.dev/install-windows | iex

# Windows (Git Bash / MSYS2)
curl -fsSL https://cli.archgate.dev/install-unix | sh

Via npm (or any Node.js package manager):

# npm
npm install -g archgate

# Bun
bun install -g archgate

# Yarn
yarn global add archgate

# pnpm
pnpm add -g archgate

You can also install as a dev dependency:

npm install -D archgate    # or: bun add -d archgate
npx archgate check         # run via package manager

Requirements: macOS (arm64), Linux (x86_64), or Windows (x86_64). See the installation guide for more options.

Quick start

# 1. Install
curl -fsSL https://cli.archgate.dev/install-unix | sh  # or: npm install -g archgate

# 2. Initialize governance in your project
cd my-project
archgate init

# 3. Edit the generated ADR to document a real decision
# .archgate/adrs/ARCH-001-*.md

# 4. Add a companion .rules.ts to enforce it automatically
# .archgate/adrs/ARCH-001-*.rules.ts

# 5. 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 automatically

Get 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

Apache-2.0

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

archgate-0.41.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archgate-0.41.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file archgate-0.41.1.tar.gz.

File metadata

  • Download URL: archgate-0.41.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for archgate-0.41.1.tar.gz
Algorithm Hash digest
SHA256 d82a2baf04f62d3faadf67422693e7dd4f2b31d3a2edee476569dc2445324c92
MD5 767cce7c69f154f81bcdc45934ca57a4
BLAKE2b-256 644bbe8051754ece47781b2706e57f31722a9f2479439dec68c4c1b5ec791daf

See more details on using hashes here.

Provenance

The following attestation bundles were made for archgate-0.41.1.tar.gz:

Publisher: publish-shims.yml on archgate/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file archgate-0.41.1-py3-none-any.whl.

File metadata

  • Download URL: archgate-0.41.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for archgate-0.41.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d334d566a5138e3b33e9a6f8668680c011111ab5d9b2d3e485584fe1f99256e1
MD5 d5b27d63c9cb8f3daa924d923a4fcb7f
BLAKE2b-256 813d9fa587aea47c7833d075a1733b9c823f721fbfa7e60869f62af30e6c18f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for archgate-0.41.1-py3-none-any.whl:

Publisher: publish-shims.yml on archgate/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page