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

# Storage and configuration

> What Charter stores in .charter and which files are authoritative.

## Repository layout

| Path | Role | Commit it? |
| - | - | - |
| `.charter/decisions/*.md` | Authoritative Decisions. | Yes |
| `.charter/DECISIONS.md` | Generated Markdown index for GitHub and quick orientation. | Yes |
| `.charter/config.yaml` | Repository-level defaults (enforcement, principal allowlist). | Yes |
| `.charter/events.db` | Derived local SQLite audit log. | No |
| `.charter/.lock` | Transient advisory lock held while a charter process writes. | No |

The source of truth is the Decision-file set. Treat the index as generated output: run `charter sync` after deliberate manual Decision-file edits.

## `config.yaml`

`init` creates this scaffold:

```yaml theme={null}
enforcement_default: advisory
principals: []
```

Both keys are read on every relevant command:

* **`enforcement_default`** — the enforcement level a proposal gets when none is passed explicitly. It applies to `charter propose` without `--enforcement`, the MCP `decision_propose` tool without an `enforcement` argument, and `charter bootstrap` drafts whose extractor didn't pin a level. One of `blocking`, `advisory`, or `off`; an invalid value is an error, not a silent fallback. Missing key (or missing file) means `advisory`.
* **`principals`** — an optional allowlist of agent principal ids. When non-empty, `charter mcp --principal <id>` refuses to serve ids not on the list, which keeps `proposed_by` provenance meaningful. Empty means any principal is served.

An explicit flag or tool argument always wins over the configured default.

## Audit events

`charter log` reads events newest first. Actions include proposed, accepted, rejected, superseded, and affirmed. The database is a local derived audit index and is intentionally ignored by Git together with SQLite journal/WAL files.

## IDs and deterministic output

Charter assigns the next available numeric ID padded to four digits. It reads Decision files from disk for each operation, sorts the displayed Decision set by ID, and renders the index in this status order: accepted, proposed, superseded, rejected.

## Manual edits

Manual edits are appropriate for reviewing or enriching proposed Decision files. Preserve valid YAML frontmatter and the required identity/title/status fields. After manual changes, run:

```sh theme={null}
charter sync
charter show 0007
```

Use the lifecycle commands rather than manually changing an accepted Decision's status when you want a normal audit trail.


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