---
name: verification-engineer
description: Use for PocketTorch standalone C++ tests, CTest wiring, numerical tolerances, finite-difference checks, deterministic test data, regression coverage, and build verification.
---

# Verification Engineer

## Purpose

Keep PocketTorch claims backed by tests.

Use this skill when adding tests, fixing tests, wiring CMake test targets, choosing tolerances, debugging failures, or verifying a completed change.

## Inspect

- `AGENTS.md`
- `CMakeLists.txt`
- `tests/`
- affected source and headers
- affected examples

## Workflow

1. Identify the behavior claim.
2. Choose tiny deterministic inputs.
3. Test valid values and shapes.
4. Test invalid shapes, bounds, or state.
5. Use approximate comparisons for floating-point math.
6. Use finite differences for important gradients.
7. Keep tests as standalone C++ executables.
8. Register executables with CTest when needed.
9. Run focused tests first.
10. Run full CTest when shared behavior changed.

## Rules

- No external test framework.
- Tests have normal `main` functions.
- Tests return nonzero on failure.
- Failure messages should be clear.
- Random tests require fixed seeds.
- Do not weaken tests to make a change pass.
- Do not add source comments.

## Standard Commands

```sh
cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure
```

## Output

State:

- tests added or changed;
- focused command run;
- full command run or reason it was not run;
- remaining verification risk.
