Shard format format 0.1.0.6 · npm 0.80.0

Runtime contract: what a shard may declare

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

On this page
  1. Creature skin variants
  2. Generated and hand-kept
  3. 1. Sections
  4. 2. client/plan kinds
  5. 3. Server-class files
  6. 4. Named files
  7. 5. Scripts
  8. 6. Budgets
  9. 7. Limits held as constants
  10. 8. What is refused

Written by: Claude

State: living, 2026-11-16. TC-E7 adds the item-use flag contract; engine support is a separate pending change. The engine host columns were copied from engine 8f613824 (SHARD-AUTHORING SA19).

A shard is data. A shard file never carries code that engine imports: it declares names, and engine runs only the host-owned hosts compiled into it, on the page (the browser client) and on the server (rooms, and the worker that runs the server's code inside every page, offline included). This page lists every name a shard may declare, which engine host serves it, and what validation refuses. An agent can read it without reading engine.

Read with SHARDFILE.md (the fields inside each section), SCRIPT-ABI.md (the Wasm scripts) and PLATFORM-FILE-FAMILIES.md (the named files).

Words: page is the game's web client; server is rooms and the offline worker; both means engine's shared code, run by both sides; shard-format means the host parses the section with this package's schema. Validation is shard-format's check of a shard file, which runs on the author's machine, in the API and in engine; every "refused" below is validation (or engine's load, where named) failing.

Creature skin variants

A platform.skin look keeps its required parameters.skin hash. It may also name parameters.variants, a library JSON file with { "version": 1, "skins": { "variant-id": "skin-json-hash" } }. The table contains 1 to 64 entries and names every variant of that look's species exactly. Each key is 1 to 128 characters. Its dependencies are exactly the unique skin JSON hashes, including the default skin. Each skin JSON depends on exactly its declared GLB. Multiple variants may share one skin.

Admission checks every distinct skin's real GLB, cost, sockets and clips. A table's skins share their family, skeleton, joint/clip/socket names and material bindings; geometry, rest offsets and animation samples may differ. Canonical object order does not affect the material comparison. Missing entries or bytes, extra entries or dependencies, incompatible contracts and a missing library root refuse. Existing looks without a table retain their single skin.

Generated and hand-kept

Every table below between generated markers comes from this package's code, through node src/tools/runtime-contract.ts write. src/tools/runtime-contract.test.ts fails when the page differs from the code. Two columns are engine's alone and are hand-kept in src/tools/runtime-hosts.json: a section's Engine host (engine scripts/host-ruler/roots.mjs SECTION_HOSTS) and a kind's Page host and Reads sections (engine src/client/game/shardfile/clientPlan.ts CLIENT_FEATURES). The test fails when that file misses a section or a kind this package defines, or names one it doesn't. It cannot see an engine host that was renamed: when engine changes either table, copy it again and rerun write. The follow-up that closes this gap is an engine check (HOST-RULER) that reads @wildshard/shard-format/runtime-hosts.json (it ships in the package) from the pinned shard-format and fails when SECTION_HOSTS or CLIENT_FEATURES differ from it.

1. Sections

A section is one file, sections/<name>.json in the shard file folder, listed in shard.json sections[] with its schema id. Every section is at version 1: the schema id is exactly wildshard:<name>@1. A shard may list at most 256 sections; together they may not pass sourceBytes (section 7). There are no custom sections.

Holds says what the file contains. A root section is a slice of the shard file's root fields (the tables in SHARDFILE.md): { "tiles": …, "far": … }, { "rows": { "species": … } } or { "runtime": { "spawns": … } }, and nothing else. A plain value section holds its own schema's value, defined in src/format/platformDataSections.ts.

SectionSchemaHoldsEngine host
actors/creatureswildshard:actors/creatures@1root creaturesinstallDeclaredBrains (server)
actors/crowdswildshard:actors/crowds@1root crowdsprepareDeclaredCrowds (both)
actors/moveswildshard:actors/moves@1plain valueActorMoveRunner (server), parseActorMoves (shard-format)
actors/npcswildshard:actors/npcs@1root questNpcsinstallDeclaredQuestHost (server)
actors/return-scriptswildshard:actors/return-scripts@1plain valueReturnProgram (both), parseDecisionScripts (shard-format)
actors/spawn-scriptswildshard:actors/spawn-scripts@1plain valueSpawnScript (server), parseSpawnScript (shard-format)
actors/spawnswildshard:actors/spawns@1root runtime.spawnsinstallDeclaredBrains (server)
actors/specieswildshard:actors/species@1root rows.speciesspeciesResolver (server), clientSpeciesLooks (page)
actors/strikeswildshard:actors/strikes@1plain valuenone: Consumed by the runtime's explicitly imported creature host.
audio/audiowildshard:audio/audio@1root audioinstallDeclaredAudio (page)
client/planwildshard:client/plan@1plain valueinstallClientPhase (page)
collections/displayswildshard:collections/displays@1plain valueCollectionCatalogue (page)
combat/encounterswildshard:combat/encounters@1root encounterscreateShardfileSim (server)
combat/itemswildshard:combat/items@1root itemsinstallDeclaredItems (both)
combat/strikeswildshard:combat/strikes@1root rows.strikescreateShardfileSim (server)
economy/ledgerwildshard:economy/ledger@1root ledgerLedger (both), installLedgerEmitter (both)
economy/lootwildshard:economy/loot@1root rows.lootdeclaredLootPresentation (both)
explore/cataloguewildshard:explore/catalogue@1plain valueexplorerRoster (page)
held/armswildshard:held/arms@1plain valueHeldClaims (page), HeldView (page)
held/equipmentwildshard:held/equipment@1plain valueHeldEquipment (page)
held/finisheswildshard:held/finishes@1plain valueHeldFinishes (page)
held/gearwildshard:held/gear@1plain valueheldGear (page)
held/loadoutwildshard:held/loadout@1plain valueinstallHeldLoadout (page)
held/meleewildshard:held/melee@1plain valuenone: Read by a native world whose plan names no item.swept host (engine, meta ONE-FORMAT OF22d2); until then each shard's item.swept host reads its server policy file.
look/colour-functionswildshard:look/colour-functions@1plain valuematerialColourGraph (page)
look/keyed-skywildshard:look/keyed-sky@1plain valuekeyedSkyBackdrop (page)
look/lookwildshard:look/look@1root look, presentationshardfileLook (page)
look/mapwildshard:look/map@1root mapreserveMapImage (page)
look/materialswildshard:look/materials@1root rows.looksclientMaterials (page)
look/paintedwildshard:look/painted@1plain valueproductPaintedLook (page)
look/toonwildshard:look/toon@1plain valuetoonLook (page)
models/island-librarywildshard:models/island-library@1plain valueIslandLibrary (page)
player/stealthwildshard:player/stealth@1plain valueStealthController (page), StealthRowsSchema (shard-format)
quests/directorswildshard:quests/directors@1root directorsDirectorStageLane (both)
quests/hostwildshard:quests/host@1root questHostinstallDeclaredQuestHost (server)
quests/questswildshard:quests/quests@1root questsDeclaredQuests (both)
server/bosswildshard:server/boss@1plain valueprepareNativeAssembly (server)
server/patrolwildshard:server/patrol@1plain valueprepareNativeAssembly (server)
server/planwildshard:server/plan@1plain valueserverPlan (server)
server/questwildshard:server/quest@1plain valueprepareNativeAssembly (server)
server/ridingwildshard:server/riding@1plain valueprepareNativeAssembly (server)
server/worldwildshard:server/world@1plain valueprepareNativeAssembly (server)
sim/bodieswildshard:sim/bodies@1plain valueDeclaredBodyOps (server), DeclaredBodyOpsSchema (shard-format)
sim/client-channelswildshard:sim/client-channels@1root clientChannelsClientScriptViews (page)
sim/client-scriptswildshard:sim/client-scripts@1root clientScriptscreateShardfileClientScripts (page)
sim/hookswildshard:sim/hooks@1root hookscreateShardfileScriptLane (server)
sim/plumbingwildshard:sim/plumbing@1root plumbinginstallDeclaredPlumbing (page)
sim/runtime-planwildshard:sim/runtime-plan@1plain valueprepareProductRuntimePlan (server)
sim/scriptswildshard:sim/scripts@1plain valueDecisionHost (server), parseDecisionScripts (shard-format)
sim/simwildshard:sim/sim@1root simcreateShardfileScriptLane (server)
state/migrationswildshard:state/migrations@1root migrationslogicalStateFromLane (both)
state/modeswildshard:state/modes@1root modesplayerModes (both)
state/statewildshard:state/state@1root statenumericScriptState (server)
ui/cardwildshard:ui/card@1root accentnone: Discovery metadata; no per-shard executable implementation.
ui/compendiumwildshard:ui/compendium@1root rows.compendiumsdeclaredProductCompendium (both)
ui/completionwildshard:ui/completion@1plain valueinstallCompletion (page)
ui/levelwildshard:ui/level@1root manifestnone: Metadata read by another host.
ui/stringswildshard:ui/strings@1plain valuenone: Read by an explicitly imported consumer, not executed.
ui/uiwildshard:ui/ui@1root ui, targetsmountDeclaredUi (page), installDeclaredTargets (page)
view/moduleswildshard:view/modules@1plain valueViewModulesSchema (shard-format), admitScriptContract (shard-format)
world/collisionwildshard:world/collision@1root meshCollisioninstallShardfileColliders (both)
world/dayswildshard:world/days@1root rows.daysdeclaredDay (both)
world/edgewildshard:world/edge@1root edge, entryways, edgeObservationscreatePortalTraversal (both)
world/fieldwildshard:world/field@1plain valuebindShardfileSim (server)
world/moverswildshard:world/movers@1root moverscreateComposedMoverHost (server), installClientMoverOwners (page)
world/navigationwildshard:world/navigation@1root navigationinstallProductNavigation (page)
world/physicswildshard:world/physics@1plain valuenone: Handed to the runtime's explicitly imported native host.
world/propswildshard:world/props@1root propspropColliderDescriptors (both)
world/sceneswildshard:world/scenes@1plain valueinstallWorldScenes (page)
world/spawnwildshard:world/spawn@1root spawnnone: Level admission metadata.
world/targetswildshard:world/targets@1plain valueWorldTargetHost (both)
world/terrainwildshard:world/terrain@1root terrain, nativeGroundclientGround (both)
world/tileswildshard:world/tiles@1root tiles, far, near, ringclientTileViews (page)
world/traversalwildshard:world/traversal@1root traversalcreatePortalTraversal (both)
world/treeswildshard:world/trees@1plain valueproductTreeSet (page), placeForestPageModels (page)
world/vehicleswildshard:world/vehicles@1plain valuenone: Read by the vehicle runtime (meta MIRROR-SALT-ZONE MSZ6 to MSZ9); until then the engine runs each dock as its steer carry (vehicleCarryMovers).
world/waterwildshard:world/water@1root waterinstallClientWater (page), shardfileWater (page)
world/weatherwildshard:world/weather@1root rows.weatherdeclaredWeather (both)

An itemActions row under targets may declare setsFlag, a single flag id present in quests.flags. For example, a lantern refill scene may name "setsFlag": "chest.opened". Unknown flag references fail validation. The receiving host must set it only for the player whose item use it accepts; walking near the prompt does not raise it. A row without this optional field keeps its previous behavior. Engine implementation and the two-player proof remain TEMPLATE-E2E TC-E7; the schema alone does not close that row.

A species may declare ordered harvest entries with item, positive integer count, and an optional list of variants. Omitting variants matches every admitted variant; an empty harvest list yields nothing. A declaration holds at most 64 entries and 64 total item units before selectors reduce delivery. Variant selectors must name that species' variants, including its older producer contract's spawn-only variants. Full shard admission also requires each item in items.catalogue. Both species contracts use the same harvestRows schema; producer content and engine consumption remain ONE-FORMAT OF31b2 and OF31b3.

A journal icon may declare image with an admitted raster image hash or the existing bounded inert SVG sketch envelope. Raster images must be in the charged library closure with kind image; inline SVG uses the existing sketch raster CPU/GPU measurement and is counted once per distinct source. An image may set tint: "currentColor" to use its alpha as a mask painted by the sticker's inherited CSS color. Omit it to retain image colors. Selectors keep their current entry-kind and match-kind behavior. An image row cannot also declare a legacy glyph. Older glyph rows remain accepted until ONE-FORMAT OF31c2 replaces their producer and runtime path; this schema addition alone does not enable image rendering in an older engine.

A gameplay species row may declare the boolean capExempt. It is absent from look-only metadata. Strike rows and melee swings may declare debris with a required default effect and up to 64 unique overrides. Each override names a target species row id and an effect. Effects declare surface (shell, wood or sand), integer count from 0 to 64, atFeet and sparks booleans. The rows and speciesPrograms readers and full item admission reject unknown target species ids; standalone strikes check syntax without inventing a catalogue. Native runtime-plan metadata retains its separate interpreter admission. Runtime support and older source conversion remain ONE-FORMAT OF31d2 and OF31d3.

Manifest and native-hunt fight metadata may declare capExemptTags: up to 512 unique exact dotted strings, each at most 521 characters. Punctuation is literal, including *. The incomingCapPolicy compiler lowers older aliases once, preserving request, state, effect and environment-hit tags. When both fields exist, admission requires identical sets. Species capExempt booleans override this conditional policy; absence retains it. This contract alone does not add support to older engine readers.

2. client/plan kinds

client/plan is { "version": 1, "features": [ … ] }, at most 64 features. Each feature's kind picks one compiled-in page host; a feature never names a module, owner or property path. The server's code ignores client/plan except for the five reads engine's server-parity audit lists (HS6 moves them into native-assembly rows).

Side comes from src/format/feature-sides.ts: view draws on the page and writes no gameplay; both means the server owns the gameplay and the page draws it, and Server host names the server installer. A kind with no side is refused ("Unsided content kind"). Reads sections must be present in the shard file, or engine's load refuses ("Missing feature section"), with four exceptions: world.updates without a toon-look row, held.claims.prepare with a source, and content.catalogue without finishes need none; species.program with a catalogue needs look/hull-book.

KindSideServer hostPage hostReads sections
arena-room.entryview—installArenaRoomEntry—
audio.cuesview—installClientCuesworld/scenes
audio.sceneview—enterClientAudioScene, installClientAudioScene—
bag.findsview—installClientFinds—
boss.heldbothheldBossinstallClientBossFightsim/runtime-plan
boss.spawnedview—installClientBossFightsim/runtime-plan
boss.telegraphview—installClientBossTelegraphsim/runtime-plan, actors/strikes
combat.targetsbothheldArmsinstallCombatTargets—
content.cataloguebothloadoutinstallClientCatalogueheld/finishes
debug.exposeview—SceneDressing—
elite.constructbothwindEliteinstallClientEliteConstruction—
elite.entrybothwindEliteinstallClientEliteEntry—
fx.trailview—installClientTrailsworld/scenes
held.claims.enterbothgrappleentryOwnerheld/arms
held.claims.installbothheldArmsinstallHeldClaimsEntry—
held.claims.preparebothheldArmsprepareHeldClaimsEntryheld/arms
held.cosmeticsview—installClientCosmeticFinishesheld/finishes
held.meleebothmeleeenterClientHeldMelee, installClientHeldMeleelook/painted
held.ranged-feelview—installHeldRangedFeel—
held.ranged-pagebothheldRangedinstallEntryRangedPage, prepareRangedPageheld/finishes
light.emittersview—installLightEmittersworld/scenes
look.painterlyview—setPainterlyLook—
motion.channelsview—installSceneMotionworld/scenes
page.lifeview—installClientPageLife—
player.enterbothfallFloorenterClientPlayer, installClientPlayerEnter—
population.wildlifeview—clientWildlife, installClientWildlife—
portal.ridebothportalRideinstallDeclaredPortalRide—
practice.courseview—installPracticeCourse—
quest.chapter-viewview—installEntryChapterView—
quest.compositionbothquestCompositioninstallEntryQuestComposition—
quest.continuationbothkeepsakesinstallQuestContinuationFile—
quest.pagebothquestHostfinishClientQuestPage, installClientQuestPageworld/scenes, world/targets, look/painted
quest.referencebothplacesinstallEntryQuestReference—
quest.spawnsview—installDeclaredQuestSpawns, publishEntryOwner—
quest.viewsview—installEntryQuestViewsworld/scenes
quest.worldbothplacesprepareQuestWorldEntry—
riding.sessionview—installClientRiding—
state.adventurebothsavesinstallClientAdventurePersistence—
stealth.entrybothstealthinstallClientStealthEntry, prepareClientStealthEntryplayer/stealth
strings.registerview—levelRegistrations.stringsui/strings
taming.entryview—installTamingEntry—
timed.encountersbothslotsinstallClientTimedEncounters—
view.programbothposeViewsinstallViewProgramview/modules
weather.fieldsview—installWeatherFields—
weather.forestview—installClientForestWeather—
world.ambient-lifebothharvestinstallClientAmbientLife—
world.assemblybothcollisioninstallClientWorldAssemblyworld/scenes
world.bakedbothcollisioninstallClientBakedTiles—
world.bind-setsview—bindEnteredClientPlaceSets—
world.dressingbothcollisionSceneDressingworld/scenes
world.forest-pagebothcollisionenterClientForestPage, installClientForestPage—
world.meadowview—installClientMeadow—
world.moversbothmoversinstallClientMoverOwnersworld/movers
world.pathsbothcollisioninstallClientPathRamps—
world.runtime-hooksbothfallFloorinstallClientRuntimeHooks—
world.scenesbothcollisionStreamingCamera, cameraCone, followResidentTiles, installWorldScenes, noteTileBytes, productTileRing, residentTilesworld/scenes
world.setsview—installClientPlaceSets—
world.updatesview—installWorldUpdateslook/toon
world.waterview—installClientWaterSurfaces—

world.assembly stages

A world.assembly feature's rows.stages[] each carry a kind, sided the same way. A stage that places solids is both, built on the server by the collision bake.

StageSideServer host
ambient-flockview—
arena-roombotharenaRoom
drawn-modelsview—
dressingbothcollision
dressing-anchorbothcollision
dressing-piecebothcollision
entrybothcollision
fixed-drawsview—
groupbothcollision
meshbothcollision
painted-reseedview—
painted-worldview—
placebothcollision
rope-chainbothropeDecks
rope-deckbothropeDecks
sitebothcollision
streamed-coverview—
water-surfaceview—

3. Server-class files

server/native-assembly.json is a shard's native runtime plan; any other server/<name>.json is plain rows the plan reads (J90). They ship only in shard.json admission.server: never in files, a section or a pack, so no page can fetch one (J91). The plan's features[] each name a server host:

server/native-assembly.json features[].host, 46 hosts: ammunition, boss.arena, boss.ground, boss.open-arena, collision, collision.pieces, combat.motion, commands, day.declared, day.keyed-sky, day.toon, decisions, encounter.patrol, grapple, held.arms, item.ranged, item.swept, loadout, population.elites, population.elites-ready, population.environment, population.mixed, population.poses, population.reactions, population.roster, population.settle, population.shelter, population.spawn-script, portal.ride, quest.body-scripts, quest.chapter, quest.composition, quest.kill-steps, riding.elites, riding.elites-ready, riding.environment, riding.groups, riding.hunt, riding.mounted, riding.roster, riding.taming, riding.trample, water.field, water.sea, weather.native, weather.program.

sim/runtime-plan kind: held-melee.

A shard with neither plan runs on engine's data cell, which builds its world from the sections alone.

4. Named files

A JSON file in files with a name must match a registered family, and validation runs that family's defining schema on it. An unregistered name is refused ("Unregistered named JSON"), and custom/ names are retired. Unnamed files (GLB, KTX2, audio, Wasm, tiles, binaries, images) are referenced by hash from the sections. How a family is admitted: PLATFORM-FILE-FAMILIES.md. Defining schema is the registry's schema id, which keeps the old @wildshard/format spelling; it is a string, not an import path (import from @wildshard/shard-format).

Name patternDefining schema
^server\/native-assembly\.json$@wildshard/format/nativeAssembly#NativeAssemblySchema
^server\/[a-z0-9][a-z0-9.-]*\.json$@wildshard/format/nativeAssembly#NativeAssemblyDataSchema
^quests\/runtime\.json$@wildshard/format/questRuntime#QuestRuntimeDocumentSchema
^quests\/forest-story\.json$@wildshard/format/questStoryBindings#QuestStoryBindingsSchema
^quests\/content\.json$@wildshard/format/questPageComposition#ChapterViewSchema
^actors\/projection\.json$@wildshard/format/populationProjection#PopulationProjectionSchema
^poses\/monkey\.json$@wildshard/format/mixedPopulation#PerchBodyFileSchema
^quests\/interaction-source\.json$@wildshard/format/questInteractionSource#QuestInteractionSourceSchema
^sim\/enemy-placement\.json$@wildshard/format/populationProjection#EnemyPlacementsSchema
^sim\/population-metadata\.json$@wildshard/format/populationEnvironment#PopulationHabitatSchema
^sim\/taming-poses\.json$@wildshard/format/populationRoster#TamingPoseFileSchema
^quests\/native-spots\.json$@wildshard/format/nativeQuestComposition#NativeQuestServiceSpotsSchema
^quests\/contracts\.json$@wildshard/format/contracts#ContractCatalogueSchema
^quests\/discovery\.json$@wildshard/format/questStory#AdventureContentSchema
^quests\/hints\.json$@wildshard/format/questSteps#QuestHintRowsSchema
^quests\/wake-boss\.json$@wildshard/format/chapterDirector#ChapterWakeSchema
^quests\/carried\.json$@wildshard/format/questSteps#CarriedQuestSchema
^quests\/finds\.json$@wildshard/format/findsCatalogue#FindsCatalogueSchema
^actors\/creature-install\.json$@wildshard/format/speciesLooks#CreatureInstallSchema
^sim\/returns\.json$@wildshard/format/namedJsonContracts#PageReturnRowsSchema
^actors\/roster\.json$@wildshard/format/populationRoster#NativePopulationRowsSchema
^actors\/elites\.json$@wildshard/format/eliteFeature#EliteFeatureSchema
^actors\/shelter\.json$@wildshard/format/herdShelter#PopulationShelterSchema
^actors\/sheep\.json$@wildshard/format/speciesActorsFile#SpeciesActorsFileSchema
^actors\/wildlife\.json$@wildshard/format/wildlifePopulation#WildlifePopulationSchema
^combat\/roaming\.json$@wildshard/format/roamingCombat#RoamingCombatSchema
^client\/ranged-page\.json$@wildshard/format/rangedPage#RangedPageSchema
^combat\/room-entry\.json$@wildshard/format/arenaRoomDocument#ArenaRoomDocumentSchema
^combat\/timed-encounters\.json$@wildshard/format/encounterRows#TimedEncountersSchema
^combat\/titan-fight\.json$@wildshard/format/arenaScriptRows#ArenaScriptFightFileSchema
^combat\/titan-geometry\.json$@wildshard/format/arenaScriptRows#ArenaScriptGeometrySchema
^models\/cloud-specimen\.json$@wildshard/format/encounterRows#CloudSpecimenSchema
^riding\/mounted-figure\.json$@wildshard/format/mountedSpecimenRows#MountedSpecimenSeatSchema
^riding\/session\.json$@wildshard/format/riding#ClientRidingSessionSchema
^geometry\/fixed-kits\.json$@wildshard/format/practiceCourseRows#FixedPracticeFileSchema
^models\/fixed-geometry\.json$@wildshard/format/islandLibrary#FixedGeometryGroupsSchema
^models\/cover-phone\.json$@wildshard/format/specimenCatalogue#SpecimenBookSchema
^models\/cover-desktop\.json$@wildshard/format/specimenCatalogue#SpecimenBookSchema
^models\/gear-book\.json$@wildshard/format/specimenCatalogue#SpecimenBookSchema
^models\/held-cards\.json$@wildshard/format/heldArms#HeldGraphCardsSchema
^look\/cover-appearance\.json$@wildshard/format/coverAppearance#CoverAppearanceSchema
^world\/island\/plan-(?:phone|desktop)\.json$@wildshard/format/bakedTiles#BakedPlacementPlanSchema
^people\/cards\.json$@wildshard/format/questFigures#KitFigureCardsSchema
^world\/building-life\.json$@wildshard/format/buildings#BuildingLifeDocumentSchema
^world\/cover-composition\.json$@wildshard/format/streamedCover#CoverCompositionSchema
^models\/shape-book\.json$@wildshard/format/fixedDraws#FixedDrawRowsSchema
^quests\/chapters\.json$@wildshard/format/questStory#ChapterStoryPresentationSchema
^world\/weather\.json$@wildshard/format/weatherBundle#WeatherDocumentSchema
^audio\/scene\.json$@wildshard/format/audioScene#AudioSceneSchema
^look\/post\.json$@wildshard/format/postGraphLook#PostGraphLookSchema
^world\/scene-pages\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,179}\.json$@wildshard/format/worldScenePages#WorldScenePageSchema
^world\/sources\/bakes\.json$@wildshard/format/sceneSources#SceneBakeSourceSchema
^world\/sources\/(?:models|heroes|sky)\.json$@wildshard/format/sceneSources#SceneModelSourceSchema
^world\/(?:casts|fabric)\.json$@wildshard/format/worldSceneWeld#WorldSceneWeldSchema
^world\/placement-pages\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,179}\.json$@wildshard/format/worldScenePlacement#WorldScenePlacementPageSchema
^(?:scenes\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,179}|world\/scenes\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,179}|world\/portals\/scene)\.json$@wildshard/format/clientChannels#WorldSceneSchema
^world\/(?:fields\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,179}|cards\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,179}|portals\/sparks)\.json$@wildshard/format/sceneBuffers#SceneBuffersSchema
^models\/world-scenes\.json$@wildshard/format/worldSceneModels#WorldSceneModelsSchema
^quests\/achievements\.json$@wildshard/format/achievementCounters#AchievementCounterDataSchema
^people\/catalogue\.json$@wildshard/format/figures#FigureCatalogueSchema
^quests\/page-composition\.json$@wildshard/format/questPageComposition#QuestPageCompositionSchema
^quests\/stall\.json$@wildshard/format/namedJsonContracts#QuestTraderSchema
^(?:look\/creature-looks|actors\/species-looks)\.json$@wildshard/format/speciesLooks#PackedCreatureLooksSchema
^look\/[A-Za-z0-9_-][A-Za-z0-9_.-]{0,173}-draw\.json$@wildshard/format/namedJsonContracts#PosedLibrarySchema
^quests\/story\.json$@wildshard/format/questStory#QuestStorySchema
^actors\/page-life\.json$@wildshard/format/pageLife#PageLifeSchema
^quests\/chapter-director\.json$@wildshard/format/chapterDirector#ChapterDirectorSchema
^quests\/(?:trader|mill-door|lanterns)\.json$@wildshard/format/questInteractions#QuestPageInteractionsSchema
^quests\/services\.json$@wildshard/format/questSteps#QuestServiceActionsSchema
^directors\/main\.json$@wildshard/format/directorDocument#DirectorDocumentSchema
^quests\/panels\.json$@wildshard/format/panelTemplate#QuestPanelCatalogueSchema
^world\/forest-weather\.json$@wildshard/format/forestWeather#ForestWeatherSchema
^quests\/persistence\.json$@wildshard/format/namedJsonContracts#AdventurePersistenceSchema
^world\/weather-fx\.json$@wildshard/format/weatherEffects#WeatherEffectsSchema
^world\/rain\.json$@wildshard/format/rainPresentation#RainPresentationSchema
^world\/weather-observations\.json$@wildshard/format/rangedPage#ForestWeatherObservationSchema
^world\/dressing-pages\/0\.json$@wildshard/format/sceneDressing#SceneScatterPageSchema
^world\/dressing-pages\/1\.json$@wildshard/format/sceneDressing#SceneScatterPageSchema
^world\/dressing-phone\.json$@wildshard/format/sceneDressing#SceneDressingSchema
^world\/dressing-desktop\.json$@wildshard/format/sceneDressing#SceneDressingSchema
^world\/floor\.json$@wildshard/format/forestPage#ForestGroundLayoutSchema
^world\/crag-cave\.json$@wildshard/format/caveInterior#CaveFileSchema
^world\/cave-interior\.json$@wildshard/format/caveInterior#CaveInteriorSchema
^world\/forest-page\.json$@wildshard/format/forestPage#ForestPageSchema
^world\/building-sites\.json$@wildshard/format/forestPage#LivingPageSitesSchema
^data\/physics\.generated\.json$@wildshard/format/forestNativeInputs#ForestNativeInputsSchema
^world\/meadow\.json$@wildshard/format/populationEnvironment#PopulationFieldSchema
^world\/water\.json$@wildshard/format/waterWorld#WaterWorldSchema
^weapons\/bow-page\.json$@wildshard/format/weaponProfiles#HeldBowFileSchema
^weapons\/rifle-page\.json$@wildshard/format/weaponProfiles#HeldFirearmPageSchema
^weapons\/sabre\.json$@wildshard/format/heldWeaponDocuments#BladeDocumentSchema
^weapons\/spear\.json$@wildshard/format/heldWeaponDocuments#PolearmDocumentSchema
^held\/slots\.json$@wildshard/format/heldWeaponDocuments#HeldSlotsDocumentSchema
^weapons\/jian-row\.json$@wildshard/format/heldJianDocument#HeldJianDocumentSchema

5. Scripts

A shard's only code is Wasm, compiled from AssemblyScript by the SDK and admitted by reading its bytes, never by running them (SCRIPT-ABI.md). Scripts are declared in:

WhereWhat runs itSide
sim/scripts (ABI v1, side: "sim")engine's decision hostboth: the server owns the gameplay
sim/scripts (ABI v1, side: "view")refused: only the server's decision host reads sim/scripts—
actors/return-scriptsengine's return program (shared code)both
actors/spawn-scriptsengine's spawn script hostserver
view/modulesthe page's view program (the view.program kind); a pose view also runs on the serverview, view.program is both
ABI v2 lanes sim / project / viewthe server's batch / both / the pageserver / both / view

A view row may command only timer, cue and channel. A sim row that only a page-only feature runs is refused (Pine's live shard is the one grandfathered exception). Admission refuses memory.grow, tables, start sections, passive data, indirect calls and bulk operations. Engine enforces these call limits at run time (engine's decision host; the numbers and sources are in SCRIPT-ABI.md's limits table): fuel 400,000 per call and 2,000,000 per decision tick; at most 64 binding calls per decision tick; at most 16 events delivered and 32 commands per call, 128 commands per tick; at most 4 spawns and 8 timers per call; the third refusal disables a binding.

6. Budgets

A shard declares its own ceilings in shard.json admission, and validation holds its measured costs to them:

The page's memory caps (src/format/memoryGates.json) are in report-only mode until SHARD-PLATFORM closes: memory checks print their numbers and do not refuse.

7. Limits held as constants

LimitValueMeansConstant
sourceBytes2000000bytes of canonical shard.json source; also all sections togetherSHARDFILE_ADMISSION_LIMITS
files4096file rowsSHARDFILE_ADMISSION_LIMITS
commons1024commons referencesSHARDFILE_ADMISSION_LIMITS
stateFields128state fields per scopeSHARDFILE_ADMISSION_LIMITS
waterBodies64water bodiesSHARDFILE_ADMISSION_LIMITS
idCharacters128characters in an id or nameSHARDFILE_ADMISSION_LIMITS
textCharacters4096characters of free textSHARDFILE_ADMISSION_LIMITS
wireBytes256000000distinct declared download bytes, commons includedSHARDFILE_ADMISSION_LIMITS
major1script ABI v1 major versionSCRIPT_V1_LAYOUT
slotBytes8bytes per slot (one f64)SCRIPT_V1_LAYOUT
header8header slotsSCRIPT_V1_LAYOUT
state16declared state slots per scriptSCRIPT_V1_LAYOUT
params32declared parameters per scriptSCRIPT_V1_LAYOUT
events16events delivered per callSCRIPT_V1_LAYOUT
eventWidth6slots per eventSCRIPT_V1_LAYOUT
commands32commands per callSCRIPT_V1_LAYOUT
commandWidth5slots per commandSCRIPT_V1_LAYOUT
fixedHz60fixed simulation steps per secondSCRIPT_V1_LAYOUT
decisionDivisor6steps per decision tick (60 / 6 = 10 Hz)SCRIPT_V1_LAYOUT
maximumPages464 KiB memory pages per v1 moduleSCRIPT_V1_LAYOUT
version0core script ABI version (v0)SCRIPT_ABI
assemblyscript0.28.20pinned AssemblyScript compilerSCRIPT_ABI
binaryen132.0.0pinned BinaryenSCRIPT_ABI
maxBytes262144bytes per Wasm moduleSCRIPT_ABI
memoryPages6464 KiB memory pages per v0 moduleSCRIPT_ABI
maxFunctions512functions and types per moduleSCRIPT_ABI
maxGlobals128globals per moduleSCRIPT_ABI
maxLocals1024locals per functionSCRIPT_ABI
callDepth64call depthSCRIPT_ABI

8. What is refused