1@README.md
2
3## Notes for agents
4
5**A new event goes in three places: the enum, `ALL`, and `role`.** The compiler forces
6`role`, because it has no catch-all; keep it that way. Nothing forces `ALL`: its
7length is written out (`[HookEvent; 33]`) and `every_event_is_listed_once` checks it
8against 33, so extend the array, its length and the test's count together.
9
10**Variant names are the wire format.** `HookEvent` serialises by variant name, which
11must equal Claude Code's hook name; the mod sends `next.event` minus `classic.`, and
12the daemon matches on it. Never rename one to suit Rust style.
13
14**Giving an event `Decide` or `Observe` is not enough on its own.** The daemon's
15`decide` and `observe` in `crates/jevhooks-daemon/src/serve.rs` refuse an event they
16have no arm for, and the mod's `classic.*` hook only forwards `prompt`, `source` and
17`tool_use_id`. Wire both ends, or the new role does nothing.