/agentic-docs:review-docsfrom agentic-docs
Verifies agentic documentation by checking local claims against source code and cross-repository claims against authoritative sources. Use before documentation PRs or after generating docs.
Ships in agentic-docs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Reviews agentic documentation using two-tier verification: local codebase checks first, then authoritative cross-repository sources for claims that cannot be resolved locally.
Verify cross-repository facts against authoritative sources, such as upstream
GitHub sources or Chai Bot's configured CodeRAG. Claims that cannot be
checked remain unverified; local verification still runs fully.
Tribal knowledge: When running inside an environment with access to researcher and knowledge-source callbacks (e.g. Chai Bot), query the researcher and configured knowledge sources (Slack, Jira) directly for tribal knowledge about this repository. Cross-reference generated documentation against discovered tribal knowledge during verification — particularly for undocumented conventions, common pitfalls, and historical context that may not appear in source code.
/component-docs or /update-platform-docsThis skill verifies factual accuracy of what's documented. It does NOT detect:
For completeness and specificity, rely on the Implementation Pattern Discovery checklist in /component-docs and SME review.
Follow Claim cache below for snapshots, evidence,
review planning, and cleanup. Resolve scripts/claim_cache.py from this skill.
Keep the cache outside the doc scope; delegated reviewers never delete it.
After each report, compact verified observations into aggregate receipts while
retaining failed and unresolved evidence.
Without a valid independent baseline, review the full scope. Otherwise, check affected claims and their dependencies, reusing valid independent evidence. Use a fresh context with immutable evidence and the diff, not the fixer's chat. Check reviewer independence and inventory coverage; cache entries prove neither.
Classify each claim by what it asserts. A single doc sentence may contain both a local fact and a cross-repo assertion — extract these as separate claims.
Verifiable by reading the repo's own source code, including vendor/:
go directive (minimum version) and toolchain directive (actual toolchain) in go.modvendor/github.com/openshift/api exists, verify struct definitions from vendored types.go filesvendor/github.com/openshift/library-go or vendor/github.com/openshift/api exists, verify gate names and stages from vendored coderegister.go for GroupName and SchemeGroupVersionClaims that cannot be resolved from local code or vendor/:
openshift/enhancements)openshift-docs)| Documentation Says | Local Claim | Cross-Repo Claim |
|---|---|---|
| "Uses admission webhooks" | Webhook registration code exists in repo | Webhooks follow platform conventions |
| "Applies resources via SSA" | SSA apply calls exist in controller code | Field manager names match platform norms |
| "Feature gate TechPreviewNoUpgrade controls X" | Code checks for this gate name | Gate exists in openshift/api with claimed stage (if not vendored) |
Always run the local check first. If a claim fails locally, report it without searching for external evidence to override the repository.
AGENTS.md, CLAUDE.md (symlink), REVIEW.md, .coderabbit.yaml, ai-docs/ tree (ARCHITECTURE.md, DEVELOPMENT.md, TESTING.md, ENHANCEMENTS.md if present)dev-guide/, guidelines/, CONVENTIONS.md--path is specified, scope to that path insteadfind within the scoped paths to catalog ALL markdown filesSave a claims inventory using the format below. Extract every verifiable claim on the full pass; re-extract changed sections on later passes, keeping stable IDs. Record each assertion, local/cross-repo kind, occurrence ranges, source scope, and claim dependencies. Map qualifiers, headings, table headers, summaries, and diagrams so changes to them invalidate the affected claims.
Extraction rules:
Cross-file consistency: Compare the same concepts across the inventory. On later passes, check all occurrences and dependent claims for each changed concept, including summaries and diagrams. Flag contradictions before queries.
Save an immutable snapshot of the inventory and document hashes. Mark coverage complete only after checking every scoped file and changed section. A diff cannot prove new text has no claims. Fully extract uncovered scope and report gaps as unresolved. Never drop claims from unchanged text.
Give each claim a status and evidence: verified, failed, or unverified.
Skipped or unavailable checks are unverified; report why. Count from the current
inventory, separating new checks from reused independent evidence.
On the full pass, check every local claim against source or valid cached excerpts. Later, check claims selected by the plan, including missing or invalid evidence. A fixer's cached verdict never exempts an affected claim from review.
Give every current local claim a status, including reused results. Apply the checks below only to selected claims; reuse unchanged independent evidence.
Build & toolchain:
go.mod — compare both go and toolchain directives to documented version_remote=$(git remote | head -1)
git symbolic-ref "refs/remotes/${_remote}/HEAD" # may need: git remote set-head "$_remote" --auto
Directory & file structure:
Framework & pattern claims:
admissionregistration, WebhookServer, webhook manifests)Vendored API types & feature gates (if vendor/github.com/openshift/api or vendor/github.com/openshift/library-go exists):
types.go in vendored openshift/api, compare struct field names, types, and defaults against documented claimsregister.go for GroupName and SchemeGroupVersionCode examples:
Naming conventions:
Test organization:
REVIEW.md & .coderabbit.yaml (if present):
**/clientset/**): verify the base directory exists in the repo (test -d)path_filters match the "Do not report" globs in REVIEW.mdpath_instructions match the "Path-specific rules" sections in REVIEW.mdfilePatterns includes "REVIEW.md" and "AGENTS.md" but NOT "CLAUDE.md"Links:
docs.openshift.com blocks curl. Treat 403/429 as "needs manual check" not automatic failureCross-file consistency:
First pass: compare all scoped content with the inventory for missed claims. Later passes: audit changed sections, new/deleted files, occurrence mappings, and affected dependencies. Reuse the valid unchanged baseline.
Add missed claims, correct mappings, and recompute the plan. If mappings are unreliable, fully review the affected scope and report the limitation.
unverified with the reason and continue to Phase 5Severity guide:
Include in the report:
Save the report at the assigned CACHE_DIR/reports/pass-NNN.md path, creating
reports/ if missing. Include snapshot and observation IDs. For a standalone
review, use the next unused pass number, starting at 001. Return
the path and a summary to the main agent, or to the user for a standalone review.
Never overwrite a report or use a fixer snapshot as the independent baseline.
If only the same unresolved items remain with no new inputs, evidence, or
actionable fixes, report incomplete and stop.
New pass numbers, cache writes, or report wording alone are not progress.
After the report is complete and self-contained, compact the reviewed snapshot:
python3 "$CACHE_HELPER" --cache "$CACHE_DIR" compact --snapshot "$SNAPSHOT_ID"
Report its verified, retained, and removed-record counts. Compaction removes detailed observations only for verified claims; failed and unresolved claims remain available for the next pass.
generate-docs still requires a fresh independent reviewer.After reporting and any accepted fixes, follow the cleanup rules below.
A standalone run deletes its own cache only when no failed, unresolved, or pending
verification remains, unless --keep-cache. Delegated reviewers leave cleanup
to the main agent. Report cleanup status and any retained path and reason.
generate-docs from reporting verified clean./review-docs [--path <docs-path>] [--auto-fix] [--local-only]
[--cache-dir <directory>] [--baseline <snapshot-id>] [--keep-cache]
--path: Path to documentation file(s) to review (defaults to current directory)--auto-fix: Automatically fix issues found (default: prompt user)--local-only: Skip cross-repository verification and run only local checks--cache-dir: Shared review cache; default to a new run directory under the
target repository's .work/agentic-docs/, outside the doc scope--baseline: Last independent snapshot; omit for full review. Reuse requires
a valid, complete baseline.--keep-cache: Keep the cache after a successful run instead of deleting it.Auto-discovery: Infers component repo from git remote or current working directory
scripts/claim_cache.py saves immutable claims and evidence, checks hashes, and
selects claims for review. It requires Python 3.9+ and Git. Append results; never
overwrite them. After each review, compact replaces detailed verified
observations with aggregate receipts and retains failed or unresolved evidence.
The main agent supplies these values; standalone reviews resolve them directly. Use absolute paths. Snapshot and observation IDs are hashes.
| Variable | Value |
|---|---|
REVIEW_SKILL_DIR | Directory containing this SKILL.md |
REPO_PATH | Target repo from generate-docs or Phase 1 |
CACHE_DIR | Shared cache or --cache-dir; otherwise a new directory under REPO_PATH/.work/agentic-docs/ |
PROMPT_VERSION | Policy hash defined under Reuse rules; shared across passes |
Before creating the default cache, ensure /.work/ is present in the target
checkout's local Git exclude (resolve it with
git -C "$REPO_PATH" rev-parse --git-path info/exclude). Verify the rule with
git check-ignore. This local exclude is not tracked and must remain after cache
cleanup. If it cannot be installed and verified, place the cache outside the
worktree instead of creating .work.
Create CACHE_DIR first, or reuse the main agent's directory. In Bash:
set -euo pipefail
CACHE_HELPER="$REVIEW_SKILL_DIR/scripts/claim_cache.py"
WORK_DIR=$(mktemp -d "$CACHE_DIR/inputs.XXXXXX")
INVENTORY_FILE="$WORK_DIR/inventory.json"
EVIDENCE_FILE="$WORK_DIR/evidence.json"
Save this structure to INVENTORY_FILE, using actual claims and sources:
{
"documents": ["ai-docs/DEVELOPMENT.md"],
"coverage_complete": true,
"claims": [{
"id": "test-command", "assertion": "The test target runs Go tests.", "kind": "local",
"occurrences": [{"path": "ai-docs/DEVELOPMENT.md", "start": 8, "end": 12}],
"depends_on": [],
"source_scope": [{"repository": "component", "revision": "<commit>",
"local_root": "<absolute repo path>", "path": "Makefile"}]
}]
}
Use stable IDs, repo-relative paths, inclusive one-based line ranges, and kind
local or cross-repo. depends_on lists claim IDs. Reviewers must check coverage
and dependencies themselves; broaden the review when unsure.
Save one claim's evidence to EVIDENCE_FILE:
{"reviewer": "pass-1", "role": "reviewer",
"evidence": [{"source": "Makefile:8 at <commit>", "excerpt": "test:\n\tgo test ./..."}]}
Use role fixer or reviewer; the role alone does not prove independence.
Include exact excerpts, qualifications, and reasons for failures or uncertainty.
Exclude chat, fixer reasoning, credentials, and unrelated sources.
These input files may change; saved cache records stay immutable.
Save a snapshot and plan the first full review:
SNAPSHOT_ID=$(python3 "$CACHE_HELPER" --cache "$CACHE_DIR" snapshot \
--repo "$REPO_PATH" --inventory "$INVENTORY_FILE" --prompt-version "$PROMPT_VERSION" \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["snapshot"])')
python3 "$CACHE_HELPER" --cache "$CACHE_DIR" plan --current "$SNAPSHOT_ID"
For each selected claim, set CLAIM_ID, update EVIDENCE_FILE, and check sources.
Set STATUS to verified (supported), failed (contradicted), or unverified
(unknown, skipped, or timed out). Save the result ID for the report:
OBSERVATION_ID=$(python3 "$CACHE_HELPER" --cache "$CACHE_DIR" put \
--snapshot "$SNAPSHOT_ID" --claim "$CLAIM_ID" --status "$STATUS" --evidence "$EVIDENCE_FILE" \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["observation"])')
python3 "$CACHE_HELPER" --cache "$CACHE_DIR" get --snapshot "$SNAPSHOT_ID" --claim "$CLAIM_ID"
After the report contains the evidence needed by the main agent or user, compact the reviewed snapshot:
python3 "$CACHE_HELPER" --cache "$CACHE_DIR" compact --snapshot "$SNAPSHOT_ID"
The command preserves small context/signature/reviewer receipts so unchanged verified claims remain reusable. It deletes detailed observation and carry records for those claims. It is idempotent and does not remove failed or unresolved observations.
The main agent passes the completed independent review's SNAPSHOT_ID as the
next reviewer's BASELINE_ID. After fixes, update the inventory and snapshot:
CURRENT_ID=$(python3 "$CACHE_HELPER" --cache "$CACHE_DIR" snapshot \
--repo "$REPO_PATH" --inventory "$INVENTORY_FILE" --prompt-version "$PROMPT_VERSION" \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["snapshot"])')
python3 "$CACHE_HELPER" --cache "$CACHE_DIR" plan --previous "$BASELINE_ID" --current "$CURRENT_ID"
SNAPSHOT_ID="$CURRENT_ID"
Repeat put/get for selected claims. Never use a fixer snapshot as the baseline.
Omit --previous for full review. Edits, context changes, and dependencies need
checks; unrelated line shifts do not. Extract new claims from changed sections.
Keys include repo identity/commit, document/claim hashes, source scope, and policy hash. Snapshots capture uncommitted edits too. Pin sources to immutable commits or snapshots; branches, mutable URLs, or unpinned evidence cannot support reuse.
Keep local_root to refresh source hashes. Update the revision when HEAD changes;
stale pins fail. Unchanged local bytes and scope allow reuse across commits.
Changed remote revisions need review.
Compute PROMPT_VERSION once per run as a SHA-256 hash of this skill,
generate-docs, and task instructions including overrides. Exclude claim text
and line numbers. Policy changes invalidate reuse.
If only document hashes or commits change, a carry receipt links the new snapshot to valid independent evidence. Count it as reuse. Fixer verdicts never exempt affected claims; reuse cannot turn failed or unverified results into verified ones.
Missing, corrupt, or conflicting records need review or an unresolved status.
Only a fresh reviewer can resolve conflicts with supersedes, listing the exact
observation or carry IDs from get for the same context. Records are immutable
while present; post-review compaction is the only supported removal and applies
only to verified observations after writing their aggregate receipts. Newer
results do not win automatically; author differences alone are not conflicts.
Record the cache's canonical path and owner. A run owns only directories it
creates; preserve pre-existing directories, including --cache-dir.
After success, the owner deletes only its run directory unless --keep-cache.
Wait for reviewers and prepare a self-contained final summary with coverage,
findings, and sources; pass reports disappear with the cache. Keep failed,
incomplete, or interrupted runs. Delegated reviewers and helper calls never clean up.
Never delete parent directories, sibling runs, or sources. Verify removal and
report any retained path and reason or error.
Compaction runs after every completed review, including incomplete runs, so retained caches contain detailed records only for failed or unresolved claims.
/component-docs - Create component documentation/update-platform-docs - Update platform documentationWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub openshift-eng/ai-helpers --plugin agentic-docs4 skills in this plugin
/component-docsCreate lean component documentation for OpenShift repositories/generate-docsGenerate and iteratively verify OpenShift component documentation, or review existing documentation, without relying on host-specific hooks or commands./update-platform-docsUpdate existing platform documentation with automatic gap detection in openshift/enhancementsOther plugins' skills for the same job