- Preface
- Part 1: The Contract
- 1. Why Design Systems Break When Agents Arrive
- 2. What a Contract Is: Readable, Instructed, Verifiable
- Part 2: Readable
- 3. Tokens Agents Understand
- 4. Component Inventories
- 5. Feeding Design Tools
- 6. Documentation Written for Models
- Part 3: Instructed
- 7. Rules Files
- 8. Skills as Packaged Design Knowledge
- 9. Scaffolds and Guardrails
- Part 4: Runtime
- 10. The Protocol Landscape: A2UI, MCP Apps and AG-UI
- 11. A Catalog-First Approach
- 12. MCP Apps with a Themed Shell
- 13. Streaming, State and Events with AG-UI
- Part 5: Verifiable
- 14. Static Checks
- 15. Visual and Behavioural Checks
- 16. Agent-in-the-Loop Review
- 17. Governance
- Part 6: Practice
- 18. A Case Study from Prompt to Conformant Screen
- 19. Adopting the Contract in an Existing System
- 20. What Comes Next
- Appendix A: Token Manifest Template and Schema
- Appendix B: Rules File Template
- Appendix C: Conformance Checklist
- Appendix D: Protocol Cheat Sheet: A2UI, MCP Apps and AG-UI
- Assessments
- Glossary
- About the Author
Design Systems as the Agent Contract
Tokens, Rules and Checks That Keep AI Agents On-Brand and Accessible
Your design system was written for people. An AI agent has no colleague to ask, no memory of last week's review, and no instinct for which green is yours. This book gives it the tokens, rules and checks it needs, with working code for every step.
Minimum price
$9.00
$11.00
You pay
Author earns
Buying multiple copies for your team? See below for a discount!
About
About the Book
AI agents are writing your front end. Is your design system ready for them?
Coding agents now generate components, call design tools and render interfaces at runtime. Most design systems were written for people, and they fail quietly when an agent uses them: invented class names, off-token colours, text that disappears in dark mode, layouts that ignore the system's rules. Nobody notices until a reviewer who knows the palette by heart happens to look.
Design Systems as the Agent Contract shows how to turn a design system into a contract with your agents. The contract has three obligations: it must be readable, so an agent can find and understand every token and component; it must instruct, so the agent gets the rules before it writes code; and it must be verifiable, so you can prove that what the agent produced follows the system.
What you will learn
- Write role-based tokens, a token manifest and a component inventory that agents can read, and export them to the Design Tokens format and to design tools
- Write rules files, skills, codemods and lint presets that steer coding agents toward the system
- Let agents render interfaces at runtime with A2UI, MCP Apps and AG-UI, constrained to your components
- Catch violations with static checks, rendered checks (brand coverage, contrast, accessibility, focus) and judge-based review
- Version the contract, deprecate safely, measure drift, and follow a 90-day plan for adopting the contract in an existing codebase
Every technique is demonstrated on Tessera, a small original reference design system, with runnable code for each chapter. This is a method book, not a model benchmark: no AI model was run for it. Agent output in the examples is hand-written and labelled as such, the model judge is a stub, and every check, script and measurement shown was run against that code, so you can point the same harness at your own agents.
Who this book is for
Front-end engineers, design-system maintainers, engineers building agent products with generative UI, and engineering leads who set policy for coding agents. You need to be comfortable with HTML, CSS and a component-based front-end framework. No machine-learning background is required.
Team Discounts
Team Discounts
Get a team discount on this book!
Up to 3 members
- Minimum price
- $22.00
- Suggested price
- $27.00
Up to 5 members
- Minimum price
- $36.00
- Suggested price
- $44.00
Up to 10 members
- Minimum price
- $63.00
- Suggested price
- $77.00
Up to 15 members
- Minimum price
- $90.00
- Suggested price
- $110
Up to 25 members
- Minimum price
- $135
- Suggested price
- $165
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.