Context from Tape
A unified fact model for long-running, multi-team work.
It also extends to observability, eval, and training.
Practiced in 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
Topic Threading
Each topic binds an anchor; repeats trigger recall
Context Strategies
Three mechanism Budugs for compact, summary, and fork-merge
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
Fork / Merge
problemNeed parallel exploration with controlled convergence
key:Merge appends deltas only; no mainline rewrites
Memory
Complex memory assembled from anchor graphs
Anchors can form non-linear graphs, not a single timeline
Memory views assemble from multiple nodes, guided by policy
Graph structure requires explicit lineage and provenance
Teams
Teams coordinate via shared tapes and cross-tape views.
Shared Tape
Multiple agents append the same tape; entries keep their origin
Append-only; ownership remains traceable
Cross-Tape View
Teams read each other's tapes via views to coordinate
Views are assembled; tapes remain isolated
DAG Workflow
A topic automation model split into task semantics, behavioral constraints, task description, and runtime truth
Here, Task is a special View Assembler: one task maps to one topic, assembling Task Schema, Task Config, Task Harness, and Task Description into a runtime-executable view; each DAG Node maps to one turn boundary inside that topic.
Task Schema
Declares task structure: node boundaries, dependencies, artifact contracts, and task presentation.
It answers which structure this task runs through.
Task Config
Holds stable task-level configuration such as defaults, business rules, target environments, and external system constraints.
It answers which rules this task runs with.
Task Description
Captures one task's business brief, scope, interpretation, delivery preference, and human confirmation.
It answers what this run should do.
Task Harness
Constrains executable agent behavior, for example with scripts/*.feature files that fix acceptance boundaries, run paths, and forbidden moves.
It answers what the agent must do and must not do.
Runtime Source of Truth
After topic creation, runtime owns the authoritative projection; DAG anchors only record summaries, audit events, and lookup checkpoints.
Read runtime snapshots for state; read DAG anchors for boundary events.
Appendix
Four extensions: access control, observability, eval, and training.
Access Control
If each tenant owns a database and tape is just one table inside it, the database and table already define the isolation boundary. Auditing a child account only needs explicit read access to the target tape table or a read-only view.
Keep the database objects themselves as the source of truth. Audit access should use constrained read-only roles instead of reusing the owner identity.
Observability
Tape can retain sessions, tool calls, and runtime events. The same append-only facts can power replay in the UI or let bub explain what happened.
Context assembly and observability consume the same append-only tape, and every outlet is built from derived views. So besides the UI, you can ask bub directly.
refbub architectureEval
Slice by anchor, replay history, inspect decisions, then write scores and labels back as derived facts.
Show the path and decisions to people first, then append derived annotations.
refPhoenixTraining / RL
Tape works with frameworks such as AReaL: slice by anchor, attach rewards, and export trajectories.
The training layer should consume tape exports, not replace tape as the raw record.
refopenclaw exampleConclusion
Placing context problems back into this model yields a stable research framework