{
  "language": "Dream",
  "version": 2,
  "header": "dream 2;",
  "syntax": "kind id?(key=value,...); | kind id?(key=value,...){ statements }; block suffix ? permits either form",
  "identifiers": "[a-z][a-z0-9_]{0,31}; references use IDs, labels are display-only",
  "coordinates": {
    "world": "[x,y], origin top-left, x right, y down",
    "object": "[x,y,z], Y up",
    "length": "canonical units",
    "angles": "degrees; Euler XYZ",
    "frequency": "cycles/second (hz)",
    "speed": "units/second"
  },
  "expressions": "finite numbers, constants, + - * /, sin(degrees), cos(degrees); no general code",
  "types": {
    "n": "numeric expression",
    "v2": "[n,n]",
    "position2": "[n,n] or a file-local junction reference",
    "v3": "[n,n,n]",
    "nums": "[n,...]",
    "symbols": "[symbol,...]",
    "point": "[n,n] or [n,n,n]",
    "points2": "[[n,n],...]",
    "colors": "[#rrggbb,#rrggbb]",
    "color": "#rrggbb",
    "ref": "symbol ID",
    "symbol": "identifier",
    "text": "\"JSON-escaped string\"",
    "bool": "true|false",
    "optional": "type suffix ?",
    "variants": "enum values separated by |; other types are nested constructor calls"
  },
  "limits": {
    "characters": 65536,
    "tokens": 12000,
    "nesting": 16,
    "steps": 2048,
    "objects": 16,
    "repeat": 32
  },
  "projectLimits": {
    "modules": 32,
    "depth": 8,
    "characters": 524288,
    "assemblies": 128
  },
  "commands": {
    "material": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "style": "toon|grain|glow|stripes|cloth|brick|wood|stone",
        "colors": "colors",
        "night": "color?"
      }
    },
    "rule": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "kind": "car|pickup|truck|plane|tree|person|bicycle|skateboard|bench|table|building|train|bus|tram|boat|food|lamp|custom",
        "mode": "impact"
      }
    },
    "let": {
      "contexts": [
        "top",
        "object",
        "visual",
        "path",
        "route_path"
      ],
      "id": true,
      "fields": {
        "value": "n"
      }
    },
    "component": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "params": "symbols?",
        "materials": "symbols?"
      },
      "block": "visual"
    },
    "object": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "label": "text"
      },
      "block": "object"
    },
    "asset": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "module": "ref",
        "object": "ref",
        "control": "car|bicycle|skateboard|scooter|boat|plane?"
      }
    },
    "include": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "module": "ref"
      }
    },
    "body": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "interaction": "solid|knockable|decor",
        "radius": "n",
        "height": "n",
        "clearance": "n?",
        "friction": "n?"
      }
    },
    "measure": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "kind": "car|pickup|truck|plane|tree|person|bicycle|skateboard|bench|table|building|train|bus|tram|boat|food|lamp|custom",
        "axis": "x|y|z",
        "meters": "n"
      }
    },
    "ground": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "mode": "upright|surface"
      }
    },
    "foundation": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "size": "v2",
        "color": "color"
      }
    },
    "contact": {
      "contexts": [
        "object"
      ],
      "id": true,
      "fields": {
        "at": "v3",
        "radius": "n?",
        "size": "v2?",
        "height": "n",
        "heading_deg": "n?"
      }
    },
    "interior": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "at": "v3",
        "size": "v3"
      },
      "block": "interior"
    },
    "portal": {
      "contexts": [
        "interior"
      ],
      "id": true,
      "fields": {
        "side": "front|back|left|right",
        "offset": "n",
        "width": "n",
        "height": "n"
      }
    },
    "seat": {
      "contexts": [
        "object"
      ],
      "id": true,
      "fields": {
        "at": "v3",
        "approach": "v2",
        "heading_deg": "n"
      }
    },
    "rideable": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "at": "v3",
        "control": "car|bicycle|skateboard|scooter|boat|plane?"
      }
    },
    "lamp": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "at": "v3",
        "radius": "n",
        "color": "color"
      }
    },
    "emit": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "kind": "steam",
        "at": "v3",
        "rate_s": "n"
      }
    },
    "impact": {
      "contexts": [
        "object"
      ],
      "id": false,
      "fields": {
        "mode": "impact"
      }
    },
    "fragment": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {},
      "block": "visual"
    },
    "zone": {
      "contexts": [
        "object"
      ],
      "id": true,
      "fields": {
        "at": "v3",
        "radius": "n",
        "height": "n",
        "mode": "fracture"
      },
      "block": "visual"
    },
    "group": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {
        "at": "v3?",
        "rot_deg": "v3?",
        "scale": "n?"
      },
      "block": "visual"
    },
    "joint": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {
        "at": "v3?",
        "rot_deg": "v3?",
        "bone": "root|spine|left_hip|left_knee|left_ankle|left_shoulder|left_elbow|right_hip|right_knee|right_ankle|right_shoulder|right_elbow?",
        "motion": "joint_motion?"
      },
      "block": "visual"
    },
    "mount": {
      "contexts": [
        "object"
      ],
      "id": true,
      "fields": {
        "bone": "root|spine|left_hip|left_knee|left_ankle|left_shoulder|left_elbow|right_hip|right_knee|right_ankle|right_shoulder|right_elbow"
      },
      "block": "visual"
    },
    "repeat": {
      "contexts": [
        "object",
        "visual",
        "path",
        "route_path",
        "voxel_ops"
      ],
      "id": true,
      "fields": {
        "index": "symbol",
        "count": "n"
      },
      "block": "inherit"
    },
    "use": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {
        "component": "ref",
        "args": "nums?",
        "materials": "symbols?",
        "at": "v3?",
        "rot_deg": "v3?",
        "scale": "n?"
      }
    },
    "part": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {
        "shape": "box|sphere|cylinder|cone|pyramid|icosphere|capsule|torus|prism",
        "material": "ref",
        "at": "v3",
        "size": "v3",
        "rot_deg": "v3?",
        "outline": "points2?",
        "taper": "n?",
        "faceted": "bool?",
        "deform": "deform?",
        "motion": "part_motion?",
        "cutaway": "roof|front|back|left|right?"
      }
    },
    "voxels": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {
        "material": "ref",
        "at": "v3",
        "size": "v3",
        "grid": "v3",
        "chunks": "v3?",
        "rot_deg": "v3?"
      },
      "block": "voxel_ops"
    },
    "fill": {
      "contexts": [
        "voxel_ops"
      ],
      "id": true,
      "fields": {
        "from": "v3",
        "to": "v3",
        "shape": "box|ellipsoid?"
      }
    },
    "cut": {
      "contexts": [
        "voxel_ops"
      ],
      "id": true,
      "fields": {
        "from": "v3",
        "to": "v3",
        "shape": "box|ellipsoid?"
      }
    },
    "beam": {
      "contexts": [
        "object",
        "visual"
      ],
      "id": true,
      "fields": {
        "shape": "box|cylinder|capsule",
        "material": "ref",
        "from": "v3",
        "to": "v3",
        "width": "n",
        "depth": "n",
        "taper": "n?",
        "faceted": "bool?",
        "deform": "deform?",
        "motion": "part_motion?"
      }
    },
    "route": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "kind": "rail|path|water|air|ambient|street|tram|walk",
        "mode": "loop|shuttle",
        "speed": "n",
        "altitude": "n?",
        "wait_s": "n?",
        "width": "n?",
        "surface": "trail|cycle|paved?",
        "gauge": "n?"
      },
      "block": "route_path"
    },
    "point": {
      "contexts": [
        "path",
        "route_path"
      ],
      "id": false,
      "fields": {
        "at": "point"
      }
    },
    "stop": {
      "contexts": [
        "route_path"
      ],
      "id": true,
      "fields": {
        "at": "v2",
        "wait_s": "n",
        "site": "ref"
      }
    },
    "site": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "object": "ref",
        "kind": "home|market|school|hospital|work|civic|park|station|airport|stop",
        "label": "text?",
        "entry": "v2",
        "street": "ref",
        "width": "n",
        "points": "points2",
        "serves": "symbols?"
      }
    },
    "crossing": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "street": "ref",
        "at": "v2",
        "width": "n",
        "junction": "bool?"
      }
    },
    "furnish": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "objects": "symbols",
        "streets": "symbols?",
        "sites": "symbols?",
        "grounds": "symbols?",
        "paving": "color?",
        "spacing": "n",
        "setback": "n",
        "seed": "n",
        "side": "left|right|both?",
        "facing": "along|street|varied?",
        "jitter": "n?",
        "count": "n?",
        "pose": "rest?",
        "on": "verge|sidewalk?",
        "motion": "ambient_motion?",
        "role": "prop|controllable?"
      }
    },
    "walk": {
      "contexts": [
        "ambient_motion"
      ],
      "id": false,
      "fields": {
        "speed": "n",
        "wait_s": "n?"
      }
    },
    "roam": {
      "contexts": [
        "ambient_motion"
      ],
      "id": false,
      "fields": {
        "radius": "n",
        "speed": "n",
        "alert": "n",
        "flee_speed": "n",
        "recover_s": "n?",
        "gait": "walk|hop?"
      }
    },
    "flock": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "object": "ref",
        "at": "v2",
        "radius": "v2",
        "count": "n",
        "altitude": "n",
        "speed": "n",
        "seed": "n",
        "flap_hz": "n?",
        "flap_deg": "n?"
      }
    },
    "place": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "object": "ref",
        "at": "v2?",
        "route": "ref?",
        "offset": "n?",
        "phase_s": "n?",
        "scale": "n?",
        "heading_deg": "n?",
        "role": "prop|npc|controllable|ambient?",
        "behavior": "ref?",
        "pose": "rest?",
        "motion": "ambient_motion?",
        "parked": "bool?"
      }
    },
    "behavior": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "start": "ref"
      },
      "block": "behavior"
    },
    "state": {
      "contexts": [
        "behavior"
      ],
      "id": true,
      "fields": {
        "action": "idle|patrol|perform",
        "face": "none|player?",
        "say": "text?"
      },
      "block": "npc_state"
    },
    "on": {
      "contexts": [
        "npc_state"
      ],
      "id": true,
      "fields": {
        "event": "after|near_player|far_player|interact",
        "to": "ref",
        "seconds": "n?",
        "radius": "n?",
        "familiar": "bool?",
        "requires": "ref?",
        "shared_meals": "n?"
      }
    },
    "economy": {
      "contexts": [
        "top"
      ],
      "id": false,
      "fields": {},
      "block": "economy"
    },
    "good": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "food": "n?"
      }
    },
    "account": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "actor": "ref",
        "credits": "n",
        "capacity": "n",
        "satiety": "n",
        "drain_s": "n",
        "shop": "bool?",
        "social": "ref?",
        "shift": "ref?",
        "meal": "ref?",
        "work": "ref?",
        "works": "symbols?",
        "repair": "ref?",
        "repairs": "symbols?",
        "deliveries": "symbols?"
      }
    },
    "market": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "actor": "ref",
        "credits": "n",
        "radius": "n",
        "hours": "v2?",
        "owner": "ref?",
        "sale": "n?"
      },
      "block": "market"
    },
    "lot": {
      "contexts": [
        "market"
      ],
      "id": true,
      "fields": {
        "good": "ref",
        "quantity": "n",
        "limit": "n",
        "price": "n?"
      }
    },
    "work": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "market": "ref",
        "input": "ref?",
        "take": "n?",
        "output": "ref",
        "make": "n",
        "seconds": "n",
        "pay": "n",
        "effort": "n",
        "capacity": "n",
        "target": "n",
        "requires": "ref?"
      },
      "block": "recipe?"
    },
    "meal": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "good": "ref",
        "markets": "symbols",
        "on": "ref",
        "grounds": "symbols?",
        "eat_s": "n",
        "seats": "symbols?"
      }
    },
    "social": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "good": "ref",
        "seats": "symbols",
        "on": "ref",
        "grounds": "symbols?",
        "eat_s": "n",
        "cooldown_s": "n?",
        "max_fullness": "n?",
        "markets": "symbols?"
      }
    },
    "shift": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "market": "ref",
        "rest": "v2",
        "on": "ref",
        "grounds": "symbols?",
        "lead_s": "n?"
      }
    },
    "milestone": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "kind": "work|delivery|repair",
        "task": "ref",
        "count": "n"
      }
    },
    "ingredient": {
      "contexts": [
        "recipe"
      ],
      "id": false,
      "fields": {
        "good": "ref",
        "take": "n"
      }
    },
    "repair": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "market": "ref",
        "on": "ref",
        "grounds": "symbols?",
        "streets": "symbols?",
        "verge": "n?",
        "kind": "car|pickup|truck|plane|tree|person|bicycle|skateboard|bench|table|building|train|bus|tram|boat|food|lamp|custom?",
        "kinds": "symbols?",
        "input": "ref",
        "take": "n",
        "seconds": "n",
        "pay": "n",
        "effort": "n",
        "dispatch_s": "n?",
        "regrow_s": "n?",
        "seed_scale": "n?"
      }
    },
    "delivery": {
      "contexts": [
        "economy"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "from": "ref",
        "to": "ref",
        "good": "ref",
        "quantity": "n",
        "pay": "n",
        "price": "n?",
        "capacity": "n",
        "on": "ref?",
        "grounds": "symbols?"
      }
    },
    "scenario": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "seed": "n",
        "max_steps": "n"
      },
      "block": "scenario"
    },
    "item": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "label": "text"
      }
    },
    "location": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "label": "text",
        "at": "v2"
      }
    },
    "link": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "from": "ref",
        "to": "ref",
        "steps": "n"
      }
    },
    "stock": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "at": "ref",
        "item": "ref",
        "mode": "source|sink",
        "quantity": "n",
        "price": "n?"
      }
    },
    "service": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "at": "ref",
        "consumes": "ref",
        "produces": "ref",
        "duration": "n",
        "capacity": "n",
        "fee": "n"
      }
    },
    "agent": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "at": "ref",
        "budget": "n",
        "capacity": "n"
      }
    },
    "objective": {
      "contexts": [
        "scenario"
      ],
      "id": true,
      "fields": {
        "agent": "ref",
        "kind": "deliver|produce",
        "at": "ref",
        "item": "ref",
        "quantity": "n"
      }
    },
    "watercourse": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "level": "n",
        "depth": "n",
        "bank": "n",
        "color": "color",
        "flow": "v2",
        "ends": "round|open?"
      },
      "block": "path"
    },
    "junction": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "at": "v2"
      }
    },
    "daylight": {
      "contexts": [
        "top"
      ],
      "id": false,
      "fields": {
        "cycle_s": "n",
        "start_hour": "n"
      }
    },
    "voxel_world": {
      "contexts": [
        "top"
      ],
      "id": false,
      "fields": {
        "object_cell": "n",
        "ground_cell": "n",
        "height_step": "n"
      }
    },
    "world": {
      "contexts": [
        "top"
      ],
      "id": false,
      "fields": {
        "size": "v2",
        "spawn": "position2",
        "heading_deg": "n",
        "player": "ref?",
        "damage_pool": "bool?"
      }
    },
    "road": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "width": "n",
        "points": "points2?",
        "via": "symbols?",
        "style": "racing|street?"
      }
    },
    "street": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "width": "n",
        "sidewalk": "n",
        "points": "points2?",
        "via": "symbols?",
        "cycle_width": "n?"
      }
    },
    "surface": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "color": "color?",
        "points": "points2",
        "finish": "paint|terrain?",
        "walkable": "bool?"
      }
    },
    "sport": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "kind": "football|basketball",
        "surface": "ref",
        "ball": "ref",
        "targets": "symbols",
        "target_at": "v3",
        "target_size": "v2",
        "net_depth": "n?",
        "roster": "symbol?",
        "team_size": "n?",
        "duration_s": "n?",
        "score_to": "n?"
      },
      "block": "sport?"
    },
    "team": {
      "contexts": [
        "sport"
      ],
      "id": true,
      "fields": {
        "object": "ref?",
        "objects": "symbols?",
        "role": "npc",
        "members": "symbols?",
        "keeper": "n?",
        "keeper_object": "ref?",
        "style": "balanced|press|counter?",
        "skill": "n?"
      }
    },
    "marking": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "color": "color",
        "width": "n",
        "closed": "bool"
      },
      "block": "path"
    },
    "hill": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "at": "v2",
        "radius": "v2",
        "height": "n"
      }
    },
    "tint": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "at": "v2",
        "radius": "n",
        "color": "color"
      }
    },
    "bridge": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "from": "position2",
        "to": "position2",
        "width": "n",
        "arch": "n",
        "style": "timber|stone",
        "rails": "bool"
      }
    },
    "water": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "points": "points2",
        "level": "n",
        "depth": "n",
        "bank": "n",
        "color": "color",
        "flow": "v2",
        "drag": "n",
        "waves": "v3"
      }
    },
    "effect": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "kind": "ice|boost",
        "points": "points2"
      }
    },
    "checkpoint": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "at": "v2",
        "dir": "v2",
        "width": "n"
      }
    },
    "unresolved": {
      "contexts": [
        "top"
      ],
      "id": true,
      "fields": {
        "label": "text"
      }
    },
    "spin": {
      "contexts": [
        "part_motion"
      ],
      "id": false,
      "fields": {
        "axis": "x|y|z",
        "deg_s": "n"
      }
    },
    "roll": {
      "contexts": [
        "part_motion",
        "joint_motion"
      ],
      "id": false,
      "fields": {
        "axis": "x|y|z",
        "radius": "n"
      }
    },
    "sway": {
      "contexts": [
        "part_motion"
      ],
      "id": false,
      "fields": {
        "deg": "n",
        "hz": "n"
      }
    },
    "stride": {
      "contexts": [
        "joint_motion"
      ],
      "id": false,
      "fields": {
        "axis": "x|y|z",
        "deg": "n",
        "length": "n",
        "phase_deg": "n"
      }
    },
    "swing": {
      "contexts": [
        "joint_motion"
      ],
      "id": false,
      "fields": {
        "axis": "x|y|z",
        "deg": "n",
        "hz": "n",
        "phase_deg": "n"
      }
    },
    "open": {
      "contexts": [
        "joint_motion"
      ],
      "id": false,
      "fields": {
        "axis": "x|y|z",
        "deg": "n",
        "radius": "n"
      }
    },
    "deform": {
      "contexts": [
        "deform"
      ],
      "id": false,
      "fields": {
        "seed": "n",
        "amount": "n"
      }
    },
    "bounce": {
      "contexts": [
        "impact"
      ],
      "id": false,
      "fields": {
        "restitution": "n",
        "lift": "n"
      }
    },
    "break": {
      "contexts": [
        "impact",
        "fracture"
      ],
      "id": false,
      "fields": {
        "speed": "n",
        "scatter": "n",
        "lift": "n",
        "spin": "n",
        "lifetime": "n",
        "pattern": "scatter|splinter|crumble?"
      }
    },
    "topple": {
      "contexts": [
        "impact"
      ],
      "id": false,
      "fields": {
        "speed": "n",
        "duration": "n",
        "lifetime": "n"
      }
    }
  },
  "destruction": {
    "limits": {
      "assemblies": 24,
      "fragments": 128,
      "templateRecords": 128,
      "instances": 4096,
      "idleSeconds": 10
    },
    "source": "world(...,damage_pool=true) enables pooled static break/topple props across linked placements and furnishing. Omitted/false retains legacy 24 reactive-object and 128 potential-fragment bounds. Pooled worlds keep at most 24 resident impact objects/128 resident potential fragments, plus 128 distinct pooled template records within existing 4096 placements and project budgets. Each template still has at most eight fragments. Template records are data, not preallocated fragment meshes.",
    "runtime": "At most 24 active fracture assemblies, 128 active debris pieces, 24 cached mesh templates and 128 cached fragment meshes. Oldest cosmetic debris yields when full; persistent damage remains for every impacted object. Intact props are streamed instances. Used template geometry is shared across active instances, unused cache evicts after ten simulation seconds or to make room. No per-cell bodies. Lamp surface pools switch off on whole-object damage and restore after repair. Damage survives streaming, R and format 7 saves; Start over resets it.",
    "geometry": "Dream 2 topple without fragment blocks compiles all parts into one stable rigid fragment. Explicit fragments must still form exactly one rigid group. Whole-object impacts may use one centered base contact, but not compound/offset contacts, foundations, seats or emitters. Existing body bounds remain unchanged; use the centered contact for a narrow pole. The root body radius remains the topple hinge envelope and must clear the visual foot. Pooled whole-object topple may retain part sway with its original GPU phase, pivots, material finishes and matching depth deformation; no spin, roll, cloth, animated joints, scattering or zone motion. Swaying topplers require static prop ownership and damage_pool=true."
  },
  "components": {
    "parameters": 8,
    "semantics": "params declares numeric formals; materials declares material formals. At most 8 unique names combined. Material formals cannot shadow numeric formals or global numeric constants. use.args and use.materials supply matching positional lists, with exact arity and types. Actual materials resolve from globals or the enclosing component material bindings. Callees see globals and their own explicit bindings, never implicit caller locals. No recursive components. Transforms, use-site identity paths and expanded budgets are unchanged."
  },
  "interactionRules": {
    "maximum": 16,
    "selector": "measure.kind; no labels, positions or random exemptions",
    "scope": "Entry file only. One rule per category. Applies before assembly validation to every local/imported template, placement and furnishing. Its impact replaces per-object impact for that category, or every existing zone impact for a break rule; geometry, retained structure, body, fragment groups and per-instance damage remain separate. Scene validation rejects inconsistent serialized placements. Legacy scenes retain 24 reactive objects and 128 potential fragments. world.damage_pool opts static whole-object impacts into bounded activation; see destruction. Unknown legacy categories are not inferred."
  },
  "humanoid": {
    "bones": [
      "root",
      "spine",
      "left_hip",
      "left_knee",
      "left_ankle",
      "left_shoulder",
      "left_elbow",
      "right_hip",
      "right_knee",
      "right_ankle",
      "right_shoulder",
      "right_elbow"
    ],
    "semantics": "Optional joint.bone binds a complete 12-joint humanoid on a measured decor person. Required tree: root -> spine -> shoulder -> elbow, root -> hip -> knee -> ankle, paired left/right. Rest faces +X, +Y up, left +Z; unrotated frames, root centered with positive height, hips at root height, shoulders above spine, downward knee/ankle/elbow offsets >= .5. All parts parent to bones, no independent motion/fractures. After declaring anatomy, object-root mount detail(bone=spine) adds visual parts/components in the local frame of one previously declared bone, without another joint. Mounts count toward the same 32-part budget. Engine owns speed-blended walk/run, two-bone leg poses, jump/landing and crawl/tread transitions. Existing 12-joint/depth-4/32-part and 24-live-assembly limits apply. Furnish requires pose=rest for passive rigs or motion=walk(...) for instanced ambient walkers. Ambient GPU joints preserve the full validated hierarchy without per-member CPU rigs. Collision and terrain support remain separate; no skinning, terrain foot probes or generated animation scripts."
  },
  "seating": {
    "limits": {
      "perObject": 4,
      "world": 512,
      "supportTolerance": 0.2,
      "radius": 3,
      "height": 17.5,
      "reach": 12
    },
    "source": "Object-root seat id(at=[x,y,z],approach=[x,z],heading_deg=n); 1..4 unique slots on an upright static solid prop. at is the sitting surface, not an avatar origin. The engine fits the humanoid pelvis and rigid legs; the current bench fits feet to its floor. Requires one body cylinder, without compound contacts, foundations, interiors, transport seats, moving parts, surface grounding, break zones or bouncing/toppling furniture. Whole-object break remains supported.",
    "acceptance": "At most 512 world seats; sitting surface 3..9 world units above the floor; dry unobstructed authored transfer 6..40 units from approach to seat, <=4-unit steps and full 3-unit radius/17.5-unit headroom. Placement rotation and measured scale apply once. All sitting points need furniture geometry and all approaches must validate outside the furniture body; seats and approaches require 6-unit separation. No labels infer seating.",
    "runtime": "F sits or stands; movement and jump first request a clear exit. One shared claim per slot, including an NPC walking to it. G uses ordinary finite carried food; working, trade, sports and boarding require standing. Broken furniture releases claims and repair restores the same slots. Seats add no physics bodies, actors or animated rigs. NPC meal.seats is an optional 1..4 unique furniture-placement list; complete humanoids reserve a reachable free slot after paying, walk to its approach, eat for eat_s, release and return home. Busy/broken seats use standing meals. All claims, paths and timers persist; no queue or table service."
  },
  "interiors": {
    "limits": {
      "spaces": 32,
      "portals": 4
    },
    "contacts": "contact uses exactly one radius (1..64, cylinder height 1..160) or size=[width,depth] (.1..128, rectangle height .1..160); optional heading_deg only for rectangles. At most eight upright contacts. Rectangles are static structures without seats, whole-object impact or route motion; circles remain compatible.",
    "semantics": "One optional object-root interior(at=[x,floor_y,z],size=[width,clear_height,depth]) with 1..4 named portal records. Requires a static solid foundation, a matching rectangle floor contact covering the complete interior with its top at floor_y, a matching ceiling contact with its bottom at floor_y + clear_height, and explicit part.cutaway roof tags. Portals use front=-Z, back=+Z, left=-X, right=+X; offset runs along X for front/back and Z for left/right. Width/height are local full dimensions. Complete scenes prove a 9-unit doorway, 20-unit headroom and unobstructed approach with steps <=4. Existing 32-part/8-contact budgets apply. Explicit cutaway=roof|front|back|left|right keeps floor, contents and far walls opaque inside; shell tags survive instancing and streaming. The ordinary simulation supports the physical floor and ceiling. The placed object ID may be used in repair/delivery grounds without independent polygon coordinates. One ground floor per building; no stacked floors, stairs, lifts or inferred rooms. A room-owning lamp supplies a floor-clipped always-on surface pool; it does not light walls or occlude other objects."
  },
  "geometry": {
    "stride": {
      "source": "joint(motion=stride(axis=z,deg=24,length=20,phase_deg=0))",
      "length": [
        1,
        128
      ],
      "amplitudeRad": [
        0,
        1.4
      ],
      "phaseRad": [
        -3.141592653589793,
        3.141592653589793
      ],
      "semantics": "One cycle per length local units traveled after group/placement scale. Renderer-owned rigid rotation; no new physics or saved clock. Joint-only; explicit rest for passive furnishing; ambient instancing shares color/depth poses."
    },
    "faceted": "optional boolean on undeformed cylinder, cone and icosphere parts/beams; true retains flat polygonal faces as exact cut-cell contours; false preserves curved reconstruction; no new contact, grid or part budgets",
    "partSizeMinimum": 0.1,
    "legacyPartSizeMinimum": 0.5,
    "beamMinimumLength": 0.5,
    "shape": "prism",
    "outline": "3..24 simple polygon points [X,Y], 0..1 and spanning both axes; either winding, no repeated closing point, holes, touching or crossed edges; area >= .01",
    "extrusion": "outline maps across full size X/Y, centered, extruded along Z through full size Z; rotation and uniform scaling apply normally",
    "jointRoll": "roll(axis,radius) on a joint rotates all children rigidly by traveled distance / resolved radius; reduced motion rests it, prop furnishings bake the rest pose; controllable furnishings retain rolling mechanisms for bounded activation"
  },
  "voxels": {
    "limits": {
      "axis": 32,
      "cells": 32768,
      "objectCells": 65536,
      "operations": 64,
      "objectWork": 1048576,
      "quads": 8192,
      "projectCells": 1048576
    },
    "semantics": "voxels is one rigid part with grid 1..32 per axis; ordered fill/cut operations use integer half-open [from,to) cell bounds, box default or ellipsoid cell-center test. Exterior faces are greedily merged and mesh data cached. size maps the whole grid to object-local dimensions; use equal size/grid ratios for cubic cells. Optional chunks divides grid exactly into at most 8 nonempty rigid fracture pieces, only with break or a break zone; no fragment wrapper, no deform/cloth/part motion. Physics contacts remain explicit cylinders or static rectangles, not per-cell collision or arbitrary tunnels.",
    "world": {
      "limits": {
        "stampAxis": 32,
        "stampCacheBytes": 16777216,
        "tileSize": 400,
        "columnCellsPerTile": 640000
      },
      "command": "voxel_world(object_cell=1,ground_cell=8,height_step=1);",
      "bounds": {
        "objectCell": [
          0.25,
          4
        ],
        "groundCell": [
          4,
          8
        ],
        "heightStep": [
          0.5,
          1
        ]
      },
      "semantics": "Optional world-owner policy applies after linking and furnishing. Every shaped part is an engine voxel stamp, retaining its authored envelope, material, rigid joints and fragment ownership; explicit voxels keep their exact fill/cut data. Undeformed prism/pyramid boundary cells retain exact merged planar contours, including thin shells; curved/deformed stamps use sampled continuous contours. Stamp grids use 4..32 cells per axis, fit to part dimensions with a bounded shared mesh cache; no full-world 3D array. Ground uses resident 400-unit tiles of greedy solid columns. Infrastructure uses world-aligned columns with separate surface lifts; fine paint uses .5-unit cells. Water columns retain a bounded wave field and a rigid per-column wave anchor. Resolution is fixed at construction, never changed by camera distance. Collision cylinders and smooth driving heightfields remain separate; no editable terrain, automatic damage or per-cell physics."
    }
  },
  "scenarios": {
    "limits": {
      "scenarios": 1,
      "locations": 32,
      "links": 64,
      "items": 32,
      "stocks": 64,
      "services": 32,
      "agents": 8,
      "objectives": 32,
      "steps": 1000
    },
    "semantics": "Optional logical task environment, separate from driving physics and NPC clocks. Explicit bidirectional links take integer steps; source stock sells, sinks accept deliveries and cannot resell; services consume/produce one item with capacity, duration and fee. Agents have integer credits and carrying capacity. Deliver/produce objectives advance only on committed transfers/completions. Seed rotates contention priority deterministically. No generated scripts, real model calls, medical decisions or ecological realism.",
    "output": "Step API with local observations, joint actions, rewards, termination/truncation and replayable JSONL. Prompt interpreter and agent policies are labelled mocks."
  },
  "agents": {
    "limits": {
      "programs": 16,
      "actors": 32,
      "states": 8,
      "transitions": 4,
      "seconds": [
        0.1,
        300
      ],
      "radius": [
        10,
        240
      ],
      "turnRadS": 2.5,
      "interactRadius": 80,
      "speechCharacters": 240,
      "speechSeconds": 8
    },
    "parking": {
      "limits": {
        "vehicles": 256
      },
      "source": "place(...,at=[x,y],role=controllable,parked=true) or furnish(...,role=controllable); explicit solid rideable ground assembly (car, bicycle, skateboard or scooter); boats/planes keep resident controllable placements. No routes, programs, rest pose, foundations, damage, emitters, lamps, humanoid or proximity joints",
      "runtime": "256 dormant metadata/body records, separate from 24 resident route actors or controllable vehicles. Reserve one of the existing 24 live assembly slots for the occupied fleet vehicle. Static seeds and moved local poses are instanced; only the occupied vehicle has a CPU rig. Moved poses and ownership persist across chunks, recovery and format 5 saves; Start over restores seeds."
    },
    "roles": {
      "ambient": "bounded instanced decor motion from walk or roam, no arbitrary program, contact or boarding ownership",
      "prop": "passive scenery, no route or behavior",
      "controllable": "requires rideable control capability; parked until player boards",
      "npc": "engine-owned route or behavior; driver-capable NPC cannot be boarded, passenger-only seats remain available"
    },
    "legacy": "omitted role infers controllable from control capability, otherwise npc from route, otherwise prop",
    "speech": "state.say is 1..240 nonblank plain-text characters on idle/perform states; shown after interaction for at most 8 simulation seconds and within 80 units; does not generate speech, trade or change resources",
    "program": "behavior ID is file-local; states and transition targets are local to that behavior; all states reachable from start",
    "actions": {
      "idle": "rest joints and pause route clock",
      "patrol": "advance placement route and animate while moving",
      "perform": "animate joints in place with route clock paused"
    },
    "events": {
      "after": "only seconds, since state entry",
      "near_player": "only radius; 3D distance <= radius",
      "far_player": "only radius; 3D distance >= radius",
      "interact": "only radius, 10..80; one player talk press, nearest eligible NPC within 3D range; on foot and grounded only; optional familiar matches whether this NPC has already interacted with the player; optional requires checks a personal economy milestone, restricted to the task receiving market actor after linking; optional shared_meals checks completed meals with this particular social NPC (use the commerce feature packet)"
    },
    "execution": "one transition per fixed tick, first matching declaration wins; elapsed resets on transition; per-instance clocks live outside Scene; patrol resumes without teleport; face=player turns stationary actors at 2.5 rad/s",
    "boundary": "data-only bounded state machines; no scripts, pathfinding, generated input profiles or model calls; root world.player remains the original car"
  },
  "daylight": {
    "cycleSeconds": [
      120,
      3600
    ],
    "startHour": "0 <= hour < 24",
    "semantics": "optional single declaration beside world/road; paused visual clock, reduced motion freezes it; R preserves clock, Start over resets it; omitted keeps static daytime",
    "nightMaterial": "optional material.night color emits after dusk; daytime base paint unchanged",
    "lamp": "object-root local position and radius 8..80, color; static prop only; whole-object damage requires world.damage_pool, knockables remain rejected. Pool switches off while broken; soft ground-projected pool, not a point light",
    "lightPools": 512
  },
  "worldLimits": {
    "layout": "one world; street-only worlds omit road and checkpoints and require a spawn-connected street network; optional circuit road requires 2..64 ordered checkpoints",
    "dimension": 16384,
    "waterArea": 8000000,
    "waveCellsPerBody": 131072,
    "waveCellSize": 24,
    "watercourseStationWidth": [
      80,
      1200
    ]
  },
  "sports": {
    "maximum": 8,
    "matchLimits": {
      "teamSize": 6,
      "seconds": [
        30,
        900
      ],
      "score": 21,
      "tickSeconds": 0.05
    },
    "semantics": "A dry nearly level named surface connects one distinct bounce ball and two static targets. target_at/target_size use target-local units; football local +Z points outward, basketball +Z into the court. Optional sport block has exactly team home and team away, each role=npc and exactly object or objects (1..4 complete measured decor humanoid variants). team_size=2..6 includes the player on home; engine supplies the other NPCs. Optional members reuses stationary decor person NPC identities without commerce, conversation or routes; all identities count toward the existing 32 NPC cap. The member ID player is reserved for the active player. Optional roster shares the same team sizes/member lists across grounds; only the latest joined venue renders that squad and only one match plays. Engine-owned deterministic 20 Hz tactics, one ball owner, passes, catches, charged shots, tackles with cooldown and score/time results; no generated code. Football keeper defaults to NPC index 0 per side; keeper_object replaces its outfit, keeper selects its index. Optional football net_depth=6..64 matches the visible triangular side/back net in target-local Z and contains full ball spheres, leaving the mouth open. Match time, results, member poses, possession and actions persist. GPU humanoid instances preserve the CPU rig, route and ambient limits. No fouls, offside, bank-shot backboard physics or general crowd collisions."
  },
  "urbanGround": {
    "streets": 32,
    "surfaces": 64,
    "markings": 128,
    "streetLength": 120000,
    "markingLength": 40000,
    "street": {
      "anchors": [
        2,
        16
      ],
      "width": [
        60,
        180
      ],
      "sidewalkPerSide": [
        0,
        40
      ],
      "cycleWidthPerSide": [
        16,
        40
      ],
      "cycleSeparator": 6,
      "minimumSegment": 80,
      "geometry": "open polyline in any direction; turns at most 120 degrees; bounded miter joins with square endpoint caps; non-overlapping junctions; city paving, cycle tracks and separators yield to the circuit; sidewalk strips across it become painted walkable crossings with open curbs and clear center paint; complete cycle glyph envelopes must fit a lane and clear crossings and other glyphs; optional cycle tracks",
      "acceptance": "every component reaches the circuit or street-only spawn with full car clearance; riding surface clear of solids; water crossings require an aligned bridge carrying the full street, cycle tracks and sidewalks between rails; dedicated paths remain separate"
    },
    "surface": {
      "points": [
        3,
        64
      ],
      "area": 1000000,
      "extent": 2000,
      "geometry": "simple polygon; declaration order overlays; cannot cover street riding surfaces",
      "walkable": "optional boolean, false when omitted; true requires convex clear pieces joined to existing pedestrian pavement, dry or fully bridge-supported; no rail/runway overlap or side entry onto bridges; adds pavement for walkers and work travel, not road grip or flattening",
      "finish": "paint by default, requiring color; finish=terrain forbids color and preserves the underlying terrain and cosmetic ground plants. Both retain the same bounded work coverage, furniture reservations and walking/physical validation. Terrain areas add no render mesh or map overlay"
    },
    "marking": {
      "points": [
        2,
        64
      ],
      "width": [
        0.5,
        12
      ],
      "closedMinimum": 3,
      "block": "point/let/repeat; omit repeated first point"
    },
    "semantics": "visual ground follows terrain/decks; streets and cycle tracks add normal road grip; explicit bridges only, no generated controllers, flattening or traffic"
  },
  "cityAccess": {
    "streetOnlyJunctions": "nearby junctions share outer-arm crossings; short internal links have no crossing; parallel overlapping zebra envelopes share one world-aligned stripe phase",
    "junctionsPerFile": 128,
    "sites": 256,
    "crossings": 64,
    "site": {
      "label": "optional nonblank plain text, 1..80 characters; names the destination independently of the reused object template; no generated behavior",
      "entry": "object-local [X,Z], transformed with placement heading and resolved scale",
      "points": "world XY, entry is prepended; last point must lie inside the named sidewalk",
      "width": [
        12,
        40
      ],
      "maximumLength": 800,
      "kinds": [
        "home",
        "market",
        "school",
        "hospital",
        "work",
        "civic",
        "park",
        "station",
        "airport",
        "stop"
      ],
      "serves": "stop-only site references, at most 8; targets must be reachable on the pedestrian network"
    },
    "crossing": {
      "junction": "optional true expands to zebra crossings on every connected street arm",
      "width": [
        12,
        40
      ]
    },
    "junction": "file-local coordinate ID; road/street use exactly one of via or points; world spawn and bridge ends accept junction IDs; includes do not export symbols",
    "acceptance": "static building sites require attached exterior entrances and clear dry access paths; stops must reach served sites; short overlapping street endpoints are rejected in site-authored cities"
  },
  "transit": {
    "kinds": [
      "street",
      "tram",
      "walk",
      "rail",
      "path",
      "water",
      "air",
      "ambient"
    ],
    "stopsPerRoute": 16,
    "stop": "named route anchor with wait_s .1..30 and a site reference within 120 units; street/tram/rail require a station or stop site; walk may visit destinations",
    "gauge": [
      10,
      24
    ],
    "semantics": "street and walk add no infrastructure; tram lays rails in existing carriageways; street/tram keep complete actor contacts on accepted roads; walk keeps the body on paths/crossings/sidewalks; shuttle stops are visited in reverse on return; solid NPC rail/tram/street vehicles may use compound contacts"
  },
  "proportions": {
    "unitsPerMeter": 10,
    "profiles": {
      "car": {
        "axis": "x",
        "min": 2.5,
        "max": 6
      },
      "pickup": {
        "axis": "x",
        "min": 4,
        "max": 6.8
      },
      "truck": {
        "axis": "x",
        "min": 5.5,
        "max": 12
      },
      "plane": {
        "axis": "z",
        "min": 7,
        "max": 24
      },
      "tree": {
        "axis": "y",
        "min": 4,
        "max": 30
      },
      "person": {
        "axis": "y",
        "min": 1.4,
        "max": 2.2
      },
      "bicycle": {
        "axis": "x",
        "min": 1.4,
        "max": 2.4
      },
      "skateboard": {
        "axis": "x",
        "min": 0.5,
        "max": 1.2
      },
      "bench": {
        "axis": "x",
        "min": 1.2,
        "max": 2.8
      },
      "table": {
        "axis": "x",
        "min": 1,
        "max": 3
      },
      "building": {
        "axis": "y",
        "min": 3,
        "max": 40
      },
      "train": {
        "axis": "x",
        "min": 6,
        "max": 20
      },
      "bus": {
        "axis": "x",
        "min": 6,
        "max": 18
      },
      "tram": {
        "axis": "x",
        "min": 10,
        "max": 35
      },
      "boat": {
        "axis": "x",
        "min": 3,
        "max": 12
      },
      "food": {
        "axis": "x",
        "min": 0.1,
        "max": 0.8
      },
      "lamp": {
        "axis": "y",
        "min": 1,
        "max": 15
      },
      "custom": {
        "axis": null,
        "min": 0.05,
        "max": 60
      }
    },
    "relativeToPlayerCar": {
      "tree": "larger",
      "plane": "larger",
      "bicycle": "smaller",
      "skateboard": "smaller"
    },
    "layoutClearance": "Optional v2 body.clearance (compiled body.clearanceRadius), finite 4..128 local units and at least the collision radius, is a minimum furnishing reservation. It cannot reduce the actual visual footprint and never changes body contacts, driving, walking navigation or render culling. Omitted retains exact legacy bounds-based placement.",
    "rule": "measure sets one rest-pose extent; uniform scale preserves shape, physics and attachments. place.scale is 0.5..2 variation and must stay in the profile range. kind=custom permits deliberate fantasy sizes. Omit measure only for legacy local-unit assets."
  },
  "modules": {
    "registry": "host-supplied module ID to Dream 2 text; no file/URL resolution",
    "asset": "imports one exported object only, under a local alias; optional control selects an engine vehicle profile on a copy with an existing seat, validated as a driver assembly. Original module/export and NPC passenger seats remain unchanged",
    "include": "merges world data only; symbols remain file-local",
    "errors": "module ID accompanies nested diagnostics; failure returns no partial world"
  },
  "population": {
    "ambient": {
      "members": 192,
      "tickSeconds": 0.05,
      "graphNodes": 8192
    },
    "motion": "motion=walk(speed,wait_s=1) follows cached portals from accepted sidewalks, entrance paths and crossings, yielding to swept vehicles and locally spacing ambient walkers using their complete rest footprints; speed 4..24, wait_s 0..5. Requires a complete humanoid rig. motion=roam(radius,speed,alert,flee_speed,recover_s=2,gait=walk) stays dry and outside roads/grounds, flees a nearby player and recovers after separation; radius/alert 20..180, speed 2..16, flee_speed 8..60 and >= speed, recover_s .5..10, gait walk|hop. Place requires explicit role=ambient and fixed at; furnish motion creates ambient ownership, walk requires on=sidewalk. Motion excludes pose=rest, routes, programs, seats, contacts, foundations, damage, emitters, lamps, part clocks and proximity/roll joints. Validated humanoid or swing joints animate shared full geometry in color/shadow shaders. At most 192 members; fixed deterministic 20 Hz movement with render interpolation; 8192 cached pedestrian graph nodes; existing NPC, route and CPU live-rig caps unchanged. All members stay resident. Pause freezes state, R preserves it, Start over resets it; reduced motion rests poses. Ambient walkers choose bounded local passing, slowing or backing steps on accepted pavement with stable ID yielding. Existing overlapping saves separate gradually. Narrow bottlenecks may wait or back away; no general crowd physics, pushing, avoidance of decor NPC people, signal solving, general programs or ecological simulation.",
    "rules": 32,
    "generatedPerRule": 128,
    "generatedTotal": 1024,
    "candidatesPerRule": 2048,
    "flocks": 16,
    "birds": 256,
    "membersPerFlock": 32,
    "furnish": "exactly one of streets or sites; sites require count 1..12. Passive static assemblies unless explicit ambient motion; no knockables or emitters. Static break/topple templates are allowed with world.damage_pool; rest/ambient/controllable restrictions remain. pose=rest explicitly removes bone bindings and part/joint clocks while preserving geometry, rest transforms and body; it cannot disable damage, emitters, knockables or proximity joints. On place it requires explicit role=prop, fixed at and no behavior. on=sidewalk requires decor, setback=0 and no paving; the full radius must fit the outer sidewalk and leave an inner 8-unit corridor. Default on=verge stays beyond the pavement. facing=varied gives seeded headings; jitter also varies site-row spacing. Optional grounds explicitly permit named surfaces; site paving creates connected parking aprons within the 64-surface budget. Default prop furnishing cannot be boarded. role=controllable requires control capability on every template, preserves rolling mechanisms and emits parked=true; no motion, pose=rest or on=sidewalk. It shares the 256 dormant parking cap and one reserved active rig. Generated props count toward 4096 scene objects. Full linked scene reservations filter candidates deterministically. No guaranteed minimum count; inspect compiled coverage.",
    "flight": "decorative instanced flight, no NPC/physics ownership. Authored joints are baked at rest; wing motion uses bounded local-Z flex. All birds stay resident. Habitats must fit the world; flight clears terrain and roofs.",
    "phase": "place.phase_s 0..3600 only with route; shifts the entire route clock including stops. offset remains a carriage distance."
  },
  "commerce": {
    "business": {
      "source": "market(...,owner=seller_account,sale=15){lot(...);}",
      "bounds": "owner references an existing account, independent of the counter actor; sale is an optional positive integer 1..1000000 and needs a non-player initial owner; existing 8 markets/16 accounts caps",
      "semantics": "The base sale price excludes available company cash; acquisition pays base + current treasury to the seller personal account once and transfers the existing stock and commitments unchanged. Only a free grounded dry standing buyer in counter reach and clear sight may buy, while open and staffed. No resale. Only the saved current owner may deposit/withdraw positive whole credits locally; cash management remains available while closed. Protect the company incoming/refund commitments and account pending wage headroom; use finite conserved transfers, no idle income, generated scripts or role changes. Ownership, sale time and cash persist through R, streaming and format 15/simulation 23 saves. Exact registered r65 migration adds only a zero-funded seller and initial station owner; preserve every older field and slot. See examples/business-ownership.dream. No hiring, price changes, startup businesses, loans or property deeds."
    },
    "social": {
      "source": "social id(good=food,seats=[bench],on=ground,grounds=[extra],eat_s=8,cooldown_s=600,max_fullness=80,markets=[counter]); account(...,social=id);",
      "bounds": "8 plans; 1..4 unique furniture IDs with at least 2 slots each; optional markets has 1..4 unique counters with a priced lot for good and at least one within work-placement reach; host capacity >=2; positive food; eat_s 1..12, cooldown_s 30..86400 default 600, max_fullness 0..100 default 80; stationary complete humanoid decor NPC program, body radius <=8 and height <=32; existing convex grounds and walking limits",
      "semantics": "Y invites while seated after T establishes acquaintance. With markets, a familiar NPC may buy two portions from its own finite credits at a reachable open staffed counter and later offer to host. Initial resources are unchanged. Offers require the same nearby seated dry grounded player, sight, paired seat, fullness, availability and round-trip shift margin as player invitations, including 30 seconds for consent. One pending offer or shared journey globally. Pending holds the adjacent seat; food stays in the host bag. Y accepts; X declines. Expiry after 30 simulation seconds, decline, F/R, a lost seat or renewed duties releases the offer; purchases stay with the NPC. invitedAtS applies the plan cooldown to repeated offers. Acceptance reserves two actual donor-owned units and refund room, then uses physical outward/eat/return paths. Eat once after the whole duration, feed both and increment per-person shared history once. Interruption refunds the donor once, never another account. Omitting markets keeps player-funded Y sharing unchanged. No NPC-to-NPC invitations, free meals, generated controllers, extra rigs or offline progression. Pause freezes offer time; streaming/R retain history; Start over resets. Format 17/simulation 30 registers r71, preserving all prior state without initializing money or stock. See examples/hosted-meal.dream and examples/shared-meal.dream."
    },
    "shifts": {
      "source": "shift id(market=counter,rest=[x,y],on=ground,grounds=[extra],lead_s=15); account(...,shift=id);",
      "bounds": "at most 8 plans, one NPC per plan; existing market with daily hours; rest at least 16 units from work; lead_s 0..120 and shorter than the closed interval; on plus 0..7 unique convex grounds, 4096 local samples",
      "ownership": "stationary measured-person decor NPC program, no route, meal, repair or delivery policy; shop and matching production may coexist; actual world body radius <= 8, height <= 32; body-sized paths use accepted pedestrian pavement and existing 8192-node/32768-link/128-waypoint bounds",
      "semantics": "Finish own committed work before walking out. Return lead_s before reopening; a shifted counter owner must actually reach the work anchor before trade, new work, pickup or handoff resumes. No wages for idle time. Resting staff can use existing conversations and finite food transactions. Save out/rest/in pose, path, retry time and distance outside Scene; R and streaming retain them, Start over resets. Format 13/simulation 20 registers r62 without changing stored state, clocks, money or history. See examples/staff-shifts.dream."
    },
    "hours": {
      "source": "market(...,hours=[open_hour,close_hour])",
      "bounds": "two finite hours: 0 <= open < 24, 0 <= close <= 24, different endpoints; omit for all-day service",
      "clock": "requires world daylight; simulation time owns service, not the visual clock or wall time; reduced motion freezes only the sky",
      "transactions": "[open,close), wraps midnight when close < open; shared buy/sell, new production, supplier pickup and destination handoff checks for player and NPCs. Committed work finishes after closing. Owned food, refunds and local repairs remain available. Couriers wait at closed counters with saved pose/path/escrow; meal customers return without purchase if closed on arrival. Optional shift plans own physical staff attendance. No offline catch-up or generated controllers."
    },
    "limits": {
      "goods": 8,
      "accounts": 16,
      "markets": 8,
      "jobs": 16,
      "meals": 8,
      "shifts": 8,
      "socials": 8,
      "mealMarkets": 4,
      "milestones": 16,
      "workerJobs": 4,
      "ingredients": 4,
      "deliveries": 16,
      "courierContracts": 4,
      "repairs": 8,
      "repairNodes": 4096,
      "repairNetworkNodes": 8192,
      "repairNetworkLinks": 32768,
      "repairGrounds": 8,
      "repairStreetTargets": 512,
      "repairAccessPieces": 2048,
      "repairVerge": 128,
      "repairRadius": 4,
      "repairPath": 128,
      "money": 1000000,
      "quantity": 10000,
      "capacity": 32,
      "decisionS": 0.25
    },
    "growth": {
      "plants": 32,
      "minSeconds": 30,
      "maxSeconds": 86400,
      "minScale": 0.1,
      "maxScale": 0.5,
      "seedScale": 0.15,
      "workerServices": 4
    },
    "bounds": {
      "money": [
        0,
        1000000
      ],
      "quantity": [
        0,
        10000
      ],
      "accountCapacity": [
        1,
        32
      ],
      "food": [
        0,
        100
      ],
      "satiety": [
        0,
        100
      ],
      "drainPerS": [
        0,
        0.25
      ],
      "marketRadius": [
        20,
        80
      ],
      "price": [
        1,
        10000
      ],
      "workSeconds": [
        1,
        120
      ],
      "effort": [
        1,
        50
      ],
      "workCapacity": [
        1,
        4
      ],
      "labelCharacters": [
        1,
        40
      ],
      "deliveryQuantity": [
        1,
        32
      ],
      "deliveryCapacity": [
        1,
        4
      ],
      "deliveryPrice": [
        0,
        10000
      ],
      "deliveryEscrow": [
        1,
        1000000
      ],
      "courierApproachHeight": 4,
      "mealEatSeconds": [
        1,
        12
      ],
      "mealMarkets": [
        1,
        4
      ],
      "repairKinds": [
        "car",
        "pickup",
        "truck",
        "plane",
        "tree",
        "person",
        "bicycle",
        "skateboard",
        "bench",
        "table",
        "building",
        "train",
        "bus",
        "tram",
        "boat",
        "food",
        "lamp",
        "custom"
      ],
      "repairTake": [
        1,
        32
      ],
      "repairSeconds": [
        1,
        120
      ],
      "repairEffort": [
        1,
        50
      ],
      "repairDispatchSeconds": [
        0,
        120
      ],
      "repairGridStep": 12,
      "repairPathPoints": 128,
      "repairGrounds": 8,
      "repairStreets": 32,
      "repairVerge": [
        0,
        32
      ],
      "repairVergeDefault": 24,
      "repairStreetTargets": 512,
      "repairAccessPieces": 2048,
      "repairNetworkNodes": 8192,
      "repairNetworkLinks": 32768
    },
    "semantics": "NPC meal trips use meal id(good=food_id,markets=[first_shop,second_shop],on=home_ground,grounds=[extra_ground],eat_s=4); and account.meal=meal_id. At most 8 plans, 1..4 unique ordered markets, a positive-food good with a priced lot in every market, and eat_s=1..12 seconds. on plus 0..7 unique extra convex work grounds share the 4096 local-sample budget and accepted pedestrian network. A meal account is a measured person decor NPC with a program, optional walk route, no counter operator role, and no shop/work/repair/delivery policy. Hungry at <=40, it eats carried food first; otherwise it walks to the first stocked affordable shop with a clear outbound/return path. No reservation before arrival. The shared buy transaction rechecks stock, funds, bag and treasury. Failure returns empty-handed, without refund or pay. Success waits eat_s, consumes its owned unit once, restores fullness, then returns to the captured routine position. Program clocks pause through travel/eating/return; moving transit/player contacts can cause waits and bounded replans. Save paths, timers and ownership outside Scene. Optional meal.seats names 1..4 furniture placements and uses the seating contract for shared claims, approach paths and standing fallback; complete humanoids required. No item bodies, new rigs, queues, generated navigation or offline catch-up. See examples/meal-trips.dream. Compose works=[pack_lunch,bake], account.deliveries and meal for a finite staffed business; see examples/market-production.dream. Courier/meal scenes prepare pedestrian routing independently of repairs or ambient walkers. Format 11/simulation 17 preserves registered previous worlds, all personal records and active tasks, without new money/stock or live-city graph rebasing.  Optional one economy() block per linked world. Goods, accounts, stationary-NPC markets and timed work are bounded data. One player account, one account per actor; NPC shop=true buys/eats when satiety <=40; NPC work refills to its job target and requires a stationary actor in range. The player uses explicit on-foot grounded controls. Market lots buy and sell one unit at their fixed price, with finite stock, treasury and capacity; omitted price means a work ingredient not traded. Work uses exactly input/take or a block of 1..4 ingredient(good,take) declarations with unique goods. Every input requires an existing lot, positive bounded take within that lot limit, and differs from output. Empty blocks, mixed forms, duplicate/unknown goods and fractional or excessive quantities fail. Transactions conserve credits, atomically reserve every input/wage/output room and all refund capacity, and refund every input on interrupted work. Work requires satiety >= effort; effort is spent on completion. At most 16 milestone(id,label,kind=work|delivery|repair,task,count) definitions reference existing tasks of the matching kind; count is an integer 1..1000000000, label 1..40 nonblank characters. Optional work.requires references a milestone and checks the acting account only; work prerequisite cycles are rejected. Only paid work, completed handoffs and successful repairs increment that account completion once. Start, cancel, pickup and another account do not qualify. Optional on.requires is interact-only, and can recognize player completions at that task receiving market actor (work/repair.market or delivery.to); reject unknown, absent-economy or unrelated actor requirements after linking. Milestones grant no credits, goods or controller access. Personal counters plus unassigned historical totals must equal shared completion totals. Save format 10/simulation 15 migrates only registered old worlds: old totals stay unassigned, new personal records start at zero, old active jobs earn personal credit when they finish. No guessing from truncated event history. Needs and NPC decisions use a resident 4 Hz clock, with immediate player actions/cancellation. No scripts, provider calls, offline catch-up, free replenishment or clinical/nutritional realism. State survives R, streaming and saves; Start over resets it. Delivery declares separate from/to markets, good, quantity, pay, optional per-unit supplier price (0..10000, default 0) and capacity. Quantity*price+pay must fit the treasury limit. Collect reserves finite source cargo, destination invoice plus wage, supplier treasury headroom and both shelf capacities; sealed cargo counts toward carry capacity and cannot be traded/eaten. Complete on foot at the destination to transfer goods, pay the source business its invoice and the courier its wage once, or cancel anywhere to return all reservations. Carrying survives vehicles, R, streaming and saves. Optional account.deliveries is an ordered 1..4 unique contract list for stationary non-vendor NPCs at the receiving market home; it can accompany repairs, but excludes production work and player accounts. Delivery on names its receiving convex work ground; optional grounds adds 1..7 unique convex surfaces, excluding on. The supplier must have a clear approach on those grounds or accepted pedestrian pavement. All grounds share 4096 local samples. Complete-world acceptance checks pickup, handoff and return for every assigned home. Pickup and handoff approaches must be less than 4 world units above/below the vendor. NPC local food and available repairs take priority; then whole-shipment shelf demand can start a physical walking trip. Pickup intent holds one shared contract-capacity slot without reserving stock, funds or shelf room. Arrival rechecks shared player collection rules; unavailable shipments return empty-handed without goods, refund or pay. Collected cargo uses the same escrow and conservation ledger; handoff pays once, then the worker walks home. Pickup/carry/return paths and retry clocks persist, pause NPC programs and interpolate through the existing worker renderer. Live contacts block travel. Identical ordered delivery grounds share one prepared topology, bounded by 8192 nodes, 32768 links and 128 saved waypoints. No courier vehicle AI, item pickup bodies, upstream production or offline travel. Repair services require exactly one of kind or a nonempty unique kinds list from the measure categories; both select measured-kind ground-accessible break/topple objects or zones within an explicit convex surface containing a supply market. Optional grounds adds 1..7 unique existing convex surfaces, excluding on; all grounds together retain the 4096 local-sample budget. Extra grounds enable engine-owned walking on accepted sidewalks, crossings and entrance paving between service grounds. Optional streets is a unique list of 1..32 existing street IDs with sidewalks at least 8 units wide; it adds measured-kind damage contacts within verge distance of those sidewalks. verge is 0..128 world units, default 24, and requires streets. Short per-target access patches use the shared miter geometry, exclude all riding surfaces, the circuit and water, and do not create paving or infrastructure. At most 512 street targets and 2048 access pieces per service. Paths stay on accepted pavement except these local dry work approaches; named streets do not grant unpainted-road shortcuts. Full-cylinder inset portals join work approaches to pavement. The complete-world compiler checks every target from every worker home; disconnected grounds fail. Derived routing is capped at 8192 nodes, 32768 directed links and 128 saved waypoints, never a world raster or model-authored graph. NPC account.repair requires a stationary home within that area and market reach, and excludes production work and market ownership. Optional dispatch_s defaults to 12 (0..120) simulation seconds so the player can take the same job first. One claimant per damage target across services; reserve finite kits, wage and refund room, count kits against carrying capacity, work on site, wait for clear restoration space, consume/pay once, and walk home without losing program memory. Local dry navigation has 4096 samples at 12-unit spacing and 128 saved path points. Without grounds or streets it remains inside on and avoids roads, riding lanes and water. Network travel uses accepted pedestrian surfaces and bounded local dry work approaches; crossings and supported bridge sidewalks connect streets, and movement checks live contacts. Worker-owned topology is prepared in the world worker; model source and saves cannot supply graph edges. Visual worker poses interpolate one commerce tick while simulation contacts stay authoritative. Notices, poses, paths, progress, reservations, material-use counters and returns survive R, streaming and saves. Optional repair regrow_s (30..86400 seconds) requires kind=tree and whole toppling prop targets with a centered base body, without foundations, zones, seats, emitters or lamps. seed_scale is 0.1..0.5, default .15, requires regrow_s. Planting consumes the declared finite input and pays once, then scales the replacement geometry and contacts from the seed scale to maturity. Resident growth waits for physical clearance; no offline growth or biological validity is claimed. At most 32 growing plants plus committed planting jobs, each reserving one slot. Re-destruction loses the consumed sapling and captures debris at its current size. Account repairs is a unique 1..4 service list, exclusive with repair and work. Priority selects available work, one commitment; all service homes must be in on and within market reach. Notices identify service and target. Touching work grounds join through full-cylinder portals; no road or water shortcuts. No arbitrary city dispatch or scaffold. Long walking journeys take actual simulation time; supplies and wages remain reserved until completion/cancellation. Existing actor/rig/destruction budgets stay unchanged. Logical Lab scenarios remain independent."
  },
  "output": "validated Object DSL v2 and Scene v1; authoring-language version is separate"
}
