Musketeer logo Musketeer

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:

  1. Required files exist - all five YAML files are present in the run directory
  2. Replay ID consistency - replay_id in each file matches the directory name
  3. Progress sequence integrity - seq values start at 1 and are strictly increasing
  4. Plan task uniqueness - all task IDs in plan.yml are 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