musts
An agent-first validation loop for code repositories.
The task is not done until
musts validateis empty.
musts is a small CLI that tells an agent what must be validated after a change, how to produce evidence, and when the work is allowed to be called done. It is not a test runner, not CI, not another CLAUDE.md — it is the missing validation loop between agent work and trustworthy completion.
Status
Pre-1.0. The CLI surface, the extension protocol, and the MUSTS.yml format may change between minor versions until 1.0. The §19 success criterion runs end-to-end on fixtures/login-app/ and is checked in as phase6_e2e::full_section_15_worked_example.
How it works (one paragraph)
You drop MUSTS.yml files anywhere in your repo. Each one declares validation checks (build this target, validate this user flow with MAV, run this Playwright check…). When the agent finishes a change, it runs musts validate. The CLI looks at what changed (using content fingerprints, not git), groups checks by capability, and asks each extension "given these checks and this dirty scope, what tasks does the agent actually need to do?". The extension answers with concrete tasks. The agent runs them, captures evidence (text + assets), and submits it through musts evidence <task-id>. The extension decides whether the evidence is good enough. Repeat until musts validate is empty.
Commands
Exit codes:
validate: 0 clean, 1 pending tasks, 2 configuration / stale / lock error, 70 internal error.evidence: 0 accepted, 1 rejected by extension, 2 unknown task / stale snapshot / over-claim, 70 internal error.
Install
# Homebrew (macOS / Linux)
# Cargo (from crates.io)
# Precompiled binaries
From source (contributors only)
Test suite:
See CONTRIBUTING.md for the full contributor guide.
Self-validation
The repository validates itself with its own CLI. Three cargo capabilities (cargo/fmt, cargo/clippy, cargo/test) live in extensions/cargo and validate evidence the agent collects; two scopes (crates/musts-protocol/ and extensions/cargo/) carry uses: agent contracts that pin their responsibility as a checklist of facts.
Walk the loop end-to-end:
# Touch something to dirty a scope
# Pending: 3 cargo-* tasks + 1 agent-* contract task
# Capture real cargo output
{ ; ; ; }
{ ; \
; \
; }
|
# Submit evidence
# Agent contract: answer each fact in your --text
# Converged
;
The contract task lists its facts under Instructions: in the validate output — your evidence text should address each one. Empty text is rejected (agent_builtin_e2e::text_required).
Docs
docs/musts-design.md— the v0.2 design spec.docs/PLAN.md— the implementation plan, ~30 review rounds applied; the source of contract decisions.docs/skill.md— the agent skill (drop into.claude/skills/).docs/architecture.md— bird's-eye view of the crates.docs/extensions.md— how to write a third-party extension.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.