AI writes the code. AI writes the tests. Who checks the AI?

Approve AI code with confidence.

When AI writes your code and AI writes your unit tests, the feedback loop closes on itself. Tests pass because the AI wrote tests for the code the AI wrote. Nobody checked whether the code correctly handles what the npm package actually throws.

We're outside that loop. 126 npm packages. Rules extracted from changelogs, issue trackers, and API docs — not inferred by AI. Pass or fail. Same answer every run.

payment-service.ts
// AI-generated
async function createCharge(amount: number) {
const charge = await stripe.charges.create({
amount, currency: 'usd',
});
}
❌ Nark violation: stripe.charges.create() not wrapped in try/catch — StripeCardError on decline goes unhandled

Why AI always gets this wrong: The Stripe documentation quickstart shows this exact pattern without error handling. AI learned from those examples and repeats the pattern on every charge it generates — systematically, not accidentally.

Free for 1 repository · No credit card required

Why trust our rules

We did the research. You get the scan.

We analyzed real-world TypeScript projects and read the changelogs, issue trackers, and API docs for every package we cover — so the rules are already written when you connect your repo.

1,800+

real-world projects analyzed

126

npm packages with written rules

<1 min

to scan your entire repo

Built for teams using:

Behavioral contracts for 126 npm packages — and growing every day

axiosaxios
prismaprisma
stripestripe
openai
supabasesupabase
@aws-sdk
redisredis
mongoosemongoose
sequelizesequelize
pgpg
knexknex
ioredisioredis

And 113 other packages — growing every week.

Don't say probably. Stay confident.

Approving AI code without a completeness check is a guess. Nark gives you a deterministic answer before you merge.

Without Nark
?
feat: add Stripe payment flow
AI-generated · 47 additions
"Looks fine I think? Probably handles errors... the AI usually does 🤷"
— every reviewer, every time
With Nark
feat: add Stripe payment flow
AI-generated · 47 additions
stripe0 violations
prisma0 violations
axios0 violations

We read the manual for every power tool in your garage.

npm packages are power tools. Each one comes with a manual. Most developers skip it. We didn't — and now we check your code against every rule in every manual, every time.

The Code Garage
4 tool categories · 126 contracts
📋 manual
HTTP Clients
axios, got, fetch
📋 manual
Database ORMs
prisma, mongoose, pg
📋 manual
Payment & AI
stripe, openai, plaid
📋 manual
Cache & Queue
redis, bull, ioredis
126 packages · behavioral contractsReady
axios
axios
HTTP
3
prisma
prisma
ORM
1
stripe
stripe
Payments
2
openai
AI
redis
redis
Cache
1
pg
pg
Postgres

Every time your code references one of those tools, we run through the whole checklist — not just "did you turn it on" but "did you follow every safety procedure, every time."

Unit tests check that the tool worked. We check that you used it right.

 Unit TestsNark
What it checks
·Code you wrote
npm package integration rules
Who writes the rules
You write test cases
We extract rules from docs & changelogs
Catches missing code
Only if you wrote a test for it
Always — rules are exhaustive
Setup required
Write tests per function
Connect GitHub — no manual config required
Updates when packages change
You update tests manually
We update contracts automatically

Fixed Rules. No Guesswork.

Most tools use AI to guess whether your code looks correct. We don't guess. We apply exact rules extracted from package documentation — cited, versioned, and deterministic. When we flag a violation, we can tell you exactly which requirement you're missing and where it's documented. We ship new rules as packages evolve, but each rule is binary: pass or fail.

126
npm package contracts
100%
repeatable — same code, same result
0
probability thresholds — violations are exact

How it works

1

Connect your repository

Install our GitHub App in 30 seconds. We scan on every push, in an isolated sandbox — your code never touches our servers permanently.

2

We scan every package call

On every push, every reference to every contracted package gets checked against its full behavioral contract. Nothing is skipped.

3

Fix with your AI assistant

Get exact file paths and line numbers. Use our MCP server to pipe violations directly into Claude Code or Cursor — fix entire packages in one session.

What we found scanning popular open-source repos

We ran Nark against 132+ popular TypeScript repos across three packages. These are real violations in real code.

35%
openai
19/54 repos affected
67%
stripe
32/48 repos affected
40%
axios
12/30 repos affected

From a single openai scan — click to expand

openai package

Want to see how your codebase compares? Start Free →

Start catching what unit tests miss.

Free for 1 repository. No credit card required.