Skip to main content

Quality gates for AI-assisted codebases — catch the slop LLMs leave behind.

Project description

🪣 Slop-Mop

Primary code scanning gate Coverage PyPI version Python versions Latest GitHub release License

Slop-mop is a quality gate runner for AI-assisted codebases.

It does not try to make agents smart. It gives them greased rails: a path of least resistance toward more maintainable choices. Run the tool, read what failed, fix that thing, run it again.

That is the whole idea.

Agents are good at closing the ticket in front of them. They are less good at not leaving the codebase worse than they found it. Slop-mop looks for the mess that still passes normal checks: shallow tests, duplicated logic, missing coverage, complexity creep, stale config, unhandled PR feedback.

It is opinionated. Sometimes loudly. That is on purpose.

Quick Start

Install it:

pipx install slopmop[all]

Set up a repo:

sm init

Choose a starting point.

If the repo is already carrying failures, create a baseline and report only new failures while you clean up:

sm status --generate-baseline-snapshot
sm swab --ignore-baseline-failures

If you want slop-mop to walk the repo through a structured cleanup first, use refit instead:

sm refit --start

Run the normal loop:

sm swab

If it fails, fix what it reported and run sm swab again. When it passes, commit. Before opening or updating a PR, run the deeper pass:

sm scour

After CI or review feedback lands:

sm buff

If you are not sure what comes next, use the auto-advance command:

sm sail

It reads the current workflow state and runs the next obvious slop-mop verb.

The Loop

Slop-mop has four verbs you will actually use:

Verb What it is for When to run it
sm swab Code-centric local feedback After meaningful code changes
sm scour Code-centric pre-PR sweep Before opening or updating a PR
sm buff Process-centric CI and review follow-up After CI completes or review feedback lands
sm sail Process-centric next-step selection When you are not sure what to do next

The boring version:

write code -> sm swab -> commit -> sm scour -> push/open PR -> sm buff

The workflow state machine is documented in DOCS/WORKFLOW.md.

What It Checks

Slop-mop groups gates around four common agent failure modes.

Overconfidence
Code exists, but is it tested? Typed? Covered? This catches missing tests, coverage gaps, and type-checking blind spots.

Deceptiveness
Tests pass, but do they prove anything? This catches bogus tests, debugger artifacts, and other signs that the repo only looks clean.

Laziness
The code works, but it is starting to rot. This catches complexity creep, dead code, formatting drift, repeated code, stale docs, and silenced gates.

Myopia
The local change looks fine, but the repo-wide picture is worse. This catches duplication, security issues, dependency risk, and similar cross-cutting mess.

The full gate reasoning lives in DOCS/GATE_REASONING.md.

Refit vs Maintenance

There are two modes.

Use refit when a repo is already dirty and you need a structured cleanup plan:

sm refit --start
sm refit --iterate
sm refit --finish

Use maintenance once the repo is in decent shape:

sm swab
sm scour
sm buff

Refit is slower and more deliberate. Maintenance is the day-to-day loop.

Install Notes

Most users should install everything:

pipx install slopmop[all]

Minimal install:

pipx install slopmop

Minimal install gives you the framework. Gates that need tools like black, pyright, bandit, or pytest will tell you what is missing.

Developer setup details live in DOCS/DEVELOPING.md.

Configuration

sm init writes .sb_config.json after looking at the repo. It enables gates that appear relevant and leaves non-applicable gates alone.

Useful commands:

sm config --show
sm config --enable myopia:vulnerability-blindness.py
sm config --disable laziness:complexity-creep.py

Disabling a gate should be temporary. If a gate is wrong, tune it or file the tooling bug. If the repo is not ready yet, use refit or baseline mode instead of pretending the problem is gone.

Migration behavior is documented in DOCS/MIGRATIONS.md.

Baselines

Sometimes you inherit a repo that is already messy. Slop-mop can snapshot the current failures so new failures stay loud while old ones get paid down.

sm status --generate-baseline-snapshot
sm swab --ignore-baseline-failures
sm scour --ignore-baseline-failures

This is not a way to hide problems. It is a way to stop old problems from blocking every unrelated change while you clean them up deliberately.

CI

Run slop-mop in CI the same way you run it locally: install it, check out enough git history for history-aware gates, then run the gate command.

See DOCS/CI.md for a GitHub Actions template.

Agent Setup

Slop-mop can install repo-local agent instructions for common coding agents:

sm agent install

You can target one agent if you prefer:

sm agent install --target copilot
sm agent install --target cursor
sm agent install --target claude

The short version for agents: ride the rail, fix what it reports, do not bypass the gate.

Custom Gates

Slop-mop's CI framework is well adapted to existing checks that are not covered by built-in gates. Add your own check as a custom gate and manage it like any other slop-mop quality gate.

Start with DOCS/NEW_GATE_PROTOCOL.md.

When To Push Back On The Tool

Sometimes slop-mop is wrong.

That is useful information. Do not route around it with ad-hoc commands and pretend the rail is fine. Fix the gate, tune the config, or file the bug. The point is not obedience. The point is making the correct workflow easier than the wrong one.

For slop-mop tooling friction, start with:

sm barnacle --help

Contributing

For repo conventions, see DOCS/CONVENTIONS.md.

For contribution guidance, see DOCS/CONTRIBUTING.md.

For local development, see DOCS/DEVELOPING.md.

License

Slop-mop uses the Slop-Mop Attribution License v1.0.

If you use it, attribution is required.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slopmop-0.15.1.tar.gz (393.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slopmop-0.15.1-py3-none-any.whl (466.9 kB view details)

Uploaded Python 3

File details

Details for the file slopmop-0.15.1.tar.gz.

File metadata

  • Download URL: slopmop-0.15.1.tar.gz
  • Upload date:
  • Size: 393.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slopmop-0.15.1.tar.gz
Algorithm Hash digest
SHA256 d5b628a099469a933e9f308bef0354f5ded334635f5f5f6806f6fa66a6e596d2
MD5 a5f2e690ff698a627e761522225da3da
BLAKE2b-256 2a228a379234b2494f06fe534e439c9194a247f71ee395d0d16e9c13366e28d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for slopmop-0.15.1.tar.gz:

Publisher: release.yml on ScienceIsNeato/slop-mop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file slopmop-0.15.1-py3-none-any.whl.

File metadata

  • Download URL: slopmop-0.15.1-py3-none-any.whl
  • Upload date:
  • Size: 466.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slopmop-0.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bbf4086f9d6d95a31c7cae529b354ab527934256fc391f2ff36e7786b9f0081
MD5 5e6f25bb31b212f7ee5eaa8f143cae65
BLAKE2b-256 7c6ebd0af6ef3e22ee54e13ccee22cdd0e39725c11dfe8599a16de3768b01ef5

See more details on using hashes here.

Provenance

The following attestation bundles were made for slopmop-0.15.1-py3-none-any.whl:

Publisher: release.yml on ScienceIsNeato/slop-mop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page