
Reef
io.github.reef-vcs由 GitHub 帳號 reef-vcs 發布v0.4.2更新於 Nov 6, 2026
Version control for fleets of coding agents: isolated workspaces, status, diff and history.
概覽
Reef 是為多個編碼代理協作設計的本機版本控制守護程式,透過 stdio MCP 向助理提供工作區、狀態、差異、歷史與復原能力。
- 可以做什麼
- 建立、列出、檢視、移動與釋出帶租約的寫時複製工作區
- 讀取儲存庫狀態、操作日誌與變更歷史,並以復原回退操作
- 檢視變更與差異,包括定義與呼叫點的符號層級差異
- 不需工作區目錄即可讀取、列出與編輯任一版本的檔案
- 描述或放棄變更,查詢哪些變更動過某個檔案或符號
- 等待並追蹤其他代理的操作與線上狀態
- 適用情境
- 適合多個編碼代理在同一個儲存庫中並行工作,希望取得低成本的隔離工作區、依 token 精簡的狀態與差異輸出,以及可復原操作而非 git worktree 與暫存區流程的情境。
- 執行需求
- 以本機程序形式在使用者機器上執行(macOS 或 Linux,arm64 或 x86_64),可用預先編譯的執行檔,或以 Rust 1.97.1 以上從原始碼建置。需要本機 Reef 守護程式,以及以 reef init 註冊的 git 或 jj 儲存庫;MCP 伺服器透過 reef mcp 以 stdio 啟動。未宣告任何 API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Reef,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Reef
Version control for fleets of coding agents.
Reef keeps git's content-addressed storage and replaces git's working model with one suited to many concurrent, speculative, token-constrained authors. The name is the metaphor: a durable structure built by countless small organisms.
Status: Phase 1 (leased copy-on-write workspaces) is complete and was released as 0.1.0 (2026-10-25). Phase 2 (typed API, MCP server, and live state) is complete and was released as 0.4.0 (2026-11-03); the latest release is 0.4.2, with prebuilt binaries for macOS and Linux and Python and TypeScript SDKs. Start with the quickstart. The CLI is not stable yet. The work is tracked in docs/dev-tickets; see What runs today and the roadmap below.
Why
Git was designed for a few dozen humans making a few commits a day. Agents break every assumption behind that design.
- Commit volume rises by orders of magnitude. Thousands of small changes a day from dozens of concurrent writers. Anything that costs O(repository size) becomes the bottleneck.
- Most work is speculative. An agent tries several approaches and keeps one. Branching, snapshotting, and discarding must be nearly free.
- The consumer of history is also an agent. Tokens are a performance metric. A diff that costs 40k tokens to read is slow no matter how fast it computed.
- Conflicts are routine. Two agents editing the same file at once is the normal case. A conflict that halts an agent in a modal state halts the fleet.
- Trust shifts from author to evidence. No human can review every line. A change must carry verifiable evidence of which tests ran on exactly this tree.
- Git ceremony is waste. Staging areas, detached HEADs, and parsing porcelain output burn tokens and cause errors. Agents want a typed API.
Git worktrees, the current answer to agent isolation, make the problem concrete: every worktree is a full copy, its dependency directories dwarf the source, it has no owner and no expiry, and it holds the only copy of uncommitted work, so nobody dares delete one.
What Reef does differently
- Snapshots, not commits. The working copy is always a snapshot. No staging area, no uncommitted state.
- Stable identity, mutable content. A change has a permanent ID that survives rebase and amendment.
- Conflicts are first-class objects. A conflicted merge still produces a valid snapshot. It can be stored, delegated to a resolver, or fixed later. Nothing blocks.
- Everything is undoable. A global operation log records every mutation, so any agent action reverts in one call (
reef undo <op>). - Workspaces are caches, not truth. Working directories are leased, copy-on-write, and reclaim themselves when the agent goes away. Deleting one loses nothing.
- Hub and ephemeral workspaces. One authoritative store per repository with lazy-fetching clients. Full clones are the exception.
- Evidence rides with the change. Test results and build hashes are signed, content-addressed objects linked to the snapshot they were computed on. Landing is gated on evidence, not on who pushed.
- API first, CLI second. A local daemon speaks a typed protocol. The CLI and an MCP server are thin clients. No agent should ever regex a log.
A proposal is the unit of review: a change or stack of changes, with its evidence, put forward for main. It is the change itself in its proposed state, identified by its change ID. There are no pull requests.
What runs today
Reef works on existing git and Jujutsu repositories. Release 0.1.0 was Phase 1, which replaces git worktrees for agents, and 0.2.0 to 0.4.0 add Phase 2. Coming from 0.3, read Upgrading from 0.3; from 0.2, Upgrading from 0.2 as well, and from 0.1, Upgrading from 0.1 too.
Phase 1 (0.1.0)
- A local daemon (
reef daemon run|start|stop|status) serving gRPC over a Unix socket, with its state, configuration, and logs under a per-user state directory. It serves many repositories; the firstreefcommand in a checkout registers it, and in a plain git checkout first creates jj's side of a colocated repository (.jj/plus one line in.git/info/exclude). - Leased workspaces.
reef ws creatematerializes a workspace on a change in a second or two on a 100k-file repository (under half a second on overlayfs),reef ws runruns a command inside a fresh workspace with the lease heartbeated for the life of the process and the workspace released on exit,reef ws moveputs another change in a workspace's directory without giving up its lease, andreef ws list|inspect|releasemanage them. When an agent dies, its lease expires, a final snapshot lands in the store, and the directory is reclaimed. Nothing is lost. - Copy-on-write backends. APFS clones on macOS, kernel overlayfs or fuse-overlayfs on Linux, reflink clones on btrfs and XFS, and a plain copy fallback everywhere, all behind one
Backendtrait and one conformance suite. A workspace costs disk proportional to what the agent changed. - Continuous snapshots. A filesystem watcher (
notify, or Watchman on large repositories) snapshots each workspace through jj-lib after every debounced write. Watcher snapshots are marked local-only and never leave the machine until a change is published. - Garbage collection.
reef ws gcreclaims operations past the undo window, base cache entries no workspace uses, and stale workspace records, and reports what it freed. - Backup and restore.
reef backup <dir>copies the daemon's database and every repository's jj state while agents keep writing, pausing each repository only while its operation files are copied;reef restorebrings it back offline, and the next start rebuilds every workspace's directory from its last snapshot without reclaiming any (ADR 0020). A quiesce RPC holds the daemon still for a filesystem snapshot instead. - Shared dependency stores. A
reef.tomlin the repository declares stores such asnode_modulesortarget;reef store buildbuilds one in a scratch workspace and seals it, and the daemon mounts it read-only into every workspace after verifying it against the lockfile hash. - A CLI an agent can learn from.
reefalone prints a one-screen guide,reef heresays which workspace you are in and what to run next, every error with a known fix carries it as ahintand anextcommand, and no command ever waits on input (ADR 0025). - Benchmarks for snapshot cost and workspace creation on synthetic repositories of 1k to 100k files, published from CI on both platforms. See docs/benchmarks.md for the numbers against the Phase 1 exit criteria.
- An onboarding benchmark. A real Claude Code agent that has never seen Reef, given only
reefonPATH, afterreef init, with Reef not yet installed, and insidereef ws run: tool calls, failedreefcalls, tokens, and cost to a working workspace, three trials each, run in CI on demand. See docs/onboarding-benchmark.md.
Phase 2 (0.2.0 to 0.4.0)
-
A typed API and a thin CLI. The daemon serves
reef.api.v1, a versioned protobuf schema checked bybuflint and breaking-change checks in CI (ADR 0029). Thereefbinary is a client of it with no jj-lib of its own (ADR 0033). -
Changes without jj.
reef status,log,show,diff,describe,abandon,undo,op log,op show,ws snapshot,file readandfile listlook at and revert what agents did, from a workspace or the checkout, with JSON for each and anextcommand on every error with a known fix (ADR 0034). The API also reads files, lists directories, and applies edits at any revision without a workspace directory (ADR 0032). -
An MCP server.
reef mcpserves the API to an agent harness over stdio as twenty-one tools named after its RPCs: workspaces, status, the log, changes, diff, files (read, list and edit, without a directory), describe, abandon, the operation log, undo, which changes touched a file or symbol, and a tool that waits for other agents' operations.reef initwrites its entry for Claude Code, Codex and opencode (ADR 0035). -
Live operations.
SubscribeOperationsstreams the operation log as operations are recorded, filtered by repository, change, workspace, or agent, and resumes from a cursor;reef op watchprints it (ADR 0036). A broker reads each operation once and fans it out (ADR 0038): with 500 subscribers at 1,000 operations a minute, p99 delivery is 53 ms for operations and 57 ms for presence on a 12-core Mac (docs/load-tests.md). -
Presence. What each agent is doing now: its activity, the files it is editing, lease heartbeats, and the progress of workspace creates and store builds, never persisted (ADR 0037).
reef ws runandreef mcpreport it on their own,reef presence reportandclearreport finer activity,reef presence watchshows it, andreef ws renewrenews a lease held outsidews run. -
A symbol index. The daemon extracts definitions and references with tree-sitter for Python, TypeScript and JavaScript, Go, and Rust, in the background for new snapshots and edits, and accepts uploaded SCIP indexes;
reef symbols index,uploadandlistdrive it (ADR 0042). -
Symbol-level diffs and history.
reef diff --symbolssays which definitions a change added, removed, changed or moved, and which call sites they affect (ADR 0043).reef historyand the MCPquery_changestool answer which changes touched a file or a symbol, by whom, and how each ended: open, landed, abandoned or undone (ADR 0044). -
Output sized for agents. Piped output is brief JSON with only the keys an agent acts on (ADR 0045), and
reef --helpis a 509-byte task-first help (ADR 0051): in live Claude Code runs on the CLI, answering "what is the state of this repo" took a seventh of the tokens git did (docs/token-benchmark.md).reef schemaprints the commands, MCP tools and API as JSON Schema, for generating tool definitions. -
One-line installs for agents. A Claude Code plugin and a Codex plugin from this repository,
reef init --agents opencode --user, and the MCP server on the MCP registry (ADR 0052). A harness that isolates sessions in git worktrees can ask Reef for workspaces instead, through the workspace provider contract; Claude Code's comes as the opt-inreef-workspacesplugin (ADR 0053). -
Status without a tree walk. The watcher keeps an index of what changed, so status on a 100,000-file workspace takes 12 ms when nothing changed, against 161 ms for a walk (ADR 0048).
-
Remote access. A daemon in a VM serves the same API and web UI to another machine over TLS with a scoped, revocable token (ADR 0049).
-
A local web UI.
reef uiopens a read-only page in your browser, live from the operation and presence streams: every repository with its latest operation, each repository's smartlog, its workspaces and agents, with who is on which change, each lease's health, and disk use, and its activity feed, with a scrubber that replays any page at a past operation (ADR 0047). -
Garbage collection on a timer. The daemon runs
reef ws gcby itself every[gc] interval(a day by default), and GC leaves the user's own jj workspaces loadable (ADR 0040, ADR 0041). -
Python and TypeScript SDKs.
pip install reef-vcs(import reef) andnpm install reef-vcs: every API call as a typed method, generated from the schema, with page iterators, streams, the daemon's errors by kind withhintandnext, remote access with the daemon's key pinned, and a workspace block that holds a lease and reports presence asreef ws rundoes (ADR 0054, Python, TypeScript).
Install
Ask your agent. In the repository you want to use Reef in, give your coding agent (Claude Code, Codex, Cursor, or any agent with a shell) this prompt:
The agent finds the installer below and runs it. reef init then registers the repository, which adds .jj/ beside git and starts Reef's daemon, and writes Reef's instructions to AGENTS.md, plus the files of each agent that reads its own instead: those the repository already has files for, and the agent running reef init when Reef recognizes it. Later agent sessions then start in a workspace without being told. In the onboarding benchmark, Claude Code agents that had never seen Reef, given only that link, installed it and finished a task in a workspace in a median of five or six tool calls (measured before 0.1.0, against a local copy of the installer).
Or install it yourself. Prebuilt binaries of the latest release, 0.4.2, are available for macOS and Linux on arm64 and x86_64. The Linux binaries are static, so they run in any container.
The installer checks the tarball against the release's SHA256SUMS and never prompts. The binaries are not signed or notarized yet (R4.17). The quickstart has the installer's options, the system requirements, and how to verify a tarball's provenance.
To build from source, with Rust 1.97.1 or later: cargo install --locked --git https://github.com/reef-vcs/reef reef-vcs reef-daemon installs reef and reef-daemon, the daemon it runs. It builds main, which can be ahead of the release; reef --version names the commit. From a checkout, cargo build --release builds both into target/release. A build from source has no web UI unless you run just web-build (Node 24) first; reef ui says so. Coming from 0.2, read Upgrading from 0.2 first, and from 0.1, Upgrading from 0.1 as well.
Once installed, in a git or jj repository, reef ws run -- <your agent command> runs an agent in a fresh workspace. reef alone prints the agent guide, reef here says which workspace you are in and what to do next, and reef --help lists the rest. reef init --check in CI keeps the files reef init wrote current. Output is brief JSON when stdout is not a terminal (-o json for every field), and an error with a known fix carries it as hint and next, a command to run.
Roadmap
Reef builds on Jujutsu's data model and Rust crates rather than starting clean. Each phase ships something independently useful.
- Leased copy-on-write workspaces (complete, released as 0.1.0). A daemon that creates workspaces via overlayfs or APFS clones, snapshots on a filesystem watcher, heartbeats leases, and reclaims expired workspaces with a final snapshot. Shared dependency store mounting. Ships as a standalone tool against existing git and jj repositories. This alone removes the worktree problem.
- Typed API, MCP server, and live state (complete, released as 0.4.0). Structured status, snapshot, diff, log, and undo over a local socket, with the CLI as a client. Live operation and presence streams. Symbol-level diffs for the first supported languages. A local web UI showing the fleet live.
- Evidence objects and landing gate. The attestation format, trusted attestor policy, and a landing service that batches rebased proposals, runs checks on the batch head, and bisects on failure. The triage inbox ships here as a web UI, then as a desktop app and as iOS and Android apps, so a human can steer and approve agents from anywhere.
- Shared lazy object store. A store server speaking the native protocol, with lazy fetch into the local cache and federation between stores.
- Structural merge. Tree-sitter based merge, starting from Mergiraf, for Python, TypeScript, Go, and Rust.
- Protocol specification and conformance suite. Published once the first four phases have stabilized, so alternative implementations can exist.
Scope
Reef targets the open ecosystem, not one organization's monorepo. The hub is a protocol anyone can host, trust is declared per repository, and git interop is the adoption path: one person on a team should be able to use Reef against an ordinary GitHub repository nobody else has heard of.
Non-goals: replacing GitHub or any review platform, running builds or tests, or being a hosted service.
Repository layout
crates/reef-error: the error conventions every crate shares: error kinds, classification, and advice.crates/reef-lib: core library. Data model, jj-lib embedding, snapshots, operation log, undo.crates/reef-api: the API schema,reef.api.v1(proto/reef/api/v1), and its generated Rust clients and servers (ADR 0029).crates/reef-client: the thin client of the API, its stable JSON, and how to find the daemon, with no jj-lib (ADR 0033).crates/reef-broker: bounded in-memory rings that read a log once and fan it out to the streams that follow it, with no jj-lib (ADR 0038).crates/reef-symbols: tree-sitter tag extraction and SCIP normalization for the symbol index (ADR 0042).crates/reef-daemon: the local service and thereef-daemonbinary. Workspaces, materialization backends, watchers, leases, garbage collection, shared stores, and the gRPC services.crates/reef-vcs: thereefbinary, built onreef-clientalone, and an umbrella library re-exporting the API and the client.crates/reef-testing: unpublished test fixtures and the synthetic repository generator.
Design
The full design document is at docs/design.md. The work is broken into phases and tickets in docs/dev-phases.md, and each phase's tickets have implementation briefs under docs/dev-tickets, written so that an agent can pick one up and build it.
Architecture decisions are recorded in docs/adr.
Benchmarks, what they measure, and their baseline numbers are in docs/benchmarks.md; the crash, reclaim, and load tests at 200 workspaces are in docs/load-tests.md.
The quickstart takes you from installing Reef to an agent's reclaimed workspace.
Contributing
Read CONTRIBUTING.md for setup, workflow, and the DCO sign-off every commit needs. Open work is the Phase 2 rows in docs/dev-phases.md not yet done and the issues labeled phase-2.
License
來源:README.md,提交 a749b0c
工具
0版本歷史
4- v0.4.2最新Nov 6, 2026
- v0.4.1Nov 4, 2026
- v0.4.0Nov 4, 2026
- v0.3.0Nov 3, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分