Every analyser · every project · back into the loop
The slop, measured.
The tools that find rotting code already exist: CRAP scores, complexity, duplication, coverage. Each speaks its own format in its own language, and none of it reaches the agent that wrote the code. mopthing runs them everywhere and hands the agent the mess.
Act I
Done, according to the agent.
The tests pass, so the work is done. Whether anyone would want to maintain it is a different question, and nobody asks it.
01 · Done!
The tests pass.
So the agent stops. Passing tests say the code does what was asked, not that it's code anyone can change next month.
02 · The analysers
A tool per language, a format each.
Complexity from one tool, coverage from another, the next project's linter in a third format. Run when someone remembers.
03 · The math
Nobody puts it together.
Complex and untested, in the same function, is the code that breaks. The score says so in one number, and nobody computed it.
That was one function.
- tools run by hand
- 3
- findings, own format
- 3
- never reached the agent
- 1
- findings the agent saw
- 0
Here's the same function, mopped.
Act II
The mopthing way.
The analysers stay the experts. mopthing runs them, reads them as one format, and puts the result where the agent will act on it.
01 · Every project
One command, every repo.
It knows each project's language and which analysers apply, and runs them all.
02 · One score
Complex and untested, at once.
CRAP squares the complexity and cubes the share left uncovered. A tangled function with tests passes, and so does a simple one without.
03 · Back to the agent
The finding is the next prompt.
A check after the agent's turn, on what it changed. Over the line, it exits non-zero, and its output says what to do.
04 · A ratchet
Old debt doesn't block.
Each repo keeps a baseline. What was already over is recorded, not failed; only new code and code that got worse goes back.
Act III
Where the line is.
mopthing measures and reports. The analysis is the analysers' job, and the fix is the agent's.
-
1
It wraps, it doesn't analyse
gocyclo, credo, coverage, duplication: each stays upstream. mopthing reads what they print into one format.
-
2
The stack first
Go, Elixir and TypeScript, because that is what gets written here. Another language is another set of analysers.
-
3
It fails where the agent can act
On changed code, with a message that says what to do, inside the loop the reviewer runs (llmthing).
| Measure | By hand | mopthing |
|---|---|---|
| Analysers run | when remembered | every repo, one command |
| Output | a format per tool | one table |
| The agent sees | nothing | its own findings |
| Old debt | blocks all or nothing | a baseline that only drops |
Agents writing faster than you read?
Tell me what your agents write. mopthing is how it gets checked here.