Before you begin
- View Pull Requests and Repositories to open the Code page.
- View Source Code to see the source of a file. Agent Golf reads the file from GitHub for each view and does not keep it.
- View Team Activity to see the spend of all users. Without it, the page counts only the cost of your own sessions.
Spend and rework by path
The page starts with the repositories. Select a repository, then a folder, to go down the tree. A sentence at the top answers the question for the current place, for example “Your team spent $41.00 on src in this period.” Three tiles follow: Spend, Rework Cost, and Rework Share.
How Spend splits:
- Each pull request splits its attributed cost over its files by changed lines. A folder is the exact sum of its children.
- Lockfiles, generated files, and snapshots take no share. When no file of a pull request has a share, for example a change of only binary files, each file takes an equal share.
- Open and closed pull requests that did not merge do not count.
- A pull request with no file list has no path. The Spend tile of a repository includes its cost and names it apart, for example “$17.00 from pull requests with no file list”.
- Spend includes no CI cost.
- It uses the same rule as Rework Rate: only corrective changes inside the rework window, on earlier pull requests with an authored session. For the same period, the Rework total of all repositories equals the rework cost of the team’s Rework Rate tile.
- Rework Window above the table sets how long after a merge a later pull request still counts as rework: 3, 7, 14, or 30 days. The default is 7 days. Your browser keeps the choice, and the Rework Rate tiles and the pull request pages use the same window.
Source view
Select a file to open it. With View Source Code, the page shows the source of the file with a heatmap of the period, then the pull requests that changed the file. The file is the version after the newest change of the period on the default branch. Choose what the heat shows:- Cost: what the period spent on each line. A line takes the cost of the changes that wrote it and of the lines that it replaced, so a line that many changes rewrite gets hotter. Inside one changed block, the cost splits evenly over the lines, so a line value is an estimate. The lines, the removed code (On Removed Code), and the cost that has no line (Not on a Line) add up to the file’s spend.
- Rework: the later pull requests that corrected each line, by the same rule as Rework Rate. Other rewrites add no heat. The file’s rework cost equals its value in the table.