Issue I · Code Uniformity · Q2 2026Methodology v0.1.02026-05-10Yash Datta · saucam

How AI authorship
reshapes code structure.

Forty-eight public open-source repositories, five languages, three strata of AI-authorship intensity. We attribute every line of every function to AI or human authorship via git blame against Claude-tagged commits, score each function’s structural similarity to its peers via semble, and ask whether the resulting AI-vs-human uniformity gap holds across languages, across AI authorship intensity, and across function size11Methodology pre-registered in full at v0.1.0 before any sampling. Six hypotheses (H1–H6). We report results regardless of direction: three confirmed, two counter-prediction, one partially confirmed..

Repositories sampled
48
47 produced full data
Languages
5
Python · TypeScript · JavaScript · Go · Rust
Functions analyzed
12,254
Across 47 repos at locked SHAs
Pre-registered hypotheses
6
3 confirmed · 2 counter · 1 partial

What we measured

For each public function in each repo, we compute its semantic similarity to the other functions in the same repo (via semble’s hybrid retrieval — Model2Vec embeddings + BM25 + reciprocal rank fusion), its cohesion-vs-coupling profile, and its cyclomatic complexity (Python only, via radon). Every line is attributed to AI or human authorship through git blame against commits carrying Co-Authored-By: Claude or the Claude Code footer. Functions with ≥70% AI lines are classified as AI-authored; those with ≤10% AI lines as human-authored. Per-repo metrics aggregate across all functions; per-language and per-bucket metrics aggregate across the 48-repo sample.

Finding 01 · The bucket reversal

AI code is the outlier in human codebases.
AI code is the norm in AI codebases.

Same code, opposite role. The AI-vs-human uniformity gap reverses sign across the AI authorship range — and the relationship is roughly linear.

-0.0050-0.00250+0.0025+0.00500%25%50%75%100%low bucket mean-0.0023mid bucket mean+0.0008high bucket mean+0.0028trailofbits/skills: AI ratio 100%, gap +0.0132brycewang-stanford/StatsPAI: AI ratio 93%, gap -0.0004armelhbobdad/bmad-module-skill-forge: AI ratio 82%, gap +0.0004davila7/claude-code-templates: AI ratio 63%, gap -0.0004Zipstack/visitran: AI ratio 5%, gap +0.0006e2b-dev/E2B: AI ratio 1%, gap -0.0009TikiTribe/claude-secure-coding-rules: AI ratio 0%, gap 0.0000garrytan/gbrain: AI ratio 99%, gap +0.0024nkmr-jp/prompt-line: AI ratio 90%, gap +0.0007Termix-SSH/Termix: AI ratio 83%, gap -0.0057mksglu/context-mode: AI ratio 67%, gap +0.0005yoshiko-pg/difit: AI ratio 46%, gap +0.0004truecourse-ai/truecourse: AI ratio 15%, gap -0.0019langwatch/langwatch: AI ratio 14%, gap +0.0012formatjs/formatjs: AI ratio 8%, gap -0.0041DataDog/datadog-ci: AI ratio 1%, gap +0.0017adcontextprotocol/adcp: AI ratio 0%, gap -0.0118openclaw/openclaw: AI ratio 0%, gap -0.0114FortiumPartners/ai-mesh: AI ratio 100%, gap +0.0149shinpr/agentic-code: AI ratio 100%, gap +0.0092LPilic/n8n-library: AI ratio 97%, gap -0.0002link-assistant/hive-mind: AI ratio 71%, gap +0.0006affaan-m/everything-claude-code: AI ratio 20%, gap +0.0042sinewaveai/agent-security-scanner-mcp: AI ratio 14%, gap -0.0015coasys/ad4m: AI ratio 4%, gap -0.0002nyxCore-Systems/ckb: AI ratio 100%, gap +0.0127tomasz-tomczyk/crit: AI ratio 64%, gap -0.0037future-architect/uzomuzo-oss: AI ratio 50%, gap -0.0014JordanCoin/codemap: AI ratio 44%, gap +0.0004TheArchitectit/agent-guardrails-template: AI ratio 35%, gap -0.0014agentic-research/mache: AI ratio 34%, gap -0.0003davetashner/stringer: AI ratio 25%, gap +0.0005lHumaNl/EchoWarp: AI ratio 14%, gap +0.0024boshu2/agentops: AI ratio 12%, gap -0.0022layer-3/nitrolite: AI ratio 2%, gap -0.0041valon-technologies/gestalt: AI ratio 2%, gap -0.0015hang-in/tunaFlow: AI ratio 100%, gap +0.0144temm1e-labs/temm1e: AI ratio 95%, gap +0.0016spider-rs/spider: AI ratio 67%, gap +0.0004NikolayS/rpg: AI ratio 58%, gap -0.0005sinelaw/fresh: AI ratio 55%, gap -0.0004team-attention/tide: AI ratio 49%, gap -0.0011metacraft-labs/codetracer: AI ratio 34%, gap -0.0009ruvnet/RuVector: AI ratio 13%, gap +0.0021OpenAgentsInc/openagents: AI ratio 0%, gap -0.0131repo AI authorship ratio (% of lines from Claude-tagged commits)AI uniformity gapAI more uniform than human ↑AI less uniform than human ↓
Figure 1 · Bucket reversal · n = 45 reposPearson r = +0.579 between AI authorship ratio and AI-vs-human uniformity gap

By AI authorship bucket

BucketReposMean AI gapInterpretation
Low (<30% AI authored)18-0.00229AI is the outlier
Mid (30 – 70%)15+0.00080Roughly equal
High (>70%)15+0.00283AI is the norm

The gap is small in absolute terms — fractions of a thousandth on a similarity scale that runs roughly 0–0.05 — but it is directionally consistent and correlated. In the eighteen repositories where humans wrote most of the code, AI-authored functions read structurally differently from the surrounding code. In the fifteen repositories where AI dominated, AI functions cluster together and human contributions become the structural minority. The mid-bucket sits near zero. Pearson r between AI ratio and gap is +0.58 across all forty-five repositories with sufficient samples in both groups.

Finding 02 · Per-language divergence

AI converges in JavaScript.
AI varies in TypeScript.

The sign reversal between TypeScript (−0.00254, humans more uniform within-repo) and JavaScript (&plus;0.00383, AI more uniform) is the largest cross-language signal in the run. They are the only two languages whose mean AI gap falls on opposite sides of zero. Python, Go, and Rust sit close to zero in between.

-0.0050-0.0025+0.0025+0.0050AI more uniform →← AI less uniformjavascriptn = 7+0.0038pythonn = 8+0.0018rustn = 10+0.0003gon = 12+0.0001typescriptn = 11-0.0025
Figure 2 · Per-language AI-vs-human uniformity gap · n = 48 repos

By primary language

LanguageReposMean AI gapUniformity index
javascript7+0.003830.01355
python8+0.001780.01274
rust10+0.000280.01330
go12+0.000130.01493
typescript11-0.002540.01506

The likely cause: TypeScript’s type system forces explicit structural choices, so humans converge to type-driven idioms while AI takes the structural freedom and varies. JavaScript has weaker conventions and AI imposes its own pattern rigidly. Go and Rust both have strong cultural conventions (gofmt,rustfmt, idiomatic style guides) that flatten the AI-vs-human distinction to noise.

Finding 03 · DRY densitycounter-prediction

AI does not generate
more duplicate code than humans.

We expected DRY-cluster density — the number of similar-looking function pairs above the per-language similarity threshold, normalized by function count — to climb with AI authorship. The intuition: AI generates fourteen copies of pagination, twenty subtly different validation helpers, sprawling near-duplicates that humans would have factored out.

The data does not show that. AI-heavy repos sit slightly below human-heavy repos on this measure. The slight inverse trend is small but directionally consistent: AI-generated functions cluster differently from each other than human functions do, but they do not cluster more. The “AI generates fourteen versions of pagination” concern is not visible at this benchmark’s scale.

BucketDRY pairs / fn
low8.24
mid8.36
high7.37
Finding 04 · The isolated tailcounter-prediction

The rare hand-coded edges
aren’t rarer in AI’s share.

We expected: in AI-dominated codebases, the most-isolated functions — the rare hand-coded utilities, the one-off infrastructure pieces — would be disproportionately human. Across 15 high-AI repos, the bottom-10% most-isolated functions had AI authorship within ±10% of the repo’s overall AI rate.

15 high-AI repos · isolation surplus signal

The “humans hand-craft the rare edges” mental model is wrong on average, though three repos do show it clearly — bmad-module-skill-forge is 81% AI overall but only 54% AI in the isolated tail. AI writes uniform code; AI also writes the rare-shaped code. Mean AI surplus across the 15 high-AI repos is +0.002 — indistinguishable from zero.

Finding 05 · Complexity by function sizepartial

AI Python is simpler at most sizes —
except the 21–50-line band.

For Python functions across five repos with both AI and human samples (cyclomatic complexity via radon), AI is measurably simpler in three of four line-count bins. The 21–50-line band — which contains most “real function” sizes in production code — goes the other way. AI is 11% more complex per function there.

024681012141.731.794–10 lines-0.062.672.7211–20 lines-0.05reversal5.074.5721–50 lines+0.5012.8212.9551+ lines-0.13AI mean CCHuman mean CCmean cyclomatic complexity
Figure 5 · Mean cyclomatic complexity by function size · Python only · 5 repos with both AI and human samples

Pre-registered tests

What we predicted.
What we found.

Six hypotheses locked in the methodology document at v0.1.0 before any sampling. We report the result regardless of direction.

Pre-registered hypotheses · v0.1.0 · all 6confirmed 3 · counter 2 · partial 1
IDPredictionResultMagnitude
H1AI more uniform than human within repoconfirmed+0.00034 mean (CI95 [−0.0013, +0.0020])
H2Gap correlates with repo AI ratioconfirmedPearson r = 0.579
H3DRY density higher in AI-heavy reposcounter-predictionhigh = 7.37, low = 8.24
H4Isolated functions disproportionately humancounter-predictionmean surplus +0.002, 3 / 15 repos show human surplus
H5AI lower CC than human at matched sizepartial3 / 4 line-count bins; 21–50-line band reverses
H6AI uniformity gap varies across languagesconfirmedTS −0.0025 ↔ JS +0.0038 (sign reversal — only pair across the five languages whose mean gaps fall on opposite sides of zero)

Reproduction

Same code path
we ran.

Every number in this report came from the public agent-uniformity package. Install it, point it at any of the 48 sampled repos at their locked SHAs, and you should match within ~1% (semble’s BM25 has small non-determinism).

Reproduce any numberMIT · Python 3.11 / 3.12
# install the public reference implementation
$ pip install agent-uniformity

# verify any single number from the published numbers
$ agent-uniformity run-one davila7-claude-code-templates --output ./out

# rerun the full sample sequentially (~6-8 hr on a laptop)
$ agent-uniformity run-all --output ./out

Cite

Datta, Y. (saucam). (2026). Code Uniformity Q2 2026 — How AI authorship
reshapes the structure of public open-source code. Agent Almanac.
https://github.com/saucam/agent-uniformity-q2-2026

Run metadata

run id
2026-05-09T15-02-36Z-4931
run date
2026-05-09
methodology
v0.1.0
published
2026-05-10
byline
Yash Datta · saucam