Skip to main content
Glama

Try it now

See it catch a wrong change (5 seconds, no key, no project):

npx --yes https://github.com/apex-engine-dev/apex-verify/releases/latest/download/apex-verify.tgz verify --demo

Check the change an AI just made in your project (Node 20+ and git):

cd your-project
npx --yes https://github.com/apex-engine-dev/apex-verify/releases/latest/download/apex-verify.tgz verify "what you asked the AI to do"

No API key needed. If you have Claude Code or Gemini CLI signed in, Apex verify uses it to write the checks, on the subscription you already have. With a key, it calls the API directly (Gemini by default; OpenAI, Anthropic, OpenRouter or any OpenAI-compatible endpoint with --provider / --base-url). It changes nothing in your project and exits 0 ready, 1 not ready, 3 unknown.

Related MCP server: DiffCI

Why it works

🧪 A different AI writes the missing checks

from your task text, never from the agent's own tests. A model grading its own work shares its blind spots.

🔍 Every check is proven able to fail

each one runs on the old code first; a check that cannot tell old from new proves nothing and is thrown away.

🛡️ Your project is never touched

everything runs on a copy, in a sandbox where the platform allows (macOS Seatbelt, Linux bubblewrap, Windows AppContainer).

It also scans for the ways an agent can game a test run (tests deleted, skipped, .only, assertions weakened, a test script that cannot fail), runs your own tests before and after, and answers ready, not ready or unknown, never a silent pass.

Does it work? The honest numbers

We collected AI-written changes and knew which were wrong from hidden tests Apex verify never saw.

Wrong changes stopped

Good changes wrongly stopped

17 small projects (108 changes): tests + cheating scan

about 8 in 100

not measured separately

17 small projects: Apex verify

about 65 in 100 (52 on the 12 public projects you can rerun)

about 3 in 100

23 real libraries (200 changes, each a real historical bug fix): tests + cheating scan

75 in 100

11 in 100

23 real libraries: Apex verify 0.2.4, Gemini API checker

91 in 100

23 in 100

23 real libraries: Apex verify 0.3.1, no key (Claude Code)

106 of 107 (99 in 100)

16 of 93 (17 in 100)

  • It helps most where tests are thin. On the small projects the tests caught almost nothing and the checks did the work. On real libraries the tests are good, and the checks close the gap: in the latest run (0.3.1, no key) only 1 of 107 wrong changes got through (details).

  • Out-of-date tests no longer count as a regression without a second look. When a library's old test asserts exactly what the task asks to change, 0.3.1 says so (unknown, "update the test") instead of not ready. That cut false alarms on real libraries from 25 to 17 in 100 with no wrong change let through.

  • What the research says, and what we tried. We reviewed the published work on AI-written tests (summary in the changelog). The two practices with the best evidence, writing checks without seeing the change and counting only checks that fail on the old code and pass on the new, are what Apex verify does. Two more ideas from that work were measured here: agreement across three independent sets of checks (all three agreed on 101 of 107 blocks; it saved 1 false alarm in 93, so it is opt-in with APEX_VOTE=1) and rerunning a failing check to rule out flakiness (on by default; none was flaky in the benchmark) (details).

  • False alarms are still the open problem. In the 0.2.4 run, 13 in 100 good changes that pass a real library's tests were stopped by a generated check; in about 7 of 10 of those the change really did not do what the task says, which leaves 4 or 5 in 100 as the checker's own mistakes (that rests on our reading of the tasks, so quote both). Three attempts to cut it did not beat the unchanged tool (details). APEX_MODE=warn or fail-on: never never blocks.

  • It still misses things: about a third of wrong changes on the small projects.

  • No key, no loss: with a signed-in Claude Code as the checker, 0.3.0 stopped 19 of 31 wrong changes on the public small projects, against 16 for the Gemini API checker on the same changes, and stopped none of the 48 good ones (details). One run, so "about as good".

  • A checker from another company works about as well (Claude 55 in 100 vs Gemini 63 on the same changes); two checkers that must agree did not help (experiments, including failures).

  • Limits: Gemini models wrote every change, one run each. Everything reruns with node benchmark/run-gate.mjs. A correction we made on 2026-11-23 is here.

Please try to break it: a wrong ready, or a not ready on a good change, is the most useful bug report we can get.

Put it where the change happens

Where

How

Tested

Claude Code

/plugin marketplace add apex-engine-dev/apex-verify then /plugin install apex-verify@apex: a Stop hook blocks "done" until the change is ready (at most 3 times)

in a real session

GitHub pull requests

the Action: one verdict comment, kept up to date, and a check you can make required

on real pull requests

Gemini CLI

an AfterAgent hook

in real sessions

Any MCP client

the verify_change tool

with real MCP input

Codex CLI, Cursor

stop hooks in their documented formats

synthetic input only, not yet in the apps

Copy-paste configs: docs/INTEGRATIONS.md. What is tested, per use case: docs/USE-CASES.md.

# .github/workflows/apex-verify.yml
name: Apex verify
on: pull_request
permissions: { contents: read, pull-requests: write }
jobs:
  apex-verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - uses: apex-engine-dev/apex-verify@v1
        with:
          api-key: ${{ secrets.GEMINI_API_KEY }}

The task is the pull request's title and description. It fails the job on not ready (or when it could not run). Real output on the demo change:

❌ Apex verify: NOT READY

  • 2 checks written from the task fail on the new code

    check: slugify('Hello, World!') is 'hello-world'
      expected: hello-world
      actual:   hello-world!
    • fix: Make the change satisfy the behaviour in the task; the failing check output shows what is expected.

tests: 2 passed, 0 failed · checks: 5 passed, 2 failed; written from the task by gemini-3.1-pro-preview; they fail on the old code

  • Checker: with no provider and no key, Gemini CLI (if signed in with a Google account) or Claude Code writes the checks: --provider claude-cli / gemini-cli to choose, --model optional. The CLI gets only the prompt, in a new empty folder, with its tools, settings and MCP servers off (Claude Code) or its agent prompt replaced and no extensions (Gemini CLI). With a key: GEMINI_API_KEY (default), or --provider openai|anthropic|openrouter --model <id>, or --base-url for any OpenAI-compatible endpoint. Pick a checker from a different company than the agent that made the change. --no-model runs only your tests and the cheating scan (the verdict is then at most unknown).

  • What gets checked: the working tree an agent just edited, a branch (--base), or a diff from any tool or person (--diff).

  • Languages: checks are written for node:test, pytest, Jest, Vitest, Rust (cargo test) and Go (go test); other stacks still get your tests and the scan.

  • Team settings: a committed .apex-verify.json (provider, model, testCommand, timeout, lockTests), read from the commit being compared with, so a change cannot rewrite its own rules. Flags win.

  • Evidence: --sign-key signs the report, --badge-out writes a README badge, --lock-tests restores the original tests before they run.

What it will not do

  • Prove correctness. It raises the bar; a check can be wrong in both directions.

  • Replace review or CI. It runs next to them (and in CI with the Action).

  • Send your code anywhere but the checker you choose: your task and the relevant source files (about 24 KB at most) go to that model. No telemetry.

Questions

Isn't this just CI? CI runs the tests that exist. The pain is the change nobody wrote a test for, or the test the agent deleted or skipped. Apex verify writes the missing checks, proves they can fail, and flags tampering.

What does it cost? One model call per task to write the checks (reused while an agent retries), plus a short second look when a check fails: seconds, and cents or a little of your subscription. Your tests run locally.

What if the checker is wrong? The table above shows how often. A suspect check is turned into unknown by a second look, the hook never blocks more than 3 times, and APEX_MODE=warn never blocks.

Contribute

If it catches something for you, a ⭐ helps others find it. If it gets something wrong, open an issue: we add your case to the benchmark and credit you.

You can

Where

Send a change Apex verify wrongly blocked (real examples are what would help most)

what was tried, then an issue

Try the OpenAI or Anthropic API checker once and record what happened

issue #30

Run the Codex or Cursor hook inside the real app

a pull request or issue

Add a language or test runner

issues labelled good first issue

Be a second maintainer

GOVERNANCE.md

There is currently one maintainer; expect replies in days, not hours.

Contributing · Roadmap · Security · Status · Changelog

Licence

Apache-2.0: use it, modify it, ship it, at work or in your own products. The Apex verify name and logo are trademarks, not part of that grant (TRADEMARKS.md). Contributions use a DCO sign-off (git commit -s) and you keep your copyright.

Available Tools

1 tool
verify_changeA

Check whether the change made in a project (git working copy vs a base) really does what the task says. An independent model writes checks from the task, proves they fail on the old code, and runs them with the project's tests on the new code. Returns READY, NOT READY (with the failing check and a fix hint) or UNKNOWN. Call it before saying a task is done.

Inputs: task (required), dir, base.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is nothing to confuse it with. Its purpose—independently verifying that a change satisfies the task—is stated unambiguously.

    Naming Consistency5/5

    verify_change follows a clear verb_noun snake_case convention that describes exactly what it does. With a single tool there is no risk of mixed conventions, and the name reads consistently with standard MCP naming.

    Tool Count3/5

    One tool is thin even for a narrowly scoped verification service; there is no companion tool to poll status, list past checks, or cancel a run. The single tool earns its place, but the surface is borderline under-provisioned.

    Completeness4/5

    The core verification lifecycle (write checks, prove they fail on old code, run on new code, return verdict) is covered, and the READY/NOT READY/UNKNOWN outcomes give agents a usable signal. Minor gaps remain: no way to inspect check details after the fact, track a long-running verification, or cancel one.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables verification of AI coding agent self-reports against git diff truth and a deterministic gate, producing pass/regenerate/reject directives to ensure claimed work matches actual changes.
      6
      AGPL 3.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Observation-only CI/CD validation for AI coding agents. Analyze a change, compare safe test commands, and report evidence without altering required CI.
      1,001 npm
      AGPL 3.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables Claude to independently check an AI agent's work in a local git repository by recording a baseline, running only the checks relevant to the changed files, and cross-checking what the agent claimed. Returns a compact, evidence-labelled report with a verdict and a ready-to-paste next prompt, so unverified success claims can't slip through.
      8
      MIT
    • A
      license
      A
      quality
      F
      maintenance
      Enables AI coding agents to get one independent reviewer that first reasons about a problem without seeing the proposed solution, then compares it against the revealed proposal and returns a compact verdict (KEEP/MODIFY/REPLACE/INSUFFICIENT_EVIDENCE) with risks, an alternative, and a falsification probe before committing to expensive decisions.
      3
      MIT