# Goodhart's law **Goodhart's law** states that when a measure becomes a target, it ceases to be a good measure. It was formulated by British economist Charles Goodhart in 1975 in the context of monetary policy, but it applies broadly to any system where behaviour is optimised toward a metric. The mechanism is straightforward: once a metric is used to evaluate performance, people optimise for the metric rather than for the underlying goal the metric was supposed to track. The metric then diverges from the thing it was measuring. In software engineering the law appears constantly: - **Code coverage as a target**: a team required to hit 80% coverage writes tests that execute code without asserting on anything, because coverage measures lines executed, not correctness verified. - **Velocity in sprints**: if story points become a performance metric, teams inflate estimates to report higher velocity. Velocity was a planning aid; now it is a performance indicator. - **Number of commits or PRs**: if engineers are evaluated on commit frequency, they split changes into many tiny commits. The metric rises; the value per commit falls. - **Bug count**: if teams are measured on closed bugs, bugs get closed without being fixed, or the bar for opening bugs rises. The practical corrective is to use metrics for learning rather than evaluation, and to rotate metrics so they cannot be persistently gamed. A metric observed without being a target remains informative. The moment it becomes a target, interpret it with caution. Related: [[parkinsons-law]] describes a similar dynamic with time estimates.