- Run
cargo fmtafter every change. cargo clippymust produce zero warnings.cargo buildmust produce zero warnings. Use#[allow(...)]only with justification.cargo testmust pass before and after every change.- Do not modify or remove existing tests unless explicitly asked.
- Follow existing code conventions in the file being edited.
- Keep functions short and focused.
- Use meaningful names; avoid abbreviations except where idiomatic in Rust (
cwd,buf, etc.). - Prefer returning
Resultoverunwrap()/expect()in non-test code. - Add doc comments (
///) on public items and non-trivial internal functions.
- Morris uses a fixed, deterministic workflow. AI (Bedrock) is called exactly twice: once for mutation planning, once for analysis.
- All file I/O, test execution, and mutation application is deterministic code — no agent loops or tool-use protocols.
- The entire tool is a single binary in
src/main.rs.