The agent encounters consumers each independently computing the same derived values from the same source; reasoning about consistency requires tracing every derivation.
One transform produces the enriched record from the input; the agent reads one input-to-shape contract and consumers read named output fields without simulating the derivation.
Before the refactoring
function baseCharge(reading) { return reading.kwh * reading.tariff.baseRate; }function taxableCharge(reading) { return reading.kwh * reading.tariff.taxRate; }// every consumer recomputes:const monthly = baseCharge(reading) + taxableCharge(reading);const discount = baseCharge(reading) * 0.95;
After the refactoring
function enrich(reading) {return {...reading,baseCharge: reading.kwh * reading.tariff.baseRate,taxableCharge: reading.kwh * reading.tariff.taxRate,};}const r = enrich(reading);const monthly = r.baseCharge + r.taxableCharge;const discount = r.baseCharge * 0.95;
Each consumer re-derives the same values; the agent can't trust them to be consistent and must verify equivalence on every change.
Building the transform when only one consumer exists creates an intermediate type the agent must learn before its second use justifies it.
Derivations are consistent by construction; the agent reads field accesses on the enriched record instead of computing across the codebase.
Pre-building transforms for hypothetical consumers creates intermediate shapes the agent must understand and maintain with no active reuse.