- About the Author
- Preface
- Part 1: The Method
- Chapter 1: Why Specs When the Agent Can Just Write the Code
- 1.1 The Prompt Is Not a Specification
- 1.2 What a Spec Is, and What It Is Not
- 1.3 The Phases of the Method
- 1.4 The Task Board
- 1.5 How the Build Is Recorded
- 1.6 How to Read This Book
- 1.7 Summary
- Chapter 2: Setting Up Spec Kit with Claude Code
- 2.1 Installing uv and the Specify CLI
- 2.2 Creating the Project
- 2.3 What Spec Kit Generates
- 2.4 Recording the Build
- 2.5 Summary
- Chapter 3: The Constitution
- 3.1 What Belongs in a Constitution
- 3.2 Running the Constitution Phase
- 3.3 The Five Principles
- 3.4 Constraints That Come from the Book
- 3.5 Versions and the Sync Impact Report
- 3.6 Summary
- Chapter 1: Why Specs When the Agent Can Just Write the Code
- Part 2: One Feature, Every Phase
- Chapter 4: Writing the Specification
- 4.1 From a Paragraph to a Feature Folder
- 4.2 User Stories as Independent Slices
- 4.3 Acceptance Scenarios Are Tests in Waiting
- 4.4 Requirements, Criteria, and Edge Cases
- 4.5 Assumptions and Open Questions
- 4.6 The Quality Checklist
- 4.7 Summary
- Chapter 5: Clarify: Asking the Right Questions
- 5.1 The Coverage Scan
- 5.2 Three Questions, Asked One at a Time
- 5.3 Writing Answers into the Spec
- 5.4 Who Chooses the Answers
- 5.5 What Clarify Missed
- 5.6 Summary
- Chapter 6: Planning: From What to How
- 6.1 Setup and Technical Context
- 6.2 The Constitution Check
- 6.3 Research: Decisions with Their Alternatives
- 6.4 The Data Model and the Contracts
- 6.5 The Quickstart
- 6.6 Summary
- Chapter 7: Tasks and Analysis
- 7.1 Tasks Organized by Story
- 7.2 Quoting Constraints Verbatim
- 7.3 The Template Says Optional, the Constitution Says Required
- 7.4 Running Analysis
- 7.5 Applying the Findings
- 7.6 Summary
- Chapter 8: Implementing Test-First with an Agent
- 8.1 The Gate and the Setup
- 8.2 Red First
- 8.3 Moving Cards
- 8.4 Keyboard, Dialog, and Focus
- 8.5 Measuring the Success Criteria
- 8.6 The Manual Pass
- 8.7 Summary
- Chapter 9: Converge: When Every Task Is Done and the Spec Isn't
- 9.1 Checked Boxes Are Claims
- 9.2 The Six Findings
- 9.3 Implementing the Convergence Tasks
- 9.4 Two Rules in Conflict
- 9.5 Summary
- Chapter 4: Writing the Specification
- Part 3: Specifying AI
- Chapter 10: Specifying a Feature That Uses a Model
- 10.1 Check the Platform First
- 10.2 What Can Be Exact
- 10.3 What Cannot Be Exact: the Evaluation Set
- 10.4 Two Questions Without a Safe Default
- 10.5 Planning Around a Model
- 10.6 Summary
- Chapter 11: Building and Converging the AI Feature
- 11.1 The Only Module That Talks to the Model
- 11.2 A Stand-In Model
- 11.3 Building the Element
- 11.4 Converging Feature 002
- 11.5 What Is Left for a Person
- 11.6 Summary
- Chapter 10: Specifying a Feature That Uses a Model
- Part 4: Two Features Built Live
- Chapter 12: A Feature Built Live: Card Labels
- 12.1 The Specify Phase Stops to Ask
- 12.2 Clarify Asks One Question at a Time
- 12.3 The Plan Puts the Rules in One Pure Module
- 12.4 Analyze Finds a Criterion That Cannot Be Met
- 12.5 Implement: Every Red and Green Count
- 12.6 Converge Looks at the Real Thing
- 12.7 Summary
- Chapter 13: Specifying a Design
- 13.1 From a Mood to Rules
- 13.2 A Palette Chosen by Measurement
- 13.3 Analysis Finds a Contradiction in the Spec
- 13.4 Tests That Measure the Look
- 13.5 What Measuring Found
- 13.6 Converge Compares the Look with the Words
- 13.7 Before and After
- 13.8 The Same Commands in Claude Code
- 13.9 What a Spec Can and Cannot Say About Taste
- 13.10 Summary
- Chapter 14: What the Method Cost and What It Bought
- 14.1 The Numbers
- 14.2 What Each Phase Caught
- 14.3 What No Phase Caught
- 14.4 Two Weaknesses of This Build
- 14.5 When to Use the Method
- 14.6 Adapting the Method
- 14.7 Summary
- Chapter 12: A Feature Built Live: Card Labels
- Assessments
- Further Reading
- Index
- Errata and Updates
Spec-Driven UI Development with AI
Building a Real App with GitHub Spec Kit and Claude Code
An AI agent builds fast and decides silently. Write the spec first, then check the code against it, on a real app built phase by phase.
Minimum price
$7.00
$9.00
You pay
Author earns
Buying multiple copies for your team? See below for a discount!
About
About the Book
AI coding agents can build working software from a sentence, and that is both their strength and their risk. Everything the sentence leaves out, the agent decides for you, and the decisions are recorded only in the code. Spec-driven development writes those decisions down first, in documents short enough to review, so the code can be checked against them afterward.
This book teaches the method by doing it, end to end, on one small web application: a task board built with Lit, Vite and Vitest. You follow it through every Spec Kit phase (specify, clarify, plan, tasks, analyze, implement and converge), and you see what each phase wrote, what it caught, and what it missed. Every specification, plan, task list, test and mistake in the book comes from that build, and the mistakes are left in the text because they are the instructive part.
Who it is for
Frontend developers who already use, or want to use, an AI coding agent for real work, and who have noticed that the result is fast to produce and hard to trust. You should be comfortable with JavaScript, HTML and the browser's developer tools. You do not need experience with Lit, Vite or Vitest, and you do not need any background in formal specification. Team leads and reviewers will find the method useful from the other side: it produces documents you can review in minutes instead of diffs whose intent you have to reconstruct.
What you will learn
- Why a prompt makes a poor specification, and what a spec is in this method
- How to install GitHub Spec Kit for Claude Code, including three setup failures and what each reveals
- How to write a constitution: the rules every later phase is checked against
- How to write a specification with user stories, acceptance scenarios, requirements, success criteria and edge cases
- How clarify, plan, tasks and analyze catch problems before any code exists
- How to implement test-first with an agent, with every failing run shown
- How converge finds the gaps in a feature whose tasks are all done
- How to specify a feature that uses a language model, with an evaluation set in place of exact output
- How to specify how an application looks, as rules a test can fail
- What the method cost, what it caught, and when it is not worth using
Team Discounts
Team Discounts
Get a team discount on this book!
Up to 3 members
- Minimum price
- $17.00
- Suggested price
- $22.00
Up to 5 members
- Minimum price
- $28.00
- Suggested price
- $36.00
Up to 10 members
- Minimum price
- $49.00
- Suggested price
- $63.00
Up to 15 members
- Minimum price
- $70.00
- Suggested price
- $90.00
Up to 25 members
- Minimum price
- $105
- Suggested price
- $135
Author
About the Author
Sandeep Kumar Patel is a senior web developer with more than 17 years of experience building web applications in object-oriented JavaScript and JSON. In 2012 he founded tutorialsavvy, a programming blog that developers have been reading ever since.
He is GATE-2005 Information Technology (IT) qualified and holds a Master's degree from VIT University, Vellore.
Contents
Table of Contents
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.