How the number is computed
The authorship figure answers one question: of the lines added to this repository, what share arrived in a way that indicates a machine wrote them. It is not a measurement. It is an inference from evidence, and this page states exactly which evidence.
Why not commit trailers
The obvious approach is to look for AI markers in commit metadata:Co-authored-by: Claude trailers, bot identities, “Generated with” declarations. That approach is precise when it fires, and it almost never fires.
Most AI-assisted work leaves no trace. Someone prompts an assistant, pastes the result, and commits it under their own name with the message update. There is no trailer, no bot account, and no declaration. A detector built on trailers reads that repository as human.
The first version of this instrument made exactly that mistake. On a repository that was entirely AI-written, it reported 1% declared and a 36% upper bound. The metadata was empty because the metadata is usually empty.
What it measures instead
How code arrives in a repository, rather than what style it is written in. Human work is iterative: it arrives in pieces, gets deleted and rewritten, and the commit message tends to scale with the size of the change. Machine work arrives complete.
Lines added per second of wall-clock since the previous commit. Sustained human typing runs about 0.6 lines per second. A commit that adds thirteen thousand lines ninety-five seconds after the last one is 137 lines per second, which no input method produces except a paste.
Code written in place carries deletions, because people change their minds mid-edit. A large commit with essentially no deletions is code that was written somewhere else and pasted in whole. Measured as the ratio of deleted to added lines, and only applied to commits large enough for the ratio to mean anything.
A person who writes thirteen thousand lines describes what they did. A six-character message on a thirteen-thousand-line change is the message of someone who did not write the code and has nothing to say about it. Measured as characters of message per order of magnitude of change.
Humans work in a file or two at a time. A single commit that creates or rewrites an entire project at once is a generation event.
Total output divided by the wall-clock span of the repository's history. A repository that produces its whole codebase in two minutes was not developed incrementally. This raises the estimate toward certainty but cannot establish it alone.
Committed configuration for an AI tool: .cursorrules, CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .aider.conf.yml, .windsurfrules, and about thirty others. Presence proves the tooling was used. It does not prove how much code was written with it, so it raises a floor rather than the estimate.
How the signals combine
Velocity gates the score. Everything else corroborates it.
This is the central design decision, and it came from measurement rather than reasoning. The size signals — deletion void, message terseness, file burst — are all proxies for “this commit is large and arrived whole”. Humans produce commits like that constantly: refactors, releases, imports, vendored drops, branch merges. Run across eight well-known human repositories, treating those as independent evidence produced a mean of 55%, with rust-lang/rust at 80% and lodash at 88%. That is a broken instrument.
Velocity is different in kind. It measures elapsed time against output, and a person cannot type faster than a person. A commit that adds thousands of lines within minutes of that author's own previous commit is the one thing here that human work does not produce.
So the rule is:
- No velocity evidence. The commit is capped low, no matter how large it is or how terse its message. Size alone is not authorship.
- Velocity present. Size signals corroborate, raising the estimate toward certainty.
The repository figure is then weighted by lines, with a per-commit cap so a single enormous commit cannot outvote the rest of the history.
What is excluded entirely
Some commits carry the arithmetic of generated code while having nothing to do with authorship. These are removed before scoring, not discounted:
- Merge commits. A merge's line counts aggregate work authored elsewhere. On rust-lang/rust, 57% of commits are merges and they carry 89% of all additions. Scoring them was the single largest source of error in the first version.
- Vendored dependencies and lockfiles. A package-manager dump arrives as one enormous commit with no deletions and a terse message. On lodash, “Add npm-package” adds 40,050 lines across 1,046 files.
- Automation accounts. Dependabot, Renovate, CI and release bots.
Release and build commits are discounted rather than excluded, because they bundle build output from source authored earlier.
Where this is wrong
Being explicit about failure modes is the only way the number is usable.
- A human pasting their own code. Someone who writes code in one repository and copies it into another produces the same arithmetic as a generation event. The bulk-import discount reduces this but cannot eliminate it.
- AI used in small increments. If someone accepts a twenty-line suggestion, reviews it, and commits it, the velocity and size signals never fire. That work is AI-assisted and this instrument will read it as human. This is the largest blind spot.
- Squashed history. A repository whose history was squashed into one commit has the same shape as a generated one. If the squash was of human work, the estimate is wrong.
- Generated code that was then heavily edited. Deletions and iteration messages will pull the score down, possibly below where it belongs.
What the confidence level means
Confidence describes how much evidence exists, not how high the number is. A repository with two commits can produce a high estimate at low confidence, and that is the honest reading: the arithmetic is unambiguous but there is very little of it.
- High. Thirty or more commits analysed, with at least five carrying strong or definitive signals.
- Medium. Eight or more commits, with at least two strong signals.
- Low. Everything else. Treat the figure as indicative.
Verifying it
The engine is tested against real repositories with known or strongly inferable authorship, not just invented cases.
Eight well-known human codebases — rust, node, jquery, lodash, linux, express, chalk, got — average 15.8% with a maximum of 35%. A repository known to be entirely AI-written, with two commits and no metadata of any kind, reads 95.8%.
Those numbers are enforced as regression assertions. If a change pushes the human mean above 25%, or drops the known-AI repository below 85%, the test fails.
Every commit and every signal behind the number on any repository page is expandable. If a commit is scored in a way you disagree with, the reason is shown in the same place as the score.