Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:48:55 +08:00
commit f28999f19c
127 changed files with 62038 additions and 0 deletions

View File

@@ -0,0 +1,733 @@
# Product Metrics Frameworks
A comprehensive guide to choosing and implementing product metrics frameworks for measuring success.
---
## Table of Contents
1. [Overview](#overview)
2. [AARRR (Pirate Metrics)](#aarrr-pirate-metrics)
3. [HEART Framework](#heart-framework)
4. [North Star Metric](#north-star-metric)
5. [OKRs (Objectives & Key Results)](#okrs-objectives--key-results)
6. [Product-Market Fit Metrics](#product-market-fit-metrics)
7. [Engagement Metrics](#engagement-metrics)
8. [Choosing the Right Framework](#choosing-the-right-framework)
---
## Overview
### Why Metrics Matter
**Metrics help you:**
- Measure feature success objectively
- Make data-driven decisions
- Align teams around shared goals
- Identify what's working and what's not
- Communicate impact to stakeholders
### Types of Metrics
**Leading Indicators:** Predict future outcomes
- Example: Free trial sign-ups → Future revenue
**Lagging Indicators:** Measure past results
- Example: Monthly revenue, churn rate
**Actionable vs. Vanity Metrics**
- **Actionable:** Can influence through product changes (e.g., conversion rate)
- **Vanity:** Looks good but doesn't drive decisions (e.g., total registered users)
---
## AARRR (Pirate Metrics)
Created by Dave McClure, this framework focuses on the customer lifecycle.
### The Five Stages
```
Acquisition → Activation → Retention → Revenue → Referral
```
### 1. Acquisition
**What:** How do users find you?
**Key Metrics:**
- Website traffic
- App store impressions
- Click-through rate (CTR) from ads
- Cost per acquisition (CPA)
- Traffic sources (organic, paid, referral)
**Example Targets:**
- 10,000 monthly website visitors
- CAC < $50
- 5% CTR on paid ads
**Questions to Answer:**
- Which channels drive the most users?
- What's our cost per channel?
- Which campaigns convert best?
---
### 2. Activation
**What:** Do users have a great first experience?
**Key Metrics:**
- Sign-up completion rate
- Time to "aha moment"
- Percentage reaching key milestone
- Onboarding completion rate
- Feature adoption in first session
**Example Targets:**
- 60% sign-up completion
- 40% reach "aha moment" in first session
- 80% complete onboarding
**Questions to Answer:**
- What does a great first experience look like?
- Where do users drop off in onboarding?
- How quickly do users find value?
**Example "Aha Moments":**
- **Slack:** Send your first message
- **Dropbox:** Upload your first file
- **Airbnb:** Complete your first booking
---
### 3. Retention
**What:** Do users come back?
**Key Metrics:**
- Daily/Weekly/Monthly Active Users (DAU/WAU/MAU)
- Retention curves (Day 1, Day 7, Day 30)
- Churn rate
- Session frequency
- Feature usage over time
**Example Targets:**
- 40% Day 7 retention
- 25% Day 30 retention
- < 5% monthly churn
**Cohort Analysis:**
```
| Cohort | Week 1 | Week 2 | Week 3 | Week 4 |
|-----------|--------|--------|--------|--------|
| Jan 2024 | 100% | 45% | 30% | 25% |
| Feb 2024 | 100% | 50% | 35% | 28% |
```
**Questions to Answer:**
- What makes users come back?
- When do users churn?
- How can we re-engage inactive users?
---
### 4. Revenue
**What:** How do you monetize?
**Key Metrics:**
- Monthly Recurring Revenue (MRR)
- Average Revenue Per User (ARPU)
- Customer Lifetime Value (LTV)
- Conversion to paid rate
- Upsell/cross-sell rate
**Example Targets:**
- 5% free-to-paid conversion
- $50 ARPU
- LTV:CAC ratio > 3:1
**Formulas:**
```
LTV = ARPU × Average Customer Lifespan
LTV:CAC = Lifetime Value ÷ Customer Acquisition Cost
Churn Rate = Customers Lost ÷ Total Customers × 100
```
**Questions to Answer:**
- Which features drive conversions?
- What's our payback period?
- How can we increase ARPU?
---
### 5. Referral
**What:** Do users tell others?
**Key Metrics:**
- Viral coefficient (K-factor)
- Net Promoter Score (NPS)
- Referral rate
- Social shares
- Word-of-mouth attribution
**Example Targets:**
- 15% of users refer others
- NPS > 50
- K-factor > 1 (viral growth)
**Formulas:**
```
K-factor = (Number of Invites per User) × (Conversion Rate of Invites)
NPS = % Promoters - % Detractors
```
**Questions to Answer:**
- Why do users refer others?
- How can we incentivize referrals?
- What makes us shareable?
---
### AARRR Example: SaaS Product
| Stage | Metric | Current | Target | Actions |
|-------|--------|---------|--------|---------|
| Acquisition | Monthly visitors | 50,000 | 75,000 | SEO, content marketing |
| Activation | Trial sign-ups | 5% | 8% | Improve landing page |
| Retention | Day 30 retention | 20% | 30% | Onboarding improvements |
| Revenue | Free-to-paid conversion | 3% | 5% | Pricing page redesign |
| Referral | Users who refer | 8% | 15% | Referral program launch |
---
## HEART Framework
Created by Google, focuses on user experience quality.
### The Five Dimensions
**HEART = Happiness + Engagement + Adoption + Retention + Task Success**
---
### 1. Happiness
**What:** User satisfaction and perception
**Metrics:**
- Net Promoter Score (NPS)
- Customer Satisfaction (CSAT)
- User ratings/reviews
- Support ticket sentiment
- User feedback scores
**Measurement Methods:**
- Surveys (post-interaction, periodic)
- App store ratings
- In-app feedback forms
- Social media sentiment
**Example:**
```
Feature: New checkout flow
Happiness Metric: CSAT score
Target: > 4.5/5 average rating
Measurement: Post-purchase survey
```
---
### 2. Engagement
**What:** Level of user involvement
**Metrics:**
- Session duration
- Pages/screens per session
- Feature usage frequency
- Time spent in app
- Actions per session
**Example:**
```
Feature: News feed
Engagement Metric: Daily sessions per user
Current: 1.2 sessions/day
Target: 2.0 sessions/day
```
---
### 3. Adoption
**What:** New users or feature uptake
**Metrics:**
- New user sign-ups
- Feature adoption rate
- Time to first use
- Percentage of users trying new feature
**Example:**
```
Feature: Dark mode
Adoption Metric: % of users enabling dark mode
Target: 40% within 30 days of launch
```
---
### 4. Retention
**What:** Users returning over time
**Metrics:**
- DAU/WAU/MAU
- Retention curves
- Churn rate
- Repeat usage rate
**Example:**
```
Feature: Collaboration tools
Retention Metric: Week-over-week active teams
Target: 70% of teams active weekly
```
---
### 5. Task Success
**What:** Can users accomplish their goals?
**Metrics:**
- Task completion rate
- Error rate
- Time to complete task
- Search success rate
**Example:**
```
Feature: File upload
Task Success Metric: Upload completion rate
Current: 85%
Target: 95%
Error analysis: Large file timeouts
```
---
### HEART Framework Template
| Dimension | Goals | Signals | Metrics |
|-----------|-------|---------|---------|
| **Happiness** | Users love the feature | Positive feedback | NPS > 40 |
| **Engagement** | Users interact frequently | Daily active usage | 60% DAU/MAU |
| **Adoption** | Most users try it | Feature activation | 70% adoption |
| **Retention** | Users keep coming back | Weekly return rate | 50% W1 retention |
| **Task Success** | Users complete goals | Low error rate | 95% success rate |
---
## North Star Metric
A single metric that best captures the core value you deliver to customers.
### Characteristics of a Good North Star Metric
1. **Reflects value delivery** to customers
2. **Measures progress** toward your vision
3. **Actionable** by the team
4. **Leading indicator** of revenue
5. **Understandable** by everyone
---
### Examples by Company
| Company | North Star Metric | Why |
|---------|------------------|-----|
| **Airbnb** | Nights booked | Core value: successful stays |
| **Spotify** | Time spent listening | Core value: music enjoyment |
| **Slack** | Messages sent by teams | Core value: communication |
| **Facebook** | Daily Active Users | Core value: social connection |
| **Netflix** | Hours watched | Core value: entertainment |
| **Uber** | Rides completed | Core value: transportation |
| **Medium** | Total time reading | Core value: quality content |
---
### Finding Your North Star Metric
**Step 1: Define your value proposition**
- What core value do you deliver?
- What's the "aha moment" for users?
**Step 2: Identify the metric**
- What measurement best captures that value?
- Is it a leading indicator of business success?
**Step 3: Validate the metric**
- Does it correlate with revenue?
- Can teams influence it?
- Is it understandable?
**Step 4: Set targets and track**
- What's the current baseline?
- What's the target growth rate?
- How will you measure progress?
---
### North Star Metric Tree
Break down your North Star into contributing metrics:
```
North Star: Weekly Active Users
├── New User Acquisition
│ ├── Sign-ups
│ └── Onboarding completion
├── Activation
│ └── Users reaching "aha moment"
└── Retention
├── Week 1 retention
└── Week 4 retention
```
---
## OKRs (Objectives & Key Results)
Goal-setting framework popularized by Google.
### Structure
**Objective:** Qualitative, inspirational goal
**Key Results:** Quantitative, measurable outcomes (3-5 per objective)
---
### Writing Good OKRs
**Objective Characteristics:**
- Inspirational and motivating
- Qualitative
- Time-bound (quarterly or annual)
- Aligned with company strategy
**Key Result Characteristics:**
- Quantitative and measurable
- Specific with clear targets
- Ambitious but achievable
- 3-5 per objective
---
### Examples
#### Example 1: Growth OKR
**Objective:** Become the go-to platform for small business invoicing
**Key Results:**
1. Increase monthly active businesses from 10,000 to 25,000
2. Achieve 40% month-over-month retention
3. Reach NPS of 50+
4. Generate $500K MRR
---
#### Example 2: Product Quality OKR
**Objective:** Deliver a world-class mobile experience
**Key Results:**
1. Reduce app crash rate from 2.5% to <0.5%
2. Achieve 4.5+ star rating on both app stores
3. Improve app load time to <2 seconds (p95)
4. Increase mobile DAU/MAU ratio from 30% to 45%
---
#### Example 3: Feature Launch OKR
**Objective:** Successfully launch team collaboration features
**Key Results:**
1. 60% of active users try collaboration features within 30 days
2. 25% of users become weekly active collaborators
3. Collaboration features drive 15% increase in paid conversions
4. Achieve CSAT score of 4.2/5 for collaboration features
---
### OKR Template for PRDs
```markdown
## OKRs
### Objective: [Inspirational goal]
**Key Results:**
1. [Metric 1]: Increase/decrease [current] to [target] by [date]
2. [Metric 2]: Achieve [target value] for [metric]
3. [Metric 3]: [Specific measurable outcome]
**Tracking:**
- Current status: [Progress report]
- Dashboard: [Link to metrics dashboard]
- Review cadence: [Weekly/bi-weekly]
```
---
## Product-Market Fit Metrics
Measuring whether you've achieved product-market fit.
### Sean Ellis Test
Survey question: **"How would you feel if you could no longer use [product]?"**
- Very disappointed
- Somewhat disappointed
- Not disappointed
**PMF Threshold:** 40%+ answer "Very disappointed"
---
### Other PMF Indicators
**Qualitative Signals:**
- Users voluntarily refer others
- Organic growth without marketing
- High engagement and retention
- Users find creative use cases
- Positive unsolicited feedback
**Quantitative Metrics:**
- **Retention:** 40%+ month 1 retention
- **NPS:** Score > 50
- **Growth:** 10%+ month-over-month organic growth
- **Engagement:** High DAU/MAU ratio (>40%)
- **LTV:CAC:** Ratio > 3:1
---
## Engagement Metrics
Deep dive into measuring user engagement.
### DAU/WAU/MAU
**Definitions:**
- **DAU:** Daily Active Users (unique users in a day)
- **WAU:** Weekly Active Users (unique users in a week)
- **MAU:** Monthly Active Users (unique users in a month)
**Ratios:**
- **DAU/MAU:** Stickiness (how many monthly users come daily)
- **DAU/WAU:** Daily engagement intensity
**Benchmarks:**
- **Excellent:** DAU/MAU > 50% (e.g., messaging apps)
- **Good:** DAU/MAU = 20-50% (e.g., social media)
- **Average:** DAU/MAU = 10-20% (e.g., utilities)
---
### Session Metrics
**Key Measurements:**
- **Session duration:** Time spent per session
- **Session frequency:** Sessions per user per day/week
- **Session depth:** Actions/pages per session
**Example Targets:**
- Session duration: > 5 minutes
- Session frequency: 2+ sessions/day
- Session depth: > 8 page views
---
### Feature Engagement
**Metrics:**
- **Adoption rate:** % of users who try the feature
- **Active usage:** % of users actively using regularly
- **Depth of use:** Actions per user within feature
**Example:**
```
Feature: Document collaboration
- Adoption: 50% of users have collaborated at least once
- Active usage: 30% collaborate weekly
- Depth: Average 12 collaborative edits per week
```
---
## Choosing the Right Framework
### Decision Matrix
| Framework | Best For | Time Horizon | Complexity |
|-----------|----------|--------------|------------|
| **AARRR** | Growth-focused products, startups | Ongoing | Medium |
| **HEART** | UX quality, feature launches | Per feature | Low-Medium |
| **North Star** | Company alignment, focus | Ongoing | Low |
| **OKRs** | Goal setting, team alignment | Quarterly | Medium-High |
---
### By Product Stage
**Early Stage (Pre-PMF):**
- Focus: Product-Market Fit metrics
- Framework: AARRR (Activation & Retention focus)
- North Star: Early engagement metric
**Growth Stage (Post-PMF):**
- Focus: Scaling user acquisition
- Framework: Full AARRR funnel
- North Star: Growth-oriented metric
**Mature Stage:**
- Focus: Optimization and expansion
- Framework: HEART for features, OKRs for goals
- North Star: Revenue or engagement metric
---
### By Product Type
**Consumer Apps:**
- AARRR for growth funnel
- DAU/MAU for engagement
- Viral coefficient for referral
**B2B SaaS:**
- ARR/MRR for revenue
- Churn rate for retention
- Expansion revenue for growth
**Marketplace:**
- GMV (Gross Merchandise Value)
- Take rate (% of transaction)
- Liquidity (supply/demand balance)
**Content Platforms:**
- Time spent on platform
- Content creation rate
- Content consumption rate
---
## Metrics Anti-Patterns
### Common Mistakes
**1. Too Many Metrics**
- **Problem:** Tracking everything = focusing on nothing
- **Solution:** Choose 3-5 key metrics per initiative
**2. Vanity Metrics**
- **Problem:** Total users looks good but doesn't inform decisions
- **Solution:** Focus on active users, engagement, retention
**3. Lagging Only**
- **Problem:** Only tracking revenue = rear-view mirror
- **Solution:** Balance with leading indicators (activation, engagement)
**4. No Targets**
- **Problem:** Tracking without goals
- **Solution:** Set specific, time-bound targets
**5. Not Segmenting**
- **Problem:** Average metrics hide important patterns
- **Solution:** Segment by user type, cohort, feature usage
---
## Metrics Template for PRDs
```markdown
## Success Metrics
### North Star Metric
**Metric:** [Your single most important metric]
**Current:** [Baseline value]
**Target:** [Goal value by launch + X months]
**Why:** [Why this metric matters]
### Supporting Metrics
#### Acquisition
- **Metric 1:** [Name] - Current: [X], Target: [Y]
- **Metric 2:** [Name] - Current: [X], Target: [Y]
#### Activation
- **Metric 1:** [Name] - Current: [X], Target: [Y]
- **Metric 2:** [Name] - Current: [X], Target: [Y]
#### Retention
- **Metric 1:** [Name] - Current: [X], Target: [Y]
- **Metric 2:** [Name] - Current: [X], Target: [Y]
#### Revenue (if applicable)
- **Metric 1:** [Name] - Current: [X], Target: [Y]
### Counter-Metrics
[Metrics to ensure you're not sacrificing other areas]
- Example: Ensure support tickets don't increase > 10%
### Measurement Plan
- **Dashboard:** [Link]
- **Review Cadence:** [Weekly/bi-weekly]
- **Owner:** [Name]
```
---
## Resources & Tools
### Analytics Platforms
- **Amplitude:** Product analytics, retention analysis
- **Mixpanel:** Event tracking, funnel analysis
- **Google Analytics:** Web analytics
- **Heap:** Auto-capture analytics
### Survey Tools
- **Delighted:** NPS surveys
- **SurveyMonkey:** Custom surveys
- **Typeform:** Engaging survey forms
### Dashboard Tools
- **Tableau:** Data visualization
- **Looker:** Business intelligence
- **Datadog:** Infrastructure metrics
- **Metabase:** Open-source BI
---
## Summary
**Key Takeaways:**
1. **Choose frameworks** that match your product stage and goals
2. **Balance leading and lagging** indicators
3. **Set specific targets** with timelines
4. **Track counter-metrics** to avoid unintended consequences
5. **Review regularly** and iterate on what you measure
6. **Keep it simple** - 3-5 key metrics per initiative
7. **Align metrics** with business objectives
8. **Make metrics actionable** - can the team influence them?
**Remember:** The best metric is one that drives the right behavior and aligns your team around what matters most to users and the business.

View File

@@ -0,0 +1,572 @@
# Product Requirements Document Template
This template provides a comprehensive structure for creating Product Requirements Documents (PRDs). Adapt sections based on your needs and project scope.
---
## Document Header
**Product/Feature Name:** [Name]
**Status:** [Draft | In Review | Approved]
**Author:** [Your Name]
**Stakeholders:** [List key stakeholders]
**Date Created:** [YYYY-MM-DD]
**Last Updated:** [YYYY-MM-DD]
**Version:** [1.0]
---
## Executive Summary
**One-liner:** [Single sentence describing the product/feature]
**Overview:** [2-3 paragraph summary of what you're building, why, and expected impact]
**Quick Facts:**
- **Target Users:** [Primary user segment]
- **Problem Solved:** [Core problem being addressed]
- **Key Metric:** [Primary success metric]
- **Target Launch:** [Date or Quarter]
---
## Table of Contents
1. [Problem Statement](#problem-statement)
2. [Goals & Objectives](#goals--objectives)
3. [User Personas](#user-personas)
4. [User Stories & Requirements](#user-stories--requirements)
5. [Success Metrics](#success-metrics)
6. [Scope](#scope)
7. [Technical Considerations](#technical-considerations)
8. [Design & UX Requirements](#design--ux-requirements)
9. [Timeline & Milestones](#timeline--milestones)
10. [Risks & Mitigation](#risks--mitigation)
11. [Dependencies & Assumptions](#dependencies--assumptions)
12. [Open Questions](#open-questions)
13. [Stakeholder Sign-Off](#stakeholder-sign-off)
---
## Problem Statement
### The Problem
[Clearly articulate the problem you're solving. What pain point exists today?]
### Current State
[Describe how users currently handle this problem, including workarounds]
### Impact
**User Impact:**
- [How this affects users]
- [Quantify if possible: "Users spend 30 minutes daily on workarounds"]
**Business Impact:**
- [How this affects the business]
- [Include metrics: "Costs us $X in support tickets monthly"]
### Why Now?
[Explain the urgency or strategic importance of solving this now]
---
## Goals & Objectives
### Business Goals
1. **[Goal 1]:** [Description and expected impact]
2. **[Goal 2]:** [Description and expected impact]
3. **[Goal 3]:** [Description and expected impact]
### User Goals
1. **[Goal 1]:** [What users want to achieve]
2. **[Goal 2]:** [What users want to achieve]
3. **[Goal 3]:** [What users want to achieve]
### Non-Goals
[What we're explicitly NOT trying to achieve with this effort]
---
## User Personas
### Primary Persona: [Name/Type]
**Demographics:**
- Age range: [Range]
- Role/Title: [Role]
- Tech savviness: [Low/Medium/High]
- Location: [Geographic info if relevant]
**Behaviors:**
- [Key behavior pattern 1]
- [Key behavior pattern 2]
- [Key behavior pattern 3]
**Needs & Motivations:**
- [What they need to accomplish]
- [What drives their decision-making]
**Pain Points:**
- [Current frustration 1]
- [Current frustration 2]
- [Current frustration 3]
**Quote:** _"[Verbatim user quote that captures their perspective]"_
### Secondary Persona: [Name/Type]
[Repeat structure as needed for additional personas]
---
## User Stories & Requirements
### Epic: [Epic Name]
#### Must-Have Stories (P0)
##### Story 1: [Feature Name]
**User Story:**
```
As a [user type],
I want to [perform action],
So that [achieve benefit/value].
```
**Acceptance Criteria:**
- [ ] Given [context], when [action], then [expected outcome]
- [ ] Given [context], when [action], then [expected outcome]
- [ ] Edge case: [Specific scenario]
**Priority:** Must Have (P0)
**Effort:** [T-shirt size: XS/S/M/L/XL]
**Dependencies:** [List any dependencies]
---
##### Story 2: [Feature Name]
[Repeat structure]
---
#### Should-Have Stories (P1)
[List P1 stories using same format]
---
#### Nice-to-Have Stories (P2)
[List P2 stories using same format]
---
### Functional Requirements
| Req ID | Description | Priority | Status |
|--------|-------------|----------|--------|
| FR-001 | [Requirement description] | Must Have | Open |
| FR-002 | [Requirement description] | Should Have | Open |
| FR-003 | [Requirement description] | Nice to Have | Open |
### Non-Functional Requirements
| Req ID | Category | Description | Target |
|--------|----------|-------------|--------|
| NFR-001 | Performance | Page load time | < 2 seconds |
| NFR-002 | Availability | Uptime SLA | 99.9% |
| NFR-003 | Security | Data encryption | AES-256 |
| NFR-004 | Accessibility | WCAG compliance | Level AA |
---
## Success Metrics
### Key Performance Indicators (KPIs)
#### Primary Metric (North Star)
**Metric:** [Your North Star Metric]
**Definition:** [How it's calculated]
**Current Baseline:** [Current value]
**Target:** [Target value by launch + X months]
**Why This Metric:** [Why this measures success]
#### Secondary Metrics
| Metric | Current | Target | Timeframe |
|--------|---------|--------|-----------|
| [Metric 1] | [Value] | [Value] | [When] |
| [Metric 2] | [Value] | [Value] | [When] |
| [Metric 3] | [Value] | [Value] | [When] |
### Measurement Framework
**Framework Used:** [AARRR / HEART / Custom]
**Acquisition:**
- [Metric and target]
**Activation:**
- [Metric and target]
**Retention:**
- [Metric and target]
**Revenue:**
- [Metric and target]
**Referral:**
- [Metric and target]
### Analytics Implementation
**Events to Track:**
- `[event_name_1]` - [When triggered]
- `[event_name_2]` - [When triggered]
- `[event_name_3]` - [When triggered]
**Dashboards:**
- [Link to primary dashboard]
- [Link to secondary dashboard]
---
## Scope
### In Scope
**Phase 1 (MVP):**
- [Feature/capability 1]
- [Feature/capability 2]
- [Feature/capability 3]
**Phase 2 (Post-MVP):**
- [Feature/capability 1]
- [Feature/capability 2]
### Out of Scope
**Explicitly Excluded:**
- [Item 1 and why it's excluded]
- [Item 2 and why it's excluded]
- [Item 3 and why it's excluded]
### Future Considerations
**Potential Future Enhancements:**
- [Enhancement 1]
- [Enhancement 2]
- [Enhancement 3]
---
## Technical Considerations
### High-Level Architecture
[Describe the technical approach, architecture diagram link, or key architectural decisions]
### Technology Stack
**Frontend:**
- [Framework/library]
- [Key dependencies]
**Backend:**
- [Language/framework]
- [Key services]
**Infrastructure:**
- [Hosting platform]
- [Database]
- [Caching layer]
### API Requirements
**New Endpoints:**
- `GET /api/v1/[endpoint]` - [Description]
- `POST /api/v1/[endpoint]` - [Description]
- `PUT /api/v1/[endpoint]` - [Description]
**External APIs:**
- [Third-party API 1]
- [Third-party API 2]
### Security Requirements
- **Authentication:** [Method: JWT, OAuth, etc.]
- **Authorization:** [RBAC, ABAC, etc.]
- **Data Encryption:** [At rest and in transit]
- **Compliance:** [GDPR, HIPAA, SOC 2, etc.]
- **Rate Limiting:** [Limits and throttling strategy]
### Performance Requirements
- **Response Time:** [Target: e.g., < 200ms p95]
- **Throughput:** [Requests per second]
- **Concurrency:** [Concurrent users supported]
- **Database:** [Query performance targets]
- **Caching:** [Cache hit rate targets]
### Scalability
- **Expected Load:** [Users, requests, data volume]
- **Growth Projections:** [12-month forecast]
- **Scaling Strategy:** [Horizontal/vertical, auto-scaling]
### Data Considerations
**Data Model:**
- [Key entities and relationships]
**Storage Requirements:**
- [Estimated storage needs]
- [Retention policies]
**Data Migration:**
- [Migration plan if updating existing data]
- [Rollback strategy]
**Privacy & Compliance:**
- PII handling: [How personal data is handled]
- Data deletion: [User data deletion process]
- Audit logging: [What's logged and retained]
---
## Design & UX Requirements
### User Experience Principles
[Key UX principles guiding this feature]
### User Flows
**Primary Flow:**
1. [Step 1]
2. [Step 2]
3. [Step 3]
4. [Final state]
**Alternative Flows:**
- [Alternative scenario 1]
- [Error handling flow]
### Visual Design
**Design Assets:**
- [Link to Figma/Sketch files]
- [Link to design system]
**Key Screens:**
- [Screen 1]: [Link to mockup]
- [Screen 2]: [Link to mockup]
- [Screen 3]: [Link to mockup]
**Design System Components:**
- [Component 1 from design system]
- [Component 2 from design system]
- [New components needed]
### Interaction Patterns
- [Pattern 1: e.g., "Click to expand"]
- [Pattern 2: e.g., "Drag to reorder"]
- [Pattern 3: e.g., "Inline editing"]
### Accessibility (a11y)
**Requirements:**
- WCAG 2.1 Level AA compliance
- Keyboard navigation support
- Screen reader compatibility
- Color contrast ratios (4.5:1 for text)
- Focus indicators visible
- Alternative text for images
- Semantic HTML structure
**Testing:**
- [ ] Keyboard-only navigation test
- [ ] Screen reader test (NVDA/JAWS)
- [ ] Color contrast verification
- [ ] Automated a11y testing (axe/Lighthouse)
### Responsive Design
**Breakpoints:**
- Mobile: 320px - 767px
- Tablet: 768px - 1023px
- Desktop: 1024px+
**Platform-Specific Considerations:**
- [iOS-specific requirements]
- [Android-specific requirements]
- [Web-specific requirements]
---
## Timeline & Milestones
**Target Launch Date:** [YYYY-MM-DD or Q#]
### Phases
| Phase | Deliverables | Owner | Start Date | End Date |
|-------|-------------|-------|------------|----------|
| **Discovery** | Requirements finalized, design approved | PM/Design | [Date] | [Date] |
| **Design** | High-fidelity mockups, user testing | Design | [Date] | [Date] |
| **Development** | Backend + frontend implementation | Engineering | [Date] | [Date] |
| **QA** | Testing complete, bugs resolved | QA | [Date] | [Date] |
| **Beta** | Beta testing with select users | PM/QA | [Date] | [Date] |
| **Launch** | Production release | Engineering | [Date] | [Date] |
| **Post-Launch** | Monitoring, iteration based on data | PM/Engineering | [Date] | [Date] |
### Key Milestones
- **[Date]:** Kickoff meeting
- **[Date]:** Design review
- **[Date]:** Technical design review
- **[Date]:** Development complete
- **[Date]:** QA complete
- **[Date]:** Beta launch
- **[Date]:** General availability
- **[Date]:** Post-launch review
---
## Risks & Mitigation
| Risk | Impact | Probability | Mitigation Strategy | Owner |
|------|--------|------------|---------------------|-------|
| [Risk 1: e.g., "API partner delays"] | High | Medium | [Strategy: e.g., "Build with mock data, switch when ready"] | [Name] |
| [Risk 2] | Medium | High | [Strategy] | [Name] |
| [Risk 3] | Low | Low | [Strategy] | [Name] |
### Contingency Plans
**If [scenario occurs]:**
- Action plan: [Steps to take]
- Decision maker: [Who makes the call]
- Trigger: [What indicates this scenario]
---
## Dependencies & Assumptions
### Dependencies
**Internal:**
- [ ] [Dependency 1: e.g., "Design system update"]
- [ ] [Dependency 2: e.g., "API v2 completion"]
- [ ] [Dependency 3]
**External:**
- [ ] [Dependency 1: e.g., "Third-party API approval"]
- [ ] [Dependency 2]
### Assumptions
- [Assumption 1: e.g., "Users have updated to app version 2.0+"]
- [Assumption 2: e.g., "Budget approved for $X infrastructure costs"]
- [Assumption 3]
---
## Open Questions
Track unresolved items that need decisions:
- [ ] **[Question 1]**
- **Context:** [Why this matters]
- **Options:** [List options being considered]
- **Owner:** [Who will decide]
- **Deadline:** [When decision needed]
- [ ] **[Question 2]**
- **Context:**
- **Options:**
- **Owner:**
- **Deadline:**
---
## Stakeholder Sign-Off
| Stakeholder | Role | Review Status | Approved | Date |
|------------|------|---------------|----------|------|
| [Name] | Product Lead | ⏳ Pending / ✅ Complete | ☐ | - |
| [Name] | Engineering Lead | ⏳ Pending / ✅ Complete | ☐ | - |
| [Name] | Design Lead | ⏳ Pending / ✅ Complete | ☐ | - |
| [Name] | QA Lead | ⏳ Pending / ✅ Complete | ☐ | - |
| [Name] | Security | ⏳ Pending / ✅ Complete | ☐ | - |
| [Name] | Legal/Compliance | ⏳ Pending / ✅ Complete | ☐ | - |
---
## Appendix
### References
- [User research findings link]
- [Competitive analysis link]
- [Market research link]
- [Technical design doc link]
### Related Documents
- [Link to design files]
- [Link to API documentation]
- [Link to test plan]
### Glossary
- **[Term 1]:** [Definition]
- **[Term 2]:** [Definition]
- **[Term 3]:** [Definition]
### Change Log
| Version | Date | Author | Changes |
|---------|------|--------|---------|
| 1.0 | [YYYY-MM-DD] | [Name] | Initial draft |
| 1.1 | [YYYY-MM-DD] | [Name] | [Changes made] |
---
## Document Usage Notes
**When to use this template:**
- Major new features
- New products
- Significant product enhancements
- Cross-functional initiatives
**When NOT to use this template:**
- Minor bug fixes
- Small UI tweaks
- Maintenance tasks
- Simple A/B tests
**Customization:**
- Remove sections not relevant to your project
- Add sections specific to your domain
- Adjust detail level based on project scope
- Use "Lean PRD" format for smaller projects
**Best Practices:**
- Start with problem, not solution
- Keep it concise but complete
- Use specific, measurable language
- Include visual aids (mockups, diagrams)
- Review with all stakeholders
- Keep it updated as understanding evolves

View File

@@ -0,0 +1,667 @@
# User Story Examples & Best Practices
A comprehensive guide to writing effective user stories with real-world examples across different domains.
---
## Table of Contents
1. [User Story Format](#user-story-format)
2. [Anatomy of Good User Stories](#anatomy-of-good-user-stories)
3. [Examples by Domain](#examples-by-domain)
4. [Acceptance Criteria Patterns](#acceptance-criteria-patterns)
5. [Common Mistakes](#common-mistakes)
6. [Story Splitting](#story-splitting)
---
## User Story Format
### Standard Template
```
As a [user type/persona],
I want to [perform action/use feature],
So that [achieve benefit/value].
```
### Alternative Formats
**Job Story (Jobs-to-be-Done):**
```
When [situation],
I want to [motivation],
So I can [expected outcome].
```
**Feature-Driven:**
```
In order to [receive benefit],
As a [user type],
I want [feature/capability].
```
---
## Anatomy of Good User Stories
### INVEST Criteria
Good user stories are:
- **Independent:** Can be developed and delivered separately
- **Negotiable:** Details can be discussed and adjusted
- **Valuable:** Delivers clear value to users or business
- **Estimable:** Can be sized/estimated by the team
- **Small:** Can be completed in one iteration/sprint
- **Testable:** Has clear acceptance criteria
### Key Components
1. **User Type:** Who is the user? Be specific.
2. **Action:** What do they want to do? One clear action.
3. **Value:** Why do they want it? The benefit or outcome.
4. **Acceptance Criteria:** How do we know it's done? Testable conditions.
---
## Examples by Domain
### E-Commerce
#### Example 1: Product Search
**User Story:**
```
As a online shopper,
I want to filter products by price range,
So that I can find items within my budget.
```
**Acceptance Criteria:**
- [ ] Given I'm on the product listing page, when I set a minimum and maximum price, then only products within that range are displayed
- [ ] Given I've applied a price filter, when I clear the filter, then all products are shown again
- [ ] Given I set an invalid price range (min > max), when I apply the filter, then I see an error message
- [ ] Price filter persists when I navigate between pages of results
- [ ] Filter displays count of products matching the criteria
**Priority:** Must Have (P0)
**Story Points:** 5
---
#### Example 2: Guest Checkout
**User Story:**
```
As a first-time customer,
I want to checkout without creating an account,
So that I can complete my purchase quickly.
```
**Acceptance Criteria:**
- [ ] Given I have items in cart, when I click checkout, then I see options for "Guest Checkout" and "Sign In"
- [ ] Given I choose guest checkout, when I enter shipping and payment info, then I can complete the order
- [ ] Given I complete a guest checkout, when the order is placed, then I receive a confirmation email
- [ ] After guest checkout, I see an option to create an account with my order information
- [ ] Guest checkout flow takes no more than 3 screens
**Priority:** Must Have (P0)
**Story Points:** 8
---
### SaaS / B2B Platform
#### Example 3: Team Collaboration
**User Story:**
```
As a project manager,
I want to assign tasks to team members,
So that everyone knows their responsibilities.
```
**Acceptance Criteria:**
- [ ] Given I'm viewing a task, when I click "Assign", then I see a list of team members
- [ ] Given I select a team member, when I confirm the assignment, then they receive a notification
- [ ] Given a task is assigned, when I view the task list, then I can see who is assigned to each task
- [ ] Given I'm a team member, when I'm assigned a task, then it appears in my "My Tasks" view
- [ ] I can assign multiple people to a single task
- [ ] I can change or remove task assignments
**Priority:** Must Have (P0)
**Story Points:** 5
---
#### Example 4: Usage Analytics
**User Story:**
```
As a SaaS administrator,
I want to view team usage analytics,
So that I can optimize our subscription plan.
```
**Acceptance Criteria:**
- [ ] Given I have admin permissions, when I navigate to analytics, then I see usage metrics for the last 30 days
- [ ] Dashboard shows: active users, feature usage, API calls, and storage used
- [ ] Given I select a date range, when I apply the filter, then metrics update accordingly
- [ ] I can export analytics data as CSV
- [ ] Metrics update in real-time (max 5-minute delay)
**Priority:** Should Have (P1)
**Story Points:** 8
---
### Mobile App
#### Example 5: Push Notifications
**User Story:**
```
As a mobile app user,
I want to customize which notifications I receive,
So that I only see relevant updates.
```
**Acceptance Criteria:**
- [ ] Given I'm in settings, when I navigate to notifications, then I see toggle switches for each notification type
- [ ] Notification types include: messages, mentions, updates, promotions
- [ ] Given I disable a notification type, when that event occurs, then I don't receive a push notification
- [ ] Settings sync across devices using the same account
- [ ] Default settings are: messages ON, mentions ON, updates ON, promotions OFF
**Priority:** Must Have (P0)
**Story Points:** 5
---
#### Example 6: Offline Mode
**User Story:**
```
As a mobile user with unreliable connectivity,
I want to access my recently viewed content offline,
So that I can continue using the app without internet.
```
**Acceptance Criteria:**
- [ ] Given I've viewed content while online, when I go offline, then I can still access the last 50 items viewed
- [ ] Given I'm offline, when I try to access new content, then I see a "No connection" message with cached content
- [ ] Given I'm offline and make changes, when I reconnect, then changes sync automatically
- [ ] Offline indicator appears in the app when connectivity is lost
- [ ] Cached content is automatically cleared after 7 days
**Priority:** Should Have (P1)
**Story Points:** 13
---
### Authentication & Security
#### Example 7: Two-Factor Authentication
**User Story:**
```
As a security-conscious user,
I want to enable two-factor authentication,
So that my account is protected from unauthorized access.
```
**Acceptance Criteria:**
- [ ] Given I'm in security settings, when I enable 2FA, then I can choose between SMS and authenticator app
- [ ] Given I choose authenticator app, when I scan the QR code, then I must enter a verification code to activate
- [ ] Given 2FA is enabled, when I log in, then I'm prompted for my second factor
- [ ] I receive backup codes when activating 2FA
- [ ] I can disable 2FA with my current password + 2FA code
**Priority:** Must Have (P0)
**Story Points:** 13
---
#### Example 8: Password Reset
**User Story:**
```
As a user who forgot my password,
I want to reset it via email,
So that I can regain access to my account.
```
**Acceptance Criteria:**
- [ ] Given I click "Forgot Password", when I enter my email, then I receive a reset link within 5 minutes
- [ ] Reset link expires after 24 hours
- [ ] Given I click the reset link, when I enter a new password, then it must meet password requirements (shown on screen)
- [ ] After successful reset, I'm logged in automatically
- [ ] If email doesn't exist in system, show generic message (don't reveal if account exists)
**Priority:** Must Have (P0)
**Story Points:** 5
---
### Content & Media
#### Example 9: Video Upload
**User Story:**
```
As a content creator,
I want to upload videos with progress tracking,
So that I know when my upload is complete.
```
**Acceptance Criteria:**
- [ ] Given I select a video file, when I click upload, then I see a progress bar showing percentage complete
- [ ] Supported formats: MP4, MOV, AVI (max 2GB)
- [ ] Given upload is in progress, when I navigate away, then upload continues in background
- [ ] Given upload completes, when processing is done, then I receive a notification
- [ ] Given upload fails, when error occurs, then I see specific error message and can retry
**Priority:** Must Have (P0)
**Story Points:** 8
---
### Admin & Configuration
#### Example 10: User Permissions
**User Story:**
```
As an administrator,
I want to assign role-based permissions to users,
So that team members have appropriate access levels.
```
**Acceptance Criteria:**
- [ ] Given I'm viewing a user profile, when I click "Change Role", then I see available roles: Admin, Editor, Viewer
- [ ] Given I assign a role, when I save, then user immediately gains/loses associated permissions
- [ ] Admin: full access; Editor: create/edit content; Viewer: read-only
- [ ] I can create custom roles with specific permission combinations
- [ ] Audit log records all permission changes with timestamp and admin who made the change
**Priority:** Must Have (P0)
**Story Points:** 13
---
## Acceptance Criteria Patterns
### Given-When-Then Format
Most structured format, excellent for complex logic:
```
Given [initial context/state],
When [action/event],
Then [expected outcome].
```
**Example:**
```
Given I'm a logged-in user with items in my cart,
When I apply a 20% discount code,
Then the cart total is reduced by 20% and displays the discount.
```
### Checklist Format
Simpler, good for straightforward requirements:
```
- [ ] Requirement 1
- [ ] Requirement 2
- [ ] Edge case handling
```
### Table Format
Great for multiple scenarios:
| Condition | Action | Expected Result |
|-----------|--------|----------------|
| Valid email | Click "Send" | Confirmation message |
| Invalid email | Click "Send" | Error message |
| Empty field | Click "Send" | "Required field" error |
---
## Common Mistakes to Avoid
### ❌ Too Technical
**Bad:**
```
As a user,
I want the system to use Redis caching with 10-minute TTL,
So that page loads are fast.
```
**Good:**
```
As a user,
I want pages to load in under 2 seconds,
So that I can browse efficiently.
```
**Why:** User stories focus on user value, not implementation. Let engineers choose the solution.
---
### ❌ Too Vague
**Bad:**
```
As a user,
I want the app to be fast,
So that I have a good experience.
```
**Good:**
```
As a user,
I want search results to appear in under 1 second,
So that I can quickly find what I need.
```
**Why:** "Fast" is subjective. Be specific and measurable.
---
### ❌ Missing the "Why"
**Bad:**
```
As a user,
I want to upload profile pictures.
```
**Good:**
```
As a user,
I want to upload a profile picture,
So that other users can recognize me in the community.
```
**Why:** Understanding the "why" helps the team make better decisions.
---
### ❌ Multiple Actions in One Story
**Bad:**
```
As a user,
I want to create an account, set up my profile, and invite team members,
So that I can start using the platform.
```
**Good:** Split into three stories:
```
Story 1: As a user, I want to create an account...
Story 2: As a user, I want to set up my profile...
Story 3: As an account owner, I want to invite team members...
```
**Why:** Stories should be small and focused on one capability.
---
### ❌ No Acceptance Criteria
**Bad:**
```
As a user,
I want to search for products,
So that I can find what I need.
```
**Good:** Add specific criteria:
```
Acceptance Criteria:
- [ ] Search works on product name and description
- [ ] Results display in under 2 seconds
- [ ] Displays "No results found" when no matches
- [ ] Shows top 20 results with pagination
```
**Why:** Acceptance criteria define "done" and enable testing.
---
## Story Splitting Techniques
When a story is too large, use these techniques to split it:
### 1. By Workflow Steps
**Large Story:**
```
As a user, I want to book a flight online.
```
**Split Stories:**
- Search for flights
- Select flight
- Enter passenger details
- Choose seat
- Make payment
- Receive confirmation
---
### 2. By User Persona
**Large Story:**
```
As a user, I want to manage my subscriptions.
```
**Split Stories:**
- As a free user, I want to view available plans
- As a paid user, I want to upgrade my plan
- As an admin, I want to manage team subscriptions
---
### 3. By Business Rules
**Large Story:**
```
As a user, I want to apply discount codes.
```
**Split Stories:**
- Apply percentage discount (e.g., 20% off)
- Apply fixed amount discount (e.g., $10 off)
- Apply free shipping discount
- Handle expired discount codes
- Limit one discount per order
---
### 4. By Data Variations
**Large Story:**
```
As a user, I want to import contacts.
```
**Split Stories:**
- Import from CSV file
- Import from Google Contacts
- Import from Microsoft Outlook
- Import from LinkedIn
---
### 5. By CRUD Operations
**Large Story:**
```
As a user, I want to manage my projects.
```
**Split Stories:**
- Create a new project
- View project details
- Update project settings
- Delete a project
---
### 6. By Happy Path / Edge Cases
**MVP Story (Happy Path):**
```
As a user, I want to upload a profile photo (JPG, < 5MB).
```
**Follow-up Stories:**
- Support additional formats (PNG, GIF)
- Handle files larger than 5MB with error message
- Auto-crop/resize images
- Allow photo deletion
---
## Story Sizing Guidelines
### Story Points Reference
**1-2 Points (Few hours):**
- Simple UI change
- Copy update
- Minor configuration
**3-5 Points (1-2 days):**
- New form with validation
- Simple API endpoint
- Basic feature toggle
**8 Points (3-5 days):**
- Complex form with business logic
- Integration with third-party service
- New database schema with migration
**13+ Points (1+ weeks):**
- Too large! Split the story
- Consider as an Epic
---
## Templates for Common Scenarios
### Registration/Sign-Up
```
As a new visitor,
I want to create an account with my email,
So that I can access personalized features.
Acceptance Criteria:
- [ ] Email and password required (password: min 8 chars, 1 number, 1 special char)
- [ ] Email validation and duplicate check
- [ ] Confirmation email sent upon registration
- [ ] Automatically logged in after email confirmation
- [ ] Option to sign up with Google/Apple (social auth)
```
### Data Export
```
As a user,
I want to export my data as CSV,
So that I can analyze it in Excel.
Acceptance Criteria:
- [ ] Export button in settings
- [ ] Includes all user data (specify fields)
- [ ] File downloads immediately (or email if > 10MB)
- [ ] Filename format: "export_[username]_[date].csv"
- [ ] Respects data privacy regulations (only user's own data)
```
### Error Handling
```
As a user,
I want to see helpful error messages,
So that I know how to fix issues.
Acceptance Criteria:
- [ ] Error messages are specific (not generic "Error occurred")
- [ ] Suggest actionable next steps
- [ ] Display in user's language
- [ ] Don't expose technical details (stack traces)
- [ ] Log errors for debugging (backend)
```
---
## Best Practices Summary
1. **Write from user perspective**, not system perspective
2. **Focus on value/benefit**, not just functionality
3. **Keep stories small** (completable in one sprint)
4. **Make acceptance criteria testable**
5. **Use consistent format** across your team
6. **Include edge cases** in acceptance criteria
7. **Collaborate** with engineers and designers when writing
8. **Refine regularly** based on new learnings
9. **Link to mockups/designs** when relevant
10. **Prioritize ruthlessly** (must/should/nice-to-have)
---
## Additional Resources
### User Story Template
```
Title: [Concise feature name]
As a [specific user type],
I want to [action/capability],
So that [benefit/value].
Acceptance Criteria:
- [ ] [Testable criterion 1]
- [ ] [Testable criterion 2]
- [ ] [Edge case handling]
Priority: [Must Have / Should Have / Nice to Have]
Story Points: [1/2/3/5/8/13]
Dependencies: [List if any]
Design: [Link to mockups]
Notes: [Additional context]
```
### Epic vs Story vs Task
**Epic:** Large body of work (multiple sprints)
- Example: "User Authentication System"
**Story:** Deliverable value (one sprint)
- Example: "As a user, I want to reset my password..."
**Task:** Implementation step (hours/days)
- Example: "Create password reset API endpoint"
---
## Conclusion
Effective user stories:
- Start with the user's perspective
- Clearly articulate value
- Include testable acceptance criteria
- Are sized appropriately
- Enable team collaboration
Use these examples as templates, but adapt them to your product and users' specific needs!