Skip to main content

contradish

The quality of an intelligence is not measured solely by what it can accomplish, but also by what it knows it must not change, claim, control, or exploit.

contradish certifies that an AI agent's changes, to what it does and what it remembers, are exactly what its governing information warrants, on every future the policy permits.

What only contradish does

  1. Future-certified change. A memory or behavior change is checked against every future the policy permits: each day of the horizon, scheduled policy changes, any revocation someone with standing could still make, and cascades through sub-delegations. A memory can be right today and unsafe later; contradish says which, and shows the first failing future.
  2. Proofs, not judges. Correct answers are derived from a machine-readable policy. An independent, standard-library checker re-derives every verdict, so no model grades another model.
  3. Update fidelity, both ways. For any change in governing information, contradish works out what must change, what must be preserved, and what must be resisted because its source has no standing. This covers actions, memory, and groups of agents.

What it is not: an LLM-as-judge consistency scorer, a benchmark of failure rates alone, or a general runtime firewall. How it relates to AuthMem-Bench, EAL-Bench, FORGE, PolicyBank and STALE: docs/POSITIONING.md.

Install

pip install git+https://github.com/michelejoseph/contradish

PyPI currently has an older release; install from source to get everything on this page. Python 3.9+. Optional extras: contradish[schema] for JSON-schema validation; the Anthropic or OpenAI SDK for hosted models; Ollama for free local runs.

Try it in two minutes (offline, no API key)

contradish about                      # what it is, what it is not, where to start
contradish certify demo               # memories that are right today and unsafe later
contradish profile demo --html p.html # one verdict across five people-safety dimensions
contradish protect demo               # the protections people depend on, under pressure
contradish mcp                        # serve the instruments to any MCP client

Every demo uses scripted agents, not models. Nothing they show is evidence about any model.

Certify a memory

contradish certify check LEDGER.json MEMORY.json      # exit 0 certified, 1 not; prints the first failing future
contradish certify minimal LEDGER.json --out M.json   # the smallest certified memory, with its certificate

On 6 generated delegation ledgers, five scripted memory writers are all right today. Only two are safe on every permitted future:

writer right today certified authority items kept
current state ("may act until …") 100% 0% 1.0
source-labeled (each grant's issuer) 100% 0% 1.5
one chain (the rest dropped) 100% 50% 2.0
event log (every grant and revoke) 100% 100% 4.5
contradish (compiled minimal memory) 100% 100% 2.5

Labeling each grant with its issuer is not enough: the memory fails the day the grant it hangs from is revoked. Details: docs/CERTIFY.md.

Profile a model

contradish profile estimate
contradish profile run --models anthropic:claude-sonnet-4-5 --html report.html   # exits 1 on HOLD

One verdict (PASS, REVIEW or HOLD), the weakest dimension, and plain findings. Overall is the weakest dimension, not the average. On scripted characters, no single instrument tells them apart:

character verdict protection correctability separation stereo swarm
faithful PASS 1.00 1.00 1.00 1.00 1.00
people pleaser HOLD 0.00 0.00 0.20 0.75 0.33
rigid REVIEW 1.00 0.00 0.20 0.00 1.00
entrenched HOLD 1.00 0.50 0.85 0.69 0.33

Details: docs/PROFILE.md.

Instruments

instrument question doc
certify Is this memory safe on every permitted future? CERTIFY
profile One model, one people-safety verdict PROFILE
protect Does it keep the protections people depend on, under pressure? A fail-closed gate. PROTECTION
correctability Does its certainty decide whether it accepts a legitimate correction? CORRECTABILITY
separation Is a contradiction a scope boundary or a real replacement? SEPARATION
stereo Is the difference between two answers the difference the policy warrants? STEREO
swarm In a group of copies of itself, does it herd, polarize or repair? SWARM
collective How do group failures change with scale and composition? COLLECTIVE
memory, transform Does consolidated memory keep its authority? Is a rewrite safe? MEMORY, TRANSFORM, SPEC
sufficiency, fulfillment Is a compressed memory sufficient for the future? Is a promise kept? SUFFICIENCY, FULFILLMENT
integrity, study Does a model change exactly what authority warrants? INTEGRITY
integrate, mcp Use contradish in CI, agents and MCP clients INTEGRATE, MCP

The specification is docs/BUF-SPEC.md. Every command, result and older instrument (including the CAI-Bench judge-based tools) is in the full guide: docs/GUIDE.md. contradish --help lists all commands by role.

Status

  • Formal layer: re-checkable with no model and no key (sh scripts/verify_core.sh): 13 theorems model-checked, 1,740 conformance vectors, 19 planted scorer bugs caught, certificates re-derived by a standard-library checker. The checker shares an author with the code; see docs/VALIDATION.md.
  • Real models: local runs on four Ollama models (qwen2.5 3b/7b, llama 3.2 3b, llama 3.1 8b) found that none tracks authority well and verification of relayed changes is rare. Judge-based frontier results from April to August are in the guide. No frontier model has been run on the instruments above yet.
  • New instruments (certify, profile, protect, correctability, separation, stereo, swarm, collective) have been run on scripted agents only.
  • Known validity gaps: CAI-Bench reworded equivalence is expert-audited in 4 of 20 domains; the defect-injection study met 1 of 9 pre-registered predictions; automatic warrant derivation agreed with a lawyer on 6 of 12 cases.

Cite

Behavioral Update Fidelity, the policy evaluation contract, CAI Strain and CAI-Bench were introduced by Michele Joseph.

@misc{joseph2026buf,
  title         = {Behavioral Update Fidelity: Measuring Whether an AI Changes Its Behavior Exactly When, and Only as Far as, Changes in Governing Information Warrant},
  author        = {Joseph, Michele},
  year          = {2026},
  howpublished  = {\url{https://github.com/michelejoseph/contradish}},
  note          = {contradish: policy evaluation contract and Counterfactual Benchmark Suite}
}

@misc{joseph2026caibench,
  title         = {CAI-Bench: A Frozen Benchmark for Adversarial Consistency in Language Models},
  author        = {Joseph, Michele},
  year          = {2026},
  howpublished  = {\url{https://github.com/michelejoseph/contradish}},
  note          = {Introduces Strain, SW-Strain, MT-Strain, CL-Strain, CAT-Strain, and SPA-Strain metrics}
}

Citation metadata: CITATION.cff. Specification: docs/BUF-SPEC.md. Full technical report: PAPER.md.


License

MIT. See LICENSE.

Behavioral Update Fidelity was introduced by Michele Joseph in 2026.

Metadata

Release files for contradish 1.65.0

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

Source distribution (sdist)

Source distribution for contradish 1.65.0
File Size Uploaded Provenance Actions
contradish-1.65.0.tar.gz 2.0 MB Without provenance Details for contradish-1.65.0.tar.gz

Built distribution (wheel)

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

Total release size: 3.6 MB

Release files / contradish-1.65.0.tar.gz

Download URL contradish-1.65.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
3fab240b074d12e3dc985e51ac02be551f20a3c2e6e313c03b3457baa6288b6c
BLAKE2b-256 checksum
How to use checksums
a193713b4ed3f06a52c89e10d1e0ffa2bed191cf620dd2236fddb49dd5d43852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / contradish-1.65.0-py3-none-any.whl

Download URL contradish-1.65.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
14e95f4a3ce8426d6506b2a888f15f51ca0a08341b52edad22087d07e81156df
BLAKE2b-256 checksum
How to use checksums
f70535e2bd9db90c27358211886c40056969b9b45f68d382b857a159badd91cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for contradish 1.65.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

1.65.0 This release

2 release files No provenance

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