Observed since 20 Oct, 21:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Agent-neutral policy-engineering framework
Turn your team's rules into deterministic guardrails that every AI coding agent — Claude Code, Copilot, Cursor, Codex, Gemini, Aider — actually obeys. Not prose it can ignore. Real enforcement, on git hooks, CI, and each agent's native controls.
Quick Start · How it works · Docs · Contribute · Roadmap
Your team now runs five different AI coding agents, each with its own config file and its own idea of "the rules." You write "don't force-push to main" in a CLAUDE.md, a .cursorrules, and a copilot-instructions.md… and the agent ignores it anyway, because prose is a suggestion, not a control.
| Without Agent Charter | With Agent Charter |
|---|---|
| Rules copy-pasted into N agent config files | One policy, authored once |
| Prose guidance the agent can ignore | Deterministic enforcement (exit-code guards) |
| Different behavior per agent | Compiled to each agent's native surface |
| "Did the AI follow policy?" — unknowable | Per-agent coverage report + evals |
Agent Charter is a policy-as-code framework: you author a rule, hook, or skill once, and it compiles to the real enforcement surface of every agent — git hooks, CI gates, Claude PreToolUse, and AGENTS.md rules — validated and version-locked.
You author a policy once. The compiler emits the strongest control each agent supports and reports the exact coverage — enforced, enforced-at-commit, or advisory — so you always know where a guarantee holds. Read the full architecture overview.
AGENTS.md, across 13 agents including Claude Code, Copilot, Cursor, Codex, Gemini, Aider and Windsurf. The CI gate is opt-in (agentcharter install-ci) and the coverage report only credits it once it is wired up.agentcharter add protect-main-branch pulls from the catalog: block-destructive-commands, scan-secrets, block-no-verify, plus advisory rules (code-safety, git-safety, token-efficiency). Installed content is yours to edit.agentcharter.lock, and an eval suite (with adversarial cases) for every policy.compile emits a per-agent report: enforced / enforced-at-commit / advisory — the foundation for compliance attestation.agentcharter plugin build emits Agent Plugins 1.0.0 packages, so any conformant client can read a policy. None of them can enforce it — that part is ours. What the badge does and does not mean.init, add, recompile, validate, eval, compile, registry, plugin, verify, new, refresh, install-hooks, install-ci, install-skills, policies, disable, enable, check-matrix, compliance. agentcharter --help prints the list from the code, so that one cannot drift.Agent Charter is a craft and enforcement framework first, and a security framework second — and that is worth saying plainly, because the two get marketed as the same thing.
The mechanism is genuinely deterministic: gates block commits, and the coverage report tells you exactly where. But most of the baseline catalog — yagni, token-efficiency, context-hygiene, agent-discipline, memory-discipline — are coding-discipline and token-economy rules, not security controls. The security-shaped ones are a minority: scan-secrets, protect-main-branch, block-destructive-commands, block-no-verify.
Against the OWASP Top 10 for Agentic Applications (ASI01–ASI10), that comes to 3 partial of 10, and 0 fully covered. You do not have to take our word for it:
agentcharter compliance report --framework owasp_asi
It prints the same table we would, including every uncovered row. Closing that gap is the roadmap's priority; overstating it in the meantime would cost more than the gap does.
Requires: Python 3.11+ and git. Installed git hooks need bash at runtime. Early access: not yet on PyPI — install from source while
v0.0.1stabilises.
# 1. Install
pip install git+https://github.com/open-coder-ai/agentcharter
# 2. Scaffold your repo — wiring and authoring skills, no opinions
cd /path/to/your/project
agentcharter init .
# 3. Adopt a policy, compiled and ready
agentcharter add protect-main-branch
agentcharter install-hooks .
init deliberately installs no policies. The framework ships mechanism; policies are content you
choose, and once installed they are yours to edit — nothing overwrites them. That is what makes
customisation possible at all.
agentcharternot found? Your Python scripts dir may not be onPATH. Usepython -m agentcharter …— it works regardless of PATH.
Now watch it enforce.
git checkout main # or master — whichever your default branch is
echo "oops" > hotfix.txt && git add hotfix.txt
git commit -m "quick fix straight to main"
# ❌ Direct commits/pushes to a protected branch (main|master) are blocked.
# Create a feature branch and open a pull request.
# - main
git checkout -b feature/x
git commit -m "on a feature branch" # ✅ allowed
That branch list is resolved from the gate, not hard-coded: point
agentcharter.defaults.protected_branches at [main, master, release/*] and the message says so.
That block came from a deterministic git hook, compiled from the same policy that also produced your agents' native controls. New here? Follow the Getting Started guide.
Author your own guard and compile it to every agent:
# Scaffold a new policy (manifest + gate + evals)
agentcharter new policy block-console-log
# Validate every artifact against the spec
agentcharter validate .
# Compile it to each agent's enforcement surface + a coverage report
agentcharter compile block-console-log
A policy is just a small, reviewable manifest:
# .agents/policies/block-console-log/manifest.yaml
id: block-console-log
name: "No console.log in committed code"
artifact: hook
enforcement: block
effects: [read_only]
description: >
Block staged JS/TS changes that add console.log — keep debug noise out of main.
Full developer documentation lives in docs/:
| Guide | What's inside |
|---|---|
| Getting Started | Install, onboard a repo, author your first policy |
| Architecture | The author → compile → enforce model |
| Core Concepts | Artifacts, manifests, surfaces, coverage, registry |
| CLI Reference | Every command, flag, and example |
| Authoring Policies | Rules, hooks, skills, subagents |
| Enforcement Surfaces | The six surfaces + per-agent coverage matrix |
| Validation | The validation engine and checks |
| Registry & Lockfile | Reproducible, hash-pinned distribution |
| Evals | Testing policies with adversarial cases |
| Policies | What the catalog offers, and how to install and customise it |
| Adapters | Per-agent wrapper notes |
We're building in the open. Next up:
agentcharter add <id> — install a policy or skill from any catalog, public or private.agentcharter install-ci plus a commit-range gate mode, so a hook skipped with --no-verify is still caught on a pull request.agentcharter upgrade, three-way merge against a pinned agentcharter.lock.agentcharter attest mapping controls to NIST AI RMF, ISO 42001 & the EU AI Act.See the open issues and good first issues to jump in.
We'd love your help — code and non-code contributions alike. Docs fixes, bug reports, and new policy ideas are all first-class. Start with the Contributing Guide and look for good first issue.
If Agent Charter saves you from one bad --force push, drop a star — it's the single biggest signal that helps other teams find the project and keeps development moving.
Apache-2.0 — see LICENSE. Built by and for teams shipping with AI agents.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.0.1a0 | 11 Aug 2026 | 8 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 21:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b37d603d7caf52b2fa79778638e4165f34bdd291a76d3deeef098257e7ae49da