That's a good way to put it, but still my experience is that worse code bases are non-linearly harder to maintain and improve in the future, software tends to break down without a good enough base.

Sure, in the future full rewrites and stuff like that will be just another "throw money at it" problem, but fundamentally software can get arbitrary complex and we barely know how to write large, maintainable code bases.

Nonetheless, I think testing (and maybe proofs) will have its long-awaited time to shine, as being the "reward function".

I totally agree with you on the first bit, but I also think that I am way better at deciding on how to refactor code bases than the LLM is.

Right now, I put models in low thinking mode during my refactors and hate waiting. I would much rather have a faster model that that maybe was slightly stupider, and I would wait far less long between prompts where it needs my valuable input.

Models that are dumb, but humble and fast, can be fine.