Skip to content

CaliperYour CLAUDE.md rules are instructions for an AI that forgets.

Convention checks after every agent turn. AI review before every commit. Full pipeline before every merge.

By turn 5, your agent is borrowing patterns from training data, not your codebase.

Caliper compiles your CLAUDE.md into deterministic checks that run after every agent turn — sub-second, free, no API calls. When the agent drifts, Caliper catches it before the mistake compounds into the next ten files. AI review catches what deterministic checks can't: missing awaits, race conditions, security holes, and code that's quietly drifted from your repo's established patterns — all before the code ever leaves your machine.

The stop hook in action

npx caliper init reads your CLAUDE.md, compiles every mechanically checkable convention into a deterministic rule, and installs a Claude Code stop hook. Every time your agent completes a turn, Caliper checks its output — sub-second, free, no API calls. The agent sees the violations and fixes them before writing the next file.

📄CLAUDE.md
markdown
## Code Style

- No classes — use functions and plain objects
- Keep functions under ~30 lines
- Never use execSync with template strings

## Architecture

- Always use the project's httpClient — never use raw fetch()
- Every file in src/api/ must have a .test.ts file
- All database writes must be awaited
caliper init && claude
claude — ~/my-project
╭─── Claude Code v2.1.76 ──────────────────────────────────────────────────────╮
                                                                                
                          Welcome back!                                       
                                                                                
                                                                         
                                                                                
                               ▘▘ ▝▝                                         
               Sonnet 4.6 (1M context) · Claude Max ·                       
                            ~/my-project                                       
╰────────────────────────────────────────────────────────────────────────────────╯

Three layers of enforcement

Your conventions are already written in CLAUDE.md. Caliper turns them into enforcement at three levels — each narrowing what the next needs to evaluate.

LayerWhen it runsAI calls?
Convention checksAfter every agent turn, via stop hookNo — free, sub-second
AI reviewBefore commit, via npx caliper review or pre-commit hookYes — uses your Anthropic API key
Full pipelineBefore every merge, via npx caliper <pr>Yes — multi-phase with specialized lenses

Convention enforcement is always free. AI review catches what deterministic checks can't — missing await, race conditions, security holes, and code out of compliance with your repo's established patterns. How it all fits together →

Caliper doesn't charge anything. You bring your own Anthropic API key and choose the model. Convention checks require one API call to compile your CLAUDE.md — after that, they run locally with no API calls. AI review uses your key at whatever model you select.

Full AI review on your local changes

Before you create a PR, npx caliper review runs a full AI review on your staged changes. Missing an await, bypassing your HTTP client, introducing a subtle race condition — things that can't be caught mechanically. Run it manually or wire it into a pre-commit hook for automatic enforcement. You review each finding interactively and apply fixes with --fix. Issues get resolved locally, before they ever reach a reviewer.

Full pipeline before merge

When a PR is ready, Caliper runs a multi-phase review with specialized lenses for security, data integrity, API contracts, concurrency, and design. Findings are posted as inline GitHub comments. You approve each finding before it's posted.

C
caliper-aicommented 2 minutes ago
blocking
src/orders/checkout.ts, line 47
Missing await on database write — order silently not saved

db.orders.insert(order) returns a Promise, but the result isn't awaited. The customer sees a confirmation page, but the order never persists.

Suggested fix
db.orders.insert(order);
await db.orders.insert(order);

What stays local, what doesn't

🔒

Convention checks are entirely local

Compiled grep and AST checks run in your shell. No code is transmitted. No API key required. Works air-gapped.

📦

AI review sends only the diff

Only the changed lines and surrounding function context are sent to the Anthropic API. Not your full codebase, not your git history, not your environment.

🛡️

No hosted service, no data retention

Caliper is a CLI tool that runs in your environment. Anthropic's API does not use inputs for training. State and history stay on your machine.

Full security & data flow details →

You already have linters, CLAUDE.md, and maybe a PR bot. Here's what's missing.

What it doesWhat it doesn't do
ESLint / SemgrepEnforces language-level rules: formatting, unused imports, generic security patterns.Doesn't know your project. Can't enforce "use our HTTP client, not raw fetch" or "every migration needs a test."
CLAUDE.mdTells the agent your conventions in plain English.The agent forgets them as context fills up. By turn 10 it's borrowing patterns from training data, not your codebase. No enforcement mechanism.
CodeRabbit / PR botsReviews code at merge time. Catches issues in the final diff.Reviews happen after the agent has already written 15 files with the same bad pattern. Too late to prevent drift — only reports it.
CaliperCompiles your CLAUDE.md into deterministic checks that run after every agent turn. Adds AI review before commit. Full pipeline with specialized lenses before merge.Not a linter replacement — complements them. Stop double-checking Claude — spend your review time on judgment, not pattern-matching.

The gap in the current stack: no tool enforces your project-specific conventions at the speed agents produce code. Linters are generic. CLAUDE.md is aspirational. PR bots are too late. Caliper fills the gap between "we wrote down our standards" and "our standards are actually enforced."

Your corrections become enforcement

When you approve or skip findings during review, Caliper records those decisions. High-skip-rate patterns get deprioritized. High-approval patterns get promoted. The review calibrates to what your team actually cares about.

The result is a flywheel: use your AI agent → correct its mistakes → Caliper captures your conventions → new checks prevent repeat mistakes → the agent produces better code over time.

How the feedback loop works →

Get started

Requires: Node.js 20+, Anthropic API key, a project with CLAUDE.md
npm install --save-dev @caliperai/caliper
npx caliper init

Takes ~2 minutes. Caliper compiles your conventions into checks, installs the Claude Code stop hook, and you're done — enforcement is automatic from that point on.

© 2026 Caliper AI. All rights reserved.