{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "heyosseus-sloppy--catch-agent-debt-while-it-codes",
 "repo": "Heyosseus/sloppy",
 "repo_url": "https://github.com/Heyosseus/sloppy",
 "repo_slug": "heyosseus-sloppy",
 "title": "Catch agent-written PHP debt before the edit lands",
 "page_title": "How to catch agent-written PHP debt before the edit lands with Sloppy",
 "summary": "Install Sloppy hooks so Claude Code, Gemini CLI or Codex checks each PHP edit and fixes new findings.",
 "who": "A PHP or Laravel developer who lets an AI coding agent write most of the code and wants it to clean up its own mistakes.",
 "problem": "Agents repeatedly produce swallowed exceptions, queries inside loops and oversized methods, and code review catches them late.",
 "outcome": "After each PHP edit the agent receives only the findings that edit introduced and fixes them before the developer reviews the change.",
 "steps": [
  "Run `composer require --dev heyosseus/sloppy` in the project root.",
  "Run `vendor/bin/sloppy` to scan the project and confirm the output.",
  "Run `vendor/bin/sloppy agents install` to add the Claude Code hooks, or `vendor/bin/sloppy agents install --host=gemini` or `vendor/bin/sloppy agents install --host=codex` for 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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "claude-code",
  "gemini-cli",
  "codex"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "php",
 "requirements": [
  "PHP 8.3 or newer",
  "Composer",
  "A PHP project with source roots listed in composer.json",
  "Git, for diff and review commands"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/heyosseus-sloppy/catch-agent-debt-while-it-codes/",
 "md": "https://dedupedai.com/use-cases/heyosseus-sloppy/catch-agent-debt-while-it-codes/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/heyosseus-sloppy--catch-agent-debt-while-it-codes.json",
 "api_version": "v1"
}
