Skip to content

LeoYeAI/agent-master-skills / skills/agent-decision-receipts

agent-decision-receipts

Verified

Use when an autonomous agent takes a side-effecting action (deploy, delete, pay, grant access) that may need proving later, or for EU AI Act Art. 12 record-keeping. Builds a tamper-evident signed receipt with build_action_manifest.py and verifies it.

FileKindSize
SKILL.mdskill md7.5 KB
references/receipt-fields.mdmarkdown4.5 KB
scripts/build_action_manifest.pyscript4.1 KB

references/receipt-fields.md

View on GitHub
# Receipt fields + the post-quantum rationale

Detailed reference for the `agent-decision-receipts` skill. The receipt is produced by the
OpenAgentOntology `mint_receipt` primitive (Apache-2.0); this documents what comes back and why.

## The receipt schema

A minted receipt is an ASCII-only, JSON-safe dict:

| Field | Meaning |
|-------|---------|
| `atom_id` | stable id derived from the action source + the evidence-hash prefix |
| `type` | `AgentGovernanceReceipt` |
| `decision` | the verdict label passed in (e.g. `ACTION_GOVERNED`, `DEPLOY_APPROVED`) |
| `evidence_hash` | `sha256(canonical(evidence))` — the commitment to the full action manifest |
| `signed_at` | ISO-8601 timestamp (in the signed body, never in the hashed evidence) |
| `evidence` | `{summary, ontology}` — the full action manifest is under `evidence.ontology` |
| `signature_b64` | Ed25519 signature over `canonical(body)` |
| `verify_pubkey_b64` | the Ed25519 public key, so the receipt verifies offline |
| `signed` | bool — false + an explicit flag if the crypto backend is absent (never faked) |
| `ml_dsa_signature_b64` | ML-DSA-65 (FIPS 204) leg, present when `[pq]` is installed |
| `slh_dsa_signature_b64` | SLH-DSA (FIPS 205) leg, present when `[pq]` is installed |
| `signature_alg` | names every leg actually on the receipt |
| `kid` | `sha256(verify_pubkey_b64)[:32]` — 128-bit key identifier. Lets a verifier comparing two receipts answer "signed by the same key?" offline, without any registry. |

## Canonicalization (why the hash reproduces anywhere)

`canonical(obj) = json.dumps(obj, sort_keys=True, separators=(",",":"), ensure_ascii=True, allow_nan=False)`.

Because the evidence is sorted, separator-fixed, ASCII, and finite, a verifier in any language
recomputes the identical `sha256` byte-for-byte. There are no timestamps inside the hashed
evidence, so the hash is deterministic; the timestamp lives in the signed body instead.

## Verification result

`verify_receipt(receipt)` returns:

| Field | Meaning |
|-------|---------|
| `hash_ok` | recomputed `sha256(canonical(evidence))` equals `evidence_hash` |
| `legs` | per-leg status: `ok` / `fail` (tamper) / `absent` / `unverifiable` (no backend) |
| `sig_ok` | at least one signature leg verified |
| `ok` | `hash_ok` AND no leg failed AND (`sig_ok` OR the receipt is honestly unsigned) |
| `reason` | human-readable verdict |

A one-byte edit to the action breaks `hash_ok`. A forged signature flips a leg to `fail`. An
older Ed25519-only receipt still verifies; the post-quantum legs are simply `absent`.

## Why post-quantum, by default

A receipt is long-lived evidence — an insurer, a regulator, or an auditor may verify it years
after the action. A cryptographically-relevant quantum computer could forge Ed25519 signatures,
so a signature that must stay trustworthy for years needs an algorithm that resists that. The
post-quantum legs are NIST-standardized signatures designed for exactly this:

- **ML-DSA-65** (FIPS 204) — lattice-based; the size/performance default for hot paths.
- **SLH-DSA** (FIPS 205) — hash-based, stateless; smaller assumptions, good for long archival.

Each leg signs the same canonical body, so a verifier with only one backend can still prove
authenticity from whichever leg it can check. This is post-quantum *cryptography* (quantum-
resistant signatures on classical computers), not quantum computing — label it precisely.

Install both legs: `pip install "openagentontology[pq]"`.

## PQ-required verification (strict mode, recommended)

A verifier that accepts Ed25519-only receipts can be fooled by an attacker who strips the
post-quantum legs from a hybrid-signed receipt — the residual Ed25519 leg still verifies, but the
long-lived guarantee is gone. For long-lived evidence, require the post-quantum legs to be present
and valid, and only accept Ed25519-only receipts when you must verify legacy archival data:

```python
import os
import openagentontology.receipt as oao

def verify_strict(receipt, *, require_pq: bool | None = None):
    must = require_pq if require_pq is not None else (
        os.environ.get("RECEIPT_REQUIRE_PQ", "true").lower() in ("1", "true", "yes", "on"))
    out = oao.verify_receipt(receipt)
    if must and out.get("ok") and out.get("signed"):
        legs = out.get("legs", {})
        missing = [n for n in ("ml_dsa", "slh_dsa") if legs.get(n) != "ok"]
        if missing:
            out["ok"] = False
            out["reason"] = f"PQ-required: missing {missing}"
    return out
```

Default the gate to on; set it off only for legacy Ed25519-only archival receipts.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall