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 the axes that matter: where reasoning comes from, what unit it's attached to, when it's collected, how it's stored — and whether the tool can tell an agent what was already tried and rejected before it starts.

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

Why "prior attempts" matters

Line attribution answers "who wrote this, and roughly why." It can't answer the question an agent actually has before it starts: "has this been tried before, and how did it turn out?" Selvedge's prior_attempts tool answers exactly that — given an entity, it returns the alternatives that were tried and the paths that got rejected, each with the original reasoning and the reason it was reverted. An agent about to re-add a column that was already pulled for a good reason finds out first, and changes its plan.

It's deliberately conservative: the default only returns the clear "tried, then reverted" signal, so an empty result is a trustworthy "nothing to worry about" rather than noise. No second LLM is involved — it's a templated query over the reasoning agents wrote live. None of the line-attribution competitors surface rejected paths at all.

See the worked demo transcript — an agent asked to keep mobile users signed in calls prior_attempts, learns the DB-token approach was tried and reverted (revocation cost), and pivots to a refresh-token endpoint instead of repeating it.

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