Extension guide
Everything a new site needs is two JSON documents and one function call. This page is the short version of what the validator will and will not accept.
The interface
import { renderFlagship } from './packages/runtime/index.mjs';
const bundle = renderFlagship({ brief, contract });
bundle.files; // { 'index.html', 'styles.css', 'runtime.js' } as strings
bundle.manifest.files; // per file: mediaType, byteSize, sha256
bundle.inputSha256; // digest of the exact canonical inputs
The renderer is pure: no filesystem, network, clock, randomness, shell, provider,
approval, or release authority. It renders twice internally and throws if the two
renders differ by a byte. Writing files is the caller's job, and
scripts/build-demo.mjs is the caller both examples use.
The two documents
The contract is fixed. Copy it unchanged from an existing example: it pins the renderer id, the composition grammar, the motion boundary, the accessibility floor, and the extraction provenance. Weakening any term is a rejection, not a setting.
The brief is yours. It carries the identity, the disclosure, the hero, the proof ledger, the chapters, the closing scene, and the palette.
Bounds the validator enforces
| Field | Bound |
|---|---|
slug, every id | Lowercase, hyphenated, unique across the whole brief |
metadata.label | Must contain the word synthetic |
metadata.notice | Must contain the word fictional, and must equal identity.disclosure |
proof.items | 3 to 6 records, each with a label, a value, and a note |
chapters | 3 to 5 chapters, so the page renders 6 to 8 ordered scenes |
chapters[].facts | 1 to 4 records per chapter |
chapters[].asset | null, or a package-relative path with real alt text and a caption |
finale.primaryCta | Must repeat hero.primaryCta exactly |
| Every string | Trimmed, non-empty, length-bounded, no dummy or filler tokens |
| Every link | A fragment or a repository-relative page; no scheme, no leading slash, no .. |
palette | Six six-digit hex colors, at least five distinct |
| Contrast | ink on ground, muted on ground, ink on paper, and accent text on accent each at or above 4.5 |
Rejections arrive as one BLOCKED_FLAGSHIP_PUBLIC_RENDER error listing
every broken term at once, so you fix the set rather than one term per run.
Add an example in four steps
- Copy an existing brief and rewrite every string and color for your fictional subject.
- Copy the contract next to it, unchanged.
- Copy the example build script, which does nothing but delegate, and point it at your two documents.
- Build into a directory you name, then serve it:
node examples/your-example/build.mjs --out ../scratch/your-example python3 -m http.server 4173 -d ../scratch/your-example
New files must also be listed in PUBLIC-BOUNDARY.json, in ascending path
order, or the boundary verifier rejects the tree. That allowlist is deliberately fail-closed.
What the build checks before it writes
- Two renders of identical inputs produce identical bytes.
- Every emitted file matches its manifest byte count and SHA-256 digest.
- No output path is absolute, escaping, or otherwise unsafe.
- The h1, the primary action, the synthetic disclosure, and the open proof ledger are in the served HTML.
- Every reference stays repository-relative, so the site survives being served from a subpath.
- The stylesheet removes animation and transition time under reduced motion, and the settled composition is the default state.
- The motion runtime stays inside its byte ceiling, with no ambient loop and no content mutation.
What none of that proves
The checks are reject-only. A green run can disqualify an artifact; it cannot approve taste, invent a user, claim an outcome, or authorize a release. Human taste is pending and belongs to the author, and external adoption is pending as recorded in the adoption boundary.