Skip to main content
Moxie Docs
All guides

Documentation quality

What is documentation debt?

Every shortcut a team takes with its docs - the page nobody wrote, the README nobody updated, the wiki nobody owns - is a small loan. Documentation debt is the balance. Here is where it comes from, how to put a number on it, and how to pay it down without a doc day that is undone a month later.

Definition: Documentation debt is the accumulated gap between the documentation a codebase needs and the documentation it actually has: pages that were never written, pages that have drifted out of date, and pages that are wrong, duplicated, or unowned. Like technical debt, it charges interest - every new hire, support ticket, and AI coding agent that relies on missing or stale docs pays it in time and mistakes.

Last reviewed: November 2026

Catch documentation drift on your pull requests

Moxie Docs connects to your GitHub repo and flags stale docs on every PR. Free on 1 repo.

Connect 1 repo free

The short answer

Documentation debt is the work you would have to do today to make your docs complete and true. It is the documentation version of technical debt: decisions that saved time when they were made and cost more every month they stay unpaid.

It has three parts. Missing docs were never written. Drifted docs were true once and fell behind the code. Broken docs are wrong in other ways - dead links, examples that no longer run, two pages that contradict each other, or a page with no owner that nobody dares to delete.

Documentation debt vs documentation drift

The two terms are related but not interchangeable. Documentation drift is a process: code changes and the page that describes it does not. Documentation debt is the balance that process leaves behind, plus everything that was never documented in the first place.

Drift is usually the largest and fastest-growing source of debt, because it adds to the balance with every merge. That is why paying debt down without stopping drift does not hold: the cleanup is real, but the next quarter of merges rebuilds the same backlog.

What causes documentation debt

Most of it comes from a few ordinary habits that stack up:

  • Shipping without docs: A feature merges with a ticket to document it later. Later rarely comes, and the knowledge stays in the author's head or a Slack thread.
  • Docs that live away from code: Pages in a wiki, Notion, or Confluence do not show up in code review, so nothing prompts an update when the code changes.
  • No owner: A page everyone can edit is a page no one maintains. Unowned pages are the first to rot and the last to be deleted.
  • Faster shipping: AI-assisted coding increases how much code lands per week. Documentation maintained by hand does not keep up, so the gap widens faster than before.
  • Fear of deleting: Outdated pages stay up because someone might need them. Each one makes search worse and the good pages harder to find.

How to measure documentation debt

You cannot pay down a balance you have never counted. No single number captures documentation debt, but a handful of signals, tracked over time, show whether it is growing or shrinking:

  • Stale pages: Pages whose source code changed after the page was last edited. Comparing a page's last commit date to the last commit on the paths it describes gives a concrete, repeatable count.
  • Coverage gaps: Public APIs, services, packages, and setup steps with no page at all. List the surfaces that matter, then count how many have current documentation.
  • Broken links and examples: Dead internal links, code samples that no longer compile, and commands that fail when you run them. A link checker and a CI job that runs the documented commands catch most of these.
  • Questions the docs should answer: Support tickets, Slack questions, and code review comments that a page could have answered. Tag them for a few weeks and the most expensive gaps show up quickly.
  • Onboarding time: How long a new engineer takes to get a local environment running and land a first change, and how often they need help to follow the setup guide.
  • Unowned pages: Pages with no named owner or team. They are a leading indicator of the next round of stale docs.

How to pay documentation debt down

Treat it like any other backlog: rank it, retire what is not worth keeping, fix the rest in small pieces, and stop adding to it. For a scoring model and a step-by-step ratchet, see our post on measuring and paying down documentation debt.

  • Triage by traffic and risk: Start with the pages people actually read and the ones where a wrong answer is expensive: setup, auth, billing, deploys, and public APIs. A stale page nobody visits can wait.
  • Delete before you rewrite: Archive pages that describe removed features or duplicate a better page. Fewer, truer pages beat a large wiki nobody trusts.
  • Fix in small, reviewable changes: One page per pull request, reviewed like code. Small fixes get merged; a doc rewrite project gets postponed.
  • Make docs part of the PR: Add a documentation impact question to the PR template so a change that affects setup, behavior, or architecture names the page that should change with it.
  • Assign owners: Give each important page an owning team, ideally through CODEOWNERS for docs that live in the repository.
  • Automate drift checks: Re-check pages when the code they describe changes, so new drift is caught at merge time instead of in next year's audit.

Why documentation debt matters more with AI coding agents

Coding agents read your README, AGENTS.md, CLAUDE.md, and architecture notes before they write code. When those files are missing or stale, agents fill the gap with guesses or copy patterns the team has already abandoned, and the debt turns into code that has to be reviewed and fixed.

That makes the interest rate higher than it used to be. A stale page once misled a few new hires a year; now it can mislead an agent on every task. Keeping the files agents read current is one of the cheapest ways to improve the code they produce - see what coding agents need from your repository.

At a glance

Documentation debt at a glance

The three kinds of debt need different fixes. Most teams carry all three.

What it is

Missing docs

A surface that never got a page

Drifted docs

A page that was true once and fell behind the code

Broken or unowned docs

Dead links, failing examples, duplicates, no owner

How to find it

Missing docs

Compare a list of APIs, services, and setup steps to existing pages

Drifted docs

Pages whose source paths changed after the page did

Broken or unowned docs

Link checkers, running documented commands, page ownership audit

How to pay it down

Missing docs

Write a first version next to the code, starting with the riskiest surface

Drifted docs

Correct the page in a docs-only PR and re-check on every merge

Broken or unowned docs

Fix or delete, then give each surviving page an owner

How-to

How to measure and reduce documentation debt

  1. 1

    List the surfaces that need docs

    Write down the public APIs, services, packages, setup steps, and runbooks that someone outside the original author needs to understand.

  2. 2

    Count the debt

    For each surface, record whether a page exists, whether its source changed after the page was last edited, and whether its links and examples still work.

  3. 3

    Rank by traffic and risk

    Put the most-read and highest-risk pages first: setup, auth, billing, deploys, and public APIs.

  4. 4

    Delete, then fix in small PRs

    Archive obsolete and duplicate pages first, then correct the rest one docs-only pull request at a time.

  5. 5

    Stop new debt at merge time

    Add a documentation impact check to pull requests and re-check affected pages automatically when code lands.

How Moxie Docs helps with documentation debt

Moxie Docs indexes your GitHub repository, generates source-cited documentation for the surfaces that have none, and re-checks pages when the code they describe changes. Stale pages come back as reviewable docs-only Cleanup PRs, so the balance goes down and drift stops adding to it.

FAQ

Frequently asked questions

Quick answers to the questions developers ask about What is documentation debt?.

Get started

Stop documentation drift before it merges.

Connect a repository and Moxie Docs checks every pull request for doc gaps, keeping your architecture and conventions perpetually in sync. Free on 1 repository, no card required.