Repository navigation
pip install ai-slop-detector==3.19.0
pip install 'ai-slop-detector[mcp]==3.19.0' # MCP server, Python 3.10+
npx ai-slop-detector@3.19.0 --project .Summary
The agent remediation loop. An agent can take a finding, fix it and get an
answer to "is it fixed?" that is not its own. The detector still never edits
code: the agent fixes, the detector measures before and after, a person
approves. Every change is in the
Changelog.
flowchart LR
W["work order"] --> V{"verify each item<br/>ACK / REJECT / UNSURE"}
V --> S["snapshot"]
S --> F["agent fixes"]
F --> P["prove"]
P -->|HOLD + reasons| F
P -->|REVIEWABLE| H["a person reviews"]Fix loop
| Step | CLI | MCP tool |
|---|---|---|
| Work list with evidence and one VERIFY question per rule | --format ai-md |
slop_work_order |
| The same findings as records with ids | --format ai |
slop_ai_report |
| Record the project before any edit | snapshot . -o before.json |
slop_snapshot |
| Compare after the fix | prove . --before before.json |
slop_prove |
- The receipt is
REVIEWABLE(a candidate for a person to review, never an
approval) orHOLDwith the reasons: a new suppression orfp:
declaration, a deleted or renamed function, a file that no longer parses, a
changed configuration or file set, a new finding, a changed test file.
reason_meaningsexplains every reason the receipt uses. - With
--decisions(ACK / REJECT / UNSURE per item),held_by_decision
names which items or files each decision holds. Tests are not run. - Exit codes 0
REVIEWABLE, 1HOLD, 2 an input it refuses;--format md
is the receipt for a person.
MCP server
- On the official MCP SDK (
[mcp]extra, Python 3.10+; the base install
keeps Python 3.8+). Before 3.19 a client that followed the specification got
no reply. - Seven tools; every path stays inside
--root. On connect the server tells
the agent the order: work order, snapshot, fix, prove.
Also in 3.19
report.mdleads with the findings and no longer re-reads source files
while rendering.- The legacy
--fixis deprecated: it says its edits are unverified, its
bare_exceptpatch (which could leave a file that does not parse) is
removed, and an edit that breaks the syntax or a file that is not UTF-8 is
refused. - Three edge cases of 3.18.2 are fixed (
locals()in generator and
comprehension frames, a rebounddict/list, a missing submodule under a
namespace such asgoogle).
Verification
- Deliberate fake fixes (a suppression comment, an
fp:declaration, a
disabled rule, an excluded file, a deleted or renamed function, a file that
no longer parses) come backHOLD, neverREVIEWABLE. Every guard of the
loop was removed in a copy of the source and a test failed every time. - On a fixed set of 14 repositories compared with 3.18.2: no pattern finding
added or removed and scores equal; 43 dotted-import findings are reworded.
VS Code extension
The extension stays 3.18.1. Its Auto-Fix command runs the deprecated --fix
and shows the new notice in the Output panel.