mcpField

De-Sloppify Pass

FeaturedOn demand
Code QualityUp to 4 rounds

About De-Sloppify Pass

This loop tidies up the latest changes made by a coding agent so they stay minimal and follow project conventions. Each round reviews the changes, fixes anything superfluous or inconsistent, then runs lint and tests to confirm. It is started manually and runs at most 4 rounds.

Key features

  1. 01Manual trigger, so the user decides when it starts
  2. 02Checks each round with npm run lint && npm test
  3. 03Capped at 4 rounds to avoid endless edits
  4. 04Supports Claude Code and Cursor

Use cases

  1. 01Final cleanup after a coding agent finishes a feature, before merging
  2. 02Large changes where unrelated edits may have slipped in
  3. 03Keeping new code consistent with existing project conventions
Goal
Recent changes are clean, minimal and aligned with project conventions, and lint and tests pass.
Exit when
Stop when the review finds nothing left to clean up and npm run lint && npm test passes, or after 4 rounds.
Between iterations run
npm run lint && npm test

Launch prompt

Paste into Claude Code / Cursor. The agent repeats the steps below until the exit condition is met.

prompt.md
Start the "De-Sloppify Pass" loop.
Goal: Recent changes are clean, minimal and aligned with project conventions, and lint and tests pass.
Max iterations: 4.
Step 1: Review recent changes — Read through the latest changes and look for superfluous code, unrelated edits and departures from project conventions.
Step 2: Clean up findings — Make the smallest edits that resolve what the review found, without refactoring unrelated code.
Step 3: Run the checks — Run npm run lint && npm test. Any failure becomes the first thing to address in the next round. `npm run lint && npm test`
Step 4: Decide whether to continue — Stop if the review is clean and the checks pass; otherwise start another round within the round limit.
Between iterations run: `npm run lint && npm test`
Exit when: Stop when the review finds nothing left to clean up and npm run lint && npm test passes, or after 4 rounds.

Steps

Each round runs in order; if the exit condition isn’t met, another round starts, up to 4.

01
Review recent changes

Read through the latest changes and look for superfluous code, unrelated edits and departures from project conventions.

02
Clean up findings

Make the smallest edits that resolve what the review found, without refactoring unrelated code.

03
Run the checks

Run npm run lint && npm test. Any failure becomes the first thing to address in the next round.

$npm run lint && npm test
04
Decide whether to continue

Stop if the review is clean and the checks pass; otherwise start another round within the round limit.

Not met → next roundExits when met

Supported agents

Coding agents that can run this loop directly.

Claude Code
Cursor

Comments

Markdown supported