Leanpub Header

Skip to main content

What The Spec Didn't Tell The Agent

Getting The Software You Actually Asked For

What The Spec Didn't Tell The Agent
This book is 100% completeLast updated on 2026-12-02

AI coding agents do exactly what the spec says, and fill in the rest with guesses. Learn to write specs, checked by a machine, that leave them nothing to guess.

Minimum price

$15.00

$25.00

You pay

Authors earn

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

AI coding agents do what the spec says, and what it leaves out they decide for themselves. Ask for a feature in English and you get code that is plausible, passes its tests, and is wrong in a case nobody wrote down.

This book is about closing that gap. It shows how to write requirements as types in Agda, so that a missing case or a contradiction becomes an error the machine reports, not a bug a customer finds. Once the spec exists, the agent can check its own work against it.

You won't need to write Agda yourself. The book teaches you to read and judge the specifications an agent writes: what a claim actually says, what it leaves out, and whether the implementation matches it. Every example comes from real problems met while building software with agents: a memory system for AI agents, a code-search service and a web proxy. Every line of Agda in the book is typechecked when it is built.

The book is written for working programmers in Python, TypeScript, Java, C++, Rust or Go. It assumes no background in proofs, logic or functional programming.

This is a beta edition. All chapters are written and are being revised. Buying now gets you every update, including the first edition, at no extra cost.

Author

About the Authors

Igor Plotnikov

Igor Plotnikov is one of the inventors of the SSL VPN. He has founded seven startups; two were acquired by public companies: uRoam by F5, and MI Secure by Cisco, where it grew into a product line with billions in sales. He has built sub-microsecond trading infrastructure and AI-native platforms, and holds a PhD in physics from MIPT. He still writes code, now with AI agents, and uses Agda specifications to check that what they build is what he meant. This book is the method he works by.

Valentyn Kamyshenko

Valentyn Kamyshenko is co-founder and Chief Architect of Yovico (yovico.ai). He has spent over 25 years designing commercial software with his long-time partner Igor Plotnikov: clientless SSL VPN products later acquired by F5 and Cisco, a nanosecond-scale high-frequency trading system at Xambala, the Zeitro mortgage-automation platform, and the AI security startup Dymium. Before industry, he was a theoretical physicist (PhD, Kurchatov Institute), working on density functional theory and statistical physics, and he has worked with numerical algorithms for about 40 years. He now writes formal specifications in Agda for software built by AI agents, and the book explains how to read them.

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

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