X-01EnterpriseP-01Pricing
ReportFirst edition · October 2026

The Impact of AI on Code Quality, 2026

AI is helping developers ship more code, but it is also accelerating complexity that compounds fast. Left unchecked, that complexity will build up silently, in code that is becoming slower and riskier to change.

Download the PDFBenchmark your codebase

Ask AI about this report

DWG R-03Kerno resources · report
Rev2026.10
Scale1 : 1
Sheet3 of 3
Complexity after AI adoptionMedian codebase
+50%more complexity in new code since AI adoption
Commits
201,576
Codebases
46
Authors
6,847
Lines of code
16M+
Kerno Codebase AnalysisOct 2024 to Oct 2026

Key takeaways

  1. 01+50%decision points per 100 new lines

    New code is denser.

    Since AI adoption, every 100 new lines carry 8.1 decision points (if statements, loops and similar), up from 5.2. That is 50% more paths to understand and test.

  2. 02+71%production code per engineer

    Each engineer ships 71% more code.

    In the median codebase, each engineer now writes 424 production lines a week, up from 293. The 71% is the median of each codebase's own change; the change between those two medians is 45%. Team size hasn't changed in any consistent way.

  3. 03+43%follow-ups on AI-marked commits

    Less code is thrown away, but AI commits are revisited more.

    The share of new code rewritten within 90 days fell from 18% to 12%. AI-marked commits are revisited 43% more often than other commits and are 17% more likely to add a hard-to-test function.

  4. 048.3%of commits change tests, up from 4.7%

    More testing hasn't reduced bug fixes.

    Test commits rose from 4.7% to 8.3% of all commits, but bug fixes still make up a quarter. One possible reason, which the data can't confirm, is that testing has kept up with the volume of code and fallen behind its complexity.

  5. 0510.3decision points per 100 new lines in October 2026, from about 5

    Complexity was flat until 2025, then rose.

    It held near 5 decision points per 100 lines from 2022 through 2024 and reached about 10 by October 2026. Codebases where AI use isn't marked also rose, but codebases that adopted AI rose faster.

  6. 0669%of AI-marked commits signed by Claude

    Claude-marked commits are bigger.

    Claude signs 69% of AI-marked commits, largely because Claude Code marks commits by default and most other tools don't. In the same codebases, Claude's commits are 54% larger than unmarked ones and are revisited 55% more often.

  7. 07+42%decision points per 100 new lines by late 2028, on the current trend

    Complexity keeps rising.

    On the current trend, new code will carry 42% more decision points by late 2028, rising from 9.0 to 12.8 per 100 lines. If growth keeps compounding at 3.5% a month, the increase would be 128%, to 20 per 100 lines. Every extra branch is another path to reason through, test and maintain.

Introduction

Since AI arrived, new code carries more complexity, and it's compounding faster

This is the first edition of The Impact of AI on Code Quality, Kerno's study of how AI is changing the code teams ship. In under two years, AI coding assistants and agents have gone from experiment to the default way much software is written. To see what this means for the codebases themselves, we analyzed 201,576 commits across 46 open-source projects between October 2024 and October 2026, and traced complexity back to October 2022.

New code got denser, and its complexity grows faster each month.

  • 8.1Decision points per 100 new lines, up from 5.2. About 50% more paths to understand and test, in pull requests that are already larger than before
  • −0.4%Monthly change in complexity from 2022 to 2024, when it was flat and even eased slightly
  • +3.1%Monthly growth in the complexity of new code since January 2025, or about 44% a year
  • +14%Excess complexity across whole codebases after AI adoption. The build-up is slower, but still real

Most teams won't see this, because the industry measures delivery, not structure. DORA metrics track how fast teams ship, not how each change reshapes the codebase. That gap was manageable when engineers understood all the code they shipped. With agents writing more of it, we expect the problem to stay hidden until it shows up as incidents and stalled features.

Finding 1

Since AI adoption, new code carries 50% more decision points per 100 lines, and complexity growth has gone from −0.4% to +3.1% a month

A decision point is any place where code can take one of two paths, such as an if, a loop or a case in a switch (McCabe, 1976). Each one is another path an engineer has to understand and a test has to cover.

The rise is recent. From October 2022 to December 2024, complexity held steady at about 5 decision points per 100 new lines. From January 2025 it began to climb, slowly at first and then sharply in 2026, reaching 10.3 in October 2026 (Exhibit 1). The median across all codebases grew about 3.5% a month. The typical codebase's own growth was 3.1%, the figure in this section's heading (Appendix C).

Exhibit 1

Complexity held near 5 for two years, then climbed to about 10

Decision points per 100 new lines, median codebase each month, October 2022 to October 2026

048122023202420252026Period covered by the rest of this reportOctober 2022: 5.7 (middle half 4.46 to 7.4, 29 codebases)November 2022: 5.57 (middle half 2.4 to 6.52, 31 codebases)December 2022: 4.38 (middle half 2.82 to 6.39, 36 codebases)January 2023: 5.19 (middle half 3.76 to 7.12, 35 codebases)February 2023: 3.96 (middle half 2.62 to 5.96, 39 codebases)March 2023: 4.9 (middle half 3.48 to 6.43, 35 codebases)April 2023: 5.3 (middle half 3.45 to 7.15, 41 codebases)May 2023: 4.86 (middle half 3.62 to 7.62, 35 codebases)June 2023: 4.44 (middle half 3.16 to 6.88, 39 codebases)July 2023: 4.52 (middle half 3.01 to 5.81, 38 codebases)August 2023: 5.85 (middle half 4 to 7.32, 38 codebases)September 2023: 4.72 (middle half 3.46 to 6, 37 codebases)October 2023: 4.73 (middle half 2.65 to 6.58, 39 codebases)November 2023: 4.12 (middle half 3.37 to 6.63, 37 codebases)December 2023: 4.53 (middle half 2.92 to 6.86, 39 codebases)January 2024: 5.21 (middle half 3.14 to 6.08, 36 codebases)February 2024: 4.34 (middle half 3.46 to 5.83, 37 codebases)March 2024: 4.29 (middle half 2.33 to 6.38, 38 codebases)April 2024: 5.11 (middle half 3.52 to 6.99, 38 codebases)May 2024: 3.98 (middle half 1.59 to 5.34, 40 codebases)June 2024: 4.63 (middle half 3.19 to 7.88, 39 codebases)July 2024: 5.22 (middle half 3.23 to 7.16, 39 codebases)August 2024: 5.3 (middle half 3.62 to 6.27, 35 codebases)September 2024: 4.88 (middle half 3.58 to 7.47, 37 codebases)October 2024: 5.76 (middle half 3.32 to 6.98, 38 codebases)November 2024: 4.64 (middle half 3.52 to 6.51, 36 codebases)December 2024: 5.03 (middle half 2.6 to 6.93, 30 codebases)January 2025: 4.51 (middle half 2.82 to 5.77, 36 codebases)February 2025: 4.9 (middle half 3.03 to 6.68, 38 codebases)March 2025: 5.81 (middle half 3.86 to 6.34, 36 codebases)April 2025: 4.8 (middle half 3.49 to 7.32, 37 codebases)May 2025: 5.51 (middle half 3.95 to 6.61, 36 codebases)June 2025: 5.58 (middle half 3.5 to 7.23, 36 codebases)July 2025: 5.65 (middle half 4.05 to 7.18, 39 codebases)August 2025: 5.4 (middle half 3.92 to 6.96, 35 codebases)September 2025: 5.98 (middle half 3.76 to 8.82, 36 codebases)October 2025: 5.73 (middle half 4.27 to 8.39, 37 codebases)November 2025: 5.92 (middle half 4.95 to 7.38, 36 codebases)December 2025: 5.93 (middle half 4.12 to 7, 36 codebases)January 2026: 6.34 (middle half 4.7 to 8.43, 37 codebases)February 2026: 6.42 (middle half 4.02 to 8.85, 36 codebases)March 2026: 7.95 (middle half 4.97 to 9.31, 36 codebases)April 2026: 7.91 (middle half 6.46 to 9.33, 35 codebases)May 2026: 8.42 (middle half 6.43 to 9.41, 35 codebases)June 2026: 8.12 (middle half 5.66 to 10.52, 38 codebases)July 2026: 7.43 (middle half 5.72 to 9.83, 38 codebases)August 2026: 9.17 (middle half 5.86 to 9.8, 38 codebases)September 2026: 9.85 (middle half 7.22 to 10.97, 39 codebases)October 2026: 10.31 (middle half 7.26 to 12.42, 36 codebases)10.3 in October 2026

Median codebase, through 2024From 2025Middle half of codebasesAbout 4.8 in a typical 2023–24 month

Decision points per 100 new lines, median codebase each month, October 2022 to October 2026
MonthMedianMiddle halfCodebases
October 20225.74.46 to 7.429
November 20225.572.4 to 6.5231
December 20224.382.82 to 6.3936
January 20235.193.76 to 7.1235
February 20233.962.62 to 5.9639
March 20234.93.48 to 6.4335
April 20235.33.45 to 7.1541
May 20234.863.62 to 7.6235
June 20234.443.16 to 6.8839
July 20234.523.01 to 5.8138
August 20235.854 to 7.3238
September 20234.723.46 to 637
October 20234.732.65 to 6.5839
November 20234.123.37 to 6.6337
December 20234.532.92 to 6.8639
January 20245.213.14 to 6.0836
February 20244.343.46 to 5.8337
March 20244.292.33 to 6.3838
April 20245.113.52 to 6.9938
May 20243.981.59 to 5.3440
June 20244.633.19 to 7.8839
July 20245.223.23 to 7.1639
August 20245.33.62 to 6.2735
September 20244.883.58 to 7.4737
October 20245.763.32 to 6.9838
November 20244.643.52 to 6.5136
December 20245.032.6 to 6.9330
January 20254.512.82 to 5.7736
February 20254.93.03 to 6.6838
March 20255.813.86 to 6.3436
April 20254.83.49 to 7.3237
May 20255.513.95 to 6.6136
June 20255.583.5 to 7.2336
July 20255.654.05 to 7.1839
August 20255.43.92 to 6.9635
September 20255.983.76 to 8.8236
October 20255.734.27 to 8.3937
November 20255.924.95 to 7.3836
December 20255.934.12 to 736
January 20266.344.7 to 8.4337
February 20266.424.02 to 8.8536
March 20267.954.97 to 9.3136
April 20267.916.46 to 9.3335
May 20268.426.43 to 9.4135
June 20268.125.66 to 10.5238
July 20267.435.72 to 9.8338
August 20269.175.86 to 9.838
September 20269.857.22 to 10.9739
October 202610.317.26 to 12.4236
Source: Kerno Codebase Analysis, four-year re-run of all 46 codebases, October 2022 to October 2026; 29 to 41 codebases a month; a fixed set of 24 codebases shows the same rise (Appendix C); months with fewer than 1,000 production lines left out

The rise is just as clear when we measure it around each codebase's own adoption date. Before adoption, the typical codebase added 5.2 decision points per 100 new lines. After adoption, it added 8.1. The rise appeared in 27 of 30 codebases.

It also shows up in the functions that are hardest to work with, those with more than 10 decision points, where testing every path becomes impractical (Exhibit 2).

Exhibit 2

25 of 30 codebases now add more hard-to-test functions per 1,000 new lines

Functions with more than 10 decision points added per 1,000 new production lines, before vs after AI adoption

0.00.51.01.52.0BeforeAfteractivepieces: 1.22 to 1.13actual: 0.65 to 1.44appsmith: 0.52 to 1.72cal.com: 0.61 to 0.77directus: 1.24 to 2.2django-cms: 1.37 to 1.71flagsmith: 0.34 to 0.59formbricks: 0.79 to 1.14grafana: 0.69 to 0.93hoppscotch: 0.9 to 2.03infisical: 1.13 to 1.09keep: 1.05 to 1.89lightdash: 0.9 to 1.43mattermost: 0.94 to 1.18n8n: 0.78 to 1.4nango: 1.52 to 1.51novu: 0.56 to 1.01outline: 0.84 to 1.14payload: 1.41 to 1.64plane: 0.39 to 0.93prefect: 0.58 to 1.33rallly: 0.17 to 0.7redash: 0.73 to 0.54sentry: 1.13 to 1.57strapi: 1.52 to 1.11twenty: 0.58 to 0.65typebot.io: 0.83 to 1.61unleash: 0.45 to 0.5vendure: 1.1 to 1.27zulip: 1.26 to 1.40.831.22 median

Rose: 25 Fell: 5 Median codebase

Functions with more than 10 decision points added per 1,000 new production lines, before vs after AI adoption
CodebaseBeforeAfter
activepieces1.221.13
actual0.651.44
appsmith0.521.72
cal.com0.610.77
directus1.242.2
django-cms1.371.71
flagsmith0.340.59
formbricks0.791.14
grafana0.690.93
hoppscotch0.92.03
infisical1.131.09
keep1.051.89
lightdash0.91.43
mattermost0.941.18
n8n0.781.4
nango1.521.51
novu0.561.01
outline0.841.14
payload1.411.64
plane0.390.93
prefect0.581.33
rallly0.170.7
redash0.730.54
sentry1.131.57
strapi1.521.11
twenty0.580.65
typebot.io0.831.61
unleash0.450.5
vendure1.11.27
zulip1.261.4
Source: Kerno Codebase Analysis, 30 codebases with an AI adoption date; bots excluded

This hard-to-change code is also building up across each codebase as a whole. We graded every codebase from A to D by its excess complexity, meaning the decision points its overly complex functions carry beyond 10, per 1,000 lines. We split the 39 codebases into quarters by this score at the start of the period, with A the lowest and D the highest, then graded them again at the end using the same cut-offs (Exhibit 3).

Exhibit 3

The number of codebases with the lowest maintainability grade doubled, from 10 to 20 of 39

Each codebase's grade, from excess complexity per 1,000 lines, in October 2024 and October 2026

  • A, easiest to maintain
  • B
  • C
  • D, hardest
  • October 2024A, easiest to maintain: 10B: 10C: 9D, hardest: 10
  • October 2026A, easiest to maintain: 2B: 9C: 8D, hardest: 20

21 of 39 codebases dropped one or more grades, 3 moved up and 15 held.

Grades are quarters of this benchmark at the start (cut-offs 4.1, 7.2, 9.6), not an industry scale.

Source: Kerno Codebase Analysis, 39 codebases with a complexity trend
Finding 2

Complexity began rising in 2025 across the board, including in unmarked codebases, but it rose faster where AI use is marked

We looked for a trend that appears only after AI adoption and didn't find one. Rising complexity, more code and more testing all appear in codebases where AI use isn't marked (unmarked codebases, from here on). These codebases have few AI-marked commits, but 9 of the 10 in Exhibit 4 have some (12 to 54 each), so AI is present in them. How much AI use goes unmarked can't be measured. This means they are not an AI-free comparison group. Their rise doesn't count against an AI effect, but it can't confirm one either. In codebases that did adopt AI, all three trends ran faster after adoption (Exhibit 4).

Exhibit 4

The same trends appear in unmarked codebases, and run faster where AI use is marked

Median growth per month

  • AI use not marked
  • AI codebases, before adoption
  • AI codebases, after
+1.9%Complexity per 100 new lines, AI use not marked: +1.9%+0.7%Complexity per 100 new lines, AI codebases, before adoption: +0.7%+3.5%Complexity per 100 new lines, AI codebases, after: +3.5%
Complexity per 100 new lines
+5.0%Production lines committed, AI use not marked: +5.0%+0.5%Production lines committed, AI codebases, before adoption: +0.5%+5.5%Production lines committed, AI codebases, after: +5.5%
Production lines committed
+3.3%Share of commits changing tests, AI use not marked: +3.3%+2.5%Share of commits changing tests, AI codebases, before adoption: +2.5%+4.8%Share of commits changing tests, AI codebases, after: +4.8%
Share of commits changing tests

AI use not marked means 8 to 10 of the 16 codebases without an adoption date, with almost no AI-marked commits. The other 6 have too few active months to fit a trend. AI codebases are the 25 to 26 with enough months on each side of adoption.

Source: Kerno Codebase Analysis, 46 codebases; growth rates from a trend line fitted to each codebase's monthly values

The rise follows the calendar rather than each codebase's adoption date. If adoption caused it, the gap would peak at each codebase's own adoption date and fade at other dates. Instead, it appears at all 20 dates we tested (Exhibit 5). That fits an industry-wide shift starting in 2025, including AI use that isn't marked in commits. Within the same codebases after adoption, AI-marked code wasn't clearly more complex per line than other code. AI-marked commits were, however, more likely to add a hard-to-test function, because they were bigger (Exhibit 8).

Exhibit 5

Wherever the split date falls, more codebases become more complex than less complex

Codebases whose complexity per 100 new lines rose or fell when the same split date is applied to every codebase

  • More complex after the date
  • Less complex after the date

Split date applied to every codebase

Codebases whose complexity per 100 new lines rose or fell when the same split date is applied to every codebase
Split dateMore complexLess complex
Dec 2410
Jan 2541
Feb 2551
Mar 2583
Apr 2593
May 25103
Jun 25122
Jul 25182
Aug 25204
Sep 25244
Oct 25273
Nov 25324
Dec 25331
Jan 26352
Feb 26350
Mar 26340
Apr 26321
May 26311
Jun 26311
Jul 26301
Source: Kerno Codebase Analysis, adoption-date sweep across all codebases with enough history, December 2024 to July 2026
Finding 3

After AI adoption, each engineer ships 71% more production code a week, with no clear change in team size

The extra code isn't just churn. Counting only lines still in place 90 days later, output per engineer rose 75%. Commits also got bigger, and very large commits became more common. Over the two years, the typical codebase grew 40%, from 230,000 to 350,000 lines of production code (Exhibit 6).

More code per person means more code for each reviewer to read and for each engineer to own.

Exhibit 6

Each engineer ships 71% more code a week, while team size hasn't clearly changed

Median change per codebase, after vs before AI adoption, 30 codebases, with 95% confidence range

  • Production lines per engineer-week293 → 424+71%, 95% range +26% to +116%
  • Lines still in place after 90 days251 → 369+75%, 95% range +33% to +130%
  • Lines per commit+63%, 95% range +40% to +98%
  • Share of commits over 500 lines6.5% → 8.9%+34%, 95% range +8% to +79%
  • Active contributors per week8.2 → 9.6+10%, 95% range −19% to +28%not clear

Clear difference No clear difference 95% range

Percentages are the median of each codebase's own change. Measured between the two medians shown, lines per engineer-week rose 45% (293 to 424) and lines still in place after 90 days rose 47% (251 to 369). The 90-day figure includes recent commits that had less time to be rewritten (Appendix C).

Source: Kerno Codebase Analysis, 30 codebases with an AI adoption date; bots excluded
Finding 4

Less new code is rewritten after AI adoption, but AI-marked commits are revisited 43% more often than other commits

This section uses two measures, and neither is a bug count.

  • Rework is new code that is rewritten or deleted within 90 days.
  • A follow-up is any later commit that touches the same code. A follow-up can be a repair (it fixes the earlier change), an extension (it builds on it) or unrelated. So a follow-up is not the same as rework, and only some follow-ups are repairs.

After AI adoption, rework fell in 24 of 30 codebases. The decline holds in the codebases with the fewest recent commits, whose code had the most time to be rewritten (Appendix C). The number of follow-ups per change didn't clearly change, but fewer of them were repairs (Exhibit 7).

Exhibit 7

When code is revisited, it is now more often to build on it than to fix it

What follow-up commits did to earlier changes, median codebase, % of follow-ups

  • Repair, fixes the earlier change
  • Extension, builds on it
  • Other
  • Before AI adoptionRepair, fixes the earlier change: 15%Extension, builds on it: 58%Other: 27%
  • After AI adoptionRepair, fixes the earlier change: 11%Extension, builds on it: 71%Other: 18%

Follow-up types were judged by an AI model, and verdicts below 0.5 confidence were dropped. Repair and extension are medians across 30 codebases; Other is the remainder.

Source: Kerno Codebase Analysis, 30 codebases with an AI adoption date

In the same codebases, AI-marked commits are revisited 43% more often than other commits and are 17% more likely to add a function with more than 10 decision points. This held in 21 of 26 codebases. When commits of the same size are compared, the gap disappears, and AI-marked code isn't clearly more complex per line than other code (Exhibit 8).

AI-marked commits also land where code changes most. They made up 9% of all commits but 20% of the edits to each codebase's most-edited functions, a pattern that held in 24 of 30 codebases. Part of the reason is size, since bigger commits touch more functions.

Denser code hasn't yet led to more fixes. Commits that added more decision points per line were no more likely to be fixed within 90 days than commits of the same size that added fewer (+3%, range −8% to +23%, 32 codebases; not statistically clear). Earlier research links complexity to failures over longer periods (Nagappan et al., 2006), which a two-year window can't yet test.

Exhibit 8

AI-marked commits are bigger, so each one adds more complexity. Per line, the difference isn't clear

AI-marked vs other commits in the same codebase after adoption, median difference with 95% range

  • Follow-ups per change20 of 26 higher+43%, 95% range +26% to +53%
  • Lines per commit23 of 27 higher+42%, 95% range +25% to +77%
  • Share of commits over 500 lines19 of 26 higher+27%, 95% range +9% to +57%
  • Follow-ups per 100 lines17 of 26 higher+15%, 95% range −5% to +28%not clear
  • Share adding a function over 1021 of 26 higher+17%, 95% range +8% to +33%
  • Same, commits of equal size12 of 26 higher−1%, 95% range −11% to +14%not clear
  • Decision points per 100 lines15 of 26 higher+5%, 95% range −2% to +12%not clear
  • Share of follow-ups that are repairs7 of 18 higher−3%, 95% range −5% to +4%not clear

Clear difference No clear difference 95% range

Source: Kerno Codebase Analysis, 26 codebases with an AI adoption date and at least 20 AI-marked commits; other commits include unmarked AI use, so true gaps may be larger
Finding 5

Test changes rose from 4.7% to 8.3% of commits, while bug fixes held at a quarter of commits, as they did before AI adoption

Test commits per engineer rose in 29 of 30 codebases. Each engineer made more than twice as many test commits a week as before, 0.33, up from 0.15. Measured as test commits per 1,000 new lines, however, testing grew only about as fast as the code. The data has no test line counts or coverage.

Bug fixes stayed at about one commit in four. Because each engineer commits more often, bug-fix commits per engineer rose from 0.58 to 0.70 a week, although this rise isn't statistically clear. Reverts, where a change is undone, stayed rare at under 0.5% of commits (Exhibit 9).

Exhibit 9

Test changes nearly doubled, while bug fixes held at a quarter of commits

Median codebase, before and after AI adoption, 30 codebases

  • Before AI adoption (light)
  • After (solid)

Share of all commits

24.9%Bug fixes, before: 24.9%24.8%Bug fixes, after: 24.8%
Bug fixes
4.7%Test changes, before: 4.7%8.3%Test changes, after: 8.3%
Test changes

Commits per engineer per week

0.58Bug fixes, before: 0.580.70Bug fixes, after: 0.70
Bug fixes
0.15Test changes, before: 0.150.33Test changes, after: 0.33
Test changes

Commit types are 70% to 88% accurate on 100 checked by hand. The per-engineer rise in bug fixes (median +14% per codebase) is not statistically clear.

Source: Kerno Codebase Analysis, 30 codebases with an AI adoption date; commit types read from commit messages
Finding 6

Claude signs 69% of AI-marked commits, which are 54% bigger than unmarked commits, though newer Claude models make smaller ones

Exhibit 10

Claude signs 69% of AI-marked commits

Share of 21,760 AI tool marks found in commit authors, co-author lines and messages

Codebases

  • Claude69%15,030Codebases: 40
  • Cursor15%3,204Codebases: 26
  • Devin10%2,266Codebases: 7
  • Copilot2%515Codebases: 31
  • Codex2%488Codebases: 5
  • Other or unnamed1%257Codebases: 27

This shows which tools sign commits, not which tools teams use. Claude Code adds a co-author line by default. Two engineers named Devin, counted as the Devin agent by the detection rule, are excluded.

Source: Kerno Codebase Analysis, all 46 codebases, October 2024 to October 2026

We compared each tool's commits with unmarked commits in the same codebase and the same months. Only Claude appears in enough codebases to give a clear answer. Its commits are bigger, more often very large and revisited more often, but they are not clearly denser per line (Exhibit 11).

Exhibit 11

Claude-marked commits are 54% bigger than unmarked commits and revisited 55% more

Claude-marked vs unmarked commits in the same codebase and months, median difference with 95% range

  • Follow-ups per change20 of 23 higher+55%, 95% range +41% to +84%
  • Lines per commit21 of 27 higher+54%, 95% range +13% to +97%
  • Share of commits over 500 lines22 of 27 higher+37%, 95% range +10% to +87%
  • Share adding a function over 1023 of 27 higher+26%, 95% range +15% to +50%
  • Follow-ups per 100 lines16 of 23 higher+15%, 95% range +8% to +51%not clear
  • Decision points per 100 lines16 of 27 higher+8%, 95% range −2% to +22%not clear

Clear difference No clear difference 95% range

Source: Kerno Codebase Analysis, 27 codebases with at least 20 Claude-marked commits and 20 unmarked commits in the same months; bots excluded; follow-ups counted within 30 days

Claude Code also records which model wrote each commit. In the 13 codebases that used both, Opus 5 commits were 26% less likely than Opus 4 commits to add a function with more than 10 decision points (lower in 10 of 12 codebases) and 28% less likely to exceed 500 lines (lower in 11 of 13). Lines per commit and follow-ups also fell, but not clearly, and branching per line didn't clearly change. Because Opus 5 is newer, teams may also have learned to scope changes better in the meantime, and the data can't separate the two effects.

Outlook

Where this is heading

On the current trend, complexity per 100 new lines rises another 42% by late 2028.

Complexity rarely breaks anything on the day it is written. It slows down the next change, and the one after that. It is felt when something forces a broad change, such as a security patch across many services, a framework upgrade or an incident in code that few people fully understand.

These projections are conservative. They assume complexity grows by a fixed amount each month. In practice, the median across all codebases has compounded at 3.5% a month since January 2025 (Exhibit 1), and each codebase's own growth after adoption was similar. If that pace held, complexity per 100 new lines would more than double in two years, well above even the faster-adoption line (Exhibit 12).

Exhibit 12

On the current trend, complexity rises 42% in two years. If growth keeps compounding, it more than doubles

Projected decision points per 100 new lines, median codebase, with 95% range at 12 and 24 months

8121620Today+12 months+24 monthsCurrent trend, +12 months: 10.9 (10.6 to 11.7)Current trend, +24 months: 12.8 (12.1 to 14.4)12.8Faster AI adoption, +12 months: 11.4 (10.7 to 12.5)Faster AI adoption, +24 months: 13.8 (12.4 to 15.9)13.8Quality controls (illustrative), +12 months: 9.3 (6.9 to 10.0)Quality controls (illustrative), +24 months: 9.5 (4.8 to 10.9)9.5Compounding at 3.5% a month, +24 months: 20.620.69.0 today

On the current trend, new code carries 12.8 decision points per 100 lines in two years, up 42% (95% range 12.1 to 14.4, from 39 codebases).

"Today" is the trend level (9.0), not the latest single month (10.3, Exhibit 1). Faster adoption is the 20 codebases with the highest AI share. Quality controls (illustrative) is the 10 codebases with the flattest trends; no quality intervention was observed.

Source: Kerno Codebase Analysis, 39 codebases with a complexity trend; straight-line projection of each scenario's median monthly slope

The faster-adoption scenario uses the 20 codebases with the highest share of AI-marked commits. The quality-controls scenario is illustrative. It uses the 10 codebases with the flattest trends, and no quality intervention was observed.

Actions

What engineering teams can do

  1. 01

    Track decision points per 100 lines alongside DORA metrics

    Complexity rises before delivery metrics move.

    Finding 1

    EffortLowMost static-analysis tools already report it, or Kerno's free scanner can
  2. 02

    Check AI-written code against the running system as it is written

    AI-marked commits are revisited 43% more often.

    Finding 4

    EffortMediumTooling and pipeline changes
  3. 03

    Set a size limit for AI-assisted changes

    Commits got 63% bigger, and AI-marked commits are a further 42% bigger.

    Finding 3Finding 4

    EffortLowA team policy and a pipeline check
  4. 04

    Measure your own trend before judging AI

    Unmarked codebases got more complex too.

    Finding 2

    EffortLowGiven 8 or more months of history
  5. 05

    Mark AI-assisted commits

    Only 9% of commits are marked in the typical codebase, so AI use is undercounted.

    EffortLowA tool setting
Method

About the research

We ran Kerno's Codebase Analysis tool on the full commit history of 46 well-known open-source codebases, from October 2024 to October 2026, with a second pass on complexity going back to October 2022. Most are commercial open-core products, and 35 are written mainly in TypeScript, so the results describe that kind of codebase. We chose the 46 by hand based on their size and popularity, so they are not a random sample of open-source projects. The data and analysis scripts behind every number in this report are public at github.com/kernoio/kerno-impact-ai.

How we identified AI use. A commit counts as AI-written only when it carries an agent's mark, meaning an agent in the author field, a co-author line, or a "generated with" note. A codebase's adoption date is the month AI-marked commits pass 25% of the total, or step up and stay up. Most tools don't mark commits by default, so AI use is undercounted.

How we compared. Each codebase is compared with itself, before and after its own adoption date, and counts once. We report the median codebase. We call a result a finding only when it holds across most codebases and is statistically clear, and we say so when it isn't. We tested 16 before-and-after metrics (Appendix B) without correcting for multiple comparisons, so at this threshold about one of them could pass by chance. Percent changes are the median of each codebase's own change, so they can differ from the change between the two medians shown.

What the data can't show. This is observational data. "After adoption" means after the adoption date, not "because of AI". The data has no information on incidents, defects, test coverage or pull-request lead times.

Dataset
Commits
201,576
Authors
6,847
Codebases
46 (30 with an AI adoption date, 16 without)
Window
October 2024 to October 2026
Kerno Codebase Analysis46 open-source codebases
Free audit

Benchmark your codebase against this report

Measure your own repository the same way as the 46 codebases in this report, before and after your team adopted AI coding agents.

Terminal
npm install -g @kerno/clikerno audit

Run both from a checkout of your repository. Needs Node 18 or later.

Learn more about Kerno Audit →

Appendix

A. Definitions
TermPlain meaningHow it's measured
Decision pointA place where code can go two ways (if, else if, loop, case, &&, ||)Cyclomatic complexity (McCabe, 1976), decision points + 1 per function. In TypeScript and JavaScript, ternaries (?:), ?? and catch also count; optional chaining (?.) does not
Decision points per 100 linesHow much branching new code brings, independent of commit sizeDecision points a commit adds ÷ production lines it adds × 100, summed over each period
Excess complexityBranching in functions too complex to test easilyFor each function above 10 decision points, the amount above 10, per 1,000 lines of the whole codebase
Maintainability gradeA to D rating of excess complexityQuarters of the 39 codebases with a trend at the start (cut-offs 4.1, 7.2, 9.6); same cut-offs at the end
ReworkNew code rewritten or deleted soon after it's writtenShare of lines from sampled commits changed within 30 or 90 days
Follow-upAny later commit that comes back to the same codeCount of later commits touching a change's lines, per change
RepairA follow-up that fixes the earlier changeJudged by an AI model; verdicts below 0.5 confidence dropped
ExtensionA follow-up that builds on the earlier changeSame as repair
ReimplementationA new function that duplicates one the codebase already hadMatched by name, then logic; judged by an AI model
Engineer-weekOne person with at least one commit in a given weekBots excluded
Commit typeBug fix, test change, revert, featureRead from the commit's subject line; 70% to 88% accurate on 100 checked by hand
B. Every metric, before vs after AI adoption
MetricMedian change95% rangeRose / fell (of 30)Clear?
Decision points per 100 new lines+51.5%+32% to +72%27 / 2Yes
Excess complexity per 1,000 lines+14%+2% to +27%24 / 6Yes
Functions over 10 decision points added per 1,000 lines+38%+21% to +78%25 / 5Yes
Share of commits adding a function over 10 decision points+62%+45% to +90%25 / 5Yes
Lines per commit+63%+40% to +98%26 / 2Yes
Share of commits over 500 production lines+34%+8% to +79%23 / 7Yes
Production lines per engineer-week+71%+26% to +116%23 / 7Yes
Active contributors per week+10%−19% to +28%16 / 14No
Lines rewritten within 30 days−16%−32% to −6%8 / 22Yes
Lines rewritten within 90 days−26.5%−34% to −20%5 / 24Yes
Follow-ups per change+7.5%−5% to +41%18 / 12No
Share of follow-ups that are repairs−23%−40% to −7%7 / 21Yes
Reimplementations per 1,000 lines−26.5%−40% to −3%7 / 23Yes
Share of commits that are bug fixes−4%−16% to +6%13 / 17No
Share of commits that change tests+81%+41% to +127%25 / 5Yes
Share of commits that are reverts−50%−61% to −21%6 / 17Yes

"Clear" means the 95% range excludes zero and a sign test gives p ≤ 0.05. Percent changes are calculated as described under How we compared.

C. Method notes
  • Monthly growth rates come from a straight line fitted to the logarithm of each codebase's monthly values. Months with fewer than 1,000 production lines are left out.
  • The step-up in complexity growth, from +0.7% to +3.5% a month, is not statistically clear on the two-year data alone (range −2.1 to +5.8 points). The four-year re-run makes it clear. In each codebase, growth went from −0.4% a month (October 2022 to September 2024) to +3.1% (January 2025 to October 2026), a step of +3.3 points (95% range +1.7 to +5.3), faster in 31 of 39 codebases (p < 0.001). The 3.5% a month used in the forecast is the growth of the median across all codebases since January 2025, while 3.1% is the median of each codebase's own growth.
  • Four-year re-run. The same 46 codebases from October 2022 to October 2026, complexity and attribution only, with adoption months fixed from the main run. Monthly medians leave out months under 1,000 production lines. The main before-and-after result reproduces, at 5.2 to 8.2 decision points per 100 lines, up in 28 of 30 codebases. Leaving out any one codebase moves the October 2026 median by at most 0.03; leaving out the three biggest risers (Vendure, Strapi, Directus) lowers it from 10.3 to 9.7.
  • Fixed set of codebases. On the two-year data, the 24 codebases present in at least 20 of 24 months grew 3.1% a month from January 2025, compared with 3.2% for all codebases. The 3.5% quoted elsewhere comes from the four-year re-run, a separate run with slightly different monthly values.
  • Recent commits and 90-day measures. In the median codebase, 42% of after-adoption commits fall in the window's final 90 days, so they had less time to be rewritten. In the 14 codebases where under 40% were that recent, 90-day rework still fell 29% (12 of 14, p = 0.01). Lines still in place after 90 days have the same exposure and were not re-run.
  • Moving the date. We applied one adoption date to every codebase, for each month from December 2024 to July 2026. More codebases got more complex than less complex at all 20 dates.
  • Forecast. Today's median level (9.0) plus each scenario's median monthly slope, projected 12 and 24 months. The range is a 95% bootstrap interval for the median slope. Straight lines from 8 to 30 monthly points are a weak method, so read the ranges more than the lines. The straight line is deliberately conservative. Compounding at the after-adoption rate of 3.5% a month (1.035²⁴ ≈ 2.3×) would give a far steeper rise, but that rate rests on about a year of data per codebase.
  • By tool and model. Each tool's or model's commits are compared with unmarked commits in the same codebase and the same months; codebases need at least 20 commits in each group. Follow-ups are counted within 30 days, and commits from the last 30 days are left out. Model names come from the Claude Code co-author line; other tools don't record one. Opus 4 vs Opus 5 compares each against its own human baseline in the 13 codebases that used both. Two engineers named Devin, at Prefect and Mattermost, were counted as the Devin agent by the detection rule; their roughly 350 commits are excluded.
  • Data quality. Bots (7% of commits) are excluded from complexity and output measures. Lockfiles and vendored code are excluded too; generated code is 0.1% of file changes. Vue, Handlebars and ERB aren't parsed; 8 codebases have under 90% parser coverage (lowest 58%).
D. Raw data and references

Every codebase's numbers, the raw benchmark output and the analysis scripts are at github.com/kernoio/kerno-impact-ai.

  1. Nagappan, N., Ball, T., Zeller, A. (2006). Mining metrics to predict component failures. ICSE 2006
  2. McCabe, T. J. (1976). A Complexity Measure. IEEE Transactions on Software Engineering, SE-2(4)