Chapter 1: Why Lean, why now?
The chapter introduction explains why more code and faster tools do not necessarily improve delivery, and presents Lean as a developer-focused way to improve the whole system of work.
After this chapter you will be able to
- Code output versus delivery outcomes. Explain why shipping more code, including with AI assistance, does not necessarily make software delivery faster or less painful.
- Developer focused Lean thinking. Describe Lean here as a way for developers to identify user value and waste and improve how work moves through the delivery system.
- Shifting delivery constraints. Explain why AI and automation can make code faster to produce without making features faster to deliver. Describe how understanding, validating, integrating, and maintaining code become the constraints.
- Systemic sources of friction. Describe why slow delivery or declining quality may reflect the delivery system rather than an individual developer or tool. Explain how coordination, pipelines, and feedback create work beyond the code itself.
- Upstream quality decisions. Explain how implicit architectural or quality expectations cause rework when discovered in review, and how making standards clear earlier can shape work before review. Distinguish reducing rework from merely moving decisions earlier.
- Enduring value in software. Explain why software value is the capability users gain over time, not the amount of code or number of features delivered. Describe why that capability must remain correct, usable, reliable, and maintainable in production.
- Visible software value stream. Describe the software value stream as the path from idea to running system and explain why teams need to make its less-visible queues and delays explicit.
- Reliable flow to users. Explain flow as the steady, predictable movement of changes through the software value stream, and describe why faster code creation alone may not improve it.
- Demand and capacity driven pull. Distinguish starting software work in response to real demand and available capacity from pushing more work downstream, and explain the cost of unfinished work.
- Perfection through system improvement. Explain why pursuing perfection means continuous improvement rather than flawless software, and describe how teams should respond to build breaks, incidents, rework, or delays.
- Visible delivery flow breakdowns. Explain why a delivery problem should be examined as a breakdown in how work flows, not just as an immediate symptom, and describe the Lean principles the section connects to such breakdowns.
- Missing context in AI refactoring. Explain why a clean, tested AI refactor still caused production regressions: the agent followed its instructions, but those instructions did not capture important architectural, domain, performance, and operational constraints.
- Explicit constraints and earlier feedback. Describe the Lean response to the failed refactor: make relevant quality constraints explicit before work starts and validate them before production, rather than treating clean, working code as the whole of value.
- Completion criteria for in-flight work. Explain why the section treats accumulating dead code as a work-in-progress problem and describe the suggested ways to make completion clearer.
- Production readiness and completion. Explain why a feature with working endpoints, passing tests, and healthy dashboards may still be unfinished. Describe how Lean expands “done” to account for operating, scaling, and changing the service.
- Continuous software delivery cycle. Explain why software delivery is a cycle rather than a linear sequence: feedback from testing, production, users, or a changing understanding of the problem can send apparently complete work back for revision.
- Loop based bottleneck diagnosis. Apply the delivery-loop model to locate where a delay or defect arises, then describe how Lean questions can guide a fitting improvement. Explain why the API endpoint's long delivery time is presented as a system problem rather than an individual's failure.
- Delivery work loop. Trace how the notification-preferences feature moved from intent through code, build and test, review, staging, and production, then fed what the team learned back into intent. Describe how gaps surfaced at different stages and caused waiting or rework.
- Systemwide delivery improvement. Explain why generating the code faster would not have prevented the scenario’s delays and failures. Distinguish a local speed gain from an improvement that shortens or stabilizes the delivery loop.
- System-focused Lean questions. Explain how Lean questions guide engineering judgment by asking why the delivery system allowed waste, rather than who was at fault.
- Value flow and pull. Describe what the value, flow, and pull questions reveal in the feature-delivery scenario.
- Early defects and learning. Explain what the quality and learning questions reveal about the late-discovered defects and the rollback.
- Principles and system enablers. Explain how Lean principles become useful through concrete actions and system enablers, rather than remaining good intentions.
- Entry criteria before coding. Explain how Value & Pull keeps work from entering the code stage before the architectural approach, test environment, and acceptance criteria are clear.
- Encoded architectural constraints. Describe how encoding the event sourcing pattern and other architectural constraints guides implementation before review and prevents a rewrite.
- Earlier test failure signals. Explain how production-like integration data and pre-staging load tests move migration and performance failures earlier in the delivery loop.
- Incident learning loop. Describe how a blameless retrospective turns each production incident into an earlier, preferably automatic check.
- Systemic delivery improvement. Justify why the improved outcome for the next similar feature is attributed to the delivery system rather than greater talent, effort, or better tools.
- Principles across the delivery loop. Explain why the five Lean principles should be applied throughout the delivery loop rather than assigned to isolated steps.
- Systemic sources of friction. Explain why the section treats modern software challenges as system problems and what Lean offers in response.
- Observation before transformation. Describe how teams begin improving deliberately through observation and consistent small changes rather than wholesale replacement.
Section by section
Introduction
The chapter introduction explains why more code and faster tools do not necessarily improve delivery, and presents Lean as a developer-focused way to improve the whole system of work.
- Code output versus delivery outcomes: Explain why shipping more code, including with AI assistance, does not necessarily make software delivery faster or less painful.
Why it matters: Speeding up coding alone may leave the delays that determine when users receive value untouched. - Developer focused Lean thinking: Describe Lean here as a way for developers to identify user value and waste and improve how work moves through the delivery system.
Why it matters: This definition keeps improvement tied to user value and the work developers actually do. - End to end improvement scope: Distinguish Lean’s end-to-end delivery focus from optimizing code alone or managing process away from the work, and explain how it relates to Agile and engineering fundamentals.
Why it matters: Improving the whole path to users addresses friction that cleaner code or distant process management alone may miss.
Key terms: lead times, rework, systemic slowdowns, AI coding assistants, Lean thinking, value, waste, flow, delivery system, end-to-end delivery system
1.1 Persistent friction in modern coding
This section explains why faster code creation can coexist with persistent delivery friction, and why teams need to examine the whole delivery system.
- Shifting delivery constraints: Explain why AI and automation can make code faster to produce without making features faster to deliver. Describe how understanding, validating, integrating, and maintaining code become the constraints.
Why it matters: Producing more code will not necessarily improve delivery if the rest of the system cannot absorb it. - Systemic sources of friction: Describe why slow delivery or declining quality may reflect the delivery system rather than an individual developer or tool. Explain how coordination, pipelines, and feedback create work beyond the code itself.
Why it matters: Looking across the delivery system helps reveal friction that a code repository or individual productivity measure may miss. - Upstream quality decisions: Explain how implicit architectural or quality expectations cause rework when discovered in review, and how making standards clear earlier can shape work before review. Distinguish reducing rework from merely moving decisions earlier.
Why it matters: Making expectations explicit early can prevent work from reaching review only to be rewritten.
Key terms: software development lifecycle (SDLC), constraints, AI-assisted development, feedback loops, handoff, persistent friction, human judgment moves upstream, standards, rework, invisible queues
1.1.1 What does “Lean” mean for code?
This section translates five Lean manufacturing principles into software development, shifting attention from code output to how reliably a delivery system creates lasting user value.
- Enduring value in software: Explain why software value is the capability users gain over time, not the amount of code or number of features delivered. Describe why that capability must remain correct, usable, reliable, and maintainable in production.
Why it matters: It gives you a way to judge a change by its lasting benefit rather than its output volume. - Visible software value stream: Describe the software value stream as the path from idea to running system and explain why teams need to make its less-visible queues and delays explicit.
Why it matters: Seeing the whole path exposes delays that improving coding alone would miss. - Reliable flow to users: Explain flow as the steady, predictable movement of changes through the software value stream, and describe why faster code creation alone may not improve it.
Why it matters: A faster coding step does little good when changes pile up before reaching users. - Demand and capacity driven pull: Distinguish starting software work in response to real demand and available capacity from pushing more work downstream, and explain the cost of unfinished work.
Why it matters: Matching starts to capacity reduces the burden of work that cannot yet be reviewed or delivered. - Perfection through system improvement: Explain why pursuing perfection means continuous improvement rather than flawless software, and describe how teams should respond to build breaks, incidents, rework, or delays.
Why it matters: Recurring problems become opportunities to improve the system that produces and sustains code.
Key terms: value, capability, enduring value, value stream, SDLC, work queues, flow, decision bottlenecks, confidence gaps, pull
1.1.2 Making the delivery system visible
The section frames software delivery problems as breakdowns in flow that Lean principles can make visible and help prevent or mitigate.
- Visible delivery flow breakdowns: Explain why a delivery problem should be examined as a breakdown in how work flows, not just as an immediate symptom, and describe the Lean principles the section connects to such breakdowns.
Why it matters: Looking beyond the immediate symptom helps reveal delivery problems early enough to address them.
Key terms: implicit constraints, work in progress, full value stream, feedback loops
1.1.3 Scenario 1: Refactoring with an AI agent
An AI refactoring scenario shows how faster code changes can create rework when important constraints are left implicit and feedback arrives only in production.
- Missing context in AI refactoring: Explain why a clean, tested AI refactor still caused production regressions: the agent followed its instructions, but those instructions did not capture important architectural, domain, performance, and operational constraints.
Why it matters: A refactor can look successful at review while failing against constraints the team never made explicit. - Explicit constraints and earlier feedback: Describe the Lean response to the failed refactor: make relevant quality constraints explicit before work starts and validate them before production, rather than treating clean, working code as the whole of value.
Why it matters: Earlier checks can reveal production-relevant problems before they turn into rollback and rework.
Key terms: AI agent, architectural assumptions, domain boundaries, operational constraints, intent, Lean perspective, architectural fitness functions, decision records, load testing, definition of done
1.1.4 Scenario 2: Long-lived context windows and dead code paths
This section shows how an extended AI-assisted coding session can leave dead code behind and frames the problem as unfinished work that needs clearer completion criteria.
- Dead code and lost coherence: Explain how changing assumptions during a multi-day AI-assisted session can leave abandoned code paths in the codebase, even when tests pass, and why that makes future changes riskier.
Why it matters: Passing tests may not reveal code that the team no longer intends to use or maintain. - Completion criteria for in-flight work: Explain why the section treats accumulating dead code as a work-in-progress problem and describe the suggested ways to make completion clearer.
Why it matters: A clear definition of done can prevent leftover code from becoming a continuing maintenance burden.
Key terms: AI-assisted development session, dead code, coherence, work-in-progress (WIP), completion criteria, done, cognitive overhead
1.1.5 Scenario 3: The illusion of completion
This section shows how an AI-generated feature can appear finished while hiding production costs, and argues for a broader definition of value and done.
- Production readiness and completion: Explain why a feature with working endpoints, passing tests, and healthy dashboards may still be unfinished. Describe how Lean expands “done” to account for operating, scaling, and changing the service.
Why it matters: A feature that is quick to deliver can still impose substantial costs on the people who own it in production. - Shared delivery failure pattern: Describe the pattern the section identifies across its scenarios: output is easy to produce, while feedback arrives late and responsibility is spread across people, tools, and automation.
Why it matters: Seeing the shared pattern shifts attention from individual effort to how work moves through the delivery system.
Key terms: definition of value, full value stream, production readiness, technical debt, feedback, responsibility, delivery system
1.2 From idea to delivered feature in a modern system
This section presents software delivery as a feedback loop and shows how its stages and a Lean lens help diagnose delays as system problems.
- Continuous software delivery cycle: Explain why software delivery is a cycle rather than a linear sequence: feedback from testing, production, users, or a changing understanding of the problem can send apparently complete work back for revision.
Why it matters: Treating delivery as a cycle makes revisions and feedback part of the work, not exceptions to it. - AI acceleration and human ownership: Distinguish what AI changes in delivery from what it does not: it makes producing code, tests, and alternatives cheaper, while people still shape intent, set standards, validate work, and own production outcomes.
Why it matters: Faster creation is useful only if the work still meets the need and someone remains accountable for its outcome. - Loop based bottleneck diagnosis: Apply the delivery-loop model to locate where a delay or defect arises, then describe how Lean questions can guide a fitting improvement. Explain why the API endpoint's long delivery time is presented as a system problem rather than an individual's failure.
Why it matters: Finding the point of friction helps a team choose a relevant improvement instead of blaming people or treating every delay alike.
Key terms: software delivery system, intent, execution, validation, learning, AI, alignment, ownership, delivery loop, bottleneck
1.2.1 Loop 1: The work loop
The section traces a feature through the software-delivery work loop and shows why faster code generation alone does not resolve delivery delays, defects, or rework.
- Delivery work loop: Trace how the notification-preferences feature moved from intent through code, build and test, review, staging, and production, then fed what the team learned back into intent. Describe how gaps surfaced at different stages and caused waiting or rework.
Why it matters: Following the whole loop makes delays and rework visible beyond the coding step. - Systemwide delivery improvement: Explain why generating the code faster would not have prevented the scenario’s delays and failures. Distinguish a local speed gain from an improvement that shortens or stabilizes the delivery loop.
Why it matters: Speeding up one step may leave the delays and failures that govern overall delivery untouched.
Key terms: work loop, Software Development Lifecycle (SDLC), Intent, Code, Build/Test, Review, bottlenecks, alignment, validation, feedback
1.2.2 Loop 2: The Lean lens
The section applies five Lean questions to a troubled feature delivery, using them to locate waste in the system rather than blame individuals.
- System-focused Lean questions: Explain how Lean questions guide engineering judgment by asking why the delivery system allowed waste, rather than who was at fault.
Why it matters: It keeps a team focused on improving how work gets delivered, not finding someone to blame. - Value flow and pull: Describe what the value, flow, and pull questions reveal in the feature-delivery scenario.
Why it matters: These questions expose why substantial coding activity did not translate into smooth delivery of user value. - Early defects and learning: Explain what the quality and learning questions reveal about the late-discovered defects and the rollback.
Why it matters: Finding defects earlier and changing the recurring pattern prevents the next feature from suffering the same setbacks.
Key terms: Lean lens, engineering judgment, systemic improvement, Value, Flow, Pull, waste, Quality, Learning, defect in intent
1.2.3 Principles in action
The section shows how a team turns Lean principles into concrete work practices and system enablers that make those practices consistent.
- Principles and system enablers: Explain how Lean principles become useful through concrete actions and system enablers, rather than remaining good intentions.
Why it matters: It connects a principle to a change the team can actually sustain. - Value and pull entry conditions: Describe how the team prevents false starts by checking whether work is ready before implementation, and how it makes those checks visible.
Why it matters: Clear entry conditions keep the team from starting work that is not ready to succeed. - Review queue flow: Explain how the team reduces PR review delays and supports the practice with small changes and visible queue signals.
Why it matters: A review habit works better when changes are manageable and waiting work is visible. - Earlier test feedback: Describe how realistic test data and automated load tests move failures earlier than production.
Why it matters: Realistic, automatic checks reveal problems before they become production failures. - Explicit architectural constraints: Explain how the team makes its event-sourcing constraint available before coding and checks violations automatically.
Why it matters: Making constraints discoverable and enforceable prevents avoidable rework in review. - Incident driven learning: Trace how the team turns production incidents into preventive system changes.
Why it matters: Learning from an incident has more effect when it produces a tracked preventive check.
Key terms: system enablers, work loop, waste, value and pull, acceptance criteria, PR template, entry criteria, flow, review queue, PR size
1.2.4 Putting it all together: Principles as cross-cutting forces
The section maps five Lean interventions onto the software delivery loop and shows how making constraints explicit, catching problems earlier, and learning from incidents improved delivery.
- Entry criteria before coding: Explain how Value & Pull keeps work from entering the code stage before the architectural approach, test environment, and acceptance criteria are clear.
Why it matters: A clear starting point can prevent a feature from needing to be started over. - Encoded architectural constraints: Describe how encoding the event sourcing pattern and other architectural constraints guides implementation before review and prevents a rewrite.
Why it matters: Finding an architectural mismatch before coding avoids expensive rework. - Earlier test failure signals: Explain how production-like integration data and pre-staging load tests move migration and performance failures earlier in the delivery loop.
Why it matters: Realistic checks make failures visible before they disrupt later delivery stages or production. - Incident learning loop: Describe how a blameless retrospective turns each production incident into an earlier, preferably automatic check.
Why it matters: An incident can improve the delivery system for the next feature, not just resolve the current one. - Systemic delivery improvement: Justify why the improved outcome for the next similar feature is attributed to the delivery system rather than greater talent, effort, or better tools.
Why it matters: Improving the conditions under which everyone works can change delivery outcomes without asking people simply to work harder.
Key terms: Value & Pull, entry criteria, Intent → Code, Quality, event sourcing pattern, architectural constraints, Code → Build & Test, Flow, production-like data volumes, legacy schemas
1.2.5 A flexible, holistic model
The section shows how five Lean principles apply across the entire delivery loop, giving teams a system-level way to question delays, readiness, quality, and value.
- Principles across the delivery loop: Explain why the five Lean principles should be applied throughout the delivery loop rather than assigned to isolated steps.
Why it matters: A system-wide view helps you see whether a change improves delivery or merely moves waste elsewhere. - Value at every phase: Explain how the value principle applies beyond deciding what to build, using an example from testing, deployment, or observability.
Why it matters: Work that looks productive within one phase may not improve what users ultimately receive. - Flow and accumulating delays: Describe how flow applies throughout the loop and why queues and delays matter.
Why it matters: Looking beyond coding time exposes waiting that slows the entire delivery loop. - Pull and readiness signals: Explain how pull uses clear readiness signals at transitions throughout the delivery loop.
Why it matters: Readiness signals keep work from being pushed forward—or restarted—without a reason grounded in its current state. - Quality built into phases: Describe how quality extends beyond code checks and why it should be built in at each phase.
Why it matters: Problems prevented early need not become defects discovered later in delivery or production. - Continuous learning across phases: Explain how recurring problems in any phase can guide continuous improvement, not just learning after incidents.
Why it matters: Repeated problems become useful signals for improving the delivery system before the next failure.
Key terms: Lean principles, delivery loop, holistic system, Value, lasting user capability, local optimization, Flow, review queues, feedback, waste
1.3 Your lean journey ahead
The section frames Lean as a way to observe complex software delivery systems and improve them steadily while respecting the people doing the work.
- Systemic sources of friction: Explain why the section treats modern software challenges as system problems and what Lean offers in response.
Why it matters: It shifts the question from whether people are trying hard enough to how the delivery system behaves. - Observation before transformation: Describe how teams begin improving deliberately through observation and consistent small changes rather than wholesale replacement.
Why it matters: Seeing the work and its constraints gives teams a basis for improvement without blaming people or overhauling everything at once. - Human limits in system design: Explain why Lean improvement must account for people's finite attention, judgment, and capacity to learn.
Why it matters: An improvement is less useful if it demands more human attention and judgment than people can sustain.
Key terms: Lean, complexity, value, observe, constraints, waste, small changes, attention, judgment, learning
1.4 Summary
Where this is used later
- Where AI creates waste (chapter 3) · Provides the introductory reason to examine waste created by AI.
- Value-adding versus non-value-adding work (chapter 2) · Examines value-adding and non-value-adding work in more detail.
- Understanding flow, from idea to production (chapter 6) · Examines flow from idea to production.
- Establishing your AI standard work (chapter 3) · Establishing AI standard work builds on making expectations explicit before generation.
- Spec first: Define before you build (chapter 4) · Defining intent before building builds on the cost of discovering expectations late.
- User value (chapter 2) · Develops the idea of value provided to users.
- Limiting work in progress (chapter 6) · Develops limiting work in progress as a way to improve flow.
- What Kaizen actually means (chapter 10) · Develops continuous improvement as Kaizen.
Concepts explained in this chapter
- flowA Lean principle of moving work continuously by reducing queues, delays, and interruptions.
- valueThe benefit users receive from software that meets their needs through usable, reliable behavior.
- lean principleA management and process-improvement philosophy focused on maximizing customer value, reducing waste, improving flow, and learning continuously.
- learning principleA Lean principle of using feedback, operational experience, and failures to improve the delivery system.
- pull modelA Lean principle in which work is started in response to readiness or actual demand rather than being pushed into the system prematurely.
- continuous improvementA feedback loop is a process in which information about outcomes is returned to influence subsequent decisions or actions.
- load testingTesting that evaluates system behavior and performance under a specified workload.
- qualityThe degree to which software satisfies its requirements and is free from defects.
- work in progressWork in progress is the quantity of work that has been started but not yet completed in a process.
- reworkRework is the additional engineering effort required to revise or redo work because it does not satisfy newly discovered or changed requirements.
- blameless postmortemA blameless retrospective is a structured review of an incident that focuses on system conditions and improvements rather than individual fault.
- entry criterionAn entry criterion is a condition that work must satisfy before implementation begins.
- integration testA test that verifies interactions among software components or between software and an external system.
- quality principleA Lean principle of building correctness and defect prevention into work rather than relying on later inspection.
- value and pull principleThe value and pull principle is a Lean principle that starts work only when its value and readiness are sufficiently established.
- wasteWork that creates no customer value and can be eliminated without harming delivery or its outcomes.
- value streamA value stream is the complete sequence of activities and handoffs through which work produces an outcome for a customer or user.
- delivery loopA software-delivery model that cycles from intent through coding, building and testing, running, and observing back to intent.
- software deliverySoftware delivery is the process of moving software from intent through implementation and validation to usable outcomes.
- AI assistanceAI-assisted development is software development in which artificial-intelligence systems support activities such as coding, design, testing, or documentation.
- constraintA condition or limitation that restricts how work can proceed within a delivery system.
- delivery systemA delivery system is the interconnected set of people, tools, automation, and processes through which work moves from creation to operational outcome.
- perfectionIn Lean, an unattainable ideal represented by continuously reducing defects and waste through systematic improvement.
- pipelineA sequence of stages through which a software change moves during delivery or deployment.
- precommit hookA pre-commit hook is an automated check that runs before a version-control commit is created.
- intentThe desired outcome, requirements, and rationale that guide software implementation.
- lean lensA perspective for analyzing software delivery in terms of value, flow, pull, quality, and learning.
- artificial intelligenceArtificial intelligence is the field of computational methods that perform tasks associated with human perception, reasoning, learning, or goal-directed action.
- technical debtTechnical debt is the future cost created by implementation choices that make a system harder, riskier, or more expensive to change or operate.
- architecture decision recordAn architecture decision record is a concise document that records an architectural decision, its rationale, and its consequences.
- refactoringRefactoring is the restructuring of existing software without changing its externally observable behavior.
- acceptance criteriaVerifiable conditions that an output or implementation must satisfy to be considered acceptable.
- cycle timeThe elapsed time required for work to move through a production or delivery process.
- throughputThe rate at which completed work passes through a production or delivery system.
- flaky testA test whose result is nondeterministic despite unchanged software and test inputs.
- feedbackInformation about the effects or results of work that can guide subsequent decisions or changes.
- runbookA runbook is a documented set of operational procedures for diagnosing, mitigating, or recovering from known system conditions.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
