charter fix is Charter’s repair command. It is intentionally narrow: it only applies safe, explicit fixes to a small set of supported rules, always shows you a unified diff before writing anything, and backs up existing files before replacing them.
The guarantee: Charter always shows you a diff before writing. No silent mutation.

Fixable Rules
| Rule | What the fixer does |
|---|---|
AE-CTX-001 | Creates AGENTS.md from a minimal template |
AE-CTX-004 | Creates or appends .gitignore with agent artifact patterns |
AE-CI-002 | Creates the Charter CI workflow at .github/workflows/charter.yaml |
AE-MCP-001 | Bumps an MCP server package to the catalog’s stable version |
Usage
Recommended Workflow
Preview every diff
fix would apply.Apply the fixes
.charter/backups/<timestamp>/ before any write. Pure creates (new files) have no prior content to back up.Flags
Explicit repository root. Defaults to the current working directory.
Limit the repair to a single rule ID such as
AE-MCP-001. When omitted, all fixable findings are planned.Print unified diffs without writing any files. Safe to run repeatedly.
Plan every fixable rule. This is already the default behavior; the flag is accepted for explicitness.
Skip per-fix confirmation prompts. Because
fix is already non-interactive in normal use, this flag is accepted for scripting compatibility.Backup Mechanism
How backups work
How backups work
Before replacing or updating an existing file, Charter copies the previous version into
.charter/backups/<timestamp>/ where the timestamp is ISO 8601 UTC (for example, 2026-06-10T07:42:00Z). The original file’s relative path is preserved inside the backup directory.Pure creates — fixes that write a brand new file where none existed — do not produce a backup because there is no prior content to save.Charter never deletes backup directories automatically. They accumulate across runs and serve as a local audit trail of every mutation fix has applied.To recover a backed-up file: