A Claude Code plugin
Jev judges what Claude Code is about to do.
Claude Code runs shell commands for you and decides for itself when it has finished. jevhooks stops at those moments to ask a second opinion of something that does not write, cannot be talked round, and costs a few thousandths of a cent to ask.
That something is Jev, TypeSafe AI's System One model. It writes no text. It is handed a situation and a question whose answers are already written down, and says how likely each answer is, in about a quarter of a second.
Reading, building and editing run without a prompt. A band above the prompt says what Jev made of the last command, how long it took and what the session's questions have cost.
A command that deletes, rewrites history, changes the machine, sends something elsewhere or runs code nobody has read stops at a prompt, with Jev's reason in it. You decide.
Every session on the machine shares one ledger of the memory already promised to commands. Five agents starting five builds in the same second get two builds now and three in a queue, where they used to get a dead machine.
Switch it on and Jev scores what each prompt takes, on four levels from a lookup to open-ended work. The turn goes to the cheapest of haiku, sonnet, opus and fable that is 75% likely to be enough.
Every picture is a real session, taken by a script in the repository. Nothing is drawn by hand.
Jev being slow, absent, unsure or broken never blocks anything. Then whatever would have happened without the plugin happens.
Claude Code raises 33 kinds of event that a plugin can answer. jevhooks is built at 7 of them. This is all of them, so you can see what is built, what is only an idea, and what nobody has thought about yet.
- judged2 events. Built. Jev is asked, and the answer changes what happens.
- heard5 events. Built. The plugin listens, because it needs this to judge something else.
- idea4 for 1 of the events. Not built. An addition somebody has written down for an event; it is not a promise.
- nothing yet26 events. Not built, and nothing is planned.
Setupnothing yetSessionStartnothing yet
UserPromptSubmitheardThe last five prompts are kept: a turn's end is judged against what you asked for. A new prompt also settles any judged command that never ran.
idea written down for it:
- Attach the standing rule the prompt is about, chosen from the project's own rule files.
- Notice "note this" and remind the assistant to write the note first.
- Notice a correction and record it, so it is not needed twice.
- Notice a request that does not say what done looks like.
UserPromptExpansionnothing yet
PreToolUsejudgedEvery Bash command that is not plainly read-only: what kind of act it is, how hard to undo, how much memory it needs. It runs, is put to you, waits for memory, or is left to your own rules.
PermissionRequestnothing yetPermissionDeniedheardWhat became of a command Jev judged is written to the log, and the memory booked for it is given back.
Elicitationnothing yetElicitationResultnothing yetPostToolUseheardWhat became of a command Jev judged is written to the log, and the memory booked for it is given back.
PostToolUseFailureheardWhat became of a command Jev judged is written to the log, and the memory booked for it is given back.
PostToolBatchnothing yetSubagentStartnothing yetSubagentStopnothing yetTaskCreatednothing yetTaskCompletednothing yet
StopjudgedWhich of five endings this is: finished, waiting on you, blocked, still running, or stopped early. A confident "stopped early" sends the turn back with the reason.
StopFailurenothing yet
TeammateIdlenothing yetPreCompactnothing yetPostCompactnothing yetSessionEndheardThe session is forgotten: its prompts, its cost, and any memory still booked for it.
Notificationnothing yetConfigChangenothing yetPreModelSwitchnothing yetPostModelSwitchnothing yetWorktreeCreatenothing yetWorktreeRemovenothing yetCwdChangednothing yetFileChangednothing yetDirectoryAddednothing yetInstructionsLoadednothing yetMessageDisplaynothing yet
The plugin also steps in at two points of Claude Code's newer plugin interface, to choose a model. Both are built, and off unless you switch them on.
prompt.submitjudgedWith model choice switched on: the prompt is scored for what it takes, on four levels.
turn.stepjudgedWith model choice switched on: each request of the turn goes to the cheapest model that is 75% likely to be enough.
- A small piece of the plugin hears every event Claude Code raises. A command that plainly only reads goes no further: no question, no cost. (the hooks)
- Anything worth judging goes to one daemon for the whole machine, which keeps the connection to Jev warm and the key in one place. (the daemon)
- The daemon asks Jev three things in one request: which of eight kinds of act this is, how hard it would be to put back, and how much of the machine it takes. (the questions)
- Rules written in code, where a test can hold them still, turn the answers into allow, ask, wait or no opinion. Your own hooks still run, and the stricter answer wins.
With Claude Code installed, this runs the plugin's tests against a stand-in for the daemon. It needs no Rust, no Jev key and no account.
The whole repository is written as a guide in chapters: every folder says what it is and why.