What to check before you merge an AI-drafted docs PR
A review playbook for docs pull requests an AI agent drafted: four passes against named sources, a sweep for invented flags and versions, four tests for the agent's evidence links, and a checklist to paste into your PR template.

- Written by
- Arun Bhalla (opens in a new tab)
- Published on
- Read time
- 12 min
An agent can open docs pull requests that each still need a person to check them. The drafts can read well and still pass CI. The risk is the one detail that sounds right and is wrong: a flag the CLI never had, a version that was never released, a parameter the API never accepted. If it ships, the reviewer who approved it owns the error.
In the Stack Overflow 2025 Developer Survey, 66% of developers picked "AI solutions that are almost right, but not quite" as a frustration. Almost right is hard to catch in one read, because one read mostly tests whether the text sounds right.
A review that holds up checks each claim against the source the agent names, in separate narrow passes. Any flag, endpoint, version, or product name that appears in no source is a defect, even when it is plausible. Each miss then becomes a line in the agent's instructions, so the next PR does not repeat it.
TL;DR
- In a 2026 survey, 56% of regular AI users said more of their time now goes to editing and reviewing.
- Read the PR in four passes: accuracy against a named source, commands and samples run, terms and style, and scope.
- A flag, endpoint, version, or product name that appears in no source is a defect, however right it looks.
- A link the agent attaches proves a claim only when it matches the claim's scope and version, and the change it describes shipped.
- Fix small misses yourself, send back unsourced or out-of-scope work, and write every repeated miss into the agent's instructions.
Where writers say their time goes
State of Docs 2026 reports that "56% of regular AI users report spending less time writing and more time editing and reviewing." The base is regular AI users among 1,131 respondents across several disciplines; the report does not publish its method.
Overall, 62% cite hallucinations as their top concern about AI in documentation. Its AI chapter adds that docs carry a higher accuracy bar, because one wrong instruction can break a user's implementation.
In the same chapter, only 44% of all respondents have formal or informal AI guidelines. That gap matters, because the agent's instructions are where you fix a review miss so it does not repeat.
Owners, inputs, and cadence
Owner. One named person approves or rejects each agent PR. Umbraco's AI contribution guidelines make the contributor own technical accuracy: running code samples and checking APIs and versions. The docs team reviews only for style and consistency. An agent cannot own accuracy, so you or an engineer who knows the change does. GitLab's documentation AGENTS.md page sets the same line: do not commit or push AI-generated content before you have reviewed and iterated on it.
Inputs. Have four things open: the diff, every source the agent names (the pull request, ticket, or spec), the existing pages on the topic, and the style guide or AGENTS.md file the agent follows.
Cadence. Run the passes on every agent PR, before merge. ReadMe's review workflow for AI-generated documentation suggests five minutes per draft for most changes. Narrow passes keep each one short.
Run four passes, each with one question
Document360's review checklist for AI-generated documentation makes the case for splitting the work: "combining all checks into one pass risks letting accuracy issues slip through."
| Pass | The one question | Check against | Fails when |
|---|---|---|---|
| Accuracy | Does a named source say this? | The PR, ticket, spec, or existing page the agent cites | A claim has no supporting sentence |
| Commands and samples | Does it run? | A real environment on the version the page documents | A command errors or the output differs |
| Terms and style | Does it use our words? | The style guide and existing pages | A term drifts or an old name survives |
| Scope | Did it change only what the request needed? | The request and the list of changed files | A new page duplicates an existing one, or unrelated pages changed |
Accuracy against a named source
Read the diff one claim at a time. For each claim, find the sentence in a named source that says the same thing. Anthropic suggests this technique in its guidance on reducing hallucinations: have Claude verify each claim by finding a supporting quote, and "If it can't find a quote, it must retract the claim." Apply the same rule as the reviewer.
Commands and samples run
Run every command, code sample, and configuration value in a real environment, on the version the page documents. An invented flag has the same shape as a real one, so reading a command does not verify it. When you cannot run something, say so in the PR.
Terms and style
Check terms against the style guide and the pages around the change. Then run the check ReadMe calls the most skipped: when the diff renames a parameter, update every page that mentions the old name. The diff shows only the pages the agent touched, so search the docs for the old name.
Scope
Compare the changed files with the request. GitLab's documentation style guide lists "incorrect scope" as a common fault in AI-generated content, such as a new page where a suitable one already exists. Check for pages the agent edited without being asked, and for duplicate PRs. Umbraco sets a scope limit: an AI-generated PR changes at most 10 article files per version folder unless the contributor explains why, and it carries the AI-generated label.
The invented-detail check
After the four passes, make one sweep for a short list of names: flags, endpoints, parameters, versions, and product or UI names. Search for each one in the sources the agent named, the codebase, and the released reference. If a name appears in none of them, it is a defect, however real it looks.
GitLab's style guide names this fault: among "vague or unverifiable claims," it lists command syntax, API parameters, and UI element names that the codebase and existing docs do not support.
We found no published rate for how often docs agents invent details. The closest measured work we found, Spracklen et al., counted invented package names in generated code. This check rests on how inventions look: they read as real names, so a search finds what a reread misses.
Reading the agent's evidence
When an agent's PR links its evidence (the pull request, ticket, or spec), treat each link as a claim to check. In a study of generative search engines, Liu, Zhang, and Liang found that "only 74.5% of citations support their associated sentence." That study covered search engines. The same risk applies to an agent's links: a citation can point at the wrong thing.
PR descriptions can overreach too. Gong et al. studied 23,247 code PRs written by agents and found a large mismatch between description and code in 1.7% of them. The most common type was descriptions that claim unimplemented changes.
(opens the full-size image in a new tab)A link proves a docs claim only when it passes four tests.
- It says what the claim says. You can point to the sentence, line, or field.
- It has the same scope. Same product, plan, edition, platform, and API version as the page.
- It is current. It describes the version the page documents, and a pull request is merged and not reverted.
- It shows the change happened. A ticket or spec records intent. For a code change, the diff has to contain the behavior the page describes.
Code reviewers report the same need. In a survey of 239 practitioners about code PRs, Rahman et al. found that 61.1% reported higher evidence requirements for AI-authored PRs. The authors call this review "an evidence-ownership problem, not merely a correctness check."
Send it back or fix it yourself
Fix the miss yourself when it is local and a source you have open settles it: a term, an old parameter name, a sentence the source supports in other words.
Send the PR back when a claim has no source, a link fails one of the four tests, a command fails, or the scope is wrong. ReadMe adds a time rule no other guide we found gives: "If a draft needs more than fifteen minutes, you're usually better off rewriting it by hand than continuing to edit the AI version." When you send it back, name the failed check and the claim.
Then change the agent's instructions, or the same miss returns. GitLab's AGENTS.md page says that to change the standards agents follow, you "update the documentation style guide." For a pattern the guide does not cover, GitLab adds guidance in a merge request. It tests the change in a new conversation, because existing conversations do not pick it up.
Write one line per miss. Some examples:
| The miss | A line for the agent's instructions |
|---|---|
| A flag that appears in no source | Use only flags that appear in the reference or help output you were given. List any you could not confirm as open questions in the PR description. |
| Evidence that links to a ticket only | For a code change, link the merged pull request that implements it. |
| An old parameter name left on another page | When a name changes, search every page for the old name and update each one. |
| A new page that duplicates an existing one | Before you create a page, search for an existing page on the topic and edit that page. |
One worked cycle
One team published an audit of one of its AI-assisted tutorials. It is one team's account, by an author whose company sells a platform for visibility in AI search. The audit found four CLI snippets whose subcommands and flags did not match the published foglift-scan binary, and one npm install line for a package that was never published. The same fabrications also appeared in the page's FAQPage structured data.
Run that page through this playbook. The invented-detail check catches the flags, because they do not match the binary's real help. The commands pass catches the install line, because the package does not exist. Fixing every copy matters too: a fix to the tutorial text alone would leave the same errors live in the structured data. The team's own gate is "Copy-paste-execute every code block against the real binary before merge." Their post names no instruction change; we would add the first line of the instructions table.
"A careful single read is enough"
The strongest objection: agents can cite their sources and pass CI. You already read every PR carefully. Splitting the review into passes spends the time you hoped to save by delegating.
Part of this objection holds: the cost is real. That is why the passes are narrow, and why the invented-detail check is a search for a short list of names, not a second full read.
It fails on accuracy. Apollo runs an AI style reviewer on docs PRs as GitHub status checks. It covers "voice, tense, terminology, and formatting," and the post does not claim it checks facts. A green check of that kind shows style compliance. The citation and PR-description studies in the evidence section show failures that do not look like style problems, so a careful read for sense can pass both.
The passes have limits. They will not catch every error, and a stale source passes its errors into every pass that checks against it.
The checklist for your PR template
Paste this into your PULL_REQUEST_TEMPLATE.md for PRs that an agent drafts.
## AI-drafted docs review
### Sources the agent used
<!-- One line per source: link, and the version or date it describes -->
-
### Pass 1: Accuracy against a named source
- [ ] Every new or changed fact links to a source listed above
- [ ] Each source matches the page's product, plan, edition, and current version
- [ ] For a code change, the merged diff contains the behavior the page describes
### Pass 2: Commands and samples
- [ ] I ran every command and sample, and the output matches the page
- [ ] Anything not run is listed here:
### Pass 3: Terms and style
- [ ] Terms match the style guide and nearby pages
- [ ] Renamed items are updated on every page that mentions the old name
### Pass 4: Scope
- [ ] Only the pages the request needed are changed
- [ ] No new page or open PR duplicates an existing one
### Invented-detail check
- [ ] Every flag, endpoint, parameter, version, and product or UI name appears in a source
- [ ] Copies of a fixed claim (FAQ, structured data, other pages) are fixed too
### Decision
- [ ] Approved
- [ ] Fixed by reviewer (list fixes):
- [ ] Sent back (failed check and claim):
- Line added to the agent's instructions:FAQ
Check accuracy first: take each claim back to the source the agent names and find the sentence that supports it. Then sweep for invented flags, endpoints, versions, and product names. Style comes later, because a well-styled page with an invented flag still breaks the reader's implementation.
The failure looks different. An agent can write fluent text with details that read as real and are not, and it can attach links or PR descriptions that do not support what it wrote. So you check each claim and each piece of evidence against a source, instead of trusting the author's knowledge of the product.
They need the same standards with a better record. Keep one style guide for people and agents, as GitLab does, and add evidence fields to the PR template. When a miss repeats, change the agent's instructions as well as the page.
For how EkLine's Marketing Agent runs a per-claim check on drafts, read How does EkLine check product claims before you publish?
Sources
- State of Docs 2026, report overview
- State of Docs 2026: AI and documentation creation
- Anthropic, Reduce hallucinations
- GitLab documentation style guide, AI-generated content
- GitLab, Documentation AGENTS.md
- Umbraco, AI Contribution Guidelines
- Liu, Zhang, and Liang, Evaluating Verifiability in Generative Search Engines
- Gong et al., Analyzing Message-Code Inconsistency in AI Coding Agent-Authored Pull Requests
- Rahman et al., Plausible Is Not Enough: Trust and Evidence in AI-Authored Pull Request Review
- Spracklen et al., We Have a Package for You!
- Stack Overflow 2025 Developer Survey, AI
- Apollo, How We Taught an AI to Nitpick Docs
- Document360, AI-Generated Documentation Review: The Complete QA Checklist
- ReadMe, Designing the Review Workflow for AI-Generated Documentation
- Watson Foglift, How to Catch Hallucinated CLI Commands in AI-Assisted Tutorials






