Repository navigation
Epic: trigit -- our own git as the swarm's nervous system (claims, region holds, mailboxes, events, verdict notes, merge drivers, trigit verbs for every agent) #11385
Description
Owner, 2026-10-20: "can we now use git itself to synchronise the swarm of agents? Make it a useful tool for the agents; find every conceivable and inconceivable option; a deeply thought-through epic."
Name
Our own git is trigit (owner, 2026-10-20): the golden chain (tri golden), the swarm refs, notes and merge drivers below, and the trigit verbs. GitHub is its mirror. Every spec, skill, doc and UI calls it trigit.
Why git
Every agent already speaks git, git is content-addressed, append-only, offline-capable, signed, and git update-ref <ref> <new> <old> is an atomic compare-and-swap. The golden chain (specs/queen/golden_chain.t27, tri golden, first links landed 2026-10-20) proved the pattern: verify locally, land by CAS, talk to GitHub once per batch. Today's stalls that git can remove: 135 PRs waiting on the CI queue, a personal token throttled to ~5 min per call, 190 tasks blocked by whole-file holds, a Queen that could not be redeployed (Railway trial expired), stale seals refusing 27 of 32 waiting PRs, sandboxed agents with no working gh.
Principle: GitHub becomes a mirror and a window; the swarm's truth lives in our own git (refs, notes, objects) on our machines, every rule of its use is a tested .t27 spec (DRY with specs/git/, specs/queen/), and every agent uses it through one tool: trigit ... verbs and the same verbs as TRI CLAW MCP tools.
Layer 0 -- the store (our own remote)
- Own remote on our machines: a smart-HTTP/ssh git endpoint served by the T27 OS host (and later by TRI NET hosts); GitHub is a push mirror fed by
tri golden push. Agents fetch from the nearest host. - Shared object store: one object database per machine, worktrees and lanes use
alternates; no per-lane clone (today's disk crisis: lane trees filled 5 GB). - Sparse + partial lanes: a lane checks out only its Boundary paths (sparse-checkout cone) with blobless partial clone; seconds to start, megabytes on disk.
- Bundles over TRI NET:
git bundleas transport for offline hosts, FPGA bench hosts and contributors behind NAT; a bundle is signed and its refs verified before import. - Mirrors per region: hosts mirror the chain; the nearest serves fetches; the Queen's chain head is the only writer of refs/golden/*.
Layer 1 -- refs as the coordination fabric (every write is a CAS)
- Claims:
refs/swarm/claims/<issue>created with old=000 -- exactly one winner, no API call, no comment race (replaces "bee claims branches" convention). - Region holds:
refs/swarm/holds/<path-hash>/<fn>perpath :: fn NAMEregion (specs/queen/holds.t27); two lanes on one file but different fns both win; the whole-file hold exists only when the Boundary names a file without a fn. - Leases and heartbeats: each lane advances
refs/swarm/alive/<lane>every tick; a hold whose lane stopped beating for N ticks is released by rule (specs/queen/drain.t27, waits.t27), so no dead claim blocks work for hours. - Mailboxes (actors):
refs/swarm/mail/<actor>is a chain of commits; send = append a commit by CAS; receive = fetch + walk; this is the BEAM mailbox of specs/queen/actors.t27 made durable and replayable across machines. - Event log: the Queen's event bus (specs/queen/events.t27) as an append-only ref; subscribing = fetch; replay = log since X; the dashboard and the T27 OS H/Q pages read it, nothing polls GitHub.
- Fan-out / join: children of a decomposed task push to
refs/swarm/fanout/<parent>/<child>; the parent's join rule (specs/t27os/fanout.t27) fires when all are present and merges them in one octopus/merge-tree commit -- results gathered back to the initiator, as the owner asked. - Board as refs:
refs/swarm/board/<column>/<issue>; a card move is a ref rename; kanban (specs/t27os/kanban.t27) reads refs, GitHub labels are a mirror.
Layer 2 -- knowledge in git (so no agent redoes work)
- Verdict cache in notes:
refs/notes/verdictskeyed by tree or spec blob hash: tests, seals, synth numbers; same content -> same verdict, reused by every agent (extends the verdict-reuse epic EPIC: verdict reuse in the language -- rebuild only what is not yet verified #8095). - Shared conflict memory: a swarm-wide rerere cache under
refs/swarm/rerere; a conflict one agent solved is solved for all. - Experience log:
.trinity/experienceand lessons as notes on the commits they explain; agents query "why was this done" bygit notes show. - Structured trailers: every swarm commit carries
Lane:,Agent:,Model:,Key-provider:,Tokens:,Verdict:,Closes:; analytics, PROVIDER_FEE accounting (Contributed client keys: the Queen and the owner manage work on them; contributors earn PROVIDER_FEE in TRI credit for verified work #11339) and the star map (Star-sky map: every TRI NET device and every spec author (GitHub avatar, constellation of their specs) on the M page and t27.ai; gamification of collective work #11381) read them, nothing is typed twice. - Signed identity: each agent and contributor signs with its own ssh key; attribution and TRI credit follow signatures (specs/network/identity.t27, attribution.t27); unsigned work is not credited.
- Co-change graph:
git logco-change statistics predict a task's real Boundary before it starts, so holds are right the first time.
Layer 3 -- merging that removes waiting
- .t27 merge driver: a
.gitattributesmerge driver that merges .t27 files by fn/const/test blocks (golden_chain.t27 section 5, gc_region_step): two edits in different fns of one spec never conflict; this is what frees the 190 blocked tasks. - Derived-file drivers: seals re-saved (REGEN), ledgers union-merged, sorted JSON registries merged by key, gen/ regenerated -- a derived file never blocks a merge.
- Speculative lanes: for a hard task several cheap lanes try variants on branches; the judge keeps the best by its verdict; the losers are deleted (cheap with free tiers).
- Automatic bisect: a red head starts
git bisect runwith the failing test; the culprit link is reverted or sent back to its lane; master stays green without a human. - Range-diff review: re-pushed lanes are reviewed by
git range-diff, so a reviewer bee judges only what changed.
Layer 4 -- tools for agents (the useful part)
trigit claim | hold | release | beat | send | recv | join | board | verdict | land-- one verb per act above, argv glue over the specs; every verb prints what it did and the ref it touched.- The same verbs as TRI CLAW MCP tools (specs/t27mcp/tool_schema.t27), usable from Claude Code, Codex, OpenCode, Crush, Gemini, Cursor -- no personal GitHub token needed.
trigit status-- one screen: my holds, my mailbox, my lanes' heartbeats, verdicts I can reuse, what blocks me and who holds it.- T27 OS pages: H (hook/event timeline from the event ref), Q (Queen board from refs), K (kanban from board refs), P (pulls = golden links), M (star map from signatures and trailers).
Layer 5 -- inconceivable (worth a spike)
- trigit in .t27: the object model, refs CAS, pack reading and merge-tree written in .t27, compiled by t27b -- runs inside T27 OS, on TRI NET hosts with no git installed, and its hot core (SHA, CAS, region compare) as an FPGA layer of the matryoshka.
- Hardware CAS: the AX7203 holds the golden head register and answers CAS over UART/JTAG -- a physical single writer for the chain.
- Proof-carrying commits: a commit carries its verdict proof (seal hashes, test counts) in a note signed by verifier quorum (specs/network/quorum.t27); landing checks the proof instead of re-running.
- Time-travel debugging of the swarm: replay the event and mail refs into the simulator (specs/queen/simulation.t27) to see why the swarm stalled.
- Git-native consensus for TRI NET: hosts agree on the chain head by signed votes in notes; the chain is the ledger of verified work that TRI credit statements commit to.
Phases (each a sub-issue in the 4-heading shape, P0 first)
- P0 (days): claims + region holds + heartbeats as refs (6, 7, 8); .t27 and derived merge drivers (19, 20); verdict notes (13);
trigit claim/hold/release/status+ MCP (24-26). Measure: blocked tasks, bee utilisation, time to land. - P1: own remote + alternates + sparse lanes (1-3); mailboxes, event ref, fan-out join (9-11); trailers + signatures (16, 17); board refs (12); auto-bisect (22).
- P2: bundles over TRI NET (4, 5); rerere and experience notes (14, 15); co-change Boundary prediction (18); speculative lanes (21); range-diff review (23).
- P3 (spikes): git tri in .t27 (28), hardware CAS (29), proof-carrying commits (30), replay (31), consensus (32).
Success criteria for the epic
- blocked-by-held-files < 10 (from 190); idle bees ~0 while P0/P1 issues wait; median issue-to-land time measured before/after with the command that measured it; GitHub API calls per landed change measured before/after; zero lost work on a dead lane (heartbeat release); every rule above has a .t27 spec with tests.
Related: #11275 (T27 OS), #11340 (TRI CLAW social), #11360 (golden under the App), #11361 (REGEN, done in #11379), #11377 (Queen off Railway), #11382 (TRI CLAW from today's stalls), #9021 (whole-file holds), #8095 (verdict reuse), #9029 (golden chain MVP).
Activity
github-actions commentedon Oct 20, 2026
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
- specs/x.t27); without it the Queen reserves nothing and no bee can take the issueFR-001: ... MUST ...[-]Epic: git as the swarm's nervous system -- claims, region holds, mailboxes, events, verdict notes, merge drivers and tri swarm verbs for every agent[/-][+]Epic: trigit -- our own git as the swarm's nervous system (claims, region holds, mailboxes, events, verdict notes, merge drivers, trigit verbs for every agent)[/+]