Shard format format 0.1.0.6 · npm 0.80.0

Shardfile 0.x

Reference, rendered from docs/SHARDFILE.md as it stands at this build. Its links to code go to GitHub; the code is the spec.

On this page
  1. Budget-first admission
  2. Authored world source (SF55a, build input)
  3. Minimal singleplayer load
  4. Conversion and content reports (G291 / G294 / G304 / G306)
  5. Checked authoring guide (SF86)
  6. Authoring scene input (DS1.3)
  7. Inspect author declarations (OS-F3)
  8. Typed numeric script modules (OS-F4)
  9. Standalone author bootstrap (OS-F10)
  10. Declared director time ranges (OS-F5)
  11. Author proof tapes (OS-F6)
  12. Authored scene interaction proof (OS-F7)
  13. Mandatory Mesa brief coverage (OS-F9)
  14. Config and generator boundary (OS-G2)
  15. Director host capabilities (OS-G3)

What a shard may declare, and which engine host runs it: RUNTIME-CONTRACT.md.

The generated schema and script ABI reference lists the actual fields, optionality, defaults, union branches, bounds and Wasm signatures used by @wildshard/sdk/shardfile. It is regenerated from the same schema the SDK validates, through the serialized push; stale copies fail the committed-output check. Every path reachable from ShardfileSchema and every public SDK *Schema constant has an entry, including build-only inputs. The appendix reports its coverage count; tests refuse missing, duplicate or obsolete field/ABI entries and the gate checks the complete generated bytes, including bounds, defaults and signatures. The SDK schema roots are namespaced separately, so they are not additional shardfile keys. Named cross-field predicates remain opaque in the inventory and are explained below; this count does not claim to expand custom validator internals into schemas.

Budget-first admission

The SDK emits validation.json with the canonical declaration SHA-256, validator source revision, and conservative worst-location totals after full asset validation. Only the client build’s own built-in catalogue or a locally admitted visited product may reuse that exact verdict; authored/network sidecars are never host-owned. The validator revision includes parser dependency versions. A matching host-owned verdict skips repeated asset-cost and headless validation; it does not trust a network sidecar or bypass immutable verification. Any declaration or validator change runs full validation again. Every admission still checks schema/closure, exact immutable wire sizes and SHA-256, runtime trust, and the current page’s complete memory caps. Unbundled clients validate in full.

wildshard build <folder> and wildshard validate <folder> print the SF62 report: near-player and worst-location grid memory, declared draws/triangles per view, SF59 graph cost, measured script CPU/fuel, critical/tile/library downloads and estimated time to playable. New/outside projects refuse wire/render/execution target overages; the six canonical host-owned-checkout shards warn during conversion. Author identity alone cannot select that warning policy.

The only hard memory caps are complete totals: 1,000 MB playing / 1,800 MB loading. Category resident targets can trade space and appear as warnings. Dependency integrity, actual-byte/cost understatement, script host limits and runtime total-memory admission stay hard. Build runs 60 warm-up ticks, then three 60-tick windows before writing output. Script CPU admission uses the minimum window p95 to resist host scheduling interruptions, retaining the raw maximum; fuel includes all 240 ticks and its cap is unchanged. Validate retains the full headless simulation and entry proof. Native transition portions without a measurement are labelled UNMEASURED rather than counted as zero.

The cold-loading model is unique playable bytes / 1 MB/s + 1 s setup. This is an explicit estimate, not observed device performance. Measure cold-cache fetch, decode, compile, admission and first playable frame separately. See the author targets, good/bad cards and completion checklist. @wildshard/sdk/reportCard provides the same structured report for author tooling.

The format version (SHARDFILE_VERSION, src/format/version.ts) is a four-part number, today 0.1.0.6, separate from this package's npm version (J486 Q5). From 0.1.0.2 shard.json names it in formatVersion ("formatVersion": "0.1.0.2", SHARD-COMPAT CP14). Formats 0.1 to 0.1.0.1 wrote the frozen layout marker "formatVersion": 2 and the version in version; a reader tells the two envelopes apart by the field's type, and shardfileFormatOf(index) reads either. 0.1.0.2 also drops the always-empty schemas, runtime.files and runtime.lines (FORMAT-PRUNE FP4) and runtime.trust (FP3). requires.capabilities stays: the build's source hash covers it, so it goes only when writers stop sourcing it. Writers pass their legacy rows through outputIndexEnvelope (./version). An older file still admits as written; the chain's cp14-format-version and fp4-drop-empty-index-fields steps write its migrated copy, and the shard.version and shard.empty-fields deprecations count the originals still carrying the old shape. This is the provisional author contract, published by @wildshard/sdk/shardfile (ShardfileSchema, parseShardfile, Shardfile, shardfileRules) and @wildshard/sdk/version. The build product is shard.json plus immutable files named by SHA-256. No placement, three.js object, function, closure, custom shader or source generator appears in it.

G146: the cartridge carries data, admitted AssemblyScript/WASM and baked assets. The complete author export is checked as JSON data before any field is read: functions, accessors, class instances, symbols and cycles are refused rather than silently erased by JSON encoding. Named hooks are bounded field tests or next-tick event declarations; migrations are declarative field transforms. Their reserved asHook remains null until an admitted migration WASM ABI exists. JavaScript/TypeScript assets and executable callback fields have no format arm. Build-time TypeScript config/generators compile to this data product and are not copied into it.

Scripts ship as compiled WASM, never as AssemblyScript source (Jake, 2026-10-17). The built shard file (out/<slug>/) carries each script as a content-addressed wasm blob, and its script row points at it (module: "blobs/wasm/<sha256>.wasm"). The AssemblyScript source (behaviour/*.as) stays in the shard's source folder, in git; wildshard build compiles it, admits the binary (imports, exports, memory pages, hash) and refuses a shard over its AssemblyScript ceiling. Reasons: the game, the headless sim and a server all run the same bytes; admission can only vouch for the exact binary that runs; no compiler ships to the phone or runs at load; and it is the same rule as every other shard-file asset (GLB not Blender scripts, KTX2 not source images, JSON not generators). The row keeps provenance only: the source path, and a SHA-256 of that source so a build can prove which .as produced the .wasm. The v1 row's sourceHash is the SHA-256 of the exact UTF-8 entry-source bytes, including comments and whitespace. The official compiler overwrites any supplied claim from its confined source input; author declarations may omit it before compile. The immutable module hash separately identifies the complete compiled binary.

wildshard validate <built-output> samples script CPU/fuel again for data-only products (60 warm-up ticks, three 60-tick windows). Disk validation.json is never execution-cost authority. Runtime products still report native execution as unmeasured; they need their separate native/browser proof.

Any language may produce the WASM (Jake, 2026-10-17, G491). The format is a data contract, not our toolchain: a module written in C, Rust, Zig or anything else is admitted if it passes Script ABI admission (only ws_read/ws_list imported, the ws_abi/ws_init/ws_io/ws_handle exports, 1–4 memory pages, no other imports such as WASI). Admission never trusts the producer: it re-parses every section, re-hashes every blob, re-checks every module, and re-measures script cost (WASM bytes, fuel per call and per tick, CPU) instead of reading a declared figure. Outside authors are budgeted by those measured costs; the 10 % AssemblyScript line ceiling stays a built-in rule for this repo. docs/SCRIPT-ABI.md documents the IO block layout so non-AssemblyScript authors can read events and write commands (a generated C header may follow).

runtime is the explicitly temporary built-in transition exception: it carries a registry selector and bounded data metadata, never TypeScript bytes, a fetch URL or an executable callback. External products cannot select it. Host-owned platform code and transition chunks belong to the application build; they are not admitted author code in the cartridge.

The committed empty example is test/fixtures/shardfile/empty.json. Every object is strict: unknown keys fail. Numbers are finite; counts and byte sizes are safe unsigned integers. MB means 1,000,000 bytes. The platform owns caps in @wildshard/engine/core/config (CONTENT_CAPS, measured caps v1).

Every shard occupies a 500×500×500 m cube. Validation reports “illegal shard” for a missing, duplicate, displaced or elevated midpoint entryway. North is +z; south is −z. An omitted entry kind means ground. Its boundary samples must be flat at y=0 across the opening's full width, and admission clips the critical baked collider's native triangles against each full 8×15 m approach. Every point must lie at y=0; an interior trench, raised patch or missing ground fails before platform socket floors exist. An author cannot forge a zero-height edge row to hide a raised collision surface. Non-terrain data products use the loader's existing full-cell implicit flat ground. A transitional native runtime with terrain:null still needs a separate proof of its legacy ground; the cartridge check cannot infer that geometry from its runtime selector. Empty author projects and the template explicitly declare four 8 m openings. Canonical ENTRY_WIDTH = 8 and ENTRY_ASPHALT = 15 live in the engine core config; entry width is independent from the boulevard width.

G164's explicit kind: "socketOverWater" permits below-zero native ground inside the canonical footprint. Ground above zero still fails. Admission proves a continuous collision landing across the entire 8 m shard-side line, 15 m inward, at y=0: actual native collision triangles or active, static declared deck/stair top triangles must cover it. Hidden, inactive or panel-controlled colliders and visible-only GLBs never prove that landing. A terrain:null runtime must declare its collision deck; its selector and the ordinary implicit flat-ground default cannot prove a socket landing. Only this admitted kind uses the platform socket floor at top y=0 as its approach ground. Ordinary ground entries keep the independently authored footprint requirement and the platform's 5 mm backstop.

Each approach must also stay clear and dry. Admission inspects actual placed GLB triangles (including node hierarchy and GPU instance transforms), every declared box/stair collider, and water regions. Hidden panels and inactive colliders still count because they can become active. Reusable unplaced model assets do not count as scenery. Side walls may touch the boundary of the 8 m opening; no surface above y=0 may enter it. Water at road height is refused; a declared sea must remain below the road even at its bounded maximum swell. These checks run without allocating socket floors and apply equally to implicit-flat non-terrain data products. Every water row may declare unique dryEntries (at most four edge names). These clip the whole canonical 8×15 rectangles, including their boundaries, from the swim/wade body and the water view. A socket entry requires this explicit exclusion for any intersecting water, even below-zero pools, streams or seas; a low rest level alone does not establish the clip. Render adapters consume the same exclusion data.

SectionContract
identityKebab/dot slug, nonempty display name and author (128 characters max), positive revision, unsigned seed. No grid coordinates.
presentationOptional SHARD SELECT data: nonempty biome (≤128 characters), blurb (≤512), and card: {thumb, portrait, landscape} (local immutable image hashes in the charged library closure). No author URLs or page code.
mapOptional baked full-cell map: image is a local immutable image hash in the charged library closure; tilesHash is the SHA-256 of the defining world inputs. URLs, SVG and uncharged map bytes refuse admission.
accentRequired lowercase ID from the platform’s 20-colour palette; road/safe-zone cyan is reserved.
requiresSDK revision 0; capability names; unique declared SHA-256 commons hashes and commonsWire (exact hash→wire bytes) and commonsCosts (exact hash→{decoded, gpu, triangles, draws}). Both maps default to {} only for an empty commons list; missing or extra keys fail format admission before asset reads. Costs are nonnegative safe integers derived from pinned bytes, not author estimates.
budgetsLibrary resident ≤25 MB and wire ≤8 MB; sim resident ≤25 MB and critical wire ≤2 MB; decode/refinement slack ≤80 MB.
lookFixed platform family names; grade exposure/saturation/contrast and optional LUT reference; engine clock with an optional day; optional normalised day override; ordered day keys carrying sky gradient, fog, sun and ambient values (below).
sim60 Hz fixed step; positive script tick divisor dividing 60; command and snapshot schema version 0; script references.
clientScriptsOptional/default-empty presentation lane: cadence dividing 60, named creature/panel/prop/particle targets, selected public or owner numeric fields, bounded pose and emitters.
clientChannelsOptional native-runtime presentation programs: bounded straight-line numeric expressions over copied clock/state observations, publishing only private visual transforms/scalars. Requires runtime.binds: ["clientChannels"].
rowsOptional/default-empty numeric strikes, weather output tables, day schedules, species/variants, registered look recipes, compendium and loot presentation data.
terrain, waterOptional/null bounded baked terrain binding, with optional draw rows shadow: {cast, receive} (absent: both on; cast still needs the client's shadow disc) follow (1–62.5 m the viewer moves before the tile residency re-centres; absent: 5 m) and order (an integer −100–100, the tiles' draw order among opaque surfaces, so a same-depth tie with a far horizon ring resolves one way; absent: 0); optional/default-empty declared pools, sea and streams.
meshCollisionOptional/null exact WMC1 critical triangle tiles and interactive panel colliders; mutually exclusive with terrain. Runtime integration is pending (SF55a).
nativeGroundOptional/null {version:1,file} retaining the original critical WSTR256 binary of a native runtime world. Mutually exclusive with compiled terrain and mesh collision; no second collider is installed.
creatures, encountersOptional/default-empty individual brains, ordered pack/herd groups, stable spawns and phase tables; each actor has one controller and resolves declared species/variant/strike and boss panel references.
quests, audio, ledgerOptional/default-empty quest graphs/triggers/dialogue and timed races ({id, start, stop, fact, cap, resets?}: two different declared flags, a whole-second cap 1–3600, optional resets flags the finish and a lapse lower too; optional laps 1–20 (default 1), ordered checkpoints (declared flags, not its start or stop; a lap that misses one is void; a race of 2+ laps needs one) and ride vehicle/foot/any (default any); optional rival {name, dock, line, speed, band?, beat}: an AI driver in the vehicle dock hands out, along line (2–512 [x, y, z] points, start to stop, one lap of a lap race) at up to speed 1–80 m/s, eased within band 5–500 m (default 40) of the player, and a declared beat flag (not its start or stop) a finish ahead of him raises; absent: none), admitted cue/ambience/score declarations, and witnessed fact/reward mappings.
hooks, plumbing, spawnOptional named numeric field conditions and next-tick scene events; optional scoped input/tier/Debug declarations; cell-local player position and yaw (default 0, 2, 0, 0).
props, items, targetsOptional admitted tile/library GLBs and static collider descriptors (box, treads, convex hull of up to 256 points, or capsule; each with an optional contact material, friction 0 to 2 and packed Rapier groups; 16,384 collider units, a hull point costing one), and up to 64 touchable bodies (SS9a: one Rapier dynamic body per named panel, its rest pose, shape, material and damping; the server keeps it and every page draws the panel at its pose); optional/default-empty registered kit item families; named published-state panel/collider bindings and existing interaction prompts.
statePositive state-schema version, sharedOwner: "host", playerKey: "actorId"; named shared and per-player fields with bool/i32/f64/string type and matching default.
migrationsOptional/default-empty sequential state-version rows: bounded declarative default/rename/drop/value-map operations addressed by stable scope/field IDs. Author hooks remain reserved and null.
Field privacypublic replicates to everyone; owner only to the owning actor; host never leaves the host. Shared writes always belong to the host regardless of visibility. Names are unique within each state scope.
authorCaps1–32 players (authors may lower the room cap); in-cell speed 0–15 m/s. Highway speed belongs to the platform.
serverBudgetPositive tick budget ≤16,666 μs, positive memory ≤25 MB, ≤10,000 entities, ≤1,024 commands per tick. These are author declarations, not a server implementation.
edgeFour ordered perimeter profiles with exactly 256 (legacy native bake) or 257 (tile-bake native lattice) height and RGB samples of equal length, heights inside ±250 m, colours in [0,1], road height exactly 0. North/south samples run west→east; east/west run south→north.
filesUnique lowercase 64-character SHA-256 hash, kind (glb, ktx2, audio, json, wasm, binary, image), compressed/decoded/GPU byte sizes, triangles, draws including shadows, dependency references, critical flag.
lateOptional ordered {hash, at?: [x,z]}[] library roots, serialized as output-index admission.late. Hashes must be unique declared local library roots; coordinates are finite cell-local metres within ±250. On a receipted built-in phone admission these roots may warm after control, positioned files nearest first. Critical/manifest roots and their dependencies remain ready; an actual reader may demand a late file earlier through the same size/hash verifier. Files, library membership and full memory costs stay declared. Unreceipted admission keeps full validation; desktop/LEGACY transport stays unchanged.
serverOutput-index only (admission.server, J91): named, hashed, validated files under server/ for a server to read. Never a Shardfile field, an index.files row or a pack member, and the app publisher skips the folder, so no client can fetch one. Emit with serverBlob in ProjectOutput.server.
entrywaysRequired, four unique openings: north [0,0,250], east [250,0,0], south [0,0,-250], west [-250,0,0]; width exactly 8 m (ENTRY_WIDTH); optional kind ground, socketOverWater, socketLift or portalLink. A lift names its admitted movers and may declare a permanent static approach. A portal names two directed links and static arrival/deck floors. Every opening reaches road height y=0 through its footprint/landing/traversal proof.
tilesL0 62.5 m or L1 125 m; integer x/z address; exact horizontal grid bounds and vertical bounds inside the 500 m cube; nonnegative geometric error; file roots and declared costs.
library, critical, farLibrary roots, critical roots, optional whole-shard proxy with bounds and costs. Critical flags match critical roots.
uiOptional (defaults to empty), at most 64 declarations, each with a unique id: marker, counter, bagPanel, bossPanel, relabel (below).
runtimeOptional/null built-in transition declaration {entry: "runtime/index.ts", cost?, binds?, spawns?}; a bounded relative TypeScript entry resolved only through the native registry. Optional measured cost carries decimal-MB WebContent, GL and engine-base totals plus revision, device and evidence provenance. Spawn rows are required exactly when binds includes "spawns" (below).

The built-in build packs every retained look/map.baked.json raster through packProjectMap: its exact image bytes become an immutable image file and a charged library root. The ordinary image reader derives decoded residency (including wire/data-URL storage) and GPU bytes; deduplication charges an already included image once. No recompression or resizing occurs. Before packing, the builder checks the stamp's decoded pixel digest. The existing world-input hash still refuses stale maps in CI/Vercel and warns locally. Products without a map retain their exact previous encoding and asset costs. The SDK's explicit map build option remains available for movable, offline author products.

Manifest admission runs before schema/reference traversal and immutable asset reads. The canonical UTF-8 JSON source is at most 2,000,000 bytes, with at most 4,096 file rows, 1,024 commons references, 128 state fields per scope and 64 water bodies. Identifiers are at most 128 characters and free text at most 4,096. Distinct declared wire bytes, including commons, total at most 256,000,000; the same hash is counted once and conflicting size declarations are refused. These bounds supplement the per-bundle content budgets and exact byte checks. @wildshard/sdk/admission publishes SHARDFILE_ADMISSION_LIMITS and preflightShardfile for checking author output before opening assets; full parseShardfile and product validation still follow.

HUD accent (@wildshard/sdk/accent) is one required palette ID: ember, coral, tangerine, apricot, marigold, citron, lime, moss, jade, mint, teal, azure, cornflower, periwinkle, iris, lilac, orchid, pink, rose, or sand. Missing IDs, unknown IDs and raw colours fail validation. The road and safe zone keep HUD cyan #8fe3ff; cyan, road, hud-cyan and that hex are explicitly refused. New author projects and the template declare sand. Admitted shardfile metadata carries the accent into the existing manifest.

Declared UI (@wildshard/shard-format/ui, SF7f) is plain data the platform draws in the shared HUD's own style and slots; a shard ships no DOM. Labels are 1–128 characters and render as text only; icons are engine icon ids (lock, check, poi, you, map, pack, star, book, heart, pin, laurel), never markup. marker {id, label, at: [x, y, z]} pins a label over a cell-local point inside the cell. counter {id, label, band: band.2–band.5, order 0–999, min < max, field} is a meter row in the status column; field names a declared i32/f64 state field, read every frame. bagPanel {id, tab: {id, title, icon, order}, order, paragraphs} adds 1–16 paragraphs (≤1,024 characters each) to a Bag tab; every panel naming a tab declares it identically. bossPanel {id, encounter, name, title, retry} is the engraved boss bar, name card and retry card for one encounter (one panel per encounter); the encounter's phase table (SF13b) drives it. relabel {id, spot, label, icon | null} relabels one shared touch disc (one per disc). The engine renderers are @wildshard/engine/ui/declared; the game's @wildshard/game/plugin/ui binds a section to a shard's HUD and Bag.

Look v0 (SF10b) is data the engine renders (@wildshard/engine/render/dataLook; the game's loader binds the section through src/game/shardfile/look.ts); a shard ships no sky shader, fog patch or clock. Colours are linear working-space RGB in [0,1]. day {minutes 1–1440, start 0–1, maxElevation 0–90°, azimuth −180–180°} sets the engine clock (default 12 minutes from noon, 60°, 35°); dayOverride pins it. Each key is {time 0–1, sky {zenith, horizon}, fog {colour, density, near?, far?}, sun {colour, intensity}, ambient {sky, ground, intensity}}: the engine draws a gradient dome from sky, feeds fog to its distance fog (density per metre, exponential), sets the key light's colour and intensity (its direction is the clock's sun) and the hemisphere ambient. Keys blend linearly by time and wrap across midnight. grade.lut names a binary file of exactly 33³ × 4 = 143,748 bytes (RGBA8, index (b·33 + g)·33 + r, display sRGB in and out), applied last in the grade. The fixture is test/fixtures/shardfile/look/ (shard.json beside its LUT file, the product layout).

Linear fog supplies both ordered near/far distances in metres, with density zero in every key. It blends by world-space camera distance, matching the template's 60–180 m fog. Modes cannot mix across keys. Shader patches belong to the level scope. grade.exposure is parsed but awaits SF19a's single-frame lighting composite.

look.materials is an optional record from stable material ID to the engine's FamilyMaterialSchema parameters (toon, pbr, painterly, emissive, including PBR ground layers). PBR faceted defaults to false; true selects flat shading. look.familyLooks optionally carries toon, painterly and emissive look parameters. Engine schemas fill defaults and reject unknown family names or shader fields. Terrain and prop family bindings select a material ID; the four family names also select platform defaults. Creature look rows may name a material ID. Texture references resolve admitted files through the loader. Optional look.samplers keys a catalogue texture ref to its sampler: wrap (repeat / clamp / mirror, absent: clamp), anisotropy (1–16, device-capped, absent: 1), filter (linear / nearest, absent: the file's own) and mips (gpu: upload level 0 of a raw, uncompressed KTX2 and let the GPU build the chain; absent or file: the file's levels). A row for any other ref refuses admission.

An additive material entry { family: "graph", graph: GraphIr } carries engine IR version 1 data. validateGraph checks node types, cycles, stage placement and constant loops. The product's budgets.tier caps each material or fog program.

TierNodesSamplersEstimated instructionsAuthored post passes
Small51241,0242
Medium1,28083,0723
Large4,096168,1924

An explicit program budget can narrow these ceilings. Products without a named tier use small. Older runtimes keep large while their source pins are updated. Only material and fog graphs belong in this slot. Post passes, shader source and callbacks are refused. Graph texture params name admitted KTX2 hashes in the charged library closure, including declared commons; they cannot be bound. Graphs have no implicit default material: terrain, props and creature looks reference their authored material ID.

SF59 effect graphs may add effectState: { blend?, fog?, depthWrite?, depthBias?, singlePass? }. blend is alpha (straight RGB), additive (straight RGB multiplied by alpha and added), or premultiplied (RGB already multiplied by alpha, One / OneMinusSrcAlpha factors). Each explicit blend enables transparency. fog can only be false, bypassing fog for the effect; output colour conversion stays. depthWrite is boolean; depth testing stays on. depthBias is { factor, units }, finite numbers within -16 … 16, using polygon offset. singlePass can only be true: a double-sided effect draws both faces in one unsorted pass, not three's back-then-front pair of draws and programs. Omission keeps all old material state, including fog and opaque depth writes. Post graphs cannot use it.

primitive: "points" requires model: "unlit" and stages.points: { size: <float vertex reference> }. Size is drawing-buffer pixels, clamped to 1 … 2048 and the hardware point range. Fragment input pointCoord is vec2 over the point sprite (top-origin); it is refused on mesh graphs. Points cannot have a mesh outline. Mesh remains the implicit primitive. Vertex input viewBillboard is the absolute model-space position of a camera-facing vertex: geometry coordinates are world metres, independent of object rotation or scale, with object/instance origins retained. Use vertex.offset = sub(viewBillboard, positionLocal); instance scale is deliberately not applied. Its camera/model matrix work is included in the instruction budget.

A native runtime can call runtimePresentation(source)?.bindMaterial(id, object, scope) to lend a look.materials material to its own Mesh or Points by id. It keeps geometry ownership, shares the data client's material and uniform feeds, and gets a disposer. Either scope retiring restores the prior material and removes any graph outline. Unknown ids, mismatched primitives and double bindings refuse. This uses the existing runtime-product door, with no SDK facade. The Graph materials Debug setting still controls graph compilation; when off, existing family fallbacks remain active (a new point graph falls back to an unlit one-pixel point).

Material graphs with the standard lighting model may add stages.lighting: required sun (vec3 direct-diffuse radiance), optional sunSpecular (float scaling the sun's physical specular; omitted means no specular), optional ambient (vec3 indirect diffuse; omitted uses irradiance × albedo / π), and optional grade (vec3 mapping litColour after lighting and emissive, before the output transform). A graded material bypasses tone mapping; the engine still appends its fog/output epilogue. Unlit and post graphs cannot carry a lighting stage. Graph-level optional flatShading: boolean selects face normals; omission preserves smooth shading. This addition keeps IR version 1 and the same author caps.

Lighting reads engine-supplied normalView, viewDirection and albedo inputs; sunDirection, sunColour and sunShadow are restricted to sun evaluation, irradiance to ambient, and litColour to grade. All lighting subgraphs are typed and costed by the same validator. Toon/painterly engine presets use this stage; their native preset budget does not become a shardfile author budget.

Material graphs may also add stages.outline: { offset, colour }: both references produce vec3 values (scalar values broadcast under the existing graph rules), with a model-space displacement evaluated in the vertex stage and linear ink colour evaluated without lighting inputs. The inverted hull has fixed render state: back faces, depth test and write, opaque, unlit, fogged and no shadow. Author data cannot change that state. Outline evaluation counts toward the same program budget and raw graph caps, including unused nodes.

objectOrigin and positionGeometry supply vertex-only vec3 inputs; worldToLocal(vec3) changes a world-space direction to model space in the vertex stage; viewToWorld(vec3) changes a view-space direction to a unit world-space direction in mesh stages. Types and stage placement remain validated. These additions keep IR version 1. The shardfile client draws the hull as each bound mesh's second draw through a mesh-level hook (terrain, prop tiles, panels, models and water) while Settings ▸ Debug ▸ Look ▸ "Graph materials" is on; with the row off, or for a budget fallback, nothing is attached.

Before typing or compilation, graph admission bounds the raw JSON to 64,000 UTF-8 bytes, depth 64 and 160 declared nodes across every nested node table, including unreachable nodes and loop bodies. The reachable program still must fit the sampler/instruction budget and the loop-expanded node budget. Content cannot supply a larger budget; an explicit native engine preset budget does not widen the shardfile slot. Accessors and serializer callbacks are refused without invocation. These per-graph caps supplement the whole-manifest admission limits.

Uniform bindings use {state: "shared.<field>"} or {state: "player.<field>"} for public i32/f64 fields, with float params. {day: "<path>"} names an existing look-key channel: sky.zenith, sky.horizon, fog.colour, fog.density, sun.colour, sun.intensity, ambient.sky, ambient.ground, or ambient.intensity. Linear-fog keys also admit fog.near and fog.far. Day bindings require at least one key; scalar channels use float params and colour channels use colour/vec3 params. Bindings change uniforms only. Runtime graph compilation and binding are SF59's renderer adapter; existing preset entries keep their defaults. This additive slot keeps SHARDFILE_VERSION in 0.x; the format never freezes.

Graph files and preset references (SF59). A graph material may also point at its program instead of carrying it inline:

Props texture slots (props.materials) bind only an inline graph.

Post inputs and the shard's post stack (SF59 (2b), step 4). A kind: "post" graph reads the scene through sceneColour, sceneColourAt(uv) (one tap at a vec2, such as an edge or blur kernel), sceneDepth([uv]) (linear view distance in metres) and sceneNormal([uv]) (a unit view-space normal from a normal pre-pass). Each input is one sampler, however many taps read it, and each tap costs instructions. A material graph cannot read any of them. look.post is an optional ordered list of authored passes capped by the tier above. Each pass is { graph: <post graph> } or { file: "<hash>" } (a JSON file in the library closure, validated with its bytes at product admission). Every pass validates under the author caps and the shard's admitted bindings. The stack's cost is the sum of its passes' instruction estimates, per pixel at 2× render scale, plus POST_NORMAL_PREPASS_COST (160) once if any pass reads sceneNormal. Admission refuses a stack over 1,000 instructions. Where two cells' frames blend, postPairRefusal checks the pair's sum against the same 1,000 (a normal pre-pass both stacks read is counted once). Grid placement runs it: each admitted product records its stack's cost on the page (gridPostCosts), and a cell's admission sums its stack with each adjacent admitted cell's (gridPostPairRefusal, src/game/grid/postPairs.ts), so of two neighbours whose stacks together exceed it, the one admitted second is refused (the cell screen's "too big"). The check is static, with no runtime sensing. Older products without look.post parse unchanged. While Settings ▸ Debug ▸ Look ▸ "Graph materials" is on (default off), the shardfile client compiles the stack into composer passes. They are inserted before the engine's colour pass, so the platform's grade, tone mapping and anti-aliasing still run after them, with one normal pre-pass when any pass reads sceneNormal. In the grid the stack fades with its cell's owner weight (the frame's owned hook). At weight 0 every pass is off. Bound post params move like the material graphs' (graphParamFeeds): a day binding samples the shard's look keys at the frame owner's hour, a state binding reads the live public state (its declared default until the simulation binds).

@wildshard/sdk/commonsCosts exposes the defining cost schemas and assertCommonsCosts(hashes, table). A product declares one entry per required commons hash (at most 1024), matching commonsWire exactly. Decoded/GPU values are bytes; triangles/draws are counts. The SDK derives these costs from the pinned commons catalogue bytes. Metadata establishes the declared envelope before fetch or cache reads; byte validation subsequently checks equality with the declaration. Empty older products may omit both maps and parse with empty defaults.

Near placeholders (G342). Optional near: {version: 1, terrain, content} declares a separate visual bundle. terrain is either empty for a mesh world or the complete 4 × 4 L1 grid: {x, z, file} with coordinates 0–3 and immutable binary references. Each actual payload must contain a coloured 17 × 17 lattice over its declared 125 m square. content contains at most 32 unique local GLB references; actual transformed geometry must fit the cell. These are render roots, never critical simulation roots or collider registrations. Missing near retains the ordinary far proxy without adding a default field to the product.

@wildshard/shard-format/nearPlaceholder defines the schema, roots and deduplicated closure costs. Initial per-cell limits are 1 MB terrain plus 2 MB content, including persistent CPU/GPU dependencies; four cells reserve at most 12 MB. The complete playing/loading envelope still controls admission. Content limits may rise only with a reviewed measured budget. Missing, cyclic, executable or critical dependencies fail before fetch; understated costs and incorrect tile addresses fail when actual bytes are admitted. Commons costs remain explicit. The product report lists the near download closure and includes it in the unique total, while it does not make near content a playable-entry prerequisite.

Runtime activation follows in the budgeted adapter: one Debug comparison, A far proxy / B near placeholder, default A. The real cell runtime replaces it when entered; this contract never installs a simulation or renderer on import.

Admission checks declared transitive library, critical, tile/far/near and worst-location costs before immutable asset network or cache reads. An oversized declared envelope is refused at that stage. Hashes and parsed asset headers are then validated; actual costs cannot exceed their declarations, and commons costs must match exactly. Declared metadata never substitutes for byte validation or raises a budget.

State fields carry explicit stable positive id values (1–2³¹−1), unique across shared and player fields. IDs never come from declaration positions. The numeric script input supports at most 24 bool/i32/f64 fields; string fields stay outside that ABI. Optional finite min/max tighten the type bounds (bool 0–1, signed i32, finite f64); defaults must fit, and integer types require integer bounds. The public assertStateCompatibility(previous, next) checks two parsed revisions of the same shard: existing scope/name/id/type must remain, and old IDs cannot name another field. Declaration reordering and new fields are allowed. Outside authors must assign an ID to every pre-existing v0 field before rebuilding; an empty world has no fields to migrate. This is a provisional v0 refinement before freeze.

@wildshard/sdk/migrations exposes MigrationsSchema, parseMigrations and DeclaredMigrations. Each row has {from, to: from+1, fields, asHook: null}; admission rejects future target versions, duplicate version steps and ambiguous field edits. At most 64 rows contain at most 256 edits each. default supplies a typed field value; rename preserves the stable ID; drop explicitly removes it; map supplies bounded typed value mappings and a keep or reject fallback. Rename and map may compose for one ID in the same row. No author code, old Wasm memory or old physics snapshot is executed for a revision migration. The loader restores portable declared state into fresh revision execution; additive fields take their defaults. Same-revision full execution continuation is unchanged.

Author rows pass an independent JSON-only check before their strict schema: functions, accessors, cycles, sparse arrays, nonfinite numbers and other lossy values fail before serialization. Strike weights are numbers; weather outputs are state tables; day clocks have complete ordered schedules. Species rows carry collision dimensions and each variant's health and modifiers. View and animation recipes are registered IDs with numeric/text parameters, resolved by the loader's injected catalogue. Compendium stamps/stats are constants and loot presentation selects the purse/cue mechanisms. @wildshard/sdk/rows exposes the schemas and numeric sim catalogue helpers. The legacy row-function ratchet stays until its old types lose their closure fields.

sim.bindings optionally binds a declared script module to a positive entity ID, server or entity role, and a nullable host actor ID. Both roles may be actor-bound; the runtime checks actor provenance. Modules are unique in sim.scripts and must belong to the critical closure. Validation reserves three full maximum-sized memories per unique module (live, last-good, in-flight), including permitted growth, plus the critical assets. Multiple bindings share that module reservation. The result must fit both declared sim resident and server memory budgets and the host 24 MB script pool. Critical commons bytes also count against the wire cap.

Client scripts run in an isolated ClientScriptLane, independently of authoritative simulation ticks. Frozen neighbours animate without changing colliders, health, shared state or the simulation clock. Bindings select a library Wasm module, stable positive visual entity ID, name and target (creature, panel, prop, or particles with a cell-local at). Creature/panel/prop IDs must exist; each target has one visual writer. Modules cannot also be sim modules. reads: [{scope, id}] selects up to 24 numeric fields by stable ID: shared reads must be public, player reads public or owner-visible. The platform supplies the actor and copies its permitted state. Bytecode receives no authoritative world or physics-query port. A frozen render-only neighbour with reads: [] needs no state world; requested reads require an owned state view.

Input is [tick, divisor/60, frozen, self, x, y, z, readCount, ...values]. Query 410 with eight zero arguments returns up to 64 declared numeric parameters. Effects 101/102/103 set relative offset/rotation/scale, within authored limits: offset at most 50 m, rotation ±π, scale 0.01–16. Effect 104 requests [emitterId, count, 0, 0] particles. An admitted platform.particles emitter declares linear RGB colour, size, velocity, gravity, lifetime (1–3,600 ticks), per-tick and live counts. Aggregate ceilings are 256 particles/tick and 4,096 live across all bindings. Authoritative writes, spawns, events and physics queries are refused. The complete batch validates before any visual output commits. Modules share one private guest per module; three maximum-sized memory copies are charged to the library budget and a per-instance library allocator claim. The pooled particle view adds 56 CPU and 32 GPU bytes per live slot, capped at 4,096 slots across all emitters. clientScriptViewCost supplies this cost for the library budget; each instance owns its own view claim. Same-engine visual continuation restores memory, globals, lifetimes, quotas and failure history without running an authoritative tick.

clientChannels complements the fixed-tick Wasm lane when a retained view must preserve its continuous page-clock mathematics. It is data, not callable code: each program has at most 128 scalar nodes, 32 named numeric reads and 12 unique visual channels. A shard admits at most 512 programs, 16,384 nodes and 4,096 channels in total. Every node reference points backward; loops, recursion, function calls, events and shared/player writes are absent from the grammar. JSON Schema carries the same bounds and names the defining checks for backward references, unique IDs and aggregate limits.

The native view owner supplies detached numeric observations and binds outputs only to its private draw transforms. It passes no player, physics, state writer or event authority. createClientChannels in @wildshard/game/plugin/ui copies the reads and exposes a frozen frame; a failed calculation leaves the previous frame intact. The native-runtime binding prevents a second data installation. Authoring uses @wildshard/sdk/clientChannels; for example:

const orbit = new ClientChannels('orbit');
const angle = orbit.binary('mul', orbit.clock('time'), orbit.constant(0.045));
orbit.output('x', orbit.binary('add', orbit.constant(8),
  orbit.binary('mul', orbit.unary('cos', angle), orbit.constant(22))));
orbit.output('yaw', orbit.unary('neg', angle));
const rows = [orbit.build()];

The continuous-time example applies neither clock quantization nor yaw wrapping.

Optional locals retain at most eight private visual scalars per program (1,024 across the shard). A slot starts with a literal or one copied observation from the first successful evaluation. A local node reads the previous frame; next names a finite node to retain after the entire frame succeeds. All slots update simultaneously. This is bounded frame-to-frame recurrence, not a node loop or an authoritative state setter. Failure changes neither the published frame nor the retained scalars. Separate view instances share no storage. Absent slots leave existing programs and their continuous clock math unchanged.

For a variable-frame ramp, the builder emits ordinary admitted rows:

const ramp = new ClientChannels('ramp');
const progress = ramp.local(0);
const next = ramp.binary('min', ramp.constant(1),
  ramp.binary('add', progress,
    ramp.binary('div', ramp.clock('delta'), ramp.constant(1.2))));
ramp.retain(progress, next);
ramp.output('value', next);

Ramp outputs still cannot write shared/player state.

Optional bindings connect published transforms to named private scene objects. They cannot bind value/turn to state, player or shared fields; those outputs remain frozen numeric observations. Rotation bindings can name the original Euler order. The runtime refuses unknown targets and anything that is not an Object3D before binding. Signal's bucket and Sky's winch share plugin/ui.createClientChannelView, without renderer or physics authority.

A program may name an admitted mover as its observation source. Its reads are copied position.x/y/z, euler.x/y/z, enabled or numbered field.N. Such a program has no extra clock or private recurrence: the real fixed-step mover owns its pose. Undeclared mover IDs refuse product admission. The moverChannelViews binder borrows named existing native owners; it creates no body, script instance, tick, or authoritative writer. Frozen frame observers retain the existing native quest reactions outside the data.

Named hook conditions resolve a stable numeric field ID and a typed equality value. Shared conditions read public fields; player conditions may read the owning actor's fields. Host-only fields stay private. Scene hooks declare a numeric event type and value, delivered to the host-resolved actor on the next script tick. Quests, input and Debug choices may refer only to these declared hook names; hooks require a script binding. The platform resolves callbacks, and the product contains only data.

targets.panels names a prop panel, published scope/fieldId and typed equals value, with visibleWhenMatched, collider IDs and activeWhenMatched. One binding owns each panel/collider. The authoritative host updates collision after scripts; the renderer reads the same field. targets.interactions supplies stable IDs, cell-local at, reach radius, text label and a declared scene hook to the normal interaction list. Item hooks select admitted modules; the host supplies their owner actor and merges explicit item handles into its single script lane. Optional targets.itemActions maps a named scene to a declared tool and action 3 (toggle) or 4 (refill). Optional targets.itemFields maps a tool's fuel or lit value to a compatible player field ID. These are read-only projections from the single authoritative item runtime, published after its fixed step. A kit.lever's taken (TE-ENG6) projects to a bool player field the same way, so a panel can hide the rack's own copy once this player holds it. An interaction's optional unless (TE-ENG6) names a hooks.conditions row: while it holds, the use is spent and its prompt is gone (a lit brazier). The condition reads a shared field, or a player field an item projects (the page sees no other). A rack's take prompt goes once its lever is taken. A panel on a projected player field is drawn only: it binds no collider. Optional targets.talks (TE-ENG3) puts a quest-giver on a no-runtime shard: an id, its feet at, a talk radius and label, the quests.dialogue tree it speaks and, optionally, the props model or panel figure that draws it (none: a stand-in). E opens the player's current node; a choice sets its flags (so a startWhen quest starts) and a node without choices ends the talk. The server keeps each player's node in the existing dialogue save. A talk is never a combat target.

Local references are file hashes; shared references are commons:<hash> and must be declared in requires.commons. Every local dependency resolves. The dependency graph is acyclic. A file's compressed bytes are its stored wire representation, decoded bytes its persistent CPU representation, GPU bytes its uploaded representation. Decoded geometry copies must be released after upload; decode/refinement overlap is charged separately. CPU state that must persist stays in decoded bytes.

Per tile resident = decoded + GPU: L0 ≤4 MB / 0.3 MB wire / 40k triangles / 8 draws; L1 ≤2 MB / 0.2 MB / 10k / 2; far ≤1.6 MB / 1 MB / 8k / 1. Shadow draws count; only L0 within 80 m may cast them. L1 and far are self-contained and cannot depend on the shard library. The builder verifies actual assets and transitive dependency costs against declarations. The worst 150 m disc includes lookahead, three neighbours at caps, deduplicated libraries/commons, L1, far, four sims and streaming overlap. The engine base is 300 MB, playing envelope 850 MB, loading envelope 1.8 GB.

assetOverdraw(kind, bytes) in @wildshard/sdk/assets returns byte-derived layers, blendedLayers and maskedLayers, with basis: "primitive-bounds". For each GLB primitive it takes the largest projected triangle-area / bounding- rectangle ratio over three local orthographic axes, then conservatively stacks primitive, node and instance copies. The bounded triangle walk uses constant working storage. This is a rest-pose, local-axis estimate before camera selection, culling or occlusion; it is neither measured screen overdraw nor an admission cap. The CLI prints it as an advisory alongside the admitted asset costs.

Built-in products rebuild every build. The client accepts the current version only. Older content needs upgrade without touching its source. A version bump migrates all built-in source in one commit. Outside authors must update version, requires.sdk, the sim ABI and affected fields, then rebuild and validate. Saves wipe at a breaking promotion: this is pre-alpha, so there are no save migrations (J149) and no legacy reader (Q18). The format never freezes or cuts stable 1.0 in this plan (G195). Every breaking change increments the integer revision in the canonical string "0.<revision>" and migrates all built-in declarations in that commit. requires.sdk names the same string; command/snapshot ABI integers change only when their own contracts change. No float comparison is used: 0.10 follows 0.9. Malformed strings, unsupported revisions and numeric versions are refused by normal admission.

The author CLI is built with node scripts/build-sdk.mjs in this checkout and run as node src/sdk/bin/wildshard.mjs. Outside projects get wildshard from the SDK tarball. Commands: new <fresh-directory>, build <project> [output-directory], validate <project|shard.json>. Default output is the project's public/shardfiles/<slug>/. Source assets live at assets/<sha256>; declared commons inputs live at commons/<sha256> and are copied once into the product. The build compiles host-owned local shard.config.ts, parses its default export, verifies wire hashes and parser costs, rejects understated transitive budgets and critical wire >2 MB, then writes stable sorted-key JSON and unchanged immutable bytes. Configs and generators execute only on the author's machine.

SDK distribution (SF8b): pnpm --dir src/sdk pack --pack-destination <directory> builds portable ESM author tools, their complete declaration closure and the normal Game client. An outside project installs the tarball with a file: dependency; wildshard build copies that prebuilt client and embeds its validated shardfile in index.html. Serve the output directory as a static site. The bundle includes the normal client's fonts and physics Wasm; it owns no separate render loop. Workspace source exports remain .ts, while the tarball's exports name its packaged JS and declarations. node scripts/test-sdk-distribution.mjs proves installation outside the workspace, two byte-identical clean products and standalone strict TypeScript. For the browser load/unload census, run scripts/browser-lane.sh node scripts/test-sdk-client.mjs <built-product-directory> [report.json] from scratch after any active performance quiet window; it serves only that installed product.

The initial parsers accept GLB 2 with embedded buffers and separate KTX2 textures, 2D KTX2 within 4096² (RGBA transcode is the conservative GPU bound), and audio within 180 seconds / two channels: PCM WAV or self-contained, unfragmented 48 kHz stereo AAC-LC M4A with the bounded packet layout admitted by indexAac. AAC residency charges every complete 1024-frame packet as stereo float32, including encoder priming and final padding; the compressed file is never charged as PCM wire. Unsupported mesh compression, sparse accessors, external GLB URLs, embedded images and unsupported audio layouts fail explicitly. Subsequent asset rows extend supported encodings; they do not bypass these caps. The shared model is @wildshard/engine/core/contentCost, consumed by the game's internal product budget validator. The validator expands its 5 m search grid's radius by the sample spacing's half diagonal, so gaps cannot hide a heavier disc.

For an authored project, return late: [{hash, at: [-150, -138]}] from the existing prepareOutput alongside namedFiles/assets or blobs. The ordinary project adapter validates and owns this metadata, admits the blobs first, then merges the hints into source.late after their library roots exist. nameBlob and its file metadata stay unchanged. Low-level writers may set source.late directly once those roots are declared. Both routes emit the same admission.late.

A format-2 index may carry ktx2Costs, keyed by a local KTX2 hash with {rgba, astc, bc7} GPU footprints. The writer derives them from exact bodies using the ordinary parser and validates them again against those bodies. Only a build-receipted original file object may use them for residency without a cost-only body fetch. Capability selection preserves the existing device charge, including padded tiny mips; old indexes and unverified/replaced rows still parse the body. Rendering still reads and verifies its texture through the same owner. The ordinary manifest packer also declares Explorer-only gallery/comparison images late. A byte-identical card, map, sky or horizon image stays early even when authored under another URL. Explicit positioned hints win; automatic hints never change existing commons or non-library file ownership. Full image bytes and costs remain declared; opening Explorer may demand its art immediately.

Small-file transport packs separate descriptor sections, required control bodies, and deferred bodies. The SDK writer and phone admission use the same dependency closure: commons, critical flags, navigation, presentation images and the global LUT override late hints. Material-construction roots (look textures and graph files with their dependencies, prop colour/slot textures and splat layers) are also required even when they are only tile dependencies, outside the library. An early pack cannot carry a deferred small file just because both fit under the existing pack limit. Member paths, hashes, sizes and full content costs stay unchanged; pack hashes and grouping may change.

Authored world source (SF55a, build input)

@wildshard/sdk/worldSource exports WorldSourceSchema, WorldSource and parseWorldSource. This validates the build-only world declaration planned for shard.config.ts; world is not a compiled Shardfile field. This first contract slice does not yet make wildshard build ingest a world GLB: the CLI currently still requires compiled shardfile data. The normalization API below is available; texture/LOD tools, mesh collision and the build adapter follow in SF55a before the Blender Template (SF55).

@wildshard/sdk/bake/world now exposes the memory-only normalization stage: await normalizeWorldGlb(bytes, world, admittedMaterialIds). It takes one embedded static GLB and checks mapped output IDs against the supplied admitted material catalogue. It returns indexed static and collision primitives, independent panels, source material parameters and content-hashed embedded image bytes. It does not yet write tile files, encode images, simplify geometry or install colliders.

Intake is bounded before accessor decode: at most 256 MB wire, 2 MB JSON, 10,000 rows per glTF collection, 64 hierarchy levels and 64 million accessor components. Expanded placed geometry has at most 4 million vertices and 12 million indices. Each embedded PNG/JPEG/WebP is at most 25 MB and 4,096 pixels per dimension. External buffers/images, compression/extensions, skins, animation, morph targets, cameras and unsupported vertex attributes fail explicitly in this static-world stage. A source has exactly one scene and no disconnected nodes. Duplicate node or material names, missing annotations and overlapping object/panel or collision/panel subtrees fail with a diagnostic.

Normalization applies exact affine hierarchy matrices, including shear and negative scale, without reducing them to TRS. Static positions use cell coordinates; normals use the inverse transpose, tangents retain handedness, and mirrored triangle winding is corrected. Panels retain their root world matrix and root-local primitives; their geometry is excluded from merged static collision and tiles. Collision-prefix subtrees supply collision only. Mesh collision shares static triangle topology, preserving elevated bridges and overhangs. Terrain-prefix selection remains a flag for the later sampling stage. Embedded images, material factors, UV0 and each colour/normal/metallic-roughness/occlusion/emissive texture use and sampler survive; unmapped materials, unused mapping names, invalid samplers and missing UV0 fail. Repeated normalization leaves the caller's bytes unchanged and produces equal data.

import { parseWorldSource } from '@wildshard/sdk/worldSource';

const world = parseWorldSource({
  glb: 'assets/world.glb',
  materials: { 'Grey clay': 'world.clay', 'Door paint': 'world.door' },
  colliders: 'nodes:ws_collision_',
  objects: { Bridge: 'bridge' },
  interactive: [
    { node: 'Hall door', id: 'hall.door', colliderId: 'hall.door.collider' },
  ],
});

The GLB path is project-relative with forward slashes, a .glb suffix and no absolute path, traversal, URL, query, encoded path segment or backslash. Material names and node names are exact, case-sensitive glTF names (spaces and Blender's numeric suffixes are preserved), at most 128 characters, without controls or edge whitespace. Mapping keys __proto__, prototype and constructor are refused. Every referenced glTF material must map to an admitted material ID in look.materials or a platform default; the GLB ingest stage will check that coverage and refuse unsupported materials instead of skipping them. The table has 1–256 mappings.

colliders: 'mesh' selects world mesh geometry; nodes:<prefix> explicitly selects collision nodes by a nonempty literal name prefix. The ingest stage must refuse a missing selection, apply node transforms, and preserve bridges and overhangs with mesh collision. Nodes named with the ws_terrain prefix identify terrain sampling inputs; they do not make non-heightfield geometry disappear.

Optional objects maps up to 1,024 noninteractive node names to stable object IDs. Optional interactive lists up to 64 named nodes with stable panel id and colliderId. Both collections default empty. Names and object/panel IDs are unique across the two collections; interactive collider IDs are unique within their own namespace. IDs are lowercase [a-z][a-z0-9.-]*, at most 128 characters. An interactive node is excluded from static tiles and merged collision and becomes its own panel and collider with the authored transform. Annotations live in config data, never glTF extras or callbacks. Node existence and overlapping selected hierarchies are checked when the GLB is ingested, not by this declaration-only parser.

Export from Blender as glTF Binary, +Y up, with Apply Modifiers and materials exported. Units are metres and the shard-local origin is the cell centre; the full transformed world stays in the 500 m cube. Author four clear, dry, flat 8×15 m entry footprints at the midpoints, at y=0. Existing entryways, spawn, material look, gameplay data rows and admitted AssemblyScript remain separate author inputs; the platform draws the asphalt socket after admission. Add the build-only world key to the default declaration in shard.config.ts:

import { emptyShardfile } from '@wildshard/sdk/author';
const shard = emptyShardfile({ slug: 'my-world', name: 'My world', author: 'Me', revision: 1, seed: 1 });
export default { ...shard, world };

To compile server behaviour, export a build-only behaviour array from the same config. Each row has id, project-relative .as source, and maximumPages (default 2). Use script:<id> in sim.scripts and each binding's module; the SDK replaces those references with the metered module's immutable hash, includes its file and critical root, and charges the admitted memory copies. Explicit local imports use a sources map from virtual .ts names to bounded project-relative source files. Every source symlink must remain in the project.

export const behaviour = [{ id: 'door', source: 'behaviour/door.as', maximumPages: 2 }];
// In the default declaration:
// sim: { ...shard.sim, scripts: ['script:door'], bindings: [{ module: 'script:door',
//   entity: 1106943697, actorId: 'actor.player', kind: 'server' }] }

The SDK pins AssemblyScript 0.28.20 and Binaryen 132.0.0. Its public @wildshard/sdk/compileScript module also compiles virtual source text in memory. Fuel, call-depth and finite-number guards use the existing ABI-v0 admission; the product contains Wasm, and runs no compiler or author source code at boot.

wildshard build and wildshard validate <project> compile this input in memory; they never write compiled hash files back into assets/. Compiled terrain, props, mesh collision, tiles, far geometry or native runtime cannot also be supplied. Normal product admission checks every entry before writing output. Source GLB symlinks must resolve inside the author project.

L0 tiles clip original triangles at 62.5 m. L1 uses the pinned simplifier with a 0.5 target ratio / 0.25 m absolute error allowance, then clips at 125 m. Actual returned counts and errors own their declarations. Coarse tiles cast no shadows. An independent one-draw far approximation uses a 0.1 target ratio / 2 m allowance and source material factors as vertex colours; interactive nodes are excluded. Fine/coarse output retains named material slots, UV0, normals, tangents, vertex colours and encoded textures. Unsupported material families or incompatible same-material vertex channels refuse.

All authored collision retains its actual triangle layers in WMC1. ws_terrain selects the surface for 257 boundary samples; otherwise permanent collision geometry supplies them. Missing boundary ground refuses. This path adds no analytic floor or second heightfield under mesh collision. Panels retain separate stable render/collider identities and use ordinary published-state targets and continuation snapshots. No project generator or runtime is required.

Minimal singleplayer load

The normal client accepts an embedded <script id="ws-shardfile" type="application/json"> source. The game validates it before selecting the level, then uses the existing session, Game, player, physics, HUD and staged LevelLoader. loadShardfile(app, input) also feeds an installed level driver; app.unloadLevel() owns disposal. External names cross parseShardSlug; built-in names keep their generated union.

The browser product loader binds admitted terrain and prop tiles, water, creature views, equipment, script state, quests, encounters, declared UI, audio and target interactions through the existing world/kit/play stages. Its simulation borrows the Game's physics, player, events and fixed-step driver. Creature views share their core's health and position; a rendered frame never steps that core. Library and critical cache leases last for the level, while tile leases end with residency. A quota refusal permits online play without publishing an incomplete offline visit. emptyShardfileSource and loadShardfile retain the minimal empty-world adapter for installed-driver callers. Unsupported format versions request a compatible client. Optional traversal.hoverCap accepts 0.1–14 m/s, defaults to 14 m/s, and may lower the platform's interior travel ceiling; placement and highway speed remain platform-owned.

The browser and CLI share game-layer asset admission: exact wire hashes and sizes, bounded parsers, terrain semantics, transitive bundle costs and the script memory growth ceiling are checked before allocating a level. Cached Wasm passes admission again on every load. A visited product is published to Cache Storage only after all its immutable files pass; an offline load reads those files without fetching and refuses missing or corrupted bytes. A revision keeps each saved field's scope, name, id and type. Previous-format readers are native client code, and only an offline visited built-in product may select one; the 0.1 client explicitly supports the bounded integer-0 cache transition.

The client reserves library and commons claims in the session residency allocator; shared dependencies are charged once and leases end with the level. The grid sim registry owns sim claims and render rings own tile claims. A grid page may share an early home claim through an explicitly injected page residency owner. For its data-only home, the non-ring client also reserves each combined terrain/props tile's validated decoded plus GPU bytes before either view installs. All 16 coarse claims survive refinement; fine claims end with their tile scopes. A deferred fine tile leaves its coarse parent unmasked. Failed or cancelled installs release their claims. Ring-owned callers receive no second tile claim. An owner-present opaque runtime home keeps cache leases but skips separate home library and tile charges, because its measured whole-home claim already includes those parts. The loader uses that owner's allocator before bootstrap and checks that the declared sim resident budget fits inside the existing home claim. Data-only products account their admitted parts separately; only opaque native runtime homes use a measured total. Native runtime homes require that claim before their shell world runs; no empty budget or one-byte placeholder substitutes for the measurement. Optional runtime.cost contains webContentMB, glMB, engineBaseMB, optional residentBaseMB, rev, device and a progress/memory/*.json evidence path. Accounted bytes are derived once as the upward-rounded (webContentMB + glMB - (residentBaseMB ?? engineBaseMB)) * 1e6 / residentFactor; the allocator applies its calibration and current engine base. residentBaseMB is the measured settled pre-entry resident set from the same cold run, texture path and settings. It includes the platform, composer and highway that stay resident and keep their independent claims. The dated engineBaseMB remains provenance when this paired baseline is supplied. The baseline must contain that engine base and be smaller than the target reading. Choose the largest worst-pose-minus-pre-entry-baseline across the valid cold runs; never subtract a post-target road reading that can retain shard memory. The evidence names both poses and preserves their physical samples and same-pose labelled GL. Omitted residentBaseMB keeps the existing engine-only formula. A runtime increment includes its own regional sky: its exact bytes remain a visible child claim covered only by that same live sim lease. Parent retirement makes the sky independently charged; platform, composer and highway claims remain independent throughout. Root activation requires reviewed metadata; missing metadata never acquires a placeholder claim. The live registry retains the same claim, while the composition root releases the boot reference after consumers dispose.

Owned grid pages begin neighbour preparation on the road approach after the outgoing runtime releases its claim. Product prefetch alone does not run hooks or allocate an opaque runtime. The full measured claim precedes world, creature and equipment construction. Hidden destination registry/terrain bindings are reversible; unrelated scoped road callbacks recover their own frame during asset awaits. Entered callbacks, input and parent runtime slots remain unpublished until the completed resident activates. Cancellation releases the destination through its ordinary scope; an undurable outgoing save never authorizes another runtime. Readiness includes world/kit/play and sliced shader/upload warm-up. Preparation wall time and the eventual crossing activation cost are reported separately.

Local instance checkpoints retain admitted script continuation, item fuel/cooldowns/queued commands, quest flags, current steps and dialogue. They restore silently before panel/collider bindings, without replaying rewards or replacing the Game physics world. A changed revision or incompatible continuation starts fresh. SF15a proves same-revision logical restore; SF33 owns cross-revision migrations, tested on real saves as the 0.x format evolves; there is no version 1 freeze.

A transitional built-in product may declare runtime. Asset admission refuses that declaration for external products, including cached ones. The ordinary product installer refuses it too: the admitted data plugin must enter the explicit runtime shard compositor, whose native registry matches both shard slug and entry. Content cannot select an import URL. Neighbours retain data without running native play hooks; entering a cell installs those hooks in its child scope and leaving disposes them. The native compositor may explicitly request nativeRuntime for a built-in runtime declaration. Optional runtime.binds is a unique array of at most seven section names: "quests", "ledger", "items", "spawns", "state", "terrain", "props". Omitted or [] means none; unknown names, duplicates, null and unknown runtime keys are refused. The defining RuntimeBindsSchema is composed by RuntimeSchema at the full schema's runtime slot; it is not a second permissive format or a source-code hook.

runtime.spawns is present exactly when runtime.binds includes "spawns". The sole defining RuntimeSchema enforces this pairing through full shardfile admission; selecting the section without rows, or supplying rows without selecting it, is refused. Its strict object has required homes (at most 256) and bosses (at most 16) arrays; either array may be empty. Optional actors contains at most 256 finite one-shot bodies. All three row kinds contain {id, kind, look, at: [x, z], yaw}; homes also require respawn in seconds, from 1 through 3600. Coordinates are finite and within [-250, 250]; yaw is finite. IDs and look names are lowercase identifiers of at most 128 characters; the runtime species kind starts with a lowercase letter, allows camel case and hyphens (for example antler-king), and is at most 64 characters. IDs must be unique across all three arrays. Unknown fields and non-data values are refused. Actor rows accept no refill/respawn field. Their authored array order is preserved; row admission never sorts, spawns a body or changes runtime-allocated identities. Omitting actors preserves the existing parsed shape; actors: [] is also valid. The native runtime explicitly binds each actor when it reaches that position in its existing spawn sequence. The actor binder is a separate runtime integration; the format itself adds no automatic spawn, refill or independent lifecycle. These rows place the native runtime's registered species and looks; their brains, rigs and encounter logic remain runtime-owned. They do not create local-simulation creatures rows or grant trust to a product.

runtime.binds: ["state"] binds the existing top-level state declaration; there is no separate runtime.state payload. Full admission requires an empty state.player array and privacy: "host" on every shared field. Empty shared state is valid. The normal state schema still checks unique stable IDs and names, typed defaults, finite numeric bounds and capacity. String values (including serialized JSON) are bounded at 4096 characters; JSON is opaque text, never an author callback. Ordinary unbound state keeps its existing public or player ownership rules.

runtime.binds: ["terrain"] binds the ordinary compiled terrain section: its render tiles and critical collider remain admitted product assets. The data client installs neither the terrain view nor its collision. The native runtime calls the native terrain binder supplied by its installation, supplying the admitted asset reader, its own terrain view, initial shard-local position and, when charged per tile, the page residency allocator. The result exposes ground queries over the admitted collider, resident fine-tile keys and refresh(x, z). Tile residency and view disposal follow the supplied scope; the runtime retains physics ownership and must avoid installing duplicate ground.

Query-only terrain is additive: {version:1, form:"query", tiles:[], sampling:{law:"bilinear", file, normalEpsilon, datum}}. Only a runtime declaring runtime.binds:["terrain"] may use it. collider may be omitted; admission then derives its reference from sampling.file, without creating collision. An explicit distinct collider still passes the ordinary critical 257² collider checks. The optional family defaults to toon solely for the common terrain shape; query terrain compiles no material and draws no mesh. The binder returns the original bilinear height, normal and splat queries, an empty fine-tile set and a no-op residency refresh. The native runtime keeps collision ownership. Rings have no query tile to schedule; regional and data presentation skip it.

The content report counts a retained WSTR alias as admitted only when the bounded readNativeTerrain author reader re-encodes its entire height/splat lattice to the exact hash-checked terrain.sampling.file bytes. A placement section or any unread tail remains private, even when its heights match. A plain binary declaration, wrong hash or differing sample grants no ownership.

runtime.binds: ["props"] binds the ordinary compiled props section, including tiles, library models, panels, textures and the far proxy. The native runtime owns their installation and piece behaviour; naming the section alone installs nothing. runtimeBoundWorldFiles in runtimeBoundRows identifies files referenced only by bound world sections. withoutRuntimeRows removes those sections and their exclusive file, critical, library, tile and far references from the data client's installation view, while preserving files still referenced by unbound declarations. The original product remains fully admitted and available to the runtime. Binding world sections does not waive hash, reference, geometry, entry or budget checks.

Every bound section remains ordinary declared data and passes its full schema, reference and budget checks before binding. The admitted source retains those rows. Only the native data client's installation view removes bound sections, preventing duplicate installation. Bound rows alone do not activate the full data gameplay loader; unbound behaviour and other authored content retain their ordinary path. If the remaining data/content/assets are empty, data stages add no services and the existing runtime supplies gameplay and presentation. External products still refuse a runtime declaration, and external empty products keep the ordinary Game path.

The native runtime explicitly calls the game-owned installers in @wildshard/game/plugin/headless inside its play scope:

binds grants no runtime trust or automatic installation. The registered built-in entry must still match the same slug and entry exactly, and a runtime cannot bind a section it did not declare. Leaving the cell disposes its entered services; revisits bind the same admitted rows through the ordinary retained/restored lifecycle.

Declared item input (SF70). Each items.contexts row has a unique id, keysFrom, the exact ordered actions below, touch and boolean lockable. The platform registers the new context with inherited keys in its owning scope. The four baseline IDs are referenced, never redeclared as new context IDs. Item ui.swapIcon preserves the authored glyph verbatim, bounded to 512 characters so existing multi-path swap glyphs fit without truncation or a separate resolver.

keysFromactionstouch
weapon.meleeattack, heavy, lockmelee
weapon.rangedattack, aim, reloadranged
weapon.bowattack, aimbow
weapon.spearattack, aimthrowing

A weapon's context normally names a declared context or the existing weapon.melee baseline. Optional items.runtimeContexts lists at most 64 unique, bounded existing context IDs (for example weapon.bow, weapon.ranged or weapon.spear) for runtime-bound weapons to reference directly. These IDs cannot also be declared in items.contexts. Nonempty references require a built-in runtime declaration whose binds includes "items"; they do not register or replace contexts. The runtime-owned installer checks every reference against the live input registry before creating any item. Missing contexts and ordinary data-client installation are refused. Omitted references preserve the old format output and melee path. Runtime registration of newly declared contexts still uses the entered-scope lifecycle.

The native injected ItemFamily may supply presentation containing ui, cues, hitStop and rangedFeel. Its optional UI fields preserve existing ammo readouts, touch profile, lock/melee/tracer flags, swap label and hunter's eye. Declared identity, slot, input context, name, icon and swap glyph remain authoritative. Presentation overrides are host-owned code metadata, not accepted fields in item JSON. This does not introduce projectile simulation: existing native bow, thrown and firearm families keep their firing/reload/flight logic; numeric contact limits and the one shared script-host contract remain unchanged.

Runtime-owned native tools. A tool row may declare action: null only when runtime.binds includes "items", and that row must have hook: null. Its host-owned family owns the existing input and gameplay (for example a grapple); the declared installer adds no generic toggle binding. Ordinary tools keep their required dotted action and existing toggle path. The native row retains fuelSeconds (0.001–86,400) and intensity (0–10) as finite compatibility placeholders; these do not grant a lamp or fuel mechanic to the native family. Declared UI, view, identity and loadout rules remain the same. External products cannot acquire runtime ownership by declaring this shape.

Admitted weapon hooks (SF36). A native runtime's weapon family may ask an admitted AssemblyScript module for a number (today the mounted sword's pass damage) through a declaration beside the shard's director, not a Shardfile field: { id, entity, module, parameters, weapons: [{ weapon, damage: { event, phases, facts, min, max } }] } (@wildshard/game/plugin/weaponFamily). The module is hash-checked and runs under the same ABI-v0 ceilings; each call answers one declared event with an integer in bounds or declines to the family's row rule, and returns to its admitted memory afterwards. Inputs and the install path are in ENGINE.md § 18 (Declared items).

Built-in picker manifests may carry a built shardfile URL. The normal entry admits that same-origin source before starting the session, retaining the manifest's canonical slug, picker art and catalogue save instance. Offline admission reads the complete visited product without requesting its source or immutable files again.

Creature look recipe platform.skin names a library JSON hash in parameters.skin. The JSON contains one exported {row, binding} rig declaration and depends on exactly one admitted GLB. Animation recipe platform.clips takes an attackSpan in seconds (default 1, bounded 0.05–10). The rig, clips and numeric pose layers are validated without importing a renderer; the client samples the same exported clips as the skin player.

A skin's binding may also map GLB material names to look.materials IDs in materials (TE-ENG10), the way props.materials does for props: binding: { skin, material, materials: { Gullet: 'brasscap.gullet' }, loops }. (Not on the look row: its parameters take only numbers, flags, text and number lists.) The GLB's one skinned mesh may then carry up to eight primitives with the same channels, one per GLB material. A primitive in a mapped material draws with that look material (an emissive eye or gullet: one more draw per rig, and one more shadow draw where the rig casts); every other primitive draws, merged, with the binding's family material. Each mapped name must be drawn by the GLB and each ID a declared family (not graph) material, since a part flashes with the body through its family's ports; 1 to 7 names.

Quest track defaults to true; false leaves the HUD tracker empty while retaining quest state, map presentation and completion/reward handling. The teaching template keeps its previous untracked adventure. Declared item views mount in the normal equipment viewmodel host, including off-hand tools, and leave with the level scope.

Edge rows retain every native boundary vertex; 129-point decimation is refused. A modern terrain collider is 257² and carries 257 samples per side, without resampling. When a 256-point neighbour meets a 257-point neighbour, the platform strip uses the sorted union of their native positions (511 points), so both exact boundaries survive.

creatures.brains accepts pursue, stalker, skirmisher, guardian, perch-hunter, grazer, diver, ram-grazer, challenge-grazer, orbit-diver, patrol-diver, burst-flyer and script policies. The three native families use the strict schemas in shardfile/brains; their optional thinkDivisor defaults to six and must divide 60. Decisions run at that cadence, and the owning body recipe runs once per fixed step. The loader preflights all actor identities and native recipe ports before registering any brain callback. Native perception, attack tokens, floor/reach, rise/sink, perches, projectiles and movement remain explicitly injected native recipes; missing recipes refuse boot rather than inventing gameplay. Policy contracts, actor memory and RNG restore without executing a decision or body callback. pursue retains its existing platform behavior. A custom script policy declares an admitted module in sim.scripts, a thinkDivisor dividing 60, bounded maxSpeed, maxStrafe and maxTurnRate, up to 64 finite parameters, and up to 32 unique numeric strike events resolving rows.strikes. No actor handle is accepted from this declaration. The factory derives a host-owned brain:<actorId> alias per spawn and rejects collisions with actor, item and director handles. All aliases count toward the one serverBudget.entities allowance.

The stalker archetype (SF82) admits pattern: 'skirmish' with exactly the old flat skirmisher fields, bounds, ordered perception/strike checks and optional six-tick cadence. @wildshard/shard-format/brains defines StalkerSchema, parseStalker and stalkerPreset; @wildshard/sdk/brains emits the validated row with stalker(data). Full-factory rows and species catalogues (archetype: 'stalker') canonicalize to the existing skirmisher native adapter, removing only the pattern and restoring the legacy kind and parsed key order. This preserves existing continuation bytes and restore without running a decision, allocating a body or drawing RNG. The old skirmisher spelling remains admitted. Native attack tokens, floor, navigation, body/contact and RNG ports are still required. Howl/pounce encounter patterns already share the engine policy but are not admitted as creature rows until their complete native encounter ports are hosted; an unbound pattern refuses rather than inventing them.

The guardian archetype (SF82) also accepts an explicit pattern: interior or perch. The flat fields, numeric bounds, cue ids, ordered-range checks and optional six-tick cadence are exactly those of the old guardian and perch-hunter rows. Cross-pattern fields and unknown patterns refuse. A guardian row without pattern keeps the existing interior spelling unchanged; the old perch-hunter spelling also keeps loading. @wildshard/shard-format/brains defines GuardianPatternsSchema, parseGuardianPattern and guardianPreset; @wildshard/sdk/brains emits validated author data through guardianPattern(data). Canonicalization removes only the pattern tag and restores the legacy row kind and parsed key order, preserving existing save-contract bytes. Both full-factory and species-catalogue hosts select the same native body ports as the old spelling. Interior floor, rise/sink and perch selection, drop/climb, projectiles and shared attack RNG remain native ownership; absent ports refuse before callback registration. Pattern admission does not run a body or decide, including on restore.

The grazer archetype (SF82) selects a strict pattern: wander-ram or circle-challenge. Its flat fields, strike references, numeric bounds and optional six-tick thinkDivisor are exactly those of ram-grazer or challenge-grazer, respectively. No field from the other pattern is admitted. @wildshard/shard-format/grazers defines GrazerSchema, parseGrazer and the pure grazerPreset canonicalization; @wildshard/sdk/grazers emits the validated row through grazer(data). The existing legacy row names remain admitted presets of this one policy host. The full-schema lane/arc strike checks and existing native body recipes apply to both spellings before registration. Stable row ids, actor ids, decision cadence, RNG and continuation bytes remain identical when only the spelling is changed.

The two grazer families use shardfile/grazers and the author adapter @wildshard/sdk/grazers. A ram grazer names a rows.strikes lane profile with positive windup and range; a challenge grazer names distinct lane-charge and arc-close profiles plus distinct windup/recovery actor-memory fields. Both default to a six-tick decision divisor. The full factory and client require explicit brains.ramGrazer or brains.challengeGrazer recipes for observations, native body work and the matching named strikes. Missing ports or mismatched strike identities refuse before brain callbacks, RNG draws or actor-memory writes. One actor callback runs divisor-scheduled decisions, fixed-step policy action and native body work. Mutable policy and strike clocks are snapshotted with their cadence and tuning contracts; restoration runs no observations, body work or random draws.

The diver archetype (SF82) selects a strict pattern: orbit, patrol or burst. Its flat tuning, home, named strike and default six-tick thinkDivisor are exactly those of the corresponding historical flight row; fields from a different pattern refuse. @wildshard/shard-format/flyers defines DiverSchema, parseDiver and diverPreset; @wildshard/sdk/flyers emits the row through diver(data). The shared policy preserves each pattern's state and contact laws. The pure canonicalization is also used by full-shard strike/home/flight admission and installation, so the existing native ports and save contracts remain exact. Old flight row names stay admitted presets. Phased and stoop patterns remain open.

Flying policies use shardfile/flyers and name a declared sphere strike and a home inside the cell. Their spawned species must declare flight: finite altitude (-250..250), positive climbRate and diveRate (at most 30 m/s), optional above (ground or world, engine default ground), positive lockRange (at most 600 m), and optional bank strictly between 0 and pi/2. The species resolver copies this data into the existing flight motor; omission keeps a ground species. Host-owned brains.orbitDiver, brains.patrolDiver and brains.burstFlyer recipes supply observations, native body work and the named sphere strike; the burst contact shove is an authorized host operation. Decisions default to six ticks, policy action and body work run once per fixed step, and mutable flight/policy/strike state restores without observations or RNG draws.

A native runtime's species rows may carry brain: { archetype, data }. admitSpeciesBrains in @wildshard/game/plugin/brain admits the canonical stalker/guardian/grazer/diver patterns, boss-script policies and retained presets. Data passes the same defining format schemas as the creature families; per-body homes, RNG, perception, contacts and flight are actual native ports. It admits the catalogue before any row or policy is built (unknown archetype, failed schema or unresolved strike refuses); the client spreads bind(kind) onto the row and the headless host calls installSpeciesHomes, so one declaration drives both. Rows without a brain keep their runtime policy. A script brain names an admitted AssemblyScript module by hash with parameters, up to 8 state slots, up to 4 actor memory fields, motion bounds and 1–8 declared strikes; its module comes to speciesBrains as the bake's base64 (a plain { sha256: base64 } row) and is checked against the hash. A phased-flyer brain is a boss flyer (circle, chest dive and climb with its dive strikes; grounded from groundedPhase with its grounded strikes) that its encounter steers through fight / rise / phase memory fields; bossFight({kind: 'boss', pattern: 'spawned', fight}, ports) (@wildshard/game/plugin/bossPhase) is the view-free fight that writes them: arena, health share per checkpoint, rise seconds, storm phases and fade. Its browser presentation is a row too (parseMarkedBossPresentation): the arena floor, the respawn point, the storm's fog and blown-sand shells, and the toasts. A quest's runtime is declared as well (@wildshard/game/plugin/quests, for native runtime): parseQuestGraph names the interaction rows' command actor, their marks' step and the actions a row starts ({ row, summon } arms a boss). NPC contracts are defined by @wildshard/shard-format/npcs: NpcRowSchema, NpcMotionSchema, and NpcDialogueRowSchema share strict admission with the existing SDK and runtime parsers. Their generated JSON Schema documents retain every structural bound; figure, animation and dialogue ordering stay with their owners. Native quest bindings can also declare a QuestNpcBindingSchema row: NPC, talk label, finite ground anchor (with an optional exact query point), source metadata, update system, met-flag policy and missing-model policy. @wildshard/game/plugin/ui installQuestNpc validates it before borrowing geometry/material/dressing from their existing owners. The optional questNpcs root holds up to 64 bindings with unique NPC ids, talk spots and update-system ids. Nonempty rows require runtime.binds: ['quests']; every dialogue flag and observed met flag must be declared in quests.flags. installDeclaredQuestNpc binds one admitted row by NPC id and refuses a missing id before borrowing resources. Absent questNpcs preserves existing wire bytes; the native owner still supplies the models, materials and resource dressing.

The optional questHost root composes native quest graphs without author callbacks. @wildshard/shard-format/questHost admits its interactions, NPC spots, required body ids, bounded command routes and ordered data-only directors. Every durable flag must occur in quests.flags; it requires a runtime bound quest owner. Omission preserves existing shardfile bytes. For example, with quest.notes declared, a borrowed native host may use:

questHost: {
  version: 1,
  graph: { actor: 'quest.interact', step: 'quest.marks', actions: [] },
  interactions: { marks: [], rows: [
    { id: 'notes', act: 0, at: 'notes', sets: ['quest.notes'] },
  ] },
  npcs: [], drive: 'external',
  actors: { ids: [], error: 'Missing quest body' },
  observations: [], stages: [], summons: [],
  commands: { step: 'quest.native', inputs: {}, routes: [
    { value: 0, spot: 'notes', when: 'true',
      action: { kind: 'row', id: 'notes' } },
  ] },
}

installDeclaredQuestHost in @wildshard/game/plugin/simulation receives the actual commands, spots, effect ports and owner maps. Command conditions use the existing bounded director when-language. all-dead observations read only declared installed bodies; owner observations borrow actual boolean ports. Native actions refuse when unbound. Quiet seeds select original loaded observations; only explicitly named continuations add saved state. Transient flag stages do not invent a cursor. The data-client projection clears a bound host so it cannot install native quests a second time. parseNpcRow declares a quest-giver (where it stands, its talk, its figure metadata and dialogue). Native figure placement stays with the host-owned owner; there is no public SDK pivot-NPC installer. Sky's phased-raptor remains a kept one-shard law: perch/return/takeoff, altitude and phase-specific ready laws are not expressed by the current generic diver/phased-flyer rows.

Species catalogue rows may also declare a bounded body recipe (CreatureBodyRecipeSchema in @wildshard/shard-format/creatures). brains.body binds that declaration to an existing host-owned animal, its actual ground/flight motor, keeper RNG stream and either the keeper's real claim or an explicitly unlimited owner. It never spawns a body, draws RNG or introduces a clock. Ram, orbit and burst policies require the body's real bounded home. Environmental contacts and actor/move contacts retain their distinct native filing; look-hold retains the existing stunned-body observation law. Unknown native protocols (skirmisher, guardian and perch) refuse rather than synthesizing missing authority. bindSpeciesBody lets an existing native encounter policy reuse that same body binding without replacing its encounter owner or saved policy.

A boss with stances, adds and arena tricks is an arena or roaming boss profile (bossFight(profile, ports), @wildshard/game/plugin/bossPhase, native runtime only): its modes (damage rule, hp lock, motion, timed beats), phases (checkpoint hp, roar, what entering each does), attack rows (a charged burst, a cut combo), weak points, adds in waves and hazards (expanding rings, timed pours, a sweeping beam) are one data row; every dressing change is a named view call (arena.lid.open, hazard.sweep, …) the shard binds to its own meshes, so the fight's logic is the platform's and only the view stays in the shard (Nalati's Golden King: combat/goldenKingRow.ts, combat/goldenKingViews.ts).

Custom policies and numeric state share one module union and one host: memory, fuel, queries, effects, events and quarantine are charged once per fixed tick, with independent binding cadences. Brain effects request bounded motion and named strikes only; they cannot use the numeric role to write shared state. The factory requires injected observation, attack-token and strike recipes; missing recipes refuse boot. Its structural numeric-state facade preserves quest/item plumbing and snapshots both roles and the one host together. Restoration executes no observation or decision; logical migration extracts only the explicit numeric role, preserving historical standalone saves.

creatures.groups defaults to [] and admits at most 64 controllers. New author rows use kind: "stalker", pattern: "pack" or kind: "grazer", pattern: "herd"; the historical kind: "pack" and kind: "herd" rows remain exact presets. The flat tuning fields and native recipe requirements are identical. Pattern mismatch refuses. Canonical native tuning preserves field order and existing continuation bytes. Each declares a unique controller ID, strict finite tuning, six-tick decisions and an ordered roster of at most 128 stable actor IDs. That roster must exactly match the spawn order whose brain names the group. Individual, group and encounter controllers cannot share an actor or controller ID. One group policy owns the roster; body work runs once per live actor per fixed step. The client injects native perception, shared RNG, prey/taming, contact and steering recipes through groups; absent recipes refuse boot. All group, individual, custom-script alias and encounter admission finishes before group initialization. Cold setup consumes shared RNG in declared group order once. Each group has one typed snapshot adapter; restoration skips initialization and executes no observation, decision or body work.

audio retains cues, nullable wind ambience and score: "silent" | "default". Its optional routing defaults to an empty ordered array. At most 512 cue rules select catalogue voices on the audio or combat bus; each has at most 16 actions and 16 conditions. Actions may apply bounded numeric defaults and a scope-owned delay of 0–60 seconds. Routing contains no author callback or random draw.

Optional samples selects a catalogue set, bed and at most 32 loop gains in 0–8. Optional music declares the score ID/base, up to 32 slots and boot slots, slot-to-set mappings, pluck or marimba lead, a 0–60-second minimum fade, and up to 64 ordered selection rows (first or all). Its nullable source names an /assets/music/<slug>/ directory and manifest key, without a free-form URL. Optional zones declares mixer timing, up to 64 named levels, 16 room wetness values and 512 uniquely named radial ambience zones. These are validated data; catalogue resolution, existing sample decoders, bar-grid scheduling, geometry queries and bespoke synthesis remain native platform/runtime installers.

Immutable AAC admission accepts the same bounded 48 kHz AAC-LC packet layout in mono or stereo, charging the actual channel count, priming and final packet. Container and codec channel declarations must agree. The incremental title playback reader remains stereo-only; mono recordings use the existing whole file decoder. No recording is resampled or re-encoded by admission.

Sky Reach and Signal Dunes bind their native cue recipes and silent score to runtimeAudio(ctx, legacyAudio) from the defining game audio module in an admitted runtime entry. Routing comes from the emitted shardfile; voices, optional arguments, clocks and scoped randomness stay with the original native owner. Legacy-only entries use the unchanged source declaration. A routing alias allocates no sampled bank or sound bytes. Driftwood likewise binds its emitted native cue routes and music profile to its existing score owner: selection, lead, fade and boot slots come from the admitted rows; style-bank decoding, stings, playback clocks and scoped disposal stay with the original owner. Its native bed mixer also consumes emitted zone geometry, levels, wet sends, smoothing and cadence without starting an audio device during construction. Legacy-only entries retain the source profile. Nalati binds its emitted music source, ordered scene selection, fade, synth lead and native weapon routing to its existing entered sound owner. On-demand decoding, bar-grid scheduling, thrust microtasks and two-entry callback restoration remain unchanged. Emitted zone bounds, mix cadence, sampled-bed levels, smoothing, zone hold and silent retirement feed the same native steppe owner and RNG stream. Nine Dragon binds its emitted cue aliases, score source/selection and enclosed bed profile to the existing native owner. Zone bounds are prepared once per installation; footfall cycling, chime RNG, sample playback and scoped retirement remain native. Catalogue-byte adoption is a separate charged closure. Pine binds emitted cue routes, lever echo delay/gain and baked ambience positions to its original entered owners. Live mill-wheel gain and echo timer cancellation remain native. Its bed mixer also reads emitted levels, room sends, smoothing, tick rate and silent retirement from the existing profile. The retained score consumes emitted selection, slot sets, synth lead and fade data while preserving its scene and boss phase across re-entry. Replacing an entered recipe refuses before mutation; retired-recipe decodes cannot publish into a later entry. Recording-byte closure stays separate.

Optional audio.recordings maps at most 1024 existing catalogue paths such as /assets/music/folk/pickup.m4a to local SHA-256 or commons:<SHA-256> references. Paths are lookup identities, never network addresses: only bounded local music/SFX paths ending in .m4a or .wav are admitted. Each reference must be in the charged library closure. Local files must have kind audio; commons references must be declared in requires, and their actual bytes must pass the same PCM WAV / AAC admission. Multiple paths may share one hash and pay one resident/download cost. Omitting the bindings retains existing host-owned catalogue resolution; bindings alone do not install a bed, score or voice.

The full client owns declared audio by default. An explicit audioOwner: "runtime" binding is allowed only for a native runtime declaration, whose installer consumes the same audio data once. This transition avoids duplicate cues, beds and scores; ordinary authored products use the declared installer.

Crowd declarations use optional top-level crowds (default []), an ordered array of flock rows from @wildshard/sdk/crowds. Each row names its stable ID, home x/z, member count, seed, roaming range, run/walk/graze speeds and bleat cue. Admission allows at most 64 unique rows and 4,096 members, requires home centres in the cell, and counts members alongside creature spawns against serverBudget.entities. Native recipes supply terrain bounds, perception, sound and presentation; data cannot supply callbacks. The full client and headless factory share those injected ports, preflight every recipe, then initialize only after the remaining simulation admission succeeds. Each crowd owns one fixed callback and snapshot adapter; restore skips setup draws and resumes its ordered member state/private RNG. The minimal empty client refuses crowd content. No live shard changes selection here.

The authored-world texture encoder is @wildshard/sdk/bake/textureWasm: bakeWorldTexture(bytes, 'srgb' | 'linear') reads a bounded still PNG/JPEG/WebP, then emits UASTC KTX2 with a complete mip chain. The SDK pins @loaders.gl/textures 4.5.3 (its packaged Basis Universal encoder JS and WASM), sharp 0.34.5 for raster decode, and meshoptimizer 1.2.0 for the following LOD slice. Encoder artifacts are SHA-256 checked before ordinary Node module loading; there is no system basisu requirement or CDN download. Settings are single-thread UASTC, quality 128, mip generation, and KTX2 UASTC Zstandard supercompression; colour/emissive chooses sRGB transfer and normal/ORM chooses linear transfer. Input dimensions are at most 4096², wire size at most 25 MB, with one still frame. The existing generator helper bakeColourTexture keeps its historical system-tool output; this additive helper is the portable authored-world path. The subsequent world bake will call it and charge its output through ordinary KTX2 admission.

Authored-world LODs use @wildshard/sdk/bake/worldLod and pinned meshoptimizer 1.2.0 WASM. simplifyWorldPrimitive(primitive, ratio, maxErrorMetres) runs per material, locks topological borders, weights normals/UV/colours/tangents and retains original float64 positions and attributes for every surviving vertex. It never merges material surfaces, moves bridge decks or converts them to a heightfield. The returned triangle count is the actual result: seams/topology or the error limit can prevent the requested ratio. errorMetres is meshopt's absolute appearance-error estimate with a two-sided float32 position allowance, not an independent Hausdorff measurement. If float32 precision alone exceeds the ceiling, it returns unchanged geometry. Admission charges the actual output; a triangle target is never treated as proof that the output fits a cap.

Authored-world material bindings (SF55a)

Native world conversions can use @wildshard/sdk/bake/nativeLattice: sliceNativeLattice(source, lod) accepts the original 256 or 257 vertex lattice, explicit triangle indices (including its diagonal and holes) and bounded named vertex channels. It clips those triangles into all 64 L0 or 16 L1 squares without resampling heights, normalising attributes or simplifying geometry. Original samples remain exact; cut vertices interpolate the original triangle attributes. Supported channels include normal, UV, colour, splat and Nalati's surf vec4, rdir vec2 and zone vec3. Collision retains its original native bake; this is render geometry only. simplifyNativeLatticeTile from @wildshard/sdk/bake/worldLod then simplifies L1 with locked tile and hole borders, retaining exact surviving channel values. Report its actual count and appearance-error estimate (not an independent Hausdorff bound), and charge the emitted geometry; the target ratio is not a guaranteed reduction.

props.materials is an optional exact map from each source glTF material name (case and spaces preserved) to {id, colour?, normal?, metallicRoughness?, occlusion?, emissive?}. The id selects an admitted look.materials entry or platform family default. Each non-null slot names a KTX2 file and its glTF sampler (wrapS, wrapT, minFilter, magFilter); normal also carries scale and occlusion strength. One file takes one sampler and one colour/data role. Named materials replace props.textures; every GLB carries its used slot files as dependencies, charged with that GLB. Format admission checks ids, supported slots and declared references; immutable-byte admission refuses any unmapped or unnamed GLB material, naming it. Omitting this map preserves the existing one-family path.

props.splat optionally declares {material, layers: {colour: [four KTX2 hashes], normal: [four KTX2 hashes], arm: [four KTX2 hashes]}, tints: [four linear RGB triples], boreal: null | {normalK: [four factors], trailDust: [four factors]}}. Its exact GLB material name is the sole exception to props.materials; it cannot also be a named prop slot. Each GLB using that name must directly declare all layer files as dependencies. These compressed bytes are preserved and deduplicated; colour and numeric roles cannot share a file, and array-owned layers cannot also be ordinary material textures. Native terrain GLBs carry _SPLAT vec4 and _CANOPY scalar channels. WorldBakeRows.finish(family, {materials?, splat?}) packs the same declaration and verifies each GLB's own dependencies. Forest records and their renderer residency remain a separate pending product seam.

Authored-world collision bake (SF55a)

@wildshard/sdk/bake/worldCollision exposes bakeWorldCollision(normalized). It clips actual collision triangles to the 62.5 m L0 lattice and emits nonempty, ordered tile rows plus independent interactive collider rows and content-addressed WMC1 bytes. It applies panel root matrices (including mirrored winding) into the rest world pose; panels stay out of the static collision tiles. Collision receives no LOD or heightfield conversion, so overhangs and ground below a bridge remain. Shared edges interpolate in a canonical direction and exact Float32 positions are welded within a chunk. A vertical surface exactly on a lattice line belongs to the positive-side tile (or the last tile at +250), preventing duplicate boundary walls.

Each chunk is bounded to 40,000 triangles and 120,000 referenced vertices. Invalid indices, nonfinite/out-of-cell geometry, singular panel matrices and triangles that collapse at Float32 precision fail with the source node/panel name. Empty intersections contribute no file. The caller's normalized geometry is unchanged, and repeated bakes produce identical immutable bytes. This helper does not yet write the compiled collision section or install it through wildshard build; those are the next integration steps. A native capsule fixture crosses 140 m with more than 98% aggregate travel and no blocked step or fall; Rapier casts still briefly slow at flat internal diagonals, so this is not a per-step 98% freedom proof or a completed SF55a playability verdict.

Collision residency is provisionally 2 * wireBytes + 64 * vertices + 256 * triangles, charged as decoded sim memory with no GPU resources or render draws. Native snapshots at several chunk sizes check serialized growth against that allowance; they do not measure native heap usage. SF22a must replace this model with measured allocation costs before a shard using it ships.

The compiled section is optional/default-null: {version:1, tiles:[{x,z,file}], panels:[{id,panel,file,initialActive}]}. Tile addresses are unique integers 0–7 on the 62.5 m grid (at most 64); panels are bounded to 64 with unique collider and render-panel identities. Every file is an independent critical binary root with no dependencies; repeated chunk hashes are refused to avoid counting one file for two native allocations. Actual triangle positions must stay inside the declared tile. Panels resolve declared prop panels, and their stable collider ids participate in the existing published-state target bindings without authored physics callbacks. The section excludes terrain; it preserves layered geometry instead of inventing an implicit flat heightfield. Metadata and exact asset admission are implemented; full validation and runtime construction explicitly refuse these products until native restore, entry-footprint and client integration land.

Socket lift declarations (SF8c)

@wildshard/sdk/socketLift defines the bounded data link {mover, roadStop, topStop, route, gate, rideTicks}. Both ids resolve to admitted SF30 mover rows; stops and route points are shard-local feet coordinates. The route begins at the top stop and continues to playable ground; at most 32 points and 3,600 fixed ticks per ride are admitted. The deck loads at its road stop, flush with y=0, covers the full eight metre boarding line with at most a five centimetre seam, and stays at least ten metres inside the cell at both stops. Unknown movers, missing gates, mid-travel authored starting poses and undersized decks refuse before physics allocation. An optional lift.approach: {colliders, route} instead proves a permanent static approach from the socket to a narrower boarding deck. It names 1–32 unique props.colliders rows, active at load, with no panel or activation binding. Its 2–16 road-height waypoints start at the socket's inner midpoint (north +235 z, south −235 z, east +235 x, west −235 x), stay ten metres inside the cell and total at most 32 m including the final walk onto the deck. Real top triangles must cover the full eight metre static mouth and the capsule-width corridor; only the final static-to-moving seam permits a gap of at most five centimetres. The deck must support the real capsule at its road stop. A static road gate remains mandatory. Visual meshes, implicit ground and platform socket floors cannot prove this approach. Without approach, the direct eight metre moving deck rule is unchanged. This declaration alone is not a legal entry: the executable admission must walk the real capsule, interact through MoverRuntime.command, ride the admitted WASM-controlled deck, reach playable ground, return and call from both stops. It must also witness the platform gate blocking the road while the deck is away. The compiled entryways row uses kind: "socketLift" and a lift with this shape. Other kinds refuse a lift link. The optional top-level movers array defaults to []; every mover module is a critical admitted sim.scripts WASM module. Compiled chains remain refused until native joint reconnection is available. A native channel mover with a carry may take a steer driver ({kind: "steer", speed, turn, boost, accel, ground}: top speed 0.005–60 m/s, turn rate up to 2π rad/s, a boost multiplier 1–4, acceleration up to 100 m/s², and whether it follows the ground): its rider's stick and boost move it instead of a fixed path, boarding is an ungated interact press, and it has no clip. Its identity is MOVER_DRIVER_MODULES.steer, which no guest module carries. An optional wind ({toward: [x, z], push}, SS-MS2a2) pushes the vehicle along its heading: toward is the ground direction the wind blows to (any non-zero length, lowered to unit length) and push the m/s (0–20) it adds straight downwind, scaled by the cosine to the heading, so the same stick goes further downwind than up. It lowers after the rest pose as three more input numbers.

Vehicles (world/vehicles, MIRROR-SALT-ZONE MSZ1)

A steer carry is the old way to declare a vehicle; world/vehicles is the one way from format 0.53.0 (meta J459 call 1 A). The section holds kinds and docks (vehicles.ts, parseVehicles).

A steer carry migrates (MSZ2, vehicle-lift.ts): liftSteerVehicles turns each native carry channel mover with a steer driver into one kind (one standing driver seat at the carry's seat, its prompts as labels, its panel's props.colliders boxes moved into its frame as the hull, no reverse, a brake as quick as its acceleration, full grip, no drift, 250 kg) and one shared dock at its rest, and drops it from movers; a collider it cannot take is a note, not a refusal. The steer driver row stays readable for old revisions only. Until the engine's vehicle runtime, an engine runs each dock as the steer carry vehicleCarryMovers lowers it to, with vehicleCarryHulls as its hull (a passenger seat waits for that runtime).

The executable helper proveSocketLift(entry, {physics, runtime, fixedStep, waterAt?, approachSource?}) uses the admitted MoverRuntime and the engine's real capsule motor. The platform-owned fixedStep advances its single script host, mover and physics world; author data cannot supply it. commandSocketLift is the normal queued interaction used by both admission and play. A probe initializes feet once on the road; subsequent travel is collision movement and platform carry. It checks boarding, a complete ride, walking onto static playable ground, automatic idle return, return travel and calls from both ends, with gate collision across 23 overlapping road capsule lanes. Deck motion above 15/60 metres per fixed step is refused as a teleport. Temporary capsules dispose even on refusal. This helper is an executable check, not a stored readiness flag. When approach is declared, approachSource supplies the admitted props and collider activation bindings; the ordinary factory supplies it automatically. The proof walks the static waypoints out and back, verifies actual named floor support, and refuses unowned hidden floors, low headroom, submerged paths or a gate that changes pose. At touching floors and the admitted seam it queries named collision support without changing the rider's position. The gate may toggle collision, but must remain stationary throughout the ride and both calls. SDK headless validation runs it in the same authoritative factory as the client. Ordinary edges retain their full 50 metre walk; each lift adds 23 gate lanes and reports its two rides and two stop calls. A fresh independent world starts each lift at its road stop.

Movers, numeric state and custom brains share one host and one beginTick, with all module memory, entities, fuel and effects charged to that host. Lift-only modules cannot also own numeric bindings, custom brains or persistent movers. Their memories/globals, published poses and queued interactions are transient: a fresh load resets the deck to roadStop and opens its gate, while persistent numeric progress and the global tick continue. Native restore reconnects the same saved body handles; it allocates no duplicate deck or gate and performs no physics/gameplay tick. A lift rider checkpoint stores only the stable entry edge. Loading puts that rider at the reset road boarding point after checking the real upright capsule against current deck and obstacle poses. Missing, submerged or blocked boarding falls back to the normal admitted safe spawn. This load policy never teleports a capsule during the traversal admission proof.

Mesh entry admission clips every actual WMC1 triangle to the canonical 8 × 15 m footprints. Ground entries require exact continuous area coverage at y = 0 from permanent static chunks; gaps, slopes and panel-only ground are refused. All mesh panels, including inactive ones, are checked for above-road obstructions. Socket-over-water entries additionally require a continuous full-width permanent collision landing at the inner line; platform floors and interactive mesh panels cannot prove that landing. The existing dry-entry water exclusions still apply.

Portal entry links (SF8c, G224)

An entry may declare kind: "portalLink" and portal: {road, destination, exit, links, route}. Each endpoint is {id, at: [x,y,z], floor, yaw?}; yaw defaults to zero and is bounded to ±π. The road endpoint sits at y=0 on the centreline of its canonical 8×15 m deck. Exactly two directed links are admitted: road.id -> destination.id and exit.id -> road.id. Unknown, missing, duplicate or conflicting bindings refuse. The 2–32-point cell-local route starts at the arrival and ends at the exit; this route is walked, not teleported. @wildshard/sdk/portalLink supplies the strict schema and parser.

Every endpoint names an active permanent static prop collider or mesh.tile.x.z; a moving, hidden, target-controlled or platform collider cannot bind it. Exact projected collision triangles must cover the entire road deck and every endpoint's capsule footprint. Existing footprint admission also refuses above-road dressing and water (intersecting water needs its canonical dry-entry exclusion). Above or below a stacked floor, a transfer queries only its named collision owner, never an implicit plane.

Headless validation uses the normal authoritative simulation factory, with implicit ground disabled in the portal proof world. Each entry proves 23 overlapping real capsule lanes across its full-width deck, a bound transfer to the destination, a native walk along the route, a transfer through the exit back to its deck, then a walk to the road. Counts report portalTransfers as well as lanes and steps. A gap, low headroom, submerged or blocked route refuses; every temporary capsule is disposed on either result.

The game-layer createPortalTraversal uses the existing physics, capsule and feet. teleport(fromId) rechecks the bound source and destination with canStandAt, including named static floor and full capsule clearance, before any pose change; it returns the admitted destination yaw. Transfers are synchronous and never evaluate author code. portalTransitioning(physics) fences profile/coin/continuation writes and native snapshots from validation through completion. Refused transfers leave the feet unchanged; no checkpoint contains a mid-transfer pose. Render and interaction bindings remain with the normal client view owner.

Native world-only runtime shards retain the original terrain.bin as nativeGround.file, an independent critical binary root. Admission checks WSTR v1, the native 256² lattice over 500 m, the identity seed, finite cell-bounded heights, bounded placement metadata, exact full 256-sample boundary rows and every continuous 8×15 m entry footprint. The native runtime owns collision and interactive geometry. Render tiles do not replace its native physics, and a standalone flat declared simulation proxy is refused. The renderer-free native collision/worker adapter remains a follow-up; this byte witness is not a claim that arbitrary native gameplay has been headlessly replayed.

G188 grid Auto evaluates the target images-first claim together with the page allocator’s current road and regional residents. If that projected playing envelope exceeds 1.0 GB it requests compressed textures; capability refusal still falls back to images and honest admission refusal. Explicit texture settings keep precedence, and standalone Auto keeps its standalone envelope.

Data-only SHARD SELECT cards

presentation is exact optional; omission preserves existing built-in cards. Each of card.thumb, card.portrait and card.landscape names a local files row of kind image reachable from library. Missing, wrong-kind, uncharged or remote references fail format admission before immutable asset reads. The admitted metadata replaces the built-in card and text only when present; identity, accent and entry choices continue through the ordinary picker.

image accepts single-frame PNG (up to 8-bit), 8-bit JPEG and WebP. Byte-derived dimensions are at most 4096×4096 and wire at most 4,194,304 bytes; containers have at most 1024 chunks/markers. PNG checksums and complete container ranges are checked; animation, compressed PNG metadata, SVG, scripts and author URLs are refused. The browser remains the pixel decoder. The asset cost is RGBA pixels plus four times wire for retained bytes/base64 URL on the CPU, and RGBA pixels for compositor residency, with zero geometry/draws. These costs are derived by assetCost("image", bytes) in the SDK and checked by ordinary asset admission, charged once per distinct library hash.

sourceManifest(source, admittedAssets?) in @wildshard/game/plugin/context is the pure defining identity/accent/card mapping for shardfile-only catalogue rows. It performs no fetch, image decode, world allocation or service installation. A presentation requires its already admitted byte map. presentationCard resolves each distinct hash once to a MIME-sniffed inert data:image/...;base64,... URL. The returned ordinary session hooks run later; the caller remains responsible for product admission and the library lease.

Conversion and content reports (G291 / G294 / G304 / G306)

node scripts/shard-platform.mjs --json reports conversion against each primary shard's registered frozen <slug>-legacy TypeScript inventory. The numerator is nonblank authored runtime TS, additional raw GLSL, and deduplicated platform code with only that primary user. Two real primary shards make a shared module public; the template and frozen copies do not supply users (G312). Moving code to engine, game or SDK does not remove its attribution. Tests and generated/baked outputs never contribute; ordinary authored generator/data TS is outside runtime TS, but raw shader literals in those folders and .glsl files remain custom. Shader lines already within counted runtime TS are not added twice. SF59 graph nodes are data. The frozen denominator remains TypeScript, including its authored generators/data, with the same generated/test exclusion. The new definition is report-only; existing historical enforcement stays active during base repair. Authored AssemblyScript has its own report-only line column, with no cap (G315); it does not enter the TypeScript ratio or native-runtime ceiling.

The same command reads public/shardfiles/<folder>/shard.json, or another emitted product directory supplied with --products=<directory>. It reports L0/L1 tiles, file kinds, declared collider descriptors/expanded shapes, mesh collision tile and panel references, and the heightfield separately. It names .bin and *.baked.json files under the shard and its native baked folder, opaque admitted binaries, and nativeGround ownership. Missing or malformed products are explicitly unavailable, with null counts; the report never imports shard.config.ts or bakes a product to invent evidence. structuralWorld is only a declaration candidate, not an admission, completeness or physics proof. Native runtime ownership and private world binaries prevent that candidate from reading as a completed port.

Headless/replay/ledger results remain visible. witnessCompatible preserves a passing native witness, while conversion's compatible is false and transitional is true as long as native runtime simulation remains. This includes Nine Dragon's current native headless worker even if its recorded witness says compatible: true; passing continuations do not imply a data-owned simulation.

Committed generated outputs (G318). Record exact output bytes and measured cold producer seconds with the source change. Other than committed Blender GLBs (G293) and sealed legacy baselines, an output qualifies for commitment only when regeneration exceeds 30 s and the output is smaller than 2,000,000 bytes. Unknown timing, warm cache hits, lease waits and Darwin-only provenance grant no exception. Eligible text outputs still need a DO-NOT-EDIT header and regenerate-and-compare proof. The inventory reports missing evidence rather than deleting unproven outputs. Build-time generation uses the content-hash cache.

Checked authoring guide (SF86)

Run pnpm docs, then read the SDK authoring guide with its complete format API and field/ABI reference. Generated pages are never edited by hand. Every public SDK and format binding must have a nonempty source doc line and an exact module/name entry in the generated reference. There is no undocumented allowance.

The guide covers format/JSON Schema admission, real three.js scene graphs and synth, renderer-free rig/clip/image readers, directors and their eight actions, AS input codegen, clip/pendulum movers, all four player modes, weapon profiles and native family registration, brain patterns/presets/boss rows, and immutable commons packs. Its hall, door/wave and pursuit examples reduce Template 1; mode/weapon/boss demonstrations are labelled illustrative rather than shipped tuning. Authoring emits data; a native family or body still needs its actual host. Material and look authoring waits for DS1.4.

Authoring scene input (DS1.3)

@wildshard/sdk/scene.readScene synthesizes an inspectable, JSON-only SceneDescription from real three.js objects in Node. This is compiler input, not an additional field in shard.json. The compiler owns asset encoding and final schema validation. A generator can use the same scene graph operations as three.js, adding SDK game concepts to it:

import { Scene, Mesh, BoxGeometry, MeshStandardMaterial } from 'three';
import { BoxCollider } from '@wildshard/sdk/physics';
import { PlayerStart } from '@wildshard/sdk/spawns';
import { Entry } from '@wildshard/sdk/entries';
import { readScene } from '@wildshard/sdk/scene';

const scene = new Scene();
const floor = new Mesh(new BoxGeometry(8, 1, 12), new MeshStandardMaterial());
floor.name = 'hall.floor';
const collision = new BoxCollider(8, 1, 12, 'stone');
collision.name = 'hall.floor.collider';
const start = new PlayerStart();
start.position.set(0, 2, 0);
scene.add(floor, collision, start, ...Entry.midpoints());
const description = readScene(scene);

Collider vertices/indices, transforms, contact tags, player starts, actor placements and entry declarations remain data. Importing these modules does not load game code, install physics, draw, flatten terrain or grant an entry proof. Shear/reflection and nonfinite values refuse. Capsules require uniform scale; spawns require upright unscaled frames; entries retain their exact 8 x 15 m midpoint socket frame. Geometry-based hull/mesh colliders preserve authored positions and triangle order, leaving final hull/physics validation to the bake.

The initial static reader supports PBR/toon materials and ordinary lights/fog. It explicitly refuses raw shaders/callbacks and features assigned to other compilers (textures, physical-material extensions and morphs). Ordered skins and standard named animation tracks are now retained by the scene reader. Template 1 and Pastel Plain's retained producers are the byte-identity pilots. This seam does not yet replace any page-bound physics producer.

Inspectable scene synth (DS1.2)

wildshard synth <project> compiles shard.config.ts in Node and reads its named scene (a real three.js Object3D) and identity.slug exports. These author-only exports are transitional alongside the existing default shardfile declaration; missing scenes refuse. The command writes canonical JSON to .wildshard/cache/<slug>/scene.json and retains an immutable copy under its SHA256 directory. @wildshard/sdk/synth defines synthProject(project) and synthScene(scene, project, slug); each returns the description, digest and path. The latter also accepts an already generated graph, including Template 1's retained generator. Geometry, material and node traversal use the DS1.3 reader; its explicit unsupported-feature refusals still apply. Synth supplies compiler input, not a finished shardfile or an entry proof. It adds no schema field.

Graph generation executes during synth; expensive bake jobs remain owned by the shared generation-job cache. Immutable scene copies are verified before reuse; corrupt bytes refuse. Sources and cache paths cannot escape through symlinks; project imports must live in authoring folders. Game/engine and SDK runtime imports refuse. Scene JSON never ships or enters git. Two independently generated Template 1 graphs produce identical bytes; the CLI also works with a pure Node three.js author project without drawing a frame.

Format contracts (DS1.1 foundation)

@wildshard/shard-format/edgeProfiles defines the unchanged Valibot boundary contract: 256 or 257 finite height/colour samples and zero road height. The format workspace imports only Valibot; the loader imports its defining schema directly. The SDK package declaration copier and author-input audit include this layer. The migrated pure roots are all listed in the generated format API and JSON Schema inventory; material-dependent root composition remains pending DS1.4.

The scoped input/knob/Debug wire contract is now defined by @wildshard/shard-format/plumbing: both loader admission and SDK author validation consume it. Namespace ownership, duplicate IDs, touch-action references and Debug defaults retain their existing checks. @wildshard/sdk/plumbing is author-time Valibot parsing; it no longer calls a game module.

Generated format JSON Schema (DS1.1)

pnpm gen writes .wildshard/format/*.schema.json for every migrated root (including edge profiles, plumbing, directors, movers, weapon and brain profiles) through @wildshard/sdk/formatJsonSchema and the pinned @valibot/to-json-schema converter. These ignored build outputs carry DO-NOT-EDIT provenance. Only the migrated @wildshard/shard-format roots are included; the mixed whole-shard contract still awaits extraction. No game or renderer is imported.

The draft-2020-12 edge document expresses matching 256/257 sample counts with exact array-length branches. Plumbing names its remaining namespace, uniqueness, reference and default checks in x-wildshard-checks; tools must also run @wildshard/format/plumbing#plumbingRules. Annotated string bounds use Valibot UTF-16 code units, while standard JSON Schema counts Unicode code points. The defining Valibot parser remains authoritative for admission. Unknown custom validators, additional checks and transformations refuse generation; familiar messages cannot grant an override. The bridge identifies the actual defining schema objects. Regenerate with node --import ./scripts/bake-loader.mjs scripts/gen-format-schema.mjs; generated bytes are compared by the focused test.

DS1.1: @wildshard/shard-format/{admissionLimits,version,state,preflight,json,commonsCosts} now defines the renderer-neutral admission contracts. The author and loader use the same bounded plain-JSON, typed defaults, numeric state capacity and exact commons-cost checks. These modules import only Valibot and one another; parsing does not read assets or install a service.

DS1.1: the pure creature/brain, audio, ledger, director, migration, traversal, runtime declaration and sampled skin contracts now live in defining @wildshard/shard-format modules. Their Valibot bounds, semantic checks and pure continuation transformations move verbatim; native hosts and renderer adapters remain in game. Public format schemas join the SF45 generated reference inventory automatically.

DS1.1: presentation metadata, exact mesh-collision declarations, script bindings/fields and named hooks are defined in @wildshard/shard-format. Image URL resolution, native mesh-byte validation and script-host installation remain in game; all bounds and reference verdicts are unchanged.

DS1.1: terrain tile addressing, bounded water declarations and the immutable accent palette are defined in @wildshard/shard-format. Game retains byte validation, fresh water motor bodies and HUD CSS mapping unchanged. Authors and loader consume the same defining Valibot contracts.

DS1.1: item/loadout declarations, target binding references and quest/dialogue graphs are defined in @wildshard/shard-format. Game keeps item construction and collider activation unchanged. The frozen legacy quest type path infers its type from the single defining format schema.

DS1.1: numeric world rows, inert sketches, mover/entry declarations, native-ground references, HUD rows and client presentation bindings live in @wildshard/shard-format. Engine runtime bounds remain independent. Native solver, terrain/GLB byte validation, draw and input ownership remain game/engine functions. Frozen legacy mover handles retain the original game path.

DS1.1: local checkpoint, lift rider, runtime measurements/declarations, skin rows and script-species/elite/weapon-hook declarations live in @wildshard/shard-format. Native runtime admission, allocations, script hosts and playback remain in game. The wire calibration and weapon phase table are checked against the native owners; the skin clip narrowing is identity-only and grants no bridge to an unfamiliar author transform. Material and post graph contracts remain in game pending DS1.4.

DS1.1: @wildshard/shard-format/shardSections defines root identity, requirements, budgets, simulation, author/server limits, file/tile inventories, library/critical roots, far proxy and spawn. Root composition retains every original default and native reference check. Material-dependent props/splats and look/post graphs remain in game for DS1.4. Native tile sizes and fixed wire cell bounds are equality-tested.

Pine's retained generators/coatRecipes.ts, coatPixels.ts, coatFlap.ts and coatProducer.ts author coat pages from data rows and committed rig assets in Node. The Pine program (generators/coatPages.ts, GR8 G35) paints each tier's lossless PNGs through ctx.cached and names them as product files (models/creatures/<hull>[.phone].<kind>.<id>.coat.png), the names the hull book's coats carry; a variant has a coat when the KTX2 table holds its procedural: key. No species registry, native runtime, game page or DOM is an authoring input. The SDK rig reader preserves rest channels and joint order, and the SDK raster reader/writer preserves RGBA.

Pine's 14 non-King rigs are committed at their public URLs (public/assets/pine-hollow/creatures/, beside the King's), which the coat pages, the rig blobs, the trophy and thrall-extras bakes and the KTX2 bake read. scripts/bake-coats.mjs --shard=pine-hollow encodes the same pages (scripts/bake/pineCoats.mjs) to KTX2. The runtime loads the product's PNGs in image mode and adopts the unchanged KTX2 stand-ins in compressed mode; no live atlas painting remains.

DS1.3 scene intermediates retain skin joint order, inverse binds and mesh bind frames plus standard named animation tracks. restoreSceneGraph reconstructs the ordinary three.js graph and defining SDK declarations after JSON transport. Node-local recipes retain collider dimensions/encoding, entry subclasses, spawn kinds, audio profiles, mover bodies/clips and mode parameters; world transforms apply once when emitting compiler rows again. Director.attachTo(scene) retains the data-only stage declaration on a named node, restored as node.userData.director. Restoration installs no runtime hosts. Template 1 and Pastel Plain still rebuild to identical prop/GLB/tile/far bytes. The additional animated-rig fixtures prove exact skin GLB and clip bytes without changing the shipped pilots. No texture, physical-material or TSL path is silently accepted.

DS1.3: audio Object3D declarations (Cue, AmbienceZone, Score) serialize the existing cue/mixer/score wire contract without audio services. The two pilot profiles remain byte-identical after scene JSON transport. Portal and SocketLift subclass Entry and emit the existing midpoint entry rows with their explicit cell-local floor/route/mover bindings. Their added fixtures on Template 1 and Pastel Plain pass the independently defining format schemas with identical bytes; no shipped entry behaviour is changed. Native clearance, portal transfer and lift ride proofs remain admission/host duties. Textures and physical/TSL material authoring remain DS1.4.

SF81 DIR-1: director v2 stage rows are defined by @wildshard/shard-format/directorStages, with a generated structural JSON Schema and mandatory defining semantic checks. The bounded when-language compiles to data; only the fixed eight actions above are admitted. Stage order and action order are authored state, not sorted identifiers. Initial admission, every observation and snapshot restore fail before cursor mutation. Existing v1 module/event contracts and their witness snapshots are unchanged. DirectorStageLane is the shared interpreter in plugin/director; native owners resolve source bindings and apply its returned actions.

SF81 DIR-2: the author-only behaviour descriptor's optional director path selects the defining admitted v1 numeric or v2 boolean input contract for AS codegen. Authors import inputs and clock from ./wildshard-director; no script reads observation offsets itself. v1 dots/hyphens become camelCase and ambiguous names refuse; v2 preserves names and authored order. Numeric observations are not coerced to booleans. Existing v1 wire bounds, module hashes, native clocks, event packing and snapshots remain unchanged. wildshard build regenerates the virtual module on each compilation and the pinned compiler produces the same shipped director bytes for all three existing users.

SF81 DIR-3: optional directors is the defining @wildshard/shard-format/directorStages root array. Omission remains omission, preserving other shards' existing wire bytes. Ordered guarded successor arrays supplement the original string next; every target and condition is admitted before installation. Flag rows must name flags already declared by the quest owner. Unsupported native bindings refuse instead of fabricating authority. A script hash identifies an immutable admitted AS handler; its native output events select authored actions without duplicating the script's scheduler. Scripted snapshots carry an explicit version-3 row cursor and refuse older continuations.

Native director owners can pass their actual flags object to bindDirectorActions. Without an explicit read, declared flag: inputs read that owner, and observe(binding) must supply every non-flag input. Declared flag actions use the same owner; explicit action bindings retain precedence. Missing native observations or actions refuse before effects. Quiet initial observations and the existing snapshot cursor are unchanged. Signal uses this for its lit fire; Sky uses independent roost, vane and raised rows so simultaneous conditions still take effect in one tick.

GLB clip labels are bounded to 128 lowercase ASCII letters, digits, dots, hyphens and colons, starting with a letter. Colons preserve native variant labels such as wood:idle; slashes, controls, whitespace and external-path labels still refuse. All existing sampler, target, key-count, duration and finite-value admission checks apply.

Pine watch/dawn rows demonstrate an AS-backed stage lane with identical native observation/payload order. Each admitted output has an authored ordered stage target and fixed emit action; the renderer/headless adapter supplies the native owners. The AS module bytes and seed are unchanged. Snapshot v3 adds the immutable stage contract and cursor around the original AS save, and refuses older unversioned continuations. Pine night population, elite preludes and Nalati raid/volley are separate DIR-4 slices; this watch/dawn migration does not close those requirements.

Clip-authored fixed mover rows

@wildshard/sdk/movers exposes Mover, an ordinary three.js Object3D wrapping a named body. Its toMoverData(rest) reads a real AnimationClip into numeric track, trigger and driver rows. Track/pendulum policies supplement the original fixed policies. The winch policies accept two linear position stops for a ride winch, or two local pitch quaternion stops for a hinge winch. An always trigger drives the waves policy or a static chain; an interact trigger retains the existing ride/call or permission-gated winch command. Unsupported key layouts, interpolation and trigger authorities refuse instead of silently approximating a clip.

@wildshard/shard-format/moverMotion defines these bounded authoring rows and their deterministic lowering. Admission verifies that the admitted module hash and numeric inputs equal the row's lowering before physics allocates. Runtime consumes the lowered row through the existing single mover host: script fuel, guest memory, native body ownership and saved continuation stay unchanged. The descriptors are build/admission inputs and are absent from the executable continuation contract.

SF81 Pine night: data/nightStages.json selects the fixed lifecycle events from the typed author behaviour/night.as, bound by data/nightDirector.json. The retained author-only producer generators/bake-pine-night-director.mjs emits the immutable module and DO-NOT-EDIT embedded representation through the shared content-hash build cache. No generated module is committed. The native population stores the complete AS/stage continuation with its exact actor identities; pre-row population continuations refuse explicitly.

@wildshard/sdk/compileMovers compiles the readable fixed ride, hinge and wave kernels with the portable metered compiler. Their hashes are part of the continuation ABI; accidental changes refuse. Sky's generator authors its exact f64 stops in real three.js clips, including the stationary gate clip and the local-pitch winch clip. Its former per-shard lift and bridge guests are unnecessary.

Pine elitePreludeStages.json uses the fixed emit actions for native clock/clear/home/fight/idle owners. The when expressions put absence first, then leashing, then engagement. No AS escape handler is needed for these boolean guards. Each actor keeps a separate complete stage contract and cursor; existing admitted AS fights and their verbs are unchanged.

Nalati ghostVolleyStages.json binds bounded ghost.clock, ghost.shoot and ghost.retry outputs to literal fixed emit actions. Retained behaviour/ghostVolley.as/build.json and the author-only Node producer generate immutable bytes in the portable build cache. No page or runtime is a producer. The native headless night-roster/Qara gap stays open until actual bodies, projectiles and keeper admission are hosted by the whole witness.

The general fixed mover driver reads up to ten increasing keys across position and quaternion channels from the body's real AnimationClip; it supports once, repeat and pingpong at a bounded speed. Both channels share the union of their key times. Linear positions and shortest-arc quaternion interpolation use three.js's law. driver: { kind: "track" } lowers the keys into one fixed guest; { kind: "pendulum", axis, amplitude, period } uses the same clock without an authored clip. The existing shipping winch/waves guests and their saved continuation remain unchanged.

trigger: { kind: "stand", delay } requires the real player's grounded collider to be owned by that mover continuously for the delay; leaving freezes its clock and resets the delay. Shared activation uses { kind: "shared", field, equals }, where field names an admitted shared boolean or numeric host field of the same type. Missing/mistyped authority refuses before native body creation. Interaction activation requires the declared permission: action 1 toggles, 2 pauses, 3 restarts. Inactive tracks freeze, including pendulums; phase and activation live in the existing mover fields and therefore use the same guest, physics and host snapshot/restore fences. No scheduler is added.

SF84's @wildshard/shard-format/modes admits the following declarations: zipline floor endpoints/sag/hang/flight; board-only updraft endpoints/width/lift; ride gait speeds; grapple selection/range/timing. @wildshard/sdk/modes provides ordinary three.js Zipline, Updraft, Mount, Grapple and Ladder objects. toModeData() validates their rows, including world-space endpoint transforms. Zipline, updraft, ride and grapple require runtime.binds: ['modes']: actual native player/body/input owners consume them at their existing phase. Ladder rows are installed by the normal data client and authoritative Node host, so a ladder-only section needs no runtime/ code. No declaration grants a mount, invents anchors or installs a second scheduler. The checked SDK guide contains a working example of all four. readScene(scene) automatically collects mode objects into validated modes rows in traversal order, applying parent endpoint transforms once. Empty ride/grapple categories and an entirely absent modes section stay omitted. Duplicate identities, invalid ranges and row caps refuse through the defining format parser. Water/hover-deck mode declarations remain separate open work.

SF81 encounter stages: Sky and Signal declare their bossStages.json under directors. The row interpreter selects native intro, fight, resume, phase and victory transitions through the fixed emit action set; existing numeric eligibility and callback ordering remain the native boss port observations. These boolean stage machines need no AS escape handler. Their page and headless boss share the exact contract/cursor; body ownership, clocks, presentation, damage/shields and reward filing remain their original owners.

SF81 Signal declares signalStages.json beside its Matriarch boss stages. The original bowl oil/light requirements, manual fire act, prompt LOS/order, flags and dressing stay with the real interaction/quest owners. The accepted light edge enters the authored summoned stage through the fixed spawn action. No AssemblyScript escape is needed for this boolean condition, and no Signal-only platform system is added.

SF81 Nine declares data/portalStages.json in directors. The page and native host read that admitted declaration; no extra unlock law exists or is invented. Boolean touch/dark/clear observations preserve native phase slots, and fixed emit actions select the original body/checked transfer/veil actions. No AssemblyScript escape is needed. The native numeric clock and collider/entry declarations are unchanged.

SF85 weapon profiles: optional items.rows[].profile admits melee, bow, firearm, thrown, lash or cone numeric data. Melee describes ordered swings, contacts and lunges; bow describes draw/fatigue, spread and flight; firearm describes reload/action, spread and projectiles; thrown describes launch/recovery/pool/pickup; lash describes ordered crack clocks, pull/stagger and named moves; cone describes a slash reach allowance plus gust range, half-angle, push, lift, damage, cooldown, tags and move. Each profile root has generated JSON Schema. Invalid bounds, phases or family mismatches refuse. Omitting a profile preserves existing item data. Only a native family explicitly accepting that profile kind consumes it; no view/controller is inferred from a parse.

A cone family reads light/heavy damage, cooldown, tags, move IDs, range and half-angle from the weapon row. profile.slash.reachAllowance extends that row's range at contact. The gust is a separate declared move; it keeps its own cooldown. @wildshard/shard-format/weaponProfiles defines ConeWeaponProfileSchema and the inferred ConeWeaponProfile type. For Sky's shipping fan the profile is:

const profile = { family: 'cone', slash: { reachAllowance: 1 },
  gust: { reach: 9, halfAngle: 0.6, push: 15, lift: 4, damage: 4,
    cooldown: 1.6, tags: ['actor.player', 'weapon.far-fan', 'dmg.wind'],
    move: 'far.fan.gust' } };

The cone profile admits no target callback, rig or input owner. Registration through @wildshard/game/plugin/weaponFamily must explicitly accept cone profiles before the item installer calls its native factory. Sky's registered far-reach.fan family declares profiles: ['cone'] and adopts these numbers into the already-built fan. The registered Signal lash and Sky fan lend their actual targets, damage pipeline and body reactions to one renderer-free contact host. Contact clocks and hold/release are shared; profile values stay admitted numeric data. No second actor, query authority, RNG or input owner is created. Sky's native preparation also reads the admitted item row; a missing profile, changed weapon identity or incompatible slash shapes refuse before mutation. Rebinding numbers retains both cooldowns. Gust impulses precede their damage contact, as in the existing page law.

SF84 traversal rows are declared as optional modes.traverse data. Zipline and updraft rows require runtime.binds: ['modes']; pure-data or unbound native traversal rows refuse admission. Ladder is the installed data-host exception. The native owner reads the admitted row at its existing player phase and the data client removes it, preventing a second owner. Sky Reach consumes its updraft geometry/force this way in both browser and native headless hosts. @wildshard/sdk/modes exposes the data types ModeRows, ZiplineRow, UpdraftRow alongside the ordinary three.js author objects.

SF85 WP2 bow slice: Pine and Nalati use family bow with a numeric profile and their unchanged local view recipe. Spread includes the aiming multiplier and motion width; draw clocks and projectile subdivision/lifetime are data. Both page and Pine native clocks consume the row. Nalati’s native weapon coverage remains open: declaring its page bow does not fabricate a renderer-free weapon owner or close the gap. The existing mounted and Golden Bow modifiers stay native.

SF84 Driftwood declares its real Node-authored quest launch/landing floors and shipping physical constants as an admitted SDK mode row. The existing retained Node spots producer remains the endpoint authority; there is no new generated output or unresolved build-cache dependency in the simulation closure. Native page and headless quest owners consume the row through plugin/mover without a second player owner. The page retains its original mesh, trolley sway/park, prompts, sounds and update position. ZiplineDriver.distance is a read-only scalar for that presentation; restore retains the same native continuation and never draws or publishes.

A lever FirearmWeaponProfile may provide lever (cycle delay/time, reload pose in/out, eject/cock fractions, auto-reload close). Pine's supported per-round hitscan owner requires these clocks and refuses a contract it does not host; its actual item row uses family firearm and keeps its local view recipe. Crossbows, Nalati weapons and WP-3/WP-5 remain separate unfinished work.

SF85 WP-2 single-bolt rows: Pine declares crossbow and lever on firearm, dispatching admitted identities to their existing native owners. Crossbow launch/spread, pool, gravity/drag, substeps, lifetime, quiver and reload clocks derive from its JSON profile; ammunition/weather and body/cover queries remain actual owner ports. The fixed world domain (range: 310) is not a configurable bolt hitscan limit; unsupported bloom/movement/wind/action contracts refuse before allocation. View rigs, slot IDs, cues and native glance behavior stay unchanged.

SF85 WP-2 Nalati rifle declaration: its existing magazine owner reads data/rifleProfile.ts through the native AR15 profile. The numeric firearm declaration owns magazine/reserve, reload/interval, hitscan range/damage/spread and bloom; the native class body, rendered rig and saved slot remain unchanged. Declaration adoption does not host a headless rifle: Nalati's native weapon requirement stays open.

SF85 WP-2 Nalati javelins: the numeric thrown declaration in data/javelinProfile.ts feeds the existing native spear-slot Thrown profile (weapon.javelin), its gravity helper, ammunition, launch/recovery, pickup and pool. Thrust and mounted lance remain independent native laws; the rendered rig, class body and saved spear slot do not change. This declaration does not close Nalati's unhosted headless spear/weapon requirement.

Boss policy declarations (SF82 BR-2)

@wildshard/shard-format/bossProfiles defines BossProfileSchema and parseBossProfile. BossOwnerRowSchema binds a spawned or held profile to its native stage rows, actor identity, phase definition, record, victory fact and reward timing. The actor must match the definition; phases must match the profile's checkpoint shares. Spawned owners declare their reward and respawn placement; a claim requires a flag-backed record. Conflicting saved/flag records refuse. The host lends its real keeper or held body and brain to installBossOwnerRow; no body, callback, extra clock or random stream is serialized. A strict {kind: 'boss', pattern, fight} selects arena, roaming, spawned, held, or the existing script policy. These are standalone authoring contracts; they are not an ignored extra field on encounters. Root admission and recipe/AS phase binding remain open. The native entry plugin/bossPhase.bossFight hosts the four native patterns. A script declaration keeps the exact EliteScriptSchema; it does not move the native prelude, clocks, RNG or ordered command stream.

Arena/roaming rows carry the actual phase thresholds, named modes, strikes, adds, hazards and presentation calls. Modes, transitions, phase indices, add indices and declared view calls must resolve. Checkpoint shares start at one and descend strictly above zero. Every number is finite and bounded to ±1,000,000; allocation counts are bounded integers ≤256; records hold ≤64 entries, lists ≤256 members, phases ≤16, view calls ≤16 numeric arguments, and strings ≤512 UTF-16 code units. Native divisors must be positive. Signed cooldowns and mode-clock offsets remain valid because they represent native immediate/overdue beats. Unknown fields refuse instead of being dropped, and parsing introduces no defaults or rounding. The generated JSON Schema records cross-field checks explicitly; it never replaces the defining Valibot admission verdict.

SF84 mounted mode rows carry a bounded, strictly increasing walk/trot/canter/gallop profile. SDK Mount emits this profile without creating a creature or granting a saddle. The defining plugin/mover owns MountedReins, MountedBody, mountedMotorOptions, road following and the rhythm spur. Nalati's page and native host pass the same authored profile into that one law; its real roster, taming, contacts, mounted weapons and presentation remain owned by the existing native installers. Restore retains every reins edge, physical motor and gait clock.

SF85 melee weapon profiles retain the four-family contract. Each combo/heavy timing row may additionally declare bounded stagger, signed sweep, and positive reach; absent fields retain the native recipe values. Driftwood and Nine declare family: "melee" with numeric profiles, while keeping their original view recipes and prebuilt/native controller adoption. Nine's placeholder contact damage remains zero; its native Jian owns the swing clock.

SF84 grapple profiles bound reach, selection windows and claw/reel/pull timings. SDK Grapple emits data; the defining plugin/mover owns the existing GrappleSim, landing probes and strict nearest-hook selection. Native course ports still supply actual anchors and their sight/guard rules. Nine retains its Well rail exception, checked floor/capsule ownership, camera aim, viewmodel and earned crossing fact. Serialized phase/target/clock continuation remains unchanged. Template 1 anchors and horse presentation are separate graphical examples.

SF85 melee rows: optional moves.passes.{left,right} use the same ordered swing bounds. Optional mounted declares reach, cooldown, sense, chainWindow, chainStep, chainMax (at least one), positive speedDivisor and signed behind distance. Existing rows omit both unchanged.

Host-owned custom weapon families use registerWeaponFamily from @wildshard/game/plugin/weaponFamily with a session-local registry supplied to the existing runtime item binder. Signal lash and Sky fan keep their original declared family ids, native constructors and native owners. Registration validates the id, refuses reserved or duplicate names, and performs no construction; namespace admission still precedes allocation. This defining plugin also owns the optional AssemblyScript weapon hook installer; there is no SDK runtime facade.

Encounter-driven species flight (SF82)

A native species catalogue may declare { archetype: "diver", data: { kind: "diver", pattern: "phased", ... } }. The defining @wildshard/shard-format/phasedFlyers profile retains the historical flyer's exact phase altitudes, rest intervals, named dive/grounded strikes, finite movement bounds and encounter memory fields. phasedDiverPreset validates and resolves the original phased-flyer preset before plugin/brain binds page or headless policies. Existing preset names and save contracts remain accepted. The SDK emits its standalone JSON Schema; it is a native catalogue declaration, not an additional branch of creatures.brains or an automatically installed boss.

SF85 native lash profile: items.rows[].profile may declare family: "lash", its optional bounded contact (chest height and body allowance), timing (unroll, second contact, show, stagger, pull and maximum pulled health), and its three named moves. Second contact and show must follow unroll. Signal’s existing native family requires its authored contact values and consumes the profile in its page and headless owners; older profiles remain admitted for their own native families, with no fabricated contact defaults. Damage, width, reach, cooldown and charge remain the item’s light/heavy rows; the native double-crack, contact order, yank, stagger, held input and saved continuation stay unchanged. No view is inferred or added.

Data-host herd and diver ownership

Data-only shardfiles (runtime: null) have native default owners for creatures.groups herd/grazer-herd and creatures.brains orbit/patrol-diver. Ordered members, declared species/variants with flight for divers, and admitted sphere strikes remain mandatory. These owners are the same in the browser and author worker: world LOS/slope, measured player speed, scoped ai RNG, existing attack authorization, flight and damage are native. No runtime code or game import is required in an author project. An explicit injected recipe keeps precedence; specialized pack/burst/custom recipes still require their real ports. The default owner does not invent wind/scent, cover, taming, pack interaction, sound bindings or a rendered creature rig. The executable SDK author guide's creatures example declares a fleeing goat herd and diving hawk.

Inspect author declarations (OS-F3)

Use wildshard schema list, then wildshard schema <root> [JSON-pointer]. The shardfile root describes every defining section; format roots emit structural JSON Schema with mandatory native checks. The schema discovery guide covers exact identifier grammars, four-channel hearing, player/creature coordinate forms and packaged declaration discovery. The retained formatExample executes the public inspection API.

Typed numeric script modules (OS-F4)

Use generateScriptModule from @wildshard/sdk/directorAbi instead of inventing buffer capacities, event offsets or effect opcodes. The ABI guide documents the generated typed module: in_cap is bytes, out_cap is records, state is stable-ID ordered, and player writes require real native actor binding. The retained numericScriptExample runs in the actual host and restores exactly.

Standalone author bootstrap (OS-F10)

The SDK ships dist/author-template/ as retained TypeScript, with the same graph feeding synth and the official GLB world bake. Install matched SDK/format/commons archives, then bootstrap an otherwise empty author project; installed dependencies are retained and authored files are never replaced. See the exact install/catalogue/CLI workflow. Generated world and product files are build outputs, not substitutes for their sources.

Declared director time ranges (OS-F5)

Use day:0.75..0.84 for a dusk boolean. Endpoints stay within 0..1 and increase; the upper endpoint is excluded. The look day/start/override supplies the native and page clock, and its continuation is saved with the director. Authors write boolean when expressions without tick arithmetic. See the native day guide and scripts/docs/authoring/directors.ts.

Author proof tapes (OS-F6)

Use wildshard prove with a version-1 finite command tape, checkpointTick and requiredFacts. Missing native facts refuse; the report proves grid residency/restore and quest-owned achievement filing with profile reload/deduplication. It does not claim browser storage availability or opaque Rapier-byte identity. See the executed author workflow.

OS-F8 vertical ladder contract (data-only shards): Ladder(bottom, top, exit, { reach?, speed? }) in @wildshard/sdk/modes emits kind: 'ladder' in modes.traverse. Set its stable .name and local .normal (outward, horizontal, unit length). bottom and top are vertically aligned capsule-feet positions; exit is an authored upper floor behind the outward normal, at top.y and within two metres. World positions must stay inside the cell's ±250 m bounds. Parent translation, upright rotation and scale transform endpoints; reach (0.1–1 m, default 0.6) and speed (0.1–5 m/s, default 2) are explicit world metres. Tilted ladders refuse.

The object declares movement only. Author visible rungs/rails with normal meshes and their BoxCollider/MeshCollider objects, plus an actual upper landing and lower floor. Leave a capsule-clear corridor (player diameter 0.76 m, height 1.8 m) for the vertical path and the swept upper exit; a rung collider through that corridor blocks climbing. Decorative rungs need no collider; rails, walls and the landing remain solid. The mode creates no floor, sensor, teleporter or HUD.

At either endpoint, ordinary movement toward the ladder climbs and movement along its outward normal descends. Once attached, neutral input holds; JUMP, DODGE, riding, swimming or HOVER releases it. Moving away from the normal does not sidestep around walls: the real CharacterMotor sweeps alignment, vertical motion and the upper exit. Obstructions stop the capsule. Releasing does not reattach on the same held input; neutral input rearms it. There is no inferred interaction, stamina, climb animation or grant. This is the approved climb traversal in the existing registry, with no second scheduler/input wire version.

Ladder rows currently require runtime: null; native player-owner combinations refuse admission rather than dropping a row or installing a second player driver. This restriction does not affect existing native mode rows. The data-only client lends its actual player registry and input, while the owned headless host reads the existing admitted movement command. Both execute the same bounded law and save its attachment/exit/rearm continuation alongside real capsule state. Scope disposal removes the traversal. No ladder rows install no owner or continuation, preserving existing witness bytes. The one-shot's old inclined treads remain an ordinary walk proof; they do not retroactively become vertical-ladder evidence.

Charged static equipment assets

An item view may name asset: "commons:<hash>" (or a declared local GLB hash) alongside its recipe, position and rotation. The reference must be in the charged library closure. The ordinary kit.melee family equips that asset instead of its built-in view; its light/heavy rows retain the fixed-step contact law. Static equipment GLBs are self-contained, untextured and unanimated. Their authored materials are preserved; the compatibility colour field does not repaint the asset. Sharing a hash shares the immutable geometry and materials, while each held item keeps independent transforms. The last live owner disposes the model; a later entry loads a fresh model. No page-code installer is needed.

The author template's generators/spear.ts (the SF86 Mesa fixture's own spear, not a commons pack: G355) provides starterSpearPack(provenance) and spearLoadout(catalogue). Build the catalogue, select starter-spear/model and starter-spear/contacts, then include both immutable references in commonsRequirements and library. Assign the checked loadout to items. The normal data-only client equips the model and its fixed-step thrust/heavy-thrust contacts; no runtime import is required. The retained generator emits the complete untextured GLB and recipe, with byte-derived costs. See the spear author example. Author generators may use the SDK and pure format contracts; game and engine runtime imports remain refused. This starter has no javelin throwing or animated arms.

Authored scene interaction proof (OS-F7)

Use a finite interact command naming a declared target to prove its reachable scene, rather than directly enqueueing a numeric event. Use SDK headless.proveSceneClient for actual bound views and page prompt selection. The retained scripts/test-author-scene.mjs builds and enters a real public-author product; negative view/prompt checks and native distance/LOS refusals are required.

Mandatory Mesa brief coverage (OS-F9)

Author bootstrap includes prove-mesa.ts. Its proveMesaOutpost requires all three native fleeing goats, a diving/hitting hawk, a gated scene-controlled beacon with an unlit control replay, visible native-bound client views and the exact equipped template spear (generators/spear.ts) asset/profile closure. Pass the actual built shard and admitted bytes, an entered browser page and a finite native approach tape; no teleport, caller evidence or optional gates. Run it beside validate and prove for the separate entry, budget, grid and Ledger gates. See brief coverage.

G320 pure contract boundary: @wildshard/shard-format is the bottom layer and imports only Valibot and its own defining modules. The engine may import these pure data contracts. @wildshard/shard-format/materialGraph now defines the unchanged graph IR, admission limits, node vocabulary, cost calculation and validateGraph. Engine graph compilation and game material/post admission consume that one definition; material creation and rendered output are unchanged.

G320: @wildshard/shard-format/materialFamilies owns the verbatim pure family parameter schemas and their parsers, defaults, texture references and preset refusal checks. Renderers read those contracts directly. The old engine renderer-schema simulation exception is retired; format closures remain free of Three.js and DOM.

G320: @wildshard/shard-format/contentBounds defines the immutable cell dimensions, entry widths and content caps. Engine core/config retains its public bindings to those same values and the same CONTENT_CAPS object, so existing runtime imports remain compatible. Authoring and validation import format directly.

G320: the pure AAC index, WMC1 collision and terrain-tile byte readers are defined in @wildshard/shard-format/{aacIndex,meshCollisionBytes,terrainTileBytes}. Engine installation stays separate. Frozen runtime terrain imports keep engine/world/terrainTileData, whose public functions are the same format function objects, with no duplicate codec or legacy source edit.

G320: @wildshard/shard-format/{scriptAbi,scriptAdmission,scriptLimits} owns the numeric ABI, metered Wasm byte admission and immutable host caps. contentCost, bakedTerrainBytes and waterWaves define the original pure cost law, WSTR parser and swell rows. Native hosts, terrain sampling and rendered water remain engine code; retained runtime bindings are identical objects/functions. Author validation has no native host or terrain service dependency.

G320: the complete pure shardfile/asset admission closure is defined by format: props/material/post contracts, GLB/image/cost readers and entry geometry checks share @wildshard/shard-format/shardSchema and assetAdmission. Native installation and collider descriptor conversion remain game/engine code. Frozen portal/lift entry imports retain identical format function bindings; presentation URL construction remains game code. No look, pixel, clearance or transform rule changes. The SDK author compiler imports these format definitions directly.

Config and generator boundary (OS-G2)

Compile and write in retained Node generate.ts before bundled config evaluation; configs import generated metadata. The reference project compiles an actual typed idle module and writes its immutable asset before loading config. See the generation guide. Bundled filesystem/compiler imports refuse before evaluation with that actionable diagnosis.

Director host capabilities (OS-G3)

Director.dataHostIssues() describes stock data-only support: declared quest flags and bounded day observations, flag actions only. Other syntax needs an explicit native owner; emit never invents AS delivery. See the host/action matrix and the executed beacon flag-to-quest example.

Root section and packaged type discovery (OS-G4)

wildshard schema shardfile /ui reads the whole defining UI section; wildshard schema ui.Ui reads its JSON Schema. Deeper pointers retain the declaration wrappers. Real GLB, skin and commons catalogue bindings and their installed type lookup are documented in schema discovery.

Custom creature rigs: required names before build

Every species kind, including goats, hawks and other flying/custom rigs, requires body and head (lowercase, case-sensitive). There is no different mandatory pair for a bird. These are actual named joints for the collision/view adapter, not display labels: the body capsule and head sphere follow those transforms. Put both names in the GLB skin, row.rig.joints[0], and row.rig.sockets. Name additional legs/wings freely; retain their exact GLB joint order in the row. For example, a goat may use ['body', 'head', 'legLeft', 'legRight'], a hawk ['body', 'head', 'wingLeft', 'wingRight']. Declare the actual animation names in row.rig.clips; binding.loops is a subset, not a source of additional clips.

Use ordinary three.js Bone, Skeleton, SkinnedMesh and named clips, then sampleSkinClip / skinnedGlb from @wildshard/sdk/bake/export. Derive costs and hashes from the emitted bytes. A Root joint does not satisfy body; an empty socket list does not satisfy either required joint. Both wildshard build and wildshard validate check the same defining contract before any view allocation: required names, exact joint order, one skinned primitive, named sockets and clips. The client registration guard uses the same validateCreatureBones law in @wildshard/shard-format/skinData. Existing engine callers retain their public binding.

Admission is still not a rendered-view proof. Run the complete built product's proveMesaOutpost / proveSceneClient and proveEquippedItemClient against its actual entered client. The run-2 missing-body product is a negative case, never a passing fixture just because its native gameplay works.

Timed returns (TC-E2, OF22b3)

creatures.spawns[].respawn (1 to 3600 seconds) brings a dead body back at its at. respawnWhen (needs respawn) adds an island's return conditions: spread up to 3600 more seconds (one seeded draw a death), no player within away metres (0 to

  1. of its at, night: true for a night-only return, and fade seconds (0 to
  2. for the fallen body to fade first. Omission preserves existing rows exactly.

Per-body creature homes (SF82 BR-1)

creatures.spawns[].home is optional {x, y, z, r}: finite local coordinates within −250…250 and a positive radius at most 500. CreatureHomeSchema and ShardCreatureHome in @wildshard/shard-format/creatures define the contract; JSON Schema root creatures.CreatureHome exposes it. Omission preserves existing rows exactly. For orbit, patrol and burst divers the per-body home overrides the catalogue home before policy construction, so each body has its own initial angle and save fence.

A data-only grazer with pattern: 'wander-ram' (or legacy ram-grazer) now installs automatically when its spawn declares that home and its named lane strike is admitted:

const spawn = {
  id: 'goat.0', species: 'goat', variant: 'plain', brain: 'goat.ram', strike: null,
  seed: 1, scale: 1, at: [4, 0, 0], yaw: 0,
  home: { x: 4, y: 0, z: 0, r: 12 },
};

The native host supplies its real player, shared AI RNG, reach query, attack claim and CombatSystem damage filing. The existing grazer policy owns steering and its strike clock; the actual body motor owns movement. No callback grants contact, no body is teleported and no home is guessed. Missing home/strike refuses before any controller registration or random draw. Host-owned installations retain their explicit recipes. Guardian/perch body transitions and other missing authority remain OPEN.

Automatic burst diver authority (SF82 BR-1)

Data-only diver rows with pattern: 'burst' (or legacy burst-flyer) now use the stock native flight, sphere-strike, reach and attack-claim owner. Their authored home comes from the catalogue or the per-body spawn override above. A landed contact files the real damage and applies the declared yaw/speed/lift impulse. Node owns and serializes that impulse. The normal client lends its actual Player impulse method through ShardfileSimPorts.creatureImpulse; an embedded host without that explicit authority refuses before registering the policy. No guest callback moves a borrowed player, and denied claims or blocked reach do not generate impulses.

Authored circle phases (SF82 BR-1)

A grazer with pattern: 'circle-challenge' (or legacy challenge-grazer) installs automatically when each spawn supplies phaseOffset, in radians within −2π…2π. For example, two authored bodies can declare phaseOffset: 0 and phaseOffset: Math.PI. Omission is preserved; the stock host refuses a missing phase instead of deriving it from an id, roster slot or RNG. Other policies reject this metadata. The body's initial position remains its circle centre.

The real host supplies time, steering, reach, attack claims and CombatSystem contact. Both charge and close strikes file their actual selected id and tags. The optional engine strikeHit port preserves this identity; old native ports without it retain their exact damage-only callback. Restoring with a changed authored phase refuses before ticking.

Automatic player-target packs (SF82 BR-1)

Declared stalker groups with pattern: 'pack' (or legacy pack) now bind their ordered live roster, authored group home and actual host player automatically. The existing pack policy owns phases, roles and the attack-token director. The stock recipe registers that director for the exact live member and requires both its token and the host's real attack claim. A bite uses real reach, distance and CombatSystem filing with that body's declared charge damage.

This stock owner has no declared animal-prey, grass or scent field. It grants no prey/smell observation and refuses a continuation containing undeclared prey. Native group recipes still provide those worlds explicitly. The actual body motor owns all movement; sound cues remain presentation-only.

Charged baked maps (SF66)

wildshard build <project> <output> --map=<baked-image> --map-tiles-hash=<64-character-SHA-256> packs the existing PNG, JPEG or WebP bytes into the product without changing a pixel. The built map.image is its content hash, and the library declares its verified wire, decoded and GPU costs. The normal hard total-memory limits still apply. An authored map can instead declare the same hash in shard.config.ts and store the image in assets/<hash>. Both paths use normal immutable admission.

Built-in builds use look/map.baked.json as the freshness receipt. The existing map generator owns the source image; the product copies its exact bytes into its file closure. Standalone and grid maps resolve admitted bytes, share library reservations by hash and release them with the owner. Legacy entries retain their original map path while those folders exist.

CPU navigation authoring (G320)

@wildshard/sdk/bake/navigation defines bakeNavigation({positions, indices}, layers, settings). It runs the retained navcat tiled compiler and emits WSNM v1 bytes plus ordered layer counts. Positions are world-space authored triangles; walkable faces point up. Settings are explicit, including metre-based edge length and voxel sizes. Layer clearance, erosion rounding, tile insertion order, centimetre detail quantisation and neighbour packing match the original native baker. The runtime uses its existing WSNM reader and path queries.

The caller must supply retained authored collider/floor triangles, dry ground selection and any datum conversion. This CPU compiler imports no game or engine code and installs no renderer. The transitional shared navmesh CLI still collects native world colliders; extracting its CPU compiler does not qualify that CLI as a complete author-only product or permit any output deletion.

Declared navigation (WSNM v1)

navigation is an optional shardfile root with version: 1, a SHA-256 file, layout: "wsnm-v1-le-quantized", six global bounds, and ordered agent layers. Each layer declares radius, height, climb, voxel cell size and height, origin, tile size and its ordered [tileX, tileZ] grid. The file is an independent critical binary root, charged for decoded CPU navigation data. Admission verifies its hash, complete bounded stream and every bound/grid declaration before creating a runtime mesh.

bake(scene, identity, { navigation: originalBytes }) emits that row, its critical file and immutable asset without re-encoding. The format reader owns the original little-endian WSNM header, quantized voxel/detail vertex layout, polygon neighbour encoding and detail triangles. The engine constructs its existing navcat mesh from those same decoded arrays; path, wander, snap, radius selection and vertical-datum laws remain unchanged. The game supplies admitted bytes to ordinary level and grid boot. A native manifest can declare the same row with an immutable URL; hash or layout failure is fatal. Manifests without a row retain the older optional navmesh lookup while they migrate.

props.wholeLibrary optionally lists ordinary GLB library roots containing exact whole source geometry. Every unique reference must name an admitted GLB in library; file and memory accounting are unchanged. A props-bound native runtime reads these through the shared whole-geometry assembler, and the data client drops them alongside its bound tiles. Omitting the field preserves existing declarations and bytes. Explorer consumers may read a subset lazily; declaring ownership does not draw an extra mesh.

Declared client-channel prompts publish only their own copied x/y/z coordinates. ClientChannels.prompt supplies a bounded label, reach, initial position and named or admitted socket-lift intent (at most 64 prompts). createClientChannelPrompt binds each intent before allocation; its host-owned callback receives the owned prompt for label changes, and runs only on real interaction. moverChannelPrompts updates the same ordered roster from copied mover poses. Evaluation never dispatches an action or writes player/shared state. Socket-lift intents require a matching admitted edge and mover. The hypot3 expression preserves the original three-axis Math.hypot boundary.

The material graph input meshMap samples the original model colour map at its mesh UV, including the borrowed texture's sampler, transform and colour space. It is a fragment-only vec4 input and costs one sampler even when reused; post, points and vertex stages refuse it. Unmapped meshes read white RGBA. meshMap with name: 'bump' reads the material's bump map instead (on its own UV set); a material without one reads white. @wildshard/sdk/materials.meshMap authors this input. The client compiler's optional second texture argument and declared props' colour slots bind it via bindGraphMeshMap in the existing engine graph backend. Equal graph/map pairs share a scope-owned material; different maps remain separate. Original textures and source materials are never modified or disposed by the binding helper.

G409 KTX2 library residency uses the admitted file's complete mip dimensions: ASTC LDR and BC7 charge 16-byte 4x4 blocks, including padded small mips. GPU capabilities are host-owned, probe-filtered transcoder support, never authored metadata. Unsupported/raw/HDR sources retain the full RGBA charge. File rows and conservative pre-read ceilings keep their RGBA fallback; actual byte admission and library allocator claims use the selected footprint. The 25 MB library target and complete 1.0/1.8 GB memory limits do not change.

Optional lossless prop-tile transport

bakeProps accepts tileCompression: 'meshopt'; bakeOwned forwards it through inputs.props. Only L0/L1 tile GLBs are encoded, and the original file wins when encoding would grow it. File hashes and all tile/file costs are derived from the selected bytes. Panels, library models and far proxies keep their existing byte path. Omission retains pinned native tile bytes. The codec preserves every buffer-view byte, triangle, node and material; this option performs no quantization, welding or geometry simplification. Offline reconstruction can validate the producer's original/run-form topology and compact channel declarations through @wildshard/sdk/bake/wholePartition. Its optional position grid is the whole shape's shared grid; consumers restore that grid before welding, and keep completeness and duplicate-vertex checks.

Exact ordinary meshes in a baked piece

BakedPiece (@wildshard/sdk/bake) accepts named Mesh children as well as InstancedMesh kinds. Ordinary meshes always use native attributes and compact indices: their float32 position/normal/colour/uv/tangent channels, original index type and double-precision world matrix survive the bake. MeshBasicMaterial is emitted with KHR_materials_unlit; its linear HDR colour is preserved, rather than reduced to an RGB hex value. Ordinary standard materials preserve their linear colour and emissive channels too.

import { BoxGeometry, Mesh, MeshBasicMaterial, Scene } from 'three';
import { bake, BakedPiece } from '@wildshard/sdk/bake';
const glass = new MeshBasicMaterial({ color: 0xffb24a });
glass.color.multiplyScalar(3.2);
const scene = new Scene();
scene.add(new BakedPiece('lamp', [
  ['glass', new Mesh(new BoxGeometry(0.13, 0.28, 0.13), glass)],
], [], { nativeAttributes: true, compactIndex: true }));
const product = bake(scene, { slug: 'camp' });

Opaque untextured ordinary kinds are supported. Unsupported material state, callbacks and nonportable channels refuse at bake time. Instanced kinds retain the existing standard-material byte path. The native client draws mixed pieces with bakedMeshWorld in game's defining shardfile/bakedKinds module; ordinary kinds remain ordinary meshes, so the bake does not add an instancing shader variant. scene.json also restores the basic material declaration exactly.

Exact rest hierarchies and geometry pools

@wildshard/sdk/bake/glb.clientSceneGlb emits an ordinary named three.js Group/Mesh hierarchy as the existing V1 client scene rows plus a standard GLB of its mesh-local geometry. The client lends the original materials by name; shader graphs and motion owners stay with those ports. The named-node example in the generated authoring guide shows the recipe.

A model library's geometryPools declares each GLB URL and its exact named part roster. preload() admits the entire pool before publishing any part; geometry(id) returns an independent owned copy. This path preserves plain Float32 position/normal/UV/colour/tangent channels, the original uint16/uint32 index or non-indexed layout, groups and bounding sphere. Unsupported or normalized channels, transformed/skinned parts and damaged metadata refuse without fitting, flattening or recomputing normals. Add the pool URLs to the boot file inventory and keep the generator and its output pins in the build catalogue. Assemble its scene rows with createClientScene, then bind the existing motion owner to the returned stable part IDs.

A shard may declare budgets.library.downloadAllowance in bytes when its approved download diet entry raises the library wire target. Absent means the existing 8 MB target. Both the declared wire budget and the actual dependency closure must fit the allowance; decoded/GPU charges and the 1.0 GB playing / 1.8 GB loading envelopes are unchanged. Raised downloads use hash-named immutable files, must refetch zero library bytes on a warm visit, and keep the shard's load and road travel gates passing.