Prompting that produces correct, idiomatic code, feeding the AI real codebase context, and debugging without loops.
The difference between usable output and a rewrite is usually the constraints you set before the model writes a line.
Good code from an AI depends less on the question and more on which files, types, and rules you put in front of it.
AI debugging fails when you outsource the thinking; it works when you drive a tight hypothesis-and-evidence loop.