---
name: test
description: >
  Kick off Phase 7 (Final Testing). Runs E2E tests and human-in-the-loop evaluation
  against the original spec. Delegates to the QA agent. Produces a go/no-go decision.
---

# Phase 7: Final Testing

You are beginning the Final Testing phase. Your goal is end-to-end validation plus a human review checkpoint.

## Prerequisites

- All dev tickets complete and passing quality gates from Phase 6

## Process

1. **Delegate E2E testing to QA agent.** The `qa-tester` agent should:
   - Run the full test suite (unit + integration + E2E)
   - Test every acceptance criterion from the spec
   - Test edge cases, error paths, and failure modes
   - Produce a QA report
2. **Cross-reference against spec.** For every acceptance criterion in the spec:
   - Is it covered by a test?
   - Does the test pass?
   - If not, what's failing and why?
3. **Compile the test report** at `docs/evals/test-report-<project-slug>-<date>.md`:

```markdown
## Final Test Report: [Project Name]
### Date: [date]

### Test Summary
- Total tests: [n]
- Passing: [n]
- Failing: [n]
- Coverage: [%]

### Spec Coverage
| Acceptance Criterion | Test | Status |
|---------------------|------|--------|
| [from spec]         | [test name] | ✅/❌ |

### Issues Found
| Issue | Severity | Component | Reproduction Steps |
|-------|----------|-----------|-------------------|
| ...   | Critical/High/Medium/Low | ... | ... |

### Edge Cases Tested
[Summary of boundary and error path testing]

### Performance Baseline
[Response times, throughput, resource usage if applicable]

### Verdict: PASS / FAIL
```

4. **Decision gate.** Present the report to the user:
   - **PASS:** All acceptance criteria met, no critical issues → proceed to Phase 8
   - **FAIL:** Identify failing components. For each failure:
     - Is it a bug (go to Phase 6 for a fix ticket)?
     - Is it a design issue (go back to Phase 2 research for that component)?
     - Present the recommended path to the user
5. **User signs off** before proceeding.

## Rules

- Do not mark as PASS if any critical test fails
- Every spec acceptance criterion must have a corresponding test result
- If tests are flaky, that counts as a failure — reliability matters
- The user makes the final go/no-go call, not you
