The only thing I can imagine to mitigate this is if a senior engineer who wants to prevent the degradation invents some counterbalance system - most likely also with the help of AI - which keeps "grooming" the codebase so that it has a chance to get back into a healthy shape.
I am thinking of something like an agent skill - integrated into CI - which calls out places where it sees this form of degradation. While creating/updating the skill, the engineer is forced to understand what the unwanted rot/degradation looks like. Intelligence can be gathered into the skill to identify it. Then at least the rot becomes visible and there is a metric which can be optimized.
Of course, this needs mgmt which understands the necessity of this grooming process. If such mgmt does not exist, that's truly a dire situation.
The only thing I can imagine to mitigate this is if a senior engineer who wants to prevent the degradation invents some counterbalance system - most likely also with the help of AI - which keeps "grooming" the codebase so that it has a chance to get back into a healthy shape.
I am thinking of something like an agent skill - integrated into CI - which calls out places where it sees this form of degradation. While creating/updating the skill, the engineer is forced to understand what the unwanted rot/degradation looks like. Intelligence can be gathered into the skill to identify it. Then at least the rot becomes visible and there is a metric which can be optimized.
Of course, this needs mgmt which understands the necessity of this grooming process. If such mgmt does not exist, that's truly a dire situation.