We need an accounting system for cognitive debt

mikaelaast1 pts0 comments

We need an accounting system for “cognitive debt”.

That term is gaining ground for a reason [1]. We can now produce code faster than we can understand it. The bottleneck is real, and so is the feeling of being choked by it.

The problem is not new. We have always had the type of code that no one wants to 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 tests are green. The pull request seems reasonable. The diff gives off that vague “probably fine” vibe. But does anyone actually understand what was added?

Congratulations: you have incurred cognitive debt.

Programming is about building knowledge. That used to be easier to verify. 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 models. Those are much harder to observe.

I have previously described this as a kind of “mind palace”: an abstract model of a system where I can wander around, open and close doors, knock down a wall, add a new wing, and feel what connects to what.

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

When the model is missing, everything slows down. Trust disappears. Changes 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 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 answer simple but painful questions: Who understands this code? At what level? Who can verify that understanding?

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

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

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

It should live alongside the code.

Not everyone needs the same mental model. That would be impossible. Different roles need different levels of understanding. An implementer may need to demonstrate low-level operational knowledge, while a team lead may only need a higher-level architectural model. Both can be valid, as long as each is 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 domain expert, a tech lead, a reviewer, a pair-programming session. Anchoring 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 code is added, changed, or removed; when understanding is certified; and when changes invalidate old understanding.

History, signatures, and traceability are the key ideas. The repo should carry 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. But here we are not measuring productivity. We are measuring the surface area of understanding.

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

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

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

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

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

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

code understanding debt cognitive mental model

Related Articles