What plinth-elements does, and does not

Pages composed from data, complete before any script runs, with more of the same content pulled in place — each claim tied to the example that shows it and the ledger row that proves it.

What it is

plinth-elements is the composed half of plinth: a way to lay out a page as a tree of named elements declared as data — columns and rows, headings and texts, cards, lists, tables, publicity places, forms, a search box, a course's quiz and outline — so that a site can take new shapes without the engine learning anything about that site, and without the site learning to run code. The engine's SPEC states the aim in one line: an extension "to extend the flexibility of plinth by offering more possibilities for content presentation in a very controlled manner based on display element grouping and composition", with the focus "clearly on security, reliability and performance, in order of importance" (SPEC section 4a, ELM-01 to ELM-22).

Three things are true of every composed page. It is complete before any script runs: a visitor without scripts, a crawler and a print preview all see the whole page (ELM-03). Where there is more of the same content than one page should carry, a small runtime pulls it in place — and every one of those further pages is also a real page at a real address (ELM-06, ELM-07). And nothing the runtime touches can run: what it fetches is data, validated before use and rendered by the same code the build used (ELM-09).

plinth itself does not change. A composed portfolio is EDN and Markdown in a repository; a build is a pure function of that data and a build instant; the output is static files. Every portfolio that does not compose builds byte-identical to before the extension existed, and the suite holds it to that (V-267).

What it does

Seven things, each shown by an example bundled with the engine and each proven by a row of the engine's verification ledger. The rows are named so that a reader can check the proof rather than take the claim.

Diagram: the data repository — portfolio.edn in composed mode, compositions as trees of kinds bound to data, items and text — goes through bb build into the page complete (every element and its data in the HTML, further pages and a deferred element's page as real pages) and the chunks beside it (projections through each kind's allow-list, named by their bytes, inert as pages); the browser without scripts shows the page as built, and with scripts pulls the chunks in place: nothing before the load event, at most four in flight, each validated by generated readers, any failure leaving the page as built.
One build, two roads: the page complete first, the chunks beside it for more of the same content on demand — and nothing that can run.

Pages composed from data

A page is a composition: a tree of kinds from a closed registry — seventeen at 0.107.0 — declared in compositions/<id>.edn and bound to data through one road, :bind: the page's own item, the portfolio's title, a named item, a pool selected by tags, categories, facts and order, or a literal (ELM-01, ELM-02). A portfolio declares :mode :composed and which composition renders its home and its item pages; the engine's routes, canonical addresses, feeds, sitemap and structured data stay the engine's (ELM-17). A data repository composes; it never defines a kind, supplies render code or names an address for an element to fetch.

Every mistake is refused before a build, in plain language that names the composition, the path and the requirement: an unknown kind, an option the kind lacks, a missing binding, a cycle of compositions, a page naming no composition (CON-10). The catalogue of kinds, docs/ELEMENTS-CATALOGUE.md, is generated from the registry — every kind with its options, its data shape, a complete example and the HTML that example renders — and fails the build when it drifts (ELM-20).

Shown by the glossary, a hundred and forty-one terms of hand bookbinding as a front of cards by group and a page per term. Proven by V-267.

Complete first, more on demand

A list, a definitions list or a table may be pulled: its first page ships in the HTML — twelve entries by default, fifty at most — and the rest as real pages at page/2/, page/3/ and so on, and as chunks a scheduler fetches in place behind a More link (ELM-06). An element may be deferred: an empty placeholder with a real "Show all" page, filled as it nears the viewport. A page's first element and a page's only element are never deferred (ELM-03).

A chunk is a projection: only the keys a kind's allow-list names leave the build, never a text's HTML and never a private datum; it is named by the hash of its bytes, held under sixty-four kibibytes, and served with the headers that keep it inert if opened as a page (ELM-05, ELM-06). The scheduler is a pure state machine tested over generated sequences of events: nothing before the page's load event, at most four requests in flight, one fetch per address, two retries then silence, Save-Data respected, everything aborted when the page leaves (ELM-12).

Shown by the news front, forty-eight stories with the latest twelve on the front and each section deferred behind its heading, and by the evening post, a tabloid-dense front on a wide canvas with a narrow rail. Proven by V-270 and V-276.

Publicity places

A publicity place is an element too: `[:elm/place {:slot :stream :at 3}]` puts one of the portfolio's declared places where the composition wants it, and the build selects the day's fill as it does for a feed page — the daily rotation, and the adjacency rule that keeps a travel advertisement away from a casualty notice (ELM-13). A slot may rotate at view time: the build writes the day's other admissible fills as a chunk, and after the page loads the viewer shows one of them, chosen by a seed of its own, never by anything about the visitor and never recorded.

Fills are committed files of the site's own; nothing is requested from an advertising network and nothing is reported to one. Shown by [the gallery of places](https://demos.publish.network/publicity-gallery/), every place and shape family on one page, and by the places between the stories of the evening post. Proven by V-274 and V-275.

Forms that send nothing

A form is a composition of form kinds — one typed field, fieldsets, a form in steps — and nothing a visitor types ever leaves the site: the form either shows the answers back in the page or opens the visitor's own mail program with them, addressed to the portfolio's contact, which is never written into the page assembled (ELM-14). Every rule about a field is written once and read three ways: the build writes the browser's own constraint attributes from the field's declaration, the module reads them back and judges the answers with the same rule, and an endpoint, when one exists, would run the same rule over a posted body. Without scripts every field is there to read and fill, the button stays disabled and a note says what scripts would do.

A failed attempt is named in the page's own language: a sentence under each failing field, a summary at the top that takes the focus and links each problem to its control, nothing said before the first attempt. Shown by the gallery of fields, by the three-step membership form of the moth society, and by the enquiry form on every line of the ironmongery. Proven by V-281 and V-282.

Search in the page

A search element indexes a pool at build time into a chunk of keys — the title and the summary folded to one case under a fixed locale — and, once the index has arrived, filters the page's own list as the visitor types, rendering the matches with the same template the build used (ELM-15). The query goes nowhere: not into the address, not into a query string, not into storage. Without scripts the list stands as the A to Z it is.

Shown by the front of the glossary, the search over all hundred and forty-one terms with the eight group grids deferred behind it. Proven by V-284.

A course that keeps its own score

A course is a composed site whose lessons are items carrying their own quiz as content. The quiz is a form the build writes from the lesson's data, checked in the page with the answer on each question's group — a self-check holds no secret, and without scripts the answers wait behind a disclosure (ELM-19). A lesson answered all right marks itself done in the visitor's own browser: one entry per site holding the slugs of the lessons done and nothing else, forgotten by a button, read back with validation, disclosed on the site's privacy page (ELM-22). An outline marks the lesson being read; a progress line counts the lessons done.

Shown by the twelve evenings, an invented course of celestial navigation with a two-question quiz per lesson. Proven by V-285.

Soft navigation

A composed site may navigate softly. With :navigation :soft, a click on a link to another page of the site fetches that page's own HTML, swaps its main and footer in, updates the title and the address, moves the focus to the new heading and says the new title — and every address stays a real page, so a reload, a deep link, a visitor without scripts and a crawler all see the same site (ELM-16). Links elsewhere, downloads, new-tab clicks and clicks with a modifier key are the browser's as before; anything that fails becomes a full navigation to the same address (ELM-10). The pulls of the page left behind are ended, and the page arriving is discovered as if it had just loaded.

It is an enhancement of a complete multi-page site, never a client-routed application whose pages exist only after scripts run. Shown by the news front, where a story and the front swap in place. Proven by V-286.

What it does not do

This list is as long as the other, by design.

  • It is not a content management system (NG-01). Nothing here edits data; a composition is a file in a repository, and the loop that changes it is the owner's, with or without an assistant.
  • It is not a server (NG-03). A chunk is a file; the runtime sends same-origin GET requests for the page's own files and nothing else; there is no endpoint, no session, no account.
  • It is not a channel to third parties (NG-04, PRIV-01). No script, font, image or fill is loaded from anywhere but the site; nothing is reported to anyone; no consent banner arises because nothing consent-worthy is done.
  • It is not a client-routed application (BLD-06). Every page is built; soft navigation, where a site opts in, moves between real pages and falls back to a full navigation.
  • **It does not make private content public, and it does not make public content less public.** A chunk is a projection of what a public page already shows, named by its hash; hash-naming prevents enumeration, not access (ELM-05). Content for members only is outside this work, by the engine owner's decision.
  • Forms send nothing from the site. A form previews in the page or hands the visitor's own mail program a link; an endpoint that receives answers waits on a separate design and is not here (ELM-14).
  • No external advertising network. Publicity is the site's own committed fills (ELM-13).
  • No image element, no section fronts, no commerce block in a composition: three open questions on the engine owner's desk, not promises.
  • **No service worker, no offline mode, and no shipped security header**: the header's shipping is a hosting decision taken elsewhere; what this work does is conform to it (ELM-09).

Security, reliability, performance

Security, first. The runtime builds DOM nodes from a tree — text as text, attributes as rendered, URL attributes checked against an allow-list of schemes at three gates — and contains no sink that turns a string into markup; a lint holds every file of the extension to it, and the lint's own test proves it can fail (ELM-08, ELM-09). A chunk is untrusted though it is the site's own: it is validated by readers generated from the same shapes the build validates with, never retried on a validation failure, and a chunk that fails leaves the page as built. Every built page of every fixture and example is swept for what a strict content security policy forbids — no inline script, no handler attribute, no javascript: address, no external resource — and the sweep fails the build (V-267, V-270).

Reliability, second. Every failure has a stated outcome and each outcome is a test under a fake fetch: scripts off, the runtime blocked, a fetch that fails or times out, a chunk that does not fit, a navigation mid-pull, a soft navigation that fails — the page as built stands, its real links remain, a mount applies at most once, a soft navigation that fails becomes a full one (ELM-10, V-270, V-286). Build-time mistakes are build failures with plain messages, never wrong pages.

Performance, third. Nothing is fetched before the page's load event, no pulled chunk is a largest-contentful-paint source, and the runtime loads only where a page's elements need it: a base module and feature modules for forms, search, the course and soft navigation, each held alone to forty-eight kibibytes compressed by a test that prints the sizes — the base measured 48892 bytes at 0.107.0 (ELM-11, V-286). The engine's own viewer, plinth.js, is byte-identical to before the extension existed. Dense pages are the design: entries render under content-visibility: auto with intrinsic sizes, so a front of forty stories costs the browser only what is on screen (ELM-18, V-276).

How the claims are held. The same composition renders the same tree on Babashka, the JVM and ClojureScript in node, and an oracle compares them case by case and proves it can fail; the fixtures' pages and chunks are blessed goldens compared byte for byte; every test was mutation-checked from a committed baseline, one full suite per mutation, and each ledger row names the mutations it caught; the suite also runs under the Turkish locale (ELM-21). The browser oracle rows — every example opened at a phone width and a desktop width — are in the specification as built.

Diagram: the pure core in .cljc — the closed registry of kinds, the shapes with their readers and the URL rule, compose, render, project, the scheduler, the families' rules — feeds one adapter, elements.js, which turns the page's happenings into events and the scheduler's commands into fetches, timers and DOM nodes, with the feature modules elements-forms.js, elements-search.js, elements-course.js and elements-nav.js beside it; below, the lint (no platform interop in the core, no string-to-markup sink) and the oracle (Babashka, the JVM and ClojureScript in node rendering every case to the same tree).
A pure core and one adapter per module: the same code renders at build and in the browser, a lint keeps the sinks out, and three runtimes must agree tree for tree.

The examples

Eight composed examples ship with the engine, each generated from one source so it cannot drift, each named with an invented name, each a fixture of the oracles above, all composed under the demo domain this page belongs to:

  • A Glossary of Hand Bookbinding — examples/glossary: compositions, a page per term, the search over all terms, the group grids deferred.
  • The Harbour Ledger — examples/news-front: the pull twelve a page, each section deferred, soft navigation between the front and the stories.
  • Places and fills — examples/publicity-gallery: every publicity place and shape family, the daily and the view-time rotation, the adjacency rule at work.
  • Northfield Ironmongery — examples/catalogue: the dense table with facts in every row, rooms deferred by section, the enquiry form on every line.
  • The Wexbury Evening Post — examples/dense-front: the tabloid-dense front on a wide canvas, pictured cards, places between.
  • Every field, every step — examples/forms-gallery: every field type, both submit targets, one step and five.
  • The Stillwater Moth Society — examples/club: notices, a pictured gallery, the three-step membership form.
  • Celestial Navigation in Twelve Evenings — examples/course: twelve lessons with their quizzes, the progress kept in the visitor's own browser.

The links above lead to the demo assembly at https://demos.publish.network/, where each example is a member beside this document; the engine can also build each as a standalone site at an address of its own, a scheme not in use for now.

How to adopt it

A composed site is built in the loop every plinth data repository already uses, with or without an assistant; nothing about compositions changes who does what.

  1. Compose. Declare :mode :composed and :pages in portfolio.edn; write compositions/<id>.edn from the catalogue's kinds and the author's guide (docs/DATA-REPOS.md, "Compositions"). An assistant may write them — from the catalogue, never from invention: no kind that is not listed, no address for an element to fetch, no content the owner has not supplied.
  2. Check. bb doctor :dir <the repository's absolute path> names every refusal in plain language — the composition, the path, the requirement — and the loop runs until it is clean. The refusals are the contract an assistant iterates against (CON-10, DOC-06).
  3. Preview. bb build into a folder, served on the owner's machine only — bb serve :dir <absolute folder> :ip 127.0.0.1 — and opened with scripts and without, at a phone width too. A preview on the owner's machine is the only thing an assistant hands over.
  4. Sign off. The owner approves the preview; then the commit. The deploy is never an assistant's: it is the human tag-push the repository's CI performs (CI-04, HOST-03, DOC-07).

The handbook, a document built by the same engine, tells the rest of the story: the data model, the build, the modes.

Where the record is

This document is a built portfolio itself — a :mode :document member of the demo domain, printable with bb doc-pdf — and a test holds every ledger row, requirement and example it names to the engine's record, so it cannot say what the engine no longer does.

  • The normative text: SPEC.md, section 4a, "Composed elements (ELM)" — twenty-two requirements with their states, and a decision log that records every ruling in the words it was given.
  • The specification as built: docs/ELEMENTS-SPECIFICATION.md, consolidated from the SPEC and the design note and held to both by a test.
  • The design and its record: docs/design/2026-10-13-plinth-elements.md — the brief, the questions asked before each slice, the rulings, what each slice landed.
  • The verification ledger: docs/VERIFICATION.md, rows V-267 to V-286 for this work, each with the suite's numbers, the gates observed and the mutations caught, under a standing miss rate.
  • The catalogue of kinds, generated from the registry: docs/ELEMENTS-CATALOGUE.md; the developer's guide: docs/ELEMENTS.md; the author's guide: docs/DATA-REPOS.md, "Compositions".