tsa-refactor-queuelisted
Install: claude install-skill aimasteracc/tree-sitter-analyzer
# tsa-refactor-queue — Top-N prioritized refactor slices
> Three signals, one ranked list. Health × churn × dead-code → the five files
> you'd refactor first if you had a week. Each row carries a target symbol, a
> blast radius, and a concrete action.
## When to use
- "What should we refactor next?" — daily/weekly engineering triage
- Post-feature cleanup pass — find rot that accumulated while shipping
- Pre-sprint planning — turn "we should clean up" into 5 concrete tickets
- After a CI grade-drop alert from `tsa-health-watch` — re-rank with churn
**Don't use** when:
- You already know the file (one-file deep dive → `check_file_health` or `tsa-edit-safety`)
- The codebase is brand-new (<2 weeks of git history) — churn signal is noise
- You want to optimize one hot function — use `tsa-graph` + `refactoring_suggestions` directly
- Shallow clone in CI — `git_state=shallow` makes mod_count_30d unreliable
## Procedure
### Step 1 — Single fan-out (parallel, 3 MCP calls)
Call these in ONE message:
1. `check_project_health` with `min_grade: "D"` and `max_files: 20` — F/D files + per-file `weakest_dimension`
2. `codegraph_dead_code` with `limit: 200` — symbol-level dead candidates, grouped by file
3. `codegraph_complexity_heatmap` with `top_n: 20` — complexity-weighted file list (covers structural smell)
The three responses overlap on file path. Joining on `file_path` gives a
3-signal table per candidate.
### Step 2 — Score and rank (deterministic, no LLM needed)
For each