IntentOperations

Intent Operations

Operations are invoked as - op: name inside a rule’s then block. Each operation has a dedicated reference page under DSL → Operations.


By phase

PhaseOperations
Preflightreject, if, lookup, find, for_each, stop, continue
Coreset, add, sub, unset, merge, push, remove, filter, find, map, sort, clone, relationship_create, relationship_remove, emit, emit_each, lock, unlock, if, for_each, stop, continue
Side effectsemit, emit_each, submit, schedule, decision, lock, unlock, if, for_each, stop, continue

Mutation ops (core)

OpRequiredOptionalNotes
setpath, valueif_missing, target_streamSet field to value
addpath, valuecap: {max, min}, if_missingAdd to numeric field
subpath, valuecap: {max, min}, if_missingSubtract from numeric field
unsetpathRemove field
mergepath, valueShallow merge into object

Array ops (core)

OpRequiredOptionalNotes
pushpath, valueAppend element
removepathwhere (string)Remove matching elements; it iterator
filterpath, where (string)Keep matching; it iterator
findpath, where (string), asBind element to variable
mappath, as, valueTransform elements
sortpath, byPrefix - for descending
clonepath, asDeep copy to variable

Validation ops (preflight)

OpRequiredOptionalNotes
rejectcodemessageAbort intent — use in preflight

Side effect ops (side_effects)

OpRequiredOptionalNotes
emitevent_type, payloadtarget_stream, target_entityAlso allowed in core
emit_eachfrom, event_type, payloadtarget_streamAlso allowed in core
submitintent_type, payloadtarget_stream, target_entitySide effects only
scheduledelay_secondsevent_type or intent_typeSide effects only
decisionrefinputAI decision — side effects only

Control flow (all phases — nested ops must match phase)

OpRequiredNotes
ifexpr, thenOptional else
for_eachfor_each, thenIterator: item
stopHalt current rule / break loop
continueNext for_each iteration only

Cross-stream & relationships

OpPhaseRequiredNotes
lookuppreflight (validation)into, stream, entity_id_exprRead entity into scratch path
relationship_createcorerelationship, to_idCreate edge
relationship_removecorerelationship, to_idRemove edge
LOOKUP_FIELD(...)preflight (expr)Inline cross-stream field read

Next steps