Fatskills
Practice. Master. Repeat.
Study Guide: Agile-and-Scrum: Hyper-Practical Guide - Splitting Stories with S.P.I.D.R. and Vertical Slices
Source: https://www.fatskills.com/php-programming/chapter/agile-and-scrum-hyper-practical-guide-splitting-stories-with-spidr-and-vertical-slices

Agile-and-Scrum: Hyper-Practical Guide - Splitting Stories with S.P.I.D.R. and Vertical Slices

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~10 min read

Hyper-Practical Guide: Splitting Stories with S.P.I.D.R. and Vertical Slices

(Agile & Scrum, Scrum Guide 2020)


1. What This Is & Why It Matters

You’re a Scrum Team Developer (or Product Owner) staring at a backlog item that reads: "As a user, I want to upload a 10GB video file so I can share it with my team."

It’s too big—it won’t fit in a Sprint. If you force it in, you’ll either: - Miss the Sprint Goal (because it’s too complex). - Deliver a half-baked "solution" (e.g., only the UI, no backend processing). - Burn out your team with late-night heroics.

S.P.I.D.R. (Spikes, Paths, Interfaces, Data, Rules) and Vertical Slicing are your scalpel and blueprint for cutting stories into small, valuable, shippable increments—without breaking the system.

Why this matters in production: - Faster feedback: Smaller stories = earlier validation (e.g., "Does the upload button even work?"). - Reduced risk: You don’t discover a 10GB file crashes your API on Day 10 of the Sprint. - Better estimates: A 3-point story is easier to size than a 20-point epic. - Continuous delivery: Each slice can be deployed independently (e.g., "Upload works, but processing is manual for now").

Real-world scenario: You’re building a video transcoding pipeline for a media company. The "upload" story is just the tip of the iceberg—you also need: - File validation (size, format). - Chunked uploads (for large files). - Progress tracking. - Transcoding (FFmpeg). - Storage (S3). - Notifications.

If you try to build all of this at once, you’ll fail. Instead, you’ll use S.P.I.D.R. to split it into vertical slices—each delivering end-to-end value (even if it’s minimal).


2. Core Concepts & Components

? Vertical Slice

  • Definition: A thin, end-to-end piece of functionality that delivers independent value to the user.
  • Production insight: If you only build the UI (horizontal slice), the user can’t actually use it. A vertical slice ensures something works (e.g., "Upload a 1MB file-it appears in S3").
  • Example: Instead of "Build the entire upload form," deliver:
  • Upload a 1MB file-stored in S3.
  • Show upload progress.
  • Validate file size (reject >10GB).
  • Chunked uploads for large files.

? S.P.I.D.R. (Story-Splitting Framework)

  • Definition: A checklist for splitting stories by Spikes, Paths, Interfaces, Data, Rules.
  • Production insight: Each S.P.I.D.R. category reveals hidden complexity (e.g., "We assumed all files are MP4, but users upload MOV").
S.P.I.D.R. Category Definition Production Example
Spikes Research tasks (e.g., "Can we use FFmpeg in Lambda?"). "Test if FFmpeg runs in a 10GB Lambda container."
Paths Different user flows (happy path, error path, edge cases). "Upload succeeds" vs. "Upload fails due to network error."
Interfaces UI, API, CLI, or integration points. "Web upload form" vs. "API for mobile app."
Data Different data types, sizes, or sources. "1MB file" vs. "10GB file" vs. "Corrupted file."
Rules Business logic, validations, or policies. "Only MP4 files allowed" vs. "All video formats allowed."

? INVEST Criteria (For Good Stories)

  • Independent: Can be developed without blocking others.
  • Negotiable: Not a rigid spec—details can evolve.
  • Valuable: Delivers user-facing value.
  • Estimable: Small enough to size (1-8 story points).
  • Small: Fits in a Sprint.
  • Testable: Clear acceptance criteria.

Production insight: If a story fails any INVEST check, split it.

? Horizontal vs. Vertical Slicing

Horizontal Slice Vertical Slice
"Build the UI for uploads." "Upload a 1MB file-stored in S3."
"Write the backend API." "Upload fails gracefully if file >10GB."
Problem: No user value until all layers are done. Benefit: Each slice is shippable.

Production insight: Horizontal slicing leads to "integration hell" (e.g., "The UI is done, but the API isn’t ready").


3. Step-by-Step: Splitting a Story with S.P.I.D.R. & Vertical Slices

Prerequisites

  • A user story that’s too big (e.g., "Upload a video").
  • A whiteboard (or digital equivalent like Miro).
  • Stakeholders (PO, Devs, QA) for quick feedback.

Example Story to Split

"As a content creator, I want to upload a video so I can share it with my team."

Step 1: Identify the "Big Rock" (What’s Too Big?)

  • Problem: This story is vague and monolithic.
  • Break it down: Ask:
  • What paths can the user take? (Success, failure, retry)
  • What data is involved? (Small files, large files, corrupted files)
  • What rules apply? (File size limits, formats, permissions)
  • What interfaces are needed? (Web, mobile, API)
  • What spikes do we need? (Can we use S3 pre-signed URLs?)

Step 2: Apply S.P.I.D.R. to Find Splits

Category Potential Splits Vertical Slice Example
Spikes Research FFmpeg in Lambda. "Test if FFmpeg runs in a 10GB Lambda container."
Paths Happy path (success), error path (failure). "Upload a 1MB file-success." / "Upload fails if file >10GB."
Interfaces Web UI, mobile app, API. "Upload via web form." / "Upload via API."
Data Small files, large files, corrupted files. "Upload a 1MB file." / "Upload a 10GB file (chunked)."
Rules File size limits, format validation. "Reject files >10GB." / "Only allow MP4."

Step 3: Draft Vertical Slices (INVEST Check)

For each split, ask: ? Independent? (Can it be built alone?) ? Negotiable? (Can we adjust details later?) ? Valuable? (Does it deliver user value?) ? Estimable? (Can we size it?) ? Small? (Fits in a Sprint?) ? Testable? (Clear acceptance criteria?)

Example Slices:
1. "Upload a 1MB file via web form-stored in S3." - Value: Users can upload small files. - Acceptance Criteria: - File appears in S3 bucket. - User sees "Upload successful" message.
2. "Show upload progress for files >100MB." - Value: Users know if upload is stuck. - Acceptance Criteria: - Progress bar updates in real-time. - User can cancel upload.
3. "Reject files >10GB with error message." - Value: Prevents system overload. - Acceptance Criteria: - Error message: "File too large (max 10GB)." - No file is stored.
4. "Transcode uploaded file to H.264 (FFmpeg)." - Value: Standardized format for playback. - Acceptance Criteria: - Output file is H.264. - Original file is preserved.

Step 4: Validate with Stakeholders

  • PO: "Is this slice valuable enough to ship?"
  • Devs: "Can we build this in a Sprint?"
  • QA: "Can we test this independently?"

Example Conversation:

PO: "Do we need progress tracking in the first slice?" Dev: "No, we can add it later. Let’s start with basic upload." QA: "We can test the 1MB upload with a simple S3 check."

Step 5: Refine & Estimate

  • Break down tasks for each slice (e.g., "Set up S3 bucket," "Write upload API").
  • Estimate in story points (e.g., 3 points for "Upload 1MB file").
  • Prioritize (e.g., "Basic upload" before "Progress tracking").

Step 6: Write Acceptance Criteria (Gherkin Style)

Feature: Video Upload
  Scenario: Upload a 1MB file successfully
    Given I am logged in
    When I select a 1MB MP4 file
    And I click "Upload"
    Then the file appears in the S3 bucket "media-uploads"
    And I see "Upload successful"

  Scenario: Reject file >10GB
    Given I am logged in
    When I select a 12GB file
    And I click "Upload"
    Then I see "File too large (max 10GB)"
    And no file is stored

Step 7: Implement & Deploy

  • For "Upload 1MB file":
  • Backend: AWS Lambda + API Gateway + S3.
  • Frontend: Simple form with file input.
  • Test: Manually upload a 1MB file-check S3.

Example AWS CLI Command (for testing):

# Upload a test file to S3 (verify it works)
aws s3 cp test.mp4 s3://media-uploads/ --acl private

# Check if file exists
aws s3 ls s3://media-uploads/

Step 8: Demo & Retro

  • Demo: Show the working upload in Sprint Review.
  • Retro: "What made this slice hard? What can we improve for the next one?"

4.-Production-Ready Best Practices

? Security

  • Least privilege: S3 bucket policy should only allow uploads from your API/Lambda. json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:role/upload-lambda" }, "Action": ["s3:PutObject"], "Resource": "arn:aws:s3:::media-uploads/*" } ] }
  • Pre-signed URLs: Instead of direct uploads, generate time-limited S3 URLs. python import boto3 s3 = boto3.client('s3') url = s3.generate_presigned_url( 'put_object', Params={'Bucket': 'media-uploads', 'Key': 'test.mp4'}, ExpiresIn=3600 # 1 hour )
  • Virus scanning: Use AWS Lambda + ClamAV to scan uploads.

? Cost Optimization

  • S3 Storage Classes:
  • Standard (frequent access)-Intelligent-Tiering (auto-optimize).
  • Glacier (archival) for old videos.
  • Lambda Memory: Start with 1024MB for FFmpeg, adjust based on logs.
  • Chunked Uploads: For large files, use S3 Multipart Upload (reduces Lambda timeout risks).

Reliability & Maintainability

  • Idempotency: Ensure retries don’t create duplicate files. python # Use S3 object key with UUID to avoid overwrites key = f"uploads/{user_id}/{uuid.uuid4()}.mp4"
  • Naming Conventions:
  • S3 bucket: media-uploads-{env} (e.g., media-uploads-prod).
  • Lambda: video-upload-processor-{env}.
  • Tagging: Tag resources for cost tracking. bash aws s3api put-bucket-tagging \ --bucket media-uploads \ --tagging 'TagSet=[{Key=Project,Value=VideoPlatform},{Key=Environment,Value=Prod}]'

Observability

  • CloudWatch Alarms:
  • Failed uploads (e.g., Errors > 5 in 5 minutes).
  • Large file uploads (e.g., FileSize > 1GB).
  • Logging:
  • Log file size, duration, errors in CloudWatch. python import logging logger = logging.getLogger() logger.info(f"Upload started: {file_name}, size={file_size}MB")
  • X-Ray Tracing: Debug slow uploads. python from aws_xray_sdk.core import xray_recorder @xray_recorder.capture('upload_file') def upload_file(file): # ...

5. Common Mistakes & Traps

Mistake Symptom Fix/Prevention
Splitting horizontally (e.g., "Build UI first, then backend"). Team delivers "working" UI but no actual upload functionality. Always ask: "Can a user get value from this slice alone?" If no, split vertically.
Ignoring error paths (e.g., only testing happy path). Uploads fail silently in production. Split error paths as separate stories (e.g., "Handle network timeouts").
Making slices too small (e.g., "Upload button styling"). Too many stories, overhead in planning. Aim for 1-3 day slices (not 1-hour tasks).
Not validating with stakeholders (e.g., PO doesn’t care about progress bars). Team builds features users don’t need. Demo each slice in Sprint Review.
Assuming all data is the same (e.g., "All files are <1GB"). System crashes on large files. Split by data size (e.g., "1MB files" vs. "10GB files").

6.-Exam/Certification Focus (PSM, CSM, PSPO)

Typical Question Patterns

  1. "Which of these is a vertical slice?"
  2. ? "Build the upload UI."
  3. ? "Upload a 1MB file-stored in S3."
  4. Why? The first is horizontal (no end-to-end value).

  5. "What’s the best way to split a story about user authentication?"

  6. ? Paths: "Login succeeds" vs. "Login fails (wrong password)."
  7. ? Interfaces: "Login via web" vs. "Login via mobile."
  8. "Build the login button first."

  9. "A story is too big. What’s the first step?"

  10. ? Apply S.P.I.D.R. to identify splits.
  11. ? "Break it into tasks" (tasks-stories).

Key Trap Distinctions

Concept Trap Correct Answer
Vertical Slice "Build the database schema first." "Deliver a working feature (e.g., upload a file)."
Spikes "Spikes are for coding." "Spikes are for research (e.g., 'Can we use FFmpeg in Lambda?')."
INVEST "Stories must be fully detailed upfront." "Stories should be negotiable (details evolve)."

Scenario-Based Question

"You’re building a payment system. The story is: 'As a user, I want to pay with a credit card.' How do you split it?"

Answer:
1. Paths: - "Successful payment" (happy path). - "Payment declined" (error path).
2. Data: - "Pay with Visa" (test with one card type first). - "Pay with Amex" (different validation rules).
3. Rules: - "Pay with saved card" (no CVV required). - "Pay with new card" (CVV required).
4. Spikes: - "Test Stripe API for tokenization."

Why? Each slice delivers independent value (e.g., "Users can pay with Visa" before Amex).


7.-Hands-On Challenge (With Solution)

Challenge

"Split this story using S.P.I.D.R. and vertical slices: 'As a user, I want to search for products so I can find what I need.' Assume the system has: - A product catalog (10,000 items). - Filters (price, category, rating). - Sorting (price low?high, popularity)."*

Solution

Category Vertical Slice Acceptance Criteria
Paths "Search returns results (happy path)." User types "laptop"-sees 10 results.
Paths "Search returns no results (empty state)." User types "xyz123"-sees "No products found."
Data "Search with 1 filter (category)." User filters by "Electronics"-sees only electronics.
Data "Search with 2 filters (category + price)." User filters by "Electronics" and "$0-$500"-sees matching products.
Rules "Search sorts by price (low?high)." Results are ordered by price.
Rules "Search sorts by popularity." Results are ordered by sales volume.
Interfaces "Search via web." User searches on desktop.
Interfaces "Search via mobile." User searches on phone (responsive UI).
Spikes "Test Elasticsearch performance with 10K products." Query time < 200ms.

Why it works: - Each slice is independent (e.g., "Search with 1 filter" doesn’t depend on "Search with 2 filters"). - Each delivers user value (e.g., "Users can find electronics under $500"). - INVEST criteria are met (small, estimable, testable).


8.-Rapid-Reference Crib Sheet

Concept Key Points
Vertical Slice Thin, end-to-end functionality (e.g., "Upload 1MB file-S3").
S.P.I.D.R. Spikes, P