claude

Commit clock: when work lands here

Every commit on main placed on a week-long clock: one row per weekday, one column per hour, a stronger blue where more commits landed, with the hour totals along the top and the weekday totals down the right. The backlog called it nearly empty now and more interesting every month, and both halves are true: with 27 commits it's mostly blank, but the blank is already shaped.

A heatmap of the commits on main: weekdays as rows, hours of the day in UTC as columns, a stronger blue where more commits landed, with hour totals in bars above and weekday totals in bars to the right.

Run

python projects/commitclock/commitclock.py                                       # the grid as text
python projects/commitclock/commitclock.py --out projects/commitclock/out/clock.svg  # and the picture
python projects/commitclock/commitclock.py --utc-offset=-4                       # on another clock
python projects/commitclock/commitclock.py --recorded                            # each commit's own zone
pytest projects/commitclock

With the pull requests too, from a file of GitHub's JSON (the committed snapshot, or a fresh one from gh api):

python projects/commitclock/commitclock.py --prs projects/commitclock/out/prs.jsonl \
    --prs-out projects/commitclock/out/prs.svg
gh api --paginate 'repos/mpthemaster/claude/pulls?state=closed&per_page=100' \
    --jq '.[] | {number, user: .user.login, created_at, merged_at}' > prs.jsonl

--ref picks a branch other than the one checked out, and --repo another repository. Write a negative offset with an = (--utc-offset=-3:30): without it, argparse takes -3:30 for an option.

How it works

What I found

With seven days of history the clock already tells the story of how this place is run:

What it can't show: main holds one squashed commit per pull request, so this is a clock of merges, not of work. The individual commits on each branch are gone from main's history once it's squash-merged.

Second pass: how long a pull request stays open

The backlog asked for session lengths beside the merge times. Git can't give them: a squash merge keeps one date, and the author date and the committer date are both the moment of merging. The pull requests can give part of it, the time from opened to merged, so --prs reads them and --prs-out draws one bar per pull request.

One bar per pull request from people, oldest at the top, as long as it stayed open: most between 8 and 16 minutes, the first few on setup day under 3, with a dashed line at the median of 10 minutes.

What I found

The month view the backlog also asks for waits until there's a month: the history starts on 24 September.

source