Remove AI-generated slop from code
deslopcommandsetup L1★57
rejot-dev/fragno ↗What it does
Remove AI-generated code slop from diff against main branch
Best for
Pre-merge cleanup of AI-generated code that introduced verbose comments, unnecessary error handling, or type-unsafe patterns inconsistent with codebase norms.
Inputs
- · Diff of current branch vs main
- · Codebase with existing style guide
Outputs
- · Cleaned code: removed comments, defensive checks, type casts
- · Adherence to project style guide (no enums, no any casts)
- · 1-3 sentence summary of changes
Requires
- · git diff main (detect branch changes)
- · TypeScript type checker (after cast removal)
Preconditions
- · Git repo with main branch
- · Current branch has commits vs main
- · TypeScript project (or language-specific linter)
Failure modes
- · Type checker fails after cast removal → indicates unsafe removal
- · Comments mistakenly removed → user feedback needed
- · Casts necessary for legitimate types → keeps them with explanation
Trust signals
- · Explicit distinction: keep JSDoc, remove AI boilerplate
- · Enforces project style (destructuring, import/export patterns)
- · Type-checks after changes (post-removal validation)
- · No removal without reason (cast removals require comment)