ReferenceOperations ReferenceOverview

Operations Reference

A rule runs operations from a then block: - op: name. Preflight runs before any write. Core updates entity state. Side effects run after the ledger commit.

lookup is included. It is a real read operation, alongside find.

State

Write fields on the current entity.

OperationWhat it does
setSet a field to a value
addAdd to a number
subSubtract from a number
unsetRemove a field
mergeMerge fields into an object

Collections

Read or reshape a list or a nested value.

OperationWhat it does
pushAppend to a list
removeRemove matching items
filterKeep matching items
findRead one matching item
lookupRead a field from another entity
mapTransform each item
sortOrder a list
cloneCopy a value

Control flow

OperationWhat it does
ifRun a branch when a condition holds
for_eachRun a block for each item
stopStop the current loop or rule path
continueSkip to the next item
rejectFail the intent and write nothing

Events and workflows

OperationWhat it does
emitAppend one event
emit_eachAppend an event per item
submitSubmit another intent
scheduleSubmit an intent later

Relationships and concurrency

OperationWhat it does
relationship_createCreate an edge
relationship_removeRemove an edge
lockHold a named lock
unlockRelease a named lock

AI

OperationWhat it does
decisionRecord a model decision on the timeline

decision belongs in side effects. It does not replace emit, submit, or schedule.

Phase rules and parameters for each operation are on the operation page. The language around those operations is the DSL reference.