← ClaudeAtlas

test-driven-developmentlisted

Use before starting feature implementation, bug fixes, or refactors. Requires a failing test before writing production code. Blocks code-first work, manual-only verification excuses, and implementation without observing failure.
AidALL/ghost-alice · ★ 13 · Testing & QA · score 83
Install: claude install-skill AidALL/ghost-alice
# Test-Driven Development (TDD) ## Contents - [Overview](#overview) - [When to apply](#when-to-apply) - [The Iron Law](#the-iron-law) - [The Red-Green-Refactor cycle](#the-red-green-refactor-cycle) - [RED: write a failing test](#red-write-a-failing-test) - [RED verification: see the failure with your own eyes](#red-verification-see-the-failure-with-your-own-eyes) - [GREEN: minimal code](#green-minimal-code) - [GREEN verification: see the pass with your own eyes](#green-verification-see-the-pass-with-your-own-eyes) - [REFACTOR: clean up](#refactor-clean-up) - [Repeat](#repeat) - [Conditions of a good test](#conditions-of-a-good-test) - [Why the order matters](#why-the-order-matters) - [Common rationalizations](#common-rationalizations) - [Red flags: stop and start over](#red-flags-stop-and-start-over) - [Example: bug fix](#example-bug-fix) - [Pre-completion verification checklist](#pre-completion-verification-checklist) - [When you are stuck](#when-you-are-stuck) - [Debugging integration](#debugging-integration) - [Test anti-patterns](#test-anti-patterns) - [Final rule](#final-rule) ## Overview Write the test first. See the failure with your own eyes. Then write the minimal code that makes it pass. ○ Core principles - If you have not seen the test fail, you cannot know whether it checks the right thing. - Breaking the letter of the rule is breaking the spirit of the rule. ## When to apply □ Always apply - New features - Bug fixes - Refactors - Behavior cha