--- name: verify description: Run tiny-pattern-ts's fast, offline correctness gates — `npm run test` (mandatory type check + unit suite), then an optional whole-project `npm run check` — and recover from failures without suppressing the type system. Use when verifying TypeScript/ESM changes before committing, when asked to check or run tests, or when a pre-commit hook fails. --- # Verify (tiny-pattern-ts) The repo's correctness ladder. `test` is the gate you are responsible for; `check` is a whole-project confirmation; both are fast and offline. Do not pull repo-maintenance scans into the feature loop. ## Procedure 1. `npm run test` — type check + unit suite. This is the gate. 2. If it fails: read the error, then fix the **root cause in the types/code**. Do not silence it with `@ts-nocheck` / `@ts-ignore` / `oxlint-disable` / an `as` cast (see [AGENTS.md § Never do](../../../AGENTS.md#never-do)). Re-run. 3. Optional whole-project pass: `npm run check` (`tsc → oxlint → oxfmt → cspell`). Pre-commit already runs these on staged files; `check` confirms the entire tree. 4. If `check` flags style or format: `npm run fix`, then repeat from step 1. 5. Commit normally — the pre-commit hook re-runs the staged-file checks. Never bypass a hook with `git commit --no-verify`. ## What not to run here - `npm run maintain` (`maintain:knip` + `maintain:outdated`) — advisory scans, not correctness. Feature work must not gate on a stale dependency or an unused export; CI runs it as a non-blocking job. Run it only on an explicit maintenance / update-deps branch. - `npm run build` — emit is exercised by the CI publish job, not the dev loop. - `npm run watch` — a persistent, never-returning process (`--watch`) meant for a human dev loop (stop with Ctrl-C). Never run it as an agent: it blocks the turn and streams continuous output. Use `npm run test` for feedback instead. ## The ladder (fastest → most thorough) pre-commit (~1.3s, staged files) → `npm run test` (~3.5s) → `npm run check` (~3s, whole project). Source of truth for every command: [`package.json#scripts`](../../../package.json). Why each tier exists: [CONTRIBUTING.md § Feedback tiers](../../../CONTRIBUTING.md#feedback-tiers).