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.

charter fix --dry-run — unified diff preview before any file is written
Fixable Rules
Usage
Recommended Workflow
1
Preview every diff
fix would apply.2
Apply the fixes
.charter/backups/<ts>/ before any write. Pure creates (new files) have no prior content to back up.3
Verify the score improved
Flags
string
Explicit repository root. Defaults to the current working directory.
string
Limit the repair to a single rule ID such as
AE-MCP-001. When omitted, all fixable findings are planned.boolean
Print unified diffs without writing any files. Safe to run repeatedly.
boolean
Plan every fixable rule. This is already the default behavior; the flag is accepted for explicitness.
boolean
Skip per-fix confirmation prompts. Because
fix is already non-interactive in normal use, this flag is accepted for scripting compatibility.Backup Mechanism
Before replacing or updating an existing file, Charter copies the previous version into.charter/backups/<ts>/, where <ts> is a compact UTC timestamp such as 20260610T074200Z. 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:
Exit codes
Related
Use charter fix safely
The diff-first workflow and what fix will never touch.
Fix engine
How fixers are registered and how backups are written.
doctor
Re-score the repo to confirm the fixed rules cleared.