Stop the shortcuts agents take. Clean up the debt you already have.
A skipped test, a hidden error, a stub, a silenced type check. Anti-slop finds these in every change an agent makes, and sends the change back with each finding. Weekly debt cleanup fixes the old ones.
- Test skippedsrc/checkout/coupon.test.ts:88
it.skip('rejects an expired coupon', …) - Error swallowedsrc/checkout/apply-coupon.ts:41
} catch {}
- FixedTest skippedAnti-slop
- FixedError swallowedAnti-slop
The task view is a copy of the CoRoid portal. The task, files and findings in it are illustrative.
- Rules
- 116
- Families
- 13
- Rules that block by default
- 46
- Existing findings that block a change
- 0
What it looks for
Rules are grouped in families. Each rule blocks, advises or only records. An owner can change that for the organisation or for one project.
- Tests
- Focused or skipped tests, deleted tests, removed or weaker assertions, tests that cannot fail, and retries that hide a flaky test.
.only.skipexpect(true).toBe(true)
- Suppressions
- New lint disables, ignored type errors, casts to any, and code excluded from coverage.
@ts-ignoreas anyeslint-disable
- Build and CI
- Test steps removed or allowed to fail, lower coverage limits, test runs that pass with no tests, skipped commit hooks, and committed build output.
continue-on-error: true--passWithNoTests
- Test evidence
- A test run that ran nothing, fewer tests than the last passing run, a partial run reported as complete, and old cached results shown as a new run.
Tests: 0 total--onlyChanged
- Production code
- Placeholder code, debug code, notes such as “in a real implementation”, instructions meant for a person, mock data, and production code that imports test code.
throw new Error('Not implemented')debugger;
- Error handling
- Errors that are hidden or replaced by a default value, permission checks that allow access when they fail, and retries with no limit.
except: pass.catch(() => {})
- Security
- Hard-coded secrets, TLS checks turned off, removed sign-in checks, open CORS with credentials, and SQL built from strings. Security owns these rules and decides what they do.
rejectUnauthorized: falseverify=False
- Architecture
- New import loops, imports across the boundaries you set, copied blocks, code the change left unused, and new copies of patterns you retired.
- Dependencies
- A changed manifest without its lockfile, a second library for a job that one already does, versions that are not pinned, and upgrades nobody asked for.
"latest"
- Caching
- Cache keys without the tenant, memory caches that never expire, and build-time values that the code should read when it runs.
- Comments
- Comments that repeat the next line, describe the edit, hedge, or contradict the code beside them.
// Updated to// should work
- Change scope
- Files the specification does not include, changes to formatting only, and renames the task did not need.
- Agent trail
- What the agent did on the way, for example deleting the test it failed, or changing an expected value to what the failed run printed.
Only what the change introduced blocks
Most repositories already have some of these patterns. Anti-slop sorts each finding by where it came from, so old debt never stops new work.
- Introduced
- New in this change. A finding from a blocking rule sends the change back to the Developer agent.
- Touched
- Already there, on a line or in a function that the change edits. It is recorded. The change fixes it if your change discipline asks for that.
- Existing
- Somewhere else in the repository. It is recorded as debt in the Factory. Weekly debt cleanup can fix it for you.
Moving code does not count as introducing it. Copying it does.
Fix the old debt, a little each week
Old debt does not block, but it does not have to stay. Turn on Weekly debt cleanup for a project, and CoRoid fixes it in small steps.
- Each week, CoRoid scans the default branch for existing debt
- It files small cleanup tasks of a few files each
- You choose how many cleanup tasks can be open at a time, so your requests come first
- Each cleanup task is tested and reviewed like any other task, and you approve the pull request
- TestsBlocks
- SuppressionsBlocks
- Production codeBlocks
- Error handlingBlocks
- CommentsAdvises
- Change scopeAdvises
You decide how far a change may reach
The change discipline tells the Developer agent what it can clean up while it works.
- SurgicalOnly what the specification needs. Other problems are reported, not fixed.
- BalancedDefaultAlso fixes small problems on lines that the change edits anyway.
- RestorativeAlso cleans up findings in the functions that the change edits.
The Developer agent follows the same rules
Anti-slop does not only judge at the end. The agent gets the rules while it writes the change, and it cannot overrule them.
- The agent starts with your change discipline and the patterns you blocked, each with the pattern to use instead.
- It sees the fast rules after each edit, and gets one chance to fix blocking findings before QA runs.
- Agents cannot accept their own findings. If an agent says a test was wrong and changes it, a reviewer must approve that change.
- A repository file,
.coroid/anti-slop.yml, can add rules and exclude generated paths. CoRoid reads it from the base of the change, so a change cannot loosen its own rules.
Agents make up package names. Attackers register them.
This is called slopsquatting. A model suggests a package that does not exist. Someone publishes a package with that name, and the next agent that installs it runs their code.
In one study of 2.23 million code samples from 16 models, 19.7% named at least one package that does not exist. When the same prompts ran ten times, 43% of those names came back every time, so attackers can predict them.
What CoRoid checks on every new dependency
- CoRoid looks up each npm or PyPI package that an agent adds in its public registry.
- A package that does not exist sends the change back to the Developer agent. An owner must first confirm that your projects install from the public registries.
- CoRoid flags a package for review when it is less than 30 days old. It also flags names one or two letters away from a popular package, and npm packages with very few downloads.
- With the same setting, a package listed as malicious in the OSV database also sends the change back. For PyPI, CoRoid cannot tell which release a requirement installs, so it only flags an advisory about specific releases.
- CoRoid flags new npm packages that run code when they are installed (install scripts).
If a bad package is installed anyway
Agent commands run in an isolated sandbox. It holds no model provider keys, no repository tokens and none of your project's secret variables.
These rules belong to Security's code scanning. They check the dependencies a change adds. For the packages you already have, Security watches for new advisories.
Use the same rules for the agents you already have
Engineers who use their own coding agents can use your organisation's rules too.
- AGENTS.md snippet
- Download a section for your agents' instructions, with the project's change discipline, blocked patterns and most important rules.
- CoRoid MCP server
anti_slop_rulesdescribes your published policy.anti_slop_scanscans a branch of a synced project. Both only read.- CoRoid Quality Control on pull requests
- With pull request checks on, the same check runs on the GitHub pull requests your developers open, and marks each finding on its line.
Tested on our own code first
CoRoid is built with CoRoid. Anti-slop ran on CoRoid's own repository before it ran on any other.
A scan of every source file
We scanned all 11,536 source files in CoRoid's repository as if an agent had just written them. The scan found 6 patterns that the rules flagged by mistake. We fixed them, and blocking findings fell from 5,366 to 2,253.
What still blocks is what the rules must find, for example a note in our notification code: “In a real implementation, you would fetch the user’s FCM token.”
Rules a model judges
Two rules ask a model about one line at a time: a check for something the code already prevents, and a comment that contradicts the code beside it. They only advise. Of 600 lines from real merged changes, they flagged none by mistake, and they cost at most US$0.0015 per scan.
Switch it on in Quality Control
Owners and admins turn on anti-slop for the organisation default or for one project. The next run of that project uses it.
- Open Quality Control and choose the organisation default or a project.
- Turn on Anti-slop. It adds five expectations to the policy.
- Choose the change discipline and which groups block. For one project, you can also turn on Weekly debt cleanup. If you turn anti-slop off, CoRoid keeps these settings for next time.
The five expectations it adds
- Tests still prove the change
- Nothing unfinished or test-only ships
- No new structural debt
- The change stays in scope and reads like this codebase
- New dependencies are real and reputable
- Organisation default3 projects follow it2 of 5
- StorefrontOwn setup4 of 5
- Docs siteFollows default2 of 5
- Billing APIFollows default2 of 5
- Mobile appFollows default2 of 5
- Anti-slopSends a change back when it weakens tests, swallows errors, ships placeholders or adds structural debt.
- Unit testsFinds and runs the repository's unit tests on every change.
- Browser tests2 of 3differs from defaultRuns your browser journeys against the change.
- Translationsdiffers from defaultChecks that changed strings are translated and that their placeholders and plural forms match.
- Repository checksRuns your own commands, such as formatting, file size, migrations, integration tests and security scans.
- Thorough QAThoroughQA collects live evidence and screenshots against the Specification. When it is off, work gets Standard QA.