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
| Phase | Operations |
|---|---|
| Preflight | reject, if, lookup, find, for_each, stop, continue |
| Core | set, 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 effects | emit, emit_each, submit, schedule, decision, lock, unlock, if, for_each, stop, continue |
Mutation ops (core)
| Op | Required | Optional | Notes |
|---|---|---|---|
set | path, value | if_missing, target_stream | Set field to value |
add | path, value | cap: {max, min}, if_missing | Add to numeric field |
sub | path, value | cap: {max, min}, if_missing | Subtract from numeric field |
unset | path | Remove field | |
merge | path, value | Shallow merge into object |
Array ops (core)
| Op | Required | Optional | Notes |
|---|---|---|---|
push | path, value | Append element | |
remove | path | where (string) | Remove matching elements; it iterator |
filter | path, where (string) | Keep matching; it iterator | |
find | path, where (string), as | Bind element to variable | |
map | path, as, value | Transform elements | |
sort | path, by | Prefix - for descending | |
clone | path, as | Deep copy to variable |
Validation ops (preflight)
| Op | Required | Optional | Notes |
|---|---|---|---|
reject | code | message | Abort intent — use in preflight |
Side effect ops (side_effects)
| Op | Required | Optional | Notes |
|---|---|---|---|
emit | event_type, payload | target_stream, target_entity | Also allowed in core |
emit_each | from, event_type, payload | target_stream | Also allowed in core |
submit | intent_type, payload | target_stream, target_entity | Side effects only |
schedule | delay_seconds | event_type or intent_type | Side effects only |
decision | ref | input | AI decision — side effects only |
Control flow (all phases — nested ops must match phase)
| Op | Required | Notes |
|---|---|---|
if | expr, then | Optional else |
for_each | for_each, then | Iterator: item |
stop | Halt current rule / break loop | |
continue | Next for_each iteration only |
Cross-stream & relationships
| Op | Phase | Required | Notes |
|---|---|---|---|
lookup | preflight (validation) | into, stream, entity_id_expr | Read entity into scratch path |
relationship_create | core | relationship, to_id | Create edge |
relationship_remove | core | relationship, to_id | Remove edge |
LOOKUP_FIELD(...) | preflight (expr) | — | Inline cross-stream field read |
Next steps
- DSL Operations — surgical reference for every
op: - DSL Overview — complete platform reference