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.

Human-readable sm swab output showing grouped quality gates and a no slop detected summary
The default sm swab view is built for humans: grouped gates, progress, timings, and a clear final verdict. Agent loops can use --porcelain when they need terse output instead.

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.

Project Status

slop-mop has reached 1.0.0. The current public policy surface for release and stability expectations lives here:

Quick Start

Install it:

pipx install slopmop[all]

Set up a repo:

sm init

Choose a starting point.

For an existing repo, start with refit. It walks the project through a structured cleanup before you enter the day-to-day maintenance loop:

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

If you cannot do the full refit right now, generate a baseline as a temporary escape hatch. That keeps new failures loud while you come back to the cleanup:

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

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 five verbs you will actually use:

Verb What it is for When to run it
sm status Workflow state and baseline snapshots When you need current state or a temporary baseline
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 first 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 the first-class onboarding path. Baseline mode is secondary: use it only to unblock yourself temporarily when you cannot run the full refit yet. Maintenance is the day-to-day loop after the repo is in decent shape.

Minimal Install

If you only want the framework without optional gate dependencies:

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 first. Use baseline mode only as a short-term unblocker when refit is not practical in the moment.

Migration behavior is documented in DOCS/MIGRATIONS.md.

Baselines

Sometimes you inherit a repo that is already messy and cannot stop for a full refit. 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 or skip refit. It is a temporary unblocker: stop old problems from blocking every unrelated change, then come back and clean them up deliberately.

CI

Run slop-mop in CI the same way you run it locally: install it and 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

Generated agent files are local workspace configuration. They should stay out of source control; the reusable source templates live in this repository under slopmop/agent_install/templates/.

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-1.0.2.tar.gz (402.8 kB view details)

Uploaded Source

Built Distribution

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

slopmop-1.0.2-py3-none-any.whl (475.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for slopmop-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c9aac3f5f6ebea9d5768c123f97171dbf617aa4a3fbc825fe97d77cdecf49fc0
MD5 30b5120d127ab2e0c190bdec538c6178
BLAKE2b-256 8953d78ca4883042cd69dce09b9a3b22125e7d840a22cb57ccd0cdeaab5174eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for slopmop-1.0.2.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-1.0.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for slopmop-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6c35fe46d350a6035c0901da53dbc4abfde8612c9e830e2f12a4bacc5dc05d85
MD5 a7e7dfd0343cc25450997977ba812352
BLAKE2b-256 7d341fb696f1a71de3feaa92ae852054d71779e7d0e57a7c430f8f944682552d

See more details on using hashes here.

Provenance

The following attestation bundles were made for slopmop-1.0.2-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