Generate and Verify Component Documentation
Run the complete component-documentation workflow in the current task. The
workflow must not depend on lifecycle hooks, transcript inspection, completion
promises, or host-specific environment variables. Use whichever native
fresh-session delegation capability the host exposes for independent
verification.
Bundled workflows
Before starting, read both sibling skills completely, resolving these paths
relative to this SKILL.md:
Do not invoke them through host-specific slash-command syntax. Apply their
instructions directly within this task.
Arguments
PATH: positional skill argument for the component repository; default to
the current working directory at invocation time. This is not the shell
PATH environment variable; never assign to or export the shell PATH
variable.
--max-iterations N: maximum review/fix passes; default 5. Require a
positive integer.
--review or --skip-generate: review and fix existing documentation
without running component-document generation.
-h or --help: report usage and options without changing files.
Reject unexpected arguments before changing files. Resolve the PATH argument
exactly once to an absolute, canonical directory, store it in REPO_PATH, and
confirm it exists and is a directory.
Use REPO_PATH as the target for the entire workflow: either set every
repository operation's working directory to REPO_PATH or use absolute paths
rooted at REPO_PATH. Do not use relative repository paths after this point.
Independent verification
Each verification pass must use a fresh, general-purpose isolated reviewer that
has not participated in generating or fixing the documentation. Never resume or
reuse a reviewer from an earlier pass.
Use the isolated-review capability actually exposed by the host. Common
examples are:
- in a Codex-style runtime, use
spawn_agent;
- in a Claude-style runtime, use a fresh
Agent or Task invocation;
- in another runtime, use its equivalent fresh-session delegation capability.
Do not invoke a local agent executable merely to simulate delegation. If none
of these capabilities is exposed, treat independent verification as
unavailable.
The workflow agent must not substitute its own review for the independent
reviewer. If the host cannot start a fresh isolated reviewer, generation,
fixing, and deterministic validation may still run, but the final result must
be incomplete — independent verification unavailable. Never report the
documentation as verified clean in that case.
Treat all generation and review passes as one finite workflow. A reviewer
findings report is not a stopping point while iterations remain: fix confirmed
findings and continue with a new reviewer. The independent review report is the
completion authority; deterministic validation is necessary but is not a
substitute for that report.
Workflow
Preflight resources
- Resolve
PATH to REPO_PATH before inspecting repository contents. Root
every repository read, write, command, generation, validation, backup,
cleanup, and review at REPO_PATH.
- When applying the sibling workflows, interpret every repository-relative
path in their instructions as rooted at
REPO_PATH.
- Resolve every referenced script, template, and guide from the directory of
the skill that owns it.
- Confirm required resources are readable before changing the repository.
- Never search
~/.claude, a plugin cache, or the current repository for a
similarly named bundled resource.
- If a resource cannot be resolved, stop and identify the missing resource.
Generate only when needed
- In review-only mode, skip generation.
- Otherwise, if
"$REPO_PATH/ai-docs" does not exist, follow
component-docs against REPO_PATH through generation and its
deterministic validation phase. If "$REPO_PATH/ai-docs" already exists,
skip generation and proceed directly to review.
- Before review, if
"$REPO_PATH/ai-docs/_sources" exists, run the component
validator. If validation passes, run the component cleanup helper and
verify that _sources no longer exists. If validation fails, retain the
backups for recovery and stop.
- Defer its optional offer to run
review-docs; this workflow performs that
review automatically.
Initial review and fix
- Follow
review-docs against REPO_PATH and auto-fix only verified issues.
- For each verified issue, search the entire documentation set for every
occurrence before editing, then fix all affected locations together.
- After fixing detailed sections, inspect summaries and diagrams in the same
files for simplified repetitions of the claim and fix those too.
- After all fixes, grep again for each old claim and confirm no occurrence
was missed.
- Do not auto-fix unverified or hedged cross-repository findings.
- Build a corrections manifest containing every old claim, corrected claim,
affected location, and verification source. Accumulate later corrections
into the same manifest.
Verify independently
- Re-run the component validator using its resolved skill-local path and
pass
REPO_PATH as its repository argument.
- If validation changes documentation, such as removing a broken external
link line, add that change to the corrections manifest and run validation
again before starting the reviewer.
- Start a fresh isolated reviewer and give it only
REPO_PATH, the resolved
review-docs skill path, and the complete corrections manifest.
Do not give it the fixer's reasoning or conclusions.
- Require the reviewer to follow
review-docs Phases 1-5, skip Phase 6, make
no edits, and review every scoped documentation file rather than sampling.
- Verify the complete corrections manifest as one batch: check every
correction now matches its stated corrected value, grep that it is
consistent across all files, and spot-check its cited verification source.
Do not re-derive a corrected value unless its cited source is unavailable
or contradicts itself.
- Batch related cross-repository claims as directed by
guides/CHAI-BOT-VERIFICATION.md.
- Require a report with total, verified, failed, and skipped claim counts,
broken down by local and cross-repository coverage; issues by critical,
warning, and minor severity; and either
VERIFIED CLEAN or a complete
findings list with file, line, incorrect claim, and verification source.
- Count this fresh reviewer report as one iteration.
Fix the independent findings
- If the reviewer reports critical issues or warnings, investigate each
finding against its cited source. Fix every confirmed issue across the
entire doc set and append the changes to the corrections manifest.
- If a finding is a confirmed false positive, record the evidence in the
manifest so the next reviewer can check it.
- Return to step 4 with a new isolated reviewer. Never resume the previous
reviewer. Stop after the configured maximum number of reviewer passes.
Finalize
- Source-backup cleanup depends on successful component validation, not the
independent-review verdict or Chai Bot availability. If a validated run
still has
"$REPO_PATH/ai-docs/_sources", run the component cleanup helper
even when the completion gate does not pass.
- After cleanup, verify that
"$REPO_PATH/ai-docs/_sources" no longer exists.
- Report the number of iterations, validator result, review coverage,
corrections made, remaining findings, and Chai Bot verification status.
Completion gate
The VERIFIED CLEAN verdict in the current fresh reviewer's returned report is
the completion signal. Do not search prior output or accept a verdict from an
earlier reviewer.
Report verified clean only when all of the following are true in the latest
pass:
- a fresh isolated reviewer produced the latest report;
- the component validator exits successfully;
- that reviewer reports zero critical issues and zero warnings;
- every local claim has a
verified status, with zero failed and zero skipped local claims;
- every cross-repository claim is verified.
If independent review succeeds but cross-repository verification is
unavailable, report locally verified; cross-repository claims unverified,
not an unqualified verified-clean result.
If the iteration limit is reached, stop normally and report the remaining
findings. If independent verification is unavailable, report that limitation
as incomplete. Never manufacture a completion marker or silently discard
failures.
1---2name: generate-docs3description: Generate and iteratively verify OpenShift component documentation, or review existing documentation, without relying on host-specific hooks or commands.4user-invocable: true5disable-model-invocation: true6---78# Generate and Verify Component Documentation910Run the complete component-documentation workflow in the current task. The11workflow must not depend on lifecycle hooks, transcript inspection, completion12promises, or host-specific environment variables. Use whichever native13fresh-session delegation capability the host exposes for independent14verification.1516## Bundled workflows1718Before starting, read both sibling skills completely, resolving these paths19relative to this `SKILL.md`:2021- [component-docs](../component-docs/SKILL.md)22- [review-docs](../review-docs/SKILL.md)2324Do not invoke them through host-specific slash-command syntax. Apply their25instructions directly within this task.2627## Arguments2829- `PATH`: positional skill argument for the component repository; default to30 the current working directory at invocation time. This is not the shell31 `PATH` environment variable; never assign to or export the shell `PATH`32 variable.33- `--max-iterations N`: maximum review/fix passes; default `5`. Require a34 positive integer.35- `--review` or `--skip-generate`: review and fix existing documentation36 without running component-document generation.37- `-h` or `--help`: report usage and options without changing files.3839Reject unexpected arguments before changing files. Resolve the `PATH` argument40exactly once to an absolute, canonical directory, store it in `REPO_PATH`, and41confirm it exists and is a directory.4243Use `REPO_PATH` as the target for the entire workflow: either set every44repository operation's working directory to `REPO_PATH` or use absolute paths45rooted at `REPO_PATH`. Do not use relative repository paths after this point.4647## Independent verification4849Each verification pass must use a fresh, general-purpose isolated reviewer that50has not participated in generating or fixing the documentation. Never resume or51reuse a reviewer from an earlier pass.5253Use the isolated-review capability actually exposed by the host. Common54examples are:5556- in a Codex-style runtime, use `spawn_agent`;57- in a Claude-style runtime, use a fresh `Agent` or `Task` invocation;58- in another runtime, use its equivalent fresh-session delegation capability.5960Do not invoke a local agent executable merely to simulate delegation. If none61of these capabilities is exposed, treat independent verification as62unavailable.6364The workflow agent must not substitute its own review for the independent65reviewer. If the host cannot start a fresh isolated reviewer, generation,66fixing, and deterministic validation may still run, but the final result must67be **incomplete — independent verification unavailable**. Never report the68documentation as verified clean in that case.6970Treat all generation and review passes as one finite workflow. A reviewer71findings report is not a stopping point while iterations remain: fix confirmed72findings and continue with a new reviewer. The independent review report is the73completion authority; deterministic validation is necessary but is not a74substitute for that report.7576## Workflow77781. **Preflight resources**79 - Resolve `PATH` to `REPO_PATH` before inspecting repository contents. Root80 every repository read, write, command, generation, validation, backup,81 cleanup, and review at `REPO_PATH`.82 - When applying the sibling workflows, interpret every repository-relative83 path in their instructions as rooted at `REPO_PATH`.84 - Resolve every referenced script, template, and guide from the directory of85 the skill that owns it.86 - Confirm required resources are readable before changing the repository.87 - Never search `~/.claude`, a plugin cache, or the current repository for a88 similarly named bundled resource.89 - If a resource cannot be resolved, stop and identify the missing resource.90912. **Generate only when needed**92 - In review-only mode, skip generation.93 - Otherwise, if `"$REPO_PATH/ai-docs"` does not exist, follow94 `component-docs` against `REPO_PATH` through generation and its95 deterministic validation phase. If `"$REPO_PATH/ai-docs"` already exists,96 skip generation and proceed directly to review.97 - Before review, if `"$REPO_PATH/ai-docs/_sources"` exists, run the component98 validator. If validation passes, run the component cleanup helper and99 verify that `_sources` no longer exists. If validation fails, retain the100 backups for recovery and stop.101 - Defer its optional offer to run `review-docs`; this workflow performs that102 review automatically.1031043. **Initial review and fix**105 - Follow `review-docs` against `REPO_PATH` and auto-fix only verified issues.106 - For each verified issue, search the entire documentation set for every107 occurrence before editing, then fix all affected locations together.108 - After fixing detailed sections, inspect summaries and diagrams in the same109 files for simplified repetitions of the claim and fix those too.110 - After all fixes, grep again for each old claim and confirm no occurrence111 was missed.112 - Do not auto-fix unverified or hedged cross-repository findings.113 - Build a corrections manifest containing every old claim, corrected claim,114 affected location, and verification source. Accumulate later corrections115 into the same manifest.1161174. **Verify independently**118 - Re-run the component validator using its resolved skill-local path and119 pass `REPO_PATH` as its repository argument.120 - If validation changes documentation, such as removing a broken external121 link line, add that change to the corrections manifest and run validation122 again before starting the reviewer.123 - Start a fresh isolated reviewer and give it only `REPO_PATH`, the resolved124 `review-docs` skill path, and the complete corrections manifest.125 Do not give it the fixer's reasoning or conclusions.126 - Require the reviewer to follow `review-docs` Phases 1-5, skip Phase 6, make127 no edits, and review every scoped documentation file rather than sampling.128 - Verify the complete corrections manifest as one batch: check every129 correction now matches its stated corrected value, grep that it is130 consistent across all files, and spot-check its cited verification source.131 Do not re-derive a corrected value unless its cited source is unavailable132 or contradicts itself.133 - Batch related cross-repository claims as directed by134 `guides/CHAI-BOT-VERIFICATION.md`.135 - Require a report with total, verified, failed, and skipped claim counts,136 broken down by local and cross-repository coverage; issues by critical,137 warning, and minor severity; and either `VERIFIED CLEAN` or a complete138 findings list with file, line, incorrect claim, and verification source.139 - Count this fresh reviewer report as one iteration.1401415. **Fix the independent findings**142 - If the reviewer reports critical issues or warnings, investigate each143 finding against its cited source. Fix every confirmed issue across the144 entire doc set and append the changes to the corrections manifest.145 - If a finding is a confirmed false positive, record the evidence in the146 manifest so the next reviewer can check it.147 - Return to step 4 with a new isolated reviewer. Never resume the previous148 reviewer. Stop after the configured maximum number of reviewer passes.1491506. **Finalize**151 - Source-backup cleanup depends on successful component validation, not the152 independent-review verdict or Chai Bot availability. If a validated run153 still has `"$REPO_PATH/ai-docs/_sources"`, run the component cleanup helper154 even when the completion gate does not pass.155 - After cleanup, verify that `"$REPO_PATH/ai-docs/_sources"` no longer exists.156 - Report the number of iterations, validator result, review coverage,157 corrections made, remaining findings, and Chai Bot verification status.158159## Completion gate160161The `VERIFIED CLEAN` verdict in the current fresh reviewer's returned report is162the completion signal. Do not search prior output or accept a verdict from an163earlier reviewer.164165Report **verified clean** only when all of the following are true in the latest166pass:167168- a fresh isolated reviewer produced the latest report;169- the component validator exits successfully;170- that reviewer reports zero critical issues and zero warnings;171- every local claim has a `verified` status, with zero failed and zero skipped local claims;172- every cross-repository claim is verified.173174If independent review succeeds but cross-repository verification is175unavailable, report **locally verified; cross-repository claims unverified**,176not an unqualified verified-clean result.177178If the iteration limit is reached, stop normally and report the remaining179findings. If independent verification is unavailable, report that limitation180as incomplete. Never manufacture a completion marker or silently discard181failures.