Skip to content

feat: add Sphinx documentation scaffolding to template#1

Merged
mariushelf merged 1 commit into
mainfrom
feat/docs-scaffolding
Jun 11, 2026
Merged

feat: add Sphinx documentation scaffolding to template#1
mariushelf merged 1 commit into
mainfrom
feat/docs-scaffolding

Conversation

@mariushelf

Copy link
Copy Markdown
Owner

Summary

Vendors the documentation scaffold (from the update-docs skill's assets) into
the 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 docs
dependency group, and a drift-tripwire test harness.

This implements the doc-tooling/HANDOVER-copier-template.md work order.

What lands in a generated project

Source asset Lands at
docs-source-skeleton/ (whole tree) docs/source/
meta layer (voice.md, documentation_guide.md, writing_documentation.md) docs/source/contributing/
makefile-targets.mk appended to Makefile
docs dependency group merged into pyproject.toml [dependency-groups]
tests-docs-harness/ tests/docs/

Templating

Only files needing substitution carry a .jinja suffix (copier renders content
only for suffixed files; everything else — including _templates/autosummary/module.rst,
which is itself Jinja meant for Sphinx — is copied verbatim):

  • conf.py.jinjaPROJECT_NAME = project_name, DIST_NAME =
    project_slug | replace('_','-') (the PyPI/distribution name, distinct from
    the human title on purpose), AUTHOR = author_name.
  • index.md.jinja — title + intro from project_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 is
never forked, so scaffolded repos stay consistent with what the check-docs
audit expects.

CI / verification

  • The generated project's CI (cicd.yaml) gains a docs job: make docs-strict
    (Sphinx -W, warnings = errors) + make test-docs.
  • The template's own test suite (tests/test_template.py) now asserts a freshly
    generated project: renders the scaffold with placeholders resolved, builds with
    make docs-strict, and passes make 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, and
pre-commit over the full tree. Full template suite: 9 passed.

Note

The vendored tests/docs/test_doc_claims.py harness needed two small lint
adaptations to satisfy this template's ruff config (a D205 single-line summary,
and moving a # noqa: F401 out of a commented-out example to avoid RUF100).
Worth backporting to the upstream skill asset so other scaffolded repos don't hit
the same.

🤖 Generated with Claude Code

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>
@mariushelf mariushelf merged commit 0533042 into main Jun 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant