Docs Check
Quick Start
Use this skill when documentation changes may introduce mismatches with:
- Code and config source of truth
- Other existing docs in the same section
- English and corresponding Chinese docs
Always read reference.md first, then run the workflow below.
Two harnesses in this folder do the mechanical part; run them before reasoning
about content:
# Does the page still build? Both Read the Docs projects use fail_on_warning.
python3 .agents/skills/docs-check/build_docs.py # en + zh
# Does CJK punctuation break inline markup, loudly or silently?
python3 .agents/skills/docs-check/check_rst_markup.py # needs docutils
# Does the page still name things the code has?
python3 .agents/skills/docs-check/check_doc_symbols.py
Inputs
Collect these inputs before reviewing:
- Changed doc files (or target docs to validate)
- Corresponding EN and ZH files for the same topic
- Related code/config files referenced by the docs
If scope is unclear, default to checking:
docs/source-en/ and docs/source-zh/ counterparts
rlinf/config.py (SupportedModel)
rlinf/envs/__init__.py (SupportedEnvType)
- Referenced scripts under
examples/, toolkits/, ray_utils/, and requirements/
Workflow
- Read
reference.md and extract the relevant checklist items.
- Run the build harness for both languages and fix every warning:
python3 .agents/skills/docs-check/build_docs.py (add --lang zh to
iterate faster on a Chinese-only failure).
- The two Read the Docs projects build independently with
fail_on_warning: true, so an English-clean page can still turn
docs/readthedocs.org:rlinf-cn red. Never conclude "docs are fine"
from one language.
- Then
python3 .agents/skills/docs-check/check_rst_markup.py for the
inline-markup defects that render wrong without warning.
- Verify doc-to-code correctness:
- Commands exist and are runnable in principle.
- Script/module paths in docs exist.
- Config keys and values match real code/config names.
- Model/env names match
SupportedModel and SupportedEnvType string values.
- Verify doc-to-doc consistency within one language:
- Terminology is consistent across start/tutorials/examples/API pages.
- New page is linked in the correct index/toctree.
- No conflicting instructions between related pages.
- Internal doc links use stable
:doc:/relative links, not hardcoded ReadTheDocs URLs.
- Verify EN-ZH parity:
- Same topic coverage and section structure.
- Same commands, config keys, and model/env identifiers.
- Translations preserve technical meaning (do not rename code symbols).
- Corresponding EN/ZH pages use equivalent stable internal links.
- Verify natural-language flow:
- Treat continuity as a requirement for every article, including landing,
recipe, reference, and non-code prose pages. Adapt the depth of the lead to
the page type, but do not exempt a page from establishing its purpose and
order.
- The first prose sentence after the title, or after a leading figure, states
directly what the page explains, enables, routes, or lets the reader look
up. Background must not delay the page's purpose until a later paragraph.
- The page introduction establishes the reader's starting situation, the
promised result, the topic boundary, and the order of the explanation.
- Read the introduction followed only by each section's opening paragraph.
They must form a coherent outline in which every section follows from the
state established before it.
- Each section opens by stating the question it resolves and its connection
to the surrounding workflow; it does not begin abruptly with code, a table,
an API identifier, or a fact unrelated to the previous section.
- Paragraphs develop one argument in dependency order rather than forming a
reorderable list of correct facts.
- Every public operation in the primary example is explained in caller order,
including the relevant input or return value and lifecycle effect. Each
non-trivial code block has a stated purpose and an interpretation.
- Start from a concrete reader question, explain the idea in ordinary
language, then introduce the exact API term and example.
- Headings, cards, and opening sentences do not introduce unexplained
implementation terms. An identifier heading is appropriate only on a
lookup-oriented API or reference page, or after the term is established.
- English reads as direct colleague-to-colleague prose, without canned
transitions, uniform paragraph rhythms, or promotional summaries.
- Chinese follows natural Chinese logic rather than English clause order.
Familiar developer terms stay in English when translating them would sound
unusual or make the code harder to search.
- Chinese uses restrained written technical language: neither casual chat nor
bureaucratic prose.
- Chinese prose paragraphs and prose list items stay on one source line.
A hard wrap inside prose renders as a visible space between Chinese
characters even when the source contains no typed space.
- Report findings with severity and concrete fixes.
Severity Rules
Critical: A Sphinx warning in either language — Read the Docs fails the
build, so the page does not ship at all.
Critical: Wrong command/path/key/value that can break user workflow.
Major: Inconsistent docs that likely mislead users.
Major: An unexplained implementation term in a heading or opening breaks the
reading flow on a concept, guide, or extending page.
Major: A page or section lacks a lead, sections do not form a logical
progression, or the primary example uses public operations that the prose
never explains.
Minor: Wording/terminology drift without immediate breakage.
Minor: Formulaic or translated prose is understandable but does not read
naturally in its language.
Prefer actionable findings with exact file paths and corrected values.
Hardcoded ReadTheDocs links to RLinf docs should be reported as at least Major.
Output Format
Use this format when reporting results:
## Docs Check Findings
- Critical: <issue>, in `<path>`
- Why: <impact>
- Fix: <specific correction>
- Major: <issue>, in `<path>`
- Why: <impact>
- Fix: <specific correction>
- Minor: <issue>, in `<path>`
- Why: <impact>
- Fix: <specific correction>
## Verified
- <what was checked and confirmed>
If no issues are found, explicitly state:
No doc-code or EN-ZH consistency issues found in checked scope.
Guardrails
- Do not invent model/env/config names; verify against source files.
- Do not change code to match incorrect docs unless explicitly requested.
- Keep EN and ZH technical tokens identical where applicable (paths, CLI flags, keys, enum values).
- Do not force-translate familiar terms such as
policy, key, value,
mapping, endpoint, worker, binding, wrapper, mock SDK, contract,
shape, schema, and API; explain their role in natural Chinese and retain
the searchable term when that is normal developer usage. In RL prose, keep
policy in English rather than translating it as “策略”; generic strategies,
such as a placement strategy, may still use “策略”.
- When uncertain, flag as an assumption and request confirmation.
- Do not keep RLinf internal links as hardcoded
readthedocs.io/.../rst_source/... URLs; convert to :doc: or relative internal links.
Quick Detection
Use this regex scan to detect unstable hardcoded RLinf docs links:
readthedocs\.io/(en|zh-cn)/latest/rst_source/
Chinese pages: or `**` sitting directly against `(`, `《` or a CJK character is the single most common way to break `rlinf-cn`. Grep for ````( and **( ```` as a first pass, then run
check_rst_markup.py for the full rule.
Additional Resource
- Detailed checklist and paths: reference.md
- Local Read the Docs gate for both languages: build_docs.py
- Inline-markup checker: check_rst_markup.py
- Name checker: check_doc_symbols.py
1---2name: docs-check3description: Cross-check RLinf documentation against code, natural explanation flow, and other docs, including English-Chinese parity. Use when adding or editing docs, reviewing doc PRs, validating commands/config keys/model-env names, or checking EN/ZH readability and consistency.4---56# Docs Check78## Quick Start910Use this skill when documentation changes may introduce mismatches with:1112- Code and config source of truth13- Other existing docs in the same section14- English and corresponding Chinese docs1516Always read `reference.md` first, then run the workflow below.1718Two harnesses in this folder do the mechanical part; run them before reasoning19about content:2021```bash22# Does the page still build? Both Read the Docs projects use fail_on_warning.23python3 .agents/skills/docs-check/build_docs.py # en + zh2425# Does CJK punctuation break inline markup, loudly or silently?26python3 .agents/skills/docs-check/check_rst_markup.py # needs docutils2728# Does the page still name things the code has?29python3 .agents/skills/docs-check/check_doc_symbols.py30```3132## Inputs3334Collect these inputs before reviewing:3536- Changed doc files (or target docs to validate)37- Corresponding EN and ZH files for the same topic38- Related code/config files referenced by the docs3940If scope is unclear, default to checking:4142- `docs/source-en/` and `docs/source-zh/` counterparts43- `rlinf/config.py` (`SupportedModel`)44- `rlinf/envs/__init__.py` (`SupportedEnvType`)45- Referenced scripts under `examples/`, `toolkits/`, `ray_utils/`, and `requirements/`4647## Workflow48491. Read `reference.md` and extract the relevant checklist items.502. Run the build harness for **both** languages and fix every warning:51 - `python3 .agents/skills/docs-check/build_docs.py` (add `--lang zh` to52 iterate faster on a Chinese-only failure).53 - The two Read the Docs projects build independently with54 `fail_on_warning: true`, so an English-clean page can still turn55 `docs/readthedocs.org:rlinf-cn` red. Never conclude "docs are fine"56 from one language.57 - Then `python3 .agents/skills/docs-check/check_rst_markup.py` for the58 inline-markup defects that render wrong *without* warning.593. Verify doc-to-code correctness:60 - Commands exist and are runnable in principle.61 - Script/module paths in docs exist.62 - Config keys and values match real code/config names.63 - Model/env names match `SupportedModel` and `SupportedEnvType` string values.644. Verify doc-to-doc consistency within one language:65 - Terminology is consistent across start/tutorials/examples/API pages.66 - New page is linked in the correct index/toctree.67 - No conflicting instructions between related pages.68 - Internal doc links use stable `:doc:`/relative links, not hardcoded ReadTheDocs URLs.695. Verify EN-ZH parity:70 - Same topic coverage and section structure.71 - Same commands, config keys, and model/env identifiers.72 - Translations preserve technical meaning (do not rename code symbols).73 - Corresponding EN/ZH pages use equivalent stable internal links.746. Verify natural-language flow:75 - Treat continuity as a requirement for every article, including landing,76 recipe, reference, and non-code prose pages. Adapt the depth of the lead to77 the page type, but do not exempt a page from establishing its purpose and78 order.79 - The first prose sentence after the title, or after a leading figure, states80 directly what the page explains, enables, routes, or lets the reader look81 up. Background must not delay the page's purpose until a later paragraph.82 - The page introduction establishes the reader's starting situation, the83 promised result, the topic boundary, and the order of the explanation.84 - Read the introduction followed only by each section's opening paragraph.85 They must form a coherent outline in which every section follows from the86 state established before it.87 - Each section opens by stating the question it resolves and its connection88 to the surrounding workflow; it does not begin abruptly with code, a table,89 an API identifier, or a fact unrelated to the previous section.90 - Paragraphs develop one argument in dependency order rather than forming a91 reorderable list of correct facts.92 - Every public operation in the primary example is explained in caller order,93 including the relevant input or return value and lifecycle effect. Each94 non-trivial code block has a stated purpose and an interpretation.95 - Start from a concrete reader question, explain the idea in ordinary96 language, then introduce the exact API term and example.97 - Headings, cards, and opening sentences do not introduce unexplained98 implementation terms. An identifier heading is appropriate only on a99 lookup-oriented API or reference page, or after the term is established.100 - English reads as direct colleague-to-colleague prose, without canned101 transitions, uniform paragraph rhythms, or promotional summaries.102 - Chinese follows natural Chinese logic rather than English clause order.103 Familiar developer terms stay in English when translating them would sound104 unusual or make the code harder to search.105 - Chinese uses restrained written technical language: neither casual chat nor106 bureaucratic prose.107 - Chinese prose paragraphs and prose list items stay on one source line.108 A hard wrap inside prose renders as a visible space between Chinese109 characters even when the source contains no typed space.1107. Report findings with severity and concrete fixes.111112## Severity Rules113114- `Critical`: A Sphinx warning in either language — Read the Docs fails the115 build, so the page does not ship at all.116- `Critical`: Wrong command/path/key/value that can break user workflow.117- `Major`: Inconsistent docs that likely mislead users.118- `Major`: An unexplained implementation term in a heading or opening breaks the119 reading flow on a concept, guide, or extending page.120- `Major`: A page or section lacks a lead, sections do not form a logical121 progression, or the primary example uses public operations that the prose122 never explains.123- `Minor`: Wording/terminology drift without immediate breakage.124- `Minor`: Formulaic or translated prose is understandable but does not read125 naturally in its language.126127Prefer actionable findings with exact file paths and corrected values.128129Hardcoded ReadTheDocs links to RLinf docs should be reported as at least `Major`.130131## Output Format132133Use this format when reporting results:134135```markdown136## Docs Check Findings137138- Critical: <issue>, in `<path>`139 - Why: <impact>140 - Fix: <specific correction>141142- Major: <issue>, in `<path>`143 - Why: <impact>144 - Fix: <specific correction>145146- Minor: <issue>, in `<path>`147 - Why: <impact>148 - Fix: <specific correction>149150## Verified151152- <what was checked and confirmed>153```154155If no issues are found, explicitly state:156157`No doc-code or EN-ZH consistency issues found in checked scope.`158159## Guardrails160161- Do not invent model/env/config names; verify against source files.162- Do not change code to match incorrect docs unless explicitly requested.163- Keep EN and ZH technical tokens identical where applicable (paths, CLI flags, keys, enum values).164- Do not force-translate familiar terms such as `policy`, `key`, `value`,165 `mapping`, `endpoint`, `worker`, `binding`, `wrapper`, `mock SDK`, `contract`,166 `shape`, `schema`, and `API`; explain their role in natural Chinese and retain167 the searchable term when that is normal developer usage. In RL prose, keep168 `policy` in English rather than translating it as “策略”; generic strategies,169 such as a placement strategy, may still use “策略”.170- When uncertain, flag as an assumption and request confirmation.171- Do not keep RLinf internal links as hardcoded `readthedocs.io/.../rst_source/...` URLs; convert to `:doc:` or relative internal links.172173## Quick Detection174175Use this regex scan to detect unstable hardcoded RLinf docs links:176177- `readthedocs\.io/(en|zh-cn)/latest/rst_source/`178179Chinese pages: `` `` `` or `**` sitting directly against `(`, `《` or a CJK180character is the single most common way to break `rlinf-cn`. Grep for181```` ``( ```` and ```` **( ```` as a first pass, then run182`check_rst_markup.py` for the full rule.183184## Additional Resource185186- Detailed checklist and paths: [reference.md](reference.md)187- Local Read the Docs gate for both languages: [build_docs.py](build_docs.py)188- Inline-markup checker: [check_rst_markup.py](check_rst_markup.py)189- Name checker: [check_doc_symbols.py](check_doc_symbols.py)