write-tests
Writing meaningful tests
Establish the contract
Read the root instructions, shared coding conventions, and testing and review guide, then the affected project's instructions and relevant guides. The shared guide owns test-quality criteria and the independent-writer policy.
Identify the accepted behavior, public interface, and existing coverage. For each proposed case, state the distinct regression it catches and why existing cases would miss it. Drop redundant cases and incidental assertions. Complete this step when every retained case has an expected outcome grounded in requirements rather than current implementation.
Choose the writer
Apply the shared guide's independent-writer policy. For substantial behavior changes and nontrivial bug fixes, delegate once to an available code-capable agent with permission to edit tests. Use a synchronous task unless implementation can safely proceed in separate files while the writer works.
If you are already the assigned test writer, write the tests directly; this assignment is the independent pass.
Give the writer a self-contained assignment containing: