Skip to main content
You’re about to edit src/auth.ts. Does any doc ride on it? hibi query --path src/auth.ts lists the two claims — one in README.md, one in CLAUDE.md — that both anchor to the 30-minute token TTL you’re about to touch. You change the constant, run hibi diff --since origin/main, and Hibi tells you exactly which two sentences you just broke — and hands you the command to fix each. That is the whole point: docs that flag themselves the moment the code beneath them moves. Hibi tracks claims: sentences in your docs or AI-agent instructions that assert how the code behaves. You anchor each claim to the code that backs it, and hibi check flags the claim whenever either side drifts, so no reader, and no agent, acts on a page that has fallen out of sync with the source. This page takes you from nothing to a checked claim. The whole loop is three verbs: record a claim, check it, and read the verdict. A flag is a request to re-verify, not a claim that the doc is wrong.

Install

Hibi ships as a single self-contained executable, with no runtime to install. You can also add it to a Bun project from npm.
The npm package is Bun-targeted: it runs under Bun. For a zero-runtime install on any machine, use the prebuilt binary above.

Record and check a claim

1

Initialize the store

hibi init creates a committed .claims/ directory beside your docs, with a per-repo banner nonce. Each claim becomes its own file in here, so merges stay scoped: there is no monolithic lockfile.
2

Record a claim, anchored to the code that backs it

Hibi is span-first: you point at the documented sentence and at the code it describes, and the doc span supplies the claim text. The example below binds a line of your README to the constant that enforces it.
Because the code side mentions the literal 5, changing MAX_ATTEMPTS to 50 later will trip this claim even if nothing else in the file moves.
3

Verify every claim

hibi check re-finds each claim’s anchors in your current files and computes a verdict. Add --write to stamp a status banner into any doc whose claims are now suspect, so the staleness is visible in the file itself.
A verdict reads like doc:unchanged · code:changed · behavior:at-risk: one short, side-prefixed status per axis. hibi check exits 0 when everything is clean, 2 when an enforced claim has a gating problem (changed, orphaned, or ambiguous on either side, expired, or refuted), and 3 for a re-anchorable warning (moved or at-risk). A moved claim never fails the build on its own.

Everyday commands

hibi status --doc <path> is the read-time gate an agent runs before it trusts a doc; hibi diff --since <ref> is the write-time loop that reports what a change invalidated. Both exit 2 on a gating problem and 3 on an advisory warning, so they drop straight into CI or a git hook. Every drift verdict comes with a remediation menu — a recommended next step and a list of actions, each with a ready-to-run command where Hibi can perform the fix (hibi reanchor asrt_…, hibi retire asrt_…). You rarely have to figure out the fix yourself; the verdict hands it to you.
Output is TTY-aware: a rich human view in a terminal, compact JSON when piped or in CI. Pass --json to force the machine contract, --pretty to force the human view. The JSON is concise by default — add --explain for the full evidence tail, or --no-hints to drop the remediation menu.
See the CLI reference for every command, flag, exit code, and strictness level (--fail-on gating|warn|tamper|never).

How it works

Claims, redundant anchors, the doc-first resolution flow, and how verdicts are graded, deterministically, with no model in the check loop.