Skip to content

docs: put the template-authoring guides on the packages that exist - #483

Merged
DemchaAV merged 2 commits into
developfrom
docs/contributor-guides-on-2x
Aug 1, 2026
Merged

docs: put the template-authoring guides on the packages that exist#483
DemchaAV merged 2 commits into
developfrom
docs/contributor-guides-on-2x

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Why

A contributor who followed the authoring guide wrote code that does not compile.

docs/templates/v2-layered/contributor-guide.md describes a family as living under templates.<family>.v2 in "exactly five sub-packages", one of them a per-family theme/ with an InvoiceTheme(palette, typography, spacing, decoration) aggregate. On 2.x there is no .v2 level, a family has four sub-packages (data / components / widgets / presets, and the cover-letter family has no widgets at all), and the tokens are the shared BrandTheme in templates.core.theme. The guide also forbids editing "the v1 surface" for the same family, a surface that no longer exists. docs/README.md:21 routes every new-template contributor here.

CONTRIBUTING.md routed the same work into templates.builtins and templates.support. Neither package has held a file since the 2.0 split. It also listed the weekly schedule among the built-in templates; its data records ship, but the document is composed by an example, not by a template.

Three more documents point at things that are not in the repository, and the roadmap asks for something half-shipped.

What

The authoring guide matches the tree. Package path, sub-package list, the layer contract table, the worked invoice walkthrough, both checklists and the "must not do" list. The step that used to have the contributor write a family theme record now says there is nothing to write, and says why the tokens are shared — a private palette is how visual consistency is lost one family at a time.

The contributing guide names the real packages and stops claiming a schedule template.

Package names join RETIRED_IN_2_0_TOKENS. The guard could only match type names, which is exactly why two dead package names survived in the document that sends every new contributor to them. templates.builtins and templates.support are now caught in CONTRIBUTING.md, docs/** and .github/**.

Dead pointers removed. The extension guide sent readers to core/src/test/.../templates/builtins/ and BuiltInTemplateLayoutSnapshotTest; neither exists, and the same class name was quoted in an example's Javadoc. The layout-snapshot page listed RepositoryShowcaseRenderTest and TablePaginationIntegrationTest among six examples — the other four exist, those two do not. The docs index still warned that business-templates.md was "being reworked" for the layered surface; that rework landed in 2.0.

The roadmap asks for the half that is missing. Dropping a node DOCX cannot carry already warns (DocxSemanticBackend logs it); the entry now asks for the strict mode that refuses instead of dropping.

Nothing here touches the root README, assets/readme/, the release pipeline or CodeQL.

Tests

Core guard job as CI runs it: 37 tests, BUILD SUCCESS. qa gate: 688 tests, BUILD SUCCESS. examples compiles.

Negative check Result
put templates.builtins back in CONTRIBUTING.md fails, names the file and the token
put templates.support back in the authoring guide fails, names the file and the token

A contributor following the authoring guide wrote code that does not
compile. It described a family as `templates.<family>.v2` with exactly
five sub-packages, one of them a per-family `theme/`; 2.0 dropped the
`.v2` level and moved the tokens into the shared `templates.core.theme`,
leaving four. The contributing guide routed the same work into
`templates.builtins` and `templates.support`, neither of which has held a
file since the split, and still listed the weekly schedule among the
built-in templates although its document is composed by an example.

Package names join the retired-surface guard. It could only match types,
which is why two dead package names sat in the document that sends every
new contributor to them.

Also: the extension guide pointed at a snapshot-test directory that is
not in the repository, the layout-snapshot page listed two tests among
six that are not either, the docs index carried a rework warning for a
page reworked in 2.0, and the roadmap asked for a warning on dropped
DOCX content that the backend already emits — the part still missing is
a mode that refuses instead of dropping, which is what it now asks for.
The guide was fixed and the pages around it were not, so the folder's own
landing page still described `<name>/v2/data` with a per-family `theme/`
box, and the contributing guide contradicted itself a hundred lines below
the paragraph that had just been rewritten. A reader routed from the docs
index lands on the landing page first.

The four-sub-package claim was also wrong in the other direction: only
`presets/` is always there. CV carries all four, cover letter has no
`widgets/`, and invoice and proposal are presets alone over records in
the shared `templates.data.<family>` — which made the worked walkthrough,
built around invoice, describe directories that are not on disk. It now
presents the fullest shape and says which families take less.

Three leftovers in the same file: a required test for a `<Family>Theme`
the guide forbids two sections earlier, and two pointers into `core/` for
a parity test and its baselines that moved to `qa` in the module split.
The preset cookbook had the third.

The retired-package tokens now cover the path spelling as well as the
dotted one — the sentence that carried a dead package for a release
wrote it as a path.
@DemchaAV
DemchaAV merged commit 9540bfc into develop Aug 1, 2026
12 checks passed
@DemchaAV
DemchaAV deleted the docs/contributor-guides-on-2x branch August 1, 2026 09:57
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