Complete Example
This is the smallest useful end-to-end example: parcel, constraints, envelope, building, eval, and repair.
Source
Section titled “Source”project housing_study:
site main: frames: local: kind site_local units [mm, mm, mm]
parcels: parcel pcl_001: coordinate_space site.main.frames.local
boundary: unit mm edge front: (0, 0) -> (42000, 0) tags [frontage] edge east: (42000, 0) -> (39000, 28000) edge rear: (39000, 28000) -> (4000, 31000) edge west: (4000, 31000) -> (0, 0)
constraints: setbacks: front: from boundary.edges.front distance 5000mm side: from [boundary.edges.east, boundary.edges.west] distance 3500mm rear: from boundary.edges.rear distance 6000mm
height_limit primary: max 18000mm
lot_coverage: max 0.4
far: max 1.2
envelopes: primary: parcel parcels.pcl_001 derive_from parcels.pcl_001.constraints
buildings: building b_001: parcel site.main.parcels.pcl_001 envelope site.main.envelopes.primary use residential target_gfa 4200sqm
generation: floor_to_floor 3100mm max_floorplate_depth 14500mm
systems: core main: strategy central stairs 2 elevators 2Generated Paths
Section titled “Generated Paths”site.main.parcels.pcl_001site.main.parcels.pcl_001.constraints.setbacks.frontsite.main.envelopes.primarybuildings.b_001buildings.b_001.systems.core.mainAgent Patch
Section titled “Agent Patch”{ "ops": [ { "type": "computeBuildableEnvelope", "targetPath": "site.main.parcels.pcl_001", "params": { "rules": ["constraints.setbacks", "constraints.height_limit", "constraints.lot_coverage"], "outputPath": "site.main.envelopes.primary", "tolerance": { "linear": "5mm" } } }, { "type": "generateFloorplates", "targetPath": "buildings.b_001", "params": { "envelope": "site.main.envelopes.primary", "floorToFloor": "3100mm", "maxDepth": "14500mm" } }, { "type": "placeCore", "targetPath": "buildings.b_001.systems.core.main", "params": { "strategy": "central", "stairs": 2, "elevators": 2 } } ]}Example Eval Failure
Section titled “Example Eval Failure”{ "rule": "planning.lot_coverage", "targetPath": "buildings.b_001", "groupPath": "site.main.parcels.pcl_001.constraints.lot_coverage", "severity": "hard", "actual": 0.43, "requiredMax": 0.4, "unit": "ratio"}Repair Patch
Section titled “Repair Patch”{ "ops": [ { "type": "fitMassingToEnvelope", "targetPath": "buildings.b_001", "params": { "envelope": "site.main.envelopes.primary", "preserveGfa": false, "allowedMoves": ["shrink_footprint", "reduce_upper_levels"], "tolerance": { "linear": "5mm" } } } ]}