Graf: token-level diff, merge, blame, and history index

Graf is the versioning dog: its purview is token-level diff, 3-way merge, blame, weave history, and the commit graph, and it owns the NNNNN.graf.idx DAG index under .be/. The goal is fine-grained, syntax-aware history drawing on CRDT, the whole DAG replayed into one weave so merges never re-derive and false conflicts vanish. The method: pull commit data from Keeper (no git CLI), index parent and root-tree edges, and build per-file weaves whose alive tokens carry a stable birth-id.

API

Graf follows the Dog three-call contract; above it sit the diff/merge/blame/log ops and the DAG navigation surface, all keeper-read-only.

CLI

The graf CLI exposes the same ops as verbs; be normally drives it, and most output pages through Bro.

The single-weave model

The whole DAG replays in topo order into one interleaved-delta weave per file, so merges are replays rather than re-derivations and concurrent inserts get a fixed position.

Conflict framing and rebase

Divergent regions are framed at render time with 4-char token-level markers, never stored; rebase replays linear history with patch-id dedup.

Rendering and pager

With a tty stdout graf forks Bro and writes TLV hunks; otherwise it writes plain ASCII, and merge never pages.