Skip to content

Blog

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.

Numbered list titled Review an AI-drafted docs PR in narrow passes: accuracy against a named source, commands and samples run, terms and style, scope, and an invented-detail sweep for names.
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."

PassThe one questionCheck againstFails when
AccuracyDoes a named source say this?The PR, ticket, spec, or existing page the agent citesA claim has no supporting sentence
Commands and samplesDoes it run?A real environment on the version the page documentsA command errors or the output differs
Terms and styleDoes it use our words?The style guide and existing pagesA term drifts or an old name survives
ScopeDid it change only what the request needed?The request and the list of changed filesA 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.

Checklist titled A link proves a claim only if it passes four tests: it says what the claim says, it has the same scope as the page, it is current for the page's version, and it shows the change happened. (opens the full-size image in a new tab)
A link proves a claim only when it passes all four tests.

A link proves a docs claim only when it passes four tests.

  1. It says what the claim says. You can point to the sentence, line, or field.
  2. It has the same scope. Same product, plan, edition, platform, and API version as the page.
  3. It is current. It describes the version the page documents, and a pull request is merged and not reverted.
  4. 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 missA line for the agent's instructions
A flag that appears in no sourceUse 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 onlyFor a code change, link the merged pull request that implements it.
An old parameter name left on another pageWhen a name changes, search every page for the old name and update each one.
A new page that duplicates an existing oneBefore 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.

PULL_REQUEST_TEMPLATE.mdMarkdown
## 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


Read more about

Blog

Is your site ready for AI agents? Score your website and docs

·5 min read

A hand check of robots.txt, llms.txt and the sitemap covers 3 of 23 checks. Agent readiness scans your website and docs site the way AI agents fetch them and returns a score, your Blockers and Gaps, and the fixes to make first.

Blog

Release Radar: each feature your customers can see gets its own checklist

·3 min read

Release Radar finds the features your team ships, gives each one a checklist of follow up work, and lets an agent start on it with one click.

Blog

Docs PRs from merged code: three ways to automate docs updates

·14 min read

GitHub Agentic Workflows, your docs platform's agent, or a docs agent that works across platforms: who owns the needs-docs gate, the prompt and the style rules in each, what Aspire's 82 agent-drafted docs PRs show, and which approach fits your stack.

Blog

Designing APIs for AI Agents: What Should Change, and What Should Stay?

·16 min read

Agents misread defaults, errors, and retries. Fix the shared contract first: visible effective values, RFC 9457 errors, and a tested recovery path for timeouts, then fund an agent-specific layer only where a measured task still fails.

Blog

What ChatGPT, Claude and Perplexity cite when recommending developer tools: a 1,160-citation study

·9 min read

We asked ChatGPT, Claude and Perplexity 10 developer-tool questions 5 times each and sorted the 1,160 citations behind their answers. ChatGPT cited vendors' own pages; Claude and Perplexity mostly cited "best X" lists and comparison pages.

Blog

More than blog posts: the EkLine Marketing Agent now drafts battlecards, positioning and launch plans

·5 min read

The EkLine Marketing Agent now takes on any marketing task. It starts from the goal, reads your connected tools before the web, and drafts battlecards, positioning, launch plans, web pages and more in your company's voice.