tddlisted
Install: claude install-skill ChloeVPin/chloe-skills
# TDD
## Overview
Write the test first. Run it. See it fail. Then write the minimum code that makes it pass.
**Core principle:** a test that you did not see fail is not evidence. It is a guess with a
green tick.
This skill is for an agent that can run commands. That changes what is important. An agent
writes code and tests faster than a person can read them. The limit is not typing speed. The
limit is proof. Each rule below changes "this looks correct" into "I saw the test change from
fail to pass".
## Evidence Summary
Read `references/evidence.md` for the full citations and the limits of each study.
| Claim | Evidence |
|---|---|
| TDD decreases defects | Four industrial teams at Microsoft and IBM measured a decrease in pre-release defect density of 40 to 90 per cent. Initial development time increased by 15 to 35 per cent. Nagappan, Maximilien, Bhat and Williams, *Empirical Software Engineering* 13(3), 2008. |
| Agents feel faster than they are | METR ran a randomised controlled trial with 16 experienced developers and 246 real tasks. AI-assisted work took 19 per cent longer. The developers believed that they were 20 per cent faster. The gap between belief and measurement was 39 points. |
| Coverage is a weak proxy | Inozemtseva and Holmes, ICSE 2014, examined 31,000 test suites in five large systems. When they controlled for suite size, coverage correlated only weakly with fault detection. High coverage does not prove that the tests are good. |
| Mutation score is a