Musketeer logo Musketeer

Validation

The musketeer check command validates structural invariants across both SMALL-owned and Musketeer-owned state. These are the rules that are actually enforced today.

SMALL state validation

Required files exist

Rule: The .small/ directory must contain the required SMALL artifacts: workspace.small.yml, intent.small.yml, constraints.small.yml, plan.small.yml, progress.small.yml, handoff.small.yml.

ID consistency

Rule: The replay ID in each SMALL artifact must match the workspace identity.

Progress sequence integrity

Rule: The seq values in progress.small.yml entries must start at 1 and be strictly increasing. No gaps, duplicates, or out-of-order entries.

Plan task uniqueness

Rule: All task IDs in plan.small.yml must be unique.

Musketeer execution state validation

Verdict status

Rule: If a verdict exists for the current replay in .musketeer/verdicts/, its status is checked. A reject verdict causes check to fail with exit code 23 (E_VERDICT_REJECTED).

Run structure

Rule: If a run directory exists in .musketeer/runs/<replayId>/, its structure must be valid.

How check works

The check command validates a single replay. By default it picks the lexicographically last replay ID (the latest). You can target a specific replay with --replay <id>.

musketeer check                  # Check latest
musketeer check --replay <id>    # Check specific replay

If all checks pass, check exits with code 0. If any fail, it prints errors and exits with a non-zero code.

What validation does not guarantee

Validation is about structural consistency, not application correctness. The CLI does not guarantee:

  • Your code is bug-free
  • Your logic is correct
  • External systems behave as expected

The CLI guarantees that SMALL state is structurally valid and Musketeer execution state is internally consistent.