Make AI-Written Tests Prove the Behavior You Need
by Rentierdigital
$19
Your agent says the code is ready.
Know what to check before you ship.
The tests pass. The coverage report looks reassuring. But can you point to the evidence that the app does what you asked?
This practical workbook helps you answer that question on your next AI-assisted change. You will learn to set the expected behavior before coding, challenge the tests after development, and make a release decision you can explain.
You can make the next handoff easier to judge
When the same agent interprets your request, writes the code, and chooses the tests, one misunderstanding can survive all three steps. A green result tells you those tests passed. You still need to know whether they checked the right thing.
The workbook gives you a concrete review process you can apply to one feature, fix, or integration. You start with the behavior you want, identify a plausible mistake, and require evidence that can tell the two apart.
Here is what you will learn to do
Give the agent a clearer target. Define an observable outcome and the source that makes it correct.
Spot tests that agree with the wrong code. Ask which incorrect behavior would make each important test fail.
Choose useful missing cases. Look for account boundaries, error paths, retries, and external effects that the normal case cannot prove.
Challenge a completed development batch. Use a focused pass to inspect the evidence and request a specific correction when needed.
Make the remaining uncertainty visible. Record what passed, what was simulated, and what still needs checking.
Define the behavior before development, then challenge the evidence before you ship.
You keep useful existing tests. The process combines preparation before coding with review after the batch, so you can improve how you use TDD without requiring every test to be written first.
Our 57 passing tests still missed a cleanup defect
In our recorded pilot, the baseline suite passed 57 tests. The two methods affected by the defect already had 100% of their Bun-reported source lines covered. That figure applies to those two methods, not the whole file or project.
Three additional probes produced one pass and two failures, exposing one cleanup defect across the two methods. The source-line coverage did not increase. A temporary correction made all three probes pass, supporting the diagnosis.
The probes used a simulated IMAP client, and the small pilot was not blind. The correction was not integrated or deployed. The worked example shows exactly what this evidence establishes and where it stops.
You get tools you can use on the next change
Use the illustrated PDF guide to understand the process, follow the example, and see when to stop the review.
Complete the acceptance brief to give the agent behaviors, counterexamples, and release criteria before it edits code.
Use the three agent prompts to guide implementation, challenge the tests, and record the final decision.
Fill in the risk and evidence matrix to choose a check that can represent the failure you care about.
Use the measurement sheet to record defects found, false leads, time, and available token costs.
Edit the Markdown workbook to adapt the process and keep the completed evidence record with your pull request.
You can start with the tools you already use
This kit is for maintainers, technical leads, and developers who already use coding agents. You need access to the code, a working test runner, and enough product context to decide what correct behavior means. No particular agent, language, framework, or repository host is required.
Start with one small change. Write the acceptance brief, let development proceed, and run the challenge when the batch is ready. Human judgment still resolves ambiguous intent, and security or real-service checks remain necessary when the risk calls for them.
The exact prompt pack has not been evaluated in a controlled comparison. The kit does not promise bug-free software, guaranteed defect discovery, faster delivery, or token savings. Use the included measurement sheet to decide whether the method helps your team.
Put the workbook to work on your next change
Get the workbook, open the acceptance brief, and write the behavior you need before the next agent run. Then use the after-batch review to make the agent's evidence visible before you accept its work.