## Test-Driven Development

### The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.

### Red-Green-Refactor

1. **RED**: Write ONE minimal failing test
2. **Verify RED**: Confirm it fails for the RIGHT reason
3. **GREEN**: Simplest code to pass  -  nothing more
4. **Verify GREEN**: Confirm pass AND other tests still pass
5. **REFACTOR**: Remove duplication, improve names
6. **Claim only what ran**: "passes" needs this session's command and its output

### iOS Testing Pyramid

```
    [UI Tests / XCUITest] (minimize)
 [Integration / Snapshot Tests]
[Unit Tests / ViewInspector / XCTest] (maximize)
```
