Skip to content

Releases: codeprakhar25/agentdiff

v0.1.29 — Intent capture via set_intent MCP tool

22 May 07:49
43c734e

Choose a tag to compare

What's new

Intent capture (Issue #27)

Agents can now record why they made changes before committing. Intent flows from the MCP tool call through to signed traces and PR review comments.

New set_intent MCP tool:

set_intent(
  description: "Extract auth middleware to eliminate duplicate token validation",
  intent_type: "refactor"   // bugfix | feature | refactor | test | docs | security | performance | config | dependency
)

Written as a type=intent event to session.jsonl, picked up by prepare-ledger.py at commit time, and stored in the signed AgentTrace metadata.

In agentdiff report --context:

  • Review Context block shows [refactor] Extract auth middleware...
  • Trace details table gains a Type column
  • JSON report (--format json) includes intent_type

Bug fixes:

  • Fix byte-boundary panic on non-ASCII descriptions ≥ 500 bytes
  • Server-side intent_type enum validation in MCP handler
  • Prune consumed intent events from session.jsonl after finalize (prevents stale intent bleed)
  • Skip session-id matching when session_id = "unknown"

Upgrade

curl -fsSL https://agentdiff.site/install | sh

Or via cargo:

cargo install agentdiff

v0.1.28

18 May 13:45

Choose a tag to compare

chore: release v0.1.28 — fix CI git identity for consolidate workflow

git commit-tree requires author identity; GitHub Actions runner has none
configured by default, causing consolidate to fail on every merged PR.
Adds a Configure git identity step before consolidate in both the live
workflow and the install-ci template so future installs also get the fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

v0.1.27

08 May 07:53

Choose a tag to compare

Summary

  • Fixes Cursor CLI capture on WSL2, including hook execution, path normalization, and transcript lookup.
  • Includes the AgentDiff policy workflow now present on main.
  • Bumps the crate and release artifacts to 0.1.27.

Verification

  • cargo test --locked
  • python3 -m unittest discover -s scripts/tests -p "test_*.py"
  • cargo build --locked
  • python3 scripts/mcp-smoke-test.py
  • cargo build --release --locked

v0.1.26

27 Apr 11:30
b0c4788

Choose a tag to compare

Add AgentDiff context workflow (#8)

feat: add AgentDiff context workflow

Preserve structured context in traces, surface it in reports and file-scoped context, and add a Cursor skill installer so agents can use the workflow consistently.

v0.1.25

26 Apr 16:36
80aef89

Choose a tag to compare

Release v0.1.25

v0.1.23

20 Apr 08:17

Choose a tag to compare

chore: bump version to 0.1.23

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

v0.1.22 — Cleanup: shrink CLI (19 → 13), purge legacy data paths

17 Apr 17:51

Choose a tag to compare

Cleanup release. No new features — smaller code, shorter command list, consistent output.

Command surface shrink (19 → 13)

Six commands folded into flags on existing commands. Every retired surface has a 1:1 replacement.

Before After
`agentdiff log` `agentdiff list --by-commit` (add `--full-prompt` for prompt display)
`agentdiff stats` `agentdiff report` (default `--format text`; keeps `--by-file`, `--by-model`)
`agentdiff export` `agentdiff report --format jsonl`
`agentdiff remote-status` `agentdiff status --remote` (with `--no-fetch` to skip counts)
`agentdiff ledger repair` Removed (was re-serialising data that's already filtered on every read — no real work)
`agentdiff config add-repo` Removed (`init` already registers the repo)

`report` gains a single `--out PATH` flag replacing the old `--out-md` / `--out-annotations` pair.

Legacy data paths removed

None of these had active callers:

  • `refs/heads/agentdiff-meta` branch fallback reads
  • Pre-AgentTrace `ledger.jsonl` on the old meta branch
  • `finalize-ledger.py` dual-write to `agentdiff-meta` and `.agentdiff/ledger.jsonl`
  • `Config::legacy_config_path()` (`~/config.toml`)
  • `auto_amend_ledger` config key
  • `agentdiff init --migrate` flag (no-op warning)
  • `agentdiff ledger import-notes` stub

CLI output unified

  • New helpers in `src/util.rs`: `ok()`, `warn()`, `err()`, `dim()`, `print_command_header`, `print_not_initialized`.
  • Status prefixes collapsed: `!`, `?`, `--`, `✓`, `FAIL` → `ok`, `warn`, `error`, `--`.
  • The 7-line "init not run" block that was copy-pasted across six query commands is now a single helper call.
  • `status` output is column-aligned (prefixes padded to fixed width).

Breaking

Scripts targeting any of the retired commands/flags need to update:

```
agentdiff log → agentdiff list --by-commit
agentdiff stats → agentdiff report
agentdiff export → agentdiff report --format jsonl
agentdiff remote-status → agentdiff status --remote
agentdiff ledger repair → (no replacement)
agentdiff config add-repo PATH → cd PATH && agentdiff init
agentdiff init --migrate → (flag removed)
agentdiff config set auto_amend_ledger … → (key removed)
```

Storage layout is unchanged: `refs/agentdiff/meta:traces.jsonl` + per-branch refs + local buffer at `.git/agentdiff/traces/{branch}.jsonl`.

Tests

21 unit tests + 4 MCP server tests pass on `cargo test --release`. Manual smoke runs of `list`, `list --by-commit`, `report`, `report --format jsonl`, `status`, `status --remote --no-fetch`, `config show` all produce expected output.

Commits

  • refactor: unify CLI output and centralize status prefixes
  • refactor: purge legacy storage and config paths
  • feat: consolidate redundant commands into flags
  • chore: bump version to 0.1.22

v0.1.21 — Opt-in capture, Codex hooks.json, Antigravity rule, configure module split

16 Apr 14:53

Choose a tag to compare

What's new

Opt-in per-repo capture (spillover removed)

All 7 capture scripts now only write data if agentdiff init has been run in the repo (.git/agentdiff/ exists). Silent exit otherwise. Spillover fallback removed entirely.

capture_prompts config key

# ~/.agentdiff/config.toml
capture_prompts = false

When false, prompt excerpts are stripped before reaching git refs or GitHub. Also fixes an inline-comment parsing bug.

Query commands show "not initialized" hint

list, stats, blame, log, diff, show now print a clear message instead of silent empty output when agentdiff init hasn't been run. agentdiff status shows init state as its first line.

Codex: proper hooks.json support

agentdiff configure now writes ~/.codex/hooks.json with UserPromptSubmit (pre-task snapshot) and Stop (capture at session end) events — the correct structured hook system. Old flat-array format auto-migrated. notify in config.toml kept for backwards compat.

Antigravity: GEMINI.md rule

Antigravity has no event hooks. A managed block in ~/.gemini/GEMINI.md now instructs the agent to write attribution JSON directly to session.jsonl (using its own knowledge of what it changed). Gemini CLI hooks in settings.json still fire for the CLI path.
capture-antigravity.py fixed: non-blocking stdin via select(), dead git-diff guessing code removed.

src/configure/ module split

init.rs (was 1300 lines) split into init.rs + src/configure/ with one file per agent (claude, cursor, codex, antigravity, windsurf, opencode, copilot).

Legacy command removal

agentdiff migrate and agentdiff sync-notes removed.

Full changelog

See docs/v0.1.21-release.md for the complete release summary.

v0.1.19 — Attribution accuracy, remote-status, README

14 Apr 10:21

Choose a tag to compare

What's new

Attribution accuracy fixes

Copilot no longer pollutes attribution. VS Code's onDidChangeTextDocument fires on every file save — including saves triggered by Claude Code, Codex, and OpenCode editing from the terminal, and human keystrokes. Copilot events are still captured for stats but are now excluded from winning per-file attribution. Human edits in VS Code now correctly attribute to the git author.

Codex no longer picks up other agents' pending changes. capture-codex.py now snapshots the set of dirty files at task_started and subtracts them at task_complete, so only files that became dirty during that codex task are attributed. Prevents false attribution when multiple agents are active in the same work session.

New command: agentdiff remote-status

agentdiff remote-status

  agentdiff remote-status — github.com/org/repo

  REF                                           TRACES     LOCAL
  ────────────────────────────────────────────────────────────────────────────
  refs/agentdiff/meta                           18         synced
  refs/agentdiff/traces/main                    6          synced
  refs/agentdiff/traces/feature%2Fauth-rewrite  3          synced

Shows all refs/agentdiff/* on origin with trace counts and local sync state. Works with any git remote via git ls-remote — no GitHub API required. Use --no-fetch to show refs and SHAs only (fast, no content fetch).

Storage pipeline fixes

  • finalize-ledger.py now writes AgentTrace format to the local buffer (.git/agentdiff/traces/{branch}.jsonl) so agentdiff list is populated after every commit
  • agentdiff push now always writes the local ref first; GitHub API push is non-fatal (fixes consolidate finding empty refs on non-GitHub remotes)
  • agentdiff init no longer creates a .agentdiff/ directory in the repo root (only .git/agentdiff/ is needed)

README overhaul

  • agentdiff list promoted to hero example with the real column format: COMMIT / TIME / AGENT / MODEL / FILE(S) / LINES / TRUST / PROMPT
  • Added agentdiff stats, agentdiff remote-status, and agentdiff list flags examples
  • Architecture section now documents attribution accuracy logic and the 3-tier storage flow end-to-end

v0.1.18

10 Apr 12:40

Choose a tag to compare

v0.1.18: key registry, multi-key verify, policy enforcement, direct-p…