EngineeringLead

Technical debt

How to prioritize technical debt

Every codebase carries debt. The engineering lead's job is not to eliminate it but to decide which debt is worth paying down, when, and how to explain that choice to people who do not read code. This guide gives you a way to classify, score and schedule it.

What counts as technical debt

Ward Cunningham introduced the debt metaphor to describe how shipping code with an incomplete understanding creates future cost, like interest on a loan. In practice teams use the term for anything in the system that makes future change slower or riskier than it needs to be:

Not every imperfection is debt. Code that is ugly but rarely touched and working fine may cost almost nothing to leave alone.

Classify it first: the debt quadrant

Martin Fowler's technical debt quadrant sorts debt on two axes: whether it was taken on deliberately or inadvertently, and whether the decision was prudent or reckless.

RecklessPrudent
Deliberate"We don't have time for design." "We must ship now and will deal with the consequences."
Inadvertent"What's layering?" "Now we know how we should have done it."

The quadrant helps a lead respond to causes, not just symptoms. Prudent deliberate debt needs a repayment plan. Reckless debt points to a skills or process problem that will keep creating more.

AI tools and new kinds of debt

AI assistants can reduce debt, for example by speeding up migrations and test writing. They can also add it faster than before:

Review standards are the first defense; see reviewing AI-generated code. A consistent codebase also helps the tools, because they tend to follow the patterns they see.

Score what you find

Keep a debt register: one entry per item, in the same tracker as other work. Score each item on a few factors, using a simple 1–3 scale:

FactorQuestion
ImpactHow much does this slow down or endanger work today?
FrequencyHow often does the team touch this area?
RiskCould it cause an incident, a security problem or data loss?
TrendIs it getting worse as more code builds on it?
Cost to fixHow much effort, and can it be done in increments?
DeadlineIs there a date after which it becomes urgent, such as end of support for a dependency?

A simple priority: items with high impact, high frequency and high risk that can be fixed in increments come first. Items in rarely touched code with low risk can wait, however unpleasant they look.

Frequency deserves special weight. Debt concentrated in the files the team changes most often costs something every week. Version control history can show which files change most, and incident reports can show which areas fail most.

Schedule it

ApproachHow it worksWorks well when
Reserved capacityA fixed share of each cycle goes to debt, agreed with product Debt is steady and spread out
Fix as you goImprove code you are already changing for a feature Debt sits in areas under active development
Dedicated projectA planned, scoped piece of work with its own goal Debt is large and structural, such as a migration
Stop-the-linePause feature work to fix a risk Security exposure or repeated incidents

Whichever approach you use, agree the share of capacity with your product partner in advance, and write it down. Renegotiating each sprint wastes time and usually loses.

Explaining debt to non-engineers

Stakeholders care about outcomes. Translate each important debt item into one of these:

Use your own numbers from your tracker and incident reports. Estimates you cannot back up weaken the case. Tie the plan to delivery measures; see measuring engineering work.

Record decisions so debt is visible

Architecture decision records, a format popularized by Michael Nygard, capture a decision's context, the decision itself, and its consequences. When a team deliberately takes on debt, an ADR records why and what would trigger repayment. Future engineers, and future AI tools reading the repository, then have the context.

Preventing new debt

Common questions

How much time should a team spend on technical debt?

There is no universal share. It depends on the age of the system, the rate of change and the risk. Pick a starting share with your product partner, review it each quarter, and adjust based on whether delivery and incident trends improve.

Should we have a "debt sprint"?

It can clear a backlog, but debt returns if normal work keeps creating it. Most teams need a steady allowance as well.

Who decides what debt to fix?

The team identifies and scores it; the lead proposes priorities; the lead and product partner agree on capacity. Engineers closest to the code usually know where it hurts most.

Is a rewrite ever the answer?

Sometimes, but incremental replacement is usually lower risk because it keeps delivering value and can be stopped. Treat a rewrite as a project with its own goals and checkpoints. New leads can find more on setting direction in the first 90 days.

Last reviewed 2026-09-17