What makes you think that AI is going to produce leaner codebases? They are trained on human codebases. They are going to end up emulating that human code. It's not hard to imagine some improvement here, but my gut is there just isn't enough good code out there to train a significant shift on this.