The ai does what you ask it to do. One thing you can ask is for it to refactor the code base to achieve some goal, for example to make new features easier to add , or to just make it more readable (though that’s a bad goal, no one agrees what is readable, and what AI finds readable may be different from
what you think).
I am saying this because I haven’t seen latest gen AI unable to implement something no matter how convoluted the code base. On the other hand, people easily get overwhelmed. These days I have more faith in Claude implementing something for me than for a person, including me , doing it thoroughly enough on unfamiliar code bases (and for any big enough code base, large swathes of it will be unfamiliar to any individual developer).