feat: add doc-accuracy reviewer to catch harmful documentation changes - #714
Open
Iheanacho-ai wants to merge 1 commit into
Open
feat: add doc-accuracy reviewer to catch harmful documentation changes#714Iheanacho-ai wants to merge 1 commit into
Iheanacho-ai wants to merge 1 commit into
Conversation
Signed-off-by: Amarachi Iheanacho <amarachi.iheanacho@siderolabs.com>
Iheanacho-ai
force-pushed
the
check-doc-code
branch
from
August 20, 2026 18:55
ada792b to
2dac14c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A new local
maketarget,check-doc-accuracy, that reviews documentation for changes that would harm a reader who follows them — not just typos, but commands that silently lose data, destroy things, or weaken security — before they ship.Why
We recently had a near-miss where an edit dropped a volume-mount flag (
-v $HOME/etcd:/_out/etcd) from adocker runcommand in the self-hosted Omni guide. The command still ran with no error, but etcd data was no longer persisted — so recreating the container would have wiped a self-hosted customer's entire Omni state. Nothing "broke" on copy-paste; it worked, and silently destroyed data.A flag validator scoped to
talosctl/omnictlwould never have caught it — it was a plaindockercommand, and the command was valid. The only thing that catches that class of bug is a reviewer that reads the snippet and reasons about its blast radius. This tool does exactly that.How it works
tools/doc-accuracyis a small Go program that drives theclaudeCLI headless as a read-only documentation reviewer (Edit/Write are disallowed — it reports, it never changes docs). It reviews the.mdxfiles you changed and, when a snippet or claim concerns Talos, Omni, extensions, or the discovery service, cross-checks it against the upstream source.It prioritizes harm over mere breakage:
rm -rf,docker volume rm,kubectl delete,git push --force, disk wipes…)--dry-run/backup/confirmation)chmod 777, binding to0.0.0.0,curl … | sudo sh, leaked secrets)…applied to every command in a snippet, not only the Sidero CLIs.
Usage