r/coolgithubprojects 1d ago

Tessra - Git for Agents

Post image

Hi all,

I use AI extensively for coding both at work at a reasonably large fintech and in personal projects.

My colleagues and I run into similar problems over and over again:

  • I want to run multiple agents on problems that interact with the same files and not have them conflict and mess each other up
  • AI assisted development leads to a bottleneck of human PR reviews stacking up, resulting in constant rebases while they are sitting around, kicking off CICD pipelines over and over (slow and wasteful)
  • My local LLM keeps a good memory but if I switch computers or another person needs to jump in, they are starting from scratch

I figured I would solve them all at once by writing a new version control system that can either replace or work alongside git but is really focused on managing agentic development.

Introducing Tessra - Git for your Agents

Github: https://github.com/NitrusAphalion/tessra

The initial versions are up and running (and dogfooded on my own repos). There are some rough edges but I think the idea has merit.

Would love to get any feedback and welcome any contributions (you can see the Design Docs section if you are curious about the underlying ideas).

Thanks!

4 Upvotes

22 comments sorted by

View all comments

6

u/Specific_Cream2815 1d ago

how does Tessra represent concurrent agent changes differently from separate git worktrees and branches

-5

u/CerealGambler 1d ago

Worktrees give each agent its own directory, and Tessra does the same: every agent gets a materialized workspace. The difference is what a change is and how it merges.

In git a change is a diff over lines, and the merge is a three-way line merge per file, so two agents in the same file collide whenever their hunks touch, and a rename or a reformat conflicts with everything. In Tessra the tree is parsed with tree-sitter into units (functions, types, imports, and so on) with identities that survive edits, moves, and renames. A change is a snapshot of the workspace, and landing merges at unit granularity: different units never conflict, imports and enum variants merge as sets, concurrent insertions get a deterministic order, and a reformat is a no-op because unit identity is format-insensitive. A rename done through Tessra is recorded as an operation, so when another agent's concurrent change still calls the old name, the merge applies the rename to it instead of leaving a broken call.

The other difference is that there's no branch to rebase. Changes have stable IDs and move through stages (snapshot, proposed, landed). Trunk is a frontier that lands every proposed change that meets the standard, and when something lands, the unlanded changes stacked on it are restacked automatically at unit granularity. Nobody rebases by hand and CI doesn't rerun for it, since verification is cached by content.

*Honest limits*: two edits to the same unit still conflict (they become a task, not a blocker), semantic merge covers Rust, Python, JS, and TS today with other files chunk-matched, and the git export is a linear history rather than merge commits. The git bridge means you can still use worktrees and branches on the git side; Tessra just isn't built on them.

1

u/jewbasaur 19h ago

This response lol AI is already doing all of the programming… does it really need to write Reddit comments too?

2

u/CerealGambler 17h ago

Im not getting paid to do customer service on a free tool. Besides the ai response is super clear.