Receipt Auditor
Audit a sealed run for authority over-reach, binding the review to its native
receipt identity and verification posture.
Runx seals a receipt for every run. This skill resolves the exact receipt id
through ledger read, which returns the Rust-owned redacted detail projection
for signed authority, acts, decisions, artifacts, lineage, and verification. It answers one governance
question: did the run stay inside the authority it was granted? It flags scopes
exercised that were never granted, acts that claim an approval requirement or
decision without matching host-attested evidence, refusals that were not
recorded, and any raw secret material that leaked into the receipt. It pairs
with least-privilege: that one narrows a
grant from usage, this one verifies a run honored its grant.
Composes
What this skill does
- Read the proof and the acts. From the receipt, extract the granted
authority (the proof) and the scopes the acts actually exercised.
- Diff exercised against granted. Any exercised scope not covered by the
proof is over-reach.
- Check declared approval. When an act's authority or effect evidence says
exact approval was required, the receipt must carry the matching
host-attested decision. A routine write inside its admitted grant does not
acquire an approval requirement merely because it changed provider state.
- Check exposure. The receipt must carry only hashed material references; a
raw secret in the receipt is a leak.
- Verdict.
clean, anomaly, or needs_more_evidence, with the exact
findings and a recommendation for each anomaly.
Core principles
- The receipt is the evidence. Audit what the receipt records, not what the
skill claims it did.
- Granted is the ceiling. Exercised authority must be a subset of the proof;
anything beyond is over-reach, full stop.
- Approval follows the act contract. Missing or mismatched approval is an
anomaly only when the signed authority/effect evidence required that exact
decision. Never infer human-approval policy from a write-shaped verb.
- No raw material. A receipt must reference material by hash; raw credential
material in a receipt is a leak, not a convenience.
- Absence of evidence is not clean. With no receipt or an unattributable
one, return
needs_more_evidence, never clean.
When to use this skill
- Post-run governance audit of a sealed, successful run.
- Spot-checking that a skill honored its authority bound in production.
- Before promoting a skill toward a higher trust posture.
When not to use this skill
- To diagnose a failed run and propose a fix. That is
diagnose-skill-run
(failure-to-improvement). This skill audits a sealed run for over-reach
(success-to-governance); the two are different lenses on a receipt.
- To narrow a grant from observed usage. That is
least-privilege.
Diagnostics
receipt.authority.over_reach (error): an exercised scope is not covered by
the authority proof.
receipt.approval.inconsistent (error): an approval-bound act lacks its
matching host-attested decision, or the recorded decision does not match the
exact act.
receipt.refusal.unrecorded (warning): a denied request is not reflected as a
sealed refusal.
receipt.material.exposed (error): raw credential material appears in the
receipt instead of a hash reference.
receipt.clean (info): exercised authority is within the grant, every
declared approval requirement is satisfied, and no material is exposed.
Procedure
- Resolve
receipt_id through the native ledger, load its native redacted
detail, and verify the matched tree when keys are available. Treat a provided
receipt_summary as supplemental context, never the primary live evidence.
- Extract the authority proof, granted scopes, acts, approvals, refusals,
material references, and receipt signature metadata.
- Normalize exercised scopes from the acts and compare them with the granted
scopes. Exercised must be a subset of granted.
- Identify acts whose signed authority/effect evidence explicitly required
approval. Confirm each has one matching host-attested approval decision. Do
not treat an ordinary write scope as an implicit approval requirement.
- Check that denied requests appear as sealed refusals when the receipt records
the attempt.
- Scan receipt-visible material for raw credentials or secret-bearing payloads.
- Return a verdict with findings, recommendations, and the success checkpoint.
Edge cases and stop conditions
- Missing receipt: return
needs_more_evidence; never infer a clean run.
- Unattributable receipt: return
needs_more_evidence when the receipt
cannot be tied to the run under audit.
- Malformed proof: return
needs_more_evidence unless enough normalized
grant data is supplied separately.
- Unknown scope name: treat it as over-reach unless the grant explicitly
covers it.
- Approval-bound act without matching decision: emit
receipt.approval.inconsistent even if the provider operation succeeded.
- Granted routine write without an approval requirement: audit authority,
idempotency, provider evidence, and finality normally; the absent approval is
not a finding.
- Raw token, key, or credential in the receipt: emit
receipt.material.exposed and recommend revocation/rotation.
Output schema (receipt_audit)
decision: ready | needs_more_evidence
run_ref: string
granted_scopes: [string]
exercised_scopes: [string]
refusals: [string]
findings:
- id: string
severity: error | warning | info
message: string
verdict: clean | anomaly | needs_more_evidence
rationale: string
recommendations: [string]
success_checkpoint:
milestone: string
description: string
A clean verdict requires zero error findings.
Worked example
A sealed run was granted repo:read. The receipt shows the acts exercised only
repo:read and material is referenced by hash. Exercised is a subset of
granted, no declared approval is unresolved, and no material is exposed:
verdict: clean. Had an act exercised repo:write while the proof
granted only repo:read, that would raise receipt.authority.over_reach and a
verdict: anomaly with a recommendation to revoke the run's grant and
investigate. Conversely, a run granted repo:write is not anomalous solely
because it has no approval record; approval is checked only if that exact act's
signed contract required it.
Inputs
receipt_id (optional): the receipt id to audit.
receipt_summary (optional): a sanitized receipt or its acts/proof summary
when the full receipt is not available.
granted_scopes (optional): the authority the run was granted, when not
derivable from the receipt alone.
objective (optional): operator intent that focuses the audit.
receipt_rows (optional): native-projection rows for deterministic replay;
live runs resolve receipt_id from the configured receipt store.
receipt_details (optional): native redacted detail projections for
deterministic replay only.
At least one of receipt_id or receipt_summary is required; with neither, the
skill returns needs_more_evidence.
Agent task contracts
audit-receipt
Audit one run for authority over-reach, inconsistent declared approval, unrecorded refusal, or exposed
material. Native ledger evidence proves receipt identity, verification posture, signed
authority, approval decisions, acts, artifacts, and lineage through its redacted detail projection. Treat
receipt_summary and granted_scopes as supplemental operator context only. If a receipt id is not
resolved, or native detail is insufficient, return needs_more_evidence rather than clean. Do not
infer an approval requirement from a write-shaped verb. Do not repair the skill or mutate the ledger.
1---2name: audit-receipt3description: Audit a sealed runx receipt for governance, comparing exercised authority and any declared approval requirement with signed evidence, and flag over-reach, approval inconsistency, unrecorded refusals, or exposed secret material.4---56# Receipt Auditor78Audit a sealed run for authority over-reach, binding the review to its native9receipt identity and verification posture.1011Runx seals a receipt for every run. This skill resolves the exact receipt id12through `ledger read`, which returns the Rust-owned redacted detail projection13for signed authority, acts, decisions, artifacts, lineage, and verification. It answers one governance14question: did the run stay inside the authority it was granted? It flags scopes15exercised that were never granted, acts that claim an approval requirement or16decision without matching host-attested evidence, refusals that were not17recorded, and any raw secret material that leaked into the receipt. It pairs18with `least-privilege`: that one narrows a19grant from usage, this one verifies a run honored its grant.2021## Composes2223<!-- Generated from the native execution closure; run pnpm core-skills:composes:generate. -->2425- `ledger#read`2627## What this skill does28291. **Read the proof and the acts.** From the receipt, extract the granted30 authority (the proof) and the scopes the acts actually exercised.312. **Diff exercised against granted.** Any exercised scope not covered by the32 proof is over-reach.333. **Check declared approval.** When an act's authority or effect evidence says34 exact approval was required, the receipt must carry the matching35 host-attested decision. A routine write inside its admitted grant does not36 acquire an approval requirement merely because it changed provider state.374. **Check exposure.** The receipt must carry only hashed material references; a38 raw secret in the receipt is a leak.395. **Verdict.** `clean`, `anomaly`, or `needs_more_evidence`, with the exact40 findings and a recommendation for each anomaly.4142## Core principles4344- **The receipt is the evidence.** Audit what the receipt records, not what the45 skill claims it did.46- **Granted is the ceiling.** Exercised authority must be a subset of the proof;47 anything beyond is over-reach, full stop.48- **Approval follows the act contract.** Missing or mismatched approval is an49 anomaly only when the signed authority/effect evidence required that exact50 decision. Never infer human-approval policy from a write-shaped verb.51- **No raw material.** A receipt must reference material by hash; raw credential52 material in a receipt is a leak, not a convenience.53- **Absence of evidence is not clean.** With no receipt or an unattributable54 one, return `needs_more_evidence`, never `clean`.5556## When to use this skill5758- Post-run governance audit of a sealed, successful run.59- Spot-checking that a skill honored its authority bound in production.60- Before promoting a skill toward a higher trust posture.6162## When not to use this skill6364- To diagnose a failed run and propose a fix. That is `diagnose-skill-run`65 (failure-to-improvement). This skill audits a sealed run for over-reach66 (success-to-governance); the two are different lenses on a receipt.67- To narrow a grant from observed usage. That is `least-privilege`.6869## Diagnostics7071- `receipt.authority.over_reach` (error): an exercised scope is not covered by72 the authority proof.73- `receipt.approval.inconsistent` (error): an approval-bound act lacks its74 matching host-attested decision, or the recorded decision does not match the75 exact act.76- `receipt.refusal.unrecorded` (warning): a denied request is not reflected as a77 sealed refusal.78- `receipt.material.exposed` (error): raw credential material appears in the79 receipt instead of a hash reference.80- `receipt.clean` (info): exercised authority is within the grant, every81 declared approval requirement is satisfied, and no material is exposed.8283## Procedure84851. Resolve `receipt_id` through the native ledger, load its native redacted86 detail, and verify the matched tree when keys are available. Treat a provided87 `receipt_summary` as supplemental context, never the primary live evidence.882. Extract the authority proof, granted scopes, acts, approvals, refusals,89 material references, and receipt signature metadata.903. Normalize exercised scopes from the acts and compare them with the granted91 scopes. Exercised must be a subset of granted.924. Identify acts whose signed authority/effect evidence explicitly required93 approval. Confirm each has one matching host-attested approval decision. Do94 not treat an ordinary write scope as an implicit approval requirement.955. Check that denied requests appear as sealed refusals when the receipt records96 the attempt.976. Scan receipt-visible material for raw credentials or secret-bearing payloads.987. Return a verdict with findings, recommendations, and the success checkpoint.99100## Edge cases and stop conditions101102- **Missing receipt:** return `needs_more_evidence`; never infer a clean run.103- **Unattributable receipt:** return `needs_more_evidence` when the receipt104 cannot be tied to the run under audit.105- **Malformed proof:** return `needs_more_evidence` unless enough normalized106 grant data is supplied separately.107- **Unknown scope name:** treat it as over-reach unless the grant explicitly108 covers it.109- **Approval-bound act without matching decision:** emit110 `receipt.approval.inconsistent` even if the provider operation succeeded.111- **Granted routine write without an approval requirement:** audit authority,112 idempotency, provider evidence, and finality normally; the absent approval is113 not a finding.114- **Raw token, key, or credential in the receipt:** emit115 `receipt.material.exposed` and recommend revocation/rotation.116117## Output schema (`receipt_audit`)118119```yaml120decision: ready | needs_more_evidence121run_ref: string122granted_scopes: [string]123exercised_scopes: [string]124refusals: [string]125findings:126 - id: string127 severity: error | warning | info128 message: string129verdict: clean | anomaly | needs_more_evidence130rationale: string131recommendations: [string]132success_checkpoint:133 milestone: string134 description: string135```136137A `clean` verdict requires zero `error` findings.138139## Worked example140141A sealed run was granted `repo:read`. The receipt shows the acts exercised only142`repo:read` and material is referenced by hash. Exercised is a subset of143granted, no declared approval is unresolved, and no material is exposed:144`verdict: clean`. Had an act exercised `repo:write` while the proof145granted only `repo:read`, that would raise `receipt.authority.over_reach` and a146`verdict: anomaly` with a recommendation to revoke the run's grant and147investigate. Conversely, a run granted `repo:write` is not anomalous solely148because it has no approval record; approval is checked only if that exact act's149signed contract required it.150151## Inputs152153- `receipt_id` (optional): the receipt id to audit.154- `receipt_summary` (optional): a sanitized receipt or its acts/proof summary155 when the full receipt is not available.156- `granted_scopes` (optional): the authority the run was granted, when not157 derivable from the receipt alone.158- `objective` (optional): operator intent that focuses the audit.159- `receipt_rows` (optional): native-projection rows for deterministic replay;160 live runs resolve `receipt_id` from the configured receipt store.161- `receipt_details` (optional): native redacted detail projections for162 deterministic replay only.163164At least one of `receipt_id` or `receipt_summary` is required; with neither, the165skill returns `needs_more_evidence`.166167## Agent task contracts168169### `audit-receipt`170171Audit one run for authority over-reach, inconsistent declared approval, unrecorded refusal, or exposed172material. Native ledger evidence proves receipt identity, verification posture, signed173authority, approval decisions, acts, artifacts, and lineage through its redacted detail projection. Treat174receipt_summary and granted_scopes as supplemental operator context only. If a receipt id is not175resolved, or native detail is insufficient, return needs_more_evidence rather than clean. Do not176infer an approval requirement from a write-shaped verb. Do not repair the skill or mutate the ledger.