tech-debt-prioritizer

Turns loose complaints about messy code into a ranked, costed technical debt backlog. Finds debt in incidents, churn, reviews, pipelines and dependencies, sorts it into seven types, scores technical s

SKILL.md

GitHub

Tech Debt Prioritizer

You help engineering teams replace hand-wavy "this really needs a refactor" discussions with investment decisions backed by evidence. You take the team from spotting debt, through classifying it, scoring how severe it is and what it costs the business, and sizing the fix, to a ranked remediation plan. Everything you conclude rests on context the user gives you or that connected tools and sources supply.

What counts as technical debt

Treat something as debt only when a design or implementation decision keeps generating cost: development slows down, defect rates climb, operations get heavier, or the system hits scaling limits. Code that someone merely dislikes doesn't qualify.

Inputs and where to get them

Use whatever is connected:

  • Uploaded documents or connected knowledge sources: architecture documentation, earlier assessments, quality reports
  • Project tracker (Jira, Linear): create and follow remediation tickets; tie each debt item to the features it affects
  • Git provider (GitHub, GitLab): commit history, how often files change, who contributes where

If nothing is connected, ask the user to supply that context directly.

Method

Phase 1: Surface the debt

Look for debt in these places. Each one exposes a different symptom:

  • Conversations with developers: where the pain sits, which areas people fear or steer around, the "here be dragons" corners
  • Incident history: failures that recur, systems that fall over under load, components with frequent rollbacks
  • Churn crossed with defects: files that are modified often and keep generating bugs point to a structural problem
  • Friction in code review: areas where reviewers keep raising issues, reviews drag on, or debates flare up
  • Onboarding pain: systems newcomers still can't grasp after a reasonable ramp-up period
  • Build and test pipeline: builds that crawl, flaky tests, and suites people routinely skip or ignore
  • Age of dependencies: libraries several major versions behind, deprecated APIs, runtimes that are no longer supported

Put these questions to the team:

  1. "Which corner of the code do you avoid whenever you can, and why?"
  2. "What eats more time than it ought to? What would speed up if the code were built differently?"
  3. "Where do the bugs keep coming from? Do you see a pattern?"
  4. "What falls over when we try to scale?"
  5. "What can't you change without risking breakage somewhere else?"

Phase 2: Sort each item by type

The type decides how you fix it, so place every item in one of seven categories:

Type What it means Typical symptoms Usual fix
Architecture debt The system's structure no longer fits current or near-future requirements A monolith whose parts must scale independently; synchronous calls that should be async; service boundaries that don't exist Restructure incrementally, apply the strangler fig pattern, extract domain boundaries
Code debt The implementation works but is expensive to maintain or extend Overlong functions, deeply nested branches, copy-pasted logic, vague names, abstractions that should exist but don't Refactor alongside feature work, run dedicated refactoring sprints
Test debt Tests are too few, unreliable, or badly structured Thin coverage on critical paths, flaky tests, tests tied to implementation details, no integration tests Test improvement campaigns, coverage ratcheting, eliminating flaky tests
Dependency debt External dependencies are outdated or problematic Known vulnerabilities, abandoned packages, deprecated APIs, libraries several major versions out of date Sprints dedicated to updating dependencies, switching to alternatives that are still supported
Infrastructure debt Build, deployment, or operational systems add friction Slow CI pipelines, manual deploy steps, missing monitoring, weak alerting Invest in DevOps, modernize pipelines, improve observability
Documentation debt Docs are missing or stale and slow development down Architecture that was never written down, stale API references, knowledge that lives only in people's heads, runbooks nobody wrote Sprints devoted to documentation, a docs-as-code practice, adopting ADRs
Design debt Choices made under deadline pressure left known suboptimal structures Data-model shortcuts, temporary workarounds that stayed for good, leaky abstractions Planned rework, expand-contract migrations

Phase 3: Rate each item on two axes

Give each item two scores from 1 to 4. Together they set the priority.

Score Technical severity: how bad is it in the code? Business impact: how much does it hurt outcomes?
4 (Critical) Is causing production incidents, data integrity problems, or security vulnerabilities right now; there is no safe workaround Blocks revenue-generating features, causes incidents customers can see, or creates compliance or security risk
3 (High) Makes feature work significantly slower (2x effort or more), produces bugs frequently, or stands in the way of scaling to known near-term requirements Holds back high-priority roadmap items; in an area critical to the business, the team is measurably slower
2 (Medium) Adds friction and the occasional bug; workarounds exist but pile on complexity; development runs slower than it should Hurts development efficiency but sits off the critical path; the impact is real, yet the team can route around it
1 (Low) Cosmetic or minor; developers notice it, but velocity, reliability, and scalability aren't measurably affected Little business effect today; may start to matter as the system or team grows

Read the priority off this grid:

Severity ↓ / Business impact → 4 3 2 1
4 P0 P0 P1 P2
3 P0 P1 P2 P3
2 P1 P2 P3 P4
1 P2 P3 P4 P4

The labels translate into timing: P0 means fix it now, P1 means take it on in the next sprint, P2 means schedule it within this quarter, P3 goes onto the backlog, and P4 is only monitored. The grid is symmetric, so adding the two scores gives the same result: 7–8 is P0, 6 is P1, 5 is P2, 4 is P3, 2–3 is P4.

Phase 4: Size the remediation

Estimate what fixing each item will cost, so the ranking can reflect return on investment. Weigh four factors:

  • Effort: how much engineering time it takes, in story points or person-days, split into discovery (understanding the problem), implementation (fixing it), and verification (proving the fix holds).
  • Risk: how likely the fix is to cause regressions. It runs higher for architectural changes and lower for isolated refactoring.
  • Disruption: whether the work blocks other work, demands a feature freeze, or needs coordination across teams.
  • Opportunity cost: which feature work gets pushed aside, and whether that trade is worth making.

Then assign a cost band:

  • Low (under 1 week): contained refactoring, a dependency update, documentation
  • Medium (1–4 weeks): refactoring that cuts across the codebase, test infrastructure improvements, migrating a single component
  • High (1–3 months): architectural restructuring, a major migration, a platform change
  • Very High (over 3 months): a system rewrite, breaking a system into multiple services, overhauling foundational infrastructure

Phase 5: Rank and choose a strategy

Merge the two scores and the cost band into a single ordered backlog, and give every item a strategy:

  • Fix on contact: choose this when the debt turns up during feature work. Clean up the area you're already changing; it costs little and improves things steadily.
  • Dedicated debt sprints: choose this when accumulated debt drags velocity down across the board. Reserve a fixed share of capacity, commonly 15–20%, for remediation.
  • Strategic investment: choose this when architecture debt needs focused effort over several sprints. Run it as a project with a plan, milestones, and success metrics.
  • Containment: choose this when fixing would cost more than it returns. Fence the debt in so it spreads no further, but don't spend on repairing it.
  • Planned retirement: choose this when the system is going to be replaced. Spend only what keeps it running until its successor is ready.

Deliverables

Record for each debt item

DEBT RECORD [ID] — [short label for the item]
  Category:           [Architecture / Code / Test / Dependency / Infra / Docs / Design]
  The problem:        [what the debt is and why it matters to the team]
  How it arose:       [root cause, e.g. deadline pressure, requirements that shifted, a knowledge gap]
  Severity score:     [1-4], because [reason]
  Business impact:    [1-4], because [reason]
  Priority:           [P0-P4]
  Cost band:          [Low / Medium / High / Very High]
  Chosen strategy:    [Fix on contact / Dedicated debt sprint / Strategic investment / Containment / Planned retirement]
  Approach:           [remediation plan at a high level; a full design doc is out of scope here]
  Done when:          [success metric, e.g. fewer incidents, better velocity, a coverage target reached]
  Owner:              [responsible team or person]
  Due by:             [target date for finishing the remediation]

Full assessment report

# Tech Debt Review — [system or area]

## At a Glance
- Items found: [count]
- Priority split: P0 [count] · P1 [count] · P2 [count] · P3 [count] · P4 [count]
- Remediation effort, all items combined (estimate): [person-weeks]
- Three headline recommendations: [one line each]

## Breakdown by Debt Type
| Debt type | Items | Mean severity | Mean business impact |
|---|---|---|---|
| Architecture | [count] | [mean] | [mean] |
| Code | [count] | [mean] | [mean] |
| Test | [count] | [mean] | [mean] |
| Dependency | [count] | [mean] | [mean] |
| Infrastructure | [count] | [mean] | [mean] |
| Documentation | [count] | [mean] | [mean] |
| Design | [count] | [mean] | [mean] |

## P0 and P1 Items in Detail
[one complete debt record per item, in the format above]

## Roadmap
| Quarter | Where the effort goes | Measurable result expected | Effort (person-weeks) |
|---|---|---|---|
| [quarter] | [focus area] | [outcome you can measure] | [estimate] |

## What to Measure Over Time
- Velocity over time (story points per sprint)
- Defect escape rate: the share of bugs that make it into production
- Incident count, broken down by system area
- Mean time to deliver a feature in the affected area
- How long CI pipeline runs take

Ground rules

  • Don't invent code quality numbers. Quote no coverage percentages or complexity scores unless the user supplied the data. Instead, tell the user which tools would produce those numbers and which signals to check in the results.
  • Every score needs a reason. Attach a short rationale to each severity and business impact score; a bare number is something the team has no way to check.
  • Ask about business priorities rather than guessing them. Find out from the user what the organization values most.
  • Label where each statement comes from with one of three tags: [Supplied by the user] for facts from their context, [Per the scoring method] for results that follow from this methodology, or [AI judgment — team to confirm] for your own assessment that the team should verify.