Skip to content
Euraika-Labs

stable · Python

ai-slopcheck

Deterministic scanner for AI-style code failures. 72 rules.

ai-slopcheck is a static checker that catches the patterns characteristic of LLM-authored code — unused imports added "just in case", overly defensive try/excepts that swallow errors, mock implementations left in place, half-finished TODO scaffolds, and so on.

pip install ai-slopcheck
slopcheck path/to/repo

The rules are deterministic. They produce the same finding on the same code regardless of model, day, or weather. We use it in our own CI to keep AI-assisted contributions honest.

What it actually catches

The 72 rules group into a handful of families. A few examples from each:

  • Defensive scaffolding that hides bugs. A bare try / except: pass; a catch that re-raises a different exception type with a generic message; a fallback path that swallows the failure and returns an empty result; a wrapper function that exists only to call its inner unchanged.
  • "Just-in-case" imports. Imports that no symbol in the file references. Imports of standard-library modules that are unused. Conditional imports inside functions where the function never branches on availability.
  • Mock implementations left behind. Functions whose body is return None # TODO, classes whose only method is pass, mocks named MockX re-exported from a non-test module.
  • Comment archaeology. Comments that describe a behavior the code no longer has. Section headers for code that was deleted. # Added for the X flow references where X is no longer in the codebase.
  • Pseudo-typing. Any used as a placeholder (rather than as a deliberate escape hatch). Type hints that contradict the runtime behavior. Generic types whose parameter is never bound.
  • Documentation that doesn't pay rent. Docstrings that restate the function name. Multi-paragraph module docstrings on a one-line module. Comments above well-named identifiers describing what the identifier already says.

Each rule has a fixer hint where one is unambiguous. None of the rules auto-fix; the point is to put the finding in front of a human, not to do another pass of LLM-style "cleanup."

Why it exists

Internal AI-assisted PRs were passing review and landing with these patterns intact. Reviewers got tired faster than the rules did. We wrote it for our own CI; we made it pip installable because the failure mode is universal.

← All projects