> ## Documentation Index
> Fetch the complete documentation index at: https://shunya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Charter

> Git-native governance for AI coding agents.

Charter gives a repository a lightweight constitution that both people and coding agents can use. It turns important engineering choices into version-controlled **Decisions**, makes those Decisions available to agents through MCP, and can require an explicit acknowledgment when governed code changes.

> [!NOTE]
>
> Charter is a governance tool, not a linter or an authorization system. It helps a team record, surface, and acknowledge decisions; repository permissions and code review remain the human approval boundary.

## What Charter provides

* **Git-native Decisions.** Each Decision is a Markdown file with YAML frontmatter in `.charter/decisions/`. Pull requests remain the review surface.
* **A generated index.** `.charter/DECISIONS.md` is a committed, human-readable summary regenerated by `charter sync`.
* **Agent awareness.** A small MCP server exposes tools to check applicable Decisions, search history, list Decisions, and draft proposals.
* **A CI gate.** `charter check` maps changed files to accepted Decision scopes and, for blocking Decisions, requires a commit-trailer acknowledgment.
* **A local audit log.** Mutation commands record an append-only derived SQLite log at `.charter/events.db`.

## Architecture at a glance

```mermaid theme={null}
flowchart TB
    subgraph Repository["Repository"]
        Files["Decision Markdown files\n.charter/decisions"]
        Index["Generated index\n.charter/DECISIONS.md"]
        Audit["Derived audit log\n.charter/events.db"]
    end

    Human["Human reviewer"] -->|"reviews and decides"| Files
    CLI["Charter CLI"] -->|"reads/writes"| Files
    CLI -->|"sync"| Index
    CLI -->|"records mutations"| Audit
    Agent["Coding agent"] <-->|"MCP over stdio"| MCP["charter mcp"]
    MCP -->|"reads / proposes"| Files
    CI["CI runner"] -->|"charter check"| Files
    CI --> Git["Git diff + commit trailers"]
```

## The core workflow

1. Capture a meaningful technical choice as a **proposed** Decision.
2. Review it in a pull request or another human-controlled workflow.
3. A human accepts, rejects, or later supersedes it.
4. Agents call `decision_check` before significant work and cite the Decisions that apply.
5. CI runs `charter check --diff <base>` and blocks uncited changes to blocking scopes.

## Choose a path

> [card] [Install Charter](https://shunya.mintlify.site/docs/guide/installation.md)
>
> Install the binary and initialize a repository.

> [card] [Five-minute quickstart](https://shunya.mintlify.site/docs/guide/quickstart.md)
>
> Create, accept, and enforce your first Decision.

> [card] [Decision lifecycle](https://shunya.mintlify.site/docs/guide/decisions.md)
>
> Learn what proposed, accepted, rejected, and superseded mean.

> [card] [Use with AI agents](https://shunya.mintlify.site/docs/guide/agent-integration.md)
>
> Register the MCP server and establish the agent workflow.

## Vocabulary

| Term | Meaning |
| - | - |
| **Decision** | Charter's first-class, version-controlled record of an engineering choice. |
| **Scope** | File glob patterns and/or text tags that tell Charter where a Decision applies. |
| **Enforcement** | `blocking`, `advisory`, or `off`; controls CI behavior for a matching accepted Decision. |
| **Acknowledgment** | `Governed-By: <id>` or `Charter: <id>` in a commit message. |
| **Principal** | The person or agent identity recorded as the proposer or audit-log actor. |

For exact command and data contracts, use the [Reference](https://shunya.mintlify.site/docs/reference/cli.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.