COMPLETEApr 2026
Hypothesis
When existing test files use older patterns, the agent will follow those patterns even when skills explicitly teach the newer ones. The codebase is a stronger signal than knowledge injection.Setup
The 2 Variants
Both variants have the same Spring testing skills installed globally.
Results (N=3)
Per-Run Breakdown
T2 Quality Breakdown
Behavioral Analysis
Despite identical quality scores, the two variants navigate the codebase differently.
Updated 2026-08-27 — the “Expected steps (Markov)” row is withdrawn. It carried two defects. The chain pooled three independent runs into one sequence, so it saw one finish instead of three and inflated the number about threefold. It then read the answer from the row for a starting state neither variant actually began in — all three
simple runs opened with a shell command, not a file read. Corrected for both, the figures are 75.7 and 54.7, which is the mean tool calls per run that this same table already reports as 84 and 61. The Markov step was restating a count. It is removed rather than restated, and at three runs a side the difference is marginal anyway (p = 0.06). The “half as many reading-loop cycles” figure (189 → 93) came from the same calculation and goes with it.Everything counted on this page stands and was re-verified against the stored run data on the same date: 4x fewer redundant reads, tool calls 84 → 61, quality 0.667 in both arms, cost 3.46, coverage 95.2% against 92.9%. (An earlier version of this note also claimed the self-loop reading was unaffected because it is measured directly off the transition matrix. That was wrong — the matrix is built from the same pooled chain. See the correction under the diagram above.)
The Exemplar Effect: v2 vs v3
Key Findings
- The codebase is the agent’s primary teacher. Skills and prompts are secondary signals. If the existing code demonstrates older patterns, the agent will reproduce them — even when it has explicit knowledge of the better approach.
- Quality ceilings come from exemplars, not prompts. T2 = 0.667 across all 6 runs. Two variants, three runs each, identical quality score. The ceiling moved when the existing tests changed (v2 vs v3), not when the prompt changed.
- Efficiency gains are still real. 27% fewer tool calls, 4x fewer redundant reads. Prompt hardening and skills make the agent faster — they just can’t make it better when the codebase says otherwise.
- Fix the code, not the prompt. The highest-leverage intervention for agent quality is updating the exemplars the agent will see.
What Comes Next
v4: Fix the exemplar — but not by hand. A separate “Boot best-practices upgrade” step — skill-driven, focused, run before the test-writing agent starts. Fix the code the agent will imitate, then let it imitate. Prediction: T2 rises to ≥0.85.Resources
Experiment Repo
Variant configs, analysis scripts, raw traces
Blog: When You Come to a Fork in the Code
Narrative walkthrough of the exemplar effect
v2 Experiment
The previous experiment — skills vs knowledge bases with zero existing tests