coderot

Metrics

Every number on the dashboard comes from your repo’s git history and its code, measured in your CI. Nothing is estimated by a model, and nothing about AI is guessed.

Code health
How hard the code is to maintain, per 1,000 linesCognitive complexityDuplicationHotspots
AI signals
Which commits and PRs agents wrote, from the records the tools leaveCoverageWhen agents took over
PRs
PRs with AI signals against the rest, over 6 monthsSizeComplexity addedFixed within 30 daysReview
What it points out
Where the numbers say to look, and what to tryWhere to look firstWhat to tryWorst changesJumps

The first run measures the repo at one commit a week for the last 12 months. After that, every push to the default branch adds a snapshot of the latest commit. coderot keeps one a day for the last 90 days and about one a week before that.

Trends are per 1,000 lines of code, so a growing codebase doesn’t look worse just for growing. Test files are measured but kept apart, so these numbers are about code (what counts as a test). Duplication is measured on the latest commit and once a month.

Commits, here and everywhere on the dashboard, are the default branch’s own: a merged PR counts once, however it was merged.

Code health

Cognitive complexity

The headline metric: how hard code is to read. A file’s complexity is the sum over its functions, and the repo’s is the sum over its code files.

It follows SonarSource’s public specification and adds 1 for each break in the straight flow of code: if, else if, else, ?:, switch, loops, catch, jumps to a label, each run of like && / || operators, and recursion. Nested structures pay 1 more for each level they’re nested in. ?., ??, try and finally are free.

Two languages score differently by design, so compare a Go or Rust repo with repos in its own language:

Checked against other tools on open-source repos, counting the functions both measure:

Language Checked against Repos Same score
TypeScript, JavaScript Sonar’s analyzers 11 96%
C# Sonar’s analyzers 11 99%
Python complexipy 8 98%
Go gocognit 8 99.9%
Rust rust-code-analysis 8 93%

The rest:

Cyclomatic complexity

How many paths run through a function, shown per function on a file’s page. Cognitive complexity weighs how hard those paths are to follow; this one only counts them.

It’s 1 plus each decision point: if, else if, case, loops, catch, &&, ||, ?? and ?:. Also:

Duplication

Copies of code within the repo, shown as duplicated lines per 1,000 lines of code, code files only.

A copy is the same run of at least 50 tokens and 5 lines in two or more places. Comments don’t count, so a copy with a comment of its own still matches. C# using lists are left out.

Hotspots

Complex code that keeps changing, where maintenance costs the most. A hotspot is a code file changed by 10 or more commits in the last 90 days, with a cognitive complexity of 100 or more. The hotspots table ranks files by how often they changed times how complex they are.

Nesting, parameters and length

Per function: its deepest stack of if, switch, try and loops, its parameters, and its lines of code (a nested function’s lines count toward its parent too).

What counts as a line and a function

Lines of code are non-blank lines that aren’t only a comment. A line with code and a comment after it counts.

Functions are methods, constructors, accessors, operators and local functions. Members without a body aren’t functions: interface and abstract members, and TypeScript overload signatures. A lambda counts toward the function it’s in, unless that function has no control flow of its own: then the lambda is measured as its own function.

By language:

Which files and syntax versions each language covers is on Languages.

AI signals

coderot counts a commit as AI when the tools left a record of it, and never guesses from how the code looks. The records, most precise first:

What each tool adds by default, and the setting that turns it off: Should you keep “Co-authored-by: Claude”?

A PR counts as AI when one of its commits has a signal, and as its first agent’s. Without Git AI, all of its lines count as AI, which overstates it.

Attribution coverage

No signal doesn’t mean human. Many agents leave no trace unless asked to, so a PR without a signal is unknown. That’s why attribution coverage, the share of the last 3 months’ merged PRs with an AI signal or Git AI notes, stands next to every AI number. Below 50%, the dashboard says how much is unknown and holds back the suggestions that rest on it.

When agents took over

The month the share of merged PRs with an AI signal passed 50% and stayed above it. It’s the marker on every chart. Where signals are too few to tell, you can set the day your team started with agents yourself.

PRs

These cover PRs merged in the last 6 months, PRs with AI signals against the rest. A share needs at least 10 PRs in a group.

The last two are facts, not verdicts: a PR talked over in a call or written in a pair leaves no comments. A PR merged by rebase has no PR boundary in git, so it’s left out.

What drove it splits the same PRs three ways: by who wrote them (each agent, and people or unknown), by size, and by whether they were fixed later.

What the dashboard points out

Where to look first

Up to 3 folders whose complexity rose beyond their own rate, from the month agents took over (or over the whole year without one) to now.

Each card ends with one thing to consider, never a verdict.

What to try

Suggestions for how the team works with agents, each with its numbers:

The ones that rest on AI signals show only from 50% coverage. Mark the day you try one with We tried this, and it shows as a line on the charts.

Worst changes this month

The 10 code files whose complexity rose most between the snapshot 30 days ago and now, each with the PRs that changed them since and their agents. A new file counts with all its complexity, unless git sees it as renamed, it’s mostly a copy of an existing file, or its code moved from a file that shrank in the same PRs: then it’s labeled so.

What drove the jumps

The 3 biggest rises in complexity per 1,000 lines between two snapshots in a row, and the 2 biggest in duplication between two monthly ones, each at least 1%. Each names the 3 files that rose most and the PRs that changed them. Deleting simple code also raises a ratio, so each jump shows the raw change and lines deleted next to it.