A store is a directory (.be/) holding one or more project shards; each shard is one flat object pool for all of a project's branches, tags, and remotes. The goal is a repo almost impossible to break — your own little GitHub in ~/.be — with cheap parallel worktrees and submodules. The method: multi-project shards, one flat object pool per project, branches and tags as pure ref rows (no per-branch object dirs), and ff-only branch trees that keep trunk linear while mess sinks into leaves.
A store hosts many projects, so the idiomatic setup is one ~/.be GitHub of your own; a store is hard to break where a worktree is easy, so worktrees stay cheap.
ssh://host/beagle.git?v0.0.3 → b8caa674…, relayed to each dog as --at.
Branches form a tree (feature/fix1) of ff-only tips, so churn lives deep in the tree while trunk and its neighbors stay clean; staging and stash become short dirty branchlets.
Each project is one flat object pool: a single shard dir holds the packs, indexes, and refs for ALL its branches, tags, and remotes, so object retrieval consults exactly one dir with no trunk→leaf fan-out.
.be/<project>/ is the shard (== trunk): NNNNN.keeper packs, NNNNN.*.idx index runs, a refs ULOG — one object pool.refs line 1.<project>/refs, not object dirs: creating writes one row (no mkdir), dropping a tombstone.feature/fix1/) is materialized lazily — only for a checkout's rw .lock and peer-form refs rows, never objects.<project>/refs, then the branch's leaf refs (where keeper get //h?br peer rows land); it never walks up.refs — no remotes/<host>/ dir.
A short //host ref resolves with no ALIAS file and no registration step: every remote URI touched is logged to the project reflog on first contact, and a later short form reverse-greps that log newest-first for the most recent matching row.
//host matches the newest reflog row with that authority; //host?branch also matches the branch, //host/path the path.ssh:/be:) for a follow-up wire call; bare //host reads cache only.ssh://origin?feat appends the URL as a normal reflog row, so a later //origin finds it.
A worktree is a separate on-disk checkout with its own .be/wtlog; row 0 pins the project store, and the branch is the latest get/post row's ?branch, never the anchor.
<wt>/.be/ is the store dir itself, one shard beside the wt files; row 0's repo is file:<wt>/.be/<project>.~/.be): <wt>/.be is a file naming a project under a remote store, then get/post rows for branch state.get/post row's ?branch; switching appends a row, never rewrites it.GC is epoch-based and out of band: a dropped branch's objects simply linger, and a major release recompacts by copying the reachable closure into a fresh project id.
beagle→beagle2), leaving dead objects.