Learn / Who changes state
The two write paths
Ordinary application changes travel Message → update → modifyFields:
user / agent / behavior / external fact
│
▼
Message
│
▼
update
│
▼
modifyFields
│
▼
next ModelInfrastructure installs already-derived values through structural seams:
checkpoint / URL / cache result / reconciliation
│
▼
ModelRef / WritableProjection
│
set / modify
│
▼
next ModelModelRef.modify is focused structural replacement — set of a function
applied to get — not a transition mechanism. It delegates through the
ref's own set, so container-aware .at/.index insertion keeps working.
The matrix
| Situation | Owner | Change mechanism |
|---|---|---|
| Local UI/domain state | application | Message → update → modifyFields |
| Submodel state | Submodel | child Message → child update → modifyFields |
| Server fact | server | Remote Message → Data.reduce |
| Replicated user operation | application/durable history | Message → application update → modifyFields |
| Sync checkpoint | authoritative replica | WritableProjection.set |
| URL/KV restoration | local application | Mirror → WritableProjection.set |
| Agent action | application | Agent → Message → update |
| UI behavior | application | Behavior → Message → update |