KognitaKognita.

Blog

CLAUDE.md Team Drift: Why Your AI Grounding Document Goes Wrong

9 min read

A team sets up Claude Code, someone runs /init, a solid CLAUDE.md gets committed, and everyone feels good about it for a few weeks. Then the codebase changes. Then it changes again. Nobody updates CLAUDE.md because nobody was assigned to do it, there is no trigger for it, and it does not break tests when it is wrong. By the time a new developer joins three months later and reads it, several sections are inaccurate, and the file has become a quiet source of AI misinformation rather than AI grounding.

The ownership problem no one solves

CLAUDE.md is documentation, and documentation has a well-known ownership problem: everyone benefits from it being accurate, but nobody is directly incentivized to update it. In practice, the file is created once by whoever set up Claude Code, reviewed once during a PR, and then treated as a permanent fixture:

Typical CLAUDE.md maintenance in a team setting
Who owns CLAUDE.md on a 12-person team?
  Created by:     whoever ran /init first (usually a senior dev)
  Maintained by:  nobody officially
  Updated when:   a new dev notices it's wrong and fixes it
  Review process: same as any other committed file (which means rarely)
  Freshness SLA:  none

This is not a failure of discipline — it is the natural outcome of a document that has no machine-enforced update trigger. Code changes trigger tests. Infrastructure changes trigger alerts. Documentation changes trigger nothing. The same mechanism behind why codebase documentation is always out of date applies identically to CLAUDE.md.

What drift looks like in a real team

The categories of drift that appear in CLAUDE.md are predictable — they track exactly the kinds of changes that happen during normal team velocity:

Common CLAUDE.md drift patterns after 3–6 months
Real CLAUDE.md drift scenarios:
  "Tests are in /tests" → moved to /src/__tests__ in Q3 refactor
  "Use npm run dev" → build system migrated to Bun
  "Auth is in auth.service.ts" → split into auth/, jwt/, session/ modules
  "Database is Postgres" → migrated to MySQL, CLAUDE.md not updated
  "3 microservices" → now 9 services, 6 unmentioned

Each of these looks benign on its own. Together they mean that when a developer uses Claude Code in a session grounded by a drifted CLAUDE.md, every answer the AI gives about project structure, conventions, or toolchain may be partially or entirely wrong — stated with the same confidence as accurate answers.

The new hire impact

The most visible harm from CLAUDE.md drift is concentrated on new hires. They are the most dependent on accurate grounding because they cannot yet distinguish AI advice that matches current reality from advice based on stale documentation:

New developer's first week with a drifted CLAUDE.md
New developer joins, reads CLAUDE.md:
  Day 1: Follows build instructions → fails (wrong command)
  Day 1: Asks senior dev to clarify → "oh that's out of date"
  Day 2: Finds auth module per CLAUDE.md → file doesn't exist
  Day 2: Spends 45 min finding the right location
  Day 3: Wonders why anyone bothered writing CLAUDE.md
  Week 1: Stops trusting CLAUDE.md entirely

The outcome is a new hire who wastes hours following wrong paths, loses trust in the tooling, and may start avoiding AI assistance entirely — the opposite of the productivity gain that justified adopting Claude Code. This is the onboarding failure mode described in detail in why contractor codebase onboarding is still broken.

The multi-repo problem compounds it

Most teams of any size are working across multiple repositories. Each repo has its own CLAUDE.md, and each one has its own maintenance history — which in practice means a patchwork of files at different accuracy levels:

Multi-repo CLAUDE.md state in a typical team
Team with 6 repos, each with CLAUDE.md:
  payments-service/CLAUDE.md:      last updated 4 months ago
  user-service/CLAUDE.md:          last updated 7 months ago
  notifications/CLAUDE.md:         never updated after /init
  api-gateway/CLAUDE.md:           accurate (owner is thorough)
  analytics-pipeline/CLAUDE.md:    refers to deleted service
  infra/CLAUDE.md:                 not committed (gitignored by mistake)

There is no cross-repo consistency, no way to audit whether all the files are current, and no signal when one goes stale. A developer working across services will get accurate context in some repos and wrong context in others, with no indicator of which is which.

Why this is harder to fix than it sounds

The obvious fix is a process: update CLAUDE.md whenever you make a significant change. Teams that try this find two problems. First, the change that makes CLAUDE.md inaccurate is often a detail that feels minor at the time — a directory rename, a refactored service boundary, a migrated toolchain dependency. Nobody is thinking about documentation when they do it. Second, PRs get reviewed for code correctness, not for whether the AI grounding document was updated to match.

You can add CLAUDE.md to your PR checklist. But the failure mode is exactly what the checklist exists to prevent: the thing that nobody remembers until after it matters.

The architecture that solves it

The alternative is not better documentation habits — it is removing documentation from the equation. Kognita indexes your repositories directly from source code, maintaining a semantic representation that updates automatically when the codebase changes. There is no document to curate, no drift to manage, no per-repo freshness audit to run.

When a developer asks about the auth module structure, they get the answer from the current code — not from a file that reflects what the auth module looked like when someone ran /init six months ago. The index is the codebase, updated continuously, shared across the whole team.

Final take

CLAUDE.md is a useful tool for individual developers and small teams that maintain it actively. The moment it becomes a shared artifact that multiple people depend on, it acquires all the failure modes of shared documentation: ownership gaps, silent staleness, and the particular danger of AI presenting outdated information confidently.

The fix is not a process change. Processes work when the failure is visible. Stale documentation fails silently until someone gets burned. The only reliable solution is a grounding mechanism that stays current automatically — which means an index, not a document.