Lesson 15

Putting It All Together

End-to-end walkthrough: from project setup to shipping your first sprint

Full Sprint Setup Sprint Planning Daily Work Loop Sprint Review Retrospective Definition of Done

This capstone lesson walks through an entire sprint cycle โ€” from initial project setup to shipping working software. Every concept from Lessons 1 through 14 comes together here.

The Full Sprint Cycle

โš™๏ธ
Setup /agile-setup-init, memory, conventions
๐Ÿ“‹
Sprint Planning @po writes stories, team estimates, pull into sprint
๐Ÿ”„
Daily Work Loop Pick story, /agile-code-branch, /agile-code-tdd, /agile-code-ci, /agile-code-pr, /agile-code-pr-review, /agile-code-merge
๐Ÿ“บ
Sprint Review Demo working software, @po accepts/rejects, stakeholder feedback
๐Ÿ”
Retrospective What worked? What to improve? Save learnings.

Step 1: Project Setup

Before your first sprint, initialize the workflow and memory system.

# 1. Copy workflow files into your project
cp -r ultimate_workflow/ .claude/

# 2. Run initialization
/agile-setup-init

# 3. This creates:
#    .memory/MEMORY_INDEX.md     โ† project summary
#    .memory/semantic/            โ† architecture, conventions, etc.
#    .memory/episodic/            โ† decisions, learnings (empty)
#    .memory/backlog/             โ† product + sprint backlog
What /agile-setup-init Does

The initialization command asks you about your project (name, tech stack, architecture) and generates the initial memory files. This gives the AI full context about your project from the very first conversation.

Step 2: Sprint Planning

Sprint planning is where the team decides what to build in the next 1-2 weeks.

2a. Product Owner Writes Stories

/agile-story-create "User authentication system"

โ†’ US-001: User Registration (email + password)
  US-002: User Login with JWT tokens
  US-003: Password Reset via Email
  US-004: Email Verification
  US-005: Role-Based Access Control (admin/user)

Each story includes:
  - User story format (As a... I want... So that...)
  - Acceptance criteria (Given/When/Then)
  - Story points estimate
  - Priority ranking

2b. Team Estimates

The team reviews stories, asks clarifying questions, and estimates effort using story points.

Story Points Priority Sprint?
US-001: User Registration 3 Must Have Yes
US-002: User Login 5 Must Have Yes
US-003: Password Reset 5 Should Have Yes
US-004: Email Verification 3 Should Have Yes
US-005: RBAC 8 Could Have No (over capacity)
Sprint Capacity

If your velocity is 16 points/sprint, don't pull 20 points of work. Leave buffer for unexpected complexity. In this example, we pull 16 points (3+5+5+3) and leave US-005 for next sprint. If a story is too large (like the 8-point US-005), use /agile-story-split to break it into smaller stories that fit within a single sprint.

2c. Sprint Goal

Sprint 1 Goal: "Users can register, log in, reset passwords, and verify email"
Capacity: 16 story points
Duration: 2 weeks

Step 3: The Daily Work Loop

This is where the actual work happens. Each story follows the same disciplined loop.

The Loop: Pick โ†’ /agile-code-branch โ†’ TDD โ†’ CI โ†’ PR โ†’ Review โ†’ /agile-code-merge

1. Pick a Story

# Check sprint progress and select the highest-priority unstarted story
/agile-sprint-status
@sm assign US-001 to @dev

2. Create a Feature Branch (GitFlow)

/agile-code-branch US-001-user-registration
โ†’ git checkout develop
โ†’ git pull origin develop
โ†’ git checkout -b feature/US-001-user-registration

3. TDD: Red โ†’ Green โ†’ Refactor

# RED: Write a failing test
@dev write test for: "registration validates email format"

# GREEN: Write minimal code to pass
@dev implement to pass the failing test

# REFACTOR: Improve code structure
@dev refactor keeping all tests green

4. Run the CI Pipeline

/agile-code-ci
โ†’ Build:    โœ… Pass
โ†’ Test:     โœ… 24/24 passing, 92% coverage
โ†’ Lint:     โœ… No violations
โ†’ Security: โœ… No findings

5. Create a Pull Request

/agile-code-pr
โ†’ Creates PR: "feat(auth): implement user registration (US-001)"
โ†’ Links to story US-001
โ†’ Includes description, test results, screenshots

6. Code Review

@lead /agile-code-pr-review PR#42

โ†’ Review Results:
  ๐ŸŸก S2: Consider extracting email validation to a value object
  ๐Ÿ”ต S3: Suggest renaming 'data' to 'registrationDto'
  โœ… No S0/S1 findings

โ†’ Status: APPROVED (no merge blockers)

7. Merge to Develop

/agile-code-merge PR#42
โ†’ git checkout develop
โ†’ git merge --no-ff feature/US-001-user-registration
โ†’ git push origin develop
โ†’ git branch -d feature/US-001-user-registration
Repeat

Move to the next story (US-002) and repeat the loop. Each story goes through the same cycle: /agile-code-branch, TDD, CI, PR, review, /agile-code-merge.

Step 4: Sprint Review

At the end of the sprint, the team demos working software to stakeholders.

Sprint Review Agenda

Sprint 1 Review Summary
========================
Sprint Goal: โœ… ACHIEVED
Stories Completed: 4/4 (16 points)
Velocity: 16 points

  US-001: User Registration    โœ… Accepted
  US-002: User Login           โœ… Accepted
  US-003: Password Reset       โœ… Accepted
  US-004: Email Verification   โœ… Accepted

Bugs Found: 1 (S2, fixed in-sprint)
Test Coverage: 91%

Step 5: Sprint Retrospective

The retrospective is about continuous improvement. What worked? What didn't? What will we change?

What Worked Well

  • ๐Ÿ‘ TDD caught 3 bugs before they reached code review
  • ๐Ÿ‘ Small PRs (under 200 lines each) made reviews fast and effective
  • ๐Ÿ‘ CI pipeline caught a dependency vulnerability early
  • ๐Ÿ‘ Memory system kept AI context consistent across sessions

What to Improve

  • โš ๏ธ US-003 (Password Reset) had unclear acceptance criteria โ€” took extra time to clarify
  • โš ๏ธ Email service integration was more complex than estimated
  • โš ๏ธ One PR sat in review for 2 days โ€” need faster review turnaround

Action Items for Next Sprint

  • ๐Ÿ“‹ @po will add clearer AC to all stories before sprint planning
  • โฑ๏ธ Team commits to reviewing PRs within 24 hours
  • ๐Ÿ“ Add integration complexity as an estimation factor
# Save learnings to memory
/agile-memory-learn

โ†’ Saved to .memory/episodic/learnings.md:
  - [Sprint 1] TDD significantly reduces bugs reaching review
  - [Sprint 1] Integration stories need higher estimates (+2 points buffer)
  - [Sprint 1] Clear AC upfront saves more time than clarifying mid-sprint

โ†’ Updated .memory/episodic/context.md:
  Sprint 1: 16/16 points, 4/4 stories, velocity=16

The Definition of Done Checklist

Every story must pass this checklist before it is considered "Done." This is your quality contract.

## Definition of Done โœ…
- [ ] All acceptance criteria met
- [ ] Code written following SOLID principles
- [ ] Clean Code standards applied (naming, functions, DRY)
- [ ] Tests written FIRST (TDD: Red โ†’ Green โ†’ Refactor)
- [ ] Unit test coverage >= 80%
- [ ] Integration tests for API endpoints
- [ ] CI pipeline green (build, test, lint, security)
- [ ] Code reviewed โ€” zero S0/S1 findings
- [ ] PR approved by at least 1 reviewer
- [ ] Documentation updated (if API changed)
- [ ] No hardcoded secrets or credentials
- [ ] Feature branch merged to develop
- [ ] Memory updated (if architecture/conventions changed)

Common Pitfalls and How to Avoid Them

Pitfall Symptom Fix
Skipping TDD "I'll add tests later" โ€” tests never get written Write the test FIRST. Always. No exceptions.
Giant PRs PRs with 1000+ lines get rubber-stamped, not reviewed Keep PRs under 400 lines. Split stories into tasks if needed.
Unclear stories Developer builds the wrong thing, wastes a sprint Require Given/When/Then acceptance criteria before starting.
Ignoring CI failures "It's just a flaky test" โ€” real bugs slip through Fix or remove flaky tests immediately. Never ignore red.
No retrospective Same mistakes repeat sprint after sprint Always run retro. Save learnings to memory. Review next sprint.
Over-committing Sprint fails because too much work was pulled in Use velocity. Leave buffer. It's okay to finish early.
Trusting AI blindly Bugs in AI-generated code ship to production TDD catches AI mistakes. Always review AI output.

Congratulations!

You've Completed the Course!

You now have the knowledge to run a complete Agile workflow with AI augmentation. You understand:

What to Do Next

Final Knowledge Check

What is the correct order of a sprint cycle?