- Every commit made during an agent session carries the session id and a step number as commit trailers.
- Every such commit gets a session note: what the agent said it was doing, which tools it used, which files it touched, how much of the commit it wrote. Redacted before it is written. Stored as a git note, never in the tree.
- Every tool call passes a gate before it runs: destructive commands are refused, risky ones require the agent to ask you first, and edits to gate-bearing files need a human. The rules are a JSON file you own.
- The full session summary goes to a local ledger in your home directory. Nothing leaves the machine unless you push it.
- Every session carries its tokens and estimated cost, priced with a table you control, so the digest answers what agents cost this month as well as what they changed.
- Findings that are not live until committed wait for the commit, then reach a person on one card with evidence and the record’s proposal. The answer is written into the commit: who agreed, to what, with what scope and reason.
- The next session can ask the record: why a file looks the way it does, who wrote these lines, what was tried before, what to hand off. Four commands, and skills that teach the agent to use them.
Why git, and why not a service
The provenance of a change should live where the change lives and be readable with the tools every engineer already has.git log shows which commits an agent made. git log --show-notes=sessions shows what it was thinking. A pull request diff is still the diff. Nothing new to log into, nothing that stops working when a vendor does.