Repository navigation
feat(cli): add 'record' subcommand — capture traces from any callable (E3) - #23
Merged
Merged
Conversation
… (E3) - recorder.py: resolve 'module:function' targets (CWD import like pytest), time execution, capture output/errors as canonical AgentTrace - CLI: 'agentdiff record mod:fn --input JSON|@file --out trace.json' failed runs still recorded (exit 1) — diff them to see what broke - E1 compat preserved: 'agentdiff base.json cand.json' still means diff via click.Group parse_args patch (works in CLI + CliRunner) - 19 new tests (319 total), cookbook record_callable.py, README + quickstart docs
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
agentdiff record module:function --input '{...}' --out trace.json— runs any callable once and captures a canonical AgentDiff trace. Kills the biggest onboarding wall: "how do I get a trace?"Why
E3 from the release plan (0.4.0 Capture, Fri 2026-08-29). Visitors bounced at setup because they had no trace to diff.
recordmakes the install → record → diff → gate loop work in <5 minutes with zero telemetry.How
recorder.py: resolvesmodule:function/module:Class.method(imports from CWD, pytest-style), times execution, captures return/errors as a canonicalAgentTrace(single step, Generic format)agentdiff base.json cand.json(no subcommand) still meansdiff, via a click.Groupparse_argspatch that works in both the real CLI and CliRunnercookbooks/record_callable.pydemo, README + quickstart updatedTesting
make lintclean ·pytest319 passed ·pnpm run buildcleanChecklist