This release is a pre-release and may not be stable for production use.
judgetap
A pre-action guard for coding agents, built on one API for fast, typed AI decisions.
$ judgetap guard test "git push --force origin main"
allow git status (should allow)
deny git push --force origin main (should hold)
deny git push --force origin main (yours)
Quickstart
pip install judgetap # latest release
# pip install --pre judgetap # newest build from main (X.Y.Z.devN)
judgetap guard install --for claude-code # or cursor, codex, all
judgetap guard test "git push --force origin main"
What it does
- Guard. A hook that checks every shell command (and, in Claude Code, every file write and edit) before it runs. Rules catch common destructive forms: recursive deletes outside the workspace, force-pushes and pushes to protected branches,
DROP/DELETEwithoutWHERE,terraform destroy, and secrets written to files. With an engine configured, a model judges the rest: is it irreversible? off-task? against a rule inAGENTS.md? Without an engine, the rules fail closed for shell commands (anything they can't vouch for asks you); file writes and edits are checked for secrets, your own rules, and writes to the guard's own configuration (which ask). - Library. One API (
choice,score,yesno,batch) over every Jev-style decision engine, with a cascade that escalates low-confidence answers to a stronger engine. - Eval.
judgetap eval cases.jsonl --engines jev,layacompares engines on your labelled cases: accuracy, calibration (ECE), latency and cost.judgetap eval --suite banking77 --limit 200 --engines jevruns a public suite instead (ag_news,banking77): it is downloaded from Hugging Face on first use, converted to judgetap's case format and cached in~/.judgetap/suites; nothing is bundled.--limit Ntakes the same fixed-seed sample every run. Each suite's licence and source URL are listed insrc/judgetap/suites.py. - Dashboard.
judgetap dashboardis a local page with recent decisions, holds, asks, latency and cost per engine. You can mark a hold as a false alarm.
Library
import judgetap as sj
sj.configure(sj.engines.load("jev")) # needs TYPESAFE_API_KEY
verdict = sj.yesno(
"Is this shell command hard to undo?",
context={"command": "git push --force origin main", "task": "fix typo in README"},
)
verdict.value, verdict.p, verdict.engine # ("yes", 0.97, "jev")
# Ask the cheap engine first, escalate low-confidence answers
jev = sj.engines.load("jev")
flash = sj.engines.load("llm:gemini/gemini-2.0-flash-lite")
sj.configure(sj.Cascade([jev, flash]))
Engines
| Spec | Engine | Key |
|---|---|---|
jev |
TypeSafe Jev (hosted) | TYPESAFE_API_KEY |
jev@<url> / typesafe:<url> |
Any TypeSafe-compatible server | none on localhost; remote needs the key and https |
laya |
Laya, open weights, runs in process (pip install "judgetap[laya]") |
none |
julia / julia:<path> |
Julia-1, 144M open weights, runs in process on CPU (download into ~/.judgetap/models/Julia-1 and pip install -e it; relative paths never come from the working directory). Loads per process, so for the guard prefer a server engine |
none |
gliner[:<hf model>] |
Fastino GLiNER2.5-Decide, 340M encoder, CPU or GPU (pip install "judgetap[gliner]"); only a full probability map over every option counts as calibrated; a winner-only score (the others share the rest evenly) or a bare label is uncalibrated. Loads in-process, so the guard refuses it: use a server engine there |
none |
agentjev / agentjev:<url> |
A local AgentJev server | none |
llm:<model> |
Any LiteLLM model (pip install "judgetap[llm]"); probabilities self-reported |
the provider's |
On a CPU-only Linux box, install the CPU PyTorch wheel before judgetap[laya] (pip install torch --index-url https://download.pytorch.org/whl/cpu). snapjudge by Micha0827 is a TypeSafe-compatible local server for Apple Silicon (MLX), an independent project that works as a jev@http://127.0.0.1:<port> engine.
Guard details
Loop detection (Claude Code). PostToolUse and PostToolUseFailure hooks (judgetap guard post, added by guard install --for claude-code) notices when the same command or edit fails the same way three times within eight actions and adds a note asking the agent to re-plan. It never blocks, uses no model, and stores only a redacted action and an error hash per session. Cursor and Codex: not yet.
- Agents: Claude Code (shell, writes and edits), Cursor and Codex (shell only; their hooks don't expose writes and edits).
- Engine:
judgetap guard installuses one you already have ($JUDGETAP_ENGINE, aTYPESAFE_API_KEY, or a local AgentJev) and saves it in~/.judgetap/guard.toml, because agents often run hooks without your shell's environment. - Keys: read from the environment, then the OS keychain (
pip install "judgetap[keychain]", thenjudgetap keys set TYPESAFE_API_KEY). Keys are never written to config or logs. - Log: every decision goes to
~/.judgetap/guard.jsonl(owner-only, with credentials redacted). See it withjudgetap guard statsorjudgetap dashboard. - Limits: the rules are a best-effort denylist, not a sandbox. Shell is a full language; see SPEC §5.
Reviewed by MergeSafe
Every PR here is reviewed by MergeSafe before merge. A few of the catches:
- #17: P0, commands with secrets in them were written to the guard log in plain text; also
sudo rm -rf /and$(rm -rf /)slipping past the rules. - #16: the cascade under-reported cost by dropping the engines it consulted before the winner.
- #37: quoted, attached and tab-separated
curl -ucredentials leaking past redaction.
Status
Early development. Design in docs/SPEC.md; roadmap in the issues.
Open judge models
Open models now match Jev on most decision tasks. LangWatch's comparison reports, over the tasks each model could run: Jev 81.9%, Eikos-27B 80.0%, Shisa DE-1 79.7%, AutoJev-27B 78.9% (langwatch.ai/compare/jev-vs-all; their numbers, not ours). Run one behind any OpenAI-compatible server and use it through the llm engine in logprobs mode, which reads each option's probability from the model's token logprobs instead of asking for JSON:
# vLLM (GPU; a 27B model needs roughly an H100):
vllm serve <hf-repo-of-the-model> --served-model-name judge
# or Ollama:
ollama serve # after `ollama pull <model>`
import os
import judgetap as jt
os.environ["OPENAI_API_BASE"] = (
"http://127.0.0.1:8000/v1" # vLLM; Ollama: http://127.0.0.1:11434/v1
)
os.environ["OPENAI_API_KEY"] = "local" # any value for a local server
jt.configure(jt.engines.load("llm:openai/judge?logprobs"))
Logprobs mode makes one short call per question (one generated token), run concurrently (up to 8 at a time), and each call is counted in the metrics. The probabilities come from the model's token distribution; they are not calibrated (answers stay calibrated=False), so use judgetap eval to check how well they track accuracy on your cases. If the server doesn't support logprobs, the engine falls back to JSON mode on its own.
Contributing
See CONTRIBUTING.md.
License
Apache-2.0
Experimental, opt-in: task-done check. judgetap guard install --with stop adds a Claude Code Stop hook that asks the engine whether the user's task is actually finished. Only a confident "not done" (p(done) <= stop_threshold, default 0.15, set in ~/.judgetap/guard.toml) blocks the stop, at most twice per session, and never while a previous block is being handled. It needs an engine and is off by default until an eval set shows it's reliable.
Metadata
Release files for judgetap 0.2.1.dev45001
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| judgetap-0.2.1.dev45001.tar.gz | 272.8 kB | With provenance | Details for judgetap-0.2.1.dev45001.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| judgetap-0.2.1.dev45001-py3-none-any.whl | Python 3 | none | any | Details for judgetap-0.2.1.dev45001-py3-none-any.whl |
Total release size: 362.7 kB
Release files / judgetap-0.2.1.dev45001.tar.gz
| Download URL | judgetap-0.2.1.dev45001.tar.gz |
|---|---|
| Size | 272.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22d00db5560d3e82bb96a42029f25aa7cf5f102c9d8eea52c1c6989a3c38d48e
|
|
BLAKE2b-256 checksum How to use checksums |
6ba343c0ff84c6de6c0875069ad145e3b804e94df892392432a4ac8b106dcff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / judgetap-0.2.1.dev45001-py3-none-any.whl
| Download URL | judgetap-0.2.1.dev45001-py3-none-any.whl |
|---|---|
| Size | 89.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7de6f8393566cb993f0847bac9297ce076342fc6e8707601a13d83e8796ecd70
|
|
BLAKE2b-256 checksum How to use checksums |
a69ab23061960393b5cdeda4a5660167db7d1f2a4033ee222f4f6b8088185bba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logSecurity for judgetap 0.2.1.dev45001
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for judgetap-0.2.1.dev45001.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.