Who it is forA PHP or Laravel developer who lets an AI coding agent write most of the code and wants it to clean up its own mistakes.
The problemAgents repeatedly produce swallowed exceptions, queries inside loops and oversized methods, and code review catches them late.
The outcomeAfter each PHP edit the agent receives only the findings that edit introduced and fixes them before the developer reviews the change.
What you need first
- PHP 8.3 or newer
- Composer
- A PHP project with source roots listed in composer.json
- Git, for diff and review commands
Steps
- Run
composer require --dev heyosseus/sloppyin the project root. - Run
vendor/bin/sloppyto scan the project and confirm the output. - Run
vendor/bin/sloppy agents installto add the Claude Code hooks, orvendor/bin/sloppy agents install --host=geminiorvendor/bin/sloppy agents install --host=codexfor those agents. (inferred, check the README) - Ask the agent to make a small change to a PHP file and watch it run Sloppy after the edit.
Prompt for your agent
In the Heyosseus/sloppy project, install the agent hooks for this repository at <project path> by running the install command for the host agent. Then make a small edit to <target PHP file> that adds a try/catch block, and confirm the agent reports any new findings from that edit. Output the list of findings and whether the agent fixed them.
Caveat. Sloppy only reports pattern-based findings and does not judge whether the code is AI-generated, so a finding is a prompt to review the code, not proof of a defect.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Heyosseus/sloppy and "Catch agent-written PHP debt before the edit lands"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer