Say you start tracking something new on your team, like how many reviews each person does. What's the first thing people wonder?
"Is this going to be used against me?"
That's a fair question...a lot of metrics have earned it. Err, I should say that it's been earned because a lot of metrics have been used improperly.
In this post, we're going to discuss how metrics break, and what we can do instead to keep them useful.
Let's dive in!
What breaks a metric
Once a number is used to judge someone's performance, honesty is often the first thing to go. The work stops getting measured, and instead it becomes all about making the number look "good".
Test coverage is a good example. Reward it, and you get loaded up with tests that run every line and assert nothing useful. The number of tests climbs, and the safety they were supposed to stand for fades away.
There's a name for this...Goodhart's law. When a measure becomes a target, it stops being a good measure. People optimize the number and leave the real thing behind.
So what turns a measure into a target? To put it plainly, as soon as a reward or a punishment is attached to it, it becomes a target.
Treat every metric as a leading indicator
Every metric I watch is a leading indicator and nothing else. It's a datapoint that tells me where to look. Nobody gets rewarded or punished for it.
Things like how many reviews someone does, or the average number of comments on a pull request. I don't grade anyone on those numbers, so there's nothing to game. And when one moves, it still means something.
So many leaders take high or low numbers strictly as a representation of performance...but I've found this to be a costly mistake. Say one of your team members did more reviews than everyone else on the team. Many leaders praise this kind of performance, labelling it as "teamwork" and telling everyone else they should be more like them. But let's step back and look at this for what it is...a leading indicator that says we should look closer.
Immediately, I have questions:
- What was quality like on those reviews?
- What were the changes included in those reviews?
- What was this person, and the rest of the team working on when this occurred?
Instead of just relying on the metric alone and assuming it tells us the truth, we should take it as a leading indicator, or an alarm, telling us that something is different.
High or low just means look closer
A count running high or low doesn't mean good or bad. It means go look a little closer.
Most of the time there's a perfectly good reason. Someone got stuck on a hard problem. Someone had a really good week.
But every so often, that second look turns up something real.
- Maybe it's a spot where someone could use some coaching.
- Maybe some piece of work was more complex than anyone had realized and they were working through that.
- Perhaps that person is going through something personal, and is not performing at their normal levels.
The metric alone wouldn't have told you any of this.
Attach a reward or a punishment to it, though, and you've made it a target. From then on, it stops telling you these kinds of truths.
What about team targets?
You might be wondering how this fits with setting targets. I set some myself, like no PR is allowed to sit idle in any stage for more than 24 hours (8 business hours).
Those are goals for the team about how the work moves. They're there to make the work easier and more efficient. Nobody is rewarded or punished for hitting them. When one or more of them is off, we figure out why, and "course correct".
The same rule for risk scores
I'm building Merge Lantern, a tool that puts a risk score on pull requests. I hold it to the same rule. A risk score is a signal to look closer.
Down the road, Merge Lantern might give developers a risk score too. Say one developer's score runs high. That could be a sign they've been getting assigned too much of the high-risk work.
That's worth knowing. If someone is put in higher-risk, higher-stress situations for long periods of time, it can lead to burnout and unhappiness. It can also leave only one person on the team who knows the sensitive parts of the codebase, along with other issues.
So a high score there is a reason to look at how the team hands out the work.
Keep nothing riding on it
Metrics stay useful as long as nothing rides on them...no reward...no punishment. Use them to decide where to look closer, and then go find out what's really going on.
How do you keep a metric from turning into a scoreboard on your team?
Ever wish you knew which pull requests could actually hurt you before they merged? That's what I'm building Merge Lantern for. It tells your team (and your AI agents) which ones are risky and which aren't. That way you know where you should spend your limited time, and everything else can keep moving fast. Come take a look at mergelantern.com.

