> ## Documentation Index
> Fetch the complete documentation index at: https://docs.detail.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Doc Drift Detection and Auto-Fix

> Detail detects when code changes make your documentation stale and automatically opens GitHub pull requests to bring it back in sync.

Detail detects when code changes make documentation stale and automatically opens GitHub pull requests to update it. Documentation drift – where the code moves forward but the docs still describe the old behavior – is one of the most common invisible forms of technical debt; it doesn't affect your product directly, but it degrades the agents that build your product. Detail finds it and fixes it for you.

## What documentation drift looks like

Documentation drift happens gradually:

* A module is refactored and its README still shows the old API
* A configuration option is renamed but the docs still use the original name
* New behavior is added to a function without a corresponding update to its documentation
* A CLI changes but an agent skill still specifies the old flags

Each of these cases causes mistakes in the agents that subsequently modify your code, e.g. reimplementing functionality that already exists or wasting tokens going down obsolete paths.

## How it works

<Steps>
  <Step title="Agent reviews recent code changes">
    Detail compares recent commits against your repository's documentation and identifies places where the documentation no longer accurately describes the code.
  </Step>

  <Step title="Pull Request opened">
    For each stale documentation item, Detail opens a GitHub pull request with the updated documentation. The PR description explains what changed in the code and why the docs needed to be updated.
  </Step>

  <Step title="You review and merge">
    Review the PR diff, make any additional edits you want, and merge when you're satisfied. The updated docs land in your repository just like any other PR.
  </Step>
</Steps>

## Enabling Doc Fixes

<Steps>
  <Step title="Open Doc Drift settings">
    In the Detail dashboard, go to **Doc Drift** and select the repository you want to configure.
  </Step>

  <Step title="Enable Doc Fixes">
    Toggle **Doc Fixes** to on for the repository. You can select how often the agent should look for documentation drift – weekly or on every weekday – and optionally specify a single engineer who should be tagged on all Doc Drift PRs.
  </Step>
</Steps>
