功夫 · Rust + CRDT · Apache-2.0
You write code. Versioning, sharing, visibility and reconciliation happen underneath you. There are no commits to compose, no branches to manage, no merges to resolve, and nothing to memorise. Not a re-engineered Git — a convergent mathematical structure, where concurrent edits combine by algebra instead of guesswork.
you everyone else
─── ─────────────
typing… DRAFT sees a draft exists
READY queued
[safe] builds · tests pass
IN REVIEW a peer, block locked
ACCEPTED in the codebase
DEPLOYED dev · qa · prod
no commit · no branch · no merge · no rebaseWhy this exists
Before anyone can safely contribute to a codebase today, they
have to learn a data model that has nothing to do with the
product: the index, the staging area, refs, HEAD,
detached HEAD, tracking branches, rebase versus
merge, the reflog, force-push and its consequences. That is a
genuine curriculum — weeks to become comfortable, years to
become confident.
No development shop allocates time for that. There is no sprint item called "learn source control" and deadlines do not pause for it. Yet there is a standing presumption that you should just know it — a substantial technical skill everyone is expected to have absorbed on their own time, for work that produces nothing a user ever sees.
Teams still on older tooling weigh the cost of migrating plus the cost of the learning curve against the work already piled up — and correctly conclude it is a bad trade. So they stay put. Not because the old tool is good, but because the new one demands a tax nobody budgeted.
And the model was never built for machines either. Point a coding agent at a repository. It creates a branch. It works. It declares itself done — and it isn't. The tests it was graded on pass, so by its own measure the job is complete. The branch is left lying there, and nobody knows whether it holds something valuable or something abandoned. Now run several agents at once.
The root cause: the agent grades its own homework. Git accepts a self-report — whatever was pushed is what was meant. That was already generous when the author was a person with a reputation to protect. Applied to something optimising against a proxy for the goal, it fails completely. The tool now fails at both ends: too much ceremony for humans, too much trust for machines.
This is already solved everywhere else
Two people, one in Berlin and one in Los Angeles, open the same document. They both type. They see each other's cursors move. Every change is versioned automatically. There are no conflicts and no merge step. The mechanism is invisible to the people using it. Source code never got this. KungFu is that, for code.
This is not a better version control system. It is the removal of a discipline. You don't get an improved tool to operate — you get one fewer skill to have.
What you get
Start typing. No curriculum, no manual, and no concept that can't be explained in one sentence.
Everything is captured continuously. No unsaved state, nothing to stash, no way to lose an afternoon to a bad command.
Not by discipline — structurally. Broken code can't reach anyone else, because promotion requires a machine gate that never gets tired or rushed.
Concurrent edits combine by algebra. Where two people genuinely meant contradictory things, that surfaces as a rare, legible event with both intentions attached.
Your work is continuously fed by everything accepted upstream. A week-old draft is as fresh as a minute-old one.
Including last green — the exact state when the test suite last passed. "The version from before lunch that worked" is a query, not an archaeology project.
Moving code rewrites every reference automatically. Restructuring stops being a multi-day exercise nobody dares attempt.
Someone shares access. You start typing. No clone, no keys, no team memberships, no CI setup.
What you get
How it works
A half-written document is not a document — it is a draft. Every document tool has modelled this forever and nobody ever needed a manual to understand it. Git has no such state: it has commits, which claim finality, and branches, which are invisible. The tell is that "draft pull request" had to be invented at the hosting layer, because the tool underneath could not express it.
Five states, each explainable in one sentence to somebody who has never used the tool.
Three gates
| Gate | Owner | Question | Why them |
|---|---|---|---|
ready |
the author | Is the thought complete? | Code can compile and pass every test and still be half a thought — "I added the function, I haven't wired it up yet." No machine can infer that. |
safe |
the machine | Does it parse, build, pass? | Mechanical, tireless, instant. A person should never carry this. |
right |
a peer | Is this the correct thing to do? | Judgment, approach, design. Only a human can answer it. |
All three must pass. Nobody is ever asked a question they cannot answer. Git collapses all three into a single act — the pull request — and hands the whole bundle to humans, including the machine's share: "did you run the tests?", "please rebase on main", "fix the conflicts."
The consequence
ready is a request, not a verdict. It means
"I believe this is complete, put it in the queue." It
puts nothing into the codebase. The machine still has to agree
that it builds and passes; a person still has to agree that it
is the right thing to do. A self-report of "done" is
structurally irrelevant — which is exactly the
assumption that collapses when the thing reporting is optimising
against a proxy for the goal.
Everything else follows without extra machinery. There are no branches to abandon. Abandoned work surfaces instead of accumulating — a draft untouched for three days appears in the queue with its age attached. Many actors at once is the normal case, not the pathological one. And each actor is scoped and provable: its own cryptographic identity, a grant covering only what it needs, every operation attributable.
The same three gates that stop a rushed human from breaking the build stop a confident machine from claiming it didn't.
What disappears
Gone — the machine's job now
Kept — genuinely human decisions
The structure
Branches do two protective jobs. Production is already protected by the deployment pipeline — dev → qa → prod, with real tests, canaries and rollback, which every company already runs and trusts. Other developers are protected by draft isolation, which gives the same protection without hiding you. And drafts cannot rot: they are continuously fed by accepted work.
You don't think about directories in a shared document; you think about the document. Paths are projection for compilers, not identity — so every existing tool sees ordinary files on disk and works unmodified. And moving code becomes a semantic operation that rewrites every reference automatically.
Access works the way document sharing works — you share with named people, backed by cryptographic identity so authorship is provable rather than a self-declared string. Viewer, reviewer, editor. Nothing else to model.
Git has exactly one access boundary: the whole repository. A grant here targets a single block. That covers contractors, sensitive code inside a shared codebase, and least privilege for automated actors — and it removes the reason repositories multiply in the first place.
Visibility
An entire industry of process — standups, PR etiquette, "please keep PRs small" — exists to compensate for a tool that structurally cannot show you what is happening while it happens. Here, "what is Molly working on?" is answered by going and looking.
"What's Molly working on? Let me go look." — a colleague walking over to a desk.
"Here is a live feed of everything Molly typed." — a panopticon.
Visibility is pull, not push. That distinction is the whole design.Nothing is broadcast, nothing is scored, nothing is ranked. The state is simply not hidden from a teammate with a reason to look — exactly how a shared document behaves. A document does not notify your manager that you rewrote a paragraph; it is just openable.
And the draft is the unit of visibility, not the keystroke. Others see that a draft exists, where it lives and what it is about. That solves "vanished for a week" — the actual problem — without exposing the interior thrash of somebody's thinking. History is autosave, not recording: private by default, with an explicit publish gate.
The review queue
One view of every block and where it sits. It shows the state of work, never the activity of people. "Here is what is waiting, oldest first, grab one" is shared infrastructure nobody objects to. And the queue prioritises itself — the oldest lock is, by construction, the most urgent thing in the organisation, because it is blocking a person right now. No triage meeting, no priority labels, nobody assigning anything.
Review requires a stable target, so a block freezes while it is reviewed. That is the cheap replacement for a commit — and it converts review latency into a cost that is felt immediately. Today a slow review costs you a branch that quietly rots, paid weeks later as a merge conflict. Here it holds a lock somebody can see. A pull request can be ignored indefinitely because ignoring it costs nothing visible.
Because every state is derived from real work rather than reported by a person, this is a Kanban board that maintains itself. Nobody moves a card. The cards move because the work moved.
Core & add-ons
No git, no node, no service. Starting a new project, you use KungFu immediately and load none of the add-ons. Everything that reaches outside is a module that can be absent — the structural defence against scope creep.
The core
The add-ons
| migration | index existing repos, consolidate, keep in sync |
| git bridge | mirror both ways while a team crosses over |
| deployment | pipeline hooks, deployed-state tracking |
| agents | typed tools for automated actors |
| escalation | configurable review-ageing policy |
| analytics | beyond the built-in queue view |
| encryption | per-block confidentiality, if needed |
| site | this page |
Foundations
| Convergence engine | Loro — the only CRDT with a real movable tree. Moving or renaming a directory concurrently with edits inside it is the defining operation of source control; the alternatives either have no move operation at all or are text-only. |
| Ordering | Fugue — provably maximal non-interleaving. Two people writing into the same region do not get their words shuffled into nonsense. |
| History | Eg-walker — invoke the merge algorithm only to merge, then discard its state. Never store it, never transmit it. Because code is overwhelmingly edited sequentially, most of a codebase's history is never transformed at all. |
| Transport | iroh — NAT traversal, hole punching, relays, device identity, transport encryption. |
| Structure | tree-sitter — incremental reparse with error recovery, so half-typed code still parses. |
| Identity | Ed25519 per actor; UUIDv7 on every operation, block and transition — so provenance is provable and age is free. |
What we don't claim
Convergence guarantees every machine agrees on the same text. It does not guarantee the text is a correct program. Our answer is not to solve that at the merge layer — everyone attempting it is stuck, because it requires inferring intent from text. Convergence is allowed to produce garbage, because it happens inside a draft and a draft is isolated. Garbage cannot promote, because promotion requires the safe gate. We never need the merge to be correct; we need broken output to be unable to reach anyone else, and that is decidable.
The best available measurement found AST-based merge tools buy a few points of extra auto-resolution and pay for it with several times more silently incorrect merges. For an automatic system, silently wrong is undetected corruption — so structure is used here as a detector and classifier, never a resolver.
Current benchmarks top out under 60% exact match. That is a suggestion, not a gate.
The per-operation numbers are strong — roughly 0.5 to 1.1 bytes per keystroke on disk, memory tracking the working set rather than the history. But no published benchmark exists for a CRDT over an entire repository. The extrapolation is arithmetic on single-file traces, and every published trace is human keystrokes — nobody has measured machine-generated edit patterns against any of these engines.
Code references code, so signatures and call sites leak structure. That covers the overwhelming majority of real needs and is strictly better than a model whose only boundary is the whole repository — but it is not cryptographic confidentiality and will not be described as such.
The concept and architecture are documented; the implementation starts from nothing. The first piece of work is the measurement that de-risks everything else — replay five to ten years of a real repository's history into per-file documents and measure size, memory, load time and merge cost, including machine-generated edit patterns. Roughly two weeks. It either validates the foundation or kills the idea before a product is built on top of it. Contributions wanted.