Write an ADR once.
Enforce it everywhere.
Archgate makes Architecture Decision Records executable — governing AI agents and humans with the same rules.
bun install -g archgate AI agents are powerful. But ungoverned.
Developers want speed
AI agents generate code fast. Teams ship features in hours that used to take days.
Organizations need consistency
Every codebase has conventions. API patterns, error handling, file structure — standards that keep complexity manageable.
AI agents have no guardrails
Without governance, AI generates working but non-conforming code. Every team member — human or AI — reinvents the wheel.
Archgate bridges the gap. It's a governance layer for AI-assisted development — enforcing your architecture decisions automatically.
The Governance Loop
A self-improving cycle where AI generates better code and compliance increases over time.
ADRs loaded as context
AI agents read your Architecture Decision Records before writing code. They know your patterns, constraints, and conventions.
archgate check in CI
TypeScript rules validate every change in milliseconds. Free, deterministic, and catches 80% of violations automatically.
AI reviews the rest
The architect skill reviews what lint can't catch — subjective quality, architectural fit, and design intent.
System learns
Every violation found during review becomes a new automated rule. Over time, governance gets cheaper and faster.
Every mistake becomes a permanent rule. Over time, governance gets cheaper — not more expensive.
ADRs that enforce themselves
Write a decision in Markdown. Add rules in TypeScript. The CLI checks compliance automatically.
---
id: ARCH-003
title: API Route Conventions
domain: backend
rules: true
files:
- "src/api/**/*.ts"
---
## Decision
All API route handlers must use the
createRoute() factory function.
Direct export default is prohibited.
## Do's and Don'ts
DO: Use createRoute({ handler })
DON'T: Use export default function import { defineRules } from "archgate/rules";
export default defineRules((ctx) => [
{
name: "require-createRoute",
severity: "error",
async run() {
const files = await ctx.glob("src/api/**/*.ts");
for (const file of files) {
const hits = await ctx.grep(
file, /export\s+default\s+function/
);
for (const hit of hits) {
ctx.report({
file, line: hit.line,
message: "Use createRoute() factory",
});
}
}
},
},
]); Everything you need for AI governance
From automated checks to AI-powered review, Archgate covers the full governance stack.
Executable Rules
Write rules in TypeScript next to your ADRs. Violations report exact file paths and line numbers.
CI Integration
Wire archgate check into any pipeline. Exit code 1 blocks merges. GitHub Actions, GitLab CI, or any CI system.
AI-Aware Governance
The MCP server gives AI agents live access to your ADRs. No copy-pasting prompts — context is always current.
Multi-Editor Support
Works with Claude Code, Cursor, and any MCP-compatible editor. The CLI runs anywhere your code does.
Free & Open Source
The CLI is Apache-2.0 licensed. Writing ADRs, running checks, CI integration — all free, forever.
Self-Improving
The system ratchets: every violation found during review becomes a new automated rule. Compliance increases, costs decrease.
Works with your AI coding tools
Native plugins for the editors you already use. Plus CLI support for any environment.
Claude Code
Plugin AvailableFull governance plugin with architect, quality-manager, adr-author, and onboard skills. AI agents read your ADRs, validate compliance, and capture learnings — all automatically.
Cursor
Plugin AvailableAgent rules and skills for Cursor's AI assistant. Your ADRs become Cursor's governance context, guiding code generation toward your architectural standards.
The CLI and MCP server work with any MCP-compatible editor. archgate check runs anywhere your code does.
Built for production
Archgate dogfoods its own governance. The CLI is governed by 6 ADRs that run on every commit.
Start governing your
AI-generated code
Install the CLI in 30 seconds. Write your first ADR in 5 minutes.
bun install -g archgate