TUTORIAL 02

Your First Sprint

Plan, execute, review, and retrospect a complete sprint from start to finish

โฑ ~20 min ยท Hands-on

What You'll Learn

You'll run through an entire sprint lifecycle โ€” creating stories, estimating them, planning a sprint, running daily standups, demoing work, and capturing improvements.

/agile-story-create /agile-story-estimate /agile-sprint-planning /agile-sprint-daily /agile-sprint-status /agile-sprint-review /agile-sprint-retro /agile-memory-learn
Prerequisites

The Scenario

Your TaskFlow project is set up. The product owner wants users to manage basic tasks by the end of Sprint 1. You need to plan a 2-week sprint with three stories: add a task, mark a task complete, and delete a task. Let's run the full sprint ceremony cycle.

Step 1: Create User Stories with /agile-story-create

Start by defining what needs to be built. Run the command once per story, providing a feature description:

/agile-story-create Add a new task so users can track work they need to do

The AI guides you through structured story creation. Here's what the three stories look like:

๐Ÿ“ Story created: US-001

Title: Add a new task
As a user, I want to add a new task so that I can track work I need to do.

Acceptance Criteria:
  Given I provide a valid task title and optional description
  When  I submit the new task
  Then  the task is created with status "pending"
  And   the task appears in my task list
  And   a unique ID is assigned

  Given I submit without a title
  When  the system validates the input
  Then  a 400 error is returned with message "Title is required"

---

๐Ÿ“ Story created: US-002

Title: Mark a task as complete
As a user, I want to mark a task as complete so that I can track my progress.

Acceptance Criteria:
  Given a task exists with status "pending"
  When  I mark it as complete
  Then  the status changes to "completed"
  And   a completedAt timestamp is recorded

  Given a task is already completed
  When  I try to mark it complete again
  Then  a 409 error is returned with message "Task already completed"

---

๐Ÿ“ Story created: US-003

Title: Delete a task
As a user, I want to delete a task so that I can remove items I no longer need.

Acceptance Criteria:
  Given a task exists
  When  I delete it
  Then  the task is removed from the database
  And   it no longer appears in my task list

  Given I try to delete a non-existent task
  When  the system looks up the task
  Then  a 404 error is returned with message "Task not found"
Given/When/Then format

Every acceptance criterion uses the Given/When/Then format. This isn't just documentation โ€” these directly become test scenarios when you use /agile-code-tdd later. Clear AC = clear tests = fewer bugs.

Step 2: Estimate Stories with /agile-story-estimate

Estimate the effort for each story using story points:

/agile-story-estimate
๐Ÿ“Š Story Estimates:

US-001: Add a new task
  Complexity: Low โ€” standard CRUD, input validation
  Uncertainty: Low โ€” clear AC, known patterns
  Estimate: 2 points

US-002: Mark a task as complete
  Complexity: Medium โ€” state transition, timestamp logic, conflict handling
  Uncertainty: Low โ€” clear AC
  Estimate: 3 points

US-003: Delete a task
  Complexity: Low โ€” standard delete, existence check
  Uncertainty: Low โ€” clear AC
  Estimate: 2 points

Total backlog: 7 points across 3 stories.
Why US-002 is 3 points

Even though "mark complete" sounds simple, it involves a state transition (pending to completed), timestamp management, and a conflict check (already completed). The AI recognizes this added complexity and estimates accordingly.

Step 3: Plan the Sprint with /agile-sprint-planning

Now pull stories into a sprint with a clear goal and capacity:

/agile-sprint-planning
๐Ÿƒ Sprint Planning: Sprint 1
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Sprint Goal: "Users can manage basic tasks โ€” create, complete, and delete"
Duration:    2 weeks (10 working days)
Capacity:    10 story points

Stories pulled:
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ ID       โ”‚ Title                    โ”‚ Points โ”‚ Priority โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚ US-001   โ”‚ Add a new task           โ”‚ 2      โ”‚ P1       โ”‚
  โ”‚ US-002   โ”‚ Mark task as complete    โ”‚ 3      โ”‚ P2       โ”‚
  โ”‚ US-003   โ”‚ Delete a task            โ”‚ 2      โ”‚ P3       โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Total committed: 7 / 10 points (30% buffer for unknowns)

Implementation order: US-001 โ†’ US-002 โ†’ US-003
Rationale: Build the data model first (create), then add behavior (complete), then cleanup (delete).

โœ… Sprint 1 planned. Ready to implement.
The 30% buffer

Only 7 of 10 points were committed. Good sprint planning leaves room for unexpected complexity, bug fixes, and code review cycles. Never commit 100% of capacity in your first sprint.

Step 4: Execute the Sprint

Now you implement each story. The details of building a feature are covered in Tutorial 03, but the high-level flow is:

๐ŸŒฟ
Branch /agile-code-branch
๐Ÿ“‹
Plan Story /agile-story-plan
๐Ÿงช
TDD Cycle /agile-code-tdd
โœ…
CI + Commit /agile-code-ci, /agile-code-commit
๐Ÿ”€
PR + Review /agile-code-pr, /agile-code-pr-review
๐Ÿ”€
Merge /agile-code-merge
๐ŸŽฏ
Accept /agile-story-dod, /agile-story-accept

Repeat this flow for US-001, US-002, and US-003 in order.

Step 5: Run Daily Standup with /agile-sprint-daily

Each day (or work session), check in on progress:

/agile-sprint-daily
๐Ÿ“ Daily Standup โ€” Sprint 1, Day 4
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Done (since last standup):
  โœ… US-001: Add task โ€” DONE (merged to main)
  โœ… US-002: Mark complete โ€” PR open, review in progress

Doing (today):
  ๐Ÿ”„ US-002: Address review feedback (rename parameter, add JSDoc)
  ๐Ÿ“‹ US-003: Start planning phase

Blockers:
  ๐Ÿšซ None

Sprint progress: 5/7 points done (71%)
Sprint health: ๐ŸŸข On track
Standup is a status sync, not a status meeting

The standup command generates a snapshot of where things stand. Use it to catch blockers early and adjust priorities. If you see ๐Ÿ”ด "at risk," consider dropping a lower-priority story.

Step 5b: Check Sprint Progress with /agile-sprint-status

At any point during the sprint, you can get a detailed progress overview โ€” burndown, velocity trend, and risk indicators:

/agile-sprint-status
๐Ÿ“Š Sprint Status โ€” Sprint 1
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Progress:  5/7 points done (71%)
Days left: 6 of 10
Burndown:  ๐ŸŸข On track (ideal: 4.2 pts done, actual: 5 pts)

Story breakdown:
  โœ… US-001: Add a new task        (2 pts) โ€” DONE
  ๐Ÿ”„ US-002: Mark task as complete (3 pts) โ€” IN REVIEW
  ๐Ÿ“‹ US-003: Delete a task         (2 pts) โ€” TODO

Risk: None detected
Forecast: Sprint goal likely to be met by Day 8
Daily vs. Status

/agile-sprint-daily captures what you did and plan to do (standup format). /agile-sprint-status gives a data-driven progress view โ€” burndown, forecasts, and risk indicators. Use daily for communication, status for decision-making.

Step 6: Sprint Review with /agile-sprint-review

At the end of the sprint, demo what was built:

/agile-sprint-review
๐ŸŽฌ Sprint Review โ€” Sprint 1
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Sprint Goal: "Users can manage basic tasks"
Result: โœ… GOAL MET

Stories Delivered:
  โœ… US-001: Add a new task        (2 pts) โ€” ACCEPTED by @po
  โœ… US-002: Mark task as complete  (3 pts) โ€” ACCEPTED by @po
  โœ… US-003: Delete a task          (2 pts) โ€” ACCEPTED by @po

Velocity: 7 points
Demo:
  1. POST /api/v1/tasks โ€” created task "Buy groceries" โ†’ 201, ID assigned
  2. PATCH /api/v1/tasks/1/complete โ€” status changed to "completed" โ†’ 200
  3. DELETE /api/v1/tasks/1 โ€” task removed โ†’ 204
  4. GET /api/v1/tasks โ€” empty list confirmed โ†’ 200

Stakeholder feedback:
  @po: "Clean implementation. Next sprint: add due dates and filtering."

โœ… All 3 stories accepted. Sprint 1 complete.

Step 7: Sprint Retrospective with /agile-sprint-retro

Capture what went well, what to improve, and specific action items:

/agile-sprint-retro
๐Ÿ”„ Sprint Retrospective โ€” Sprint 1
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

What went well:
  ๐Ÿ‘ TDD caught 3 edge cases before code review (null title, empty string, whitespace-only)
  ๐Ÿ‘ Code review feedback was specific and actionable
  ๐Ÿ‘ 30% buffer was right โ€” actual velocity matched estimate

What to improve:
  โš ๏ธ Acceptance criteria for US-002 didn't specify what happens to completedAt on re-complete
  โš ๏ธ Integration tests took longer to set up than expected (DB seeding)

Action items:
  ๐Ÿ“Œ ACTION: Review AC template โ€” add explicit error/edge case scenarios before estimation
  ๐Ÿ“Œ ACTION: Create shared test fixtures for database seeding
  ๐Ÿ“Œ ACTION: Add "negative scenarios" as a checklist item in story creation

Owner: Team | Due: Before Sprint 2 planning
Retro drives real improvement

The retro isn't just reflection โ€” it produces concrete action items that feed into the next sprint. The action "review AC template" will prevent the ambiguity that caused confusion in US-002.

Step 8: Save Learnings with /agile-memory-learn

Persist what you learned so it carries forward to every future sprint:

/agile-memory-learn
๐Ÿง  Learning captured:

Sprint 1 Learnings:
  โ€ข Detailed acceptance criteria (including negative scenarios) saves debugging time during implementation
  โ€ข 30% sprint buffer is appropriate for a new project with unknown velocity
  โ€ข TDD with Given/When/Then AC produces comprehensive test coverage naturally
  โ€ข Database test fixtures should be set up once as shared infrastructure, not per-story

Saved to: .memory/episodic/decisions.md (appended)
Tagged: sprint-1, process, estimation
Why /agile-memory-learn matters

Without this step, every sprint starts from zero. With it, the AI remembers that your team estimates accurately at 70% capacity, that you prefer detailed AC, and that test fixtures exist. Each sprint gets smarter.

Knowledge Check

After the sprint review, what ceremony captures improvements for the next sprint?

What You Learned