If your code has a clear and consistent pattern, is well structured and the separation of concerns is not arbitrary, and it is genuinely extensible without having to re-fiddle with anything. Nothing is contrived or stuck in some odd way that'd break assumptions derived from any other area of the codebase. If that is the case then AI picks up on this and can carry it on effectively with light hand holding.
If that is not the case then AI just starts doing `whatever` to figure out how to fit in requests.
This is probably why some people are finding AI can fill in significant gaps of their codebase to a high quality similar to how they'd manually write it while others are wondering WTF did it just do and why.
I'm starting to suspect people who are complaining about AI generating crap code are really just outing themselves as having written crap code themselves.
Pattern recognition and extrapolation is what AI absolutely excels at. If it is doing something bad it's because the patterns it recognized, and is trying to extrapolate, are bad. But people have probably become blinded to the badness of their own code because they have been staring at it too long as they wrote it. This is a common difficulty with any designer, you somehow have to get a fresh mind to see whats bad, you get too used to your own stink. Then people only recognize the badness of their code when an AI uses it as a pattern to follow and reflects back something which they can now see with fresh eyes.