Image: GitHub
Why it mattersA Rust team that releases code written by coding agents gets a check for tangled module structure before review. The lints name specific places, not whole files.
A Rust team reads a 2,000-line pull request from a coding agent. The behaviour is correct. The shape of the code is harder to see. Deslop-please is a linter that answers that one question. It flags four shapes of sloppy module design. The output names the exact places where each shape appears.
The repository is deterministic-machines/deslop-please on GitHub. It was created on 22 November and holds 1,103 stars four days later. The licence is MIT and the project is written in Rust, for Rust code. One command, cargo install deslop-please, installs it from crates.io.
The four lints
The README names four rules and gives each one a one-line definition.
Module-cycle flags a pair of modules that import from each other. Tangle flags two sibling modules that know about each other even though neither imports from the other. Field-leak flags a struct field that is read or written outside its own module. Shallow-module flags a module whose public interface is wide against how much work it does inside.
The example error in the README reads: error[field-leak]: RunQueue::items is known outside RunQueue: 4 places in 2 modules. The output names the field, the count of outside readers, and the number of modules that reach in.
The four rules come from Ousterhout
The README says the linter follows John Ousterhout's A Philosophy of Software Design. That book argues that a sound module hides a lot of code behind a short list of public functions. A module that exposes everything inside it, or two modules that reach across each other, break that shape. Deslop-please maps four of the book's warning signs onto Rust's module system and reports them with line numbers.
The project calls the problem "sloppy code" and the word "slop" is in its own name. The author warns that an error from deslop-please "must be fixed from first principles". A developer who hides the error by widening the allow file has not fixed the structure. Nor has one who renames the field.
Agents are a named reader
The README has a section called "Add to your AGENTS.md". That file is where a team puts the instructions a coding agent reads before it writes code. The section asks the agent to run deslop-please on its own work. When the lint fails, the agent must redesign the module instead of removing the warning.
The project's one-line description names the audience out loud: "deep modules hide the attention for you and your agents". A human reviewer reads a long diff from Claude Code or Codex. One more check now runs before the review opens.
A coding agent that writes Rust tends to grow modules outward one function at a time. The behaviour stays correct and the file count stays low. The shape slowly flattens. Deslop-please gives a reviewer a short list of named faults to look at. The limits are real too. The tool runs on Rust and not on other languages. The four rules are opinionated. A team that disagrees with Ousterhout's definition of a deep module must say so in its allow file.
Source
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.