Pass 0 of 4 · intuition · about 8 min

The map

The whole system in three sentences, where each part lives, and a 20-minute route in.

0 of 6 concepts in this pass seen

Three sentences

You changed one paragraph of AGENTS.md. Did the agent get better, or did you just get lucky on the next task?

  1. Same Again reads your agent's past sessions and stores them as a graph of turns, each named by the hash of its bytes.
  2. It cuts a session at a chosen turn, seals everything after the cut away from the agent, and replays the task under two policies, A and B.
  3. It grades both replays with a calibrated check that may answer Pass, Fail or Unknown, and only says Better when the evidence would survive you peeking at it after every pair.

One line holds the whole design: a cut plus a policy gives a distribution over traces, not one trace. Everything else in this explainer is about sampling that distribution honestly.

What you need first

F1F2F3F6

Four small ideas carry everything later. If you already know them, answer the four checks below and move on. Each answer marks a foundation as seen, so the graph opens up.

  • Hashes. A digest is a short name computed from bytes. Equal bytes, equal name. Any edit, unrelated name.
  • DAGs. A transcript is turns joined by one-way edges that never loop back in time.
  • Rates. Each run is a coin with an unknown bias p. A pass rate is a guess at p, with error bars.
  • Truth tables. AND and OR written out case by case. Same Again adds a third value, so these tables will grow.

You change one byte of a 40 KB transcript and hash it again with SHA-256. What happens to the digest?

Answer options
How sure are you?

Why can a transcript be stored as a DAG (directed acyclic graph) rather than a general graph?

Answer options
How sure are you?

An agent passes a task 3 times out of 5. What do you know about its pass rate p?

Answer options
How sure are you?

A release needs 'build passed AND tests passed'. The build passed. The tests failed. What is the release check?

Answer options
How sure are you?

Four crates, two databases, four primitives

S0S1

Same Again is a Rust workspace of four crates [code]crates/sa-store/src/lib.rs:1-3. The maths lives in sa-core and never touches a disk. Everything that does touches a disk sits around it.

  1. sa-corePure maths and types. No I/O.Digest<K>Verdict (K3)Predicate<T, State>isolate_cutstats.rssearch.rs
  2. sa-ingestReads Claude Code, Codex, T3 and git into trace nodes; materialises cuts; runs experiments.claude.rscodex.rscut.rsexperiment.rseval.rs
  3. sa-storeTwo SQLite files with separate lifetimes.Store → index.sqliteCasebookStore → casebook.sqlite
  4. sa-cliThe sa command: import, cut, diff, bisect, shrink, rescore.main.rs defaultsconfig.rs paths
index.sqliteThe transcript DAG spine and an FTS5 search index over it.Rebuildable. Delete it and re-import.
casebook.sqliteCalibrated predicates, trials, assessments and comparisons.Durable. Never wiped by a rebuild.
sa-cli drives sa-ingest, which calls the pure maths in sa-core and writes through sa-store to two SQLite files with different lifetimes.

The two SQLite files have different lifetimes on purpose. index.sqlite is a cache of your transcripts: delete it and re-import. casebook.sqlite holds what you learned: calibrated graders, trials and comparisons. A rebuild of the index never wipes the casebook [code]crates/sa-store/src/schema.rs:136-137.

The four primitives, in the order a replay uses them:

  1. Trace and Cut. The recorded past, and a point in it where you hide the future.
  2. PolicyTree. Your AGENTS.md, skills and hooks, parsed into units that can be removed one at a time.
  3. Trial. One replay of one cut under one policy.
  4. Calibrated Predicate. A grader that has proved it can tell a known-bad artefact from a known-good one.

Colours mean one thing each

Every plot, equation and badge uses the same colours for the same meanings. Colour is never the only cue: Pass is a filled triangle, Fail a cross, and Unknown is always hatched fog.

Pass Fail Unknown: grader timed out

  • a Pass outcomefilled triangle ▲
  • a Fail outcomecross ✕
  • Unknown: no verdict. Always hatched fog, never on the pass/fail axishatched fog, never on the Pass to Fail axis
  • policy A, the baselinesolid line
  • policy B, the candidatedashed line
  • the cut, focus or the current selectionfocus ring and the hindsight barrier
  • a trap, gap or leakdiamond outline

Unknown never sits on the Pass to Fail axis. It is not a weak Pass or a soft Fail. It is the absence of a verdict, and most of the traps in Pass 3 come from forgetting that.

Nine questions, four depths

The explainer asks nine questions and answers each four times. Pass 1 shows a picture. Pass 2 shows the Rust and the maths. Pass 3 makes the tool lie and borrows a fix from a neighbouring field. Pass 4 asks you to design the fix yourself.

QuestionPass 1 · picturePass 2 · mechanismPass 3 · trapPass 4 · design
What is a replay?Drag the cut across Opus → C1 → Neon → C2cut id = SHA-256 over the prefix ids in order--git-ref main leaks C2 (G6)L1: seal the past with an ancestry check
What is a check?A stale handoff.json claims it is currentcalibrate_all and the Uncalibrated typestatefile-exists passes calibration yet waves stale claims throughL2: build a grader that scores 85% on mutants
Is one run a rate?A 60% agent: 99.9% capable, 1.7% reliable at k = 8pass_at_k against the plug-in pass_pow_kn = 5, c = 3: 0.216 against 0.100 (G4)L5: swap in C(c,k)/C(n,k)
Why compare on the same task?8 retries on one task against 8 tasksVar(A − B) = 0.24 + 0.24 − 2(0.12)One --cut-dir, E = 28.44, verdict Better (G1)L3: choose cuts and retries per cut
When may you stop?Peeking at coin flips: 35% false alarmsE(8,0) = 28.44 crosses 1/α = 20Equivalent needs 5,869 pairs; budget is 10L3: plan α, margin and budget
What about runs that never finished?Timeouts that hit only the hard casesΔ̂ over decisive pairs; Manski over all N15% Unknown under the cap gives Better (G2)L3: Manski bound must exclude 0
Which change broke it?One unlucky coin at the first midpointbisect_revisions: lo, hi, mid33% correct against 92% (G3)L4: posterior bisection with a stop rule
Which rule matters?A bloated four-section AGENTS.md by handddmin_shrink: chunks, complements, granularity15% flake deletes a needed rule 86% of runs (G3)L4: repeats per probe under noise
How often may you ask?Twenty grader tweaks on one pool of cuts1 − (1 − α)^t and e-Bonferroni at t/αShrink then confirm on the same cut (G5)L5: an e-value ledger with e-BH

A 20-minute route

Short on time? Follow these six stops. They end at the moment Same Again prints Better on data that is just as consistent with Worse.

  1. 0–2 minThree sentencesThe whole system before any detail.
  2. 2–4 minCrates and databasesWhere each idea lives in the code.
  3. 4–8 minDrag the cutA replay is the past, sealed by its fingerprint.
  4. 8–12 minPeek at coin flipsWatch a 5% test fire on a third of identical policies.
  5. 12–16 minRuns that never finishedFog is not neutral.
  6. 16–20 minMake it liesa diff says Better on data that allows Worse.

Prefer to roam? Turn on Unlock all on the explainer page. The graph still records what you saw, so the review queue stays honest.