A project-local Agent Skill (.agents/skills/verify/SKILL.md) wraps the correctness ladder as an on-demand procedure: run npm run test, recover by fixing the root cause in the types (not by suppressing them), optionally run whole-project npm run check, and commit through the hook. Exposed as /skill:verify for pi, and read by any Agent-Skills harness from .agents/skills/. It is a procedure, not a doc fork: it links AGENTS.md / CONTRIBUTING.md / package.json instead of restating the rules, so there is no drift. Agents must not start `npm run watch` -- it never returns and blocks the turn. The skill's ladder drops watch and calls it out under "What not to run here"; AGENTS.md gains a matching guardrail.
2.2 KiB
2.2 KiB
name, description
| name | description |
|---|---|
| verify | 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
npm run test— type check + unit suite. This is the gate.- 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/ anascast (see AGENTS.md § Never do). Re-run. - Optional whole-project pass:
npm run check(tsc → oxlint → oxfmt → cspell). Pre-commit already runs these on staged files;checkconfirms the entire tree. - If
checkflags style or format:npm run fix, then repeat from step 1. - 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. Usenpm run testfor 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.
Why each tier exists: CONTRIBUTING.md § Feedback tiers.