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

# Quickstart

> Create, accept, and enforce a Decision in five minutes.

This example records a storage choice and makes changes under `internal/store/` require an acknowledgment in CI.

## 1. Initialize Charter

```sh theme={null}
charter init
```

## 2. Draft a Decision

Use flags for a repeatable command, or run `charter propose` with no flags for a short interactive prompt.

```sh theme={null}
charter propose \
  --title "Use PostgreSQL for persistent storage" \
  --context "The service needs transactional writes and relational queries." \
  --decision "Use PostgreSQL for all persistent application data." \
  --consequences "Operate PostgreSQL and maintain migrations." \
  --alternatives "SQLite is insufficient for the production concurrency profile." \
  --scope-path "internal/store/**" \
  --scope-tag "storage" \
  --enforcement blocking
```

Charter assigns the next numeric ID, writes a proposed Markdown file, and regenerates `.charter/DECISIONS.md`.

## 3. Review and accept it

Inspect the draft before accepting it:

```sh theme={null}
charter list --status proposed
charter show 0001
charter accept 0001 --why "Approved after architecture review"
```

The Decision is now accepted and takes effect for agent checks and CI scope matching.

## 4. Acknowledge a governed code change

When a commit changes `internal/store/**`, reference the Decision in the commit message:

```text theme={null}
feat: add repository implementation

Governed-By: 0001
```

`Charter: 0001` is an equivalent trailer.

## 5. Run the gate

Before opening a pull request, inspect local changes:

```sh theme={null}
charter check
```

This reports matching Decisions but does not enforce acknowledgments because uncommitted work has no commit messages. In CI, compare the branch with its base ref:

```sh theme={null}
charter check --diff origin/main
```

For a blocking match, an absent trailer exits with status `2`; a matching trailer clears that violation.

## Next steps

* Learn the [Decision lifecycle](https://shunya.mintlify.site/docs/guide/decisions.md).
* Register [AI-agent integration](https://shunya.mintlify.site/docs/guide/agent-integration.md).
* Add the [CI workflow](https://shunya.mintlify.site/docs/guide/ci.md).


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