Skip to content

clear-head

Claude Code Stop hook that checks an assistant's claims against what it actually read this session using Jev, blocking unsupported ones.

Hookbeta

Overview

clear-head is a Claude Code Stop hook that checks the factual claims in an assistant's answer against the evidence it actually read during the session, using Jev as a fast, calibrated judge. If a claim is contradicted or unsupported by what was read, the turn is blocked with the specific claims listed, and the assistant must verify them or mark them as assumptions before finishing.

The motivation is that LLMs state wrong things about a codebase in the same confident tone as right things. Per claim, it sends only tool-output lines sharing keywords with that claim, plus file paths, commands and doc comments, never whole files, and logs every payload to sent.jsonl. The README still warns that code excerpts leave your machine. The installer verifies the key, and a local Kev server speaking TypeSafe's wire contract can be used instead. The author measured it on their own sessions with a replay script over 1,309 claims.

What the decision model decides

TypeQuestionAnswers
ChoiceIs this claim supported, contradicted or unsupported by what was read?(inferred)supported · contradicted · unsupported

How it works

  1. Assistant finishes a turn
  2. Hook extracts factual claims
  3. Send only matching evidence lines to Jev per claim
  4. Block the turn if claims are contradicted or unsupported
  5. Assistant verifies or marks them as assumptions

Strengths

  • Only relevant lines leave the machine, all logged
  • Short, readable script
  • Local Kev alternative

Caveats

  • Code excerpts are still sent to TypeSafe
  • Measured on the author's own sessions

Getting started

Run the installer, which prompts for and verifies a TypeSafe key.

At a glance

Type
Hook
Status
beta
Language
Python
Runtime
Claude Code Stop hook
Has code
yes

Use cases and integrations

How curated lists describe it

  • Claude Code Stop hook that checks an AI assistant's claims against what it actually read this session, using TypeSafe's Jev as the judge.

    hellogumbo/awesome-jev

Frequently asked questions

What gets sent to TypeSafe?

Only tool-output lines sharing keywords with each claim, plus paths and commands; every payload is logged.

Can I avoid the hosted API?

Yes, a local Kev server with the same wire contract can be used.

What happens on a bad claim?

The turn is blocked until claims are verified or marked as assumptions.

Related projects

  • Claude Code plugin with nine Jev-judged gates for rules, scope, intent, completion and claims that escalate but never approve.

    HookbetaTypeScript
  • Agent observability platform that finds and fixes agent failures, with an optional Jev preclassifier for conversation checks.

    ProjectproductionTypeScript
  • Hermes plugin that asks Jev to review risky plans, check claims against sources, and judge whether a task is really finished.

    Pluginbeta
  • Jev-powered adversarial or advisory reviewer for the omp coding agent, plus a typesafe_ask tool, plan/stop gates and context compaction.

    ProjectbetaTypeScript
  • Calibrated alignment verifier that checks LLM responses and agent plans for sycophancy, deception, overreach and dark patterns with Jev.

    ProjectprototypeTypeScript
  • Open-source Claude Cowork alternative built on OpenCode; per list notes, its eval testkit uses Jev as a verification judge.

    ProjectproductionTypeScript