Operations
Rule operations are invoked as - op: name inside a rule’s then block. Each operation is documented on its own page with phase constraints, parameters, and examples.
Execution order: preflight → core → (ledger commit) → side_effects.
By phase
Preflight
Read-only validation. Abort with reject.
Core
Primary state mutations and ledger-participating emits.
setaddsubunsetmergepushremovefilterfindmapsortcloneemitemit_eachrelationship_createrelationship_removelockunlockiffor_eachstopcontinue
Side effects
Fan-out after commit — no direct state writes.
Quick matrix
| Op | Preflight | Core | Side effects |
|---|---|---|---|
set | — | ✓ | — |
add | — | ✓ | — |
sub | — | ✓ | — |
unset | — | ✓ | — |
merge | — | ✓ | — |
push | — | ✓ | — |
remove | — | ✓ | — |
filter | — | ✓ | — |
find | ✓ | ✓ | — |
map | — | ✓ | — |
sort | — | ✓ | — |
clone | — | ✓ | — |
reject | ✓ | — | — |
emit | — | ✓ | ✓ |
emit_each | — | ✓ | ✓ |
submit | — | — | ✓ |
schedule | — | — | ✓ |
decision | — | — | ✓ |
lookup | ✓ | — | — |
relationship_create | — | ✓ | — |
relationship_remove | — | ✓ | — |
lock | — | ✓ | ✓ |
unlock | — | ✓ | ✓ |
if | ✓ | ✓ | ✓ |
for_each | ✓ | ✓ | ✓ |
stop | ✓ | ✓ | ✓ |
continue | ✓ | ✓ | ✓ |
Next steps
- actions — declare rules and phases
- Expressions —
expr,value, andLOOKUP_FIELD - Intents: Rules — worked examples across phases