Skip to main content
Pre-release

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/DELETE without WHERE, terraform destroy, and secrets written to files. With an engine configured, a model judges the rest: is it irreversible? off-task? against a rule in AGENTS.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,laya compares engines on your labelled cases: accuracy, calibration (ECE), latency and cost.
  • Dashboard. judgetap dashboard is 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
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). judgetap 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 install uses one you already have ($JUDGETAP_ENGINE, a TYPESAFE_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]", then judgetap 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 with judgetap guard stats or judgetap 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 -u credentials leaking past redaction.

Status

Early development. Design in docs/SPEC.md; roadmap in the issues.

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.1.1.dev37001

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for judgetap 0.1.1.dev37001
File Size Uploaded Provenance Actions
judgetap-0.1.1.dev37001.tar.gz 268.8 kB With provenance Details for judgetap-0.1.1.dev37001.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for judgetap 0.1.1.dev37001
File Interpreter ABI Platform Actions
judgetap-0.1.1.dev37001-py3-none-any.whl Python 3 none any Details for judgetap-0.1.1.dev37001-py3-none-any.whl

Total release size: 347.1 kB

Release files / judgetap-0.1.1.dev37001.tar.gz

Download URL judgetap-0.1.1.dev37001.tar.gz
Size 268.8 kB
Tags Source
SHA-256 checksum
How to use checksums
17145834759c5aa58d18929cb746dfe659d0d8cb66da8757540f170b03703fbb
BLAKE2b-256 checksum
How to use checksums
deac2eaafdc5637d5d7b9a611149f96391fd778c4495ab4f93cf291d62b992b8
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 27, 2026.

Transparency log

Release files / judgetap-0.1.1.dev37001-py3-none-any.whl

Download URL judgetap-0.1.1.dev37001-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35f27e9dcf2f8d708b113ae115f288b159e6170f4724ca9da2e201938923eb38
BLAKE2b-256 checksum
How to use checksums
e6d3dc302de611927fd4f40d9355bb6e4282309178ab6a7a988de7caf5f5780b
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 27, 2026.

Transparency log

Security for judgetap 0.1.1.dev37001

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.

Select from 2 files

Attestation for judgetap-0.1.1.dev37001.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 27, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page