git-ai README

The project's README from github.com/feder-cr/git-ai. As one markdown file: README.md.

open_scion

Source control for the age of coding agents.

Anthropic built Scion, a faster version control system for coding agents, and described it in Redesigning source control: a server-centric system built for hundreds of agents that read, write and land code at the same time. Scion is internal to Anthropic and is not available to the public.

So I built open_scion: an open-source version of that design that anyone can run, and that the community can improve and maintain together.

MIT licensed. Vendor neutral: the server never calls a language model, and every AI feature works with any provider, or none.

open_scion is an independent implementation of the publicly described design. It is not affiliated with or endorsed by Anthropic.


Why

Classic Git hosting was built for humans who clone a repository, work for hours and push once. Coding agents work differently: thousands of short-lived tasks, each touching a few files, each wanting to land in seconds, all on the same branches. Full clones, merge queues and client-side history walks become the bottleneck.

Scion's answer is to move the work to the server: clients stay online and fetch only what they need, history questions are answered (and cached) by the server, changes land through a compare-and-swap instead of a queue, every update is an entry in a changeset log, and the repository state lives in a consistent database plus object storage so servers scale out. open_scion implements these ideas, with normal Git repositories underneath.

The Scion ideas, implemented

Scion idea In open_scion
Always-online clients that fetch exactly what they need ObjectService serves single objects and sparse trees; graft clone and graft sparse materialize only the paths you ask for.
Source control as an API: history runs on the server Blame, path history, ancestry and code search run server-side and are memoized as derived data, computed once per commit.
Landing without a merge queue UserLand rebases a change onto the current tip and lands it with a compare-and-swap; concurrent lands on one branch are batched into a single reference update.
Automatic conflict resolution A conflicting land is resolved by a resolver you choose (any LLM provider, a deterministic tool, or none) through a versioned, vendor-neutral protocol.
Changeset log Every accepted reference update is recorded with its operation and actor in a dense, ordered log that clients list or watch live.
Storage core: a database and object storage, stateless servers Each change is a changeset in a write-ahead log in SQLite or PostgreSQL, with a compare-and-swap per reference; packs live in object storage (file, S3, GCS, Azure). Server nodes are caches that any node can rebuild, so you add nodes to scale.
Test after landing, revert the culprit graft-verify tests the tip, bisects a failure and reverts the change that broke it.
Monitoring agents ("superfans") Agents follow the changeset stream and report what matters to each component, also through Slack.
Agent-friendly review Reviews with semantic approval rules: a comment-only change can need fewer approvals than a logic change.
Agents as first-class users Per-agent tokens, an RPC allowlist and branch policies decide what each agent may do.
Strict cache tiers graft-cache caches immutable objects in daemon and regional tiers, verifying every object.

Architecture

        agents, CI jobs, sparse workspaces          graft CLI / Go SDK
                            |
                            v   gRPC
        +-------------------------------------------------+
        |  graft-cache (optional daemon and cache tiers)  |
        +------------------------+------------------------+
                                 v
   +---------------------------------------------------------------+
   |  open_scion server (any number of nodes)                      |
   |  land - objects - changesets - derived data - search - review |
   |  write path: changeset + compare-and-swap per reference       |
   +-----------+--------------------------------+------------------+
               |                                |
               v                                v
   +-----------------------+       +-----------------------------+
   |  SQLite / PostgreSQL  |       |  object storage             |
   |  changeset WAL, refs, |       |  content-addressed packs    |
   |  changelog, reviews   |       |  (file, S3, GCS, Azure)     |
   +-----------------------+       +-----------------------------+
               \                              /
                local Git repositories = caches any node can rebuild

Details: ARCHITECTURE.md and STORAGE.md.

Quick start

Requirements: Linux or macOS, Go 1.26, a C toolchain, Meson and Ninja (the build compiles a bundled Git).

git clone https://github.com/feder-cr/open_scion.git
cd open_scion
make build                         # server, CLI and tools into _build/bin
examples/graft/quickstart.sh       # a server, a cache daemon, two agents and a land, in a temporary directory
./_build/bin/graft                 # the CLI and its commands

To run your own server, adapt examples/graft/config.toml and start it with _build/bin/gitaly serve config.toml. To put the repository state in a database and object storage, add a [graft.storage] section: start in shadow mode, import your repositories, then switch to authoritative (STORAGE.md).

Inside the code the extensions are called Graft: the [graft] configuration section, the graft CLI, internal/graft and doc/graft.

Documentation

Status

Version 0.1.0, the first public release. Everything above is implemented and covered by unit, end-to-end, multi-node, crash and fuzz tests. Interfaces may still change before 1.0. Known gaps (for example garbage collection of packs in the storage core) are listed in LIMITATIONS.md.

Community

open_scion is meant to be maintained by its community. Open an issue to report a bug or propose an idea, start a discussion before a large design change, and send pull requests: tests and a short description of the reasoning make them easy to review. The design documents in doc/graft/PLAN*.md explain why things are the way they are.

Credits and license

open_scion is MIT licensed, see LICENSE.

It started as a fork of Gitaly, GitLab's Git RPC server (MIT, Copyright GitLab Inc.), which provides the Git plumbing underneath; every upstream Gitaly RPC keeps working. The non-MIT ee/ directory of upstream Gitaly is not part of this repository. Gitaly's own README is kept in doc/UPSTREAM-GITALY.md, and third-party notices are in NOTICE.

git-ai (feder-cr/git-ai)

Searching Database…

2.3K ·GitHub
这是什么?openscion 是一个采用 MIT 许可证的开源项目,对 Scion 进行了重新实现。Scion 是 Anthropic 内部为编程智能体开发但从未公开发布的以服务器为中心的版本控制系统。
这是一个全新的版本控制系统,还是底层仍然用的是 Git?它底层运行的是普通的 Git 仓库,但把历史查询、落地(landing)和冲突解决从客户端移到了服务器上,不再像传统 Git 托管那样在客户端完成这些操作。
怎么把服务器跑起来?修改 examples/graft/config.toml 里的示例配置,然后用 build/bin/gitaly serve config.toml 启动服务器;构建时会通过 Meson 和 Ninja 编译一个内置的 Git。
构建和运行需要安装哪些东西?需要 Linux 或 macOS,以及用于构建的 Go 1.26、C 工具链、Meson 和 Ninja;如果你想要完整的存储核心而不是 shadow 模式,还需要加一个数据库(SQLite 或 PostgreSQL)和对象存储(文件、S3、GCS 或 Azure)。
它可以直接用于生产环境吗?目前是 0.1.0 版本,也就是首个公开发布版:核心功能已经实现并经过测试,但在 1.0 之前接口仍可能变动,一些已知的缺口(比如 pack 文件的垃圾回收)记录在 LIMITATIONS.md 中。
它会把我的代码发给 AI 服务商吗?不会。服务器本身从不调用语言模型;冲突解决是可选的,可以通过一个不绑定厂商的协议使用任意 LLM 服务商、确定性工具,或者完全不用。
代码里的 'Graft' 是什么?Graft 是 openscion 在 Gitaly 基础上所做的扩展的内部名称:包括 [graft] 配置段、graft 命令行工具,以及实现存储核心和落地逻辑的 internal/graft 代码。
两个智能体同时落地相互冲突的改动会怎样?冲突的落地会由你选择的解决器(resolver)来处理(LLM、确定性工具,或者不用),同一分支上的并发落地会被合并成一次引用更新,而不是走合并队列。
如果某个改动落地后把构建搞坏了,它是怎么发现的?graft-verify 会测试当前的最新提交,对任何失败做二分定位,并自动回滚导致问题的那个改动。
openscion 到底是基于什么构建的?它最初是 Gitaly 的一个分支(Gitaly 是 GitLab 开源的采用 MIT 许可证的 Git RPC 服务器),底层 Git 操作至今仍由它提供——每一个上游的 Gitaly RPC 都能正常工作。
Creator
feder-cr
Size
14.9 MB
Stars
2.3K
Age
4d
Commits · 90 Days