For agents, on top of README.md, which they read first.

rint

Last changed

A Rust linter, written in Rust, that guards Rust codebases against "slop": code that erodes one small change at a time, especially when coding agents write it.

Read HANDOFF.md first. It has the research this is based on, the design decisions already made, and the build plan.

Ground rules

  • Rust only: the tool is written in Rust and lints Rust. Python/other languages are out of scope.
  • This is NOT about running SlopCodeBench. The benchmark is only the source of which signals predict decay.
  • Stable Rust for the core CLI (syn-based). Nightly/dylint is a later, optional phase.
  • Test code is never scored as product code (see HANDOFF.md, "Lesson from the benchmark bug").
  • Thresholds are starting guesses, not proven values. Keep them configurable.
  • Commit as you go: commit each verified piece of work in the same turn. Never push without asking.

For agents

  • Builds are buck2, never cargo. Cargo.toml is reindeer's and rust-analyzer's manifest. Build and test with nix develop -c mise run test. After changing a dependency, edit BOTH Cargo.toml ([workspace.dependencies]) and third-party/rust/Cargo.toml (tools/check-manifests.rs fails otherwise), then mise run buckify.
  • buck2 needs the remote-cache key in its environment: run it as sheik run -e <environment> -- nix develop -c buck2 .... A buck2 daemon started without the key keeps failing; buck2 kill it and start again.
  • Repository scripts are rust-script files (tools/*.rs), not bash.
  • Resource care. One build at a time, -j 4. Before a build call the resources MCP request tool and run diskspace headroom; release when done. Never leave a watcher or background build running (an earlier session died at the slice's 4096-task limit).
  • Commits: git commit -F - <<'EOF' with a quoted heredoc, never -m "..."; end the message with the Claude-Session: line. Remotes: origin is the private repository, public is jevgineer/rint (main only, through the git hooks pre-push guard). Push verified work to both; never force.
  • Stable Rust, syn only: no nightly features, no dependency on the code compiling.
  • Every score has two columns, cyclomatic and cognitive. Add a measure to both or neither.
  • Test code never becomes a function row or a finding (crates/rint-core/src/collect.rs explains how); crates/rint-core/tests/exclusion.rs holds that line.
  • rint runs on itself (mise run dogfood, and rint diff <rev> for the ratchet). Do not make its own scores worse; the functions it flags in this repository are listed in the README's "First runs".
  • Docs rule: README.md for humans, CLAUDE.md for agents in each directory.