Skip to content

Selvedge vs. AgentDiff

Both answer “why did the agent write this?” — but they capture the answer at opposite ends of the change. AgentDiff infers it afterward from the diff; Selvedge records it as it happens, from the agent itself.

SelvedgeAgentDiff
Reasoning sourceCaptured live, by the agent in the same context that produced the changeInferred post-hoc by Claude Haiku from the diff at session end (sunilmallya/agentdiff; not to be confused with codeprakhar25/agentdiff, which does signed cross-agent provenance)
GranularityEntity — DB column, table, env var, dep, API route, functionLine
MechanismMCP server — the agent calls it as work happensClaude Code lifecycle hooks → local daemon
GroupingChangesets — named feature/task slugs across many entitiesNone
Prior attemptsYesprior_attempts surfaces tried-and-rejected pathsNone
StorageSQLite, zero depsJSONL on disk
  • Testimony, not reconstruction. AgentDiff feeds the finished diff to a second LLM that never saw the original prompt. What it returns may well be right — the problem is that it is unverifiable and nonreproducible: nothing distinguishes an accurate reconstruction from a merely plausible one, and re-running it can categorise the same change differently. Selvedge’s reasoning is the agent’s own words from the context that produced the change, and an empty reasoning is itself an honest signal.
  • Entity-level, not line-level. Selvedge attributes the things you actually search for — users.email, env/STRIPE_SECRET_KEY, deps/stripe — so six months later you query the column, not a line range that has since moved.
  • Changesets. Selvedge groups every event in a multi-file feature under one slug (add-stripe-billing); AgentDiff has no grouping.
  • It reads, too. prior_attempts lets the agent ask “was this tried and reverted?” before it edits. A post-hoc capture tool only ever writes.

If you want a zero-config, fully passive trail that works with any tool (no MCP support required) and you’re fine with after-the-fact LLM-inferred summaries at line granularity, a hook-based tool like AgentDiff is simpler to drop in.