User Stories
Template for documenting user stories and scenarios
Template Structure
1. Story Format
- ID and title
- As a/I want/So that format
- Priority and sprint
- Dependencies
2. Acceptance Criteria
- Scenarios
- Given/When/Then format
- Test cases
3. Traceability
- Related requirements
- Implementation status
- Test coverage
Story Format and Numbering
Stories follow this hierarchical numbering system: - EPIC: E[01-99] (e.g., E01) - Feature: E[01-99]-F[01-99] (e.g., E01-F01) - User Story: E[01-99]-F[01-99]-US[01-99] (e.g., E01-F01-US01) - Scenario: E[01-99]-F[01-99]-S[01-99] (e.g., E01-F01-S01) - Acceptance Test: E[01-99]-F[01-99]-TA[01-99] (e.g., E01-F01-TA01)
User Story Structure
Basic Format
As a [user type], I want [goal] so that [benefit/value].
Example Story with Full Details
@critical @functional @sprint-1 @user-role-customer
@source:PRD-2023-Q1 @implements:auth-design-v1
**User Story:** E01-F01-US01 - As a new customer, I want to create an account so that I can track my orders.
**Description:**
Enable customers to register for a new account using email or social login options.
**Dependencies:**
@depends-on:E01-F02
@related-to:E01-F03
**Acceptance Criteria:**
@automated @smoke @security
Scenario: E01-F01-S01 - Email Registration
Given I am on the registration page
When I enter valid registration details
And I submit the form
Then my account should be created
And I should receive a confirmation email
@automated @regression
Scenario: E01-F01-S02 - Password Validation
Given I am on the registration page
When I enter a password less than 8 characters
Then I should see an error message
And the form should not submit
Requirement Traceability
Requirements Mapping
User stories should reference their associated functional and non-functional requirements:
@implements-fr:FR-103 @implements-nfr:NFR-201
**User Story:** E01-F01-US01 - As a new customer...
Example with Requirements Links
@critical @functional @sprint-1
@implements-fr:FR-103,FR-104 @implements-nfr:NFR-201,NFR-202
**User Story:** E01-F01-US01 - As a new customer, I want to create an account...
**Related Requirements:**
- Functional: FR-103 (User Authentication), FR-104 (Account Creation)
- Non-functional: NFR-201 (Response Time), NFR-202 (Data Security)
INVEST Criteria Checklist
Each story should meet these criteria:
Validation Checklist
Before submitting a user story, verify: