Cognitive debt

Cognitive debt is the hidden cost of code whose intent, constraints, and behavior are hard to recover when a human or coding agent needs to change it later.

What it means

Cognitive debt appears when code makes the next person or agent reconstruct why it exists, which constraints matter, and which behavior must not change.

Why it matters for AI-written code

AI can produce working code without leaving enough durable intent behind. When the next agent edits that area, it may optimize for the visible shape and miss the hidden reason the code was written that way.

Guard and Fleet context

Guard connects cognitive debt to the green-zone model. A project cannot stay healthy if every new feature starts by guessing what older code meant.

How Enji Guard helps

Guard finds recoverability gaps, points reviewers to the evidence, and prepares focused improvements where clearer structure or agent documentation can reduce future mistakes.