---
name: "Add test-first requirements to agent role descriptions"
---

# Story 170: Add test-first requirements to agent role descriptions

## User Story

As a project owner, I want agent role descriptions to explicitly require test-first development and record_tests usage, so that agents follow the documented dev process.

## Acceptance Criteria

- [ ] Coder agent roles in project.toml mention writing tests for each acceptance criterion
- [ ] Coder agent roles mention calling record_tests MCP tool before completing work
- [ ] QA agent role mentions verifying that record_tests was called and results are present
- [ ] Mergemaster role mentions checking ensure_acceptance before merging

## Out of Scope

- TBD

## Test Results

<!-- huskies-test-results: {"unit":[{"name":"Coder roles mention test-first and record_tests","status":"pass","details":"coder-1, coder-2, and coder-opus role fields and prompts updated to require test-first development and call record_tests MCP tool"},{"name":"QA roles verify record_tests was called","status":"pass","details":"qa and qa-2 role fields, prompts, and system_prompts updated to explicitly verify record_tests was called and flag missing results as FAIL"},{"name":"Mergemaster role checks ensure_acceptance before merging","status":"pass","details":"mergemaster role field, prompt workflow step 1, and system_prompt updated to call ensure_acceptance before triggering merge_agent_work"}],"integration":[]} -->

### Unit Tests (3 passed, 0 failed)

- ✅ Coder roles mention test-first and record_tests — coder-1, coder-2, and coder-opus role fields and prompts updated to require test-first development and call record_tests MCP tool
- ✅ QA roles verify record_tests was called — qa and qa-2 role fields, prompts, and system_prompts updated to explicitly verify record_tests was called and flag missing results as FAIL
- ✅ Mergemaster role checks ensure_acceptance before merging — mergemaster role field, prompt workflow step 1, and system_prompt updated to call ensure_acceptance before triggering merge_agent_work

### Integration Tests (0 passed, 0 failed)

*No integration tests recorded.*
