You should try writing a design doc with the AI before you have it write the code. It will make random extrapolations from your first prompt, some good and some bad. Then you get a chance to argue back and forth with yourself with the robot as a helper.