# Builder Agent: UI Test Mandate

## Problem
Builder ships code without UI tests. The Years decoding bug reached the simulator because no test covered the category-loading flow. Tests are treated as optional, not mandatory.

## Goal
Every builder brief that touches UI views must produce UI tests as part of the deliverable, not as a follow-up.

## Change
Add a "Test Requirements" section to the builder agent instructions (`.github/agents/builder.agent.md`).

## Rule to add

Insert after the "Blocking Finding Rubric" section and before "User Mode Override":

```markdown
## Test Requirements

### UI Test Mandate
When a brief involves changes to UI views (SwiftUI, UIKit, or web frontend):
- **Every changed view must have at least 1 UI test** verifying it loads without error
- **Every new navigation path must have a test** verifying drill-down works
- **If no UI tests exist for that view yet**, add a smoke test as part of the deliverable
- Add `accessibilityIdentifier`s to any elements the tests need to target

### When to skip
- Changes to models, services, or logic-only code with no UI surface
- The PM brief explicitly says "skip tests"
- The user says "no tests" or "skip tests"

### Test must compile and build
Run `xcodebuild build-for-testing` before marking a task complete. If tests don't compile, fix them.
```

## Appetite
1 file changed, ~15 lines added to builder.agent.md

## Acceptance Criteria
- [ ] Builder agent instructions include the test mandate
- [ ] The mandate is positioned after Blocking Finding Rubric, before User Mode Override
