
What Abide does
Abide enforces the project-specific instructions that ordinary linters cannot reliably evaluate. These instructions may live in files such as AGENTS.md or CLAUDE.md and include rules like use Yup instead of manual validation, do not create a helper with only one caller, or never expose a raw error to a user.
After each edit or completed turn, Abide sends the relevant rule and code diff to TypeSafe's Jev decision model. Jev returns a probability rather than free-form prose. If the probability indicates a violation, Abide tells the coding agent which rule was broken and asks it to repair the code during the same turn.

Jev sees the rule and the diff, not the agent's conversation. This allows Abide to apply the same checks consistently throughout a long coding session. According to the repository's published replay benchmark, checks take about 300 milliseconds in Jev, while the complete hook takes roughly one second when Node startup is included.
Key features
- Automatic edit checks: Rules can run immediately after each code edit.
- Turn-level checks: Rules that need the complete task diff can run once at the end of a turn.
- Agent integration: Abide supports Claude Code, Codex, and OpenCode.
- Repository-owned rubric: Compiled rules are stored in the readable and commit-friendly
.abide/rubric.jsonfile. - Scoped rules: A rule can use glob scopes so different questions apply to API routes, stylesheets, or other file groups.
- Existing-code audits: Abide can judge files as though they had just been written.
- Calibration and tuning: It can test rules against recent Git history, disable ineffective rules, and help rewrite rules that never fire.
- Fail-open hooks: Missing credentials, network failures, or hook errors do not block the coding session.
- No built-in policy: Abide enforces rules derived from your own instruction files rather than imposing a predefined ruleset.
Prerequisites
You need a repository with instructions for your coding agent and at least one supported agent: Claude Code, Codex, or OpenCode. You also need a TypeSafe API key from typesafe.ai. Alternatively, Abide can use an existing Vercel AI Gateway key through the AI_GATEWAY_API_KEY environment variable.
Install and configure Abide
Step 1: Store your API key
Run the login command and paste your TypeSafe key when prompted:
npx @coldtea/abide loginAbide stores the key in ~/.abide/.env with owner-only access. You may instead place credentials in .env.local or .env at the repository root. Credential lookup checks the environment first, followed by the repository files and then ~/.abide/.env.
If you use Vercel AI Gateway, set AI_GATEWAY_API_KEY rather than a TypeSafe key. Credentials are not accepted through command-line flags and are not logged.
Step 2: Install the agent hooks
From your repository, initialize Abide:
npx @coldtea/abide initWith no agent name, init installs into every supported agent it finds. You can also target one integration explicitly:
npx @coldtea/abide init claude
npx @coldtea/abide init codex
npx @coldtea/abide init opencode- Claude Code: The integration is added to
~/.claude/settings.json. - Codex: The integration is added to
~/.codex/hooks.json. - OpenCode: The plugin is installed at
~/.config/opencode/plugins/abide.js.
Add --project when you want a repository-level installation that teammates can receive with the checkout:
npx @coldtea/abide init claude --projectCodex requires one extra approval step. Start Codex, enter
/hooks, and accept the four Abide hook entries. Codex asks for this approval once for each new hook.
Step 3: Compile the repository rules
Start your coding agent normally. At the beginning of the first session, Abide checks whether the instruction files have changed. The agent then compiles applicable instructions into .abide/rubric.json and reports what it found.
You can also compile before starting a new session:
abide compileCommit .abide/rubric.json if you want the repository's enforceable rubric to be visible and reviewable by the team. Every verdict identifies a rule in this file and quotes the source instruction from which it was derived.
Basic usage
Let Abide check agent edits automatically
Once initialized, start claude, codex, or opencode as usual. No separate background service is required. Suppose an instruction says that API endpoints must use Yup and must not validate input manually. If an agent writes a manual guard, Abide can return a message like this:
Abide: This edit appears to break a rule from this repository's instructions.
- Rule "api-validation-uses-yup" from ~/.codex/AGENTS.md line 65:
"When writing API endpoints, do NOT write input validations manually.
Use Yup (with clear validation messages) + early return in the API handler".
(0.86)
Repair apps/web/src/pages/api/logout.ts now, then continue with the task.The agent receives the repair request and can fix the violation before continuing. With OpenCode, edit violations are appended to the tool result. A turn-level violation produces one follow-up message after the turn.
Check uncommitted changes manually
Use check to evaluate current uncommitted changes in the same way that the hooks would:
abide checkYou may also provide paths when you want to narrow the check:
abide check apps/web/src/pages/api/Audit existing code
The audit command evaluates existing files as if they had just been created. This is useful when adopting Abide in an established repository:
abide audit src/The output includes a summary by rule and a list organized by file. The README reports that auditing 33 API routes in a real Next.js application took about 12 seconds and cost approximately one cent, although actual results depend on the repository and rules.
Review rule activity
Run the report command to see your rules, which ones have fired, and which ones have never fired:
abide reportFor machine-readable output, add --json. JSON output is also available for check, audit, bench, and calibrate.
Understand rule timing and verdicts
Each compiled rule runs in one of two phases:
- Edit phase: Runs after an individual edit and evaluates that hunk.
- Turn phase: Runs once at the end of the turn and evaluates the complete diff against the snapshot taken at turn start.
Turn-level evaluation is important for questions that cannot be answered from the first edit alone, such as whether the agent added functionality that the user did not request. At the end of a turn, Abide also applies edit-phase rules to changes created through shell commands.
Verdicts are divided into probability bands:
- 0.8 or higher: The agent is instructed to repair the violation.
- 0.5 to below 0.8: A note is shown, but the agent is not instructed to repair.
- Below 0.5: Nothing is displayed.
Advanced workflows
Calibrate rules against Git history
A poorly worded rule may score around the middle on many unrelated changes and never produce useful results. The calibration command evaluates every rule against recent real hunks from the repository's Git history:
abide calibrateAbide uses twenty recent hunks for this process and can switch off rules that do not perform effectively. Review the result before relying on a newly compiled rubric across a team.
Tune rules that never fire
After identifying ineffective rules, use tune to have the agent rewrite them:
abide tuneBecause each rubric entry quotes its source instruction, a questionable verdict can be traced back to the wording that produced it. Improving the underlying instruction generally makes the corresponding check clearer.
Replay previous agent sessions
Use replay to judge past sessions from one of the supported agents:
abide replay claude
abide replay codex
abide replay opencodeThis can help you evaluate a rubric against work that has already happened rather than waiting for future violations.
Measure local latency and spend
Run the benchmark command to measure performance and cost on your own machine:
abide benchThe repository reports that checking its 13 rules uses roughly 1,000 to 1,600 input tokens, costs about $0.00004 to $0.00007 per check, and takes about 300 milliseconds in Jev. These figures were measured directly against TypeSafe and may vary, so the local benchmark is the better guide for your setup.
Use scopes to keep questions relevant
Rules in .abide/rubric.json can include glob-based scopes. Use these scopes when an instruction only applies to certain files. For example, validation rules may belong to API routes, while styling rules should be limited to stylesheets. Narrow scopes reduce irrelevant judgments and make verdicts easier to understand.
Privacy and failure behavior
Changed lines are sent to TypeSafe under your own key, with zero data retention requested on every call. The README states that the data is not sent to an Abide-operated server.
Abide's hooks are designed not to break an agent session. Hook paths exit successfully, use a hard deadline, and print only what the host expects. If no key is available or the network is unavailable, the edit proceeds without a check. The missed check is written to .abide/events.jsonl, and abide report includes it in its counts.
Uninstall Abide
Remove Abide from every agent into which it was installed:
abide uninstallTo remove only one integration, name the agent:
abide uninstall codexAdd --project when removing a project-level installation. Uninstallation removes only Abide's own entries. It leaves the rubric files and ~/.abide/.env in place until you delete them manually.
Conclusion
Abide turns natural-language repository instructions into checks that run throughout an AI coding session. Install the appropriate hooks, compile and review .abide/rubric.json, then use automatic checks, audits, reports, calibration, and tuning to keep the rules effective. The result is a lightweight enforcement layer for conventions that traditional linters cannot express.
