AI is a wonderful tool that will answer all of your questions, as long as you give it the right answer ? That's probably right.
The issue here is more organizational with the engineers not getting the code up to standards before handing off, not the capabilities of the AI itself.