$npx -y skills add maddhruv/absolute --skill absolute-debtLint and typecheck debt paydown: clear pre-existing repo-wide lint/type violations and suppressions (@ts-ignore, # type: ignore) one rule per wave, fixing causes not symptoms. Runs on green main. For diff-scoped quality use absolute-simplify. Triggers on "absolute debt", "fix our
| 1 | > Start your first response with the 🧾 emoji. |
| 2 | |
| 3 | ## Absolute Debt |
| 4 | |
| 5 | Pay down accumulated lint and type-checker debt across the repo — existing warnings, |
| 6 | errors, and suppressions that built up over time — in safe waves, by rule, with tests green |
| 7 | after each. The goal is a genuinely clean `lint` + `typecheck`, not a quieter one. |
| 8 | |
| 9 | Runs the shared engine in **`references/health-engine.md`** — read it for the |
| 10 | DETECT → SCAN → TRIAGE → FIX → VERIFY → REPORT loop and the safety contract. This file |
| 11 | covers only what's specific to lint/type debt. |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## When to use |
| 16 | |
| 17 | - "Fix our lint warnings", "clean up the type errors", "get the codebase to strict mode". |
| 18 | - Tightening config (enable a rule, raise `tsconfig` strictness) and clearing the fallout. |
| 19 | - Burning down accumulated `eslint-disable` / `@ts-ignore` / `# type: ignore` suppressions. |
| 20 | |
| 21 | **`debt` vs `simplify`:** `simplify` improves *your working diff's* quality. `debt` clears |
| 22 | **pre-existing repo-wide** lint/type violations on green `main`. Use `debt` for standing |
| 23 | cleanup, not for changes you're actively making. |
| 24 | |
| 25 | --- |
| 26 | |
| 27 | ## What it scans |
| 28 | |
| 29 | | Ecosystem | Lint debt | Type debt | |
| 30 | |---|---|---| |
| 31 | | JS/TS | `eslint .` (full report, by rule) | `tsc --noEmit` | |
| 32 | | Python | `ruff check` / `flake8` | `mypy` / `pyright` | |
| 33 | | Go | `golangci-lint run` | `go vet ./...`, `staticcheck` | |
| 34 | |
| 35 | Also inventory **suppressions** as debt in their own right: `eslint-disable*`, |
| 36 | `@ts-ignore`/`@ts-expect-error`, `# type: ignore`, `# noqa`, `//nolint`. Each is a hidden |
| 37 | violation. Count violations grouped **by rule** (not by file) — that's how you wave them. |
| 38 | |
| 39 | --- |
| 40 | |
| 41 | ## Risk ranking (TRIAGE) |
| 42 | |
| 43 | | Wave | Class | Default | |
| 44 | |---|---|---| |
| 45 | | 1 | autofixable lint (`eslint --fix`, `ruff --fix`, `gofmt`) | fix now — mechanical, safe | |
| 46 | | 2 | manual lint by rule, low behavioral risk (unused, style, imports) | fix this pass, one rule at a time | |
| 47 | | 3 | type errors, and lint rules that can change behavior if "fixed" wrong | gated — review each, may need real logic | |
| 48 | | 4 | removing suppressions (`@ts-ignore` etc.) | gated — each may surface a real bug | |
| 49 | |
| 50 | Fix **one rule across the repo per wave**, not one file across all rules — keeps diffs |
| 51 | reviewable and regressions bisectable. Config tightening (enable rule / raise strictness) is |
| 52 | itself a finding: propose it, then clear what it surfaces. |
| 53 | |
| 54 | --- |
| 55 | |
| 56 | ## Fix & verify |
| 57 | |
| 58 | - Run the autofixers first (wave 1), commit-ready, then re-scan to see what's truly manual. |
| 59 | - Manual fixes: address the *cause*, not the symptom. A type error means the types are |
| 60 | wrong somewhere — fix the type, don't cast to `any`/add `# type: ignore`. |
| 61 | - **Never** clear a violation by suppressing it. Removing suppressions is the *goal*, not a tool. |
| 62 | - After each wave: full test + lint + typecheck + build. The violation count must drop and |
| 63 | nothing regress. |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ## Gotchas |
| 68 | |
| 69 | 1. **Fixing by suppressing.** `@ts-ignore` to clear a type error *adds* debt. Forbidden here. |
| 70 | 2. **`any` / `cast` to win.** Silences the checker, keeps the bug. Fix the real type. |
| 71 | 3. **One-file-all-rules waves.** Mixes concerns, unreviewable. Go one-rule-all-files. |
| 72 | 4. **Autofix without review.** `--fix` can change behavior (e.g. `prefer-const` on a |
| 73 | reassigned var via a bug). Run tests after autofix too. |
| 74 | 5. **Disabling the rule instead of fixing.** Loosening config to hit zero is debt laundering, |
| 75 | not paydown. |
| 76 | |
| 77 | --- |
| 78 | |
| 79 | ## Companion commands |
| 80 | |
| 81 | - **`/absolute simplify`** — quality of code you're *currently changing*. |
| 82 | - **`/absolute prune`** — many unused-var/import warnings vanish once dead code is pruned. |
| 83 | - **`/absolute work`** — if clearing the debt needs real refactoring, hand off. |