TUTORIAL 11

Autonomous Sprint

You have clear requirements for 3 well-defined features. Let the AI run a full sprint with minimal human intervention.

โฑ ~15 min ยท Hands-on

/agile-story-create /agile-story-estimate /agile-sprint-planning /agile-story-plan /agile-code-branch /agile-code-tdd /agile-code-ci /agile-code-pr /agile-code-pr-review /agile-code-merge /agile-story-dod /agile-sprint-status /agile-sprint-review /agile-sprint-retro
Scenario

You have 3 well-defined features for a user profile page: avatar upload, bio editing, and account deletion. The requirements are clear, the patterns are established, and the codebase is familiar. This is a perfect candidate for autonomous mode โ€” the AI handles the full sprint while you review at key checkpoints.

Step 1: Provide Clear Requirements

Autonomous mode requires unambiguous requirements. Vague inputs produce vague outputs.

Input to AI

Build the user profile management feature:

1. Profile Page โ€” display user info (name, email, bio, avatar)
2. Avatar Upload โ€” upload and crop profile picture (max 2MB, jpg/png)
3. Bio Editing โ€” inline edit bio text (max 500 chars, markdown supported)
4. Account Deletion โ€” soft-delete with 30-day recovery window

Tech stack: React frontend, Node/Express API, PostgreSQL
Patterns: follow existing UserService, use Zod validation
Auth: JWT, user can only edit their own profile

Step 2: AI Creates Stories

The AI writes user stories following INVEST criteria with clear acceptance criteria.

/agile-story-create

Stories Created

๐Ÿ“‹ PROF-001: User Profile Page
   As a user, I want to view my profile page
   so that I can see my account information.
   AC:
     โœ… Displays name, email, bio, and avatar
     โœ… Shows "Edit" buttons for editable fields
     โœ… Responsive layout (mobile + desktop)
     โœ… Returns 404 for non-existent users

๐Ÿ“‹ PROF-002: Avatar Upload
   As a user, I want to upload a profile picture
   so that other users can recognize me.
   AC:
     โœ… Accepts JPG and PNG only
     โœ… Rejects files over 2MB with clear error
     โœ… Provides crop interface before saving
     โœ… Stores in S3, serves via CDN
     โœ… Falls back to initials avatar if none set

๐Ÿ“‹ PROF-003: Account Deletion
   As a user, I want to delete my account
   so that I can remove my data from the platform.
   AC:
     โœ… Requires password confirmation
     โœ… Soft-deletes (sets deleted_at timestamp)
     โœ… 30-day recovery window before hard delete
     โœ… Sends confirmation email
     โœ… Immediately logs user out

Step 3: AI Estimates Stories

/agile-story-estimate
Story Estimates:
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
  PROF-001  Profile Page       3 pts  (display only, known patterns)
  PROF-002  Avatar Upload      5 pts  (file handling, S3, crop UI)
  PROF-003  Account Deletion   3 pts  (soft-delete, email, auth check)
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
  Total: 11 story points

Step 4: AI Plans the Sprint

/agile-sprint-planning
Sprint Planning โ€” Sprint 4
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
  Goal:      "Users can manage their profile"
  Capacity:  11 story points
  Duration:  1 week
  Stories:   PROF-001 (3pts), PROF-002 (5pts), PROF-003 (3pts)

  Execution Order:
    1. PROF-001 (Profile Page) โ€” foundation for other stories
    2. PROF-002 (Avatar Upload) โ€” highest complexity
    3. PROF-003 (Account Deletion) โ€” independent, last

  โœ… Sprint committed

Step 5: AI Executes Each Story

The AI chains all commands for each story: plan, branch, TDD, CI, PR, DoD check. Here's how it handles PROF-001:

PROF-001: Profile Page โ€” Autonomous Execution

/agile-story-plan
Plan confidence: 9/10
Implementation plan:
  1. Create ProfilePage component + route
  2. Add GET /api/users/:id/profile endpoint
  3. Add ProfileService with getProfile method
  4. Write unit + integration tests
/agile-code-branch
โ†’ Created branch: feature/PROF-001-profile-page from develop
/agile-code-tdd
RED:   6 tests written (API + component + service)
GREEN: 6 tests passing โ€” all AC covered
REFACTOR: Extracted ProfileCard sub-component
/agile-code-ci
Build โœ… | Tests 162/162 โœ… | Lint โœ… | Coverage 85% โœ…
/agile-code-pr
PR #67: feat(profile): add user profile page
  Files changed: 8  |  +240 -12
/agile-code-pr-review
Review: โœ… Approved
  - Clean component structure
  - Proper error handling for missing users
  - Good test coverage
/agile-story-dod
Definition of Done โ€” PROF-001:
  โœ… All acceptance criteria met
  โœ… Tests passing (unit + integration)
  โœ… Code reviewed and approved
  โœ… CI pipeline green
  โœ… No security warnings
  โ†’ DONE

The AI repeats this cycle for PROF-002 and PROF-003:

PROF-002: Avatar Upload

/agile-story-plan โ†’ confidence 9/10
/agile-code-branch โ†’ Created branch: feature/PROF-002-avatar-upload from develop
/agile-code-tdd โ†’ RED: 8 tests | GREEN: 8 passing | REFACTOR: done
/agile-code-ci โ†’ all green
/agile-code-pr โ†’ PR #68: feat(profile): avatar upload with crop
/agile-code-pr-review โ†’ โœ… Approved (1 minor suggestion applied)
/agile-story-dod โ†’ โœ… DONE

PROF-003: Account Deletion

/agile-story-plan โ†’ confidence 9/10
/agile-code-branch โ†’ Created branch: feature/PROF-003-account-deletion from develop
/agile-code-tdd โ†’ RED: 7 tests | GREEN: 7 passing | REFACTOR: done
/agile-code-ci โ†’ all green
/agile-code-pr โ†’ PR #69: feat(profile): soft-delete account
/agile-code-pr-review โ†’ โœ… Approved
/agile-story-dod โ†’ โœ… DONE

Step 6: Human Checkpoint

Autonomous does not mean unsupervised. The AI pauses here for you to review.

YOUR Turn โ€” Review Required

The AI presents its work. You review the code, PRs, and test coverage. Autonomous mode handles execution, but humans own the final approval.

Sprint Summary for Review

Sprint 4 โ€” Autonomous Execution Complete
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

Stories Completed: 3/3
Points Delivered:  11/11

PRs Ready for Merge:
  PR #67: feat(profile): user profile page      โœ… reviewed
  PR #68: feat(profile): avatar upload + crop    โœ… reviewed
  PR #69: feat(profile): soft-delete account     โœ… reviewed

Test Summary:
  New tests written:   21
  Total tests passing: 177/177
  Coverage:            86% (was 84%)

Awaiting: YOUR approval to merge all PRs to develop

Step 7: Sprint Review

After human approval, the AI runs the sprint review.

/agile-sprint-review
Sprint Review โ€” Sprint 4
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
  Goal:           "Users can manage their profile"
  Goal Met:       โœ… Yes
  Stories Done:   3/3 (100%)
  Points:         11/11 delivered
  Velocity:       11 pts (team avg: 10 pts)

  Demo:
    โœ… Profile page renders with user data
    โœ… Avatar uploads, crops, and displays via CDN
    โœ… Account deletion soft-deletes with recovery window

  Stakeholder Feedback: Approved

Step 8: Sprint Retrospective

/agile-sprint-retro
Sprint Retrospective โ€” Sprint 4
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  What went well:
    + Autonomous execution completed all 3 stories
    + TDD caught a file validation edge case early
    + Clear requirements = no re-planning needed

  What to improve:
    - Avatar crop library added as new dependency (should flag)
    - Could parallelize PROF-001 and PROF-003 (independent)

  Action items:
    ๐Ÿ“‹ Add dependency review to autonomous checklist
    ๐Ÿ“‹ Enable parallel story execution for independent stories

Autonomous Safety Rails

Autonomous mode is powerful but bounded. These safety rails prevent runaway execution.

PAUSE for Human

The AI stops and waits for human approval before proceeding with:

FLAG for Review

The AI continues but flags these for human attention:

Bounded Loops

Hard limits prevent infinite retries:

Autonomous Sprint Flow

๐Ÿ“
/agile-story-create write stories
๐ŸŽฏ
/agile-sprint-planning plan sprint
๐Ÿ”„
Per Story Loop branch โ†’ tdd โ†’ ci โ†’ pr โ†’ merge โ†’ dod
๐Ÿ›‘
Human Checkpoint review + approve
๐Ÿ“Š
/agile-sprint-review report results
๐Ÿ”
/agile-sprint-retro capture learnings

What You Practiced

Knowledge Check

When does autonomous mode pause for human review?