Skip to main content

Assaystone

Assaystone

Your agent's tests pass. Did it delete the failing test?

ci pypi release status python license website

Assaystone turns one unit of agent work into a certificate: pass, fail, or a human must look — with the evidence, the check that decided it, the check that could not, and the cost of deciding.

It is not an eval platform, an agent framework, or a judge. It is the acceptance layer: contracts a domain expert can review, checks that declare what they cannot see, and a verdict a third party can re-check without re-running the agent. It runs locally, offline, with no API key.

uvx assaystone demo audit                 # find a failure you did not know you had
assaystone check --base origin/main --certificate ./certs   # no trace required

check compares the working tree to a base ref, runs the contract, and writes a certificate. In CI it is one step; locally it is the last thing you run before review.

60 seconds

No setup, no key, no transcript of your own:

$ uvx assaystone demo audit
audit-demo-session  changed: pricing/discounts.py, tests/test_discounts.py
  HIGH     tests.integrity          tests/test_discounts.py (removed 1 test(s))

summary: 0 critical, 1 high, 0 medium, 0 low

certificate: ./assaystone-demo-certificates/audit-demo-session.certificate.json
verify it:  assaystone certificate verify <that file>

The demo ends with the artifact, not with advice. The agent fixed the rounding bug, then deleted the one test it still failed, and reported success. tests.pass saw a green suite. The audit found the deleted test. The same attacks, with minimal reproductions, are in docs/evasions.md.

The certificate

A verdict without evidence cannot be reviewed. Evidence without provenance cannot be trusted. A decision without versions cannot be reproduced. The certificate binds the three into one hash-addressed object.

assaystone certificate show   ./certs/<id>.certificate.json
assaystone certificate verify ./certs/<id>.certificate.json   # a third party, offline
certificate   sha256:f5ad3661...
subject       git-106f71d9-ecd825e63473 (working-tree, source: runtime)
contract      code
decision      FAIL
first failure tests.integrity: tests/test_discounts.py (removed 1 test(s))
checks        2 (1 pass, 1 fail, 0 escalate)
assurance gap 0.00 (0/0 criteria unknown)
cost          $0.000030 (verification $0.000030)

Same decision and same versions produce the same id. Edit one piece of evidence and the id changes. The certificate records what each check declared it could not see, the independence actually earned (computed from provenance, not claimed), the assurance gap, and what the decision cost. A check that reads agent-written testimony is downgraded; an unconfirmed failure becomes an escalation, not a pass.

Check a repository

A contract is a small JSON file. It names the checks, their parameters, and what to do when a check cannot decide:

{
  "name": "code",
  "test_command": ["{python}", "-m", "pytest", "-q"],
  "verifiers": [
    {"name": "diff.syntax", "required": true, "params": {}},
    {"name": "tests.integrity", "required": true,
     "params": {"protected_prefixes": ["tests/"]}},
    {"name": "tests.harness_integrity", "required": true, "params": {}},
    {"name": "tests.pass", "required": true, "params": {}}
  ]
}
assaystone check --base origin/main                      # discover .assaystone/contract.json
assaystone check --base origin/main --certificate ./certs --sarif out.sarif

Exit codes are the interface: 0 pass, 1 fail, 2 escalate or unable to check. A CI step can gate on them without parsing output.

- uses: yellowsand1/assaystone@v0.33.0
  with:
    contract: .assaystone/contract.json
    base: origin/${{ github.base_ref }}
    certificate: certs

The Action posts annotations and a step summary, and uploads the certificate as an artifact.

What a passing test suite misses

Defect tests.pass Assaystone
Agent deletes the failing test ✅ passes ❌ tests.integrity
Agent edits CI to skip the suite ✅ passes ❌ diff.forbidden_paths
Agent leaves a debug print ✅ passes ❌ quality.no_debug_prints
Agent weakens an assertion ✅ passes ❌ tests.integrity
Agent shadows the test runner ✅ passes ❌ tests.harness_integrity
Regression in another module ❌ fails ❌ tests.pass

The first four are not hypothetical: they are labelled cases in failure_zoo, and every built-in check is scored against them on every release.

Prove the checks

A verifier you have never challenged is a liability. One command measures both questions that a pass rate hides:

$ assaystone prove
[recall] a known defect is caught
Failure Zoo: 13 cases (9 defective, 4 clean)
case-level: caught=9/9 escaped=0 false_alarms=0 recall=100%

[resistance] an agent that knows the contract still has to work
Goodhart suite: 17 cases (13 defective, 4 control)
resistance=85% caught=11 escalated=0 escaped=2 false_alarms=0

Recall asks whether a check catches a defect you injected. Resistance asks whether an agent that has read the contract can pass without doing the work. A contract can score 100% recall and still be trivially gameable; prove reports both, and the families where the leaks are.

Audit your own sessions

The cold start is an audit, not a framework. Point it at the newest local Claude Code or Codex transcript; nothing leaves the machine:

assaystone audit --latest claude-code
assaystone audit --latest codex --write-contract .assaystone/contract.json

It reconstructs what the agent changed, runs a default rule set, and writes the first contract from what it found. Open the findings, keep the rules that matter, delete the rest.

Install

uvx assaystone --version        # no install, throwaway environment
pip install assaystone==0.33.0  # the published release

Python 3.10+.

macOS note: the system python3 is often 3.9. If pip install cannot find a distribution, use uvx above or install Python 3.12.

Integrations

  • GitHub Action: gate a PR and upload the certificate (above).
  • pytest: pytest --assaystone runs the contract after the suite.
  • Claude Code hook: audit before the agent stops, in warn or block mode.
  • Adapters: Claude Agent SDK, OpenAI Agents SDK, LangGraph messages, and LangSmith / Langfuse / OpenTelemetry exports.
  • Custom checks: a check declares claim, catches, blind_spots, trusts, independence, cost_usd, and returns pass | fail | None.

Details: docs/integrations.md, docs/verifiers.md, docs/plugin.md.

How it works

episode  →  contract  →  checks  →  evidence  →  decision  →  certificate
  • Episode: a working tree, a recorded trace, or a runtime action.
  • Contract: obligations a human can review, each bound to defect tags.
  • Checks: deterministic first, ordered by declared cost; a crash fails closed.
  • Decision: pass, fail, or escalate; a low-independence failure cannot decide alone.
  • Certificate: hash-addressed, provenance-bound, re-checkable offline.

Full design and invariants: ARCHITECTURE.md.

Design principles

  1. Evidence over scores. A verdict carries pointers a third party can re-open.
  2. Three values, never two. pass, fail, escalate.
  3. Cascade; judges never decide alone. The default path is offline and key-free.
  4. Independence is provenance. Agent-written testimony does not count as evidence.
  5. Verify the verifier. No check ships without a clean case, a defective case, a declared blind spot, and a measured cost.

The direction, the ten laws, the non-goals, and the kill criteria are in GOALS.md. The current bet is in ROADMAP.md.

Status

v0.33.0 — alpha. The kernel is stable; the surface is deliberately small: audit, check, certificate, prove, hook. Everything else lives under assaystone lab and is frozen — no new features, deletion allowed. Old top-level names still resolve as aliases so existing CI does not break.

Known limitations, stated rather than hidden:

  • The default checks are for code in a git repository. Other domains are lab code.
  • tests.integrity is path- and structure-based; it reports activity, not intent.
  • The failure corpus is a floor, not a population estimate. prove reports sample size.
  • Escalation is a first-class outcome, not a bug. If a check cannot decide, it says so.

Contributing

Read GOALS.md and ARCHITECTURE.md first. A change answers five questions:

  1. Does it increase evidence per decision, or decrease the cost of a decision?
  2. Can a third party re-check the output without re-running the agent?
  3. Does it work offline, with no key, on the default path?
  4. Does it reduce time-to-first-verdict?
  5. Is it a new surface? If so, who asked for it?

Then run:

make test && make pytest && make lint && make demo-audit

See CONTRIBUTING.md and CODE_OF_CONDUCT.md.

Name

An assay is a test that determines what a substance actually contains. The stone is the touchstone: it does not declare the answer, it leaves a mark that someone else can check. That is the whole idea.

License

Apache-2.0. See LICENSE.

Metadata

Release files for assaystone 0.33.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 assaystone 0.33.0
File Size Uploaded Provenance Actions
assaystone-0.33.0.tar.gz 327.6 kB With provenance Details for assaystone-0.33.0.tar.gz

Built distribution (wheel)

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

Total release size: 596.9 kB

Release files / assaystone-0.33.0.tar.gz

Download URL assaystone-0.33.0.tar.gz
Size 327.6 kB
Tags Source
SHA-256 checksum
How to use checksums
34d9dbccf05e435ddbf8ce44b0a0b5493b816982b3230a0cb8b353c1cea98f52
BLAKE2b-256 checksum
How to use checksums
16627e39df723932c3aeeec08104536c1197b17a1cc6967eb22b99a91cc3df82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / assaystone-0.33.0-py3-none-any.whl

Download URL assaystone-0.33.0-py3-none-any.whl
Size 269.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07811a7b707cd09a541d906b97fd12c7e13fa496931f2de501beab5c47a4186e
BLAKE2b-256 checksum
How to use checksums
c74992bd74847e9bbfb6d91531a97efb3ab551a4ff065be257d99654fa22e83d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for assaystone 0.33.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for assaystone-0.33.0.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 Nov 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

0.33.0 This release

2 release files Full 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