A human has the ability to contact the PM and say, "This won't work, for $reason," or, "This is going to look really bad in $edgeCase, here are a couple options I've thought of."
There's nothing about AI that makes such operations intrinsically impossible, but they require much more than just the ability to generate working code.