Cleanroom design of "this is a function's interface, it does this and that, write tests for that function to pass" generally can get you pretty decent results.
But "throw vague prompt at AI direction" does about as well as doing same thing with an intern.