sloppy

Static analysis for the debt AI agents leave in PHP: 34 rules, Claude Code hooks, git-diff review, a Rector and Pint fix pass, Pest expectations, CI annotations

What is sloppy?

Static analysis for the debt AI agents leave in PHP: 34 rules, Claude Code hooks, git-diff review, a Rector and Pint fix pass, Pest expectations, CI annotations and an MCP server. Deterministic, local, no LLM.

Overview of sloppy

What it is

Sloppy is a static analysis tool for PHP that detects code quality issues commonly introduced by AI agents. It provides 34 deterministic rules, Claude Code hooks, git-diff review, a Rector and Pint fix pass, Pest expectations, CI annotations, and an MCP server. It is local, requires no LLM, and has no network dependency.

Key features

  • 34 deterministic rules covering complexity, duplication, dead code, error handling, readability, Laravel, routes/migrations, performance, dependencies, architecture, and suppression.
  • Agent integration: hooks into Claude Code (and Gemini CLI, Codex) to check every edit and prevent dirty finishes.
  • Git-diff review: reports only findings introduced by a branch, not inherited ones.
  • Baseline support: accepts existing debt so only new findings fail the build.
  • CI annotations: annotates diffs on GitHub pull requests and fills GitLab Code Quality widget.
  • Fix pass: hands mechanical findings to Rector, deletes redundant comments, then formats with Pint.
  • Pest expectations: ships a Pest plugin to fail tests on new debt.

Use cases

  • Catching code quality issues (god methods, swallowed exceptions, N+1 queries) inside Claude Code, CI, and Pest suites.
  • Reviewing changes on a branch to see only newly introduced defects.
  • Adopting static analysis on a codebase with history using baselines.
  • Gating new debt in CI with minimal configuration.
  • Fixing mechanical issues automatically with Rector and Pint.

Getting started

bashcomposer require --dev heyosseus/sloppyvendor/bin/sloppy # scan the project (php artisan sloppy in Laravel)vendor/bin/sloppy agents install # make Claude Code check its own work (--host=gemini, --host=codex)No configuration file or account required. Runs on any PHP 8.3+ project. For Laravel 12 or 13, ten Eloquent-aware rules are added automatically.

License and pricing

MIT license. Open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/heyosseussloppy.svg)](https://yunodb.com/tools/heyosseussloppy?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/heyosseussloppy?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/heyosseussloppy.svg" alt="Featured on YunoDB" height="20"></a>