It’s tempting to ask your AI to review your content for accuracy:
Hey Claude, review my React tutorial for accuracy.
And Claude sounds confident:
Looks good! The forwardRef pattern is correct — wrapping your componentlets the parent access the child's DOM node. The useRef(null)initialization is right, and the overall approach follows React bestpractices. ✓
This answer is wrong — and Claude doesn’t know it. AI fact-checks content against its training data, which can be outdated, sourced from unreliable places, or simply wrong about enterprise vs. OSS behavior. The more confidently wrong, the harder it is to catch.
The fix is simple: give your AI the source. Instead of letting it pull information from memory, point it at the specific versioned docs your readers are actually using.This tutorial shows how to do that using Grounded Docs. You’ll index two versions of the React docs, enhance the fact-checking skill to produce citation-backed output, and watch the same tutorial pass one version and fail another.
This tutorial fact-checks a sample React tutorial at public/examples/react-18-forwardref-tutorial.md. It covers forwarding refs to child components using the React 18 pattern:
Index both React 18.3.1 and React 19.2 so you can fact-check against either version. In Claude Code, run:
/docs-manage Index the following two versions of the React documentation:- https://react.dev/reference/react --version 18.3.1- https://react.dev/reference/react --version 19.2
Claude will crawl both sites and store the content locally. Allow each permission prompt as it runs. Indexing takes a few minutes per version and covers roughly 49 pages each.
2
Verify both versions are indexed
Confirm both versions are ready:
Give me a list of the react docs
You should see both versions in the table:
Library
Version
Pages
react
19.2
49
react
18.3.1
49
If only one version appears, re-run the index command for the missing one before continuing.
3
Enhance the docs-search skill
By default, the docs-search skill returns generic AI output. You need to enhance it so Claude produces structured, citation-backed findings instead of vague summaries.Run this prompt:
Enhance ~/.claude/skills/docs-search/SKILL.md for fact-checking.Add a fact-checking workflow and citation block format: whenfact-checking, search the index, locate the relevant passage inthe content field, classify the finding, then emit one citationblock per claim:Doc path (local): <path portion of the url field — everything after the domain. Label as "(local)" to make clear content came from the local index, not a live fetch.>Public URL: <full url field value>Quote: "<verbatim excerpt from content>"Finding: [DOCS SAY] / [INFERRED from <doc path>] / [NOT FOUND]Classification:- [DOCS SAY] — a direct quote from content supports the claim- [INFERRED from <doc path>] — deduced from context; name source- [NOT FOUND] — no indexed source addresses the claimRules:- Quote must be verbatim from content — never paraphrase- Never use [DOCS SAY] without a quote to back it- Always use the (local) labelInclude a concrete example citation block.
This enhancement is permanent — the skill file is updated on disk. You only need to do this once across all tutorials that use docs-search for fact-checking.
4
Fact-check against React v18.3.1
Now run the fact-check against the React 18 docs:
Use the /docs-search skill to fact-checkpublic/examples/react-18-forwardref-tutorial.mdagainst the react v18.3.1 documentation.
The forwardRef pattern is valid in React 18, so you should see it pass:
Doc path (local): /reference/react/forwardRef (local)Public URL: https://react.dev/reference/react/forwardRefQuote: "forwardRef lets your component expose a DOM node to the parent component with a ref."Finding: [DOCS SAY] forwardRef correctly exposes a child's DOM node to a parent. ✅ Accurate
This is the baseline. The tutorial is correct for readers on React 18.
5
Fact-check against React v19.2
Now run the same check against the React 19 docs:
Use the /docs-search skill to fact-checkpublic/examples/react-18-forwardref-tutorial.mdagainst the react v19.2 documentation.
This time, the same code gets flagged:
Doc path (local): /reference/react/forwardRef (local)Public URL: https://react.dev/reference/react/forwardRefQuote: "In React 19, forwardRef is no longer necessary. Pass ref as a prop instead. forwardRef will be deprecated in a future release."Finding: [DOCS SAY] ⚠ OUTDATED — forwardRef is deprecated in React 19. The tutorial teaches it as the required pattern, but the 19.2 docs explicitly say it is no longer necessary. ❌ Flagged — breaking change.
Same tutorial, same code — different result depending on which version your readers are on. This is what version-aware fact-checking catches that generic AI review misses.
6
Fix the deprecated code
Ask Claude to update the file using the React 19 docs as the authoritative source:
Update the tutorial to fix the deprecated forwardRef usage,using the react v19.2 docs.
Claude will rewrite the component to the React 19 pattern: