Module 8: Capstone Project — A Complete Test Suite with TDD

Delivery and Retrospective

Delivery and Retrospective

Capsule overview

This is the final capsule of the module and of the guide. Here you validate that the TaskFlow API meets all the delivery criteria, prepare the repository for your portfolio, run a retrospective on what you learned, and close the loop: you've mastered TDD with Claude Code.


The Project's Final Checklist

Before considering the project complete, go through this list:

  • The application starts and all the endpoints respond correctly
  • The test suite has tests at 3 levels: unit, integration, E2E
  • Coverage ≥90% in lines
  • The CI pipeline runs in GitHub Actions and passes
  • The README explains the setup, how to run the tests, and has a CI badge
  • There are no tests marked as skipped without justification
  • The code has type hints on the public functions
  • The TDD cycles are documented (in commits, in a doc, or in comments)

Evaluation Rubric (100 points)

Use this rubric to self-evaluate or to have a reviewer evaluate your delivery.

Functionality (25 points)

CriterionPointsDescription
The app works10The API starts, responds on the expected endpoints
Auth complete5Register, login, token validation work
Teams complete5Create a team, add members, list teams
Tasks complete5Task CRUD, assignment, status transitions

Test Suite (30 points)

CriterionPointsDescription
Unit tests10Tests of the services and isolated logic, well named
Integration tests10Endpoint tests with TestClient, auth included
E2E tests5At least one complete flow (register → login → team → task)
Coverage ≥90%5pytest-cov reports ≥90% line coverage

The TDD Process (20 points)

CriterionPointsDescription
Documented cycles10Evidence of red-green-refactor per feature
Spec refinement5At least one case where you added tests upon discovering gaps
Tests before the implementation5The tests guided the implementation, not the other way around

CI/CD (15 points)

CriterionPointsDescription
A working pipeline10GitHub Actions runs the tests on push/PR
Coverage in CI3A coverage report generated in the workflow
A badge in the README2The CI status badge is visible

Code Quality (10 points)

CriterionPointsDescription
Clean code4No unnecessary duplication, clear names
Type hints3The main functions are typed
Organization3A coherent folder and module structure

Total: 100 points. The recommended minimum target: 80 points to consider the project complete.

A detailed breakdown per category

Functionality (25 pts):

  • The app works (10): The API starts with uvicorn app.main:app, all the endpoints respond without 500 errors
  • Auth complete (5): POST /auth/register, POST /auth/login, protected endpoints validate the token
  • Teams complete (5): POST /teams, POST /teams/{id}/members, GET /teams
  • Tasks complete (5): Complete CRUD in /teams/{id}/tasks and /tasks/{id}, assignment and transitions

Test Suite (30 pts):

  • Unit tests (10): The services (AuthService, TeamService, TaskService) and rules have isolated tests
  • Integration tests (10): TestClient validates each endpoint with and without auth
  • E2E tests (5): At least one test that goes through register → login → team → task → complete
  • Coverage ≥90% (5): pytest --cov=app --cov-fail-under=90 passes

The TDD Process (20 pts):

  • Documented cycles (10): Commits or a TDD-LOG.md show red → green → refactor
  • Spec refinement (5): Some test added during the implementation upon discovering a gap
  • Tests first (5): The tests existed before or in parallel with the implementation, not afterwards

CI/CD (15 pts):

  • A working pipeline (10): .github/workflows/tests.yml runs on push/PR
  • Coverage in CI (3): The job includes --cov and --cov-report
  • A badge (2): The README has a status badge

Quality (10 pts):

  • Clean code (4): No duplication, small functions, descriptive names
  • Type hints (3): Parameters and returns typed in the public functions
  • Organization (3): app/, tests/, a coherent structure

Preparing the Repository for Your Portfolio

What makes your repo stand out

A portfolio project isn't just code that works. It's code that demonstrates differentiating skills. The TaskFlow API built with TDD + Claude Code shows:

  • The ability to plan (spec-first)
  • Mastery of testing at multiple levels
  • CI/CD integration
  • Professional use of AI as a tool, not as a replacement for judgment

When a recruiter or technical reviewer opens your repo, in under 30 seconds they must see: a green CI badge, a clear structure, a README that explains how to run and test it. That builds confidence before they read a line of code.

A professional README

Your README must include:

  1. A title and a brief description

    • What the TaskFlow API is, what problem it solves
  2. A CI badge

    ![Tests](https://github.com/your-username/taskflow-api/actions/workflows/tests.yml/badge.svg)
  3. Setup and installation

    ## Setup
    ```bash
    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  4. How to run the app

    ## Run
    uvicorn app.main:app --reload
  5. How to run the tests

    ## Tests
    pytest tests/ -v
    pytest tests/ --cov=app --cov-report=html  # with coverage
  6. The technology stack

    • Python, FastAPI, pytest, etc.
  7. The TDD context (optional but valuable)

    • "This project was built with TDD using Claude Code. Every feature started as a test."
    • This differentiates your repo and shows mastery of the workflow.

An example README section

## Testing

This project was built 100% with TDD (Test-Driven Development) using Claude Code.

- **Unit tests:** Services and isolated business logic
- **Integration tests:** Endpoints with the FastAPI TestClient
- **E2E tests:** Complete user flows

Run the tests:
```bash
pytest tests/ -v
pytest tests/ --cov=app --cov-report=html

Coverage target: ≥90%


### A visible structure

Make sure the project's structure is clear: `app/`, `tests/`, `.github/workflows/`. A reviewer must understand the architecture in seconds.

### Commits and documentation

If you documented the TDD cycles in a file (e.g. `TDD-LOG.md` or in the README), include it. Recruiters and reviewers value seeing the process, not just the result.

---

## A 4Ls Retrospective

The 4Ls retrospective (Liked, Learned, Lacked, Longed for) helps consolidate the learning. Answer in the first person, for yourself or to share.

### Liked (What you liked)

- Which aspect of the TDD process with Claude Code did you enjoy most?
- What positively surprised you? (for example: the speed of the cycles, the quality of the generated code)
- What would you do again without hesitating?
- Which part of the spec-first → implement → validate flow felt most natural?

### Learned (What you learned)

- Which concept or technique did you internalize best?
- What would change how you work on future projects?
- Which myth about TDD or AI was broken? (e.g. "TDD is slow" vs "with AI it's faster")
- How did your judgment evolve about when to trust AI-generated code?
- What did you learn about the importance of tests as a specification vs tests as after-the-fact verification?

### Lacked (What was missing)

- What would you have liked to have (time, resources, examples)?
- Which part of the project was left half-done or unclear?
- Which dependency or tool made things difficult?
- At what point did you feel you needed more guidance?
- Which edge case did you discover late and how would you handle it earlier next time?

### Longed for (What you hope for in the future)

- What would you like to explore next?
- How would you apply this in a real work project?
- Which guide or topic would complement what you learned?
- Are you interested in applying TDD to refactoring legacy code?
- How would you bring these standards to a team that uses AI for development?

---

## What Comes After This Guide

You completed the **Testing with Claude Code** guide. The next guides in the series take you into adjacent territory:

1. **Refactoring & Legacy Code (#8):** You'll learn to apply testing to existing code that wasn't written with TDD. Legacy code, technical debt, and how Claude Code helps you add tests without breaking production. Most of the code in the world has no tests; knowing how to add them safely is a very in-demand skill.

2. **Claude Code in a Team (#9):** Testing standards for teams that use agentic development. How to align conventions, review AI-generated tests, share documentation, and which parts of the TDD workflow scale to teams of multiple developers.

3. **Applying it to your project:** The workflow you mastered here is transferable. In your next real project, start with spec-first, decompose into tests, use Claude Code to implement, and keep CI from day one. You don't need a new app: you can apply incremental TDD to new features in an existing codebase.

4. **Going deeper into testing:** If you want to go further: mutation testing (do your tests really detect bugs?), contract testing for microservices, performance testing, or testing applications with a frontend.

---

## The Final Validation Before Delivering

Go through this checklist the night before considering the project closed:

- [ ] `uvicorn app.main:app` starts without errors
- [ ] `pytest tests/ -v` passes (0 failed)
- [ ] `pytest tests/ --cov=app --cov-fail-under=90` passes
- [ ] `git push` triggers the GitHub Actions workflow
- [ ] The badge in the README shows "passing" (green)
- [ ] There are no critical unresolved TODOs in the code
- [ ] The README is complete and without formatting errors
- [ ] requirements.txt includes all the dependencies (including pytest, pytest-cov)

If everything is green, you're ready.

---

## Celebration: You've Mastered TDD with AI

You've built a complete application using a workflow that most developers still don't practice: TDD assisted by Claude Code. It isn't just "using AI to generate code". It's using AI as an implementer inside a validation system that you control. The tests are the contract; Claude Code is the executor. That's professional development with AI.

The TaskFlow API repository is your evidence. It shows that you can:
- Plan with spec-first
- Decompose features into tests
- Run red-green-refactor cycles with an AI agent
- Achieve professional coverage
- Configure CI that protects every change

That's portfolio-worthy. Use it.

---

## The Final Summary

- A delivery checklist and a 100-point rubric to validate the project
- A README with a CI badge, setup, and tests
- A 4Ls retrospective to consolidate the learning
- Next steps: Refactoring & Legacy, Claude Code in a Team, applying it to real projects
- Celebration: you've mastered TDD with AI and you have a project to prove it

**The end of Module 8 and of the Testing with Claude Code guide.** Congratulations!

---

*Module 8, Capsule 06 — Testing with Claude Code Guide*