agentleFS
ryanmacleanryanmaclean/skills/durable-commit/SKILL.md

durable-commit

Skill1 starsChanged 49 days agoMITView on GitHub

Design/review gate for durable storage, trusted completion, FPGA/TEE persistence, crash consistency, commit sequencing, epochs, TIDs, anti-replay, and storage acknowledgements. Use when discussing commit, fsync, FUA, flush, persistence, durable completion, storage controllers, FPGA sequencing, TEE/RPMB-like state, immutable logs, or attested storage. Rejects designs that confuse acceptance, visibility, device completion, and durability.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill whenever a design crosses a persistence boundary.

    line 14
  2. Distinctive:

    Keep these states distinct:

    line 18
  3. Distinctive:

    Never use one as evidence for another unless the underlying device/OS contract explicitly guarantees it.

    line 30
  4. Distinctive:

    Keep these concepts separate:

    line 34
  5. Distinctive:

    Prefer a minimal trusted head:

    line 75
  6. Distinctive:

    Do not turn transport retries into new logical mutations.

    line 89
  7. Distinctive:

    Keep on CPU/BSD unless measurement proves otherwise:

    line 113
  8. Distinctive:

    Before accepting a design, ask:

    line 124
  9. Distinctive:

    Treat the lower block as a root of durable truth, not merely an accelerator.

    line 136
  10. Distinctive:

    Read before changing the architecture:

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

durable-commit — trusted persistence semantics

Use this skill whenever a design crosses a persistence boundary.

Mandatory model

Keep these states distinct:

proposal
!= CPU/program visibility
!= coherent/DMA visibility
!= device acceptance
!= device completion
!= durable persistence
!= trusted visible completion

Never use one as evidence for another unless the underlying device/OS contract explicitly guarantees it.

Canonical identities

Keep these concepts separate:

run_id       logical execution identity
request_id   idempotency identity
object_id    durable object identity
tid          durable order/version
content_hash content identity
epoch        reset/trust domain
timestamp    observation only
path         presentation only

A useful evidence tuple is:

(epoch, tid, object_id, content_hash)

Higher layers may attach run/request identity.

Commit rule

A completion may become visible only after its declared durability predicate is true.

TrustedComplete(N) => Persistent(N)

For ordered commits:

TrustedComplete(N) => required predecessors are also persistent

Immutability

Committed facts are append-only.

Corrections and supersession create new committed facts; they do not rewrite history.

Prefer a minimal trusted head:

(epoch, last_tid, root_hash)

with immutable history stored outside the trusted block.

Retry rule

Retries reuse the same logical request_id.

The authoritative persistence layer decides whether that request has already committed.

Do not turn transport retries into new logical mutations.

Recovery review

For every state variable classify:

  • volatile
  • durable
  • reconstructable
  • forbidden to reconstruct

Recovery must never invent a commit.

Hardware boundary

FPGA/ASIC logic should own only invariants that earn dedicated hardware.

Good candidates:

  • completion gating
  • monotonic durable sequence
  • epoch / anti-replay
  • tiny integrity root
  • independent progress/error state

Keep on CPU/BSD unless measurement proves otherwise:

  • filesystem
  • policy
  • recovery strategy
  • networking
  • agent runtime
  • PQC protocol
  • generic DMA/SHA/ring implementations

Storage-background questions

Before accepting a design, ask:

  1. What does the media/controller call "complete"?
  2. Is volatile controller cache involved?
  3. What do FUA/flush/barrier semantics actually guarantee?
  4. What happens across power loss?
  5. What is the authoritative persistence acknowledgement?
  6. Can stale completions or old epochs be replayed?
  7. Can a compromised host forge the claimed completion?

TEE / trusted-boundary rule

Treat the lower block as a root of durable truth, not merely an accelerator.

The host may propose a mutation. It must not be able to fabricate a trusted committed result the lower boundary did not observe.

Do not build

Reject by default:

  • duplicate lineage/state databases
  • hardware filesystem/path semantics
  • general-purpose async I/O APIs
  • queue/ring semantics baked into the persistence contract
  • Linux as a target architecture
  • PQC in the per-commit hot path
  • a RISC-V softcore before pure RTL earns the need

Canonical references

Read before changing the architecture:

  • docs/CONSTRAINTS.md
  • docs/RESEARCH-INDEX.md
  • scaffolds/durable-tid/docs/DESIGN.md
  • scaffolds/durable-tid/docs/FORMAL.md
  • rfcs/0004-three-superstation-pre-asic-lab.md
  • rfcs/0005-formal-verification-before-rtl.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.