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.
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
Behavioral contracts for 126 npm packages — and growing every day
And 113 other packages — growing every week.
Approving AI code without a completeness check is a guess. Nark gives you a deterministic answer before you merge.
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.
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 Tests | Nark | |
|---|---|---|
| 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 |
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.
Install our GitHub App in 30 seconds. We scan on every push, in an isolated sandbox — your code never touches our servers permanently.
On every push, every reference to every contracted package gets checked against its full behavioral contract. Nothing is skipped.
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.
We ran Nark against 132+ popular TypeScript repos across three packages. These are real violations in real code.
From a single openai scan — click to expand
openai packageWant to see how your codebase compares? Start Free →
Free for 1 repository. No credit card required.