---
id: "prereq-test-driven-development"
type: "prereq"
source_timestamps: ["00:08:30"]
tags: ["testing"]
related: ["concept-scenario-testing", "contrarian-tests-harm-ai"]
reason: "Necessary to understand why traditional testing fails with AI and why Scenario Testing is required."
sources: ["s01-5-levels-ai-coding"]
sourceVaultSlug: "s01-5-levels-ai-coding"
originDay: 1
---
# Test-Driven Development (TDD)

## Why This Background Matters
Familiarity with TDD and in-repo unit testing is required to understand the contrarian insight that these traditional safety nets actually become **liabilities** when evaluated by context-aware AI agents.

## Required Familiarity
- The TDD cycle: write failing test → write minimal code → refactor.
- The role of unit tests, integration tests, and test coverage metrics.
- The conventional belief that high in-repo test coverage correlates with quality.

## Connection to the Vault
The contrarian claim ([[contrarian-tests-harm-ai]]) and the proposed solution ([[concept-scenario-testing]]) only make sense once you understand what they are *replacing*. AI agents read the test files; they 'teach to the test' unless evaluation is moved outside the build loop.
