Blog / Other resources

How much of our code is written by AI, and how do I measure it?

The share of lines that AI writes is easy to count. The share of finished work that AI delivers is the number that matters.

Why are lines of code the wrong unit?

  • AI tools write many lines fast, so a line count makes AI look larger than its real share of the work.
  • Lines do not show the magnitude or the complexity of a change.
  • Lines do not show if the code shipped, or if it came back as rework.

How do you measure the AI share of your work?

  1. Group the work by who did it: engineers without AI tools, AI-assisted engineers and AI agents. Count each pull request in one group only.
  2. Score each finished pull request and ticket in delivery points.
  3. Read the share of delivery points from each group, each month.
  4. Add cost and quality: the cost per delivery point and the defect rate of each group.
Unit What it shows Use it?
Lines written by AI Volume of code No, it makes AI look larger
Suggestions accepted Use of the tool Only as a use signal
Delivery points by group Share of finished work Yes
Cost per delivery point by group What each unit costs Yes

How Pensero helps

Frequently asked questions

Is a high AI share good?

Only if the cost per delivery point goes down and quality holds.

Do I need to tag AI code by hand?

No. Pensero reads the code and the tickets.

What do I do with the result?

Decide where AI agents can take more of the work, then measure again.