musketeer check
The check command validates run state and verifies that structural invariants hold.
Usage
# Check the latest run (lexicographically last replay ID)
musketeer check
# Check a specific run
musketeer check --replay <REPLAY_ID> What it checks
The check command validates four invariants:
- Required files exist - all five YAML files are present in the run directory
- Replay ID consistency -
replay_idin each file matches the directory name - Progress sequence integrity -
seqvalues start at 1 and are strictly increasing - Plan task uniqueness - all task IDs in
plan.ymlare unique
Options
| Option | Description |
|---|---|
--replay <REPLAY_ID> | Check a specific run instead of the latest |
Example
Check the latest run:
musketeer check Check a specific run:
musketeer check --replay a1b2c3d4-e5f6-7890-abcd-ef1234567890 Exit codes
| Code | Meaning |
|---|---|
| 0 | All invariants hold |
| non-zero | One or more invariants failed |
When to run check
Run check when:
- After editing run YAML files manually
- Before committing
.musketeer/state to version control - As part of CI validation
- When troubleshooting unexpected behavior
Related
- State model - understand what is being checked
- Invariants - the rules being verified