We define requirements in parallel with other work.
A team using an up-front requirements phase keeps their requirements in a requirements document. An XP team doesn’t have a requirements phase and story cards aren’t miniature requirements documents, so where do requirements come from?
In XP, the on-site customers sit with the team. They’re expected to have all the information about requirements at their fingertips. When somebody needs to know something about the requirements for the project, she asks one of the on-site customers rather than looking in a document.
Face-to-face communication is much more effective than written communication, as [Cockburn] discusses, and it allows XP to save time by eliminating a long requirements analysis phase. However, requirements work is still necessary. The on-site customers need to understand the requirements for the software before they can explain it.
The key to successful requirements analysis in XP is expert customers. Involve real customers, an experienced product manager, and experts in your problem domain (see The XP Team” in Chapter 3 and Real Customer Involvement” in Chapter 6). Many of the requirements for your software will be intuitively obvious to the right customers.
If you have trouble with requirements, your team may not include the right customers.
Some requirements will necessitate even expert customers ...