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

Build Claude Code agents that survive production, then use the same evidence-first discipline to modernize legacy systems safely. This two-book bundle takes you from tools, MCP, evals, observability, and cost controls to characterization tests, golden masters, differential testing, cutover, and rollback.
Bought separately
$70.99
Minimum price
$29.00
$59.00
About the Bundle
Two practical Claude Code books for engineers responsible for production systems.
Claude Code: Building Production Agents That Actually Scale explains how to build and operate reliable AI agents using tools, hooks, MCP, permissions, evals, observability, multi-agent workflows, and cost controls.
Claude Code for Legacy Modernization applies the same production discipline to old systems that are difficult to understand and dangerous to change. It covers evidence recovery, characterisation testing, golden masters, differential comparison, safe cutover, rollback, and decommissioning.
Together, the books cover both sides of production engineering with Claude Code: building new agent systems that can be trusted and modernising existing systems without losing the behaviour the business depends on.
About the Books
Modernize the system without guessing what it does
Legacy modernization rarely fails because a team cannot generate enough new code. It fails because nobody can prove which behavior matters, who still depends on it, or whether a replacement is safe to operate.
Claude Code for Legacy Modernization is a practical field handbook for changing critical systems without pretending that the repository is a complete specification. It shows you how to recover hidden business rules, reconstruct runtime behavior, identify unknown consumers, and turn those findings into evidence that engineers and decision owners can review.
The method follows one bounded modernization slice from discovery to retirement.
You will learn how to:
recover business rules from code, data, runtime flows, side effects, and operational knowledge; establish a trustworthy baseline before asking AI to change anything;
build characterization tests, reviewed golden masters, contract tests, invariants, and differential comparisons;
find or introduce a safe implementation seam;
create a reversible strangler path;
compare legacy and replacement behavior before cutover;
define acceptance criteria and rollback triggers in advance;
cut over under named human authority;
measure accepted outcomes and retire the old path without losing the evidence trail.
Claude Code assists with repository discovery, test preparation, bounded implementation, old-and-new comparison, contradiction checks, and evidence assembly. It does not decide which behavior is correct or authorize a production change. Architects, domain owners, security reviewers, and operational leaders keep those decisions.
The book follows Northstar Settlements, a fictional financial-services system, through a complete modernization thread. The companion lab lets you reproduce the baseline, inspect the legacy behavior, run the tests, expose an intentional replacement mismatch, and complete the exercises in your own branch.
What is included
Companion lab
This book is for software engineers, architects, technical leads, quality engineers, and platform or operations professionals responsible for systems that are valuable, difficult to understand, and dangerous to change.
### Continue with the companion guides
Need the wider production-agent engineering foundation? Claude Code: Building Production Agents That Actually Scale covers tools, MCP, hooks, permissions, evals, observability, cost engineering, and multi-agent operations.
Need both books? The Claude Code Production Engineering bundle combines that production-agent guide with this complete legacy-modernization handbook.
A Best-Selling Book on LeanPub for weeks since releasing. A mandatory guide for building Claude production AI agents.
This is a Claude Code production agents book for engineers who need agents that can run with tools, permissions, MCP servers, evals, observability, and cost controls in real systems.
Most Claude Code tutorials stop at "hello world." This book covers what happens after that: when your agent needs to run reliably in production, at scale, in environments where failure has real consequences.
Written by an AI engineer who builds Claude Code agent systems for regulated financial institutions, it walks through the full production stack.
Part I covers the agent loop, context management, and model selection.
Part II builds the primitive layer: tools, hooks, skills, MCP servers, and plugins.
Part III bridges the CLI to the Claude Agent SDK, covering the dispatch loop, session management, and tool registration for headless deployment. Part IV tackles governance: permissions, sandboxing, secrets, audit trails, and managed settings.
Part V covers evals, LLM-as-judge patterns, observability, cost engineering, and failure modes.
Part VI puts it together with team workflows, deployment patterns, multi-agent orchestration, and a full walkthrough of Anthropic's open-source financial services reference agents (the production-grade agent templates Anthropic released in May 2026).
Thirty-one chapters, five practical appendices (including a ninety-day production-readiness checklist, an eval starter kit, and an MCP server audit template), and code extracted from production systems.
If you are a senior AI engineer, technical lead, or architect evaluating Claude Code for production use, this is the reference that will save you months of trial and error.
Continue with the companion guides
Modernizing a difficult existing system? Claude Code for Legacy Modernization turns the production disciplines in this book into an evidence-led method for discovery, characterization testing, reversible migration, and controlled cutover.
Need both books? The Claude Code Production Engineering bundle combines this production-agent guide with the complete legacy-modernization handbook.
Responsible for security approval, architecture governance, or production risk? Securing Enterprise AI Agents covers bounded autonomy, AgentSecOps, MCP security, secure RAG, evaluation gates, and the controls required when agents can act.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
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.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
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
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.