Proposal I: DOCS-AS-SITE-SOURCE spec (SPEC + HOLD, no build) - #106
Merged
Conversation
Extends the existing docs/ -> wiki publish pipeline (publish_wiki.py + wiki-publish-map.json) with a second target: the site consuming docs/ the same single-source way the wiki already does, via two build-time-only outputs (rendered site pages, small JSON data extracts) driven by an extended version of the existing publish map. Corrects two premises found to not hold on inspection: catalog- completion-plan.md's status tracking is bulleted prose, not a table, and theory.md's constant citations are inline prose, not an isolated block — neither is extraction-ready under this spec's own marked-region-only contract without a small content restructure first, flagged in a new "Grounding" section rather than silently built around. - 1. Architecture: a Next.js catch-all SSG route for site pages (reusing the about.tsx dangerouslySetInnerHTML precedent for build-time-rendered HTML) + a Node prebuild script mirroring generate-keyrune-assets.js's existing codegen-to-generated/ pattern for data extracts. Flags link-rewriting as a real three-way problem (site route / wiki page / GitHub blob), proposing publish_wiki.py's transform_links/rewrite_link get shared rather than reimplemented. - 2. The map: extends wiki-publish-map.json's per-page schema with a targets array (wiki/site/data); proposes an initial mapping with judgment calls flagged explicitly (user-guide.md, self-hosting.md, overview.md, theory.md as site candidates; federation specs and operator-facing docs as wiki-only). - 3. Extraction contract: DATA-EXTRACT/END DATA-EXTRACT HTML-comment markers around markdown tables only, mirroring publish_wiki.py's existing GENERATED_MARKER convention; a broken/missing marker is a hard build error, same fail-fast philosophy as its link-resolution errors. - 4. Sequencing: flags that deploy-frontend.yml does NOT currently trigger on docs/** at all (found by reading the actual workflow, not assumed) - a required trigger-path fix for "docs change -> site rebuild" to actually fire, not an implementation detail. - 5. What v1 is not: no CMS, no runtime fetching, no site-side editing, build-time only. Added docs/README.md's Plans & proposals row and a docs_lint.py ALLOWLIST entry for the spec's one proposed-not-yet-built script path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AHfxN9bbWAWHs8rfzVtBWt
WilfordGrimley
pushed a commit
that referenced
this pull request
Jul 19, 2026
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AHfxN9bbWAWHs8rfzVtBWt
…-spec-cvq14g # Conflicts: # docs/README.md
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016i9S7LQsCL3FGaih3ZTRBJ
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
New HOLD spec,
docs/proposals/proposal-i-docs-as-site-source.md— no build, owner review pending. Goal per the task: the site consumesdocs/the way the wiki already does, single source, multi-target, everything updating per-merge.§0 Grounding (added before the requested sections, since it corrects two premises the task assumed):
docs/features/catalog-completion-plan.md's status tracking is nested bulleted prose, not a markdown table, anddocs/theory.md's weight/constant citations are inline prose, not an isolated block — neither is extraction-ready under §3's own marked-region-only contract without a small content restructure first. Flagged explicitly rather than silently built around or silently reshaping the premise. Also records the concrete facts the rest of the spec is built on: no markdown-rendering library exists infrontend/package.jsonyet, the frontend is already a static export,generate-keyrune-assets.jsis a real precedent for build-time codegen intofrontend/src/common/generated/,about.tsxalready establishes adangerouslySetInnerHTMLpattern for pre-rendered content, and — the one finding that changes the sequencing design —deploy-frontend.ymldoes not currently trigger ondocs/**at all.§1 Architecture: a Next.js catch-all SSG route for rendered site pages (markdown → HTML at build time, wrapped in existing site chrome/Superhero styling) + a Node prebuild script for structured JSON data extracts, mirroring the keyrune codegen precedent's output-location convention. Flags link-rewriting as a real three-way problem (site route / wiki page / GitHub blob, vs.
publish_wiki.py's existing two-way case) and proposes sharing itstransform_links/rewrite_linklogic rather than reimplementing it.§2 The map: extends
.github/wiki-publish-map.json's schema with atargetsarray (wiki/site/data) and proposes an initial mapping, with judgment calls called out explicitly (e.g. whether to publishuser-guide.md's current skeleton state to the site now or wait for it to be finished).§3 Extraction contract:
<!-- DATA-EXTRACT: name --> ... <!-- END DATA-EXTRACT -->markers around markdown tables only, mirroringpublish_wiki.py's existingGENERATED_MARKERconvention. A broken or missing marker is a hard build error, matching its existing link-resolution fail-fast philosophy.§4 Sequencing: the required
deploy-frontend.ymltrigger-path fix (found by reading the workflow, not assumed), where the data-extract script hooks into the build (prebuild, notpostinstall— docs don't change onnpm install), and the full merge → wiki regenerate → site rebuild sequence.§5 What v1 is not: no CMS, no runtime doc fetching, no site-side editing, build-time only.
Also updates
docs/README.md's "Plans & proposals" table with the new entry, and adds onedocs_lint.pyALLOWLISTentry for the spec's one proposed-not-yet-built script path (frontend/scripts/generate-docs-data.js).Test plan
python3 .github/scripts/docs_lint.py— clean.npx prettier@2.7.1 --check(pinned version) on the touched markdown files — clean.python3 -m black --check --diff .github/scripts/docs_lint.py(pinned 22.8.0) — clean.next.config.jscontents,about.tsx's rendering approach,deploy-frontend.yml's trigger paths,catalog-completion-plan.md/theory.md's actual structure) verified directly against the repo, not assumed from the task's own framing.🤖 Generated with Claude Code
https://claude.ai/code/session_01AHfxN9bbWAWHs8rfzVtBWt
Generated by Claude Code