Skip to content

docs: a VitePress developer site over the design record - #8

Open
HalfSweet wants to merge 7 commits into
pocket-stack:mainfrom
HalfSweet:docs/vitepress-site
Open

docs: a VitePress developer site over the design record#8
HalfSweet wants to merge 7 commits into
pocket-stack:mainfrom
HalfSweet:docs/vitepress-site

Conversation

@HalfSweet

Copy link
Copy Markdown
Contributor

What this is

A developer-facing docs site under docs/, built with VitePress. It is a
readable layer over the existing record, not a rewrite: docs/VOXEL.md
is untouched and joins the nav as the Design Record; the byte-layout truth
stays in contracts/spec/voxel-spec.ts and voxelmon/SCHEMA.md, and the new
pages summarize and link instead of forking facts.

Contents

  • Home — hero + hardware captures, stat badges, the cook/run pipeline as
    an HTML two-panel diagram hinged on the pak node.
  • Guide (7 pages) — getting started, architecture, asset pipeline,
    quality ladder, PSP, Vita, testing & determinism. Distilled from VOXEL.md,
    SCHEMA.md and tools/voxel.ts (not restated from the README), with mermaid
    diagrams where the record drew ascii boxes.
  • Reference (4 pages) — the tools/voxel.ts commands, the surface op
    vocabulary, data & formats (.tape / .vtrace / VXPK sections), and a
    glossary of the project's invented vocabulary.
  • Contributing — the hard rules collected in one place (content boundary,
    identity anchor, no-moving-boundary, the 24 px cull invariant, formula
    provenance, spec codegen). Two items are newly codified rather than quoted
    from the record: the "golden accounting goes in the PR" convention, and the
    docs-layering rule itself.
  • CI.github/workflows/docs.yml deploys to GitHub Pages on push to
    main (docs paths). Needs Pages → Source: "GitHub Actions" set once; the
    build needs no submodules, no ROM, no reference checkouts.

Decisions worth reviewing

  • Where VOXEL.md disagrees with itself, the site follows the newest state:
    the 16-byte v8 vertex (§7 ceremony, §12 PakVert) rather than the stale
    20-byte wording of §2/§6/§9. Pak-size figures are deliberately not restated
    anywhere.
  • The VitePress config is config.mts because the package declares no
    "type": "module" and vitepress is ESM-only.
  • Mermaid renders client-side (~1 MB lazy chunk on diagram pages only); the
    theme CSS keeps .vp-doc typography from leaking into diagram labels.

Try it

bun install
bun run docs:dev      # live
bun run docs:build    # what CI runs; validates links

bun-run scripts (docs:dev / docs:build / docs:preview), and the generated
.vitepress cache and dist stay out of commits the same way dist/ does.
The config is .mts on purpose: this package declares no "type": "module"
and vitepress is ESM-only, so a .ts config dies in esbuild's require path.
The theme layers over the default one with no component overrides: the
grass-green palette, the hero gradient, screenshot and pipeline styling,
and two mermaid rules earned the hard way — .vp-doc typography must not
leak into HTML labels (it inflates them past the boxes mermaid measured),
and the dark theme's translucent .labelBkg is replaced by one
page-background caption per edge label.
Hero gradient over a glowing PSP capture, stat badges, feature cards that
link into the guide, and the cook/run pipeline as a two-panel HTML diagram
hinged on the pak node — no ascii.
Seven pages — getting started, architecture, asset pipeline, quality
ladder, PSP, Vita, testing & determinism — distilled from VOXEL.md,
SCHEMA.md and tools/voxel.ts rather than restated from the README, with
mermaid diagrams where the record drew boxes. Where the record disagrees
with itself (§2/§6/§9 still say 20-byte vertices; §7's ceremony and §12's
PakVert are the v8 16-byte format), these pages follow the newest state.
The byte-layout truth stays in contracts/spec/voxel-spec.ts and
voxelmon/SCHEMA.md; these pages summarize and link instead of forking it.
The glossary carries the project's invented vocabulary — rung, dial,
tape, ceremony — which is the page a new reader needs first.
The six rules a PR can break without noticing: the content boundary, the
identity anchor, the no-moving-boundary rule, the 24 px cull invariant,
formula provenance, and the spec codegen ceremony.
Push-to-main on docs paths, or by hand. The build needs no submodules, no
ROM and no reference checkouts; Pages must be set to "GitHub Actions"
once in the repo settings.
@HalfSweet
HalfSweet marked this pull request as ready for review August 11, 2026 14:58
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