AI Slop in Pull Requests: Catch It Before Review
A generated PR is not a review task until the mechanical residue is gone.
AI slop in pull requests is why generated diffs feel large and still "fine." The model optimized for making the prompt work. Code quality for the next maintainer was not the objective. Reviewers then inherit the search process: extra files, extra comments, extra fallbacks.
Before a human opens the PR
- Scan changed files:
npx aislop scan --changes --base origin/main - Fix mechanical issues:
npx aislop fix - Hand remaining findings to the agent that wrote them
- Re-scan. Then request review
Agent hooks can run that loop on each edit so the PR never contains the easy residue. Docs: agent hooks.
On the pull request
CI should fail on a code quality threshold or on error-severity diagnostics. That is the gate. A conversational bot can still comment on intent. It should not be the only check. Related: how to review AI written code.
Frequently asked questions
What is AI slop in a pull request?
Named residue in the diff: silent catches, leftover comments, dead helpers, unsafe casts, TODO stubs. It compiles. It still costs the reviewer.
How do I stop AI slop pull requests?
Scan changed files before review, auto-fix what is mechanical, hand the rest back to the agent, and keep a CI score threshold so the same shapes cannot merge.
Should reviewers read every generated line?
No. Automate repeatable checks. Spend people on behavior, architecture, and risk.