Specification

Screwtape action receipt format

License note: this specification text is dedicated to the public domain under CC0 1.0 (or the closest local equivalent). You may implement, verify, and republish it without asking Screwtape.ai. Screwtape.ai trademarks and the live service are not included.

An action receipt is an Ed25519-signed, hash-chained record of an agent-reported action and status. Issued by POST /v1/receipt. Verify for free with GET /v1/receipt/verify or on the verify page.

Honest limits

A receipt proves the recorded fields have not changed since Screwtape issued them, and that Screwtape made that decision or recorded that action at the stated time.

A receipt does not prove that a payment was correct, that money moved, or that an outside action actually happened. Screwtape advises and records; your agent must honor the result.

Fields

Required signed fields include schema (screwtape-action-receipt-v1), receipt_id, issued_at, agent_id, event_id, chain, sequence, previous_hash, action_sha256, status, alg, kid, and signature. Optional: reference_sha256, children, children_root.

Canonicalization and hashing

  1. Drop signature.
  2. Serialize with canonical JSON (sorted keys, no insignificant whitespace, UTF-8).
  3. Verify the Ed25519 signature over those bytes with the public key for kid from /.well-known/screwtape-receipt-key.
  4. receipt_hash is SHA-256 of the canonical JSON of the full receipt including signature.

Whole-run receipts

Send children as an ordered list of prior receipt ids. Screwtape sets children_root to the SHA-256 of the canonical JSON of those children's receipt_hash values, in order. Any added, dropped, or swapped step breaks verification.

Independent verification

Full steps, field table, and examples: /spec/receipts.md.

A receipt proves the recorded fields have not changed since Screwtape issued them, and that Screwtape made that decision or recorded that action at the stated time. A receipt does not prove that a payment was correct, that money moved, or that an outside action actually happened. Screwtape advises and records; your agent must honor the result.