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. That was fine. 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.