DEV Community

Arthur031221
Arthur031221

Posted on

A local receipt for session evidence and the current Git diff

I built agent-change-receipt for reviewing a coding session after the work is done. It reads one native JSONL session and captures the current Git worktree as a separate source of evidence. The result is a local HTML and Markdown report.

Synthetic report demo

The main design choice is to keep the session and worktree evidence distinct. Calls and results are correlated by session ID and call ID. A result counts only when its structured metadata contains an integer exitCode or exit_code. Duplicate or conflicting records, missing results, interruptions, background commands, and polling records remain unknown.

A command label such as test-like is inferred from command text. It is not a test result. The parser ignores raw command output, user messages, and assistant prose. It never executes commands found in a session.

The Git section describes the worktree at report time. A modified file and a recorded command can appear together, but the report does not say that the session produced or verified that file. This distinction matters when a later edit, manual fix, or another process changed the checkout.

The demo creates a temporary synthetic Git repository, changes two tracked files, adds an untracked path, and writes a synthetic session. No personal transcript data is part of the GIF. The runtime uses Node 20 or newer without runtime dependencies. The report stays local unless a person chooses to share it. Secret masking handles common credential shapes and is best effort, so the files should be reviewed before sharing.

Changed paths include tracked line counts when Git supplies them. Untracked files appear by name, and binary changes have no textual line count. Execution directories stay unknown when no reliable metadata records them.

The project is focused on one receipt rather than a live dashboard or a full session history browser. I would welcome feedback on the report format, the separation between evidence sources, and the native session fields worth supporting.

Project: https://github.com/Arthur031221/agent-change-receipt

Top comments (0)