deterministic-replay
Skill1 starsChanged 50 days agoMITView on GitHub
Design and test immutable committed state, canonical record encoding, deterministic transitions, crash replay, checkpoints, hash chains, and JS/formal executable models. Use when implementing replay, recovery, event logs, commit records, canonical serialization, hash roots, state-machine tests, JS simulators, TLA+/PlusCal, RTL equivalence, or reproducibility.
In this repository113 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ac-ideateSkill
- ac-listSkill
- ac-roadmapSkill
- agentbridge-mcpSkill
- almanacSkill
- almquist-shellSkill
- ansible-fleetSkill
- apfsSkill
- apple-siliconSkill
- arena-actorsSkill
- asustor-nasSkill
- a-teamSkill
- atem-miniSkill
- at-tuiSkill
- autoresearchSkill
- babysitSkill
- bonzibuddySkill
- bop-brainstormSkill
- bop-catalogSkill
- bop-onSkill
- bop-teamSkill
- bop-workflowSkill
- bsd-portabilitySkill
- code-refactoringSkill
- codex-personasSkill
- context-graphSkill
- councilSkill
- datadog-backupSkill
- dd-tagsSkill
- delegateSkill
- deming-pdsaSkill
- dispatch-nuSkill
- durable-commitSkill
- elixir-gastown-opsSkill
- ergo-ircSkill
- esp32-tang-bridgeSkill
- fleet-evalSkill
- fleet-ircSkill
- freebsd-build-vmSkill
- freebsd-piSkill
- freebsdSkill
- ganttSkill
- gastown-opsSkill
- gastown-slingSkill
- gh-authSkill
- gitea-releaseSkill
- gitea-runnerSkill
- henshuSkill
- irclaw-cluster-opsSkill
- irclaw-research-teamSkill
- irc-taskSkill
- jail-factorySkill
- jjSkill
- jobcard-systemSkill
- kubernetesSkill
- leptosSkill
- loreSkill
- lower-bound-reviewSkill
- macvlan-netSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 57
Before hashing, signing, comparing, or storing a persistent record, specify:
- Distinctive: line 68
Never persist/hash compiler-native structure layout.
- Distinctive: line 70
Do not rely on ordinary unordered JSON serialization.
- Distinctive: line 119
Do NOT require deterministic scheduling by default.
- Distinctive: line 144
Prefer testing whether hardware can retain only:
≈ “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.
Files
deterministic-replay — immutable facts, reproducible state
The rule:
Nondeterminism may propose state; only deterministic mechanisms commit state.
Required transition model
Define a pure semantic function:
Transition(previous_state, canonical_record) -> next_stateGiven identical prior committed state and identical canonical input, the result must not depend on:
- wall-clock time
- scheduler timing
- CPU/core placement
- agent/model randomness
- retry timing
- unordered map iteration
- process-local hidden state
Immutability
Committed records never mutate.
A correction is another committed record.
Mutable current-state views must be reconstructable from immutable committed facts.
Deterministic recovery
Target:
checkpoint
+ immutable committed suffix
-> current canonical stateFull replay and checkpoint+suffix replay must converge.
Canonical encoding
Before hashing, signing, comparing, or storing a persistent record, specify:
- schema/version
- fixed field order
- exact integer widths
- endianness
- string/Unicode normalization
- optional/default-field representation
- byte/string encoding
- hash domain separation
Never persist/hash compiler-native structure layout.
Do not rely on ordinary unordered JSON serialization.
JS executable model
For tiny persistence/state-machine work, prefer exhaustive exploration before random fuzzing.
Model semantic states, not transistor/cache internals.
Useful abstract states:
PROPOSED
COHERENT_VISIBLE
DEVICE_COMPLETE
PERSISTENT
TRUSTED_COMPLETEEnumerate actions such as:
submit
duplicate_submit
durable_ack
publish_completion
reset
recover
replay_old_epochExplore all reachable action sequences to a useful depth and retain counterexamples as regression fixtures.
Assertions
At minimum:
CommittedRecordNeverMutates
SameStateAndInputImpliesSameNextState
ReplayOfCommittedPrefixIsDeterministic
CheckpointPlusSuffixEqualsFullReplay
CompletionImpliesPersistent
RecoveryDoesNotCreateCommit
DuplicateRequestCommitsAtMostOnce
CanonicalRecordHashIsStableScheduling
Do NOT require deterministic scheduling by default.
Require deterministic outcome semantics:
same ordered committed facts
-> same reconstructed stateFormal-to-hardware ladder
semantic model
-> TLA+/PlusCal model check
-> JS executable oracle
-> RTL
-> SVA/SymbiYosys
-> FPGA differential traces
-> ASIC only after evidenceJS and RTL should consume the same trace fixtures whenever possible.
Trusted-head experiment
Prefer testing whether hardware can retain only:
(epoch, last_tid, root_hash)while immutable history remains external.
Canonical references
docs/CONSTRAINTS.mdscaffolds/durable-tid/docs/FORMAL.mdscaffolds/durable-tid/docs/DESIGN.mdrfcs/0005-formal-verification-before-rtl.md
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
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.

