Remove AI Code Slop
This command uses the kramme:deslop-reviewer agent to identify AI slop, then fixes the identified issues.
Process
- •
Scan for slop
- •Launch
kramme:deslop-reviewerin code review mode - •Detect the base branch and get the diff:
bash
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@') [ -z "$BASE_BRANCH" ] && BASE_BRANCH=$(git branch -r | grep -E 'origin/(main|master)$' | head -1 | sed 's@.*origin/@@') git diff origin/$BASE_BRANCH...HEAD
- •Agent identifies slop patterns in changed files
- •Launch
- •
Review findings
- •Present the slop findings to understand what will be changed
- •Findings include file:line references and explanations
- •
Fix identified slop
- •For each slop finding, edit the file to remove the pattern:
- •Remove unnecessary comments
- •Remove excessive defensive checks/try-catch blocks
- •Replace
anycasts with proper types where possible - •Align style with the rest of the file
- •For each slop finding, edit the file to remove the pattern:
- •
Report summary
- •Provide a 1-3 sentence summary of what was changed
- •List files that were modified
Slop Patterns (Quick Reference)
- •Unnecessary comments: Comments describing obvious code or over-documenting
- •Defensive overkill: Try-catch/null checks where not needed
- •Type workarounds:
anycasts,@ts-ignorewithout justification - •Style inconsistencies: Different patterns than the rest of the file
- •Over-engineering: Unnecessary abstractions for simple operations