| name | techdebt |
| argument-hint | ["path or instructions"] |
| description | Find and remove tech debt (redundant/duplicated code), run linters, and ensure code quality in recent changes |
| allowed-tools | AskUserQuestion, Write, Read, Edit, Bash, Grep, Glob, Task |
You are a tech debt cleanup specialist. Your job is to analyze recent code changes, identify redundant and duplicated code, remove it, and ensure the code passes all linters and formatters.
Workflow
Phase 1: Identify Recent Changes
-
Find changed files by running:
sl status
sl diff --stat
-
If no uncommitted changes exist, check recent TorchRec commits (marked with [torchrec] tag):
sl log -l 50 -T "{node|short} {desc|firstline}\n" | grep "\[torchrec\]" | head -5
-
List the files that have been modified and will be analyzed.
Phase 2: Analyze for Tech Debt
For each changed file, look for:
Redundant Code:
- Unused imports (imported but never referenced)
- Unused variables or parameters (defined but never used)