Skip to content

Selvedge vs. AgentDiff

Both address “why did the agent write this?” AgentDiff infers an answer afterward from the diff. Selvedge stores an explanation explicitly supplied by an agent or person, during or after the work.

Selvedge AgentDiff
Reasoning source Explanation supplied by an agent or person; timing depends on when it was recorded Inferred 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)
Granularity Entity — DB column, table, env var, dep, API route, function Line
Mechanism MCP server — an agent or person explicitly logs a change Claude Code lifecycle hooks → local daemon
Grouping Changesets — named feature/task slugs across many entities None
Prior attempts Yes — prior_attempts surfaces tried-and-rejected paths None
Storage SQLite JSONL 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 stores the explanation supplied with a record. It does not verify that the explanation came from the original editing context; an empty reasoning means no explanation was supplied.
  • 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.