When I’m teaching user story writing, inevitably someone will write a story like “User wants to log-in”, and this is actually a horrible story.

Have you ever gotten up in the morning and thought “Oh boy, I get to log-in today. It’s going to be great!” Of course, you haven’t. No user ever wants to log-in, so writing the story as “User wants to log-in” completely misses the point.

So why would we even build a log-in feature if nobody wants to do it? Because other stakeholders of the product do care about that. The key here isn’t that log-in is a bad feature, it’s that we’ve completely misunderstood who wants it and why.

When we write a user story, we should write it from the perspective of the person who cares most about it. The quickest way to find that person is to ask who would be upset if we didn’t build it, and why. In this case it isn’t the person logging in. In fact, they may actively not want this.

Write a story from the perspective of whoever cares most about it: the person who’d be upset if you didn’t build it.

Let’s improve the original story: “Corporate risk wants people to log-in before they have access to any confidential information”. Now we’ve identified who really cares and this is becoming a reasonable story. We haven’t necessarily identified that log-in is the right answer to the problem, but we’ve at least correctly identified who wants it.

Someone always brings up “but I do want to log-in so that my information is safe”, which conflates the logging in with the thing they actually do want: safety. You could certainly write a story from their perspective which focused on the safety. “User wants to know that nobody else can access their documents without permission” and that would be an improvement, although it’s still not directly linking the log-in to the safety. Does that person want to log-in or do they want to know their information is safe?

One caveat on my own wording: I’ve said “user” throughout, and that word is normally far too generic to be useful in a story. Log-in is one of the rare cases where it really does apply to everyone, so I’ll give it a pass this time.

Getting the who right is only one piece of what makes a good story; it’s part of a bigger idea I’ve written about before, that a story has to be valuable to someone who isn’t us. It’s something I often see done poorly though. The user is frequently an afterthought, when it’s critical context that helps us understand what problem we’re trying to solve. If we don’t know who we’re building it for, we’re almost certainly building the wrong thing.