Skip to main content
Reading progress: 0%

Lesson 2.1: Requirements, User Stories, and Acceptance Criteria

Lesson Quick-Jump (10 Sections)

1. What Are We Learning?​

In this lesson, you will learn how to:

  • Turn your MVP idea into clear, written requirements.
  • Tell the difference between functional and non-functional requirements.
  • Write user stories from the user's point of view.
  • Define acceptance criteria so you and your AI agent agree on what "done" looks like.

2. Why Does It Matter?​

info

If you tell an AI coding agent "Add a grocery list feature," it has to guess 20 details: Can users check items off? Can they add custom items? Does the list disappear when the page reloads? Can it be exported?

When you leave requirements ambiguous, AI guesses—and often guesses wrong. Clear requirements and acceptance criteria act like a blueprint: the AI builds what you intended, and you have an exact checklist to test whether the feature works.


3. Simple Explanation for a Complete Beginner​

Think of building a custom kitchen:

  • Functional Requirements describe what the software does (actions and behaviors): "When a user adds a task, it appears in today's list and stays saved after refreshing the page."
  • Non-Functional Requirements describe how well the software behaves (quality, speed, usability, safety): "The page works cleanly on a mobile phone screen," or "Saving a note takes under 1 second."
  • User Stories express a feature in human terms using a simple sentence pattern:

    As a [type of user], I want to [take an action], so that [I get this benefit].

  • Acceptance Criteria are concrete, testable yes/no checks attached to a user story. If every check passes, the feature is done.

All of these usually live together in a PRD (Product Requirements Document)—you can use templates/prd-template.md for your own projects.


4. Practical Example​

Let's turn one MVP feature from a Daily Habit Tracker into a user story with acceptance criteria:

  • Functional Requirement: Users can create a new daily habit with a short title and mark it complete for today.
  • Non-Functional Requirement: The habit list renders clearly on both mobile (375px wide) and desktop screens without horizontal scrolling.

User Story:

As a busy learner, I want to add a daily habit and check it off once per day, so that I can see my daily progress at a glance.

Acceptance Criteria:

  • Submitting an empty habit title shows a clear inline message and does not create a blank habit.
  • Entering a valid title (1–80 characters) adds the habit to today's list immediately.
  • Clicking the checkbox marks the habit as completed visually (e.g., checkmark and muted text) and updates today's completion count.
  • Refreshing the browser keeps both the habit and its completed status for today.

5. Step-by-Step Instructions​

  1. Copy templates/prd-template.md into your project planning folder as docs/prd.md.
  2. Paste your Problem Statement and MVP Scope from Phase 1 into the top sections.
  3. Convert each Essential MVP feature into 1–3 short User Stories.
  4. Write 3–5 testable Acceptance Criteria under each user story. Include both the "happy path" (normal use) and at least one edge case (like empty input or refreshing the page).
  5. Add 3–5 Non-Functional Requirements (mobile layout, clear error messages, data persistence, basic privacy/security).
  6. Use the prompt below to have AI review your PRD for gaps or hidden edge cases.

6. Ready-to-Use AI Prompt​

Context:
I am writing a Product Requirements Document (PRD) for my MVP before doing any design or coding.
Here is my Problem Statement, MVP Scope, and draft User Stories:
[Paste your draft PRD or user stories]

Objective:
Help me refine these into clear Functional Requirements, Non-Functional Requirements, User Stories, and testable Acceptance Criteria.

Boundaries:
- Do NOT add new features outside my MVP Scope.
- Do NOT suggest code, libraries, or database syntax yet.
- Keep language plain and beginner-friendly.

Expected Output:
1. Improved User Stories with 3-5 concrete, yes/no Acceptance Criteria per story (including edge cases like empty inputs or page reloads).
2. 4-5 realistic Non-Functional Requirements suited for a small MVP.
3. A list of 3-5 missing edge cases or ambiguous behaviors I forgot to specify.

7. What to Expect from the AI Agent​

Good ResponseWarning Sign
The AI catches ambiguities you missed, such as "What happens if the user enters a duplicate habit name?" or "Should completed items stay visible or disappear?"The AI silently slips new features into your requirements (like "As a user, I want email reminders...") or writes vague criteria like "The UI should be intuitive and fast." Always replace vague words like "fast" or "intuitive" with verifiable checks.

8. What You Must Personally Verify​

  • Can you test every acceptance criterion yourself? If a criterion says "Works reliably," rewrite it to something observable like "Survives a browser refresh without losing data."
  • Are edge cases covered? Check empty inputs, very long text, invalid entries, and deleting/undoing mistakes.
  • Did scope stay locked? Compare your requirements against your Phase 1 Out-of-Scope list to make sure nothing snuck back in.

9. Common Mistakes​

  1. Writing vague acceptance criteria: "User can manage tasks" cannot be verified. Split it into add, view, complete, and delete checks.
  2. Skipping non-functional requirements: Beginners often forget mobile screens, loading states, and error messages until the end.
  3. Treating the PRD as set in stone forever: A PRD is a living guide. If you discover a flaw later, update the PRD deliberately—do not randomly improvise in code.

10. Small Practical Exercise​

Take your MVP features from Lesson 1.2:

  1. Write 3 User Stories following the As a ... I want ... so that ... pattern.
  2. Write at least 3 yes/no Acceptance Criteria for each story, including one edge case per story.
  3. Run the AI prompt above to spot missing edge cases, then save your clean docs/prd.md.

Completed the exercise? Track your progress

Check off this lesson in PROGRESS-CHECKLIST.md once you have verified every step in Section 8.