Earlier quoted context omitted.
It bothers me that you have to explicitly state this to the agent. Makes me think what else is missing from that file which also needs to be explicitly stated, but I don't know what don't know. "Do a good job"?
Additionally, if you are asking agents to write test, be very careful. They will write tautology tests. They will mock things to no end. They will flat out REMOVE assertions (saying it's not needed). They can also write test to assert the wrong result. You have to always review it, it's exhausting.
Claude will do some boneheaded things for sure, but it's pretty good about writing tests that are useful, and not removing or modifying tests just because they're in the way.
Claude is pretty bad about assuming that it couldn't have broken a test it didn't know about, as it has often told me "this is already broken on main" which is definitely NOT true.