We need an accounting system for cognitive debt

theanonymousone1 pts0 comments

WE NEED AN ACCOUNTING SYSTEM FOR COGNITIVE DEBT

The term “cognitive debt” is gaining traction for a reason [1]. We can now<br>produce code faster than we can understand it. The bottleneck is real, and so<br>is the choking sensation.

The problem is not new. We have always had cases of code that no one wants to<br>touch with a ten-foot pole. Agentic coding just makes it much worse.

You probably know the feeling. Everything looks fine. The code compiles. The<br>tests are green. The pull request seems reasonable. The diff gives off that<br>vague “probably fine” vibe. But do you actually understand what was added?

Congratulations: you have incurred cognitive debt.

Programming is about building knowledge. That used to be easier to verify.<br>Until recently, the code itself was evidence of understanding. That era is over.

Now understanding has to be traced to something far more elusive: human mental<br>models. Those are much harder to observe.

I like to describe these as kind of “mind palaces”: abstract models of systems<br>where I can wander around, open and close doors, knock down a wall, add a new<br>wing, and feel what connects to what.

That mental model is what lets me change code with confidence. It is what lets<br>me sense that something is wrong before I can prove it.

When the model is missing, everything slows down. Trust disappears. Changes<br>become painful. Fear spreads. You become a tourist in your own codebase.

Here is an uncomfortable question: how much of your codebase is backed by<br>living human mental models?

The burden of proof is on you, you trigger-happy, agent-pilled developer.

I think we need an accounting system for cognitive debt. A system that can<br>answer simple but painful questions: Who understands this code? At what level?<br>Who can verify that understanding?

This ledger should be reconciled continuously. Everything is cognitive debt<br>until proven otherwise. The clock is ticking.

I imagine microcertification: small certificates tied to concrete parts of the<br>codebase. A file, folder, module, or subsystem.

The certificate says: “MikaeI has demonstrated understanding of this area, at<br>this level, verified by this authority.”

It should live alongside the code.

Not everyone needs the same mental model. That would be impossible. Different<br>roles need different levels of understanding. An implementer may need to<br>demonstrate low-level operational knowledge, while a team lead may only need a<br>higher-level architectural model. Both can be valid, as long as each is<br>explicit and verified on its own terms.

The hard part is verification. How do you create proof of understanding?

Verification has to be AI-resistant and grounded in something we trust: a<br>domain expert, a tech lead, a reviewer, a pair-programming session. Anchoring<br>it in the physical world is crucial.

Think of it as code review for your mental model.

Now imagine an append-only ledger that follows the codebase. It records when<br>code is added, changed, or removed; when understanding is certified; and when<br>changes invalidate old understanding.

History, signatures, and traceability are the key ideas. The repo should carry<br>its own comprehension state with it.

An IOU.

What should the debt be measured in? I think lines of code.

Before anyone objects: yes, LOC is a terrible measure of productivity. I know.<br>But here we are not measuring productivity. We are measuring the surface area<br>of understanding.

If an agent produces 2,000 lines of code, we have not merely gained 2,000 lines<br>of functionality. We have also gained 2,000 lines that someone must understand,<br>own, debug, and maintain.

The incentives balance out. More lines mean more debt, so the agent should not<br>generate arbitrary amounts of code. But if you force it into cryptic code golf<br>just to keep the number down, human understanding becomes more expensive to<br>build.

I worry that we are neglecting our mental models, then pretending everything is<br>fine.

Agentic coding creates cognitive obligations. We need new processes to meet<br>them.

Every line of code should be recorded as cognitive debt until it is certified<br>as part of a living human mental model. Yes, that is radical. But then again,<br>we are living in absolutely bananas times.

—Mikael Åsbjørnsson-Stensland

[1] https://margaretstorey.com/blog/2026/02/09/cognitive-debt/

code debt understanding cognitive mental model

Related Articles