Documentation drift is the gap that opens when code changes and the docs that describe it do not. The README still says one install path, the architecture page still shows a service you deleted, and nobody trusts the wiki enough to update it. Here is how drift happens, how to spot it, and what actually keeps docs true.
Definition: Documentation drift occurs when a codebase's architecture and implementation details change while its repository documentation remains static, leaving READMEs, architecture pages, and onboarding guides describing a system that no longer exists. It is the slow divergence between what the code actually does and what the docs claim it does, and it is why teams stop trusting their own wikis.
Last reviewed: September 2026
Catch documentation drift on your pull requests
Moxie connects to your GitHub repo and flags stale docs on every PR. Free on 1 repo.
Documentation drift is the state where written documentation no longer accurately describes the system it claims to document. The code is the living system; the docs are a snapshot that aged poorly.
Drift is not the same as missing docs. Missing docs were never written. Drifted docs were written once - often carefully - and then the product moved on without them. Both waste onboarding time; drift is worse because the page still looks authoritative.
Documentation drift vs missing docs
Teams often treat every bad wiki page as “we need more docs.” That mixes two problems and produces the wrong fix.
Missing documentation is a coverage gap: no page exists for auth, billing, or the public API. The remedy is to write the first version, preferably next to the code.
Documentation drift - also called docs drift or stale documentation - is a truth gap. The page exists, people still send it to new hires, and it describes last quarter’s system. The remedy is detection plus a cheap way to correct the page, not another blank template.
How to fix stale documentation
A doc day that rewrites the wiki by hand does not hold. The page is stale again the next time a service is renamed. Fixing stale docs is a loop, not a project:
Find the lie: Compare the page to the current repository. Path-level mismatches (this module was rewritten; the page was not) beat a vague “this might be outdated” label.
Correct it next to the code: Ship the fix as Markdown in the same repo, in a docs-only pull request, so review looks like every other change.
Catch the next one on merge: Re-check affected pages when code lands. If detection waits for a quarterly audit, stale documentation is the default state.
A real example: a blog publishing guide outlives its implementation
Moxie Docs' own blog shows how a small implementation change can invalidate a useful guide. Markdown files remain in the repository for authoring, but published article pages load their content from a database. Older instructions still described committing a Markdown file as sufficient to publish it.
The runtime evidence is the article lookup. This excerpt is simplified to show the relevant behavior:
The finding is specific: editing an authoring file does not update the database row that the live page reads. The corresponding documentation correction is small:
DIFF
1234
- Merge the Markdown file to publish the post on the site.+ Markdown files are authoring inputs, not the live catalog.+ Publish the reviewed article through the admin CMS or an explicit import.+ Verify the live article after publication.
The review connects three pieces of evidence: the runtime read path, the incorrect publishing instruction, and the corrected guide. Keeping that evidence in the documentation PR lets the reviewer verify the fix without reconstructing the whole migration.
A documentation checklist you can put in a pull request
Copy this into your PR template and replace the examples with the docs your team actually maintains. A checked box records a review; it does not prove that the documentation is correct.
MARKDOWN
12345678
## Documentation impact- [ ] I checked setup steps, commands, defaults, and API behavior affected by this change.
- [ ] I named the documentation pages that describe the changed behavior.
- [ ] I updated those pages, or explained why their current wording remains correct.
- [ ] I tried the documented command or example where practical.
- [ ] I checked agent instructions and diagrams for the same outdated assumption.
Evidence: [source path or diff] -> [documentation path and section]
A path-based CI check can remind reviewers when code changed without docs. It cannot tell whether a changed paragraph is true or whether a behavior change needs no documentation. For checks tied to repository evidence and reviewable updates, see Moxie Docs documentation drift detection and PR documentation checks.
Why documentation drifts
Drift is structural, not a moral failing of the team. Code and docs usually live in different places, ship on different cadences, and get different rewards. Merging a feature is visible. Updating the wiki is optional and rarely reviewed.
Common causes stack on top of each other:
Separate homes: Source lives in Git; docs live in a wiki, Notion, or Confluence. Nothing forces them to change together.
Partial updates: A PR renames a service or changes auth, but the architecture diagram and onboarding guide stay as they were.
AI-accelerated shipping: Agents and copilots increase how much code lands per week. Human doc maintenance does not scale at the same rate.
Loss of trust: Once people get burned by a wrong page, they stop reading docs - and stop fixing them.
Signs your docs have drifted
You do not need a full audit to know drift is present. These signals show up early:
Onboarding fails the script: New hires cannot follow the setup guide without Slack help, even when the guide was written last quarter.
Agents follow bad patterns: Coding agents copy obsolete conventions from README or AGENTS.md because those files still describe the old world.
Diagrams and code disagree: Sequence charts, ER diagrams, or service maps show components that no longer exist in the repo.
Tribal workarounds: The real process is "ask someone who knows" rather than "read the docs."
How teams try to fight drift
Most teams start with process: doc checklists on PRs, quarterly doc days, or a wiki owner. Those help for a while, then lose to delivery pressure.
Stronger approaches couple docs to the source of truth:
Docs as code: Store Markdown next to the repository so changes can ship in the same PR.
Drift detection: Something compares recent code changes to the docs that mention those paths and flags mismatches.
Low-friction fixes: Corrections arrive as reviewable docs-only pull requests instead of a backlog ticket nobody prioritizes.
Living documentation: Treat docs as an ongoing product of the codebase, not a one-time artifact. See our guide on living documentation.
What to detect (and when)
Useful detection is specific. "Docs might be outdated" is noise. Better signals look like:
Path-level drift: A page documents module X; module X was substantially rewritten this week.
Convention drift: Documented style or command rules no longer match what the repo actually uses.
Coverage gaps: Important surfaces (auth, billing, public APIs) have no doc page at all - adjacent to drift, but often discovered by the same system.
At a glance
Drift, missing docs, and living documentation
Use this to pick the next action. Most teams have all three; they need different fixes.
What it is
Documentation drift
A page exists but no longer matches the code
Missing docs
No page was ever written
Living documentation
Docs stay coupled to the code and update with it
How it shows up
Documentation drift
Onboarding fails a guide that looked current
Missing docs
New hires ask Slack for a topic with no home
Living documentation
The page a reviewer reads still describes what shipped
Wrong fix
Documentation drift
Another blank template or a quarterly rewrite
Missing docs
A wiki garden no one owns
Living documentation
Treating it as a one-time generator run
Useful fix
Documentation drift
Detect the stale page on merge and open a docs-only PR
Missing docs
Write the first cited page next to the code
Living documentation
Keep detection and reviewable fixes on every merge
Documentation drift
Missing docs
Living documentation
What it is
A page exists but no longer matches the code
No page was ever written
Docs stay coupled to the code and update with it
How it shows up
Onboarding fails a guide that looked current
New hires ask Slack for a topic with no home
The page a reviewer reads still describes what shipped
Wrong fix
Another blank template or a quarterly rewrite
A wiki garden no one owns
Treating it as a one-time generator run
Useful fix
Detect the stale page on merge and open a docs-only PR
Write the first cited page next to the code
Keep detection and reviewable fixes on every merge
How-to
How to check and reduce documentation drift
1
Put critical docs in the repo
Start with README, architecture notes, AGENTS.md, and onboarding steps that must stay true. Wiki-only pages for those topics are the first to rot.
2
Embed a CI/CD drift-checking script in your pipeline
Run a simple Git diff check in CI to catch undocumented API or architecture changes:
#!/bin/bash CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD) for FILE in $CHANGED_FILES; do if [[ "$FILE" == src/api/* ]] && ! echo "$CHANGED_FILES" | grep -q "docs/api.md"; then echo "Warning: $FILE changed without corresponding doc updates." fi done
3
Require docs impact in the PR template
Ask whether this change affects public behavior, setup, or architecture - and link the page that should update. Process alone is incomplete, but it catches conscious omissions.
4
Detect drift on merge
Use tooling that re-reads the repository when code lands and flags pages that no longer match source - ideally before the wrong instructions train a new hire or an agent.
5
Ship fixes as reviewable docs PRs
Prefer small, docs-only pull requests your team can approve in normal review, not silent overwrites and not a quarterly rewrite project.
How Moxie Docs approaches drift
Moxie Docs indexes your GitHub repository, generates source-cited documentation, and re-checks it as code changes. When docs fall behind, it surfaces gaps and opens reviewable docs-only Cleanup PRs - then serves the current index to coding agents over MCP so stale pages do not become stale agent behavior.
Connect a repository and Moxie Docs checks every pull request for doc gaps, keeping your architecture and conventions perpetually in sync. Free on one repository, no card required.