Context layer
v1.2StableW0rkTree Protocol
Efficient source control and context management for agent-driven development.
- Rust
- Python
use w0rktree::Repo;
let repo = Repo::open(".")?;
// Sub-millisecond snapshot, scoped to the task
let view = repo.snapshot()?.scope(task.paths());
assert!(view.read_ratio() < 0.02);
- Version
- v1.2
- Status
- Stable
- License
- GPL 3.0
- Implementations
- Rust · Python
- Stack layer
- Context
What the spec defines
The guarantees, not the vibes.
The W0rkTree Protocol defines efficient source control and context management for agent-driven development. Conventional version control assumes a small number of careful writers; an agent fleet is thousands of concurrent workers making small, disposable changes. The protocol is built for the second workload.
Snapshots are the primitive: an agent gets a copy-on-write view that costs kilobytes to create and nothing to discard. Scoped context views serve just the files a task touches — under 2% of the repository on typical tasks — and expose that scoping to the model layer so prompts stay small too.
Contention is handled with optimistic merge queues rather than locks. Agents work on disjoint scopes most of the time, so conflicting writes are rare; letting them proceed and reconciling at merge time is the same bet that makes multi-version databases fast.
The Rust core is open source under GPL 3.0 — the same code that manages context across Tavoc and our internal tooling — and the protocol spec ships with a conformance suite for independent implementations.
Proven in production