Tape as Context
Append, Anchor, Handoff, Fork/Merge
A unified context model behind bub.build, view source
Reading Path
The Minimal Model
Four core primitives
History is append-only, never overwritten
Derivatives never replace original facts
Context is constructed, not inherited wholesale
Append
The sole operation that mutates facts — writing to the tape’s tail
Order is trackable via monotonic IDs
Old facts cannot be modified in-place
Corrections are made by appending, not deleting
Anchor
A reconstruction marker, not a deletion point
Full history preserved before the anchor
Rebuild from anchor, skip full scans
Anchors can carry structured state payloads
Handoff
A constrained phase transition
Write a new anchor
Attach minimum inherited state
Shift execution origin past the new anchor
{ phase: "implement",
summary: "Discovery complete.",
next_steps: ["Run migration", "Integration tests"],
source_ids: [128, 130, 131],
owner: "agent" }Session Modeling
Defining the boundaries of context selection
Single Session
Entries share one timeline
Multi-turn
Assembled from latest anchor
Multi-session
Independent timelines; cross-session is opt-in
Context Strategies
Three mechanism combos for compact, summary, and memory
Compact
problemContext exceeds the window limit
key:compact ≠ delete history; shrink default read set
Summary
problemNeed a high-level overview for the next phase
key:Summaries cite sources; hints only
Memory
problemRecall relevant facts across phases or tasks
key:Index failures ok; hits reload raw facts
Fork / Merge
Execution isolation & convergence — the most complex part
Merge appends deltas only — no mainline rewrites
Concurrent fork merge order affects entry ordering
Explicit conflict & dedup strategies required
Conclusion
Placing context problems back into this model yields a stable research framework