Action Ledger Hash Chaining
Description
Append executed actions to a hash-chained ledger where each entry commits to the prior entry hash, and verify the chain against anchored checkpoints before trusting it. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.
When to Use
- Executed actions need a tamper-evident, append-only audit ledger.
- The outcome would change if inputs were stale, ambiguous, or incomplete.
- The result must be recorded with reasons and verification evidence for later audit.
Inputs
| Area |
Contract |
| Inputs |
action ledger hash chaining task context, candidate data, and explicit acceptance criteria. |
| Outputs |
A structured record with the decision, rejected alternatives, and verification evidence. |
| Safety |
Failures must fail closed and be reported with evidence rather than retried silently. |
Procedure
- Define the goal, the constraints, and the boundary of what this procedure may change.
- Inventory the available inputs and flag gaps or ambiguities that block progress.
- Execute the action ledger hash chaining steps in a bounded, checkpointed way.
- Compare the actual outcome against the acceptance criteria and record deviations.
- On failure, apply the declared fallback path, and never widen permissions to recover.
- Emit a structured result with evidence and provenance for downstream consumers.
Outputs
| Area |
Contract |
| Primary |
A hash-chained action ledger where each entry commits to the prior entry hash. |
| Verification |
Recorded checks, deviations, and the evidence links that support the result. |
| Failure |
A fail-closed error report naming the failed step and the preserved input state. |
Runnable Example
def chain(entries, prev="0"):
ledger = []
for e in entries:
h = hash((prev, e))
ledger.append((e, h))
prev = h
return ledger
led = chain(["a", "b"])
assert len(led) == 2 and led[0][1] != led[1][1]
Failure Modes
- Acting outside the declared task boundary.
- Appending entries without linking the previous hash, breaking tamper evidence.
- Trusting the chain without verifying it against an anchored checkpoint.
- Retrying without preserving state or evidence.
- Reporting success without checking the resulting state.
Security and Authority Boundary
This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.
Evidence
- Tamper-evident agent action logs appear in 2026 framework issue threads. (public signal)
- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.
Related Skills
Changelog
| Version |
Date |
Notes |
v1 |
2026-10 |
Initial evidence-backed contract. |
1---2name: action-ledger-hash-chaining3description: Append executed actions to a hash-chained ledger where each entry commits to the prior entry hash, and verify the chain against anchored checkpoints before trusting it.4metadata:5 source: https://skillmd.com/skills/samotech/action-ledger-hash-chaining6 upstream: skills/04-action-execution/action-ledger-hash-chaining.md7 category: 04-action-execution8 version: "v1"9---1011# Action Ledger Hash Chaining1213## Description14Append executed actions to a hash-chained ledger where each entry commits to the prior entry hash, and verify the chain against anchored checkpoints before trusting it. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.1516## When to Use17- Executed actions need a tamper-evident, append-only audit ledger.18- The outcome would change if inputs were stale, ambiguous, or incomplete.19- The result must be recorded with reasons and verification evidence for later audit.2021## Inputs22| Area | Contract |23|---|---|24| Inputs | action ledger hash chaining task context, candidate data, and explicit acceptance criteria. |25| Outputs | A structured record with the decision, rejected alternatives, and verification evidence. |26| Safety | Failures must fail closed and be reported with evidence rather than retried silently. |2728## Procedure291. Define the goal, the constraints, and the boundary of what this procedure may change.302. Inventory the available inputs and flag gaps or ambiguities that block progress.313. Execute the action ledger hash chaining steps in a bounded, checkpointed way.324. Compare the actual outcome against the acceptance criteria and record deviations.335. On failure, apply the declared fallback path, and never widen permissions to recover.346. Emit a structured result with evidence and provenance for downstream consumers.3536## Outputs37| Area | Contract |38|---|---|39| Primary | A hash-chained action ledger where each entry commits to the prior entry hash. |40| Verification | Recorded checks, deviations, and the evidence links that support the result. |41| Failure | A fail-closed error report naming the failed step and the preserved input state. |4243## Runnable Example44```python45def chain(entries, prev="0"):46 ledger = []47 for e in entries:48 h = hash((prev, e))49 ledger.append((e, h))50 prev = h51 return ledger52led = chain(["a", "b"])53assert len(led) == 2 and led[0][1] != led[1][1]54```5556## Failure Modes57- Acting outside the declared task boundary.58- Appending entries without linking the previous hash, breaking tamper evidence.59- Trusting the chain without verifying it against an anchored checkpoint.60- Retrying without preserving state or evidence.61- Reporting success without checking the resulting state.6263## Security and Authority Boundary64This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.6566## Evidence67- Tamper-evident agent action logs appear in 2026 framework issue threads. ([public signal](https://github.com/fabiandistler/agents/issues/325))68- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.6970## Related Skills71- [action journaling](../04-action-execution/action-journaling.md)72- [idempotent retries](../04-action-execution/idempotent-retries.md)7374## Changelog75| Version | Date | Notes |76|---|---|---|77| `v1` | `2026-10` | Initial evidence-backed contract. |