Skip to main content

signoff-core

Core engine for Signoff — a verification layer for AI agents.

Source of truth for the types exported here: docs/protocol.md §3 and CLAUDE.md §8. When this code disagrees with the protocol doc, the doc wins and the code is a bug.

Demo

from signoff import Claim, Deliverable, Harness

deliverable = Deliverable(id="dlv_1", kind="research_report", content={"body": "..."})
claims = [Claim(id="clm_1", text="…", kind="citation", evidence={"url": "…"})]

async with await Harness.from_config_path("harness.yaml") as h:
    verdict = await h.verify(deliverable, claims)
    print(verdict.model_dump_json(indent=2))

See docs/harness.md for the advanced Harness(...) form and the full lifecycle diagram.

Public API

Data models (signoff.models)

Type Protocol section
Deliverable §3.2
Claim §3.3 (reserved kinds in §3.3.1)
VerifierResult §3.5
Verdict §3.6
FeedbackPacket, BlockerEntry, WarningEntry §3.7
Severity (StrEnum) §3.4

Also exported: regex constants (ID_PATTERN, VERIFIER_NAME_PATTERN), the RESERVED_CLAIM_KINDS frozenset, and the harness-internal DELIVERABLE_CLAIM_ID constant (§4.3).

Runtime abstraction (signoff.runtime)

Per CLAUDE.md §8 — see docs/runtimes.md for the full guide.

Symbol Purpose
Runtime (Protocol) Contract for "where and how a verifier executes"
RuntimePolicy Per-execution ceiling: timeout, CPU/memory caps, network posture
VerifierMeta §4.1 registration metadata the harness passes to the runtime
LocalRuntime In-process default; no isolation; enforces timeout + §4.4 error handling
SignoffRuntimeError + RuntimeTimeoutError, RuntimeResourceLimitError, RuntimePolicyViolationError, RuntimeInfrastructureError Runtime-internal error hierarchy

Verifier context (signoff.context)

Implements protocol §4.3.

Symbol Purpose
VerifierContext What a verifier sees: deliverable, workspace, HTTP/judge clients, logger, budget, ok() / fail() result constructors, exec(), fetch()
ExecResult, FetchResult, JudgeResult Structured return types for context I/O
HttpClient, JudgeClient (Protocols) Pluggable client contracts; real impls arrive in follow-ups
make_context(...) Convenience factory for tests and ad-hoc callers

Verifier decorator + plugin registry (signoff.verifier, signoff.registry)

Implements protocol §4.1 / §4.2. See docs/writing-a-verifier.md.

Symbol Purpose
@verifier(...) Declares a verifier; attaches VerifierMeta to the function at import time
RegisteredVerifier (Protocol) Structural type for "callable with .signoff_meta"
Registry Indexed store of registered verifiers; supports discover, register, get, list_all, for_claim_kind, whole_deliverable
default_registry Module-level singleton convenience
ENTRY_POINT_GROUP "signoff.verifiers" — what packs publish into

Harness (signoff.harness)

Implements protocol §5. See docs/harness.md for the full architecture + sequence diagram.

Symbol Purpose
Harness Orchestrates a full verify(deliverable, claims) → Verdict cycle: resolves applicable verifiers, schedules them under concurrency + budget constraints, collects results, builds the Verdict (and FeedbackPacket when blockers land), and honours cooperative cancellation.
Harness.from_config_path(...) Convenience async factory: loads YAML, uses default_registry + LocalRuntime, substitutes FakeHttpClient/FakeJudge when not supplied.
async with Harness(...) as h Calls prepare() / teardown() on every runtime.

Configuration (signoff.config)

Implements protocol §6. See docs/configuration.md.

Symbol Purpose
HarnessConfig Top-level YAML shape
DeliverableConfig, VerifierConfig, BudgetConfig, RuntimeConfig, RuntimePolicyConfig, JudgeConfig, RetryConfig Nested sections
load_config(path=..., pack_defaults=..., env_overrides=..., request_overrides=...) Full resolution-order loader
validate_config(config, registry) Cross-check against a populated Registry
deep_merge(base, override) Deep-merge primitive (dicts recurse, lists replace, None unsets)
ConfigurationError Raised on YAML / validation failures
PACK_DEFAULTS_ENTRY_POINT_GROUP "signoff.pack_defaults" — packs publish defaults here

Test helpers (signoff.testing)

Opt-in — not re-exported from signoff.

  • FakeHttpClient — deterministic HTTP stand-in; pre-register responses by URL.
  • FakeJudge — deterministic judge stand-in; queue then fall back to a default.

JSON schemas

Every model is serialised to JSON Schema under src/signoff/schemas/ and kept in sync via scripts/export_schemas.py. Regenerate with:

just schemas         # rewrite schemas from current models
just schemas-check   # fail if committed schemas drift from models (CI gate)

The TypeScript SDK copies these schemas at build time and asserts agreement against its Zod definitions, so a model change in this package must also re-export schemas and usually pairs with a parallel change in @signoff/sdk.

Coming in follow-up PRs

  • MCP server wiring (signoff-mcp) — exposes verify() as the request_signoff tool.
  • Real HttpClient (httpx) and JudgeClient (Anthropic / OpenAI) implementations.
  • DockerRuntime (separate package, signoff-runtime-docker).
  • Per-verifier RuntimePolicy overrides wired through the config loader.

See CLAUDE.md §14 for the phase plan.

Metadata

Release files for signoff-core 0.0.2

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

Source distribution (sdist)

Source distribution for signoff-core 0.0.2
File Size Uploaded Provenance Actions
signoff_core-0.0.2.tar.gz 67.3 kB Without provenance Details for signoff_core-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for signoff-core 0.0.2
File Interpreter ABI Platform Actions
signoff_core-0.0.2-py3-none-any.whl Python 3 none any Details for signoff_core-0.0.2-py3-none-any.whl

Total release size: 122.7 kB

Release files / signoff_core-0.0.2.tar.gz

Download URL signoff_core-0.0.2.tar.gz
Size 67.3 kB
Tags Source
SHA-256 checksum
How to use checksums
abfc4018bc138d35b457a513da08ac110119aae6ff4f0401053427e00efdb6cc
BLAKE2b-256 checksum
How to use checksums
abf9d3a32ae6101abcce0a9ac4d517681cb73a9669fd71316bafbeb9cf6b5fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / signoff_core-0.0.2-py3-none-any.whl

Download URL signoff_core-0.0.2-py3-none-any.whl
Size 55.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87fbc7d81332023a9ac9746d55811b93317b6f7629ca6b5f08145cec2f6bd5c1
BLAKE2b-256 checksum
How to use checksums
49c60ce7346369effee42e505bc5c8d2378cc1ed85d8f3de4ff6c7c3d907c68c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for signoff-core 0.0.2

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

0.0.2 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