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.4---56# Generate and Verify Component Documentation78Run the complete component-documentation workflow in the current task. The9workflow must not depend on lifecycle hooks, transcript inspection, completion10promises, or host-specific environment variables. Use whichever native11fresh-session delegation capability the host exposes for independent12verification.1314## Bundled workflows1516Before starting, read both sibling skills completely, resolving these paths17relative to this `SKILL.md`:1819- [component-docs](../component-docs/SKILL.md)20- [review-docs](../review-docs/SKILL.md)2122Do not invoke them through host-specific slash-command syntax. Apply their23instructions directly within this task.2425## Arguments2627- `PATH`: positional skill argument for the component repository; default to28 the current working directory at invocation time. This is not the shell29 `PATH` environment variable; never assign to or export the shell `PATH`30 variable.31- `--max-iterations N`: maximum review/fix passes; default `5`. Require a32 positive integer.33- `--review` or `--skip-generate`: review and fix existing documentation34 without running component-document generation.35- `-h` or `--help`: report usage and options without changing files.3637Reject unexpected arguments before changing files. Resolve the `PATH` argument38exactly once to an absolute, canonical directory, store it in `REPO_PATH`, and39confirm it exists and is a directory.4041Use `REPO_PATH` as the target for the entire workflow: either set every42repository operation's working directory to `REPO_PATH` or use absolute paths43rooted at `REPO_PATH`. Do not use relative repository paths after this point.4445## Independent verification4647Each verification pass must use a fresh, general-purpose isolated reviewer that48has not participated in generating or fixing the documentation. Never resume or49reuse a reviewer from an earlier pass.5051Use the isolated-review capability actually exposed by the host. Common52examples are:5354- in a Codex-style runtime, use `spawn_agent`;55- in a Claude-style runtime, use a fresh `Agent` or `Task` invocation;56- in another runtime, use its equivalent fresh-session delegation capability.5758Do not invoke a local agent executable merely to simulate delegation. If none59of these capabilities is exposed, treat independent verification as60unavailable.6162The workflow agent must not substitute its own review for the independent63reviewer. If the host cannot start a fresh isolated reviewer, generation,64fixing, and deterministic validation may still run, but the final result must65be **incomplete — independent verification unavailable**. Never report the66documentation as verified clean in that case.6768Treat all generation and review passes as one finite workflow. A reviewer69findings report is not a stopping point while iterations remain: fix confirmed70findings and continue with a new reviewer. The independent review report is the71completion authority; deterministic validation is necessary but is not a72substitute for that report.7374## Workflow75761. **Preflight resources**77 - Resolve `PATH` to `REPO_PATH` before inspecting repository contents. Root78 every repository read, write, command, generation, validation, backup,79 cleanup, and review at `REPO_PATH`.80 - When applying the sibling workflows, interpret every repository-relative81 path in their instructions as rooted at `REPO_PATH`.82 - Resolve every referenced script, template, and guide from the directory of83 the skill that owns it.84 - Confirm required resources are readable before changing the repository.85 - Never search `~/.claude`, a plugin cache, or the current repository for a86 similarly named bundled resource.87 - If a resource cannot be resolved, stop and identify the missing resource.88892. **Generate only when needed**90 - In review-only mode, skip generation.91 - Otherwise, if `"$REPO_PATH/ai-docs"` does not exist, follow92 `component-docs` against `REPO_PATH` through generation and its93 deterministic validation phase. If `"$REPO_PATH/ai-docs"` already exists,94 skip generation and proceed directly to review.95 - Before review, if `"$REPO_PATH/ai-docs/_sources"` exists, run the component96 validator. If validation passes, run the component cleanup helper and97 verify that `_sources` no longer exists. If validation fails, retain the98 backups for recovery and stop.99 - Defer its optional offer to run `review-docs`; this workflow performs that100 review automatically.1011023. **Initial review and fix**103 - Follow `review-docs` against `REPO_PATH` and auto-fix only verified issues.104 - For each verified issue, search the entire documentation set for every105 occurrence before editing, then fix all affected locations together.106 - After fixing detailed sections, inspect summaries and diagrams in the same107 files for simplified repetitions of the claim and fix those too.108 - After all fixes, grep again for each old claim and confirm no occurrence109 was missed.110 - Do not auto-fix unverified or hedged cross-repository findings.111 - Build a corrections manifest containing every old claim, corrected claim,112 affected location, and verification source. Accumulate later corrections113 into the same manifest.1141154. **Verify independently**116 - Re-run the component validator using its resolved skill-local path and117 pass `REPO_PATH` as its repository argument.118 - If validation changes documentation, such as removing a broken external119 link line, add that change to the corrections manifest and run validation120 again before starting the reviewer.121 - Start a fresh isolated reviewer and give it only `REPO_PATH`, the resolved122 `review-docs` skill path, and the complete corrections manifest.123 Do not give it the fixer's reasoning or conclusions.124 - Require the reviewer to follow `review-docs` Phases 1-5, skip Phase 6, make125 no edits, and review every scoped documentation file rather than sampling.126 - Verify the complete corrections manifest as one batch: check every127 correction now matches its stated corrected value, grep that it is128 consistent across all files, and spot-check its cited verification source.129 Do not re-derive a corrected value unless its cited source is unavailable130 or contradicts itself.131 - Batch related cross-repository claims as directed by132 `guides/CHAI-BOT-VERIFICATION.md`.133 - Require a report with total, verified, failed, and skipped claim counts,134 broken down by local and cross-repository coverage; issues by critical,135 warning, and minor severity; and either `VERIFIED CLEAN` or a complete136 findings list with file, line, incorrect claim, and verification source.137 - Count this fresh reviewer report as one iteration.1381395. **Fix the independent findings**140 - If the reviewer reports critical issues or warnings, investigate each141 finding against its cited source. Fix every confirmed issue across the142 entire doc set and append the changes to the corrections manifest.143 - If a finding is a confirmed false positive, record the evidence in the144 manifest so the next reviewer can check it.145 - Return to step 4 with a new isolated reviewer. Never resume the previous146 reviewer. Stop after the configured maximum number of reviewer passes.1471486. **Finalize**149 - Source-backup cleanup depends on successful component validation, not the150 independent-review verdict or Chai Bot availability. If a validated run151 still has `"$REPO_PATH/ai-docs/_sources"`, run the component cleanup helper152 even when the completion gate does not pass.153 - After cleanup, verify that `"$REPO_PATH/ai-docs/_sources"` no longer exists.154 - Report the number of iterations, validator result, review coverage,155 corrections made, remaining findings, and Chai Bot verification status.156157## Completion gate158159The `VERIFIED CLEAN` verdict in the current fresh reviewer's returned report is160the completion signal. Do not search prior output or accept a verdict from an161earlier reviewer.162163Report **verified clean** only when all of the following are true in the latest164pass:165166- a fresh isolated reviewer produced the latest report;167- the component validator exits successfully;168- that reviewer reports zero critical issues and zero warnings;169- every local claim has a `verified` status, with zero failed and zero skipped local claims;170- every cross-repository claim is verified.171172If independent review succeeds but cross-repository verification is173unavailable, report **locally verified; cross-repository claims unverified**,174not an unqualified verified-clean result.175176If the iteration limit is reached, stop normally and report the remaining177findings. If independent verification is unavailable, report that limitation178as incomplete. Never manufacture a completion marker or silently discard179failures.