Leanpub Header

Skip to main content

Spec-Driven

a handbook for Agentic Engineers

Spec-Driven

AI agents can write thousands of lines of code in minutes, but they will build the wrong thing just as fast if the specification is wrong.

Follow one real-world project from the first conversation to continuously delivered, verified software, and learn to use Event Modeling, Spec-Driven Development and AI agents to build the right thing with confidence.

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

$
PDF
About

About

About the Book

The bottleneck is no longer writing code. It's understanding what needs to be built, and being confident enough in the result to ship it.

Spec Driven is a hands-on guide for agentic engineers. You follow one real-world scenario step by step: a city commissions a new parking management system to replace an outdated, buggy one.

The team is small, the deadline is tight and the budget is limited. The stakeholder has spent years dealing with an unreliable system and can't afford another one.

Along the way you run into the problems most software projects face sooner or later, with or without AI, and you solve them one by one.

What you will learn

- Start with the Why. Answer why, what and how in that order, so you don't spend months building a perfect email integration when the real requirement was getting a document approved.

- Uncover hidden requirements. Use Event Modeling to get the knowledge out of people's heads and into the spec, before the "unknown unknowns" force a second rewrite.

- Build your Agent Harness. Set up the tools, instructions and guardrails an AI agent needs to implement functionality and verify its own work. The book uses Claude Code and OpenCode.

- Work in Slices. Deliver tiny, independently verifiable increments to a simulated environment that stakeholders can actually play with.

- Build quality into the pipeline. Use automated tests, clear specifications, independent verification and guardrails instead of piles of pull requests waiting for manual review.

The principle behind it all: spend 85% of your time on problems and requirements, and only 15% building what you've discussed.

If you work with AI agents and want to deliver working software rather than just more code, this book is for you.

Share this book

Author

About the Author

Martin Dilger

Eventmodeling Expert, Software Developer & Architect, Eventsourcerer, Entrepreneur

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.)

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