| name | de-sloppify |
| description | Two-pass development pattern for cleaner output. Use after implementing a large feature, complex refactor, or any substantial code change. Separates implementation from cleanup for better results. Two focused agents beat one constrained agent. |
De-Sloppify Pattern
Two focused passes beat one constrained pass. First implement, then clean up in a separate pass with fresh eyes.
The Problem
When you ask for implementation + quality in one pass, you get neither done well. The model tries to satisfy conflicting constraints: "write fast" vs "write clean."
The Pattern
Pass 1: Implement
Focus entirely on making it work. Get the feature done, tests passing, logic correct. Don't worry about:
- Console.log statements
- Commented-out code
- Verbose variable names
- Tests that test language behavior rather than business logic
- Overly defensive error handling
Pass 2: De-Sloppify
Fresh review of all changes. Check for and fix:
- Dead code — Remove commented-out code, unused imports, unreachable branches
- Debug artifacts — Remove console.log, print(), debugger statements
- Test quality — Remove tests that test the type system or framework behavior, not your code
- Over-engineering — Simplify abstractions that only have one implementation
- Naming — Rename vague variables (
data, result, temp, x)
- Error handling — Remove catch blocks that just re-throw, add handling where it's actually needed
- Consistency — Match existing code style and patterns in the codebase
Usage
After implementing a feature:
"Review all the changes we just made. De-sloppify: remove dead code, debug artifacts,
tests of language behavior, and over-engineering. Run the test suite after cleanup."
When to Use
- After any implementation that touched 3+ files
- After a rapid prototyping session
- Before creating a PR
- After a long debugging session that left artifacts