feat: add Sphinx documentation scaffolding to template#1
Merged
Conversation
Vendor the update-docs docs scaffold into the copier template so generated projects start with a Sphinx + MyST site (docs/source/ only), organised by audience, plus docs build targets, a docs dependency group, and the tests/docs/ drift-tripwire harness. - docs/source/ skeleton with conf.py/index.md/python-api.md templated from copier answers; the meta-layer (voice, documentation_guide, writing_documentation) vendored byte-identically into contributing/ - Makefile docs targets and a [dependency-groups] docs group - tests/docs/ harness; generated-project CI builds docs with -W and runs the drift tests - template test suite asserts make docs-strict and make test-docs pass on a freshly generated project Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vendors the documentation scaffold (from the
update-docsskill's assets) intothe copier template so that new projects start with a working Sphinx + MyST
documentation site — organised by audience (orientation / users / operators /
maintainers), with only
docs/source/rendered, plus build targets, a docsdependency group, and a drift-tripwire test harness.
This implements the
doc-tooling/HANDOVER-copier-template.mdwork order.What lands in a generated project
docs-source-skeleton/(whole tree)docs/source/voice.md,documentation_guide.md,writing_documentation.md)docs/source/contributing/makefile-targets.mkMakefilepyproject.toml[dependency-groups]tests-docs-harness/tests/docs/Templating
Only files needing substitution carry a
.jinjasuffix (copier renders contentonly for suffixed files; everything else — including
_templates/autosummary/module.rst,which is itself Jinja meant for Sphinx — is copied verbatim):
conf.py.jinja—PROJECT_NAME=project_name,DIST_NAME=project_slug | replace('_','-')(the PyPI/distribution name, distinct fromthe human title on purpose),
AUTHOR=author_name.index.md.jinja— title + intro fromproject_name/project_short_description.reference/python-api.md.jinja— autosummary root =project_slug.The meta layer is vendored byte-identically (it already carries a provenance
header pointing back to the canonical copy in the skill's
assets/meta/); it isnever forked, so scaffolded repos stay consistent with what the
check-docsaudit expects.
CI / verification
cicd.yaml) gains adocsjob:make docs-strict(Sphinx
-W, warnings = errors) +make test-docs.tests/test_template.py) now asserts a freshlygenerated project: renders the scaffold with placeholders resolved, builds with
make docs-strict, and passesmake test-docs.Verified locally end-to-end — a generated project builds docs with zero Sphinx
warnings, and passes
make test-docs,make lint,make test, andpre-commitover the full tree. Full template suite: 9 passed.Note
The vendored
tests/docs/test_doc_claims.pyharness needed two small lintadaptations to satisfy this template's ruff config (a
D205single-line summary,and moving a
# noqa: F401out of a commented-out example to avoidRUF100).Worth backporting to the upstream skill asset so other scaffolded repos don't hit
the same.
🤖 Generated with Claude Code