It had grown into an argument with a reviewer — three sections of
rationale for decisions a reader doesn't have to agree with to use the
thing. Install command up top, then how to run it and what comes out.
The reasoning is still in the code comments and SKILL.md, where whoever
maintains this next will look for it.
The first cut measured the agent's activity and reported it as the
developer's. Rewrites the attribution so every number is one you could
defend to someone who pushed back on it.
What a number now means:
- Projects resolve to a git root, or to the directory the work happened
in when there isn't one. Not basename(cwd), which turned a home
directory into a 49% "project" and split one repo across several rows.
- A session's spend follows the files it touched, reads included, split
across projects. Subagents share their parent's session, so their work
lands on the same project with no special case.
- Claude Code's own machinery — scratchpad, tool-results, ~/.claude, and
this report's own past output — is excluded. It was 82% of the reported
line count.
- Commits are joined against git: authored under the identity git uses in
that repo, AND touching a file Claude Code touched. The old identity
grep counted a snapshot cron's 2,209 commits and claimed the developer
committed on every active day they worked.
- Work with no project — web search, chat tools, dashboards — is named as
research rather than filed under whatever directory the shell sat in.
What's gone, and why:
- The activity/spend breakdown. A turn's cost is ~90% context handling,
half of it re-reading what earlier turns added, so charging it to
whichever tool fired is a modeling choice rather than a measurement —
and the choice decides the answer. On one real month three defensible
weightings put web search at 11%, 28% or 51%. Per-project spend
survives the same test and stays.
- The `git commit` counter. A Bash call carries no working directory, so
a commit in a throwaway fixture repo can't be told from a real one.
Measured 33 against 4.
Also: local calendar arithmetic (active days could exceed the window),
paths normalized so Windows doesn't silently count the scratchpad as the
user's work, HTML written 0600 and refusing symlinks, a CSV export with
formula injection neutralized, print output that stays vector text, and
perforated edges.
The report says which columns sum and which don't, and distinguishes "no
commits" from "git couldn't be read" — unknown is not zero.
A personal Claude Code impact report built from the session transcripts
already on disk at ~/.claude/projects, for the conversation where a dev
has to explain what their usage bought. Produces a markdown report and a
self-contained HTML receipt in the home directory.
Complements session-report, which reads the same transcripts to drive
usage down; this reads them to explain what the usage produced, and
cross-references local git history to tie spend to shipped work.
Two design rules the report is built around: no dollar figures, since a
cost inferred from local token counts won't match anyone's real bill and
inviting "that can't be right" discredits everything next to it; and no
invented "hours saved", since there's no baseline in local data to derive
a counterfactual from.
Mining is local — file I/O and git, no network. Tool calls are grouped
into five activity categories during mining so raw tool names, which
enumerate the dev's connected MCP servers, never leave the script. The
report is published nowhere unless the user asks.