Can You Actually Measure Code Quality? This Tool Gives Your Agent a Score to Chase
You've probably noticed that AI coding agents are great at adding features and less great at keeping your codebase from slowly turning into a mess. Asking them to "clean things up" rarely goes anywhere useful—they fix one thing, lose the thread, and forget what they were doing by the next session. Desloppify is an attempt to change that by giving your agent a concrete score to chase and a persistent fix loop to work through.
What It Does
Desloppify is a Python-based harness (Python 3.11+) that scans your codebase for quality issues and then hands your AI coding agent a prioritized queue of things to fix. It combines two kinds of analysis: mechanical detection for things like dead code, duplication, and complexity, and subjective LLM review for things a linter can't catch—naming, abstractions, module boundaries.
The results roll up into a score, and the tool maintains state across scans, so your agent can chip away at the backlog over multiple sessions rather than starting from scratch each time. It's designed so that the only way to improve the score is to actually make the code better—the scoring resists gaming. A score above 98 is meant to correlate with a codebase a seasoned engineer would call beautiful. The scan also generates a scorecard badge you can drop into your GitHub profile or README.
Language support is broad: 29 languages total, with full plugin depth for TypeScript, Python, C#, C++, Dart, GDScript, Go, and Rust, and generic linter plus tree-sitter support for Ruby, Java, Kotlin, and 18 more. For C++, compile_commands.json is the primary analysis path, with a best-effort fallback for Makefile repos.
Why It's Cool
The score gives your agent a north star. This is the core idea, and it's a genuinely useful one. Agents work better with a target. Instead of vaguely asking for cleanup, you point the agent at a number and let it iterate toward a goal.
The loop is the actual workflow. desloppify next isn't the whole backlog—it's the execution queue from a living plan. It tells the agent what to fix now, which file, and the exact resolve command to run when it's done. Fix, resolve, run next again. That's a much tighter feedback loop than most agent workflows get.
State persistence matters more than it sounds. Because state survives across scans, a large refactor doesn't have to happen in one sitting. The agent can make progress, stop, and pick up where it left off later.
It's honest about monorepos. The README is explicit that scanning a parent directory containing multiple unrelated programs will mix state and produce unreliable results. Instead, you scan each project separately with --path, and Desloppify keeps separate state per language—so a TypeScript frontend and Python backend can coexist in one workspace without conflict.
CI is treated as a health gate, not a linter. The guidance is to run the CI profile against the same coherent project path you scan locally, rather than treating it as a diff-only check. That's the right framing for what this tool actually does.
How to Try It
- Make sure you have Python 3.11+ installed.
- Install the package and the workflow guide for your agent:
pip install --upgrade "desloppify[full]"
desloppify update-skill claude
The skill command supports claude, cursor, codex, copilot, droid, windsurf, gemini, and rovodev.
- Add
.desloppify/to your.gitignore—it holds local state you shouldn't commit. - Before scanning, exclude directories that shouldn't be analyzed (vendor, build output, generated code, worktrees) with
desloppify exclude <path>. The README suggests confirming questionable candidates with you before excluding them. - Run the scan and start the loop:
desloppify scan --path .
desloppify next
From there, the agent fixes what next tells it to fix, runs the resolve command, and calls next again. Use backlog when you need to see broader open work, and plan or plan queue to reorder priorities or cluster related issues. Rescan periodically.
The full prompt to paste into your agent—including the instruction not to substitute its own analysis for the scan output—is in the repository README.
Final Thoughts
Desloppify is best suited to people already using AI agents on real, ongoing codebases—especially where quality has drifted and ad-hoc cleanup requests aren't cutting it. The scoring-as-motivation approach is a clever way to keep an agent focused across sessions, though whether a number reliably maps to "beautiful code" is something you'll want to judge on your own projects. If you've been looking for a way to make agent-driven refactoring less scattershot, this is worth a scan.
Follow @githubprojects for more developer tools and open source projects.