---
name: testing-policy
description: Use when adding or modifying tests, choosing validation commands, or deciding what must be tested for a code change.
---

# Testing Policy

## Required behavior

Before claiming a task is complete:

1. Read `.ai/testing-strategy.md`.
2. Identify the smallest relevant test scope.
3. Run that test scope if the environment allows it.
4. If tests cannot run, explain the exact reason and the command the developer should run.

## Test selection

- Pure logic change: unit tests.
- API change: API/controller tests plus compatibility check.
- Service change: service tests, transaction and exception branches.
- SQL change: repository tests, SQL review, EXPLAIN when possible.
- Auth/gateway/security change: list explicit regression cases.

## Output

Always report:

- tests run
- tests not run
- failures
- manual verification points
