- Preface
- The Method in One Page
- Part I: Why the Prompt Is Not the System
- The Prompt Is Not the System
- Software Development as Decision Making
- From Prompt Engineering to Context Engineering
- Part II: Context, Authority, Scope, and Feedback
- What Is Context Driven Development?
- The Context Stack
- Authority, Scope, and Conflict
- Minimum Sufficient Authoritative Context (MSAC)
- The Closed Loop
- Part III: Where Intent, Rules, Decisions, and Tasks Live
- The Agent Contract
- Product Context
- Requirements and Acceptance Criteria
- Architecture as Invariants
- Architecture Decision Records
- Engineering Policies
- Language Idioms
- The Task Contract
- Part IV: From Business Intent to Verified Agent Work
- From Business Intent to Agent Task
- Context Selection
- Agent Execution
- Ambiguity and Escalation
- Scope Control
- Verification
- Closing the Loop
- Part V: Turning Constraints into Checks and Evidence
- From Principles to Constraints
- From Constraints to Tests
- The Toolchain as Context Enforcement
- Verified, Inferred, Unknown
- Part VI: A Webhook Intake Case Study
- Case Study: Starting from a Business Problem
- Building the Context
- Implementing a Feature
- When Implementation Challenges the Context
- Evolving the System
- Part VII: Small Projects, Large Repositories, Teams, and Agents
- Small Projects
- Large Repositories
- Legacy Systems
- Teams and Governance
- Multi Agent Development
- Part VIII: Limits and Failure Modes
- When Context Becomes Noise
- When Documentation Lies
- When CDD Becomes Bureaucracy
- What CDD Cannot Solve
- CDD as an Engineering Discipline
- Part IX: How to Start Tomorrow Morning
- How to Start Tomorrow Morning
- Appendix: Templates and Launch Prompts
- Appendix A: Practical Templates
Context Driven Development
Beyond Prompt Engineering: A Systematic Approach to Building Software with AI Agents
Stop asking one giant prompt to carry your whole software system. Context Driven Development teaches you how to give AI coding agents explicit requirements, architecture decisions, constraints, tasks, and verification loops so they can work inside a reliable engineering environment.
Minimum price
$14.99
$24.99
You pay
Author earns
About
About the Book
Most AI assisted software failures do not come from a bad prompt. They come from a weak decision environment.
Context Driven Development is a practical method for building software with AI coding agents by making product intent, requirements, architecture decisions, engineering constraints, task boundaries, and verification evidence explicit.
Instead of asking one large prompt to carry everything, CDD shows how to split the work into durable project context and small, focused agent tasks. The agent does not guess what matters. It reads the selected context, reports what it found, works within clear constraints, runs the expected checks, and feeds durable discoveries back into the source of truth.
This book is for developers, tech leads, architects, technical founders, and engineering managers who want to use AI coding agents on real software without turning their workflow into a pile of fragile prompts.
You will learn how to:
- move from mega-prompts to explicit context
- define an agent operating contract
- separate requirements, architecture decisions, engineering policies, and task instructions
- select the minimum sufficient authoritative context for a task
- handle ambiguity, conflict, and missing decisions before code is written
- constrain agent scope without blocking useful implementation work
- turn natural language rules into verifiable constraints
- use tests, static checks, and completion reports as evidence
- update project context when implementation reveals something durable
The book is tool independent. You can apply the method with Codex, Cursor, Aider, IDE assistants, hosted agents, or even a manual chat workflow. The tool may change. The discipline remains the same.
The case study follows a webhook intake service: a small but realistic problem where correctness depends on idempotency, database constraints, transactional outbox behavior, raw SQL boundaries, and concurrent verification. The example uses Go for implementation sketches, but the context model is language independent.
CDD is not a replacement for good engineering judgment. It is a way to make that judgment visible, reusable, reviewable, and easier for an AI agent to respect.
Feedback
Author
About the Author
I help CTOs and platform teams design, build, and hand over Kubernetes-based platforms that can be understood, operated, and evolved by the teams that own them.
My work sits at the intersection of Go, Kubernetes API machinery, control-plane design, platform engineering, infrastructure automation, and distributed systems.
I am most useful when a team is not only deploying workloads to Kubernetes, but building a product, platform, or control plane on top of it. That is where API shape, controller behaviour, ownership boundaries, and automation design become long-term architecture.
I work through focused architecture discovery, hands-on implementation, design review, documentation, and structured handover.
The objective is to leave behind clearer technical decisions, production-oriented software, explicit ownership boundaries, useful documentation, and a team able to continue without me.
Typical problems I help with:
- Kubernetes APIs, CRDs, and resource lifecycle design
- controllers, reconciliation behaviour, and failure handling
- custom API servers and control-plane components
- Go infrastructure software and automation tooling
- platform architecture that must remain connected to code
- review and simplification of existing platform codebases
- documentation and handover for internal teams.
I also write practical technical material on Kubernetes controllers, client-go, Go services on Kubernetes, SRE workflows, AI platform engineering, and operational context for humans, tools, and AI agents.
Available for selected consulting, fractional, contract, and staff-level engagements.
The best first conversation starts from the engineering problem: what you are building, why it is difficult now, what decisions are hard to reverse, and what the internal team needs to own after the work is done.
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.)
In fact, authors have earned over $15 million writing, publishing and selling 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.