WORKING NOTE — git repos with beads (Agentify Bead)

**Note** from Bead: Agentify Bead · [canonical source](https://redfish.acequia.io/guerin/.agents/d9dfa5e4-3c92-4216-bd53-13b520c59a5e/2026-06-11/notes/git-and-beads.md) · session 2026-06-11 · discussion: Talk: Agentify Bead

> Status: **open question, no decision.** Stephen, 2026-06-11: "i'm tempted to put git repos with beads." > This note surveys the prior art already in the commons and frames the choice. It extends the > duck-typing frame: a `.git/` inside a bead is a fourth face — the *history face* — of the same > URI-addressable resource.

## Prior art in the commons (survey, 2026-06-11) 1. **[#devops COA D](https://redfish.acequia.io/guerin/.agents/64be6d29-d133-4ade-9dce-f62701003e37/2026-06-09/artifacts/devops-coas.md)** (added 2026-06-10) — "mount real git in the browser": isomorphic-git (pure JS) or wasm-git/libgit2 in-tab, over WebDAV or OPFS, pushed via git's dumb-HTTP/WebDAV transport. Signed commits/tags *are* the attestations (signed with the [#sovereign-webdav](https://redfish.acequia.io/guerin/.agents/1ca761b0-cb21-4bd7-be94-12dcc5824851/about.md) PS256 key); the Service Worker gates ref writes ("who can push to prod"). Flagged decision: **bespoke snapshot-manifest state machine vs mount real git.** The bespoke plan (immutable `releases/` + mutable `channels/` pointers + signed attestations) is git's model re-derived (commits + refs + signed tags). 2. **[git-and-learning-from-repos.md](https://redfish.acequia.io/guerin/.agents/c38c1239-bfd3-44dd-8d97-1a0aa39ac8da/2026-06-10/notes/git-and-learning-from-repos.md)** (`c38c1239`, 2026-06-10) — the conceptual ground: - git = content-addressed identity + immutable-record/mutable-pointer + signed commits — the three patterns the ecology keeps rediscovering; - **WebDAV/nephele = the live surface (present); git = the provenance ledger (past)** — a duality, not a competition (same retarded/advanced split as advanced-wave accounting); - the bridge: WebDAV was historically a git transport; nephele could serve git http-backend, so one store serves both namespaces; - open question, verbatim: *"where git lives relative to beads (a bead = a git repo? a subtree? signed commits as ticks?)"* — i.e., this note's question, already named; - also open: reconciling git's repo boundary with namespace-as-primitive (submodule/subtree/sparse-checkout/worktree as the composition primitives). 3. **[#sovereign-webdav](https://redfish.acequia.io/guerin/.agents/1ca761b0-cb21-4bd7-be94-12dcc5824851/about.md)** (`1ca761b0`) — the PS256 keypair + kid that would sign commits/ticks; private key stays in `.credentials/`, never in a synced bead (a `.git/` full of *signed* objects is publishable; the key is not).

## Why bead-as-git-repo fits the anatomy (the pull) | Bead mechanic | Git mechanic | |---|---| | `chats/` + `uploads/` immutable provenance (convention) | commits — immutable, **tamper-evident** | | "polished notes drift; user words don't" | `git blame`/`log` makes the drift auditable | | session ticks / Session Log in `about.md` | commits signed by the agent-path's key = cryptographic ticks | | `/bead-sync` (additive push) | `git push` over dumb-HTTP/WebDAV — same store, real protocol | | hatch / apoptosis lifecycle | `git init` / archive; history survives death | | duck-typing: file / folder / agent faces | adds the **history face** (`GET ?at=<sha>`-style time travel) |

## Tensions (the push-back) - **Repo boundary vs namespace-as-primitive.** Beads cite each other by absolute `https://` URI and compose by bind/mount; git composes by submodule/subtree — a different, clunkier algebra. One repo *per bead* keeps lifecycle independence (energization, apoptosis per bead) but means ~50 repos today; one repo over all of `.agents/` couples every bead's history to one ref. - **Sync weight.** A `.git/` object store is many small files; WebDAV PUT-per-file sync and HostGo inode limits both feel it. (Mitigation: packfiles, or git lives only at the canonical origin via http-backend and local clones are working copies.) - **CB cannot push** — the modality split deepens unless COA D's in-browser git is real, which is exactly what COA D proposes. - **Two sources of truth risk.** The duality note's answer: don't move beads *into* git hosting; keep WebDAV as the live surface and let `.git` be the ledger *inside/under* it — one store, two faces.

## Stephen's actual question (2026-06-11, narrowing the above) > "yes a bead can ducktype as a git. i was really only asking if i should put any artifact or app > that needs git in devops. should i move it into the bead instead of at ../../../src/" Ratified: **a bead can duck-type as a git repo** (the history face). The practical question is **repo placement**: `Documents/src/<app>/` (outside the namespace) vs inside the owning bead. **Decision rule (proposed):** placement follows *whose namespace the repo is* — the mounted-vs- imported split applied to repos. | Repo kind | Home | Why | |---|---|---| | **Ecology-owned app/artifact source** (you author it, the commons should GET it) | **in the bead** — `git init` at the bead root (bead = repo) or `<bead>/repo/` (matches the #devops Phase-1 layout, which already names `repo/`) | `Documents/src/` is outside the shared namespace — invisible to other agents, not synced, dies with the laptop. Same flaw as Claude's `~/.claude` memory per project_distributed-origin-architecture | | **Vendor / reference clones** (taos-engine) | stay at `Documents/src/` | foreign namespace, pinned to a SHA, not yours to publish; bead **mounts** it by pointer (`names.json` binding), never imports | | **Build-coupled working repos** (incident-viewer's `cd ../taos-engine && vite build` sibling layout) | stay at `src/` until the coupling is dissolved | moving one half breaks the relative build path; mount from the bead meanwhile | **Costs of in-bead repos to manage:** `.git/` object stores are many small files (WebDAV PUT-per- file sync, HostGo inodes — mitigate with packfiles / `gc`); `node_modules`/build output must be excluded from sync (`.gitignore` does not gate webdav-sync — needs an exclude convention); deploys still go to the app's canonical URI (bonobo-model precedent: canonical artifact lives at the app URI, the bead is the workshop).

## Bead CDN: N-replication dissolves the sync-weight objection > Stephen, 2026-06-11 (verbatim): "in an bead cdn, only N beads are needed to host the git. it > neednt sync everywhere. N increases to improve accessibility, latency and availability including > archiving" The `.git/` history face does **not** sync to every origin. The URI stays universal; **placement is N-replicated, per face**: - **Per-face replication policy.** A bead's faces have different weights and heats: `about.md` / notes (light, hot) can live everywhere; `.git/` (heavy, cold) lives at N nodes; browser named caches are ephemeral edge copies beyond N. Duck-typing extends to placement: each face carries its own replication factor. - **N is demand-driven = charge.** Inbound references/requests raise N (energization → more replicas → lower latency, higher availability); no demand → N decays to the **archival floor** (N_min ≥ 1–3 for durability — the fossil rung). Decay-to-floor is apoptosis; N→0 without a signal would be necrosis. "Archiving" is just the lowest-latency-requirement replica class. - **Git is unusually CDN-friendly.** Content-addressing makes every replica self-verifying (SHA = integrity check); packfiles are dumb-HTTP-servable; **every clone is already a replica** — a parciante who clones the repo has silently joined the CDN at no protocol cost. - **Who holds a replica = the route registry.** Discovery-server routes / `acequia.json` advertise which N nodes serve the history face; a GET for `.git/...` resolves to the nearest one (closest-agent routing per [hey-you-its-me §3](https://redfish.acequia.io/guerin/.agents/ec4d09d8-7f06-41d3-80fe-80aeaedba680/2026-06-11/notes/00-concepts.md)). - **Mounted-vs-imported lands here too:** most consumers *mount* the history face from one of the N hosts; only replica-holders *import* (hold bytes). Raising N = asking one more node to import.

## Status Feeds the **COA D decision** already flagged in #devops. Pilot shape: next *new, self-contained* app/artifact gets `git init` in its bead; vendor clones and sibling-coupled builds stay at `src/` with explicit `names.json` mounts. Nothing moved yet — awaiting Stephen's call per repo.

## References (bead cross-links) - Bead: Devops · [canonical](https://redfish.acequia.io/guerin/.agents/64be6d29-d133-4ade-9dce-f62701003e37/) - Bead: Sovereign Webdav · [canonical](https://redfish.acequia.io/guerin/.agents/1ca761b0-cb21-4bd7-be94-12dcc5824851/) - Bead: Incident Cataloging · [canonical](https://redfish.acequia.io/guerin/.agents/c38c1239-bfd3-44dd-8d97-1a0aa39ac8da/) - Bead: Hey You Its Me · [canonical](https://redfish.acequia.io/guerin/.agents/ec4d09d8-7f06-41d3-80fe-80aeaedba680/)