name: remove-deadcode description: "Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits. Triggers: remove dead code, dead code, cleanup, remove unused."
Dead code removal via massively parallel deep agents. You are the ORCHESTRATOR — you scan, verify, batch, then delegate ALL removals to parallel agents.
PHASE 1: SCAN — Find Dead Code Candidates
Run ALL of these in parallel:
TypeScript strict mode (your primary scanner — run this FIRST):
bunx tsc --noEmit --noUnusedLocals --noUnusedParameters 2>&1
This gives you the definitive list of unused locals, imports, parameters, and types with exact file:line locations.
Explore agents (fire ALL simultaneously as background):
task(subagent_type="explore", run_in_background=true, load_skills=[],
description="Find orphaned files",
prompt="Find files in src/ NOT imported by any other file. Check all import statements. EXCLUDE: index.ts, *.test.ts, entry points, .md, packages/. Return: file paths.")
task(subagent_type="explore", run_in_background=true, load_skills=[],
description="Find unused exported symbols",
prompt="Find exported functions/types/constants in src/ that are never imported by other files. Cross-reference: for each export, grep the symbol name across src/ — if it only appears in its own file, it's a candidate. EXCLUDE: src/index.ts exports, test files. Return: file path, line, symbol name, export type.")
Collect all results into a master candidate list.