Context drift is the slow divergence between what your team wrote down about a part of the codebase and what that code actually does today. A decision gets recorded, an invariant gets documented, a gotcha gets noted — and then the code moves on without the note moving with it. Months later an engineer or an AI agent reads the stale note, trusts it, and breaks something the note no longer describes.
Drift is the core failure mode of every wiki, README, and architecture doc: they are written once and trusted forever, with no mechanism to notice when the ground beneath them shifts. The longer a note survives untouched while its code churns, the less of it is still true — and the more dangerous it is, because confidence in documentation doesn't decay as fast as its accuracy does.
The fix is to anchor context to the code it describes and re-check it when that code changes, rather than treating documentation as a separate artifact that ages independently. When the anchored files change, the note is flagged for a fresh look and routed back to a human — so the knowledge is kept honest against the system that actually exists, not the one that existed when someone last wrote it down.