Skip to content

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.

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.

  • Use targetPath for generated source and agent patches.
  • Use target when a stable entity ID is already known.
  • Use selector for set-based operations.
  • Never target by display name.
  • Echo the supplied path or selector in diagnostics.
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")
OperationParams should include
createEntitykind, id, path, properties
deleteEntitydeletion mode, dependency handling
updatePropertiesproperty patch
setGeometrygeometry payload and coordinate system
addRelationrelation kind, from, to
removeRelationrelation ID or path
addConstraintconstraint kind and rule params
removeConstraintconstraint ID or path
{
"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
}
}
]
}
[
{
"kind": "exists",
"path": "site.main.parcels.pcl_001"
},
{
"kind": "evalPasses",
"rule": "parcel.boundary_closed",
"targetPath": "site.main.parcels.pcl_001.boundary"
}
]