Skip to main content

🚀 Beta: All Pro and Team features are free. Install on GitHub →

Put the gate where your agent already runs.

One decision path, several entry points. The recognition, the call and the verdict mapping are the same code everywhere — only the host contract differs.

Pick the row you are actually running. Each one says what it enforces, and what it does not see.

Agent hosts

OpenClaw

The host declares this hook fail-closed itself. Its own source says an authorization hook should fail closed when a required field is absent — we did not have to impose it.

openclaw plugins install @coderifts/agent-hooks

Then confirm it loaded:

openclaw plugins inspect coderifts-contract-gate
CodeRifts contract gate
id: coderifts-contract-gate
Status: loaded
Version: 0.2.0

Two things worth knowing. The host fetches the package itself — no npm i first. And the runtime id is coderifts-contract-gate, not the package name, so inspect @coderifts/agent-hooks returns Plugin not found.

Measured on host 2026.6.35, which is the compatibility floor the package declares. The current release is not measured.

Claude Code

This host passes a stalled hook through. Its documentation says so plainly: do not count on a stalled hook to act as a gate. Our adapter therefore returns a hard refusal on every internal failure, rather than trusting the host to stop.

Two routes. The catalogue is the short one.

claude plugin marketplace add coderifts/api-governance
claude plugin install agent-hooks@coderifts
✔ Successfully installed plugin: agent-hooks@coderifts (scope: user)

Confirm with claude plugin list — it should read 0.2.0, enabled.

agent-hooks@coderifts
Version: 0.2.0
Scope: user
Status: enabled

Or wire it yourself, if you would rather pin the path:

npm i @coderifts/agent-hooks

Then one entry in your project's .claude/settings.json — the package ships it at claude-code/settings.snippet.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "timeout": 8,
            "command": "node",
            "args": [
              "${CLAUDE_PROJECT_DIR}/node_modules/@coderifts/agent-hooks/claude-code/hook.mjs"
            ]
          }
        ]
      }
    ]
  }
}

timeout is in seconds — the host's unit, and deliberately low: our own budget is 5000 ms, so a slow answer becomes a readable approval request rather than a host-level pass-through.

Optional environment: CODERIFTS_API_KEY, CODERIFTS_ENDPOINT, CODERIFTS_TIMEOUT_MS. Without a key the gate runs in analyse mode and every gated call ends at a human — there is no setting that makes an unanswered call pass.

What this does not see. A file written by a shell command does not go through a Write matcher. Parsing shell is not a gate — a heredoc, a tee, a python one-liner all get around it — so we do not pretend to.

Measured 2026-09-14. Marketplace install in an isolated CLAUDE_CONFIG_DIR. User ~/.claude was not written.

Docker MCP Gateway

Not built. The interceptor seam is real and we measured it on 2026-09-13: an empty stdout passes the call through, and a non-empty CallToolResult stops it before the container starts.

One finding is worth publishing even though we ship nothing here: on the HTTP interceptor path, a 403 with an empty body passes the call. The status code is not read; only a non-empty body refuses. Any integration on that path is structurally fail-open, and ours would have to live on the exec path.

Not built. Measured 2026-09-13.

Read the measurement →

Repository and CI

GitHub App

The required check binds to the exact change set and head commit, from a named issuing App.

Install the GitHub App →

What "enforced" means here, and when it does not: the check reports its own enforcement status, and it reads not verified when it cannot confirm the branch protection that would make it blocking. We surface that rather than assume it.

Enforcement status →

CLI

npx coderifts --help

The gates: deploy-gate (a deploy on a signed preflight receipt, fail-closed by default), publish-gate (npm publish against the working tree), registry-gate (a directory of specs, locally validated).

CLI reference →

Measured 2026-09-14. npx --yes coderifts --help exit 0; those three subcommands are in the help listing.

Application surfaces

MCP server

Three tools over streamable HTTP. No key needed to connect, initialize or list tools; a key is needed for metered governance.

curl -sS -X POST https://app.coderifts.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

MCP details → · Registry entry →

Measured 2026-09-14. JSON-RPC result with three tools; digest sha256:4c3d2bcc…5b38.

What to expect after installing

Without a key      Analysis runs. Every gated call ends at a human.
                   No decision, no receipt — authorization_effect: NONE.

With a key         The gate issues a grant bound to that exact change,
                   consumed once, with a receipt anyone can verify offline.

What the gate reads, and what it does not

A change set is judged on what it adds. A sentence already sitting in a tool you did not touch does not decide your change: adding a tool to a set that contains a browser tool whose description says it can go forward/back in browser history is allowed, and so is editing that browser tool. Measured 2026-09-14, on the day that narrowing landed — before it, that standing sentence refused the whole set, and the quoted wording is how it read on that date.

A tool that arrives new is different. It has no previous text, so every sentence of it is new and all of it is read. If the description of a tool you are adding carries an instruction, the change goes to a human — and that is the case the gate is for. So if your first run stops there, read the tool you just added before you look at the ones that were already installed.

A set-level report asks the other question — is this whole set safe — and still reads every tool in full. The two are not the same question, and the gate does not merge them.

The free half is not a trial. Analysis and verification stay free because a format spreads when anyone can check it. What is paid is the authority.

How verification works → · Pricing →