Skip to main content
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.
Combined state diagram showing both variants
Each arrow shows: simple value → hardened-skills value. The EXPLORE self-loop drops (less re-reading) and the WRITE→BUILD arrow rises — the agent builds sooner.
Updated 2026-08-27 — the transition probabilities on this diagram are corrected. The EXPLORE self-loop was given as 0.87 → 0.70. Those came from the same chain as the withdrawn expected-steps row: it pooled three independent runs of each variant into one sequence. Recomputed with runs kept separate, the self-loop is 0.920 → 0.871, and the dwell time it implies is 12.5 → 7.8 rather than 7.76 → 3.32.The direction survives; the size does not. The hardened prompt does return to EXPLORE less often, but by about a fifth as much as this diagram shows. The counted figures on this page — tool calls 84 → 61, redundant reads 16.7 → 4.3, quality 0.667, cost, coverage — are unaffected. The diagram image itself has not been regenerated.
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.603.60 → 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.)
4x fewer redundant reads, 27% fewer tool calls, same quality
4x fewer redundant reads. 27% fewer tool calls. Same quality. The efficiency story is invisible if you only look at the T2 score.

The Exemplar Effect: v2 vs v3

Key Findings

  1. 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.
  2. 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.
  3. 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.
  4. 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