const MaxSVGBytes
MaxSVGBytes: the measured maximum is 25,666 B over ~100,000 renders with every forced hand/layout set (docs/engines/rubrica-v2.md); WordBudget bounds the text.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package rubrica (v2, "Living Language") is a Sinopia engine: every token invents a language and writes one manuscript...
Package rubrica (v2, "Living Language") is a Sinopia engine: every token invents a language and writes one manuscript leaf in it.
The language is an alphabet of 12-20 glyphs (strokes on a 3x4 node grid in one of five hands) and a lexicon of 22-40 words built from it. Glyph use and word use both follow a Zipf law and the most frequent words are the shortest, so the text reads like writing rather than noise. The leaf is laid out like a real codex page: justified lines, paragraphs closed by a punctus, ink that fades until the scribe dips the pen again, a great initial, lombards, rubrics and line fillers, a vine border or a full frame, a marginal drawing, a running head, a catchword and the folio number, which is the token number written in medieval numerals (f. xiiij v).
A stateless p/ package implementing engine/v2. Pure integer maths (FNV-1a + splitmix64 streams, truncating and floor division), so the TypeScript twin (frontend/src/engines/rubricav2.ts) renders the same bytes. Traits come from their own cheap stream (seed+"|traits") and never render; the art uses seed+"|art", so art draws never shift traits. Words are defined once in <defs> and placed with <use>; a word budget caps every leaf.
The render depends on Input.TokenID (the folio number) and on nothing else outside Seed and Params; it is not a living engine.
MaxSVGBytes: the measured maximum is 25,666 B over ~100,000 renders with every forced hand/layout set (docs/engines/rubrica-v2.md); WordBudget bounds the text.
1const ParamsSchema = `{"type":"object","properties":{` +
2 `"hand":{"type":"string","title":"Hand","enum":["Any","Angular","Round","Hooked","Dotted","Slanted"],"default":"Any"},` +
3 `"layout":{"type":"string","title":"Layout","enum":["Any","Single Column","Two Columns","Glossed"],"default":"Any"},` +
4 `"vellum":{"type":"string","title":"Vellum","enum":["Any","Calfskin","Goatskin","Rag Paper","Purple"],"default":"Any"},` +
5 `"damage":{"type":"boolean","title":"Wear and damage","default":true}}}`ParamsSchema is the Studio form: three optional overrides and a wear switch. Studio sends JSON.stringify of the values in this order.
WordBudget caps the words placed on one leaf (text, gloss, palimpsest): the size and gas knob. It binds only on the densest glossed leaves, whose last gloss (or palimpsest) lines then stay short.
FolioNumber reads Input.TokenID: 1..99999, else 0 (sample, Studio).
Manifest describes the engine. Author and FeeBps are set by the adapter.
Render returns the raw SVG for in.Seed under in.Params; in.TokenID is the folio number.
RomanFolio writes n in medieval lower-case roman numerals; a final i is written j (iij, viij).
SVG renders the leaf for a seed, params string and token id ("" or "0": the folio number is drawn from the seed).
TraitString is "Type=Value;…" in TraitTypes order (golden vectors).
Traits returns the eight traits of in.Seed under in.Params, in TraitTypes order. It never renders.
ValidateParams accepts "" and the canonical JSON only.
DefaultParams is what "" means.
ParseParams decodes "" or the canonical JSON and refuses anything else (other key order, spaces, unknown keys or values, "{}").
TraitsOf returns the decoded traits for a seed and params string; it panics on invalid params (core validates them at CreateCollection).
Params are the decoded collection params. "Any" keeps the seeded draw; Damage false makes every leaf Fine.
TraitSet is the decoded token: indexes into the tables above. The SVG and the trait list both read it.