Skip to content

Proposal I: DOCS-AS-SITE-SOURCE spec (SPEC + HOLD, no build) - #106

Merged
WilfordGrimley merged 3 commits into
masterfrom
docs-as-site-source-spec-cvq14g
Jul 19, 2026
Merged

Proposal I: DOCS-AS-SITE-SOURCE spec (SPEC + HOLD, no build)#106
WilfordGrimley merged 3 commits into
masterfrom
docs-as-site-source-spec-cvq14g

Conversation

@WilfordGrimley

Copy link
Copy Markdown

Summary

New HOLD spec, docs/proposals/proposal-i-docs-as-site-source.md — no build, owner review pending. Goal per the task: the site consumes docs/ 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, and docs/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 in frontend/package.json yet, the frontend is already a static export, generate-keyrune-assets.js is a real precedent for build-time codegen into frontend/src/common/generated/, about.tsx already establishes a dangerouslySetInnerHTML pattern for pre-rendered content, and — the one finding that changes the sequencing design — deploy-frontend.yml does not currently trigger on docs/** 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 its transform_links/rewrite_link logic rather than reimplementing it.

§2 The map: extends .github/wiki-publish-map.json's schema with a targets array (wiki/site/data) and proposes an initial mapping, with judgment calls called out explicitly (e.g. whether to publish user-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, mirroring publish_wiki.py's existing GENERATED_MARKER convention. A broken or missing marker is a hard build error, matching its existing link-resolution fail-fast philosophy.

§4 Sequencing: the required deploy-frontend.yml trigger-path fix (found by reading the workflow, not assumed), where the data-extract script hooks into the build (prebuild, not postinstall — docs don't change on npm 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 one docs_lint.py ALLOWLIST entry 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.
  • Every factual claim in §0 (dependency list, next.config.js contents, 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

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 and others added 2 commits July 19, 2026 00:55
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016i9S7LQsCL3FGaih3ZTRBJ
@WilfordGrimley
WilfordGrimley merged commit 2c177ff into master Jul 19, 2026
2 checks passed
@WilfordGrimley
WilfordGrimley deleted the docs-as-site-source-spec-cvq14g branch July 19, 2026 01:00
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.

2 participants