02Chapter 2: The red-green-refactor cycleThis chapter covers the working model of test-driven development (TDD) and how it changes when a coding agent writes much of the code. It assumes you can write basic Python, have run unit tests with a framework such as pytest, and know Git commits and diffs. You should also have used a coding agent 7 min read
03Chapter 3: The agent loop: read, edit, run, observeThis chapter assumes you can write and run unit tests in one language (the examples use Python and pytest). It also assumes you can read a Git diff and have used a coding agent at least a little. You don't need to know how the model behind the agent works. You only need to know what the agent does a7 min read
04Chapter 4: Telling the agent to work test-firstThis chapter assumes you can write and run unit tests in one language, read a Git diff, and have used a coding agent at least once. It builds on the red-green-refactor cycle and the read, edit, run, observe loop from earlier chapters. Here you turn that workflow into written instructions the agent f6 min read
05Chapter 5: Red: write a failing test and check why it failsThis chapter covers the first step of each TDD cycle: writing one test that fails, and confirming it fails for the right reason. It assumes you can write and run unit tests in Python with pytest, read a Git diff, and have used a coding agent. The examples use a small slugify function, which turns 6 min read
06Chapter 6: Green: the smallest change that passesThis chapter assumes you can write and run unit tests with pytest, read a Git diff, and have used a coding agent. It covers the green phase of red-green-refactor. In this phase you get a failing test to pass with the least code that works, and you check that the agent did not cheat to get there.7 min read
07Chapter 7: Refactor while the tests stay greenThis chapter assumes you can write and run pytest tests, read a Git diff, and have used a coding agent that edits files and runs commands. It also assumes you know the red and green phases from the previous chapters. Refactoring is the third phase of the cycle. It is also where agents most often cha6 min read
08Chapter 8: Keeping each cycle smallThis chapter assumes you can write and run unit tests with a framework such as pytest, read a Git diff, and have used a coding agent. It covers why one behavior per cycle matters when an agent writes the code, how to size a step, and what goes wrong when steps grow.7 min read
09Chapter 9: How agents satisfy tests without solving the problemThis chapter assumes you can write and run unit tests with a framework such as pytest, read a Git diff, and have used a coding agent. It also assumes you know the red-green-refactor cycle from earlier chapters.7 min read
10Chapter 10: Keeping the agent from editing the testsThis chapter assumes you have read the earlier chapters on the red-green-refactor cycle and on how agents fail while satisfying tests. It also assumes you can run pytest, read a Git diff, and edit a repository's agent instruction file. The examples use Python, and the ideas apply to any test framewo6 min read
11Chapter 11: Reviewing diffs and committing each cycleThis chapter assumes you can read a Git diff, write unit tests with pytest, and have worked through the red-green-refactor cycle and the agent failure modes from earlier chapters. Here you will learn how to review what an agent changed and how to turn each verified cycle into one commit.7 min read
12Chapter 12: Characterization tests for existing codeThis chapter assumes you have worked through the red-green-refactor cycle in the earlier chapters. It also assumes you can read a pytest file and a Git diff, and that you have used a coding agent to edit files and run tests.6 min read
13Chapter 13: CI as an independent check on agent changesThis chapter assumes you can write and run unit tests with pytest or a similar framework. It also assumes you know Git branches, commits, and pull requests, and that you have followed the earlier chapters on the red-green-refactor cycle and on instructing an agent to work test-first. You don't need 8 min read