# How FACET helps your docs keep up with the code

> Coding agents write good documentation, often better than we would. It gets tricky once the code changes and nobody knows which texts are affected. This guide shows how FACET finds them.

Source: https://facet-framework.com/en/guides/why-documentation-falls-behind/  
Last updated: 2026-11-26T23:28:23+01:00

Coding agents are surprisingly good at writing documentation. An FAQ, a help article, an API description: things that used to sit on the backlog now take a few minutes. The tricky part comes later, when the code changes and the docs are supposed to follow.

Say your online shop extends its return window from 30 to 60 days for the holidays. The agent changes the constant in `src/orders/refund.ts`, searches for “30 days”, finds the FAQ and updates it. It doesn't find the help center article, because that one says “one month”.

## Why docs never quite keep up

Software changes faster than documentation can be kept up to date. A small code change often affects several texts, and whoever makes the change usually knows only some of them. That goes for people as much as for agents.

Postman's [State of the API Report 2026](https://blog.postman.com/the-2026-state-of-the-api-report-agents-are-in-production-and-most-apis-arent-ready/) shows how common this is: almost half of nearly 9,000 respondents name incomplete or outdated documentation as their biggest obstacle to working together. Even thorough review doesn't always catch it. In the Linux kernel, which gets more careful review than almost any other project, researchers found [869 references in comments](https://arxiv.org/abs/2608.03734) to functions that no longer existed.

So writing isn't the problem. According to Google's [DORA 2024 report](https://cloud.google.com/blog/products/devops-sre/announcing-the-2024-dora-report), more AI use actually goes along with better documentation. What's missing is knowing which texts a change affects.

## How FACET finds the places a change affects

FACET keeps a short description of each feature in the repository, which it calls a record, and links it to the code with a comment. You can bind help articles to the same record, even ones you write by hand:

```sh
npx facet-framework docs record --artifact help/returns.md --feature orders/refunds/request-refund --pipeline hand-written
```

When the agent now changes the window, `facet drift` reports that the refund feature's code changed and its record didn't:

```sh
npx facet-framework drift
```

```text
drift: orders/refunds/request-refund — changed: src/orders/refund.ts
1 drifted anchor(s), 0 reference change(s), 0 stale reference(s)
```

And `facet docs check` names the help article that is still based on the old state:

```sh
npx facet-framework docs check
```

```text
stale: help/returns.md (orders/refunds/request-refund)
    input src/orders/refund.ts changed since generation

1 artifact(s) checked — 1 need regeneration
```

Neither check needs AI; both just compare what changed since the last confirmed state. The FACET plugin for Claude Code asks the agent the same question at the end of every turn, and it runs the same way in pull requests. So the agent doesn't have to remember every place that mentions the return window. It gets told, and can update the article right away.

To see this in a pull request, follow [Catch outdated feature docs in the pull request with FACET](https://facet-framework.com/en/guides/catch-it-in-the-pull-request/). To bind your help articles, follow [Know when a help article no longer matches the code, with FACET](https://facet-framework.com/en/guides/help-article-says-14-days-code-says-30/).

## What FACET doesn't see

FACET only sees what is linked. An email template or an API description that isn't bound to a record stays invisible.

A report doesn't mean the text is wrong, either. If you only cleaned up the code and its behaviour didn't change, the article is still correct. You or the agent decide that when reading it.

And FACET only warns; it doesn't hold up a commit. If you ignore the warning, you still end up with an outdated article, but at least you know about it.
