selvedge

Comparison · 2026-04

How Selvedge compares to AgentDiff, Origin, Git AI, and BlamePrompt.

The "git blame for AI" category is fast-growing — five tools, all promising to surface the why behind agent-written code. They differ on four axes that matter: where reasoning comes from, what unit it's attached to, when it's collected, and how it's stored.

Reasoning source Granularity Mechanism Grouping Storage
AgentDiff Inferred post-hoc by Claude Haiku from the diff at session end Line Git pre/post-commit hook None JSONL on disk
Origin Captured at commit time Line Git hook None Local
Git AI Attribution metadata Line Git hook + Agent Trace alliance None Git notes
BlamePrompt Prompt-only Line Git hook None Local

Why "captured live" matters

AgentDiff and Origin generate reasoning after the change is made, by feeding the diff back to a second LLM call. Selvedge's reasoning is the agent's own intent, written from the same context window that produced the change — no inference, no hallucinated explanations, and an empty reasoning field is itself a useful signal (the agent didn't have one).

Post-hoc inference produces plausible-sounding reasoning that may be wrong, because the second LLM never saw the original prompt. Capture from the producing context is information; capture from a second LLM is paraphrase.

Why "entity-level" matters

Most tools attribute lines. Selvedge attributes things you actually search for: users.email, env/STRIPE_SECRET_KEY, api/v1/checkout, deps/stripe. The first question after git blame is usually "what's the history of this column", not "what's the history of lines 40–48 of users.py".

Why "changesets" matter

A Stripe billing rollout touches the users table, two new env vars, three new API routes, one dependency, and four functions across the codebase. Tag every event with changeset:add-stripe-billing and you can pull the entire scope back later — even if the original PR was broken into eight smaller ones over a month. None of the line-attribution tools have an analogue.

Selvedge ↔ Agent Trace

Agent Trace (Cursor + Cognition AI, RFC Jan 2026, backed by Cloudflare, Vercel, Google Jules, Amp, OpenCode, and git-ai) is an emerging open standard for AI code attribution traces. Selvedge isn't a competitor to it — it's a compatible producer. Agent Trace is the wire format. Selvedge is the live capture + query layer that emits it.

The design for selvedge export --format agent-trace is published at docs/agent-trace-interop.md and lands in v0.4.0.

When you'd pick Selvedge

When something else is better

Try it in 90 seconds

pip install selvedge && selvedge setup