Track the balance between maintenance and features
In one of my projects, we introduced Maintenance Fridays. A fancy name for dedicated time each Friday when we were addressing technical debt. At the beginning, participation was voluntary, and not everyone joined. Over time, however, the impact became clear: the overall health of the codebase noticeably improved.
Before this change, the team was heavily focused on shipping features. While delivery speed looked good on paper and dopamine levels were high, the cost was accumulating technical debt. Maintenance Fridays provided us a safe space to spend some time on bike-shedding and refactoring.
Imagine your codebase as Earth's orbit. Launching satellites (features) adds capability, but without clearing debris (refactoring), the orbit gets cluttered with technical debt, making every new launch more dangerous and expensive.
Track your "launch vs. cleanup" ratio using conventional commits, and schedule regular cleanup windows (like Maintenance Fridays). So stakeholders expect and support refactoring time.
I've been running this analysis against real repositories in Code Evolution, a personal side project, to see whether the idea actually makes sense in practice. It's still rough and unfinished, and for now it only uses a demo repository, but you can already check it out. I'm planning to open-source it soon.
See this one running