DEV Community

Cover image for The Reasoning Ledger: Remembering Decisions, Not Just Data
Ken W Alger
Ken W Alger

Posted on Originally published at kenwalger.com

The Reasoning Ledger: Remembering Decisions, Not Just Data

Git analogy clarifies agent memory gaps

Part 4 of the Building the AI Memory Stack series

After finishing the previous article, I looked at the repository a little differently. The specifications were still there. The Architecture Decision Records were still there. The glossary entries were still there. The project's durable memory had done exactly what it was supposed to do: preserve the knowledge that deserved to survive.

But something was missing. I could see what existed, but I couldn't always see why it existed.

Memory tells you what. Reasoning tells you why.

That distinction turns out to matter.

Durable Memory Isn't the Whole Story

In the previous article, I argued that Durable Memory decides what knowledge deserves to outlive the task that created it.

That remains true. But imagine opening an Architecture Decision Record six months later and asking:

Why was this decision made?

The document gives you the conclusion, but it may not give you the path that produced it. Perhaps the decision came from competing specifications, several tool invocations, human review, rejected alternatives, or a policy constraint that no longer exists.

The final artifact survives. The reasoning process often does not.

Another Layer in the Stack

Diagram of the AI Memory Stack highlighting the Reasoning Ledger as the layer that preserves why decisions happened. Information flows from the Reasoning Ledger to Durable Memory, Active Working Memory, the Context Window, and finally Model Inference.

Layer Primary Question Preserves
Reasoning Ledger Why did this happen? Decisions
Durable Memory What should survive? Knowledge
Active Working Memory What matters now? Working set
Context Window What can the model see? Current tokens

Software Already Solved Part of This

Git repositories preserve more than source code. They preserve commit history, pull requests, code reviews, issues, and discussion. Together they explain how software evolved.

Imagine if Git only stored the latest version of every file. The software would still exist, but understanding it would become dramatically harder.

Git doesn't exist because developers forget what their code looks like. It exists because developers eventually ask:

Why did we change this?

Agentic systems deserve the same architectural capability.

The Missing Layer

Most AI systems optimize retrieval, but far fewer preserve the observable decision process surrounding an inference. If someone asks months later:

Why did the system recommend this?

can we answer?

If the only answer is "because the model said so," then the system hasn't preserved enough information to be trustworthy. We've preserved knowledge but lost understanding.

The Reasoning Ledger

The Sovereign Systems Specification calls this architectural layer the Reasoning Ledger.

It deliberately avoids recording private chain-of-thought.

It records the observable architecture surrounding a decision.

A ledger may capture:

  • Evidence consulted
  • Tool invocations
  • Policy evaluations
  • Human approvals
  • Timestamps
  • Confidence assessments
  • References to durable artifacts
  • Links to Forensic Receipts

In practice, a single record might look like this:

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

Notice that the ledger does not merely record that a security policy was consulted. It can preserve which policy, which version, and which authority governed the decision at that moment. That distinction matters because evidence can remain perfectly retrievable long after the world that made it authoritative has changed.

The Reasoning Ledger is therefore a historical record, not a promise of continuing authority. It tells us what governed the decision then. Determining whether the same evidence still governs a future decision belongs elsewhere in the architecture.

The goal is not to reconstruct what happened inside the model. It is to preserve the externally observable evidence, authorities, policies, tools, approvals, and outcomes that allow someone to examine the decision later.

Observable reasoning is architecture. Private reasoning belongs to the model.

Memory Preserves Knowledge. Reasoning Preserves Decisions.

Memory is fundamentally a write problem, while reasoning is fundamentally an accountability problem. Memory preserves knowledge. Reasoning preserves decisions.

Both are required for trustworthy AI systems.

Looking Ahead

A Reasoning Ledger explains the observable path that produced a decision.

But how do we know those records themselves have not been altered?

That is where Write-Side Custody begins, and where Part 5 will take us.

Top comments (64)

Collapse
 
publiflow profile image
PubliFlow •

Good coverage of ML patterns. I'd stress that monitoring data drift and model staleness is as important as the initial training — a model that was accurate at launch can silently degrade without proper observability.

Collapse
 
xiaoxiao2026 profile image
xiaoxiao2026 •

“Remembering decisions, not just data” is a really interesting idea. Storing knowledge alone isn't enough. Knowing why a decision made sense at the time could be much more valuable for future maintenance and troubleshooting.

Collapse
 
publiflow profile image
PubliFlow •

Interesting ML content! We built a suite of AI tools at tools.shopveigo.com — essay polisher, copywriter, interview coach, image processing. The inference cost optimization you mentioned is something we deal with daily. Happy to compare notes.

Collapse
 
alexshev profile image
Alex Shev •

The post makes a useful distinction between a feature working once and a system being dependable. I’d add an explicit failure-mode checklist so the next contributor can see which assumptions are intentional and which ones still need evidence.

Collapse
 
mnemehq profile image
Theo Valmis •

The distinction between what and why is the right layer to add, and it's worth pushing one step further: a Reasoning Ledger that only gets read by a human six months later is an archive. The version that actually earns its keep is one an agent has to check before it makes the next decision, so the why from six months ago can veto a locally reasonable choice today. That's the layer we're building at Mneme, less a ledger you consult and more a constraint you can't generate past.

Collapse
 
wrobeltomasz profile image
Tomasz •

That's a cool idea—I'd never thought of that before. After all, Git is supposed to contain everything, but it turns out it doesn't. I think this can be easily realized with Python and SQL. It's a good tool for companies that want to monitor the performance of AI models.

Collapse
 
codingwithjiro profile image
Elmar Chavez •

Really interesting read. If this would be automated, this is like a goldmine for looking back on as to "why" this part of the code was built in the first place.

Collapse
 
p0rt profile image
Sergei Parfenov •

observable reasoning is architecture, private reasoning belongs to the model: sharpest line in the series, cleaner than my july framing of "provenance is a capability u hold, not a field u write". stealing pm25coder's "same entry shape, different trust" (credited).

one gap the thread hasn't touched: who holds the pen per field. retrieval_method: fresh is either minted by the tool boundary that ran the fetch, or it's the agent describing what it thinks it did. same yaml, two epistemic statuses, and the schema can't tell them apart. imo each field carries an author type: runtime-minted (tool calls, retrieval events, approvals, timestamps) vs agent-reported (decision, alternatives, unknowns, confidence), and unmarked defaults to agent-reported, so untrusted. compaction is the third author nobody types.

so for write-side custody: does the agent get to write retrieval_method at all, or is it minted at the tool boundary? if the agent holds that pen, custody protects a claim, not a fact.

Collapse
 
kenwalger profile image
Ken W Alger •

I think “who holds the pen per field” is the right way to sharpen this. There’s a meaningful difference between the agent reporting that it used fresh evidence and the runtime that actually performed the fetch attesting that the evidence was fresh.

So I’d separate reported claims from witnessed events. The agent can own things like the decision, alternatives considered, unknowns, and confidence. The runtime/tool boundary should own claims it can independently establish: retrieval events, tool execution, returned policy versions, approvals, timestamps, etc.

And agreed that entry-level provenance isn’t quite enough once those coexist in the same record. retrieval_method: fresh has a different epistemic status depending on whether it was minted by the boundary that performed the retrieval or merely reported by the agent afterward. Same YAML, very different evidence.

I also like the compaction observation. A projection or summary is effectively making a new claim about the underlying record, so its authorship/provenance matters too. It shouldn’t quietly inherit the epistemic status of the evidence it summarizes.

Which brings me back to your last line: custody can preserve an agent’s claim perfectly without turning that claim into a witnessed fact. Knowing who was allowed to hold the pen is part of knowing what the record actually proves.

Collapse
 
p0rt profile image
Sergei Parfenov •

reported claims vs witnessed events is the schema boundary i was missing. i’d attach issuer and evidence class per field, then treat every summary as a new derived record with its own provenance rather than a transparent view. custody preserves the claim; it never upgrades who observed it.

Thread Thread
 
kenwalger profile image
Ken W Alger •

Yes, I think that's the right conceptual model. For me, the important part is that provenance has enough resolution to tell us who or what was entitled to make each claim and what evidence supports it. Whether an implementation literally stores issuer/evidence class beside every field or groups fields that share the same provenance is probably a representation choice.

And agreed on summaries. Once a system transforms several witnessed and reported fields into a new statement, that statement has its own authorship and evidentiary status. It can reference the records it summarizes, but it doesn't inherit their authority merely because it was derived from them.

“Custody preserves the claim; it never upgrades who observed it” is a very clean invariant. I think that survives beyond the ledger too.

Thread Thread
 
p0rt profile image
Sergei Parfenov •

Agreed on the representation choice. The invariant is that every derived claim remains traceable to its sources without inheriting an observation status it never earned.

Collapse
 
gnomeman4201 profile image
GnomeMan4201 •

One thing I’d be tempted to make first class here is disconfirming evidence / rejected alternatives, not just the evidence that survived into the decision.

I’ve run into this from the investigation side: if the ledger only preserves what supported the final conclusion, you can reconstruct why it looked reasonable, but lose what competed with it, what failed a threshold, or what remained unresolved.

Something like alternatives_considered, disconfirmed_by, and maybe unknowns/scope_limitations would make the historical record harder to turn into a post hoc justification of whatever eventually won.

An immutable ledger can preserve history perfectly and still preserve a biased history if the losing evidence disappears before the write

Collapse
 
kenwalger profile image
Ken W Alger •

This is a really good distinction. Immutability protects the record after the write, but it says nothing about whether the write captured a representative account of what was available at the time of the decision.

I especially like making rejected alternatives and disconfirming evidence first-class rather than burying them in an evidence list. Otherwise, the ledger can become a very trustworthy record of a selectively remembered decision.

unknowns and scope_limitations belong in that same category for me. "We chose A because of X" is a different historical claim from "we chose A because of X, rejected B because of Y, and could not resolve Z." The second is much more useful when someone later asks whether the decision was reasonable given what was actually known.

Collapse
 
gnomeman4201 profile image
GnomeMan4201 •

Agree with the split. I’d add that the two halves aren’t equally tractable.

The read side failure is comparatively testable. Give the store a question, inspect what comes back first, and check whether retrieval respected supersession, validity, and which record actually won. You can red-team that and keep regressions for it.

The write side problem is nastier because anything omitted never crossed the ledger boundary in the first place. An empty alternatives field can mean “nothing challenged this,” “nothing was looked for,” or “something challenged it and never made the write.” From the record alone, those can look identical.

So the negative space probably has to become evidence too: no alternatives found, not evaluated, freshness check not required, with enough provenance that someone can later challenge the assertion itself. That still doesn’t make no alternatives found true it just turns an invisible omission into an attributable, falsifiable claim.

What’s interesting is that this same shape keeps appearing elsewhere in the thread: the skipped freshness check, the missing alternative, the compacted coverage window. Different mechanisms, same failure mode silence gets interpreted as confirmation.

And that may be the bigger risk with a reasoning ledger: not just faithfully remembering the wrong thing, but letting strong integrity guarantees on the container get mistaken for guarantees about the completeness or truth of what made it inside.

Thread Thread
 
brainbootdev profile image
brainbootdev •

There is a fourth mechanism with that same shape, and it sits upstream of the write: the collector was pointed somewhere that no longer existed. A scanner of ours had a hardcoded root that had been moved months earlier, so every run completed successfully, found nothing, and recorded a clean empty result. Nothing failed, so nothing was ever flagged.

Which is why "no alternatives found" probably has to carry where it looked, not just that it looked. A well formed empty answer from a broken instrument is byte for byte identical to a true negative, and it is the one that arrives with a green check next to it.

Thread Thread
 
kenwalger profile image
Ken W Alger •

I think "negative space has to become evidence too" is the right extension, especially because it separates nothing was found from nothing was looked for. Those are radically different claims that collapse into the same empty field otherwise.

I'd probably model that as an explicit observation rather than trying to infer meaning from absence: alternatives_evaluated: true, result: none_found, plus enough provenance to say what was searched and under what scope. That still doesn't prove there were no alternatives. It proves the system performed a particular search and observed none within that boundary.

And your last point is the important limit: integrity of the ledger proves integrity of what crossed the boundary. It cannot prove completeness of what should have crossed it, much less truth about the external world.

That's increasingly the distinction I want the architecture to preserve: "nothing was observed" is a claim; an empty record is just silence.

Thread Thread
 
gnomeman4201 profile image
GnomeMan4201 •

A negative observation requires not merely evidence that a search occurred, but evidence that the search completed to a declared adequacy threshold within a defined scope and observation interval

Collapse
 
gde03 profile image
Giulio D'Erme •

Agreed, and I would add what it costs on the read side, since that is the part I
found out late.

The retracted claim is usually the nearer semantic match to the question that
provoked it. It was written to answer exactly that question. Its correction tends
to be written as commentary on the claim, hedged and qualified, and sits further
from the question's wording. So a ledger that faithfully keeps both and then ranks
by similarity hands back the losing evidence, confidently, as the best match.

That is not a tuning problem. A ranker with no notion of validity has no way to
prefer the correction, however good the embeddings are. Completeness of the write
does not survive on its own: each hit has to carry a verdict at read time saying
what it is, superseded by what, and whether it is inside its validity window.

Which makes your point a slightly stronger one than stated. Deleting the losing
evidence gives you a biased history. Keeping it without a verdict gives you a
biased history that also retrieves better than the truth.

Collapse
 
kenwalger profile image
Ken W Alger •

This is a really important extension of the argument. The retracted record being the better semantic match is exactly the sort of failure that can look like successful retrieval by every conventional metric. The ranker found the record most closely matching the question. It just had no way to know that the record had lost.

I think your "verdict at read time" framing is the key. Preserving correction, supersession, and validity at write time isn't enough if retrieval flattens those relationships back into independent hits. The relationship has to survive the retrieval boundary too.

That actually became one of the central arguments in a follow-up I published after some of these discussions: Your Memory API Is Lying to Your Agent. A ranked list can faithfully return both records while discarding the fact that one superseded the other. At that point, relevance quietly becomes authority.

And "keeping it without a verdict gives you a biased history that also retrieves better than the truth" is a wonderfully uncomfortable way of putting the problem.

Collapse
 
buildbasekit profile image
BuildBaseKit •

The Git analogy is what clicked for me.

We usually preserve the final code, but the reason behind a change is often buried in someone's memory, an old PR, or completely lost.

For AI agents, that gap could become even bigger. A decision ledger that preserves the evidence and constraints around a decision feels much more useful than trying to make the model “remember” everything.

Collapse
 
kenwalger profile image
Ken W Alger •

That's exactly why the Git analogy kept working for me too. We don't expect Git to remember what a developer was thinking. We preserve enough observable history around the change that someone can reconstruct why it happened later.

I think agentic systems need the same distinction. "Remember everything" isn't really the goal. Preserve the durable knowledge, then preserve enough evidence, constraints, and decision history to make consequential changes examinable later.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.