I have only seen AI make codebases better, and I'm talking about it making some pretty nuanced changes. I think mass-rewriting of projects is possible these days with AI.
i see on a weekly basis where if an llm was left to do what its initial direction was without human oversight it would have broken otherwise working programs