factfactfactanchorfactfactnewappend-only

Tape as Context

Append, Anchor, Handoff, Fork/Merge
A unified context model behind bub.build, view source

Explore
00

Reading Path

01FactAppend02PhaseAnchor + Handoff03SessionSingle / Multi / Isolation04StrategyCompact / Summary / Memory05AdvancedFork / Merge
01

The Minimal Model

Four core primitives

TapeEntriesAnchorsIndexderivedViewExecutionnew entries
Tape
Chronological sequence of facts
Entry
An immutable fact record
Anchor
Logical checkpoint for state reconstruction
View
Task-oriented assembled context window
Invariants
01

History is append-only, never overwritten

02

Derivatives never replace original facts

03

Context is constructed, not inherited wholesale

02

Append

The sole operation that mutates facts — writing to the tape’s tail

WorkerTapeappend(entry_101)append(entry_102)append(correction_103)corrects 101; keeps 101[... 101, 102, 103]time
01

Order is trackable via monotonic IDs

02

Old facts cannot be modified in-place

03

Corrections are made by appending, not deleting

03

Anchor

A reconstruction marker, not a deletion point

e1e2A1discoverye4A2implemente6e7preservedrebuild from here
01

Full history preserved before the anchor

02

Rebuild from anchor, skip full scans

03

Anchors can carry structured state payloads

04

Handoff

A constrained phase transition

DiscoveryhandoffImplementhandoffVerifystate: { phase: "implement", summary: "Discovery complete." source_ids: [128, 130, 131], owner: "agent" }
01

Write a new anchor

02

Attach minimum inherited state

03

Shift execution origin past the new anchor

State Contract Example
{ phase: "implement",
  summary: "Discovery complete.",
  next_steps: ["Run migration", "Integration tests"],
  source_ids: [128, 130, 131],
  owner: "agent" }
05

Session Modeling

Defining the boundaries of context selection

A

Single Session

Entries share one timeline

Session Aturn 1turn 2turn 3turn 4...entries share one timeline
B

Multi-turn

Assembled from latest anchor

T1T2T3T4T5T6anchornot in default viewassembled on demand
C

Multi-session

Independent timelines; cross-session is opt-in

Session Atape A timelineSession Btape B timelineisolated by defaultexplicit cross-query(actively chosen)
06

Context Strategies

Three mechanism combos for compact, summary, and memory

Compact

problemContext exceeds the window limit

e1e2e3e4e5e6e7e8...preserved, not in viewdefault read sethandoff + anchor + selective view

key:compact ≠ delete history; shrink default read set

Summary

problemNeed a high-level overview for the next phase

e128e130e132anchor.state"Discovery is complete."source_entry_ids: [128, 130, 131]nextraw entries (jump back)

key:Summaries cite sources; hints only

Memory

problemRecall relevant facts across phases or tasks

TapeBuildIndex()Memory Index(derived index, not a copy)Query()EntryIDsLoadRaw()Raw Entriesreload raw facts after hit

key:Index failures ok; hits reload raw facts

07

Fork / Merge

Execution isolation & convergence — the most complex part

Main TapeFork Tapetimefork(at id=120)120append121122123merge(new entries only)main: ...120, 121, 122, 123append delta only, no rewrite
Why Complex
01

Merge appends deltas only — no mainline rewrites

02

Concurrent fork merge order affects entry ordering

03

Explicit conflict & dedup strategies required

08

Conclusion

Placing context problems back into this model yields a stable research framework

01Define Factstape / append02Phase Boundariesanchor / handoff03Assembly Strategycompact / summary / memory04Advanced Executionfork / mergea stable research framework