AI Lines of Code measures coding volume associated with AI tool usage. The dashboard surfaces it from two complementary sources — vendor-reported Copilot telemetry, and PR-level diff sizes from Git — so you can compare AI-tagged and non-AI work at the same scale.
What it measures
Copilot LOC — sum of
loc_added_sumreported by Copilot's telemetry, aggregated for the period.PR-level Lines of Code — total
lines_added + lines_deletedfrom merged PRs in the period, used to build the AI-tagged vs non-AI comparison.Avg Lines per PR (AI-tagged) — total AI-tagged PR lines divided by the count of AI-tagged PRs.
Avg Lines per PR (non-AI) — same calculation for the non-AI cohort.
How Leanmote calculates it
copilot_loc = sum(loc_added_sum) -- vendor-reported Copilot telemetry pr_size(pr) = lines_added(pr) + lines_deleted(pr) avg_lines_ai = sum(pr_size) over AI-tagged PRs / count(AI-tagged PRs) avg_lines_non_ai = sum(pr_size) over non-AI PRs / count(non-AI PRs)
What's included and excluded
Copilot LOC is pre-aggregated by GitHub before Leanmote receives it; line counts already account for whatever exclusions the vendor applies in the telemetry pipeline.
PR-level Lines of Code is unfiltered today. Renames, generated files, lockfiles, vendored code, and migrations all count toward
pr_size. There's no per-workspace exclusion configuration available right now.The same formula and the same lack of exclusions apply equally to AI-tagged and non-AI cohorts, so the comparison between them is internally consistent — just be aware the absolute numbers can be inflated by mechanical churn.
How to interpret it
AI PRs larger than non-AI PRs — AI is being used to draft larger changes. Watch review latency carefully; large PRs are slower to review.
AI PRs about the same size as non-AI — AI is augmenting normal sizing decisions, not replacing them.
AI PRs smaller than non-AI — usually indicates AI is being used for surgical fixes or short boilerplate.
Outlier PRs distort the average — a single huge dependency bump or generated-code commit can move the cohort average sharply. Use the trend across weeks rather than a single number.
What to do about it
If AI PRs are systematically larger, coach authors to slice AI-drafted changes into smaller PRs.
Pair with AI Lead Time Comparison — if AI PRs are bigger and slower in review, you've found a workflow to fix.
If your repos have a lot of generated code or dependency churn, treat the absolute numbers as directional only and focus on the AI-vs-non-AI delta.
Related metrics
AI Lead Time Comparison
AI Intensity
AI Governance metrics overview
