Atom map
Cheatsheet for the atom kinds. Tables only.
| Kind | Purpose | Examples |
|---|
| Ref | address atom | user_ref, config["theme"] |
| Interaction | the work (Query / Command / Action / Flow / Span) | Add, Store, Pop, ForEachDo, Retry |
Mutation is attributed via Ref-child slot annotations on parent atoms. "Contributes" = what an atom of this kind contributes through its own slots; subtree set unions contributions across descendants.
| Kind | Contributes | Yields | Children |
|---|
| Query | any | one or N values | Queries only (may include Actions) |
| Command | at least one WRITE | nothing | Queries only (may include Actions) |
| Action | at least one WRITE | one or N values | Queries only (may include Actions) |
| Flow | none | nothing | ≥1 mutating atom (Command or Action) + Q params |
| Span | forwards body's | forwards body's | one body (any Nu) + auxiliary Queries |
Span is transparent: it wraps any Nu - Ref, Query, Command, Flow, or another Span - and yields what its body yields in the same shape and protocol. The Span atom is always a Span; parents slot-fit it by looking through to the body's yield, not by re-typing.
| Sub-shape | Yields | Examples |
|---|
| ScalarQuery | one value | Literal(5), Add, Eq, ref.fetch(), Collect, First |
| StreamQuery | N values | Map, Filter, Take, ItemsOf, KeysOf, ForEach |
| Sub-shape | Yields | Examples |
|---|
| ScalarCommand | nothing | Store, Copy, Append, Delete |
(No StreamCommand: Commands yield nothing, so the scalar/stream split doesn't apply.)
| Sub-shape | Yields | Examples |
|---|
| ScalarAction | one value | Pop, Swap, Take, Create |
| StreamAction | N values | Drain, DeleteReturning, Consume |
(Action mirrors Query's scalar/stream split: a single atomic mutate-and-yield, one value or many. A scalar consumer of a StreamAction must reduce it, same as a StreamQuery.)
| Sub-shape | Children | Examples |
|---|
| Strategy | mutating atoms (Command or Action) only | Sequential (>>), Parallel (|), Race, Gather |
| Control | mutating atoms + Query params | IfDo, ForEachDo, WhileDo |
| Sub-shape | Governs | Mechanism | Examples |
|---|
| Bracket | lifecycle | before / after / after_failure | Snapshot, Transaction |
| Policy | execution | re-run / fall back on failure | Retry, TryCatch |
| Effect | Meaning | Observable? |
|---|
| READ | materialize value from Context | no |
| WRITE | transform the Context | yes |
(Atoms with no effects are pure.)
| Role | What the parent does | Effect | Example position |
|---|
| read | reads the value at the address | (ref, READ) | operand |
| write | writes a value to the address | (ref, WRITE) | mutation slot |
Rows are parents, columns are children. Cells: ✓ accepted, ✗ rejected.
| Ref | ScalarQ | StreamQ | ScalarC | ScalarA | StreamA | Strategy | Control | Bracket | Policy |
|---|
| Ref | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| ScalarQ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| StreamQ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| ScalarC | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| ScalarA | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| StreamA | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ |
| Strategy | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Control | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Bracket | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Policy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |