Elffuss BraidHub

utopia-ia/elffuss-braid public

Changeset: 0cba57aa99aa
0cba57aa99aa Start elffuss-braid: object ids, braid hash-object, format and design docs KikoCis,
.github/
crates/
docs/
scripts/
.gitignore50 B
CONTRIBUTING.md1.7 KiB
Cargo.lock10.4 KiB
Cargo.toml683 B
LICENSE11.1 KiB
NOTICE160 B
README.md10.5 KiB
SECURITY.md1.2 KiB
deny.toml1.0 KiB

README.md

<img src="docs/assets/braid.svg" alt="Three strands braided together" width="320">

✳ Elffuss Braid

Version control for repositories where many agents land changes at the same time.

A from-scratch version control system in Rust. Creating a change costs what the change touches, not what the repository weighs. Landing on main is one short step per branch, with no repository-wide lock. Git stays at the edges, so GitHub keeps working.

License CI Rust Status

elffuss.com · Code · Claw · Translator · Copilot · Blog · Hugging Face · Dev log


In this repository: why braid · how it works · quick start · working with git · design · status · what is honest about this · credits


Why braid

Git was designed for people who work offline and sync now and then. Agents work differently: there are many of them, each change is small, they are always connected, and they all want to land on main at once. In git that shows up as:

  • Shared mutable state. One index per working tree, and a push that is rejected whenever someone else landed first, so every agent ends up in a fetch, rebase, push and retry loop.
  • Costs that grow with the repository. Status and commit walk the whole index, and a directory with many files is rewritten whole on every change.
  • Transfers built per client. Each fetch negotiates and builds its own pack, so a cache in front of the server cannot help.
  • Large files need a side system.

Braid starts from the opposite assumptions:

gitbraid
Unit of changea commit: a full tree snapshota changeset: the files that changed against the first parent, plus the root tree id
Landing on mainthe client pushes and is rejected if behindland rebases in one short serial step per branch, at a cost that follows the change
Many writersone index per working treeone workspace per agent over a shared append-only store; creating a change takes no repository lock
Fetchingnegotiated packs, unique per clientimmutable objects by id, so any cache (local daemon, nginx, CDN) can serve them
Large directoriesrewritten whole on every changesplit into content-defined nodes; an edit rewrites only its path
Large filesa separate extensioncontent-defined chunks, deduplicated across versions
HashSHA-1BLAKE3
For agentsparse human output--json everywhere; changes can be created through the API without a checkout

This is the design. Status says what exists today.

How it works

flowchart LR
    subgraph machine["One machine"]
        A1["agent 1 · workspace"] --> ST
        A2["agent 2 · workspace"] --> ST
        A3["agent N · workspace"] --> ST
        ST[("shared store<br/>immutable objects + op log")]
    end
    ST -- "land: one short step per branch" --> MAIN(["main"])
    ST <-- "objects by id" --> SRV["braid server (optional)"]
    ST <-- "import / export" --> GIT["git bridge"]
    GIT <--> GH["GitHub · Gitea"]
  1. Everything is an immutable object named by its BLAKE3 hash: file contents, directories, and changesets. Nothing is ever rewritten in place.
  2. A changeset records what changed against its first parent, plus the root tree it produces. History, blame and rebase read the short list; the root id commits to the whole repository.
  3. Landing is one short serial step per branch. If the change was built on the current head it fast-forwards. If not, braid rebases it path by path and merges only the files both sides touched. Conflicts come back as data that an agent can act on.
  4. Many processes share one store without a daemon. Segments are leased with locks the kernel releases if a process dies, objects are published before anything refers to them, and an append-only op log records every operation so it can be undone.
  5. The same API at every tier. A local store, a per-machine daemon, a cache and a server answer the same requests, so a client never cares which one it talks to.

Quick start

Today braid computes object ids. Everything else arrives milestone by milestone.

git clone https://github.com/KikoCis/elffuss-braid
cd elffuss-braid
cargo build --release
./target/release/braid --version
./target/release/braid hash-object README.md
./target/release/braid hash-object --json README.md

Ids can be checked with any BLAKE3 implementation, for example the reference b3sum tool:

b3sum --derive-key "elffuss-braid 2026 blob v1" README.md

Working with git

Repositories come in with their whole history and keep a git mirror.

  • braid git import reads a git repository through gitoxide. Each commit is exported again and compared with the original, so the round trip is bit for bit.
  • braid git export and braid git sync keep GitHub or Gitea up to date as a fast-forward with a lease. Braid never force-pushes.
  • Braid contains no code from git itself, which is GPLv2. It reads and writes git data with gitoxide (MIT or Apache-2.0) and runs the git binary only as a subprocess to push.

Design

  • Design overview: store, landing, workspaces, the git bridge, the server, and how it is tested.
  • Format v1: the exact bytes of ids, trees and changesets, with golden vectors.

Status and roadmap

MilestoneScopeState
0Public repository, CI, object ids, braid hash-object✅ done
1Format v1: canonical codec, trees (flat and split), changesets, name rules; then frozenin progress
2Local store and op log: many processes, crash-safe, fsck, undoplanned
3History and the git bridge: import, export, log, show, diff, blameplanned
4Many agents on one machine: workspaces, land, conflicts, git syncplanned
5Performance: deltas, chunking, derived indexes, benchmarks against gitplanned
6Server: lazy sparse clones, tokens, caching tiersplanned
7Daemon, virtual file system, WebAssembly coreplanned

Each milestone ships when its tests pass: golden vectors and fuzzing for the format, crash and many-process tests for the store, bit-for-bit round trips and differential tests against git for the bridge, deterministic simulation for landing.

What is honest about this

  • It is pre-alpha. Today it computes object ids and nothing else. Do not keep anything in it that you cannot afford to lose.
  • No performance claims yet. When benchmarks land they will be ratios against git on the same machine, with the script that reproduces them, never numbers nobody can check.
  • The format can still change until milestone 1 freezes it.
  • Braid is not Scion. It starts from the ideas Anthropic described in public about its own source control system. It is an independent implementation, contains no code from Anthropic, and is not affiliated with or endorsed by Anthropic.
  • Platforms. CI tests Linux and other Unix-like systems. Windows is not tested yet.

Part of Elffuss

Braid is part of Elffuss, a family of tools for building software with agents.

Prior art and credits

Contributing and security

License

Apache-2.0. Copyright 2026 UtopiaIA. See NOTICE.


En castellano

Braid es un sistema de control de versiones escrito de cero en Rust, para repositorios en los que muchos agentes aterrizan cambios a la vez.

  • Crear un cambio cuesta lo que toca el cambio, no lo que pesa el repositorio.
  • Aterrizar en main es un paso corto por rama, sin cerrojo global.
  • Git se queda en los bordes, así que GitHub y Gitea siguen funcionando.

Parte de las ideas que Anthropic contó en público sobre Scion, su sistema interno. Es una implementación independiente, sin código de Anthropic y sin relación con la empresa.

Hoy está en pre-alfa: solo calcula ids de objetos. Las fases dicen qué llega después y qué pruebas tiene que pasar cada una.