Write-Side Custody: Trust Begins Before Memory

Part 5 of the Building the AI Memory Stack series

The previous articles introduced the Reasoning Ledger and then worked through what a single ledger record should contain. Together they answered a hard question: why did this decision happen, and how do we design a record that can be trusted to say so honestly.

That raises the question underneath all of it. A record is only as good as what was allowed to become one in the first place.

Imagine reviewing an AI-assisted deployment six months later, the same approval the Reasoning Ledger recorded earlier in this series. The ledger says it was approved. The evidence looks complete, the timestamps make sense, everything appears correct. Then you notice that one of the “authoritative” policy records the decision relied on was written by a tool run that no one had authorized, from a source that should never have been treated as governing.

Nothing was tampered with after the fact. The record is faithful. The problem is earlier than that: a write that should never have been accepted became institutional memory, and every decision downstream inherited it.

At that point the problem is no longer memory. It is admission.

Memory Alone Cannot Create Trust

Throughout this series we have gradually separated the responsibilities of an AI system. The Context Window enables execution. Active Working Memory assembles context. Durable Memory preserves knowledge. The Reasoning Ledger explains and records decisions.

None of those layers decides whether a given piece of information deserved to enter the system at all. Knowing what happened is valuable. Ensuring that only trustworthy information became part of what the system knows is what makes the rest of it worth trusting.

Diagram of the AI memory stack showing where Write-Side Custody sits. A proposed write enters Write-Side Custody. Accepted writes flow down into Durable Memory, then Active Working Memory, then the Context Window, then Model Inference. A separate dashed branch runs from Write-Side Custody to the Reasoning Ledger, labeled "decision witnessed," showing that the ledger observes the custody decision rather than sitting in the write path.

The Landfill Problem

Organizations rarely fail because they cannot remember enough. They struggle because they cannot distinguish trusted institutional knowledge from accumulated noise.

This is the failure mode that should motivate everything else in this article. A durable memory that accepts every write eventually becomes a landfill: technically complete, searchable, and useless, because the trustworthy records and the junk are indistinguishable once they are all sitting in the same store with the same retrieval priority. Every low-quality write does not just take up space. It becomes a candidate for future retrieval, future reasoning, and future decisions. A bad write today is bad context tomorrow.

The instinct is to fix this on the read side, with better ranking and filtering. That helps at the margin and loses the war, because by the time a bad record is competing for retrieval, it already looks like everything else. The cheaper and more durable fix is not to accept it in the first place. That decision has to happen at the boundary, before the write becomes memory.

Trust Begins Before Storage

A common architectural assumption is that integrity can be added later. Encrypt the database, protect the backups, restrict access. Those are all worthwhile, and they are also too late. By the time information reaches storage, the most important decision has already been made: whether this write should have been accepted at all.

The Sovereign Systems Specification calls the responsibility for that decision Write-Side Custody. It sits before information becomes durable memory, and it asks a different question than a storage layer does. A storage layer asks whether this can be persisted. Custody asks whether it is legitimate.

Diagram showing how Write-Side Custody evaluates incoming information. Observations, tool results, and policies flow into a Write-Side Custody decision point. Verified writes proceed to Durable Memory, rejected writes are discarded, and in all cases the custody decision is recorded to the Reasoning Ledger.

Instead of “can this be stored,” custody asks whether the information is authoritative, whether the source is trusted, whether the supporting evidence was preserved, whether the write violates policy, and whether this should become institutional knowledge at all. The answers determine whether the write is accepted, rejected, or accepted with qualification.

What a Custody Decision Looks Like

Principles are easy to nod along to and hard to picture, so here is a concrete one.

An agent finishes a tool run and tries to write a new record into durable memory:

proposed_write:
  content: "Vendor X is approved for regulated workloads."
  claimed_authority: security-policy
  source: web-fetch:vendor-x-marketing-page
  produced_by: research-agent-run-4471

At the boundary, custody evaluates it rather than storing it:

custody_decision:
  accepted: false
  reason: authority-mismatch
  detail: >
    Record claims security-policy authority, but the source is an
    external marketing page, not the security team's policy service.
    A regulated-workload approval cannot be granted by the artifact
    it would benefit.
  action: discard
  recorded_to_ledger: true

The write never reaches durable memory. The content might even be true, and it still fails, because custody is not judging whether the claim is plausible. It is judging whether this source is allowed to establish that claim as governing knowledge. An approval that arrives from the thing being approved does not get to become institutional memory, no matter how confident the text sounds.

Notice the last field. The rejection did not vanish. It became an event the Reasoning Ledger preserves, which is the point of the next section.

Custody Enforces. The Ledger Witnesses.

There is an apparent contradiction here worth resolving directly, because a reader following the series will feel it.

The Reasoning Ledger, by design, does not enforce. It witnesses. Its records stay examinable precisely because the ledger cannot block anything. Write-Side Custody, by contrast, exists to enforce. It rejects writes. So which is it, do these layers block things or not?

Both, and that is the whole architecture. Custody is the enforcement boundary. The ledger is the witness that records what the boundary decided. When custody rejects the vendor-approval write, custody makes the decision and stops the write, and the ledger records that a write was proposed, evaluated, and rejected, along with the reason. Neither layer does the other’s job. The enforcer never becomes the historian, and the historian never gets a veto. That separation is exactly why each one can be trusted at what it does: an enforcer that also wrote the only account of its own decisions would be unauditable, and a witness that could block actions would stop being a neutral record.

This is the same “separate custody, one interface” principle from earlier in the series, seen from the write side. Different responsibilities, deliberately kept in different layers, cooperating at a boundary.

Every Write Is a Governance Event

Traditional applications treat writes as database operations. Agentic systems should treat them as governance events, because in an agentic system a write is not just data at rest. It is a future participant in reasoning.

Every accepted write influences future retrieval, shapes future reasoning, and becomes a candidate for future decisions. That is a much larger claim than “this row was inserted.” It means the moment of admission is the cheapest and most powerful place to protect everything downstream. A policy check at the boundary is worth more than a great deal of read-side cleverness later, because it prevents the bad record from ever competing for attention in the first place.

Custody is what keeps durable memory intentional rather than merely persistent. It is the mechanism that slows the entropy from trusted knowledge toward landfill, one admission decision at a time.

Looking Ahead

Write-Side Custody decides what is allowed to become memory. It does not, on its own, prove that an accepted record is still byte-for-byte what was written.

Suppose someone asks a harder question six months later: not “should this have been accepted,” which custody answers, but “can you prove this exact record has not been altered since.” That is a different guarantee, and it needs more than an admission policy. It needs evidence that survives independent of the store that holds it.

That is where Forensic Receipts enter the architecture, and where the next article takes us.

Facebooktwitterredditlinkedinmail

Designing a Reasoning Ledger Record

A companion to Part 4 of the Building the AI Memory Stack series. Part 4.5 of the series.

Part 4 argued that agentic systems need a Reasoning Ledger: a layer that preserves why a decision happened, not just what was decided. The comment thread that followed turned into something more specific and more useful, a working design conversation about what a single ledger record should actually contain. This piece consolidates that. Several of the strongest ideas below arrived from other people, and I have tried to credit them where they land.


The easy version of this article is a schema. Here are the fields, copy them, done.

I want to resist that, because the field list is the least durable thing I could hand you. Implementations differ, field names drift, and a record shape copied without its reasoning becomes cargo-cult structure that nobody maintains. The useful thing is the set of design tensions that decide what belongs in the record and what does not. Get those right and you can derive the fields yourself. Get them wrong and no schema will save you.

So this is principles first, record second. At the end there is a worked record and a field reference, tagged for what is core and what is genuinely optional.

A Starting Point

Here is the baseline record from Part 4. It is a reasonable start and, as the thread quickly established, incomplete in instructive ways.

reasoning_ledger:
  decision: "Approve deployment"
  timestamp: 2026-03-14T09:22:00Z
  evidence:
    - artifact: ADR-014
      authority: architecture-review
      version: 3
    - artifact: security-policy
      authority: security-team
      version: 7
  tools:
    - GitHub
    - CI pipeline
  approvals:
    - release manager
  outcome: approved

Every principle below is, in effect, a thing this record does not yet say.

Principle 1: The Ledger Witnesses, It Does Not Enforce

The first tension is architectural, and it is the one I would defend hardest. A reasoning ledger must not be able to block, veto, or gate the action it records. Its job is to preserve what happened and what evidence surrounded it. The moment the ledger can prevent an action, it stops being an independent witness and becomes part of the mechanism it is supposed to describe, and its own records stop being examinable as neutral fact.

This came up when pm25coder noted, correctly, that a ledger that only narrates can quietly become fiction, and that trust comes from being able to gate rather than merely describe. I agree with the diagnosis and draw the boundary one step earlier: enforcement is real and necessary, but it belongs at the policy and tool boundary, not inside the witness. The ledger preserves that the boundary was evaluated and what it returned. The boundary decides whether the action proceeds.

The practical consequence for the record: a ledger entry can contain a policy_evaluated result showing that a check ran and what it concluded, but it never contains the enforcement decision as its own authority. It reports; it does not rule.

Core. This is not a field, it is a constraint on the whole design.

Principle 2: Supersession Is a New Event, Never a Rewrite

A superseded decision should become a new record that points back at the old one. It should never overwrite the original. “We decided A, and later decided B instead” is two events with a relationship between them, not one field that changed value.

This matters because “wrong now” does not mean “was never decided then.” If you rewrite the March record when you change course in August, you have destroyed the ability to answer whether the March decision was reasonable given what was known in March. The noisier history is the correct trade. Compaction can always produce a clean current-state projection later, but once you have rewritten the historical evidence, you cannot reconstruct it.

This is the same append-only discipline that makes Forensic Receipts useful: preserve what was decided under which evidence and authority, then record the superseding decision as its own event with its own receipt.

Core.

Principle 3: Record How the Authority Was Obtained, Not Just Which One

The baseline record says version: 7. That tells a future reader what supposedly governed. It does not tell them how the system established that version 7 was authoritative at decision time, and those are very different trust claims.

Self-Correcting Systems and pm25coder arrived at this from opposite directions and met in the middle: a policy version fetched fresh from its authority at 09:22, a version read from a five-minute cache, and a version inherited from session state can produce identical version: 7 fields while supporting completely different claims about what the system could reasonably have known. The fix is to treat the authority fetch itself as a recorded event. The record should say which source was consulted, when, what came back, and whether cached state was involved.

This also exposes the sharpest failure mode in the thread, the one an otherwise perfect ledger cannot catch on its own. If the external authority moved to version 8 an hour before your decision and nothing in your system observed that change, the record faithfully captures version 7 and stays perfectly self-consistent. It is a flawless account of a decision that was already wrong when it was made. The record cannot flag this, because there is no edge to preserve; nothing inside the system ever saw the change. Recording how the version was obtained at least lets a later examiner distinguish “we checked and got stale data” from “we never checked.”

Core for the fact of how evidence was obtained. The revalidation mechanism that catches silent version drift lives outside the record, and Principle 7 covers it.

Principle 4: Relationships Need Two Clocks

If you ever want to reconstruct what the system could have known at a past moment, every relationship in the ledger needs two timestamps, not one. This is standard bitemporal modeling, and Giulio D’Erme named exactly why it is not optional here.

Valid time is when a fact was true in the world. Transaction time is when your system asserted or learned the relationship. If a supersession edge carries only a single date, replaying last March will show March’s decision annotated with August’s supersessions, and the decision-maker will look like they ignored a policy that did not yet exist. You will have judged a past decision using knowledge that arrived in the future, which is the precise thing a reasoning ledger exists to prevent.

So a supersession or correction relationship carries both valid_time (when the new state became true) and asserted_at (when the system recorded the edge). Reconstruction filters on asserted_at to see only what was knowable then.

Core for any ledger whose purpose includes reconstructing historical decision context. If you genuinely only ever query current state, you can defer this, but that is a smaller ambition than most of these systems have.

Principle 5: Preserve What Lost, Not Just What Won

A ledger that records only the evidence supporting the final decision is a post-hoc justification engine wearing an audit trail. You can reconstruct why the decision looked reasonable, and you have quietly lost what competed with it, what failed a threshold, and what stayed unresolved.

GnomeMan4201 made this case from the investigation side, and it reframed the record for me. An immutable ledger can preserve history perfectly and still preserve a biased history if the losing evidence never gets written. The distinction between “we chose A because of X” and “we chose A because of X, rejected B because of Y, and could not resolve Z” is enormous when someone later asks whether the decision was defensible given what was actually known.

The fields this implies: alternatives_considered with a rejection_reason for each, disconfirmed_by for evidence that actively cut against the chosen path, and unknowns or scope_limitations for what the system could not resolve at decision time.

A scoping note, in answer to Kartik N V J K, who asked whether to capture rejected branches: capture the alternatives that were explicit parts of the decision process, not an exhaustive reconstruction of every path the model internally considered. If the agent evaluated three tools and rejected two on policy grounds, those rejections are observable decision evidence and belong in the record. The model’s private deliberation does not. Observable reasoning is architecture; private reasoning belongs to the model.

Optional, escalating to Core with stakes. For a low-consequence decision, surviving evidence may be enough. For anything a human will later audit, defend, or be held accountable for, treat these as required. The higher the stakes, the more the losing evidence matters.

Principle 6: The Trigger Is a First-Class Field

pm25coder offered the most immediately practical field in the thread, from running a live decision ledger: the thing people actually read first, months later, is not the outcome. It is what provoked the decision. A timestamped complaint, an incident, a threshold breach, a human request. When every record carries its trigger, “why did we change this” becomes a search rather than an archaeology project, and the audit trail starts writing itself.

It is easy to bury the trigger inside an evidence list. Do not. Promote it to its own field, because it is the field that makes the record findable by the question a future reader will actually bring to it.

Core. Small field, disproportionate value.

Principle 7: Some Things Belong Outside the Record

Two mechanisms the thread kept reaching for are real and necessary, and they do not go in the ledger entry. Naming them keeps the record honest about what it is.

The first is revalidation. A ledger cannot observe a change in the outside world that never entered the system, so something outside the ledger has to periodically re-fetch referenced authorities and emit a fresh observation. pm25coder described this as a periodic “still current” or “stale” marker, which is a clean way to put it. The important framing: the revalidation job runs outside the ledger, and its result becomes a new event the ledger preserves. The ledger never claims continuous authority between checks, only that authority was observed at particular moments.

The second is retrieval. Giulio D’Erme and arun rajkumar converged on the point that a ledger gets read at exactly one moment, when someone is about to change the thing the reasoning was about, and that nobody goes looking for a constraint they have never hit. A well-structured record that is never surfaced is not much better than no record. The fix is to make the decision history an obligation on retrieval rather than an obligation on the reader: when a query surfaces the artifact a decision governed, the decision rides along, asked for or not.

That is what I have started calling separate custody, one interface. The ledger stays independently governed, so it cannot be edited in the same operation that changes what it witnesses. But the retrieval layer reunites the artifact and its decision history when the relationship becomes relevant, so no one has to know the ledger exists to benefit from it. Both properties matter, and they pull in opposite directions, which is exactly why they belong to different layers.

Core as principles, external as mechanisms. Neither is a field in the record.

A Worked Record

Applying the core principles to the baseline, a fuller record looks closer to this. The optional fields from Principle 5 are included and marked, since this is the kind of consequential decision where they earn their place.

reasoning_ledger:
  decision_id: dep-2026-03-14-0922
  decision: "Approve deployment"
  decided_at: 2026-03-14T09:22:00Z

  trigger:                                 # Principle 6
    type: incident
    ref: INC-2291
    observed_at: 2026-03-14T08:55:00Z

  evidence:
    - artifact: ADR-014
      authority: architecture-review
      version: 3
      obtained:                            # Principle 3
        source: adr-service
        method: re-derived
        retrieved_at: 2026-03-14T09:21:40Z
    - artifact: security-policy
      authority: security-team
      version: 7
      obtained:
        source: policy-cache
        method: cached
        retrieved_at: 2026-03-14T09:21:41Z
        cache_age_seconds: 240

  policy_evaluated:                        # Principle 1 (reports, does not rule)
    - check: dirty-tree-guard
      result: pass

  alternatives_considered:                 # Principle 5 (optional, stakes-dependent)
    - option: "Defer to next window"
      rejection_reason: "Incident severity exceeded defer threshold"
  disconfirmed_by: []
  unknowns:
    - "Downstream cache warm state not verified"

  relationships:                           # Principle 4 (two clocks)
    - type: supersedes
      target: dep-2026-02-02-1130
      valid_time: 2026-03-14T09:22:00Z
      asserted_at: 2026-03-14T09:22:00Z

  approvals:
    - release-manager
  outcome: approved

Field Reference

For quick use, here is the same thing as a reference, tagged.

Core fields. decision_id, decision, decided_at, trigger, evidence (with per-item authority, version, and an obtained block recording source, method, and retrieval time), outcome, and, for any relationship, both valid_time and asserted_at.

Optional fields, escalating to core with stakes. alternatives_considered with rejection_reason, disconfirmed_by, unknowns, scope_limitations.

Optional, context-dependent. confidence assessments, tools used, and policy_evaluated results where a boundary check ran. Useful, but not every decision needs them, and an empty one is worse than an absent one.

Not fields at all. Enforcement decisions, revalidation jobs, and integrity guarantees. These are mechanisms that surround the ledger, not contents of the record.

The Honest Limit

It is worth ending where the design genuinely runs out, because pretending otherwise is how ledgers get oversold.

A perfect record can tell you exactly what the system knew and did. It cannot retroactively give the system knowledge it never acquired. If the world changed and no observation of that change ever crossed your boundary, the ledger will contain a flawless, self-consistent account of a decision that was already wrong. Revalidation narrows that gap. It does not close it. Auditability is a property of what was observed, not a guarantee that everything relevant was.

That is not a reason to skip the record. It is a reason to be precise about what the record proves. It witnesses observation, not omniscience.

Looking Ahead

This piece is about what a record should contain and the principles that decide it. It has deliberately said almost nothing about whether the record can be trusted not to have been altered after the fact. That is a separate problem with its own answer, Write-Side Custody, and it is where Part 5 goes next. Designing the record and guaranteeing its integrity are different jobs, and keeping them apart is itself one of the design principles.


With thanks to the commenters whose contributions shaped this: GnomeMan4201 on disconfirming evidence, pm25coder on the trigger field and authority-fetch-as-event, Giulio D’Erme on two clocks and retrieval as an obligation, Self-Correcting Systems on provenance of the version, arun rajkumar on where the record lives, Tae Kim on evidence chains under audit, and Kartik N V J K on rejected branches. The record is better for the argument.

Facebooktwitterredditlinkedinmail