Cognitive Debt and the Refactoring Step You Skip

Workbench with notebook in focus, finished machine in shadow

Martin Fowler published some fragments from an open space gathering on AI and software development, and one phrase has been rattling around in my head all day: "cognitive debt."

The idea is straightforward. When you build software, you learn the domain. You learn the system. That learning is valuable, maybe more valuable than the code itself. But when you hand chunks of work to an LLM, you skip the learning. The code appears and you move on. Fowler's group compared it to the refactoring step in TDD, the one everyone already skips. Refactoring is where you consolidate understanding and embed it into the codebase. Without it, you get working code that nobody actually understands. Sound familiar?

I've been living this tension all week on Distill. The project is at 1,700+ tests, a multi-pipeline content system with parsers, synthesizers, publishers, a web dashboard. Today was a light coding day. A few brief sessions, mostly architectural review and researcher tasks, none longer than a minute. The kind of day where you stare at the shape of the thing rather than adding to it.

And honestly, those days matter more than the ones where I ship 500 lines. The staring is where you pay down the debt.

Figure at fourth door in corridor of colored thresholds

Wiring Up Postiz and the OAuth Dance

Most of my screen time today went to connecting social platforms through Postiz, the self-hosted social media scheduler I picked over Crosspost and Bulkit. The integration itself is clean on Distill's side. src/blog/publishers/postiz.py calls out to the API, pushes draft posts, and lets me review them in the Postiz UI before they go live. But actually authorizing the social accounts? LinkedIn's OAuth flow sent me through six redirects. Reddit wanted me to file a support ticket just to get API access. X (still can't call it that naturally) required re-authenticating through their developer portal. None of this is Postiz's fault. Every platform has made their auth flow just annoying enough to discourage exactly what I'm trying to do.

There's something philosophically interesting about building a tool that synthesizes your own thoughts across platforms, and then each platform individually making it as hard as possible to post to them programmatically. They want your content. They just want you to type it into their little box by hand.

That friction got me thinking about control surfaces and coordination, which led me straight into Denis Petelin's essay on multi-agent systems.

Multiple hands collaborating on shared chalkboard

The Blackboard Pattern, or: Agents Need a Whiteboard

Denis Petelin wrote a Medium piece about multi-agent systems using MCPs and the blackboard pattern. His opening line is blunt: "Models are dumb." He's right, but in a specific way. Models lack persistent memory of their actions. They can't introspect their environment. Each response starts fresh with different assumptions.

The blackboard pattern gives agents a shared scratchpad. Instead of passing messages in a chain (agent A tells agent B tells agent C), every agent reads from and writes to a common knowledge surface. A control component decides who acts when. It's old AI research, predated neural networks by decades, and it turns out to be exactly what you need when you have four Claude instances trying to coordinate on a codebase.

I know this because I've been running agent swarms on Distill itself. My memory notes say "the wiring task takes longest due to complex core.py edits," which is a polite way of saying the agents kept stepping on each other until we gave them a shared task list and explicit ownership. That's a blackboard. We just didn't call it one.

Fowler's cognitive debt idea connects here too. When a swarm of agents builds your system, who holds the understanding? The blackboard is a record of decisions, but it's not comprehension. You can read a transcript of what the agents decided without actually learning why. The refactoring step, the consolidation step, has to come from the human. You have to read the code the agents wrote and make it yours. Otherwise you're accumulating debt on a loan you didn't even know you took out.

Which brings me back to Fowler's most unsettling observation.

Conductor with closed eyes, orchestra blurred behind

The Skeptic's Skepticism

Fowler said something I keep coming back to: "I am a total, absolute skeptic, which means I also have to be skeptical of my own skepticism." I use LLMs to build a tool that processes LLM sessions into publishable content, which then gets posted by an LLM-integrated scheduler. At some point you have to ask whether you understand your own system or whether you're just conducting an orchestra you can't hear.

Today I could hear it. Tomorrow, with a heavier build day, maybe not. That's worth paying attention to. The refactoring step in TDD forces you to listen. So do the slow days, the ones where you review instead of ship. That's when you find out whether you're building understanding or just stacking up code that happens to work.