Rust
Cargo.tomltokei · rust-code-analysis · cargo-llvm-cov · cargo-mutants
mido is the verification ladder between a change and shipping. Six gates over your whole workspace. One verdict bound to the revision it measured.
Why mido
An agent can produce a thousand lines before lunch. A green test run says one command exited zero; it does not say the change is small, covered, or actually asserted.
mido enforces the floor in cost order: the checks that are cheap to run come first, the ones that are expensive to fake come last. Nothing is measured because it changed. Everything is measured because it ships.
See what the ladder enforcesThe ladder
Cheap checks first, expensive proof last. Every gate has to answer. A missing tool is INCOMPLETE, never a pass.
Is it clean?
Formatter, linter and type checker over the measured target. Any diagnostic fails the gate.
Can a human hold it?
File lines, function lines, cyclomatic complexity and nesting depth across the whole target — not just the diff.
Will it age well?
Cognitive complexity and a maintainability index where the stack measures one. No invented score where it does not.
Does it behave?
The project's own suite, every command it declares. Never skip, ignore or loosen an assertion to go green.
Do the tests reach it?
Total line coverage against a floor, plus the drop against a baseline. An empty report is INCOMPLETE, not 100%.
Do the tests actually assert?
Surviving mutants in the change. A survivor needs a real assertion or a written equivalence argument.
One contract, three ecosystems
mido infers the language module from the repo, or takes --lang. The module owns the commands, the parsers, the measurement and the baseline.
tokei · rust-code-analysis · cargo-llvm-cov · cargo-mutants
prettier · eslint · tsc · vitest/jest/c8 · stryker
prettier · eslint · vitest/jest/c8 · stryker
A repo no module recognizes exits 2 and says why. There is no silent fallback.
Verdicts
mido does not grade on a curve. The ladder ends in an honest answer, and a waiver is never hidden.
If the config waived a gate, the verdict names it. Green for the ladder you configured, never a claim about the gate you left out.
FAIL means the code broke the contract. INCOMPLETE means the gate never reached a verdict — missing tool, unreadable file, timeout. Neither is a pass.
enabled = false runs nothing and reports SKIPPED. The verdict says waived: mutation — enabled = false in .mido.toml. No silent omissions.
A skipped gate is not a passed gate.
For agents
mido assumes an LLM wrote the change and an LLM will pick up the result. Non-interactive by contract, evidence-first by design.
0 is ship-ready. 1 is a failed gate. 2 is incomplete or a setup error. --json gives the caller structure when it needs more than the code.
A failure names the gate, the contract, the evidence and the fix. It is written for the next attempt, not for a log viewer.
HEAD plus a dirty-state hash. A green run from before the last edit cannot be replayed on it.
mido mcp serves list_targets and run_ladder over stdio. Silent by default; the markdown report is the artifact.
BLOCKED — size=FAIL
[2/6] ✗ size — FAIL
split along a real seam — moving the code into another file does not pass this gate
MCP
Point an MCP-speaking agent at mido mcp. It gets the CLI's exact rules: an unknown package is a setup error, an unknown argument is rejected.
list_targetsName, path and kind of every target in the repo.run_ladderMeasure one target silently; return the exit code and the report.MCP client configurationJSON
{
"mcpServers": {
"mido": {
"command": "mido",
"args": ["mcp"]
}
}
}Get started
Install the binary and run it in a repo. mido infers Rust, TypeScript or JavaScript and works from its built-in baseline before you write any config.
One-line install
v0.5.0curl -fsSL https://github.com/alessandromalacarne/mido/releases/latest/download/install.sh | shOther ways in
cargo install mido-guardnix developcargo build --releaseRequires git and the tools your stack's gates call. nix develop brings all of them.
The installer checks the release against SHA256SUMS and drops mido in ~/.local/bin.
From the repo root: mido. It measures the whole workspace, not just the diff.
Move a threshold in .mido.toml when you mean it. A waiver is written down and named in the verdict.
The way in
Six gates between your code and shipping. One verdict you can hand to the next reader.
“If you want to pass through here, you should at least equip a sword and shield!”
Mido, guarding the way into Kokiri Forest