Gate
sh
rust-anything gate <crate>
Done means gate passes. It checks:
cargo fmt, clippy with-D warnings, and cargo tests;unsafeonly with// SAFETY:comments, and nothingunimplemented!;- a recorded failing case for every place the original fails on purpose (
throw,raise, anerrorresult). Add one withrecord --inputswhen gate names it; - no
unwrap,expectorpanic!in a function whose original returns an error. ReturnErr; for a state the original also treats as impossible, a// INFALLIBLE: <why>comment; - the port at most 3x the original's lines (plus 50 lines for imports and signatures);
- the module builds, and every export is present;
- every recorded case matches, known diffs included, and the recording is not stale;
- for TS/JS, a coverage line: how much of the original the cases ran.
Each failed check carries a fix: run that first.
Then report, and wait
When the gate passes, the workflow skill has the agent report what changed (files, functions, bridge, batches), the gate output, diff counts and bench numbers, behavior differences or risks left, and what is left in the plan, and wait for the go-ahead before the next unit.