| name | no-slop |
| description | Clean up AI-generated code quality issues across a codebase using 8 parallel subagents. Targets duplication, type sprawl, dead code, circular dependencies, weak types, unnecessary defensive programming, legacy/deprecated code, and AI slop (stubs, LARPing, useless comments). Use when asked to "clean up code", "fix slop", "improve code quality", "no slop", "remove AI slop", "deduplicate", "consolidate types", "remove dead code", or any request to systematically improve a messy or AI-generated codebase. |
No Slop
Dispatch 8 parallel subagents to systematically research, assess, and fix code quality issues. Each subagent owns one domain and works independently.
Prerequisites
Before dispatching, verify the project has:
- A working type checker (
tsc --noEmit, pyright, etc.)
- A test suite that passes on the current commit
- A clean git state (commit or stash uncommitted changes)
Run the type checker and test suite first. If either fails, stop and fix before proceeding — subagents must start from a green baseline.
Dispatch
Read references/subagent-prompts.md for the detailed prompt for each subagent.
Launch all 8 subagents in parallel using the Agent tool with isolation: "worktree" so they work on isolated copies. Each subagent gets:
- Deduplication — Consolidate duplicated logic, apply DRY where it reduces complexity
- Type Consolidation — Find scattered type definitions, consolidate shared types
- Dead Code Removal — Use knip or equivalent to find and remove unused code
- Circular Dependencies — Use madge or equivalent to find and untangle cycles
- Weak Type Elimination — Replace
any, unknown, type assertions with strong types
- Defensive Programming Cleanup — Remove try/catch and fallbacks that hide bugs
- Legacy Code Removal — Remove deprecated, legacy, fallback, and compatibility code
- AI Slop Cleanup — Remove stubs, LARPing, useless comments, debugging artifacts
Subagent prompt template
Each subagent prompt must include:
- The project path and language/framework
- The specific task from references/subagent-prompts.md
- Instruction to commit atomically per logical fix
- Instruction to run type checker and tests after changes
- Instruction to write a brief assessment summary as the final output
Review
After all subagents complete:
- Read each subagent's assessment summary
- Check for conflicts between subagent changes (e.g., one agent moved code another agent deleted)
- Present a consolidated report to the user:
- Issues found per category (count)
- Issues fixed per category (count)
- Issues flagged for human review (with file:line references)
- Any conflicts between subagent changes
Merge
After user approval:
- Merge subagent worktree branches one at a time, resolving conflicts
- Run the full type checker and test suite after all merges
- If failures occur, fix them before proceeding
- Create a final commit summarizing all changes
Scope Control
If the user specifies a subset of tasks (e.g., "just remove dead code and fix types"), dispatch only the relevant subagents. The 8 categories are independent — any subset works.
If the user targets a specific directory or set of files, pass that scope constraint to each subagent prompt.