Docs site design¶
Intent¶
allmyram's docs (the design spec, plans, acceptance notes, experiments) exist only as loose markdown. Give them a built, browsable site like the ones transpire and runningtab have, and bring the "How allmyram runs" diagrams, drawn as a claude.ai artifact, into that site where they will be kept current.
Goals¶
just docs-buildbuildsdocs/intosite/and fails on any warning, such as a broken link or a missing diagram file.just docs-servepreviews the site with live reload.- The diagrams render in the site, follow its light/dark toggle, and change in the same commit as the design change they illustrate.
- Mermaid is available, and is the first choice for any diagram it can draw.
Non-goals¶
- CI and publishing. The repo has no remote yet; add them once it does.
- Python in the repo. No
pyproject.toml, no virtualenv. - API reference generated from Go source.
Approaches¶
Where the master copy of the diagrams lives:
- Repo is the source; the artifact is retired (chosen). Diagrams live in
docs/and are reviewed with the prose. The artifact stays as a frozen snapshot; Claude can republish it from the repo files on request. - Artifact is the source, repo pulls from it. Rejected: only Claude's Artifact
tool can read it, so no
justrecipe can sync it, and the repo copy drifts. - Rewrite everything as Mermaid. Rejected for the figures Mermaid can't draw well (see below); adopted for the ones it can.
How the SVG figures render:
- A. Inline SVG (chosen): one
.svgper figure, pulled into the page withpymdownx.snippets, colored by a stylesheet keyed to Zensical's theme. - B. iframe the original HTML. Rejected: ignores the theme toggle, keeps loading Google Fonts, reads as a foreign page.
Design¶
Tooling (copied from runningtab): zensical.toml at the repo root;
justfile gains a docs group with docs-build (build --clean --strict)
and docs-serve, both running
uvx --python 3.14+gil --from 'zensical>=0.0.52' zensical. site/ is
git-ignored. Verified in a scratch build: snippets and Mermaid fences both
work in Zensical 0.1.3, and a missing snippet fails the strict build.
Markdown extensions: runningtab's set, plus pymdownx.snippets with
check_paths = true, plus transpire's Mermaid custom fence.
Diagrams. The artifact's four figures become one explanation page,
docs/explanation/how-allmyram-runs.md, with each figure's lead and caption
as ordinary markdown:
| Figure | Form | Why |
|---|---|---|
| The hoard | SVG | Spatial layout across machines and the tailcat band. |
| One job, end to end | Mermaid sequence diagram | It is a message sequence; a note covers the pod's shared localhost. |
| What keeps a job boxed in | SVG | Side-by-side platforms with blocked paths; Mermaid can't show it. |
| How a run ends | Mermaid state diagrams | Two small state machines. |
The two SVGs live in docs/diagrams/ with their markup copied from the
artifact. docs/stylesheets/diagrams.css (via extra_css) carries the
artifact's SVG class rules, with its color tokens mapped to Zensical's
variables (--md-default-fg-color, --md-default-bg-color, and so on). The
gold "allowed" and red "blocked" colors keep their own light and dark values,
switched on [data-md-color-scheme="slate"]. The Google Fonts go; the figures
use the site's fonts.
Navigation: Home (a new short index.md), Explanation (How allmyram runs),
Design records (the design spec, plan 1, plan 1 acceptance, experiments).
Left to the builder¶
- Any broken links or strict-mode warnings the existing docs raise: fix them.
- The git-ignored
.clearance-rendered-preview-*folders underdocs/: they aren't committed, but Zensical builds everything indocs/. Keep them out of local builds if they cause warnings, using whatever exclusion Zensical actually supports (check its docs; don't guess). - Kata: follow
kata quickstart --format contractfor tracking this work.