feat(docs): split the published set by audience, public and development

The site's sidebar held the landing page and one guide next to seventeen
architecture records, the migration register, the review procedure and five
PRDs. Nothing there is secret -- every development page may be read by anyone --
but a reader who wants to know what Archie is and how to point an event at it
was meeting contributor material with no signal that it was not for them.

One source tree now yields two sets: public (index, guides/) under /docs/, and
development (architecture/, prds/) under /dev/, each with its own artifact and
its own derived sidebar. archive/, inspiration/, news/ and the credential notes
stay out of both, unchanged.

Selective PRD publication is gone rather than carried over. It existed only
because settled architecture cites PRDs and a link to a held-back target fails
the generator, so five PRDs published to keep those citations alive; with both
halves of every such citation in the development set, the exception has no work
left to do. Both sets are generated in one pass over one url map, so a citation
that crosses between them resolves to the base its target is served under, and
the refusal now fires only for a target genuinely in neither set.

Widening the set exposed a scanner bug worth its own note: the link regex
matched `Resolve[T](i, src, exportPath)` inside a code span and refused the page
for a link to `i,`. Code spans and fenced blocks are now skipped, because what a
renderer draws as a link is the only thing this tool may rewrite or refuse a
page for.

docs/prds/public-and-dev-docs.md records the decision. Draft: the three choices
in it are the maintainer's, the write-up is not yet reviewed.
This commit is contained in:
sam committed 2026-09-22 13:41:13 +10:00
1 parent 59ffcdf229
commit 28e85758ae
8 files changed
+1187 -453

No files matched your search

+19 -16
View File
@@ -132,20 +132,23 @@ tasks:
- go -C tools run -mod=readonly ./newsgen check --repo-root ..
docs:artifact:
desc: Regenerate the canonical public-docs artifact from the Markdown sources
desc: Regenerate the canonical docs artifacts from the Markdown sources
summary: |
Writes docs/data/generated/docs.json: every published page's url, title,
section and raw Markdown body, plus the sidebar tree derived from the
layout. The JSON is the canonical, host-neutral fact set a renderer reads;
the Markdown stays the source. MkDocs was the first renderer and the Astro
app is the second, so the artifact is the product.
Writes docs/data/generated/docs.json and dev-docs.json: every published
page's url, title, section and raw Markdown body, plus the sidebar tree
derived from the layout, one file per set. The JSON is the canonical,
host-neutral fact set a renderer reads; the Markdown stays the source.
MkDocs was the first renderer and the Astro app is the second, so the
artifact is the product.
The published set lives in tools/docsite/main.go with the reasons for what
is held back -- archive/, inspiration/, news/, most of prds/ and the
credential notes -- because a renderer reading the artifact cannot see why
a page is absent.
Two sets, split by audience: the public set (served under /docs/) is what a
reader of the product needs, the development set (/dev/) is architecture/
and prds/. The split and the reasons for what is held back entirely --
archive/, inspiration/, news/ and the credential notes -- live in
tools/docsite/main.go, because a renderer reading an artifact cannot see
why a page is absent from it.
The file is committed, so this dirties the tree deliberately: review the
The files are committed, so this dirties the tree deliberately: review the
diff and commit it with the page that produced it.
The artifact's keys are a frozen contract: an application is built against
@@ -154,14 +157,14 @@ tasks:
- go -C tools run -mod=readonly ./docsite --repo-root ..
docs:artifact:check:
desc: Verify the committed public-docs artifact matches the Markdown sources
desc: Verify the committed docs artifacts match the Markdown sources
summary: |
Reproduces the artifact in a temporary directory and fails when the
committed file differs, without modifying the working tree. Runs in
`task check`, so a page edit cannot land without its regeneration.
Reproduces both artifacts in memory and fails when a committed file
differs, without modifying the working tree. Runs in `task check`, so a
page edit cannot land without its regeneration.
The generated directory is accounted for by docsgen's generatedArtifacts,
which names this file alongside contracts.json: one registry for the
which names both files alongside contracts.json: one registry for the
directory rather than one per writer.
cmds:
- go -C tools run -mod=readonly ./docsite check --repo-root ..