Saltar al contenido
← Back to projects

~/proyectos

Hebra

Version control for repos where people and many coding agents work at the same time. It does everything Git does, talks to Git remotes and has its own server and web hub.

RustTypeScriptNext.jstree-sitterPostgreSQLNATSMCP

problem

Git was built for people taking turns. Agents don't take turns. Running several coding agents on the same repo, I kept hitting the same walls: agents overwriting each other, conflicts that stop everything, index.lock, interactive credential prompts, CRLF/LF noise and generated files sneaking into commits.

architecture

A Rust workspace. hebra-core holds the content-addressed object store (Merkle trees with BLAKE3 and delta-compressed packs), the working copy, merge and the operation log. hb is the CLI and also an MCP server. hebra-server is an axum HTTP API with identity, per-agent mandates (Biscuit), reviews, tasks and checks, backed by PostgreSQL, NATS JetStream and S3 storage. The Next.js web hub shows history with the agent behind every change.

decisions

  • ›No staging area: the working copy is the change. An agent never has to manage an index it doesn't understand.
  • ›Commands don't take locks. They read the state, do their work and publish in one short transaction; if someone else published meanwhile, both results are merged. With 500 agents in parallel: 1,500 commands and 0 failures.
  • ›Conflicts are stored as data and work carries on. Merge is structural with tree-sitter (18 grammars, 30 with extra-grammars) and rename-aware.
  • ›Every change carries its provenance: person, agent, task, session and prompt. On export to Git it travels as commit trailers.
  • ›Credentials you can narrow offline: a person hands each agent a mandate with a TTL that can never move protected branches.
  • ›Every command takes --json with stable error codes, and hb mcp serves Hebra over the Model Context Protocol.

diagrams

// architecture

// parallel commands without locks

links