A jevhook

Remember what you said not to do

Say “never touch the migrations” early in a session, and an hour later the assistant may edit one anyway. This jevhook keeps such an order in your own words: for the session, or for the turn if you said “not this time”. You see nothing at the prompt. A second jevhook, linked below, checks later tool calls against those words and does the refusing. The kept copy is on your machine, and any secret in it is masked before Jev is shown it.

It starts in shadow: it writes down what it would have done and changes nothing, until you switch it on. It acts at UserPromptSubmit. What it keeps is used by another jevhook: Refuse what you said not to do.

Jev is the small, fast model jevhooks asks. It writes nothing: it is handed a question whose answers are already written down, and says how likely each one is, in about a quarter of a second. jevhooks is a plugin for Claude Code that asks it at the moments Claude Code lets a plugin step in, and a jevhook is one such question with what is done about the answer.

Exactly what it does

  • Jev is asked whether your prompt says what the assistant may not do (“never touch the migrations”) or lifts something you said before, and whether you mean this once or from now on.
  • At 80% or more, jevhooks keeps your words with any secret masked, for the session or for the turn, eight at most.
  • The jevhook that refuses what you said not to do then checks each later tool call against them.
  • It starts in shadow, which here means your words are kept and later calls are checked against them for the log, but no call is refused.

Its switch

  • At UserPromptSubmit it is UserPromptSubmit/heedstarts in shadow
    Say something

A jevhook is off, in shadow or on. To change this one, put this in ~/.config/jevhooks/config.toml:

[jevhooks.UserPromptSubmit]
heed = "on"

In shadow Jev is asked and nothing is changed. The log (jevhooks recent, or /jev in a session) then says what would have been done: for this one, which of your words would have been kept.

One worked case: an answer Jev could give, the rules that decide on it, and the screen you would see.

A prompt, and what the assistant is told beside it

The rules these cases run through

10 rules decide what the assistant is told beside your prompt, from 15 things known. 8 are Jev's answers, from one request: a request for a note and a correction count at 80% and 80%, work with no word on what done means at 80%, long work handed over at 80%, and a rule file when it alone is 60% likely. The other 7 are known before Jev is asked: whether you have left each one switched on, and whether the project has rule files at all. No rule here decides alone. Each one that holds adds a line, and several can hold for one prompt, with two exceptions: saying what done means and asking first are one line or the other, and of the three rules about done not being said only one can hold. The assistant reads those lines beside your prompt. You do not see them; this is every word of them:

  • note-first The user is asking for something to be written down. Write the note first, where this project keeps its notes, before any other work in this request.
  • record-correction The user is correcting you. Before carrying on, record what was wrong and what is right where it will be read next time (this project's memory or its rules), so the correction is not needed twice.
  • what-done-is This request does not say what done looks like. Before starting, state in one line what you take done to mean. Ask only if you truly cannot tell.
  • ask-first This request hands you a long piece of work to do on your own, and does not say what done looks like. Before starting, ask the user what you need to know to tell finished from unfinished, and wait for the answer.
  • heed The user has said what you may not do, or what you now may. It is kept for this session, and tool calls are checked against it.
  • attach-rule This request looks to be about one of this project's standing rules, which is attached below. Read it before starting and follow it. (Then the file.)

The same rules serve attach-rule, note-first, record-correction, what-done-is, ask-first.

You send “never touch the migrations folder”, with every jevhook switched on heed

Jev is 96% sure this says what the assistant may not do, and that you mean it from now on. So your words are kept for the session, and each later tool call is checked against them. As installed, this jevhook is in shadow: the words are still kept, and nothing is refused for them.

Jev, in one requestnote-firstonrecord-correctiononwhat-done-isonask-firstonattach-ruleonheedonhas rule filesyesasks for a note0%a correction0%done is not said0%long, on its own0%a rule is named0%forbids96%allows0%this time only0%= yes= yes= yes= yes= yes= no= yes= yes= no= yes= yes= yes= no= yes= yes= yes= yes= yes&&&&&&&&&&&&&&&&&a note is asked for → note firstthe assistant is corrected → recorddone is not said → say what done isunsaid, at hand → say what done isunsaid, long, alone → ask firstforbidden from now on → keep it1forbidden this time → keep itallowed from now on → keep itallowed this time → keep ita standing rule is named → attach

Open this drawing at its own size

How to read a drawing

Jev answers with numbers. What happens next is decided by a few rules, in order: of the rules that hold, the first decides. They are compiled into one small network, and these pictures are drawn from that network, not beside it, so they cannot show a rule the plugin does not have.

Read one left to right: what can be known, the tests on it, where a rule's tests meet, and the rules. Black is what a rule that holds stands on, and dashed is a test that failed. A pink rule holds; more than one can, and the numbered ones are those that decided, in order. The framed facts are Jev's, and are asked for together, in one request.

❯ never touch the migrations folder

✻ Working…
prompt: Jev: forbids something (96%) · 150 ms · $0.0002 this session                                                 [-]

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏸ manual mode on · esc to interrupt

The assistant reads beside the prompt:

jevhooks: The user has said what you may not do, or what you now may. It is kept for this session, and tool calls are checked against it.

What this site keeps about a visit, and how to refuse it, is said in one place: what is kept.