Musketeer logo Musketeer

musketeer check

The check command validates both SMALL-owned canonical state and Musketeer-owned execution state.

Usage

musketeer check                      # check latest replay
musketeer check --replay <REPLAY_ID> # check specific replay

What it checks

SMALL state validation

  1. Required files exist - all SMALL artifacts are present in .small/
  2. Replay ID consistency - IDs match across SMALL artifacts
  3. Progress sequence integrity - seq values start at 1, strictly increasing
  4. Plan task uniqueness - all task IDs in plan.small.yml are unique

Musketeer execution state validation

  1. Verdict status - if a verdict exists in .musketeer/verdicts/, a reject verdict causes exit 23 (E_VERDICT_REJECTED)
  2. Run structure - run directories in .musketeer/runs/ must be structurally valid

Options

Option Description
--replay <REPLAY_ID> Check a specific replay instead of the latest

Exit codes

Code Meaning
0 All checks pass
20 Invariant failed
23 Auditor rejected (E_VERDICT_REJECTED)

When to run check

  • After editing SMALL artifacts manually
  • Before committing .small/ and .musketeer/ to version control
  • As part of CI validation
  • After running musketeer migrate

Related