Skip to content

v2.28.0 ·

Cost records leave the checkout

Every session I ran left my checkout dirty. Not with my work. With aidlc's own bookkeeping: the cost ledgers and the claim log, written into files git tracked. 394 of them, in this repo.

The dirt got in the way of everything. git pull refused. git worktree remove refused. The release script refused, so it grew a helper whose only job was to commit cost ledgers before releasing. Since September that produced 39 "commit cost ledgers" commits and about 63 "record claim release" commits. None of them said anything a person would ever read.

Where the records live now

Inside a git repository, the ledgers and session logs now live in the git common directory, under aidlc/records/, next to the claims and the worktree registry that already sit there. Every worktree of the repo reads and writes the same files. Git never tracks them and never pushes them. Outside git, nothing changes.

Upgrading moves what you already have. Run aidlc doctor --yes and it appends every old record to the new file, skips any line already there, then untracks and deletes the old files and adds the ignore lines. Until you run it, every report reads both places and counts each record once, so nothing drops in between.

I checked the part I cared about most on a copy of this repo. Before the move, aidlc metrics --json listed 205 instances costing $8,497.27. After it, the same 205, the same $8,497.27, not one instance different.

Closing by hand now finishes the job

When I closed an instance myself after merging, it left a retrospective waiting, a worktree, and sometimes a stale main. Now aidlc transition in the primary checkout starts the same retrospective autopilot runs, in the background, held to the same limits and the same check of what it may commit. It commits on main and pushes nothing; my next push carries it. Then it removes the worktree, unless it has uncommitted changes, its branch has commits main lacks, or I ran the transition from inside it. It says which.

Sessions also bring main up to date before reading state, when that is a plain fast-forward.

What it gives up

The records are this machine's now. A fresh clone starts with no cost history, and the metrics and blog totals read only what this machine holds. I chose that over inventing a way to share them. And until aidlc doctor --yes runs in a worktree, an old ledger there is ignored but still on disk, so removing that worktree by hand would lose it.