A pretty wrong answer

Smooth text is a weak signal; a mismatch with the rule is a strong one.

An assistant's most expensive mistakes look decent. The names are tidy, the structure is familiar, the comment explains a different behaviour from the one in the code. You relax precisely on a neat diff. So keep the criterion from your request next to you and go through it line by line, not by impression.

A typical pretty miss is error handling that hides the error: an empty catch, a log without a return, a 200 on a rejection. The second is an extra abstraction for a single call. The third is a test that repeats the implementation and turns green even when the domain rule is broken.

When you find such a miss, show it narrowly: "here is the rule, here is the line, here is the result I need instead". Do not write "rewrite it properly". The model already considered this version proper. It needs a contradiction with a fact.

If there are many misses, it is cheaper to throw the draft away and set the piece again than to revive it. Revival drags old assumptions into the new text. A clean request with the same criterion is usually shorter.

Practice

  1. Which defect is easy to praise

    Which answer is the most dangerous to mistake for a good one?

    • Code full of obvious syntax mess
    • Tidy code that hides an error
    • A short question from the model to you
    • The model refusing to invent a schema
  2. What to attach

    What do you attach to the next message along with the line: a general "rewrite it" or the specific rule?

  3. Recognizable misses

    Select the misses that are easy to mistake for good code.

    • An empty catch
    • A test that copies the implementation and does not know the rule
    • The error is returned to the caller
    • A test for empty input written in advance