Repository navigation
Releases: EliaAlberti/jev-rules
Release list
v0.5.0: see what Claude got
Added
- One line under each prompt naming the rules and map documents Claude was given, with Jev's score for each:
jev-rules: Jev gave Claude: deploy-checklist 0.94, map deploy-pipeline 0.83. A file change that brings a rule gets its own line, naming the file. When Jev cannot answer, the line says so. It needs no early-access setting. Show Jev's picks in/config, orJEV_RULES_SHOW_PICKS=0, turns it off. - The pane switches on with one answer. The first time Jev picks a rule in a session, Claude asks in Claude Code's own question box whether to turn the rules pane on. Yes adds
"CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1"to theenvblock of~/.claude/settings.jsonand keeps the rest of the file; the pane appears after a restart. Not now asks again in a later session; Don't ask again is remembered. The question comes only in attended sessions, never in scripted runs, and never once the setting is on. /jev-rules:paneasks the same question at any time.- 18 new offline tests (131 in total).
Changed
- The plugin's own commands, such as
/jev-rules:pane, are not sent to Jev as prompts.
Upgrade
claude plugin marketplace update jev-rules
claude plugin update jev-rules@jev-rulesRestart Claude Code afterwards. The pane question comes with the first rule Jev picks. If you already start Claude Code with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1, nothing is asked and the pane works as before.
v0.4.0: the rules pane
Type /rules and a pane beside the conversation lists every rule and map document of the project. The ones Jev picked turn green and flash as they arrive, with Jev's score beside each one.
Added
- The rules pane.
/rulesopens a pane beside the conversation with every rule and map document as a tree. A rule turns green once Claude has been given it this session and flashes as it arrives, from a prompt or a file change, with Jev's latest score beside it. Rule files added, renamed or removed show up within a couple of seconds. - The pane opens by itself the first time Jev picks a rule in a session, when Claude Code docks panes beside the conversation and the window is at least 144 columns wide. Closing it keeps it closed for the session. The Rules pane opens setting in
/configswitches this toonly-with-command. - 12 new offline tests (113 in total).
Changed
- The session state file also keeps Jev's latest score for each rule and map document, for the pane to show. It is cleared with the rest after
/clearor a compaction.
Early access
The pane uses Claude Code's plugin panes, an early-access feature that is only loaded with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1. Without it the pane and /rules are absent and the plugin works exactly as in 0.3.0. Built and tested on Claude Code 2.1.280.
Upgrade
claude plugin marketplace update jev-rules
claude plugin update jev-rules@jev-rulesRestart Claude Code afterwards, with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 set if you want the pane.
v0.3.0: once-per-session delivery
Each rule and map document is now delivered once per session.
What it means for your context
Measured on the demo project (12 rules, 3 map documents, real Jev calls):
| Session | Loading everything up front | With jev-rules |
|---|---|---|
| 8 prompts, all about checkout | about 1,390 tokens | about 330 tokens |
| 12 prompts touching nearly every topic | about 1,390 tokens | about 1,400 tokens |
A focused session uses a quarter of the tokens, a session that touches everything breaks even, and the cost does not grow with the length of the session. The more rules a project has, the larger the gap. Jev is also asked about fewer rules as the session goes on, and not at all once everything relevant has been delivered.
Details
- What Claude has been given is not judged or delivered again, by a prompt or by an edit.
always: truerules are delivered once per session too. - Editing a rule's text makes it deliverable again. After
/clearor a compaction everything is deliverable again (a new SessionStart hook that runs only for those two events). - A fail-open costs at most one full delivery per session.
JEV_RULES_REPEAT=1delivers on every matching prompt, for anyone who prefers the repetition.- 101 offline tests.
Upgrade
claude plugin marketplace update jev-rules
claude plugin update jev-rules@jev-rulesRestart Claude Code afterwards so the new SessionStart hook is registered.
v0.2.0: rules that follow the file, and a filtered codebase map
Everything that 0.1.0 listed under "Later" is now built.
Added
- File-triggered rules. Before Claude changes a file with Edit, Write, MultiEdit or NotebookEdit, Jev judges the file's path against the rules not yet given this turn. Only the project-relative path leaves the machine. Answers are cached per file for the session, a rule is never repeated within a turn, and
JEV_RULES_EDITS=0turns the check off. - Codebase map filtering. Documents in
.claude/jev-map/, and Eigenwise codebase-mapper's.claude/.codebase-info/when present, are judged in the same single call as the rules. Rules take the output budget first; a picked document that does not fit becomes a pointer to its file.JEV_RULES_MAP=0turns it off. - Rule subfolders.
.claude/jev-rules/frontend/react.mdbecomes the rulefrontend/react. - Per-rule criteria. Optional
appliesanddoes_not_applylines sharpen a description that keeps catching the wrong prompts. - One retry on rate limits (429 or 529), inside the same overall timeout.
Changed
- When nothing applies, nothing is injected (0.1.0 injected an empty heading).
JEV_RULES_TIMEOUT_MSnow covers the whole call, retry included.- Debug log lines gained
event=,attempts=,file=,cached=andmap:entries. - 88 offline tests, up from 30.
Verified
Real Claude Code sessions on v2.1.276: a checkout prompt got the payments rule (p=0.98) and the checkout map document (p=0.83) and nothing else. A deliberately vague prompt got nothing, then the edit to src/checkout/discount.ts brought the payments rule in (p=0.97) with the edit's result.
Upgrade
claude plugin marketplace update jev-rules
claude plugin update jev-rules@jev-rulesRestart Claude Code afterwards so the new PreToolUse hook is registered. No rule files need changing.
Full details in CHANGELOG.md.
v0.1.0
Initial release.
- A UserPromptSubmit hook reads
.claude/jev-rules/*.md, asks Jev one yes/no question per rule in a single call, and injects the rules at or aboveJEV_RULES_THRESHOLD(default 0.6) plus any markedalways: true. - Fails open on a missing key, timeout, network error, HTTP error or unreadable reply: every rule is injected and the prompt is never blocked.
- Two routes to the same model: TypeSafe's API and Vercel AI Gateway. Node 20.12+, no dependencies.
JEV_DEBUG=1decision log, three example rules, offline tests and a live script.