Two people fixed the same bug in the same week. That's when I understood the problem with tech debt isn't in the code.
Every team has a list like that. A wiki page, a spreadsheet tab, or an epic called "Tech debt". Everyone knows it exists. In sprint meetings someone brings it up, the whole room nods, and then someone says the familiar line: "Let's do it next sprint."
Our list was the same. Until we sat down and went through the system once, module by module. The list grew several times longer. For the first time, I saw the whole team go quiet when that page was opened.
The week of two fixes
We decided to actually do it. We split the work, each person took a few debts, and once fixed they opened a PR into the main branch as usual.
About a week in, something happened. Two developers, sitting exactly two desks apart, fixed the same permissions bug. Each in their own way. Two PRs, touching the same file, opened a day apart. Neither knew the other was working on it.
That same week, QA messaged me: "The main branch now has a dozen-odd small changes scattered everywhere, we don't know which flow to test first."
That's when I understood: the code wasn't the problem. Fixing each debt wasn't hard. The hard part was getting a pile of small fixes into the system without it turning into a new mess.
Three small changes
The first change was almost embarrassingly simple. Each debt got its own page, and that page doubled as the sign-up sheet. Whoever wanted to take it wrote "in progress" with their name. First to write it, gets it. Before writing, read the page once more. From that day on, no two people fixed the same bug again.
The second change was how we grouped things. A developer's reflex is to group by code module, because it's tidy. But QA doesn't test by module. QA tests along the paths users take: log in, take a test, view scores. So we grouped debt by flow. Finishing tests for one group means walking one whole flow, without jumping back and forth.
The third change was the most important. Fixes no longer went straight into the main branch. Each group got its own branch, called a phase. Each debt's PR merged into the phase branch. Only when the whole phase was done and QA had tested it did it go into the main branch, in exactly one PR.
Instead of tracking dozens of separate PRs, I only had to track a few phases. And the main branch never had to take in a batch of changes nobody had tested.
Things that aren't the developer's call
After a while we hit a harder kind of debt: fixing it would change what users see. For example, a permission everyone had always had, that by rights only one group of people should have.
For those, I don't let a developer decide inside a bugfix. The ticket still gets created, but flagged, stating clearly who we're waiting on and for what answer. A bugfix that quietly changes product behavior is the fastest way to get a phone call at midnight.
And the work that lives outside the code, like creating indexes, cleaning up duplicate data, running backfills, goes into a separate checklist for deploy day. I learned that one the hard way: remembering after the deploy that the index hadn't been created 😅
"This flow is done"
A few weeks later, QA messaged: "The login flow is done, nothing left." Just one short sentence. But it was the first time part of that list was closed for good, rather than "next sprint".
The list is still long. But now when it's opened, the team doesn't go quiet anymore. People look for what the next phase is.