ADR 0005 — The theme goes home: jekyll-theme-zer0 is developed in its own repository, a Rails theme studio lives beside it, and zer0-CMS is the content-management half that consumes it¶
- Status: accepted 2026-10-21; amended by ADR 0006 (decisions 3 and 4 superseded: the React site renderer takes each site over and ports the design at a recorded theme tag) — implemented in
../plan/PLAN.mdPhase T — T1 (this pull request: the theme leaves this repository), T2 (the studio, inbamr87/zer0-mistakes), T3 (the platform's per-site theme record), T4 (the fleet hub re-registers the theme as a submodule). - Amends: ADR 0002 — decisions 2–5 no longer apply to the theme:
bamr87/zer0-mistakesis not a read-only mirror but the theme's home; there is nojekyll-theme-zer0release component here; the theme's docs site stays on zer0-mistakes.com from its own repository (the domain move in §4 is cancelled, and this repository's Pages deploy targets its own project site); Phase F has no cutover for the theme's docs. ADR 0003 — decision 2 ("the framework ships no person") is ported upstream by the pull request this record names; decision 4's one remaining vendoredunwrap-prose.pycopy went with the theme; decision 6's history-rewrite plan loses the theme paths. ADR 0004 is unchanged: the CMS stays one Python backend, and the Ruby half of the stack — Jekyll, the theme, the theme's tooling — lives with the theme. - Inputs: the owner's direction of 2026-10-21 (take the theme framework back to its original repository; build a Ruby on Rails tool that customizes, updates and designs it; keep zer0-CMS as the content-management portion of the platform, using the theme when it publishes static content), the four shape decisions answered the same day (studio in the theme repo; the theme only; the monorepo's changes ported as a draft PR; each site pins its own theme), and the inventories taken of the theme's internals and of every place this repository referenced it.
Context¶
ADR 0002 decided that the theme would live here and bamr87/zer0-mistakes would become a read-only mirror. That never happened: the mirror workflow was never armed, and the original repository kept moving — at the time of this record it is at v1.31.3 with 777 commits, its own release pipeline to RubyGems, its own Pages deploy of zer0-mistakes.com, propagation to ten consumer sites, and thirty-one workflows, with ten commits since the import that this repository never received. Meanwhile the copy here gathered seven commits of its own, of which three carry theme behaviour (the "ship no person" refactor, a Liquid fix in the setup wizard, and the docs site's own byline), one is already upstream (the model ids) and three are this repository's conventions rather than the theme's (the agent-file pointer pattern, the deletion of PR evidence that upstream generates on purpose, an editor setting). Two homes for one codebase is the situation ADR 0002 set out to end, and for the theme the cheaper end is the original.
The theme is also the one part of the stack whose tooling is Ruby by necessity — Jekyll is Ruby — and it already carries most of "customize and design" as JavaScript and shell: the Site Builder wizard, the skin editor and palette generator, audit-consumer, propagate.rb, the installer with its profiles, validate, release, the design-system parity check. What it lacks is a stateful, multi-site operator console that drives those against real files with a diff, a digest guard and a live log. That is a Rails tool, and it belongs where the files it edits live.
Decisions¶
| # | Decision | Mechanism that enforces it |
|---|---|---|
| 1 | bamr87/zer0-mistakes is the theme's canonical repository. packages/zer0-mistakes/ leaves this repository once its theme changes are upstream (the port is a draft pull request there, with each commit's provenance). A theme change is a pull request on the theme's repository, never here. |
bin/zer0 check: no zer0-mistakes project, no depends_on naming it, no vendored source under packages/zer0-mistakes/; theme-mirror.yml and zer0-mistakes.yml deleted |
| 2 | The studio lives at studio/ in the theme repository, as a Rails app that customizes, updates and designs the theme: it edits the theme's tokens, skins and registries at the source with a diff and a digest guard, keeps a registry of consumer sites and edits their theme keys and overrides, drives the theme's own scripts (validate, audit-consumer, propagate.rb, release --dry-run, the design-system check, Jekyll builds) as jobs with a live log, previews builds in a sandboxed cross-origin iframe, and carries a theme doctor. It never changes what the gem ships, and Jekyll excludes it. |
the theme's gem-build check and scripts/bin/validate (studio/ in both exclude: lists); the studio's own gem_boundary_test |
| 3 | Each site declares its theme, and the platform records it. A site's Gemfile (jekyll-theme-zer0 at a version) or _config.yml (remote_theme: bamr87/zer0-mistakes@tag) is what the Pages build uses; the exporter never rewrites that pin; the platform records theme_source, theme_version and theme_skin per site and surfaces a newer release when one exists (read on demand, never at boot). The studio's bump pull requests and theme-release dispatch reach a site through that site's own repository and the consumer kit — the CMS publishes no theme change itself. |
SiteSettings fields (PLAN G2/T3) and a test that export_jekyll leaves the pin's bytes untouched |
| 4 | drsai keeps a cross-repository gate. Its CI builds the site against the theme's main checked out beside it (the ZER0_THEME_LOCAL path gem the site already supports), on every drsai change and weekly, so a theme change that breaks the site is still caught — on drsai's side, since the theme's own pull requests cannot see it. |
drsai.yml job "Jekyll build against bamr87/zer0-mistakes main" |
| 5 | The theme's docs site stays the platform's largest round-trip fixture, read from a pinned checkout (ZER0_THEME_CHECKOUT, default .cache/zer0-mistakes, fetched by content.yml at a tag) and skipped with a reason where the checkout is absent. |
content/tests/importers/test_jekyll.py REAL_SITES |
| 6 | The fleet hub re-registers the theme as a submodule (projects/zer0-mistakes) and drops the mirror note from its registry; the hub's loops treat it as a normal repository again. |
the hub's drift gate (registry ↔ .gitmodules parity) |
What leaves, and what stays¶
| Leaves this repository | Stays, changed |
|---|---|
packages/zer0-mistakes/ (1,865 tracked files), the zer0-mistakes registry entry and its / Pages route, the eight depends_on edges, two vendored: entries, zer0-mistakes.yml, theme-mirror.yml, the theme's row in docs/MONOREPO.md § What still depends on the original repositories, PLAN C2's theme component, C3 (the mirror), D1-7 (the docs site's cutover) |
rails/lib/zer0_cms/data/frontmatter_schema.yml (a copy of the theme's front-matter schema, refreshed from the theme repository by tag; its README records the commit), zer0 doctor's rules naming bamr87/zer0-mistakes and jekyll-theme-zer0, the extension's zer0-mistakes platform overlay and its pinned fixtures (copies from the original at recorded commits), media/fleet-feedback*.js (from the hub's kit, not the theme), every site's remote_theme/gem declaration, pages.yml (one Pages site for the in-repo sites, under this repository's project site), drsai.yml (against a checkout of the theme), content.yml (the pinned fixture checkout) |
Consequences¶
- One codebase, one home, in both directions: this repository stops carrying a stale copy of the theme, and the theme's repository stops being a mirror nobody armed. The three theme-behaviour changes made here reach upstream as reviewed commits with their provenance.
- The Ruby split is now by role, not by accident: Jekyll, the theme and the theme studio are Ruby in the theme repository; the CMS is Python in this one; the Rails fleet CMS here is still being absorbed by the platform (ADR 0004) and donates its patterns — the confined paths, the digest-guarded atomic write, the loopback-or-password guard, the nonce CSP — to the studio by copy.
- Sites in this repository build exactly as GitHub Pages builds them: from the theme release or
remote_themetag each declares. A theme regression reaches a site only through a pin change the site's own CI gates — or, for drsai, is caught against the theme'smainbefore any pin moves. - The hub registers the theme and this repository as sibling submodules again, which is what its loops assume; the registry's "mirror" note was the only thing that said otherwise.
Progress¶
Ticked milestones live in ../plan/PLAN.md Phase T; this ADR changes only when a decision above changes.