Skip to content
A steel ratchet wheel with its pawl locked into one tooth, edges lit in lime.
Early: not on npm yet

Fast guardrails for AI-written code.

One standard, for the linter and formatter you choose. Existing findings are recorded once; from then on, quality can only move forward.

bash
npx @santi020k/pawl init

In the terminal

Old findings are allowed. New ones are not.

Pawl runs the engine you chose, then compares the result with the baseline the repo recorded on day one. These are real runs on a small repo.

$ pawl checksrc/billing.ts:1:20  error  biome   correctness/noUndeclaredDependencies  Dependency stripe-lite isn't specified in package.json. src/billing.ts:3:32  warn   biome   suspicious/noExplicitAny  Unexpected any. Specify a different type. src/billing.ts:4:1   error  pawl    pawl/no-new-disable  New "biome-ignore" comment. Fix the finding instead of switching the check off. src/billing.ts:6:14  error  biome   suspicious/noDoubleEquals  Using == may be unsafe if you are relying on type coercion. 3 errors, 1 warning.6 existing findings allowed by the baseline.

An agent added billing.ts. The six findings the repo already had are allowed; the four new ones are not.

$ pawl check --changed --format agent{"file":"src/billing.ts","line":1,"rule":"biome:correctness/noUndeclaredDependencies","message":"Dependency stripe-lite isn't specified in package.json.","fix":"Check that the package exists and is the one you mean, then add it to package.json."}{"file":"src/billing.ts","line":4,"rule":"pawl/no-new-disable","message":"New \"biome-ignore\" comment. Fix the finding instead of switching the check off.","fix":"Remove the disable comment and fix the finding it hides."}{"file":"src/billing.ts","line":6,"rule":"biome:suspicious/noDoubleEquals","message":"Using == may be unsafe if you are relying on type coercion."}{"file":"src/billing.ts","line":3,"rule":"biome:suspicious/noExplicitAny","message":"Unexpected any. Specify a different type.","fix":"Use a specific type, or unknown and narrow it."}

The same run for a coding agent: one JSON line per finding, errors first, each with the fix.

$ pawl checkNo new findings.2 existing findings allowed by the baseline.The code has fewer findings than the baseline allows. Run "pawl baseline" to lock that in. $ pawl baselineBaseline updated: 2 findings recorded in .pawl/baseline.json.

Someone cleaned up legacy.ts. The check passes and says so; one command locks the gain in.

The ratchet

Quality can only move forward.

A pawl is the part of a ratchet that stops it slipping backward. This tool does the same for a codebase, so a team, or an agent writing code for it, can adopt a strict standard without fixing everything first.

The ratchet over eleven commitsThe number of findings the baseline allows starts at 24 and steps down to 20, 16 and 11 as the code improves. It never goes back up. Findings stay at or under it. At commit 8 a change would have raised findings to 19, above the 16 allowed, so the check failed and it did not land.01020New findings: check failspawl baselinecommits →
Allowed by the baselineFindingsBlocked change
  1. 01

    Record once

    When a repo adopts the standard, .pawl/baseline.json counts its findings per file and rule. Commit it, and nothing fails on day one.

  2. 02

    New findings fail

    Anything beyond those counts fails the check. So does a new biome-ignore, eslint-disable or @ts-ignore comment.

  3. 03

    Lock in the gains

    When the code improves, pawl says so. pawl baseline lowers the counts, and the repo cannot slip back past them.

Your tools

One standard, compiled for the engine you use.

The standard has 200 rules, named once with ESLint's names. Pawl compiles them for each engine, and every finding shows the engine's own rule name.

Lint
BiomedefaultOxlintESLint
Format
BiomedefaultPrettier

The engines stay usable on their own: biome check and eslint . read the same config files.

$ pawl explain eqeqeqeqeqeq  Use === and !==.   Level here:  error (default standard)  Biome:       suspicious/noDoubleEquals  https://biomejs.dev/linter/rules/no-double-equals  ESLint:      eqeqeq

Built for coding agents

Findings an agent can act on.

--format agent prints one compact JSON line per finding, with the fix, and nothing at all when there is nothing to do. pawl init --agents adds a Claude Code hook that runs it after every edit, a Cursor hook that fixes what it can, and instructions in AGENTS.md, which Codex and most other agents read on their own.

Set up agents
json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "npx pawl check --changed --format agent"
          }
        ]
      }
    ]
  }
}

What else

Small config files. Clear defaults. No surprises.

Pawl never deletes or overwrites a tool config you already have, and a rule an engine cannot enforce is reported, never papered over.

  • pawl init detects the stack and the tools already in use, shows what it will change, and asks before writing.

  • pawl migrate reads your ESLint config the way ESLint resolves it, legacy .eslintrc included, and writes down only what differs from the standard.

  • For what only an ESLint plugin can check: Vitest, Testing Library, Zod, unicorn and more. Pawl holds the rules; your project installs the plugin.

  • For the AI SDK, OpenAI, Anthropic, LangChain, MCP, Hono and more: no imports of package internals and no API keys in the code. No plugin needed.

  • 17 checks of pawl's own for Dockerfiles and Compose files: unpinned images, secrets, running as root, privileged services.

  • Extend @santi020k/pawl-policy or publish your own. Repos may tighten any rule, but locked rules cannot be loosened.

  • pnpm, npm and yarn workspaces, Turborepo and Nx. React rules apply in the React app and nowhere else.

  • Quality runs every code-quality tool in a repo, in any language, with one command. It leaves the JavaScript engines to pawl and its baseline, and runs pawl as one of its tasks.

  • TypeScript and Node built-ins. Every engine, formatter and plugin is an optional peer that your project installs.

ts
import { definePolicy } from '@santi020k/pawl'

export default definePolicy({
  extends: '@santi020k/pawl-policy',
  rules: { 'no-console': 'off' },
  ignore: ['generated/**']
})

A shared standard

One policy for every repo.

A repo on the default standard needs no config file. To change something, add pawl.config.ts. To set the standard for many repos, extend a policy package such as @santi020k/pawl-policy, or publish your own under your scope and lock the rules that matter.

Read about policies

Set up a repo in one command.

Pawl is early. The library works and is tested against the real Biome and ESLint, but it is not published to npm yet and the API may still change.

bash
npx @santi020k/pawl init