Beat 3

Fold

The reels the being needs are folded. Every Fact behind them collapsed into a current view. This is what the being sees.

What happens

Every aggregate in TreeOS, every being, every space, every matter, has its own reel of Facts. To know what a space currently looks like, you don't read a stored row. You take its reel and fold it. Start from an empty state, apply each Fact in seq order, end with the current state.

The fold engine does this fast. Each aggregate has a projection row that caches the last fold result; the next fold only reads Facts past the last marker, applies them, advances the marker. Hot path is one cache read.

What a being folds

A being folds its own self plus the space it stands in plus every occupant at that space. Beings, matter, child spaces. Reach is one hop. The being doesn't deep fold neighboring trees. If it moves into one, the next moment folds those reels too.

Orientation decides which axis of the fold the being walks. Forward looks at the world. Inward turns the fold on the being's own act chain instead. Half does both. Forward face plus a recalled set of past acts that touched the entities currently changing.

Why reads happen here

Reads-before-writes. The being acts (beat 4) only on what the fold returned (beat 3). Even if other beings are mutating the same space in parallel, this being's moment is decided by the face that was assembled here.

When two beings act on the same space at the same time, their new Facts land separately on the space's reel and the bump rules in the reducer adjudicate at fold time later. Nothing is locked. Nothing waits on anyone else's thinking.