# Dev Run Tests

> Runs typecheck, lint and tests scoped to what changed, then analyses the failures. The gate every commit passes first.

- Skill: `ainova-systems/dev-run-tests` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ainova-systems/dev-run-tests`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ainova-systems/dev-run-tests/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ainova-systems (https://skillmd.com/u/ainova-systems)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ainova-systems/dev-run-tests

---


# Run the Gates

Cheapest-first verification with scope detection. Invoke per task slice, at phase boundaries, and before push.

## Steps

1. Resolve commands: profile `verify` set - run exactly that single gate-runner command and report what it ran and skipped; the remaining steps are its internals and this skill adds only the failure analysis. Else profile `typecheck` / `lint` / `test`; else detect (`package.json` scripts, `*.sln` - `dotnet test`, `pyproject.toml` - pytest, `go.mod` - `go test ./...`, `Makefile` targets). Confirm detected commands in one line on the first run.
2. Detect scope: `git status --porcelain` + `git diff --name-only` - map changed files to their test areas. Docs/markdown-only change - report "no tests to run" and stop. An explicit argument overrides.
3. Typecheck first - it fails fastest. On error: report the file and the first error, STOP.
4. Lint second. On error: report the finding, STOP.
5. Tests: scoped by default; full suite when shared code changed, at phase boundaries, and before push. Enforce the profile `coverage_gate` when set.
6. On failure: failing test name, the assertion, trimmed relevant output; classify the cause (production change / the test itself / environment); propose the fix. Re-run after fixes with the same scope discipline.
7. Report per area: pass/fail counts, duration, coverage vs the gate.

## Verify

- All gates green for the declared scope, or a precise failure analysis delivered - never "mostly passing".

## Scope / hand-off

- Fixing production code - the executing skill/subagent; CI-level failures - `git-finalize-pr`.

## Constraints

- A flaky test (passes on rerun) is reported as flaky with evidence; never silently retried into green.
- Missing env/dependency - report the precondition; never stub the environment to force a pass.

