Prompt Contracts: The Book
How I Stopped Vibe Coding and Started Shipping Real Software With AI
A field manual from a solo developer who ships production software with AI every single day. Not demos. Not proofs of concept. Real products, with real users, paying real money.
Free with Kindle Unlimited
Or buy it: Kindle $9.99
A prompt contract is a one-page specification you write before handing a task to an AI coding agent like Claude Code, Cursor, or GitHub Copilot. Instead of hoping the AI understands your intent, you define the stack, constraints, inputs, outputs, and acceptance criteria upfront. The result: production-ready code on the first pass, not endless debugging cycles. This book teaches the complete framework in 9 chapters with 10 copy-paste templates and runnable examples you can use today.
The Medium article that started it all
63% read ratio · 16.8K from Google · 62% programmers, 48% AI practitioners
What readers say
"The better your specs are, the better your product is."
Randall Bownds
"It will build what you say. Do you say what you need?"
Vitaly Hornik
"It's good to know that the practices you encountered are exactly the same ones I use."
artful_dodger 71 claps
"Planning before execution is key."
Manu Gupta 159 claps
"This is an important article. Writing requirements was the precursor to design and coding phases."
Joe Bologna
"Basically it's not possible to vibe code without already knowing how to code?"
Money, Geopolitics & Oil 117 claps
From the 67 responses on Medium
What's inside the prompt contracts book
9 chapters, 260 pages, zero filler
"The specification is the product. The code is the delivery."
About the author
Phil writes on Medium under @rentierdigital. 20 years in software, from French banks to a shrimp fishery in Madagascar. Now a solo developer shipping SaaS products with AI from wherever the Wi-Fi holds.
Stack: Next.js, Convex, Clerk, Vercel, n8n. Self-hosted AI agents. Everything in this book has been deployed, broken in production, fixed, and deployed again.
Every chapter comes with runnable code
Scan the QR codes inside the book to access templates, workflows, and companion repos
Companion Repository Ch.0 + Ch.8
Templates, runnable examples, and the full tool stack from the book.
10 templates · 6 runnable examples · full stack breakdown
Prompt Contract Templates Ch.1 + Ch.3
10 ready-to-use templates: API routes, database schemas, React components, auth flows, debugging.
Copy a template → fill the blanks → hand to Claude Code → get working code
The Full Stack Ch.2 + Ch.5
Every tool mentioned in the book with setup links, cost breakdowns, and honest comparisons.
Convex · Clerk · Next.js · n8n · Hostinger · and more
Real CLAUDE.md Examples Ch.2
Production CLAUDE.md files from real projects. See how to configure Claude Code for a SaaS app and an automation pipeline.
SaaS project config · Automation project config
DreamMiner — Complete SaaS Example Ch.4
The full contracts and code from Chapter 4. Stripe webhooks, Convex mutations, auth pages — all built contract-first.
4 contracts · Convex schema · Stripe webhook · Next.js pages
QR CLI Tool Ch.6
A batch QR code generator built from a prompt contract. Python CLI with sample CSV and test script. Run it in 2 minutes.
Python · pip install → run → QR codes generated
n8n Workflow Contracts Ch.6
Prompt contracts for n8n workflows: content pipelines, cross-platform syndication, monitoring alerts.
3 contracts · feed to Claude Code + n8n-mcp → workflows built on your instance
Prototyping Tools Ch.7
The tools I use to validate ideas in 20 minutes before building properly. Lovable, v0, and the honest assessment.
Validate fast · build properly · no-code for prototypes, contracts for production
Your AI has been waiting for better instructions.
Get Prompt Contracts on AmazonFree with Kindle Unlimited
Or buy it: Kindle $9.99
Frequently asked questions
What is a prompt contract?
A prompt contract is a structured specification you write before giving a task to an AI coding agent. It defines the tech stack, inputs, outputs, constraints, and acceptance criteria so the AI delivers working code on the first pass instead of generating throwaway demos.
Do I need coding experience to use this book?
You need enough technical understanding to describe what you want built. You don't need to write code yourself, but you need to understand concepts like APIs, databases, and deployment. The book covers how to specify requirements clearly enough that AI does the implementation.
How is this different from vibe coding?
Vibe coding is typing a loose prompt and hoping the AI figures it out. It works for demos but breaks in production. Prompt contracts flip the process: you invest 10 minutes writing a clear spec, and the AI delivers production-grade code that handles edge cases, error states, and real-world constraints.
Which AI tools does this work with?
The examples use Claude Code, but the prompt contract framework works with any AI coding agent: Cursor, GitHub Copilot, Windsurf, or ChatGPT. The principle is the same: better input specifications produce better output code, regardless of the tool.