Trace a defect back to the session that shipped it
Attribution answers which agent session, prompt and developer produced a change, and what it cost. The Accountability ledger is where those answers meet: one plain sentence per loop, from the session to the pull request, the defect it introduced and the lesson that now guards it. This page gets you to a first attributed session and shows how to read a loop.
Watch it
Read the narration
- 0:00 A dashboard shows dollars saved.
- 0:02 Nothing shows the work behind the number.
- 0:06 A counter is not evidence.
- 0:08 The ledger tells each loop as one sentence.
- 0:13 Every hop carries the confidence band its producer recorded.
- 0:17 Dollars saved is the tracked cost of the session that introduced the defect.
- 0:23 Open loops name themselves.
- 0:25 Where the history is thin, it reads not yet measurable.
Synthetic example. Read the guide
How to
RepoOps installed and tracking at least one local git repository (see Install).
Claude Code sessions run in that repository on this machine. Nothing else to configure and no API key: RepoOps reads the session logs Claude Code already writes.
- Run one session the way you already do.
Nothing about how you work changes. RepoOps reads what Claude Code writes to disk and joins it to git, so each session gets its files, its length and its cost. For an exact link between a commit and its session, run
npx repoops installin the checkout once: it adds a git hook that stamps a Session-Id trailer on each commit. - Open Attribution, then the Changes tab.
Attribution in the sidebar opens the section's page, with four tabs: Changes, Agent sessions, Scorecards and Change risk. On the Changes tab, pick the repository above Commit coverage; The accountability ledger further down reads that repository. With no repository tracked, it says so and reads nothing.
- Read the four numbers on Every loop.
Measured dollars saved by lessons, open loops, closed loops, and lessons in the graph. Below them sits one story per loop over the last 90 days, with open loops that carry an incident first, 20 at a time. The strongest prevented loop, above it, tells the loop that saved the most end to end.
- Press Trace the chain on a story.
The sentence expands into its hops, left to right: session and cost, commit, pull request, defect, incident, lesson. The strongest prevented loop shows the confidence band each producer recorded on its hops: exact, strong, weak, likely or unattributed. The raw graph card counts the nodes by type and, on Draw the accountability subgraph, draws only the nodes on a chain.
- Narrow the list.
All loops, Saved and Open pick the loops. All time, 90 days and 30 days bound the window further, and Dollar impact only keeps loops that saved money, recorded a catch or caused an incident. When the filters empty the list, the card says No loop matches these filters and offers Clear the filters.
- Close an open loop with a lesson.
On a loop that reads open loop, press Save as lesson. Three fields open under the story, two filled in from the defect: When does it recur, What went wrong, and The fix: what to do instead. All three are required. Save the lesson writes it to the repository brain, and the ledger reads again with the loop closed.
- Check whether a lesson worked before you quote a number.
Closed loop, under Did the lesson work, splits merged pull requests at each lesson's first application and compares the defect rate before and after. With fewer than two runs on either side the row reads not yet measurable. Can the before and after be measured yet lists what is still missing: 5 incidents before the boundary, 5 after, and 1 catch by a guard the loop produced.
- Review one week when you need a dated record.
Switch Full ledger to Week audit and pick an ISO week, or step with the arrows. Policy this week shows that week's signed verdicts and its exceptions. A week older than the 90-day read is empty because it was never read, and the empty state says so.
Use cases
An open loop nobody has guarded
- Situation
- A defect was traced to the commit that introduced it and the pull request merged weeks ago. No lesson names that defect, so nothing would flag it if it came back.
- You do
- Pick Open, press Trace the chain to read the hops, then press Save as lesson and fill in the fix.
- You see
- The lesson is written to the repository brain and the loop no longer reads open. Whether it changed anything is answered later by the closed-loop panel, once there is run history on both sides of it.
Someone asks if a lesson moved the defect rate
- Situation
- A lesson has been applied several times and the summary card shows a dollar figure next to it. A lead wants to know whether defects actually went down.
- You do
- Read the lesson's row in Closed loop: the delta, how many times it was applied and since when, the runs after the boundary and the graded band.
- You see
- Either a before rate, an after rate and the gap in percentage points, with a rise shown as a rise, or the words not yet measurable. The panel never prints a rate it could not compute.
Expected outcome
Next step: Nothing in the window ties a defect to a commit, or no lesson names one. That is an honest empty. Trace an incident or write a lesson and the loop appears on the next read.
Next step: Press Clear the filters. A loop older than 90 days is outside the read window by design, and no setting widens it.
Next step: Fewer than two merged pull requests on one side of each lesson's first application. Wait for run history.
Next step: Git and database inputs refresh on a 10-minute backstop. Reload after it expires, or lower REPOOPS_ACCOUNTABILITY_ARTIFACT_MAX_AGE_MS in the data directory's .env.
Next step: That pass needs ANTHROPIC_API_KEY and has no fallback. Propose edges works without a key.
What else to consider
How much to trust a band
Exact and strong count as evidence; weak reads as possibly and never counts toward a total. The git identity on a machine is not treated as evidence of who wrote a line, because a commit author says who committed. A recorded catch is not proof the defect would have shipped, and the closed-loop number is a defect rate over merged pull requests, not a claim about prevention.
Which AI tool wrote the merged work
A merged pull request can carry AI evidence two ways. A co-author trailer (Co-authored-by: Name <email>) is parsed from the merge commit, anchored to a line start, and its name and email are checked against a table of 14 vendors: GitHub Copilot, Devin, Claude Code, Cursor, Windsurf, Codegen, CodeRabbit, Bugbot, Google Jules, Codex, Sweep, OpenHands, Amp and Aider. A pull request whose git author is itself a vendor identity, as review bots and autonomous agents produce, matches the same table with no trailer.
Matchers are narrow on purpose: Claude Code matches the Anthropic noreply address or a name that is exactly Claude, alone or followed by a model family word, so a person named Claude Dupont never matches. A match lands in the co-authored tier, weaker than a signed attestation and stronger than a classified guess. FleetView's Merged-work output share table shows the result per tool.
Cost, egress and storage
The ledger, the week audit, the closed loop and commit coverage make no model call. With the brain switch on, the desktop sends their summaries to your team once an hour with the team brain; What leaves this machine on Privacy and egress lists each field. They read records other features already wrote in the repository brain (causal links, incidents, lessons, prevention events), merged pull requests from git and session outcomes from the local database, at most 500 rows per producer. The two prose passes on the same tab call Anthropic on your key when one is set, and hold their output as proposals until you press Approve selected.
Dollars saved
A saving is priced only when the lesson traces back through its causal link to a session with a tracked cost. An event that cannot be priced is counted as unpriced, never as zero.
On the hosted dashboard
On repoops.ai, Attribution lists the Accountability rollup under All tools: the team's last 30 days as two totals and one entry per day that carried a measured saving, from the outcome events each desktop streams. When a repository's desktop has the brain switch on, it also sends the ledger once an hour with the team brain, and the Changes tab of Attribution on repoops.ai shows it: one story per loop with the session ids, costs, commit hashes and pull requests behind it, the strongest prevented loop, the week audit for any of the last 13 weeks, whether each lesson worked, and commit coverage with the line lookup. Saving a lesson from an open loop stays on the desktop, which holds the brain it writes to. When the window holds more than 5,000 events it counts the most recent 5,000 and says its totals are a floor. A personal repository never rolls up.
Where to go next
To trace a production alert rather than a defect, read the incident correlator guide. To find the run that failed and what it spent, read Agent traces.