Keep your docs, source code, and AI-agent instructions in sync. Fail CI when they drift.
Why Ma'at?
Modern repositories have two audiences:
Humans need accurate architecture notes, guides, ADRs, and references.
AI coding agents need setup steps, project rules, conventions, and task context.
But that knowledge usually gets scattered across:
docs/
AGENTS.md
CLAUDE.md
.github/copilot-instructions.md
.cursor/rules/...
.windsurf/rules/...
GEMINI.md
other agent-specific files
Maintaining all of that by hand guarantees drift.
Ma'at makes one source of truth explicit, generates the derived files, and checks everything in CI.
Fast start
Install Ma'at:
# Homebrew
brew install getmaat/tap/maat
# Install script, no Go toolchain required
curl -sSf https://raw.githubusercontent.com/getmaat/maat/main/scripts/install.sh | sh
# Go
go install github.com/getmaat/maat@latest
Scaffold your repository:
maat init . --name "My Project" --summary "What it does"
Validate it:
maat check
That gives your repo a documentation-as-code structure, generated AI-agent adapter files, and a CI gate that treats documentation drift like a failing test.
What Ma'at gives you
Problem
Ma'at’s answer
Docs rot after code changes
Docs declare the source files they cover via related_code; maat check detects stale docs.
maat init is safe to re-run. It creates the Ma'at structure without overwriting existing project-owned files.
If your repository already has an AGENTS.md, Ma'at preserves your prose and inserts its maintenance contract into a managed block. Your hand-written content remains yours; Ma'at only updates the managed block.
How it works
.maat.yml
│
▼
docs/*.md ──scan──▶ DocsModel ──┬── generate ──▶ llms.txt, adapters, index
AGENTS.md │
└── validate ──▶ pass/fail, the CI gate
docs/ + AGENTS.md are the source of truth — hand-written, reviewed in PRs, and versioned with the code.
docs/llms.txt, the per-agent adapter files, and the navigation in docs/index.md are generated from that source.
maat check verifies front matter, links, related_code, staleness, and generated-file drift.
CI fails when docs or generated files fall behind the code.
CLI
A single static binary with zero runtime dependencies.
maat init . # scaffold docs/, AGENTS.md, config, CI, .maat/templates, and adapters
maat sync # regenerate llms.txt, adapters, and index navigation
maat check # validate docs and fail on drift
Running from a clone without installing:
go build -o maat .
go run . <command>
Command
Does
init
Stamps the framework into a repository. Safe to re-run.
sync
Regenerates every derived file from the docs tree and AGENTS.md.
check
Validates front matter, links, related_code, staleness, and drift.
GitHub Actions
Use Ma'at in CI to block documentation drift on pull requests.
Command maat is the Ma'at CLI: documentation-as-code for humans and AI
agents. It scaffolds (init), regenerates derived artifacts (sync), and
validates the docs set as a CI gate (check).
Package maat is the Go implementation of the Ma'at engine: scanning a docs/ tree into a model, generating derived artifacts (llms.txt, index navigation, agent adapter files), and validating the set for CI.
Package maat is the Go implementation of the Ma'at engine: scanning a docs/ tree into a model, generating derived artifacts (llms.txt, index navigation, agent adapter files), and validating the set for CI.
Click to show internal directories.
Click to hide internal directories.
go.dev uses cookies from Google to deliver and enhance the quality of its services and to
analyze traffic. Learn more.