Skip to content

Gatekeeper

Claude Code hook that decides which agent or skill should handle a request using YAML rulebooks plus one Jev Choice with confidence bands.

HookbetaMIT

Overview

Gatekeeper decides which AI agent or skill should handle a request before the AI picks for itself. Commands you type go straight through; plain requests, where the AI would otherwise guess, are checked against your rules and judged by Jev, at a fraction of a cent and about half a second per decision. The engine and rulebooks are tool-neutral; today it installs as a Claude Code hook.

A gate is a YAML rulebook. Code decides what it can (slash commands, keywords, field checks), and Jev answers the one remaining semantic question, which handler owns this request, as a Choice with a probability for every option. Confidence bands turn that into a verdict: allow, route, suggest, confirm (a human yes for deploy, send or delete), escalate or block. Every decision is logged with the rules that fired, Jev's answers, the band, cost and rulebook version so thresholds can be tuned from evidence. The marketing-team example routes requests across 24 skills owned by 11 roles.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich of these handlers owns this request?—

How it works

  1. Intercept the user's request in a Claude Code hook
  2. Apply deterministic rules from the YAML rulebook
  3. Ask Jev which handler owns the request
  4. Map confidence to allow/route/suggest/confirm/escalate/block and log it

Strengths

  • Deterministic rules first, model only for semantics
  • Graduated verdicts including human confirmation
  • Full decision logs for tuning

Caveats

  • Currently installs only as a Claude Code hook
  • Requires a TypeSafe key

Getting started

Install the Python package and Claude Code hook per the README, then gatekeeper judge <rulebook> "<request>" to test.

At a glance

Type
Hook
Status
beta
Language
Python
Runtime
Claude Code hook + CLI
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Decides which agent or skill should take a request before the agent picks for itself; tool-neutral rulebooks, installed today as a Claude Code hook.

    MrJev/awesome-jev

Frequently asked questions

What does Jev decide?

Which handler (agent or skill) owns a request.

What verdicts are possible?

allow, route, suggest, confirm, escalate and block.

How much does a decision cost?

A fraction of a cent; the example shows $0.000056 and 351 ms.

Related projects

  • Agent toolkit for Claude Code and Codex whose optional /d router uses Jev to pick agents, skills and workflows and gate dispatch on intent.

    ProjectbetaPython
  • MIT plugin and local MCP server that hands an agent's closed questions to Jev or local Laya, with policy gates and receipts.

    Agent skillproductionPython
  • Claude Code and Codex skill that routes a task to one of 27 specialist roles, with an optional Jev engine for catalog selection.

    ProjectbetaPython
  • Orchestrator that probes which coding agents are installed and logged in, then has Jev pick the best one for a task.

    Agent skillbetaPython
  • Two stdlib-only Hermes Agent plugins: a Jev pre-tool gate with a jev_ask tool, and a skill router that names one skill per turn.

    Agent skillbetaPython
  • Hooks for Claude Code, Codex and pi that use Jev to suggest a skill each turn, plus a rule gate for subagent model routing.

    HookbetaJavaScript