DETERMINISTIC CODE ENFORCERv0.3.0

Don't let your AI
ship unsupervised.

Chaperone is a deterministic code enforcer that catches what TypeScript and ESLint miss — file structure, naming conventions, import boundaries, and 16+ custom rule types.

terminal
$ chaperone check
Chaperone v0.3.0
Checking 3 tools + 3 custom rules...
✓ TypeScript
✓ ESLint
✓ Prettier
✓ file-naming: PascalCase (src/components)
✗ forbidden-import: lodash found in src/utils/helpers.ts
✓ import-boundary: auth → billing
5 passed · 1 failed

Built for modern codebases

Everything you need to keep your codebase consistent — especially when AI is writing the code.

📐

16+ Rule Types

File naming, import boundaries, file contracts, component location, and more.

🤖

AI-Aware

Extracts rules from CLAUDE.md, outputs in AI-friendly format for easy paste-to-fix.

🔒

Deterministic

No flaky checks. Pure function-based rules that give the same result every time.

📦

Single Executable

Ships as one binary — no runtime, no dependencies. macOS, Linux, Windows.

🔧

Works Alongside Your Tools

Runs TypeScript, ESLint, and Prettier checks alongside custom rules.

🚀

CI/CD Ready

JSON output format, proper exit codes, zero-config in pipelines.

Three steps to enforcement

Get started in under a minute.

1

Initialize

Detects your tools automatically — TypeScript, ESLint, Prettier.

$ chaperone init
2

Configure

Define your rules in .chaperone.json — or let chaperone generate them.

.chaperone.json
{
  "rules": [
    {
      "type": "file-naming",
      "pattern": "src/components/**/*.tsx",
      "convention": "PascalCase"
    },
    {
      "type": "forbidden-import",
      "pattern": "src/**/*.ts",
      "forbidden": ["lodash", "moment"]
    }
  ]
}
3

Enforce

Run checks and get clear, actionable results.

$ chaperone check

See it in action

Define rules. Run checks. Get results.

.chaperone.json
{
  "tools": {
    "typescript": true,
    "eslint": true,
    "prettier": true
  },
  "rules": [
    {
      "type": "file-naming",
      "pattern": "src/components/**/*.tsx",
      "convention": "PascalCase"
    },
    {
      "type": "forbidden-import",
      "pattern": "src/**/*.ts",
      "forbidden": ["lodash", "moment"]
    },
    {
      "type": "import-boundary",
      "from": "src/features/auth/**",
      "forbidden": ["src/features/billing/**"]
    }
  ]
}
terminal
$ chaperone check
Chaperone v0.3.0
Checking 3 tools + 3 custom rules...
✓ TypeScript
✓ ESLint
✓ Prettier
✓ file-naming: PascalCase (src/components)
✗ forbidden-import: lodash found in src/utils/helpers.ts
✓ import-boundary: auth → billing
5 passed · 1 failed

Install

One command. No dependencies. No runtime.

Quick Install

Detects your platform and installs the right binary.

From Source