Operation Primitives
Operations are the mutation layer for both the language compiler and agents.
Operation params should be explicit and typed. Do not use positional arrays for architectural meaning. See Params for the shared param primitive rules.
Operation Shape
Section titled “Operation Shape”interface Operation { opId: OperationId; type: string; target?: EntityId; targetPath?: GraphPath; selector?: EntitySelector; params: unknown; preconditions?: Precondition[]; metadata?: Metadata;}Every operation must document its required params, optional params, coordinate-space behavior, created paths, affected evals, and repair hints.
Targeting Rules
Section titled “Targeting Rules”- Use
targetPathfor generated source and agent patches. - Use
targetwhen a stable entity ID is already known. - Use
selectorfor set-based operations. - Never target by display name.
- Echo the supplied path or selector in diagnostics.
Selector Examples
Section titled “Selector Examples”path("buildings.b_001.levels.*.floorplate")kind("space").where(program == "bedroom")within("site.main.envelopes.primary")tag("protected_tree")dependsOn("site.main.parcels.pcl_001.constraints.zoning")Primitive Operations
Section titled “Primitive Operations”| Operation | Params should include |
|---|---|
createEntity | kind, id, path, properties |
deleteEntity | deletion mode, dependency handling |
updateProperties | property patch |
setGeometry | geometry payload and coordinate system |
addRelation | relation kind, from, to |
removeRelation | relation ID or path |
addConstraint | constraint kind and rule params |
removeConstraint | constraint ID or path |
Agent Patch Example
Section titled “Agent Patch Example”{ "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": "placeCore", "targetPath": "buildings.b_001.systems.core.main", "params": { "strategy": "central", "stairs": 2, "elevators": 2 } } ]}Precondition Examples
Section titled “Precondition Examples”[ { "kind": "exists", "path": "site.main.parcels.pcl_001" }, { "kind": "evalPasses", "rule": "parcel.boundary_closed", "targetPath": "site.main.parcels.pcl_001.boundary" }]