A jevhook

Say what done means before starting

When you ask for work without saying what finished looks like, the assistant tells you what it takes done to mean before it starts. “Clean up the parser” gets a first line like “done means: no change in behaviour, the tests still pass, the dead branches gone”, and you can stop a wrong reading before an hour goes into it. The assistant asks you only if it truly cannot tell.

It is on from the start. It acts at UserPromptSubmit.

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 which of three kinds your prompt is: work whose end is stated, work whose end is left open (“clean up the parser”), or not a request for work at all.
  • When Jev is 80% or more sure the end is left open, the assistant is told to say in one line what it takes done to mean before it starts, and to ask you only if it truly cannot tell.

Its switch

  • At UserPromptSubmit it is UserPromptSubmit/what-done-isstarts on
    Say something

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

[jevhooks.UserPromptSubmit]
what-done-is = "shadow"

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, that the line would have been attached.

2 worked cases, each an answer Jev could give, the rules that decide on it, and the screen you would see. The ones you would meet most come first.

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, ask-first, heed.

“run the tests and commit” nothing attached

The project has two rule files (in its .claude/rules), and Jev puts 45% on each as the one this prompt is about. That is 90% “about some rule”, and it is also Jev not knowing which. One file has to reach 60% alone, so neither is attached. The prompt says what done is, so nothing is said about that either.

Jev, in one requestnote-firstonrecord-correctiononwhat-done-isonask-firstoffattach-ruleonheedoffhas rule filesyesasks for a note2%a correction2%done is not said5%long, on its owna rule is named45%forbidsallowsthis time only= 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 itforbidden 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.

❯ run the tests and commit

✻ Working…

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ⏸ manual mode on · esc to interrupt
“clean up the parser module”, in a project with no rule files what-done-is

This prompt asks for work and leaves its end open, so the assistant is told to say what it takes done to mean. The project has no rule files, so Jev is not asked which one the prompt is about: three questions, not four.

Jev, in one requestnote-firstonrecord-correctiononwhat-done-isonask-firstoffattach-ruleonheedoffhas rule filesnoasks for a note3%a correction3%done is not said100%long, on its owna rule is namedforbidsallowsthis time only= 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 is1unsaid, at hand → say what done isunsaid, long, alone → ask firstforbidden from now on → keep itforbidden 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

❯ clean up the parser module

✻ Working…
prompt: Jev: does not say what done is (100%) · 150 ms · $0.0002 this session                                        [-]

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

The assistant reads beside the prompt:

jevhooks: 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.

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