Guide contents

Stats: what your AI work costs

The Stats tab turns your committed history into numbers: how much AI spend the repository represents, where the tokens went, which models and agents did the work, and — uniquely to Merget — how much of the AI-written code actually survived. It has two sub-tabs, switched at the top of the view: Overview (cost and token analytics) and Developer (per-goal activity).

Measured vs. estimated — read this first. Some numbers here are measured, some are estimated, and the dashboard tells you which is which. Token counts come from what the agent itself reported during each committed session; for prompts where no usage was reported, Merget falls back to an estimate from the committed text. Costs are never pulled from a bill — they are always computed by pricing those token counts against published per-model rates. The Quality & Durability section shows caveat chips (for example "Estimated tokens: 12") counting exactly how many prompts relied on a fallback, so you can judge how solid the totals are. Treat the dollar figures as good estimates, not invoices.

Overview

Cost and token analytics walk your full repo history, so they don't run automatically — click Analyze statistics to compute them (it takes a few seconds on large repos). Once a report exists you can Refresh it after new work lands, and Export the whole dashboard as PDF or CSV. If history changes underneath a finished report, a notice asks you to re-run the analysis.

The KPI row across the top shows:

  • AI Spend — total computed cost in USD, with the prompt count it covers.
  • Tokens — total tokens (input, output, cache, reasoning).
  • Code Durability — the share of AI-written lines still present at HEAD.
  • Efficiency — kept lines per 1,000 tokens.
  • Agents — how many AI tools have worked in this repo.

Below it, the sections:

  • Cost & Tokens — a cost-by-model donut and a token split across Input, Output, Cache read, Cache write, and Reasoning.
  • Models — durability per model, plus a table with prompts, survived and overwritten lines, tokens, cost, and efficiency per model.
  • Agents — adoption share, durability, and cost per agent (Claude Code, Codex, Cursor, GitHub Copilot).
  • Quality & Durability — the survival donut (survived vs. overwritten AI lines), line outcome counts, and the caveat chips described above.
  • Activity over time — daily or weekly charts of spend and prompt volume.
  • Contributors — a card per person with their recent activity, on a shared seven-day timeline so cards are comparable.

A few preconditions: the dashboard needs committed history, so a brand-new repo shows "No statistics data available", and a repo with goals but no committed prompts explains that cost analytics aren't available yet. Cost and token analytics are also local-only — they're computed from your local copy of the history, so a repository you're only browsing remotely shows adoption counts (goals, prompts, steps, contributors, agents) and asks you to open it locally for the rest.

Developer

The Developer sub-tab is the lighter, always-available view of the same history: overview tiles for Goals, Prompts, Steps, Contributors, Agents, an Agent Breakdown showing each author's share of the work, Goal Activity ranking every goal by how many steps and prompts it took, and the contributor list.

Under the hood

Token usage is committed as part of each prompt's transcript when the agent session reports it. The analysis walks every step in history, attributes each AI-introduced line to its prompt, model, and agent, and then checks whether that line still exists at HEAD — that's the durability number; it's measured from your history, not sampled. Costs multiply the committed (or estimated) token counts by a built-in table of published model prices; prompts whose model isn't in the table contribute $0 and are counted in a caveat chip rather than silently guessed. Reports are cached per history state and invalidated the moment new work is committed.


Next: Editor · Related: Home · Collaborators