Appearance
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.
| Loop | What happens | Outcome | AI calls? |
|---|---|---|---|
| After every agent turn | Your CLAUDE.md compiled into grep + AST checks. The agent fixes violations before moving on. | Catches drift before it compounds | No — free, sub-second |
| Before every commit | AI 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 most | Yes — your Anthropic key |
| Before every merge | Multi-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 focus | Yes — 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 says | Caliper 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 | |
|---|---|
| Languages | TypeScript, JavaScript, Python, Go, Ruby, Rust, Java — auto-detected by npx caliper init |
| Monorepos | Supported. Configure srcDirs in .caliper/config.yaml to scope checks |
| Large PRs | PRs over 800 lines work. PRs under 100 lines use a fast path that skips heavier phases |
| Generated code | Auto-excluded by default. Configure excludeFiles patterns to tune |
| Non-Claude agents | Convention checks work with any agent that respects stop hooks. AI review is agent-agnostic — it reviews diffs, not agent output |
| Custom LLM backends | Not yet supported. Caliper uses Anthropic's Claude models exclusively |
| CI environments | GitHub Actions supported natively. Any CI that runs Node.js 20+ can use the CLI directly |