Skip to content

How It Works

Three loops, tightest first

The tightest loop catches the most issues with the least overhead. Each layer narrows what the next needs to evaluate.

Agent turnCatch drift earlyCommitReview before mergeMergeFull pipeline review
LoopWhat happensOutcomeAI calls?
After every agent turnYour CLAUDE.md compiled into grep + AST checks. The agent fixes violations before moving on.Catches drift before it compoundsNo — free, sub-second
Before every commitAI reviews staged changes for logic bugs, security issues, convention compliance, and design problems. Run manually via npx caliper review or as a pre-commit hook via npx caliper gate. --fix auto-applies corrections.Catches the bugs that matter mostYes — your Anthropic key
Before every mergeMulti-phase pipeline with specialized lenses for security, data integrity, API contracts, and design. Findings posted as inline GitHub comments.Surfaces critical issues so reviewers know where to focusYes — your Anthropic key

Convention compilation

Your conventions already exist as prose in CLAUDE.md. Caliper reads them and compiles every mechanically-checkable rule into a deterministic check — grep patterns, AST analysis, conditional logic, file structure validations. No rule language to learn. No dashboard to configure.

Your CLAUDE.md saysCaliper compiles to
"No classes — use functions and plain objects"grep — flags class declarations in changed files
"Keep functions under ~30 lines"AST — measures each function's line count, depth, and complexity
"If a file uses execSync, it must use array args"forbids — if file matches execSync, must not match template literals
"Every migration needs a test file"file-exists — ensures a .test.ts companion exists
"API routes must validate input with Zod"requires — if file matches route pattern, must contain Zod schema

Caliper supports grep patterns, AST analysis (line count, nesting depth, cyclomatic complexity, parameter count), conditional requires/forbids, file-exists companions, file-path naming rules, and max-lines limits — all generated from plain English. Rules that require judgment become conventions for the AI review layers. Nothing is dropped.

How Caliper is different

vs. linters

Linters enforce language-level rules — formatting, unused imports, type errors. They don't know that your project bans fetch() in favor of httpClient, or that every migration needs a companion test. Caliper compiles your project's conventions from CLAUDE.md — rules that are specific to your codebase, not generic to the language.

vs. PR review bots

PR bots review at merge time — after the agent has already written 15 files with the same bad pattern. By then the damage is systemic. Caliper catches drift after every agent turn, before the mistake multiplies. The PR review layer still runs, but it has far less to find.

vs. CLAUDE.md alone

CLAUDE.md is the right place for conventions. But agents forget them as context fills up — the agent starts borrowing patterns from training data instead of your codebase. Caliper compiles your prose into deterministic checks that the agent cannot ignore: violations exit with code 2, forcing a fix before the turn continues.

Deterministic for the mechanical, AI for the critical

60–70% of convention violations are mechanically checkable. Caliper handles those with deterministic grep and AST checks — no model calls, no latency, no API usage. AI review catches what deterministic checks can't: missing awaits, race conditions, security holes, and code that's drifted from your repo's established patterns.

Compatibility

Status
LanguagesTypeScript, JavaScript, Python, Go, Ruby, Rust, Java — auto-detected by npx caliper init
MonoreposSupported. Configure srcDirs in .caliper/config.yaml to scope checks
Large PRsPRs over 800 lines work. PRs under 100 lines use a fast path that skips heavier phases
Generated codeAuto-excluded by default. Configure excludeFiles patterns to tune
Non-Claude agentsConvention checks work with any agent that respects stop hooks. AI review is agent-agnostic — it reviews diffs, not agent output
Custom LLM backendsNot yet supported. Caliper uses Anthropic's Claude models exclusively
CI environmentsGitHub Actions supported natively. Any CI that runs Node.js 20+ can use the CLI directly

© 2026 Caliper AI. All rights reserved.