Every diff tells a story. difflawb makes it permanent.
Built on Andrej Karpathy's insight: a git diff contains human intent, and an LLM can read it. difflawb turns that 40-line script into a protocol — annotate, sign, store, and query every change as a knowledge artifact. A complement to gitlawb.
Paste any git diff below. difflawb reads the intent, scores impact, links related history, and produces a signed knowledge artifact — exactly like the CLI.
difflawb annotate — interactive demolive
$ git diff --cached (paste your diff or use example)
waiting for diff input...
~/project — zsh
$ git diff --cached | difflawb annotate --publish Reading staged changes (2 files, +8 -2 lines)... → Intent:"add null guard before DID resolution" → Module:src/auth.rs · critical path → Risk score:0.24 (low — isolated, tested) → Related:3 past diffs on auth module Signing with did:gitlawb:z6MkUser123 (ed25519)... Pinning to IPFS via gitlawb node... ✓ CID: bafkreihu5qziap3py... ✓ Published to difflawb network — 3 nodes ✓ Knowledge graph updated $
origin
Built on a proven insight
difflawb started with 40 lines of shell script and one clear idea.
AK
Andrej Karpathy
@karpathy · co-founder OpenAI, Tesla AI Director · Aug 25, 2024
"I tried to write a little utility that auto-generates git commit message based on the git diff of staged changes. So just typing gcm auto-generates a one-line commit message, lets you accept, edit, regenerate or cancel. Might be fun to experiment with."
He piped git diff --cached into an LLM and got a meaningful commit message back. Proof: the diff encodes human reasoning that AI can read.
git diff --cached | llm "generate a concise commit message"
02
The gap: knowledge lived only in your terminal
The annotation was generated and gone. No storage. No signature. No other agent could read it. Knowledge didn't accumulate.
03
difflawb: same moment, protocol level
Same git diff --cached → LLM annotation. But now: signed with your DID keypair, pinned to IPFS, published to the federated network. Not a script — infrastructure.
git diff --cached | difflawb annotate --publish
04
Result: every diff becomes a knowledge artifact
Agents query history. Teams see intent behind changes. The knowledge graph compounds with every commit. What Karpathy built for himself now works for the whole ecosystem.
utilities
What difflawb ships
Seven CLI commands. One MCP server. All compatible with gitlawb identity and storage.
difflawb annotate
Reads diff → LLM → intent, risk score, related history. Signs with DID.
core · from gcm
difflawb sign
Signs any diff with your Ed25519 DID keypair. Creates a verifiable certificate.
identity
difflawb pin
Pins annotated diff to IPFS via gitlawb storage. Permanent CID reference.
storage
difflawb query
Semantic search over accumulated diff knowledge. RAG over your git history.
memory
difflawb review
Signed AI or human review of a diff, stored as git object. Trust score required.
agents · PRs
difflawb watch
Background daemon. Subscribes to gitlawb gossipsub. Auto-annotates every commit.
daemon
MCP server
25 tools for Claude, GPT, any MCP agent. Query diffs, publish reviews, build knowledge graph.
agents · protocol
ecosystem
difflawb + gitlawb
Not a competitor. A complement. gitlawb handles the repo — difflawb handles the meaning inside it.
Fully compatible primitives
difflawb uses gitlawb's DID keypairs for signing, gitlawb's IPFS nodes for storage, gitlawb's gossipsub topics for publishing, and gitlawb's UCAN tokens for agent permissions. Same identity, same network — difflawb adds the semantic layer on top. One install, one keypair, both protocols.
stack
core daemon
Rust + axum
LLM layer
llm CLI / API
identity
DID · Ed25519
storage
IPFS → Arweave
delegation
UCAN tokens
network
libp2p gossipsub
agents
MCP server
web UI
Next.js
install
install difflawb
$ curl -fsSL https://difflawb.com/install.sh | sh No signup. Identity is a keypair. Works with gitlawb. ✓ difflawb v0.1.0 installed ✓ DID generated: did:gitlawb:z6Mk... $ difflawb annotate --help
credits
Built on the shoulders of
Andrej Karpathy
co-founder OpenAI · @karpathy
Proved a diff contains intent. His gcm script is the first prototype of difflawb. view gist →
gitlawb
decentralized git · @gitlawb
DID identity, IPFS storage, MCP protocol, federated network. difflawb runs on their infrastructure. gitlawb.com →
llm CLI
Simon Willison · datasette.io
The LLM tool Karpathy used in his script. difflawb is compatible out of the box. llm.datasette.io →