Use this skill when reviewing a pull request that changes pipeline behavior, stage boundaries, generated artifacts, or public library functions.
Documentation review is a harness check, not copyediting. Confirm that durable documentation still describes the code paths an agent or maintainer would use to understand, validate, or modify the pipeline.
Do not put PR-specific confidence, impact, or reviewer notes into Pydoc docstrings or pipeline decorators. Keep durable facts in the source docs and keep review judgment in the PR description or review comment.
Run documentation review when a PR changes any of these paths:
modal_app/policyengine_us_data/calibration/policyengine_us_data/datasets/policyengine_us_data/pipeline_metadata.pypolicyengine_us_data/pipeline_schema.pydocs/pipeline_map.yamldocs/generated/docs/engineering/pipeline-map.mdscripts/extract_pipeline_docs.pyscripts/guards/pipeline_docs.pyscripts/guards/pydoc_completeness.py
Also run it when a PR changes public import surfaces, artifact names, validation commands, staging/promotion behavior, or step-manifest semantics even if the changed path is not listed above.
Check that changed pipeline behavior has a durable documentation surface:
- New or changed semantic waypoints have a
@pipeline_nodedecorator or an explicit node indocs/pipeline_map.yaml. - Stage and substage placement matches the five canonical stages and the
1a_/1b_substage naming scheme. - Edges describe real data, artifact, validation, or orchestration relationships.
statusandstabilityvalues are honest for transitional code.validation_commandsare focused and point to existing tests or scripts.- Generated docs build when decorator, Pydoc, or map source changes. PRs that
change decorator metadata, Pydoc-facing source, or
docs/pipeline_map.yamlshould refresh the checked-in generated artifacts in the same change. - Pipeline documentation segment edits require the same treatment: if a PR
changes source text that feeds generated pipeline docs or AI-facing pipeline
guidance, verify whether
scripts/extract_pipeline_docs.pyoutput changes and commit the refreshed generated artifacts when it does. - Stale architecture names, folder names, and artifact names are not preserved in durable documentation sources or generated output.
For changed public library functions and classes:
- Stable library functions/classes have useful docstrings.
- Function signatures include meaningful parameter and return types when practical.
- Modules that declare
__all__include promoted public functions/classes. - Docstrings explain durable behavior, inputs, outputs, and failure modes. They should not include PR-specific confidence, impact, or implementation debate.
Run the documentation and quality harness before handing off a documentation review:
uv run --no-sync --with pyyaml python scripts/run_quality_guards.py
uv run --no-sync --with pyyaml --with pytest pytest tests/unit/test_pipeline_docs_extractor.py tests/unit/test_pipeline_doc_guards.pyIf reviewing generated pipeline-doc build behavior, run the extractor against a temporary output directory:
out_dir="$(mktemp -d)"
uv run --no-sync --with pyyaml python scripts/extract_pipeline_docs.py \
--json "$out_dir/pipeline_map.json" \
--api-json "$out_dir/pipeline_api.json" \
--markdown "$out_dir/pipeline-map.md"If reviewing documentation build behavior, also run:
uv run --no-sync --with "mystmd>=1.7.0" make documentationUse a concise PR-facing note. Include:
- Touched stages or substages, or
none. - Documentation changes observed, or
not requiredwith a reason. - Commands run, or commands not run with a reason.
- Impact:
low,medium, orhigh. - Confidence:
low,medium, orhigh. - Known gaps that should be handled in this PR or a follow-up.
Prefer file/line references for requested documentation changes. Do not approve documentation coverage only because the structural guards pass; those guards catch shape errors, while review should catch missing or misleading content.