PROJECT 01

Todo REST API

Build a complete project from zero using the full framework โ€” every role, every ceremony, every command

โฑ ~60 min ยท 1 Sprint ยท Solo Mode ยท Beginner

What This Project Teaches

This is not a coding tutorial. It's a process tutorial. You'll see exactly how a solo developer uses the agile framework to go from an idea ("I want a todo app") to a deployed, tested, reviewed API โ€” with every role simulated by the AI.

โš ๏ธ Key Principle

You drive the process. The framework guides it. Every command needs YOUR input โ€” your requirements, your decisions, your context. The AI doesn't invent features; it structures what YOU describe. The AI doesn't pick technologies; @arch evaluates options and YOU choose.

Roles You'll See in Action

RoleWhat they do in this projectWhen
๐Ÿ“‹ @poStructures your requirements into proper user stories with acceptance criteriaStory creation, sprint review, acceptance
๐Ÿ”„ @smFacilitates sprint planning, tracks progress, runs retrospectiveSprint ceremonies
๐Ÿ—๏ธ @archEvaluates architecture options, recommends tech approachProject setup
๐Ÿ‘จโ€๐Ÿ’ป @leadReviews code quality (SOLID, Clean Code), approves PRsCode review
โŒจ๏ธ @devImplements features with TDD, creates branches and PRsImplementation
๐Ÿงช @qaVerifies Definition of Done, checks test coverageDoD verification
๐Ÿš€ @devopsRuns CI pipeline, handles deploymentCI/CD, deploy

Phase 1: Project Setup

You start with nothing โ€” just an idea and an empty folder.

Step 1: Create your project folder and install the framework

You do:

mkdir todo-api && cd todo-api
git init
cp -r /path/to/agile/* .claude/

Claude Code now reads .claude/CLAUDE.md automatically. All /agile-* commands are available.

Step 2: Tell Claude what you want to build

๐Ÿ’ฌ You say

"I want to build a simple REST API for managing personal todo tasks. I'm working solo. Help me set up the project."

Claude reads CLAUDE.md, detects this is a greenfield project (empty repo), and routes to workflows/new_project.md. This triggers Sprint 0 โ€” a setup sprint where no features are built, only foundations.

Step 3: @arch evaluates architecture โ€” /agile-explore-brainstorm

Before writing any code, @arch needs to understand what you're building so they can recommend the right approach. You provide the context.

๐Ÿ’ฌ You type

/agile-explore-brainstorm I need a REST API for a todo app. Simple CRUD operations. Will be used locally at first, maybe deployed later. I want something lightweight and easy to test.

๐Ÿ—๏ธ @arch evaluates 3-5 approaches based on YOUR constraints. They don't just pick one โ€” they score each option and explain trade-offs:

๐Ÿ—๏ธ @arch responds with a scoring matrix (example):

## /agile-explore-brainstorm โ€” Results

### Problem Statement
REST API for personal todo management. Constraints:
lightweight, easy to test, simple CRUD, local-first.

### Scoring Matrix

| Approach          | Feasibility | Maintainability | Performance | Risk | Total |
|-------------------|------------|-----------------|-------------|------|-------|
| Express + SQLite  | 9/10       | 8/10            | 7/10        | 9/10 | 33    |
| Fastify + SQLite  | 8/10       | 8/10            | 9/10        | 8/10 | 33    |
| Go + net/http     | 7/10       | 9/10            | 10/10       | 6/10 | 32    |
| Python Flask      | 9/10       | 7/10            | 6/10        | 9/10 | 31    |

### Recommendation
Express + SQLite or Fastify + SQLite โ€” both score equally.
Express has larger ecosystem; Fastify has better performance.

### What Would Change This
- If performance is critical โ†’ Fastify or Go
- If you prefer Python โ†’ Flask is viable
โœ… You decide

"Let's go with Express + SQLite. I'm familiar with Node.js."

This is the key: @arch presents options with data. You make the decision. The framework never forces a technology.

Step 4: Scaffold the project and run /agile-setup-init

Now that you've chosen the stack, create the project skeleton and let the framework scan it.

๐Ÿ’ฌ You say

"Set up the Express + SQLite project with a test framework. Then run /agile-setup-init to populate the memory."

Claude (as @dev) scaffolds the project: package.json, src/ folder, test config, .gitignore. Then /agile-setup-init scans everything:

๐Ÿ”„ @sm + ๐Ÿ—๏ธ @arch + โŒจ๏ธ @dev scan results:

## /agile-setup-init โ€” Results

| Memory File             | Status       | Confidence |
|-------------------------|-------------|------------|
| semantic/project.md     | โœ… Populated | 95%        |
| semantic/architecture.md| โœ… Populated | 90%        |
| semantic/conventions.md | โœ… Populated | 85%        |
| semantic/codebase.md    | โœ… Populated | 95%        |
| semantic/testing.md     | โœ… Populated | 90%        |

### Detected Stack
- Language: JavaScript (Node.js 20)
- Framework: Express 4.x
- Database: SQLite via better-sqlite3
- Test Framework: Jest + Supertest
- Package Manager: npm

Step 5: /agile-setup-onboard + /agile-setup-health

/agile-setup-onboard    โ†’ Generates coding rules from detected conventions
/agile-setup-health     โ†’ Verifies everything is green (โœ… All checks pass)

Phase 1 complete. You have a scaffolded project, initialized memory, and coding rules. Zero features built yet โ€” that's correct. Sprint 0 is about foundations.

Phase 2: Create User Stories

๐Ÿšซ Common Mistake

/agile-story-create does NOT invent features. You describe what you need, and @po structures it into a proper story with acceptance criteria. Without your input, the command has nothing to work with.

Step 6: Create your first story

๐Ÿ’ฌ You type

/agile-story-create I need an endpoint where I can create a new task by sending a title and an optional description. The task should be saved and returned with an ID.

๐Ÿ“‹ @po takes your raw requirement and structures it:

๐Ÿ“‹ @po responds:

## /agile-story-create โ€” Story Created

### Story US-001
**As a** todo user,
**I want** to create a new task with a title and optional description,
**so that** I can track things I need to do.

### Acceptance Criteria

**AC-1: Happy path โ€” create task with title and description**
- **Given** the API is running
- **When** I send POST /tasks with {"title": "Buy groceries",
  "description": "Milk, eggs, bread"}
- **Then** I receive 201 with the created task including an ID,
  title, description, and status "pending"

**AC-2: Edge case โ€” create task with title only**
- **Given** the API is running
- **When** I send POST /tasks with {"title": "Call dentist"}
  (no description)
- **Then** I receive 201 with description as null or empty string

**AC-3: Error case โ€” missing title**
- **Given** the API is running
- **When** I send POST /tasks with {} (no title)
- **Then** I receive 400 with an error message
  "title is required"

### INVEST Check
| Criterion   | Status |
|-------------|--------|
| Independent | โœ…     |
| Negotiable  | โœ…     |
| Valuable    | โœ…     |
| Estimable   | โœ…     |
| Small       | โœ…     |
| Testable    | โœ…     |

### Metadata
- **Status**: Unrefined
- **Created**: 2026-04-05

> Added to: .memory/backlog/product.md

Notice: @po added the error case (AC-3) that you didn't mention. That's the value โ€” the framework ensures stories are complete with happy path, edge case, AND error case.

Step 7: Create remaining stories

You repeat /agile-story-create for each feature, always providing YOUR requirements:

๐Ÿ’ฌ /agile-story-create I need to list all my tasks,
   with the ability to filter by status (pending, done)

   โ†’ @po creates US-002: "List and filter tasks"

๐Ÿ’ฌ /agile-story-create I need to mark a task as done
   and also be able to delete tasks I no longer need

   โ†’ @po creates US-003: "Update task status and delete tasks"
๐Ÿ’ก Notice

@po might split your last request into two stories if it violates the "Small" INVEST criterion. That's the framework working โ€” each story should do one thing well.

Phase 3: Estimate and Plan the Sprint

Step 8: Estimate stories โ€” /agile-story-estimate

๐Ÿ’ฌ You type

/agile-story-estimate

โŒจ๏ธ @dev estimates each story using Fibonacci points (1, 2, 3, 5, 8, 13). The estimation considers complexity, uncertainty, and effort:

## /agile-story-estimate โ€” Results

| Story  | Title                 | Points | Rationale                          |
|--------|-----------------------|--------|------------------------------------|
| US-001 | Create a task         | 3      | CRUD + validation + DB schema      |
| US-002 | List and filter tasks | 2      | Read-only + query params           |
| US-003 | Update and delete     | 3      | Two operations but straightforward |

**Total backlog**: 8 points

Step 9: Sprint planning โ€” /agile-sprint-planning

๐Ÿ’ฌ You type

/agile-sprint-planning

๐Ÿ”„ @sm facilitates the planning ceremony. Since this is your first sprint, there's no historical velocity โ€” @sm sets a conservative initial capacity:

๐Ÿ”„ @sm facilitates:

## Sprint Planning Output

### Sprint Goal
"Deliver a working CRUD API for task management"

### Sprint Backlog
| Story  | Title                 | Points | Priority |
|--------|-----------------------|--------|----------|
| US-001 | Create a task         | 3      | P1       |
| US-002 | List and filter tasks | 2      | P1       |
| US-003 | Update and delete     | 3      | P1       |

### Capacity Check
- Team velocity (first sprint): 8 points (conservative)
- Committed this sprint: 8 points
- Capacity utilization: 100%

### Risks
- First sprint โ€” no historical velocity to compare against

๐Ÿ“‹ @po confirms the sprint goal. ๐Ÿ”„ @sm confirms scope. You're ready to build.

Phase 4: Build Story US-001 (The Full Loop)

This is where all the roles work together. Every story follows this exact loop:

๐ŸŒฟ
Branch/agile-code-branch
๐Ÿ“
Plan/agile-story-plan
๐Ÿ”ด๐ŸŸข๐Ÿ”ต
TDD/agile-code-tdd
โš™๏ธ
CI/agile-code-ci
๐Ÿ’พ
Commit/agile-code-commit
๐Ÿ”€
PR + Review/agile-code-pr
/agile-code-pr-review
๐Ÿ”—
Merge/agile-code-merge
โœ…
DoD + Accept/agile-story-dod
/agile-story-accept

Step 10: Create feature branch โ€” /agile-code-branch

๐Ÿ’ฌ You type

/agile-code-branch feature US-001 create-task

โŒจ๏ธ @dev: Branch created
- Branch: feature/US-001-create-task
- From: develop (up to date)
- Linked to: US-001

Step 11: Plan the implementation โ€” /agile-story-plan

๐Ÿ’ฌ You type

/agile-story-plan US-001

๐Ÿ‘จโ€๐Ÿ’ป @lead creates an implementation plan โ€” what to build, in what order, but no code yet:

๐Ÿ‘จโ€๐Ÿ’ป @lead: Implementation Plan for US-001

Phase 1: Database schema
- Create tasks table (id, title, description, status, created_at)

Phase 2: Route + handler
- POST /tasks route
- Request validation (title required)
- Insert into database
- Return created task with 201

Phase 3: Error handling
- 400 for missing title
- 500 for database errors

Confidence: 9/10 โ€” straightforward CRUD

Step 12: Test-Driven Development โ€” /agile-code-tdd

๐Ÿ’ฌ You type

/agile-code-tdd US-001

โŒจ๏ธ @dev implements using Red โ†’ Green โ†’ Refactor, one acceptance criterion at a time:

๐Ÿ”ด RED โ€” Write failing test for AC-1

// test/tasks.test.js
test('POST /tasks creates a task with title and description', async () => {
  const res = await request(app)
    .post('/tasks')
    .send({ title: 'Buy groceries', description: 'Milk, eggs' });

  expect(res.status).toBe(201);
  expect(res.body).toHaveProperty('id');
  expect(res.body.title).toBe('Buy groceries');
  expect(res.body.status).toBe('pending');
});

// Result: โŒ FAIL โ€” route doesn't exist yet

๐ŸŸข GREEN โ€” Write minimum code to pass

// src/routes/tasks.js
router.post('/', (req, res) => {
  const { title, description } = req.body;
  const task = db.prepare(
    'INSERT INTO tasks (title, description, status) VALUES (?, ?, ?)'
  ).run(title, description || null, 'pending');

  res.status(201).json({
    id: task.lastInsertRowid,
    title, description, status: 'pending'
  });
});

// Result: โœ… PASS

๐Ÿ”ต REFACTOR โ€” Clean up while tests stay green

// Extract DB logic to a repository (Clean Code)
// Tests still pass โœ…

โŒจ๏ธ @dev repeats Red โ†’ Green โ†’ Refactor for AC-2 (no description) and AC-3 (missing title validation).

Step 13: Run CI โ€” /agile-code-ci

๐Ÿš€ @devops: CI Pipeline Results
  Build:    โœ…
  Tests:    โœ… 6/6 passing
  Lint:     โœ… 0 errors
  Security: โœ… No vulnerabilities

Step 14: Commit โ€” /agile-code-commit

โŒจ๏ธ @dev: Commit created
  feat(tasks): add create task endpoint

  - POST /tasks with title and optional description
  - Returns 201 with created task including ID
  - Validates title is required (400 if missing)

  Ref: US-001

Step 15: Create PR โ€” /agile-code-pr

โŒจ๏ธ @dev: PR created
  Title: feat(tasks): add create task endpoint (#US-001)
  Branch: feature/US-001-create-task โ†’ develop
  CI: โœ… Green

Step 16: Code review โ€” /agile-code-pr-review

๐Ÿ‘จโ€๐Ÿ’ป @lead reviews the PR against SOLID and Clean Code standards:

๐Ÿ‘จโ€๐Ÿ’ป @lead: PR Review

| # | Severity | File          | Finding                    | Fix                      |
|---|----------|---------------|----------------------------|--------------------------|
| 1 | ๐ŸŸก S2   | routes/tasks.js:8 | Magic string 'pending' | Extract to constant      |
| 2 | ๐Ÿ”ต S3   | routes/tasks.js:3 | Missing JSDoc on handler | Add function description |

Score: 8/10
Verdict: โœ… APPROVED (no S0/S1 findings)

Step 17: Merge โ€” /agile-code-merge

โŒจ๏ธ @dev: Merge complete
  Strategy: Squash merge (feature โ†’ develop)
  Branch feature/US-001-create-task deleted
  CI on develop: โœ… Green

Step 18: Definition of Done โ€” /agile-story-dod

๐Ÿงช @qa checks the full DoD checklist:

๐Ÿงช @qa: Definition of Done โ€” US-001

| # | Criterion              | Status |
|---|------------------------|--------|
| 1 | All ACs covered by tests | โœ…   |
| 2 | CI pipeline green        | โœ…   |
| 3 | Code reviewed by @lead   | โœ…   |
| 4 | No S0/S1 findings open   | โœ…   |
| 5 | Merged to develop        | โœ…   |
| 6 | Test coverage โ‰ฅ 80%      | โœ… 94%|

Verdict: โœ… DONE โ€” ready for acceptance

Step 19: Acceptance โ€” /agile-story-accept

๐Ÿ“‹ @po verifies each acceptance criterion against the actual implementation:

๐Ÿ“‹ @po: Acceptance Review โ€” US-001

| AC   | Description           | Status |
|------|-----------------------|--------|
| AC-1 | Create with title+desc | โœ…    |
| AC-2 | Create with title only | โœ…    |
| AC-3 | Error on missing title | โœ…    |

Verdict: โœ… ACCEPTED
Story counts toward sprint velocity: 3 points
โœ… One story complete!

You just went through the full loop: branch โ†’ plan โ†’ TDD โ†’ CI โ†’ commit โ†’ PR โ†’ review โ†’ merge โ†’ DoD โ†’ accept. This exact loop repeats for every story.

Phase 5: Build US-002 and US-003 (Same Loop, Abbreviated)

The process is identical. Here's the abbreviated flow:

US-002: List and filter tasks (2 pts)

/agile-code-branch feature US-002 list-tasks
/agile-story-plan US-002
/agile-code-tdd US-002
  ๐Ÿ”ด Test: GET /tasks returns all tasks โ†’ โŒ
  ๐ŸŸข Implement handler โ†’ โœ…
  ๐Ÿ”ด Test: GET /tasks?status=done filters โ†’ โŒ
  ๐ŸŸข Add query param filtering โ†’ โœ…
/agile-code-ci           โ†’ โœ… All green
/agile-code-commit       โ†’ feat(tasks): add list and filter endpoints
/agile-code-pr           โ†’ PR created
/agile-code-pr-review    โ†’ โœ… Approved (no findings)
/agile-code-merge        โ†’ Squash merged to develop
/agile-story-dod         โ†’ โœ… DONE
/agile-story-accept      โ†’ โœ… ACCEPTED (2 points)

US-003: Update and delete tasks (3 pts)

/agile-code-branch feature US-003 update-delete
/agile-story-plan US-003
/agile-code-tdd US-003
  ๐Ÿ”ด Test: PUT /tasks/:id updates status โ†’ โŒ
  ๐ŸŸข Implement update handler โ†’ โœ…
  ๐Ÿ”ด Test: DELETE /tasks/:id removes task โ†’ โŒ
  ๐ŸŸข Implement delete handler โ†’ โœ…
  ๐Ÿ”ด Test: PUT /tasks/999 returns 404 โ†’ โŒ
  ๐ŸŸข Add not-found check โ†’ โœ…
/agile-code-ci           โ†’ โœ… All green
/agile-code-commit       โ†’ feat(tasks): add update and delete endpoints
/agile-code-pr           โ†’ PR created
/agile-code-pr-review    โ†’ โœ… Approved
  (๐ŸŸก S2: suggest extracting "not found" check to middleware)
/agile-code-merge        โ†’ Squash merged to develop
/agile-story-dod         โ†’ โœ… DONE
/agile-story-accept      โ†’ โœ… ACCEPTED (3 points)

Phase 6: Sprint End Ceremonies

Step 20: Sprint review โ€” /agile-sprint-review

๐Ÿ’ฌ You type

/agile-sprint-review

๐Ÿ“‹ @po and ๐Ÿ”„ @sm run the review. โŒจ๏ธ @dev demos working software:

## Sprint Review Report

### Sprint Goal: "Deliver a working CRUD API for task management"
### Sprint Goal Met: โœ… Yes

| Story  | Title                 | Points | Status     |
|--------|-----------------------|--------|------------|
| US-001 | Create a task         | 3      | โœ… Accepted |
| US-002 | List and filter tasks | 2      | โœ… Accepted |
| US-003 | Update and delete     | 3      | โœ… Accepted |

### Velocity
- Committed: 8 points
- Completed: 8 points (100%)
- First sprint โ€” this becomes the baseline

Step 21: Retrospective โ€” /agile-sprint-retro

๐Ÿ”„ @sm facilitates reflection:

## Retrospective Report

### What Went Well
- TDD caught the missing validation early (AC-3)
- All stories accepted on first pass

### What To Improve
- Could extract common error handling to middleware
- Should set up integration tests for the full request cycle

### Action Items
| Action                            | Owner | Due        |
|-----------------------------------|-------|------------|
| Extract error middleware          | @dev  | Sprint 2   |
| Add integration test template     | @qa   | Sprint 2   |

Step 22: Save learnings โ€” /agile-memory-learn

๐Ÿ”„ @sm: Learnings captured
  โ†’ Saved to: .memory/episodic/learnings.md
  - Sprint 1 velocity baseline: 8 points
  - TDD effectiveness: all stories accepted first pass
  - Action items tracked for Sprint 2

Phase 7: Release

Step 23: Generate changelog โ€” /agile-ship-changelog

## Changelog: v1.0.0 โ€” 2026-04-05

### Added
- POST /tasks โ€” create a task with title and description (US-001)
- GET /tasks โ€” list all tasks with status filter (US-002)
- PUT /tasks/:id โ€” update task status (US-003)
- DELETE /tasks/:id โ€” delete a task (US-003)

Step 24: Cut release โ€” /agile-ship-release

๐Ÿš€ @devops: Release v1.0.0
  Branch: release/v1.0.0 from develop
  CI: โœ… Green
  Merged to main โœ…
  Tagged: v1.0.0 โœ…
  Back-merged to develop โœ…

Step 25: Deploy โ€” /agile-ship-deploy

๐Ÿš€ @devops: Deployed v1.0.0
  Smoke tests: โœ… All endpoints responding
  Health check: โœ…

What You Built

MetricValue
Stories completed3/3
Story points delivered8/8
Sprint goal metโœ… Yes
Release versionv1.0.0
Test coverage94%
Roles involved@po, @sm, @arch, @lead, @dev, @qa, @devops
โœ… Key Takeaway

You drove every decision. You described features โ†’ @po structured them. You chose the tech stack โ†’ @arch evaluated options. You reviewed the code โ†’ @lead found improvements. No command runs without your input. The framework amplifies your decisions โ€” it doesn't replace them.

This is the core loop. Every project, no matter how complex, repeats this cycle: create stories โ†’ plan sprint โ†’ branch โ†’ TDD โ†’ CI โ†’ PR โ†’ review โ†’ merge โ†’ accept โ†’ release.

๐Ÿง  Knowledge Check

What does /agile-story-create need from you?

๐Ÿง  Knowledge Check

Who decides the technology stack?