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

# Exit codes

> Process exit behavior for scripts and CI.

Most Charter command failures exit `1`. `charter check` reserves structured outcomes for CI:

| Exit code | `charter check` result |
| - | - |
| `0` | No blocking violation and no matched stale Decision. |
| `1` | Advisory result only, currently a matched stale Decision. |
| `2` | At least one accepted blocking Decision matched without an acknowledgment trailer. |
| `3` | The check could not run at all: bad `--diff` ref, unreadable or corrupt decision store, or no `.charter` directory. Treat as a failure to check, never as a pass. |

Example shell usage:

```sh theme={null}
charter check --diff origin/main
case $? in
  0) echo "governance check passed" ;;
  1) echo "review stale Decision advisories" ;;
  2) echo "add Governed-By trailers before merging" ;;
  3) echo "check could not run; fix the ref or the decision store" ;;
  *) echo "Charter execution failed" ;;
esac
```

Do not treat local `charter check` without `--diff` as an enforcement proof; it intentionally does not block uncommitted work.


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