Skip to content

Tech Debt Quantification ​

Every engineering team knows they have tech debt. Few can quantify it. ShipLens measures technical debt per domain using signals already present in your commit history — no manual tagging, no surveys, no guesswork.

Purpose ​

The goal is to give CTOs a data-backed answer to the question: "Where is our tech debt, and is it getting better or worse?"

This directly supports the common engineering practice of allocating 20% of capacity to tech debt reduction. Without measurement, that 20% is either poorly targeted or quietly abandoned. With measurement, you can prove that debt-reduction work is working — or that it isn't.

Debt Signals ​

Tech debt is detected through three independent signals, each derived from commit data:

1. Churn Rate ​

How often files in a domain change over a given period.

churn_rate=total file modifications in domaintotal commits in period

High churn suggests instability — files that keep changing may indicate unclear requirements, poor abstractions, or accumulated shortcuts.

Churn RateInterpretation
< 0.1Low — stable domain
0.1 - 0.3Normal — active development
0.3 - 0.5Elevated — potential debt accumulation
> 0.5High — likely debt hotspot

2. Fix Density ​

The ratio of fix commits to total commits within a domain.

fix_density=commits of type fixtotal commits in domain

A high fix density means the domain requires constant patching. This is a strong signal of underlying structural problems.

Fix DensityInterpretation
< 0.2Healthy — mostly forward progress
0.2 - 0.4Normal — some maintenance expected
0.4 - 0.6Concerning — more fixing than building
> 0.6Critical — domain is in repair mode

Whether the average complexity of commits in a domain is increasing over time.

complexity_trend=β1 (slope of linear regression on complexity over time)

A positive slope means commits are getting harder over time — a classic sign that the domain's architecture is resisting change. Simple changes that should be easy are becoming difficult.

Complexity Trend (β1)Interpretation
< 0Improving — refactoring is paying off
0 - 0.02Stable — no significant change
0.02 - 0.05Worsening — debt is accumulating
> 0.05Accelerating — urgent attention needed

Per-Domain Debt Score ​

The three signals are combined into a single debt score per domain:

debt_score=churn_rate+fix_density+normalized_complexity_trend3×100

Where normalized_complexity_trend maps the slope to a 0-1 range using a sigmoid function.

Debt ScoreLabelRecommended Action
0 - 20LowNo action needed
20 - 40ModerateMonitor; address opportunistically
40 - 60HighAllocate dedicated debt-reduction capacity
60 - 100CriticalPrioritize immediately; consider architectural review

Trend Tracking ​

Each domain's debt score is tracked over time and classified as:

TrendCondition
ImprovingDebt score decreased by > 5 points over the last 28 days
StableDebt score changed by < 5 points
WorseningDebt score increased by > 5 points over the last 28 days

This lets you verify that your 20% capacity allocation is actually reducing debt in the targeted domains.

Background Processing ​

Tech debt scores are computed by the TechDebtWorker, an Oban background job:

JobScheduleWhat It Does
TechDebtWorkerDailyComputes churn rate, fix density, and complexity trends per domain; calculates debt scores; classifies trends

Route ​

/c/:slug/tech-debt

The tech debt page shows:

  • Domain-level debt scores ranked from highest to lowest
  • Trend indicators (improving / stable / worsening) per domain
  • Individual signal breakdowns (churn, fix density, complexity)
  • Historical debt score charts per domain
  • Top files by churn within each domain

Built with intelligence, not surveillance.