CLAUDE.md that actually works.

Enforce AI coding assistant instruction files via hooks. One command. Runs locally. Zero cost.

$ curl -sSf https://arai.taniwha.ai/install | sh click to copy

Rules fire when they matter

You: "Create a new database migration"

PreToolUse: Write migrations/versions/001_add_users.py
→ Arai guardrails:
  - Alembic never: hand-write migration files

Claude: "I should use alembic revision --autogenerate instead..."

Smart, not noisy

Intent-aware

"Never hand-write migrations" fires on Write but not Edit. Editing existing migrations is fine.

Code graph

tree-sitter scans your codebase. Writing to migrations/ triggers alembic rules even without "alembic" in the file.

Session tracking

"Never push without tests" silences after cargo test runs. Arai remembers what happened this session.

Zero noise

Only fires domain-specific rules. Principles already in CLAUDE.md stay silent.

Any LLM enrichment

Classify rules via Claude, Ollama, or any LLM CLI. Or use the built-in sentence transformer.

<5ms latency

SQLite lookups on the hook path. No network calls. No LLM calls at runtime.

Install

Script
curl -sSf https://arai.taniwha.ai/install | sh
Cargo
cargo install arai
Then
cd your-project && arai init