Skip to content
News

Cognitive debt: When a team loses track of how its software works

A team adds a waitlist to a volunteer scheduling app and discovers that its features disagree about who has a confirmed shift. Here's how teams can spot cognitive debt and rebuild their understanding of the software they ship.

Large dark counterweights hang from articulated arms inside a pale stone chamber.

In an entrepreneurship course taught by Margaret Storey, student teams used AI to build products and reach their first milestones quickly. By week eight, one team had hit a wall. Small changes broke things in places nobody expected. The students blamed shortcuts in the code at first, but as they talked it through with Storey, they realized they could no longer explain some of the decisions they had made or how the pieces were supposed to work together.

In her paper on software health in the age of AI, Storey calls this loss of shared understanding cognitive debt. She uses intent debt for a related problem: the goals, constraints and reasons for decisions that the people and agents working on the system ought to be able to find have gone missing or fallen out of date.

It's easy to see how a team could get there. Everyone understands the feature they worked on well enough to show it in a demo. They find out how differently they understand the product when they have to make the next change together.

A waitlist exposes the problem

Imagine a student team building a volunteer scheduling app. One developer uses an agent to build the signup form, another takes the organizer dashboard and a third handles reminders. In the demo, two volunteers sign up for a shift. The organizer approves them both, sees their names on the dashboard and watches the reminder emails arrive.

Then the team adds a waitlist. They test it with a shift that has room for three people. Two volunteers have been approved and a third is waiting to hear back. The dashboard counts all three and shows a full shift. The waitlist uses that count, so it puts the next person in line even though the organizer still has a place to fill. The reminder system, meanwhile, reads the approval state and sees two people to contact.

Every feature has tests. The dashboard tests count signups; the reminder tests start with approved volunteers. It takes a change that depends on both parts of the app to expose the disagreement. When someone asks when a shift actually fills, the students can each explain their feature. They give different answers about what the app should do.

An illuminated walkway bridges two tall stone buildings against a dark sky.

Find out what kind of work is missing

The team has three problems to work on. Each one needs a different response.

Technical debt. Several parts of the code make their own decision about who counts toward capacity. That shortcut makes a capacity change expensive because someone has to find and reconcile all those rules. The team can give the rule one home and update the features that depend on it.

Intent debt. Nobody wrote down when a volunteer gets a place or why the organizer needs to approve them. A developer can read the code and see both interpretations in use. The team still needs to choose the behavior it wants and record the reason somewhere the next person can find.

Cognitive debt. The team has lost the ability to predict how the signup, dashboard and reminders will behave together. A walkthrough can rebuild that understanding. A developer who owns one part of the app should be able to follow a change into the other parts and know who can help when it goes beyond what they know.

The three problems can make one another worse. If everyone is unsure how capacity is calculated, another local fix looks less risky than changing the shared behavior. That fix gives the next developer one more place to look. Even a tidy refactor can make the situation worse if it makes the wrong definition of a full shift consistent everywhere.

Walk through one signup together

Before changing the code, ask two teammates to predict what will happen with one spare place and one pending request. What will the organizer see? Can someone else request the place? Who gets a reminder? Run the scenario in a test environment and compare the result with their predictions. It is much easier to spot where their explanations diverge when they are looking at the same shift.

In our example, the organizer wants to check availability before promising anyone a place. The team decides that an approved signup takes a place and a pending request does not. When the last place is approved, the dashboard should show a full shift. Reminders should go only to approved volunteers. With that decision in hand, the team can write one acceptance test that starts with a request and follows it through approval, the dashboard and the reminder list. The test gives them a way to catch a disagreement that none of the isolated tests could see.

Some teams will find that an old issue already settles the question. A missing record takes more care. An agent can trace the code, find old discussions and point out where they disagree. If the reason for a choice still isn't clear, take the question to the person who owns the behavior. A plausible explanation written after the fact can turn into a new problem if the next agent reads it as an approved decision.

A large instrument stands above a bank of clouds lit by the setting sun.

Make the next change easier to review

The team can record the capacity rule and why it exists in a Swarm Space, with a link to the acceptance test and the pull request that implements it. If the team later adds instant confirmation for some shifts, it can record which shifts follow the new rule and which still need organizer approval. A developer coming back after a few weeks can see what changed and what is still in force.

When someone asks an agent to pick up the waitlist, it can use its existing coding tool and read that decision before planning the change. A second agent can inspect the proposed revision and report whether the test covers the rule, where the evidence is thin and what still needs a human decision. The tests and merge controls stay in the repository. The Space keeps the reasons and review evidence available to the people and agents who work on the next change. Our essay on shared memory for AI agents explains how that record can remain useful outside the chat that produced it.

The check I would run a week later is simple. Ask someone who didn't write the waitlist what should happen if an approved volunteer cancels while two other requests are pending. They should be able to explain what happens to capacity, find the decision that supports their answer and tell you whether the team ever decided who gets the open place. Recognizing that the last question is still open is a sign of understanding, too.

Pick a part of your own product where people hesitate to change the code. There is probably a small scenario everyone thinks they understand. Ask them to predict it, then run it together. What they disagree about will tell you what to fix, what to write down and what the team needs to learn about its own system.

Steam rises from mineral streaks and pale terraces on a broad geothermal slope.
Swarm | What Is Cognitive Debt in AI Coding? A Team Example