Back to the synthetic demo

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

FieldBound
slug, every idLowercase, hyphenated, unique across the whole brief
metadata.labelMust contain the word synthetic
metadata.noticeMust contain the word fictional, and must equal identity.disclosure
proof.items3 to 6 records, each with a label, a value, and a note
chapters3 to 5 chapters, so the page renders 6 to 8 ordered scenes
chapters[].facts1 to 4 records per chapter
chapters[].assetnull, or a package-relative path with real alt text and a caption
finale.primaryCtaMust repeat hero.primaryCta exactly
Every stringTrimmed, non-empty, length-bounded, no dummy or filler tokens
Every linkA fragment or a repository-relative page; no scheme, no leading slash, no ..
paletteSix six-digit hex colors, at least five distinct
Contrastink 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

  1. Copy an existing brief and rewrite every string and color for your fictional subject.
  2. Copy the contract next to it, unchanged.
  3. Copy the example build script, which does nothing but delegate, and point it at your two documents.
  4. 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

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.