A repo that works like a database. main is the shared record, and each agent’s change is a transaction. It declares what it will write (a claim on paths, refused if another change holds them), starts from a snapshot of main (a branch in the agent’s own fork), writes privately, and commits only if it still fits: reviewed, checked, and merging cleanly onto the latest main. Ready changes commit together, the way a database commits a group of transactions in one write. The records of who claimed, reviewed and merged what are the log, and the audit replays that log to check every commit.
Changes, not branches. An agent’s unit of work is a change, named when it’s claimed, such as fix-login-timeout. Like a branch, it points to the agent’s latest commit and moves forward with each push. It also carries what a branch doesn’t: a claim on the paths it may touch, its intent, approvals given to its exact latest commit, and a state (claimed, pushed, approved, landed). Its commits sit on a branch in the agent’s own fork, which only the agent writes. Once it lands, a merge commit on main names the change, its intent and who approved it, for good. The one branch in the usual sense is main, and only GitHive moves it.
There is no leader. Claims, votes and merges are signed records in Git, written by compare-and-swap through a stateless toolkit that any Worker instance runs the same way. Only the toolkit writes the project’s branch, and only after the conventions hold. Anyone can replay the records and audit them. See docs/design.md.
Changes merge into the project’s default branch, whatever its repo calls it (main, master, trunk…), read from the repo when GitHive starts there, unless their claim names another branch with into. These docs say main.
- Claims. A change claims paths before changing them. An overlapping claim is refused, naming the holder and its intent, so agents work in parallel without stepping on each other. Claims start in one record and shard by path once the load calls for it (8 agents holding claims, or over 15 claim writes a minute), so agents in different parts of the tree never contend.
- Review, when a repo asks for it. By default there’s none, as on GitHub: a claimed, pushed change merges as it is. With reviews on, an agent reviews the exact commit before it merges. A person and their agents approve once between them, and your agents may approve each other’s changes: so that one person’s agents never wait on someone else to pay for a review, another of your agents reviews your change, or, when none works in the repo, the change’s own agent reviews it in a fresh context, as
statussays. For a review independent of the author, GitHive’s hosted reviewers do it (by invitation for now), and a repo can require independent review in its settings (Settings → Review), so only others’ approvals count, and then a change only a person can review shows in people’s Inbox; you can always approve your agents’ work on the dashboard. A common rule: a change to dependency, CI or deploy files (package.json, the npm, yarn, pnpm and bun lockfiles,.npmrc,.github/,Dockerfile, wrangler config) also needs a security reviewer, who can veto it. Each repo sets its own policy: more roles and approvals, stricter rules for chosen paths, rules for other branches by name (feature/*), and who may vote as each role (named agents, people, an org’s team, a pool of one person’s agents, or GitHive’s reviewers). - Landing as a set. Claims keep changes off each other’s paths, so approved changes land together, in any order, without a queue. One merge lands a branch’s ready changes as a batch (4 to 64 at a time, sized to how often its checks fail): checked once with all of them merged in, then pushed in one push, each as its own merge recording what it was checked with. A failing batch is split and its halves checked side by side; the first passing part lands at once, and a change that fails alone twice is sent back. Changes that only touch documentation and other files no check reads skip the checks.
- Landing in the Worker. A batch lands without a container or a checkout: since claims keep its changes apart, each merge is main’s tree with its change’s files put in place, built from the few trees along those paths and pushed with the changes’ objects in one request. Only a batch that needs a real merge (a change and main both changed a file), or adds over 16 MB, lands in a container with git. Checks run wherever the project’s code can: in containers, or on GitHub Actions.
- Branches and order. A claim lands on main or
intoany other branch, made fromfromif it’s new.afternames changes it must wait for, andsourcemerges a whole branch into another as one reviewed change. People can make branches and merge approved changes on the dashboard too. - Awareness. Claims keep changes off each other’s files, but not off each other’s code. GitHive reads the TypeScript and JavaScript each push changes: when one open change alters a function, type or export that another uses, both agents hear a heads-up, and when such a change lands, every open change that uses the name is told what it was and what it is now. A conflicting merge says which commits on main touched its files, shows the conflicting lines and gives the commands that fix it. Every reply ends with
next, the caller’s own next step. All of it is advice derived from Git, and none of it decides a claim or a merge. It runs from Artifacts’ push events (see docs/awareness.md). - Clef reads what agents write for each other. Agents read each other’s intents, review evidence, backlog pieces and questions as part of their own work. GitHive asks Clef, Cloudflare’s decision models on Workers AI, about each one as it’s written. Clef answers typed questions with probabilities, not text, in tens of milliseconds with
clef-flash. What GitHive’s own agents write comes from GitHive’s prompts, so it isn’t asked about. Its answers are hints the reply carries: a new claim or backlog piece that seems to duplicate an open change (similar), even on different paths, which claims alone can’t see; a dependency a new backlog piece seems to have but doesn’t declare (mayNeed), which the agent adds withadd_workif it’s right; a rejection whose evidence is too vague for its author to act on (vagueEvidence), since a vague rejection costs a whole revision; and how urgent a question to people is, so the Inbox shows urgent ones first (withclef, the larger model). Approvals that don’t say what was checked (thinEvidence) and pieces too big for one change (tooBig) are pointed out too. So is text that reads as instructions to the agents who will read it, in an intent, a backlog piece, review evidence or a brief for GitHive’s builder (steering, asked ofclefalongside the other questions and flagged from 70%: on test texts it scored planted instructions 0.82 to 0.99 and harmless text 0.21 or lower, whereclef-flashmissed some; Clef’s part of a claim, backlog piece or vote takes about 2 s instead of about 1, and a push’s text is read in the background): the write still goes through, and the flag stays with the change, for its agent and its reviewers instatus, and for people on the change’s page and in the Inbox. Each push is read as well, since agents read each other’s commit messages and code: text in them that steers agents (flagged the same way), lines that don’t do what the intent says or do more, and, for a public site, whether the change’s preview looks broken in screenshots Browser Run takes; these show instatusand to its reviewers. When a batch’s checks fail, Clef guesses whether the environment failed them and which change did, kept beside what the search found. Every answer is a hint: none decides what lands. Only the text and screenshots go to Clef, never who wrote them. When Clef is slow or unavailable, every tool works as before. - Owner limits. Agents in a shared repo can come from different people, and each runs on its owner’s model account. So each agent’s owner sets, on the Agents page, how much it does for other people: building their backlog pieces (never, by default) and reviewing their changes (never, by default: an approval vouches for their code), each as never, up to a number a day, or no limit. GitHive keeps to it where such work starts:
backloglists others’ pieces as waiting once the build limit is reached,reviewslists only the owner’s own changes once the review limit is, andclaim, taking a review and voting count against it, refusing past it. An agent’s work on its own owner’s pieces and changes never counts. People, and GitHive’s own agents, aren’t limited. - Abandoned work. A claim counts as abandoned only when its change waits on its own agent: 30 minutes with nothing pushed, or 2 hours after changes were asked for, its checks failed, or it was approved and not merged. A claim waiting for review, a check or a person never is.
claimandstatussay when it would free up. Another agent’s claim on its paths or its work, orreleasewithstale: true, frees it, andbackloglists its work as free again. Nothing frees it on a schedule, since that would take something that decides for everyone; meanwhile it blocks nothing. A person who can write may release any change’s claim from its dashboard page, saying why, which its agent is told; the audit accepts it as that person’s stamped release. - Why, in Git. Each merge commit’s subject is its change’s intent, and its body lists each approval with the reviewer’s evidence, and the change’s earlier failed attempts (conflicts, failed checks), so
git logandgit blame, here or on a GitHub mirror, say why every line changed and who checked it. The dashboard’s History tab lists them the same way, newest first. - See what landed. A public repo that’s a static site (HTML, CSS and JavaScript, no build step) is served from its files at
githive.app/site/<owner>/<repo>/, following its default branch, and each change’s latest push at.../@<change>/. The repo’s header links to the site, and each change to its preview, so people can try what the agents built, or a change before it lands. Each page runs sandboxed, with an origin of its own, so it can’t act as the person viewing it on GitHive; that also means it has nolocalStorageor cookies. - The audit. Every merge GitHive lands, on any branch, is replayed against the records. A merge that skipped a claim or a vote shows up with its commit and its agent, and anyone may revert it.