Splitting User Stories
Splitting User Stories
Created by Hokans, Becca, last modified on May 01, 2019
How Small?
How small should stories be? The recommendation depends on your teamâs velocity. Before your next planning meeting calculate what estimate should trigger splitting a story. For most teams, it seems to be 8 or 13 points. When youâre in a planning meeting and you hit your trigger estimate, try a few of the patterns until you find a good split.
Which Pattern to Use
Youâll often find that you can split a story using several of the patterns. Which split should you choose? Use these two rules of thumb:
Choose the split that lets you deprioritize or throw away a story. The 80/20 principle says that most of the value of a user story comes from a small share of the functionality. When one split reveals low-value functionality and another doesnât, it suggests that the latter split hides waste inside each of the small stories. Go with the split that lets you throw away the low-value stuff.
Choose the split that gets you more equally sized small stories. The split that turns an 8 point story into four 2 point stories is more useful than the one that produces a 5 and a 3. It gives the Product Owner more freedom to prioritize parts of the functionality separately.
Pattern #1: Workflow Steps
Hereâs a story from a content management system one of my clients was creating:
As a content manager, I can publish a news story to the corporate website.
Didnât sound too bigâuntil we dug into the workflow to get a story published. It turned out that just to get a few sentence news story on the corporate website required both editorial and legal approval and final review on a staging site. Thereâs no way 6-10 stories like this would fit in an iteration.
In a workflow like this, the biggest value often comes from the beginning and end. The middle steps add incremental value, but donât stand alone. So it can work well to build the simple end-to-end case first and then add the middle steps and special cases.
The new stories included:
âŠI can publish a news story directly to the corporate website.
âŠI can publish a news story with editor review.
âŠI can publish a news story with legal review.
âŠI can view a news story on a staging site.
âŠI can publish a news story from the staging site to production.
Sometimes, though, the whole workflow matters, so you canât just start with the beginning and end. In those situations, look for a thin slice through the whole workflow. Maybe it supports the most common case. Maybe you hard-code or otherwise simplify the best understood parts of the workflow to you can explore the more complex parts.
Either way, the most obvious splitâone step at a time from beginning to endâis the wrong way to go.
Pattern #2: Business Rule Variations
This story has a few equally complex stories hidden within it that accomplish the same thing using different business rules:
As a user, I can search for flights with flexible dates.
Digging into âflexible datesâ reveals several different business rules, each of which can be a good story on its own:
âŠas ân days between x and y.â
âŠas âa weekend in December.â
âŠas â± n days of x and y.â
Pattern #3: Major Effort
Sometimes a story can be split into several parts where most of the effort will go towards implementing the first one. For example, this credit card processing story,
As a user, I can pay for my flight with VISA, MasterCard, Diners Club, or American Express.
could be split into four stories, one for each card type. But the credit card processing infrastructure will be built to the support the first story; adding more card types will be relatively trivial. We could estimate the first story larger than the other three, but then we have to remember to change our estimates if the Product Owner later changes priorities. Instead, we should defer the decision about which card type gets implemented first like this:
âŠI can pay with one credit card type (of VISA, MC, DC, AMEX).
âŠI can pay with all four credit card types (VISA, MC, DC, AMEX) (given one card type already implemented).
The two new stories still arenât independent, but the dependency is much clearer than it would be with a story for each card type.
Pattern #4: Simple/Complex
When youâre in a planning meeting discussing a story, and the story seems to be getting larger and larger (âwhat about x?â; âhave you considered y?â), stop and ask, âWhatâs the simplest version of this?â Capture that simple version as its own story. Youâll probably have to define some acceptance criteria on the spot to keep it simple. Then, break out all the variations and complexities into their own stories. So, for example, this story,
As a user, I can search for flights between two destinations.
stays simple by splitting off variations like,
âŠspecifying a max number of stops.
âŠincluding nearby airports.
âŠusing flexible dates.
âŠetc.
Pattern #5: Variations in Data
Complexity in a story can come from handling variations in data. For example, a system Iâm currently working on needs to model geographic areas served by transportation providers. We could have burned our whole project budget just handing geography; itâs potentially that complex. When I talked through the story,
As a user, I can search for transportation providers by trip origin and destination.
with our Product Owner, I discovered that, while we didnât need full-fledged GIS, modeling geography would still be quite complex. We stopped and asked, âWhatâs the âgood enoughâ way to model geography so we can build other high-value features now?â We settled on,
As a user, I can search for transportation providers by trip origin and destination as counties.
This worked for a while, until we collected more data and found that some providers only served certain cities or even neighborhoods. So a new story came up:
As a user, I can search for transportation providers by trip origin and destination as counties, cities, towns, or neighborhoods.
Looking over the new provider data, we also discovered that some providers will support trips originating in a single city but ending in any number of surrounding cities. This led to the story:
Providers can serve different geographic areas for trip origin and destination.
All three of these stories are split from the original geography story. The difference here is that we added stories just-in-time after building the simplest version. But sometimes you know the data variations up-front. The classic example is localization:
As a content manager, I can create news stories.
âŠin English.
âŠin Japanese.
âŠin Arabic.
âŠetc.
Pattern #6: Data Entry Methods
Complexity sometimes is in the user interface rather than in the functionality itself. In that case, split the story to build it with the simplest possible UI and then build the more usable or fancier UI. These, of course, arenât independentâthe second story effectively is the original story if you do it firstâbut it still can be a useful split.
As a user, I can search for flights between two destinations.
âŠusing simple date input.
âŠwith a fancy calendar UI.
Pattern #7: Defer Performance
Sometimes, a large part of the effort is in making a feature fastâthe initial implementation isnât all that hard. But you can learn a lot from the slow implementation and it has some value to a user who wouldnât otherwise be able to do the action in the story. In this case, break the story into âmake it workâ and âmake it fastâ:
As a user, I can search for flights between two destinations.
âŠ(slowâjust get it done, show a âsearchingâ animation).
âŠ(in under 5 seconds).
Pattern #8: Operations (e.g. CRUD)
The word âmanageâ in a user story is a giveaway that the story covers multiple operations. This offers a natural way to split the story. For example:
As a user, I can manage my account.
âŠI can sign up for an account.
âŠI can edit my account settings.
âŠI can cancel my account.
Pattern #9: Break Out a Spike
A story may be large not because itâs necessarily complex, but because the implementation is poorly understood. In this case, no amount of talking about the business part of the story will allow you to break it up. Do a time-boxed spike first to resolve uncertainty around the implementation. Then, you can do the implementation or have a better idea of how to break it up. Donât know how to implement the following story?
As a user, I can pay by credit card.
Then, break it into:
Investigate credit card processing.
Implement credit card processing.
In the âinvestigateâ story, the acceptance criteria should be questions you need answered. Do just enough investigation to answer the questions and stop; itâs easy to get carried away doing research.
The spike split is last because it should be your last resort. You probably know enough to build something. Do that, and youâll know more. So, make every effort to use one of the previous eight patterns before resorting to the spike pattern.
Conclusion
Resist the temptation to split an overly large user story by architectural layers. Instead, try these patterns to split your story into smaller stories that still satisfy the INVEST model.
Five Story-Splitting Mistakes and How to Stop Making Them:
#1. Treating Story Splitting as Just the Job of the Product Owner
While splitting should not be viewed as solely the responsibility of the product owner, the product owner should be involved in splitting. The responsibility should not be given over to the development team alone. For stories to be split in an optimal way, the product owner does need to be involved.
This means story splitting should be viewed as a whole-team activity. That doesnât mean the whole team has to be involved in every split. Rather it means that splitting isnât delegated to one or two people on the team who do it for every story.
Instead two teammates may join with the product owner to split a story or two. Later another team member and I might help the product owner split the next story.
#2. Splitting Stories along Technical Boundaries
Often these are the stories that get written as, âAs a programmer, I wantâŠâ and describe functionality from the viewpoint of the team rather of an end user or stakeholder.
Splitting along technical boundaries can lead to stories like:
As a user, I want a backend that does such-and-such
As a user, I want a frontend that does the same such-and-such
A good story is one that goes through an entire technology stack. Or at least as much of that technology stack as is needed to deliver the feature. Stories split along technical boundaries gives us stories that donât deliver any value to users on their own. A frontend (say, a web interface) does users no good until it is paired with a backend (a middle tier and/or database).
To avoid falling into the trap of splitting a story along technical boundaries, see if you can instead split the story based on the paths through the story.
To split a story on its paths, think about the paths through the code the team will write. Thereâs often a happy path, that defines what occurs if all goes well. There is usually also a path for each error that can occur.
You can also think about the paths a user may take in performing the story that needs to be split. For example, consider a sample story of paying for the items in a shopping cart, since thatâs an example that would apply to any eCommerce site. In checking out, the buyer can select a shipping methodâperhaps choosing between overnight delivery, two-day delivery, or a slower delivery.
Since choosing a shipping method will add to the effort to develop the story, consider leaving that functionality out of an initial implementation. Perhaps a first version assumes everyone gets slow delivery with no option for faster shipping. Developing just that path through the implementation simplifies the user interface (thereâs no need to allow a user to select shipping options), reduces the number of cases to test, and so on. Splitting by path would be a very viable option in a situation like this.
#3. Specifying the Solution as Part of the Story
The best user stories will focus on what needs to be done rather than how it will be done.
For example, right now I have a picture I want to hang on my office wall. If I were to ask someone to do it for me, I could tell them how I want it done. I could say I want it hung using a â â mushroom head toggle bolt. Iâve very much specified the how if I do that. Unless the exact details matter to me, Iâd be better sticking to what I want: âIâd like this picture safely hung in about that spot on that wall.â
Including the solution within a story tends to happen when stories are being split too small. Once a story gets to a certain small size, there isnât much more to say about the story and implementation details start to creep in when they shouldnât.
#4. Using a Spike on Every Story
A spike is an effort undertaken by a team to develop new knowledge rather than new functionality. Spikes are often used to reduce the risk or uncertainty on a story. If a team is unsure about or unfamiliar with a new technology, they may run a spike so that they can learn more about the technology.
Splitting a spike out of a story can be a good approach. It reduces the uncertainty in the initial story, which will likely make the story take less time to develop. But running a spike may also help a team and product owner discover new ways to better split the story if itâs still too large after the spike.
So, extracting a spike from a story is a good idea in some cases. But the mistake some teams will make is becoming over-reliant on spikes. Some teams will go so far as to split a spike out of every story.
Bad idea.
Spikes are most useful when a story includes an excessive amount of uncertainty, and when the team and product owner agree that uncertainty should be reduced before implementing the story. A spike should not be used when a story has an everyday, common amount of uncertainty.
Uncertainty exists to some extent in every story. Will users like this if done that way? Will this design perform adequately? Will this new tool perform as well as the vendor said it would? These, or ones like them, are questions that exist in every story. The goal of a spike should not be to eliminate all uncertainty. In most cases, that would be impossible anyway until the final line is written.
Instead, spikes should be reserved for when a user story contains so much uncertainty that starting the story in earnest would be a mistake without the knowledge to be gained from the spike.
Teams that split spikes out of stories too frequently often do so out of fear of getting an estimate wrong. The team feels like theyâll be punished, or at least criticized, if a story takes longer to develop than they estimate. To overcome this problem, either de-emphasize estimates or work to create safety around them so that teams donât fear each estimate will used against them.
#5. Thinking All Business Rules Need to Be Enforced from the Start
Sometimes a user story is made difficult to implement because of rules the story must comply with. These are often called business rules because the businessâs operation is usually the source of them. Other times, though, they can be thought of as rules imposed by the system. Let me illustrate this with an example.
Suppose you are on a team working at a bank that makes mortgage loans. Your team is developing a new mobile app that the bankâs customers will use to apply for home loans. Perhaps a rule in place at your bank is that no one can have more than $10 million in outstanding home loans. This rule applies whether the borrower wants one big loan or now wants a $6 million loan on a second home in addition to an existing $5 million loan.
Your teamâs new mobile app will ideally enforce this maximum by not allowing a person to submit a loan application that would exceed $10 million in total loans (whether this is the borrowerâs first, second or tenth loan).
A rule such as this will increase the effort to complete the user story because the new mobile app will need to look up the existing loan balance, add it to the requested loan amount and make sure the sum does not exceed $10 million.
If this rule makes the story take so long that it will not be feasible to implement the story within a single iteration, the rule should be relaxed (or removed) in the initial iteration and then added back in a subsequent iteration. And, no, the team shouldnât release a product that violates business rules (temporarily).
The mistake Iâll see teams make is thinking that all such business rules need to implemented right from the start. This often leads a team and product owner to instead use a less desirable way of splitting the story.
In the next meeting in which youâre splitting stories, look for ways to partially implement a story by not supporting a rule initially. As long as you donât intend to release that iterationâs finished work, youâll find that relaxing rules can be a great way to split a story.
References:
https://www.mountaingoatsoftware.com/blog/five-story-splitting-mistakes-and-how-to-stop-making-them
https://www.leadingagile.com/2015/06/story-splitting-where-to-start/
https://agileforall.com/resources/how-to-split-a-user-story/
last updated september 2019