TT Lab
Get started
Learn Learning paths Courses

Founding as a Developer — Validate Before You Build

Measure the Interest on Debt from Deploy Records and Decide When to Pay

Continue in TT Lab

Goal

From the deployment and work records, calculate the DORA metrics and the interest per module (unplanned work hours), and decide "should we pay it off now" by the rule using the payback period, net savings, and cost of delay of the refactoring candidates.

Why it matters

Whether to pay off technical debt or ship features is usually decided by voices. If you put interest, principal, and the value of the features being postponed in the same unit, that argument becomes a calculation. Interest you have not measured looks like it does not exist, and one day it eats the time of the whole team.

Materials

Definitions (names follow dora.dev)

Steps

  1. In /root/founder/debt/dora.py, create frequency(fix, service) (deployments per week, a real number).
  2. In dora.py, add lead_time(fix, service) → {"median_h": x, "mean_h": y}.
  3. In dora.py, add change_fail_rate(fix, service).
  4. In dora.py, add recovery_median(fix, service) (hours).
  5. In /root/founder/debt/dora.json, write frequency_per_week, lead_time_median_h, lead_time_mean_h, change_fail_rate, recovery_median_h, rework_rate for each service.
  6. In /root/founder/debt/interest.json, write mean, first4, last4, rising (last4 > first4) for each module.
  7. In /root/founder/debt/plan.json, write saved_per_week, payback_weeks, net_saved_krw, delay_cost_krw for each refactoring candidate.
  8. In /root/founder/debt/decision.json, write decision (the rule in the definitions), worst_service (the service with the highest change fail rate), and fastest_payback (the candidate with the shortest payback period).

Notes

Deployment frequency

In /root/founder/debt/dora.py, create frequency(fix, service) — that service's number of deployments ÷ 12.

Divide the number of lines in deploys.csv filtered by service by 12 weeks.

Change lead time — median and mean

Add lead_time(fix, service) → {median_h, mean_h} to dora.py.

Convert each deployment's (deployed_at − committed_at) into hours, build a list, and use median and mean from statistics.

Change fail rate — the denominator is deployments

Add change_fail_rate(fix, service) to dora.py.

Divide the number of deployments that needed immediate intervention right after deployment (failed=1) by that service's total number of deployments.

Failed deployment recovery time

Add recovery_median(fix, service) to dora.py (failed deployments only, hours, median).

It is the median of (recovered_at − deployed_at) for deployments with failed=1. None if there are no failures.

One page of DORA per service

In /root/founder/debt/dora.json, write frequency_per_week, lead_time_median_h, lead_time_mean_h, change_fail_rate, recovery_median_h, and rework_rate for each service.

Deployment rework rate = unplanned=1 ÷ total deployments. Hours to two decimal places and rates to four.

Interest and trend by module

In /root/founder/debt/interest.json, write mean, first4, last4, and rising for each module.

Sort by week, then compute the average of the first 4 weeks and of the last 4 weeks separately.

Payback period, net savings, and cost of delay

In /root/founder/debt/plan.json, write saved_per_week, payback_weeks, net_saved_krw, and delay_cost_krw for each refactoring candidate.

Savings is the recent interest (last4) × interest_reduction. The cost of delay is the number of weeks the refactoring uses team time × the feature's weekly value.

Decide by the rule

In /root/founder/debt/decision.json, write decision, worst_service, and fastest_payback.

Look only at the candidate with the shortest payback period, and if its net savings exceed the cost of delay, the module name; otherwise feature_first.