Kick off your book project in 2 hours, get started with GhostAI in 2 hours, or do both! Free live workshops, on Zoom. You’ll leave with a real book project and a clear plan to keep going. Saturday, June 27, 2026.

Leanpub Header

Skip to main content

ATDD with AI Agents

Ship faster with AI agents — without shipping bugs. Acceptance tests as your spec and safety net.

Drive AI coding agents with acceptance tests — your spec and your safety net. A hands-on guide to modern ATDD with AI agents.

Interested in this book? Show your support by saying what you'd like to pay for it!

$
PDF
EPUB
WEB
APP
Discussion Forum
About

About

About the Book

AI coding agents can write a lot of code, fast. But that code might not behave the way you need — or it quietly breaks something that used to work. The hard part isn't getting code; it's knowing that it works correctly and hasn't introduced a regression.

Acceptance Test-Driven Development (ATDD) answers that. You agree on concrete examples of the behavior you want before any code is written, turn them into executable acceptance tests, and let those tests define "done." This book shows how AI agents change — and amplify — that practice: the tests become the specification you hand the agent, and the safety net that proves it delivered.

You'll move from traditional ATDD to a modern ATDD practice built around AI agents — from the fundamentals, through writing acceptance tests precise enough to drive an agent, to a full worked case study.

By the end, you'll be able to apply the full ATDD-with-agents workflow to implement a user story from start to end:

  • Use AI agents to write acceptance tests based on acceptance criteria — and approve the resulting specification yourself
  • Use AI agents to implement code that satisfies the acceptance tests — and review the code yourself
  • Keep agents under control — constrain their scope and optimize their token efficiency

Who this book is for

Software developers, tech leads, and QA engineers who already use — or want to use — AI coding agents, and want a disciplined way to get reliable results from them. This book assumes a basic understanding of ATDD and a basic familiarity with AI agents; you don't need to be an expert in either.

A note on this book — I'm writing this book with an agile approach — the same iterative way good software gets built. Instead of waiting months or years for a finished book, you get instant access today, a say in where it goes through your feedback, and every update for free as it ships. It's a living book, so things will change along the way — the outline, the chapters, the schedule — and I may add, drop, or rework topics as I learn what helps readers most. So please pick it up for what it is today, not as a promise of exactly what it'll become.

Author

About the Author

Valentina Jemuović

Valentina Jemuović is a technical coach who helps development teams deliver quality software. Her work centers on Acceptance Test-Driven Development, Test-Driven Development, and Clean Architecture, with a focus on zero-defect delivery and safety-critical systems. She wrote this book to bring that same discipline to working with AI coding agents — using acceptance tests to keep agent-driven development reliable and under human control.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub