Skip to content

leanest

Test selector that asks a judge whether a code change could affect each test, skipping only confidently irrelevant tests.

ServicebetaMIT

Overview

Leanest sits in front of your existing test runner, such as Playwright or Vitest, and runs only the tests that matter for a given change. It does not predict which tests will fail; it determines which are safe not to run. For each discovered test it packages the git diff and the test's source and asks a judge: could the current code change affect behaviour verified by this test? Confidently irrelevant tests are skipped, loudly; everything else runs through your runner unchanged.

The default judge is classifier.dev, free and with no auth, and Jev or Laya can be selected with a TypeSafe key. It fails open: uncertainty means run, and a missing key, timeout or malformed response runs the full suite with a warning. Deterministic overrides always run tests whose own file changed, that import a changed file, or that navigate a route a changed file serves, and whole-suite rules run everything when runner setup changes and skip everything when only Markdown changed. Commands select, run, or rank tests by relevance for debugging.

What the decision model decides

TypeQuestionAnswers
Yes / noCould the current code change affect behaviour verified by this test?—

How it works

  1. Resolve the git diff and discover test files
  2. Apply whole-suite rules and deterministic overrides
  3. Ask the judge about each remaining test
  4. Skip only confidently irrelevant tests; fail open on uncertainty
  5. Run selected tests with the existing runner

Strengths

  • Fail-open design keeps safety
  • Deterministic overrides for obvious cases
  • Works with unmodified runners
  • Free default judge

Caveats

  • Skipped tests can still hide regressions if the judge is wrong
  • Jev mode needs a key
  • Benefit depends on suite size

Getting started

npm install -D leanest, then npx leanest playwright (set LEANEST_PROVIDER=jev and TYPESAFE_API_KEY to use Jev).

At a glance

Type
Service
Status
beta
Language
TypeScript
Runtime
Node CLI
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

Does it predict failures?

No, it decides which tests are safe not to run.

What happens if the judge is unavailable?

It runs the full suite and says so.

Must I use Jev?

No, the default judge is classifier.dev; Jev and Laya are options.

Related projects

  • CLI that scores every test against a git diff with Jev and emits filter arguments for vitest, jest, node, Playwright, cargo, go and rspec.

    ProjectbetaTypeScript
  • Semantic grep for code, diffs and CSV rows that packs 16 chunks per Jev request and prints file:line hits with CI-friendly exit codes.

    Agent skillbetaTypeScript
  • Supercov★ 154

    Coverage, security and quality CLI where Jev answers yes/no property questions per file so agents know what to fix first.

    CLIproductionRust
  • Rust code-review gate asking Jev small typed questions about functions and tests, failing CI only on rules measured 80% right.

    CLIproductionRust
  • Gives Claude Code, Codex, Pi and OpenCode five typed Jev tools (classify, check, score, rank, ask) plus a skill on when to use them.

    MCP serverbetaTypeScript
  • OpenAPI diff tool that adds Jev semantic review of changed prose to deterministic checks, then code decides pass, review or block.

    ServicebetaPython