jev-vault-gate

September 19, 2026 · View on GitHub

Claude Code plugin that watches every main-loop turn and, when it looks like it holds durable knowledge, auto-captures it into ~/vault/raw/ for the /compile skill to pick up later.

What Jev actually does here

Jev only returns numeric answers (a probability, or a pick from a fixed list) — it cannot draft prose. So it does two things, not three:

  1. Gate: a noul question — "does this turn hold durable knowledge worth saving?" — scored 0–1 against threshold (default 0.6).
  2. Route (if the vault's INDEX.md exists): a choice question picking which existing vault page this content most belongs under, or new_topic.

What it does not do: write the vault page itself. The raw capture is the user/assistant text verbatim (bounded to ~4000 chars each), not a summary — drafting the actual page still happens when you run /compile, which uses a full model, not Jev.

Behavior

  • On turn.complete (main loop only, not subagents): if the answer is long enough (minAnswerChars, default 200) and the gate passes, writes ~/vault/raw/<date>-<slug>.md with the turn's user/assistant text and a capture comment (score, topic guess).
  • On the next prompt, if anything was captured since the last prompt, injects a one-line reminder to run /compile.
  • Failures (missing key, Jev error, missing vault) are logged and swallowed — never blocks or alters the actual turn.

Manual invocation

/vault-check runs the same gate + topic-route logic by hand, against a chosen exchange, without waiting for a real turn — useful for testing or for content the automatic hook already passed by. It's a separate plain-JS script (hooks/vault-check-cli.mjs), since a slash command runs outside the plugin engine and can only shell out; keep it in sync with vault-gate.ts if the gate logic changes.

/audit-sessions runs the same gate logic across every archived Claude Code session transcript (~/.claude/projects/*/*.jsonl), not just live turns. Per session, isolated per-request, Jev scores two things: vault_worthy (same as the live gate) and safe_to_delete (nothing unique or still-needed lives only in this transcript). Vault-worthy sessions are auto-captured into vault/raw/ the same way. Nothing is ever deleted automatically — delete candidates are only reported; deleting them is a separate, explicit, user-confirmed step the command walks through.

Install

export TYPESAFE_API_KEY=...
claude plugin marketplace add .
claude plugin install jev-vault-gate

Configure vaultPath if it's not ~/vault, via /plugin configure jev-vault-gate.

Note

Every turn long enough to check gets sent to the external Jev API (user text

  • assistant answer, truncated). Same trust boundary as fast-jev-compaction and jev-harness-audit — don't install this if you don't want turn content leaving the machine for that classification.