jev-rules

Reviewed at commit 6191523

Sends data to TypeSafe Jev (api.typesafe.ai), Vercel AI Gateway (ai-gateway.vercel.sh)

Jev picks which of your rules apply to each prompt, so Claude only sees the ones that matter.

Made by
Elia Alberti
What we checked

Sends each prompt (up to 24,000 characters), the path of each file Claude is about to change, and your rule descriptions to TypeSafe's Jev model (or Vercel's gateway) with your own key, then gives Claude only the rules from .claude/jev-rules that apply. An optional /rules pane shows the picks. If you agree when asked, it adds one early-access flag to ~/.claude/settings.json.

Review details

Static review of the source at the pinned commit; not run. Shell command hooks (node hooks/jev-rules.mjs) on UserPromptSubmit, PreToolUse (Edit|Write|MultiEdit|NotebookEdit), PostToolUse (AskUserQuestion) and SessionStart (clear|compact); they only return additionalContext and a systemMessage, never a permission decision, and fail open (all rules injected) on any error, missing key or timeout (default 2 s, max 8 s). Rules and map documents are read from .claude/jev-rules, .claude/jev-map and .claude/.codebase-info in the project; one POST per prompt or newly seen file goes to api.typesafe.ai/v1/systemone or ai-gateway.vercel.sh/v4/ai/evaluation-model with the prompt or project-relative path (base name only outside the project) and the rule description/applies/does_not_apply lines keyed by index; rule bodies, names and file contents stay local, as the README's Privacy section states. The API key is read from the environment, the project .env or ~/.jev-rules.env (only JEV_*, TYPESAFE_API_KEY, AI_GATEWAY_API_KEY and related settings are used). Per-session state goes to <tmpdir>/jev-rules/<session>.json (files there older than a week are swept); with JEV_DEBUG set, decisions and the first 80 characters of each prompt are appended to ~/.jev-rules.log. On the first pick of an attended session it injects an instruction for Claude to ask an AskUserQuestion (also via /jev-rules:pane); the PostToolUse hook applies a 'Yes' by atomically adding CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 to the env block of ~/.claude/settings.json (or CLAUDE_CONFIG_DIR), which the option text discloses, including that other plugins' panes load too; 'Don't ask again' is stored in CLAUDE_PLUGIN_DATA. The function-hook module pane.tsx registers the /rules command and handlers for session.start, command.run, ui.close and ui.render (AbovePrompt viewport only read, Pane drawn); it uses $.command.register, $.fs.exists/list/read, $.env.get, $.session.id, $.clock.every/now, $.ui.open/close/panes/invalidate/log, polls the session file every 700 ms and makes no network calls. No eval, child processes or package installs.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: no
  • Reads or writes files: yes
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: yes
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for jev-rules

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/jev-rules.svg)](https://modsforclaude.com/mods/jev-rules/)

← All mods