Chapter 3: AI as a partner and problem
The chapter introduction shows how AI can speed up useful work or quietly introduce unchosen business rules, and frames Lean thinking as a way to distinguish the two.
After this chapter you will be able to
- Unchosen AI-generated business rules. Explain how an AI-generated implementation can pass tests and review yet introduce business behavior nobody intended or approved.
- AI amplification of value and waste. Explain why faster AI-assisted production does not, by itself, mean more value.
- Intent behind AI output. Describe what to examine in AI-assisted work beyond the apparent quality of its output.
- AI peer metaphor problem. Explain why calling an AI coding assistant a teammate, pair programmer, or junior developer can be misleading: it frames AI as a peer and places the human inside the execution flow rather than above it.
- Lost system perspective. Explain why a developer who mainly reviews, edits, clarifies, or approves AI-assisted work may lose sight of the development system as a whole. Describe the value, flow, waste, and need-for-change questions that become harder to see.
- Human oversight of AI work. Explain how being above the loop differs from participating in execution: the human designs and observes the system rather than acting as another step, and pays attention to flow as well as the immediate code.
- Explicit intent and output boundaries. Describe how the two GET /orders/:id prompts differ, and how the developer decides whether AI’s output meets the intended result or needs another iteration.
- Human judgment above the loop. Explain the difference between AI executing tasks within the development loop and humans working above it. Describe why treating generated code as authoritative reduces the human role to reactive review rather than intentional design.
- Displaced work from implicit intent. Explain how removing human judgment when work is created can shift work to people later rather than eliminate it. Describe the waste caused when they must reconstruct the original intent.
- Human control of AI. Explain why developers should treat AI as a power tool rather than a worker or an equal decision-maker, and how that positioning affects waste and flow.
- Lean criteria for AI delegation. Explain why faster code production alone does not make AI valuable in a Lean system, and describe the kinds of necessary work that are good candidates for AI assistance.
- Human intent before generation. Explain how explicit intent and a human-defined API contract constrain useful AI assistance in the example.
- Speed versus useful feedback. Distinguish the team's initial use of AI for full implementations from its later use to shorten the time between a developer's decision and feedback.
- Contract-based handler scaffold. Describe how the team prompts AI for a minimal handler scaffold and why its temporary 501 response differs from the contract's 200 and 404 responses.
- Failing contract-derived tests. Trace how AI-generated test scaffolding supports test-driven development without replacing the developer's implementation work.
- Effort without surrendered judgment. Explain how AI can remove mechanical work while developers retain responsibility for the API’s behavior, trade-offs, and definition of done.
- Long-term commitment of outputs. Distinguish generated code that creates ongoing maintenance costs from generated artifacts that can be cheaply regenerated, replaced, or deleted.
- Unconstrained prompts and waste. Explain why a seemingly specific AI prompt can still be vague and how the resulting output creates waste rather than value.
- Unrequested logic in AI output. Explain what happened when the developer asked AI to implement the GET /orders/:id endpoint in one shot, and why the result could look convincing despite exceeding the request.
- Invented logic and downstream waste. Explain how unrequested AI-generated error cases, business rules, and response structures become overproduction and create downstream waste.
- Missing intent in code review. Explain why apparently sound AI-generated pull requests can pass review with waste intact, and how that underuses reviewers’ skills.
- Standard work as baseline. Explain that standard work records the best-known way to do a task under current conditions, providing a stable baseline rather than an inflexible rule.
- AI variability and boundaries. Explain why AI-generated work needs shared standards and describe the kinds of boundaries those standards address.
- Shared AI persona. Explain why the API service team created a shared AI persona and how it changed their use of AI.
- Downstream work test. Describe how the team could shape and evaluate its shared AI guidance.
- Bounded AI responsibility. Explain why teams make AI's role explicit and require a human-authored statement of intent for AI-assisted changes.
- Reversibility based AI use. Distinguish appropriate AI use early in a change from its use when final decisions are being made.
- Learning oriented standards. Distinguish a Lean standard from a compliance rule and explain how a team responds to a deliberate deviation.
- Upstream protection of review flow. Explain how AI standard work protects flow by defining acceptable output before code reaches review, rather than relying on reviewers to catch problems later.
- Lean comparison of AI output. Explain how to compare the versions using ease of explanation, review, ownership, and change, while identifying both waste introduced by AI and genuine benefits.
- Evidence based AI boundaries. Describe how to turn waste observed in the comparison into repeatable constraints for team AI use, and reflect on whether AI reduced effort or increased future commitment.
What it builds on
- Using VA/NVA as a thinking aid (chapter 2) · Using value-adding and non-value-adding work as a thinking aid.
- Value is contextual, not absolute (chapter 2) · Value depends on context rather than an output's appearance alone.
- Value-adding versus non-value-adding work (chapter 2) · The distinction between value-adding and non-value-adding work.
- The eight wastes in software development (chapter 2) · The Lean vocabulary for identifying forms of waste in software development.
- Necessary non-value-adding work (NNVA) (chapter 2) · The distinction between necessary work and work that directly adds value.
- Unnecessary non-value-adding work (chapter 2) · Recognizing avoidable rework as unnecessary non-value-adding work.
- From seeing waste to improving the system (chapter 2) · Looking for waste across the workflow rather than judging only the speed of one activity.
- Inventory (chapter 2) · The idea of inventory as work accumulating in the development system.
Section by section
Introduction
The chapter introduction shows how AI can speed up useful work or quietly introduce unchosen business rules, and frames Lean thinking as a way to distinguish the two.
- Unchosen AI-generated business rules: Explain how an AI-generated implementation can pass tests and review yet introduce business behavior nobody intended or approved.
Why it matters: A plausible implementation can leave the team responsible for a rule it never chose. - AI amplification of value and waste: Explain why faster AI-assisted production does not, by itself, mean more value.
Why it matters: Speed helps only when the work being accelerated is worth doing. - Intent behind AI output: Describe what to examine in AI-assisted work beyond the apparent quality of its output.
Why it matters: Looking at decision origins helps a team benefit from AI without silently adopting its assumptions.
Key terms: business logic, AI output, API contract, value, waste, inventory, assumptions, Lean lenses, intent, scaffolding
3.1 Keeping the human above the loop
Introduces why treating AI as a development peer can misplace the human in the workflow, and defines the value stream used to examine that concern.
- AI peer metaphor problem: Explain why calling an AI coding assistant a teammate, pair programmer, or junior developer can be misleading: it frames AI as a peer and places the human inside the execution flow rather than above it.
Why it matters: How you frame AI's role affects where you place human judgment in the workflow. - Software value stream: Describe the value stream as the end-to-end flow from an idea through requirements, code, a running system, and operation and maintenance to a user outcome. Explain that even steps that do not add value affect delivery.
Why it matters: The value-stream view shows why the effects of a workflow extend beyond writing code.
Key terms: teammates, pair programmers, junior developers, execution flow, above the loop, value stream, intent to outcome, adds value
3.1.1 The problem with being in the loop
The section shows how treating the human as a step in an AI-assisted development loop can hide whether the work creates value or merely produces output.
- Lost system perspective: Explain why a developer who mainly reviews, edits, clarifies, or approves AI-assisted work may lose sight of the development system as a whole. Describe the value, flow, waste, and need-for-change questions that become harder to see.
Why it matters: Doing your part in the loop is not the same as seeing whether the whole system is improving. - Misleading pair programmer productivity: Explain why the 'AI as pair programmer' metaphor can make collaboration feel productive without showing that it improves outcomes. Describe how this appears in what developers can and cannot explain about a feature.
Why it matters: Being able to describe the code you produced does not by itself explain why that work was worth doing.
Key terms: executor, inside the loop, value, inventory, waste, AI as pair programmer, better outcomes, more output, smallest viable step
3.1.2 Positioning the human above the loop
The section explains how a developer can stay above AI-driven execution by setting intent and boundaries, judging outputs, and watching the flow of work.
- Human oversight of AI work: Explain how being above the loop differs from participating in execution: the human designs and observes the system rather than acting as another step, and pays attention to flow as well as the immediate code.
Why it matters: A plausible-looking piece of code is not enough if the way it was produced is creating waste or obscuring decisions. - Explicit intent and output boundaries: Describe how the two GET /orders/:id prompts differ, and how the developer decides whether AI’s output meets the intended result or needs another iteration.
Why it matters: Clear boundaries let you judge AI output against your intent instead of accepting whatever implementation it produces.
Key terms: above the loop, in the loop, flow, inventory, constraints, boundaries, intent, handler skeleton, temporary scaffolding
3.1.3 What this means in practice
This section explains why humans must retain judgment over AI-assisted development while AI executes bounded tasks, and how failing to make intent explicit creates downstream waste.
- Human judgment above the loop: Explain the difference between AI executing tasks within the development loop and humans working above it. Describe why treating generated code as authoritative reduces the human role to reactive review rather than intentional design.
Why it matters: Fast AI output is useful only when human judgment keeps it directed toward worthwhile results. - Displaced work from implicit intent: Explain how removing human judgment when work is created can shift work to people later rather than eliminate it. Describe the waste caused when they must reconstruct the original intent.
Why it matters: Making intent clear early prevents apparently saved effort from becoming someone else's costly investigation later.
Key terms: above the loop, within the loop, value, correctness, sufficiency, intent, decision points, motion, waiting, over-processing
3.1.4 From collaborator to power tool
This section reframes AI as a power tool whose Lean benefits depend on a human retaining control and watching its effects on value, flow, and waste.
- Human control of AI: Explain why developers should treat AI as a power tool rather than a worker or an equal decision-maker, and how that positioning affects waste and flow.
Why it matters: More AI output helps only if a developer can steer it toward value and spot the waste it may create.
Key terms: power tool, human above the loop, value stream, flow, waste, overproduction
3.2 How AI helps you stay lean
The section explains that AI supports Lean development when it reduces effort on necessary, non-differentiating work rather than merely increasing coding speed.
- Lean criteria for AI delegation: Explain why faster code production alone does not make AI valuable in a Lean system, and describe the kinds of necessary work that are good candidates for AI assistance.
Why it matters: It gives you a way to decide whether AI is removing effort or simply producing more waste faster.
Key terms: Lean, value stream, human judgment, boilerplate code, mechanical refactors
3.2.1 The API service example
The API service example shows how a team uses AI to remove setup and review friction while keeping intent, design, and implementation decisions with developers.
- Human intent before generation: Explain how explicit intent and a human-defined API contract constrain useful AI assistance in the example.
Why it matters: Clear intent lets AI speed up feedback without asking it to decide what success means. - Speed versus useful feedback: Distinguish the team's initial use of AI for full implementations from its later use to shorten the time between a developer's decision and feedback.
Why it matters: Faster code generation is not necessarily faster delivery if it creates downstream review and defect work. - Contract-based handler scaffold: Describe how the team prompts AI for a minimal handler scaffold and why its temporary 501 response differs from the contract's 200 and 404 responses.
Why it matters: A constrained scaffold saves setup time without quietly turning AI-generated choices into the design. - Failing contract-derived tests: Trace how AI-generated test scaffolding supports test-driven development without replacing the developer's implementation work.
Why it matters: AI can make the first feedback loop quicker while preserving tests as the guide to implementation. - Intent-first review summaries: Explain how the AI-generated pull-request summary reduces review effort in the API example.
Why it matters: Making incomplete work explicit saves reviewers from guessing what the change is meant to accomplish.
Key terms: intent, API contract, success criteria, Lean lens, mechanical delay, decision to feedback, scaffolding from contracts, handler skeleton, 501 (Not Implemented), TODOs
3.2.2 The Lean principle at work
This section explains how AI supports Lean development by reducing effort and speeding feedback without taking over human judgment or creating costly long-term commitments.
- Effort without surrendered judgment: Explain how AI can remove mechanical work while developers retain responsibility for the API’s behavior, trade-offs, and definition of done.
Why it matters: This distinction lets a team gain speed without giving up control of the result. - Long-term commitment of outputs: Distinguish generated code that creates ongoing maintenance costs from generated artifacts that can be cheaply regenerated, replaced, or deleted.
Why it matters: The time saved generating an output may be outweighed by the work it leaves behind. - Early predictable feedback: Explain why predictable AI assistance that flags issues early can improve flow more than occasional impressive but unreliable results.
Why it matters: Reliable early signals reduce avoidable rework and protect human attention.
Key terms: human judgment, cognitive overhead, responsibility, high commitment, low commitment, generated code, generated artifacts, feedback loops, early feedback, predictable
3.3 Where AI creates waste
The section explains how a prompt that names an activity but leaves its outcome unconstrained can turn AI-generated code into waste.
- Unconstrained prompts and waste: Explain why a seemingly specific AI prompt can still be vague and how the resulting output creates waste rather than value.
Why it matters: A large AI-generated diff can increase your workload without bringing the feature closer to value.
Key terms: vague prompt, constrain the outcome, inventory, value stream
3.3.1 The unconstrained prompt
An underspecified, one-shot AI prompt for an API endpoint can produce polished code that includes unrequested rules and assumptions.
- Unrequested logic in AI output: Explain what happened when the developer asked AI to implement the GET /orders/:id endpoint in one shot, and why the result could look convincing despite exceeding the request.
Why it matters: A polished implementation can make unrequested behavior easy to overlook.
Key terms: unconstrained prompt, invented validation, business rules, assumptions
3.3.2 Breaking down the waste
This section shows how plausible AI-generated code creates multiple forms of waste and why reviews miss that waste when the code’s connection to the original intent is invisible.
- Invented logic and downstream waste: Explain how unrequested AI-generated error cases, business rules, and response structures become overproduction and create downstream waste.
Why it matters: Code that looks thorough can quietly create obligations and failures beyond the original request. - Unrequested abstraction as extra processing: Describe why the generated order-service abstractions count as waste even though they look sophisticated.
Why it matters: Professional-looking architecture is not automatically useful architecture. - Missing intent in code review: Explain why apparently sound AI-generated pull requests can pass review with waste intact, and how that underuses reviewers’ skills.
Why it matters: Review needs the code’s connection to intent, not just evidence that the code looks reasonable.
Key terms: overproduction, inventory, defects, abstraction, indirection, extra processing, value stream context, API contract, lineage to decisions, skills underutilization
3.4 Establishing your AI standard work
The section explains how shared standard work makes AI-assisted development predictable enough to spot deviations and improve.
- Standard work as baseline: Explain that standard work records the best-known way to do a task under current conditions, providing a stable baseline rather than an inflexible rule.
Why it matters: A shared baseline helps the team notice what needs attention instead of treating every variation as normal. - AI variability and boundaries: Explain why AI-generated work needs shared standards and describe the kinds of boundaries those standards address.
Why it matters: Without shared boundaries, individually plausible AI outputs can leave the codebase with inconsistent patterns and needless complexity.
Key terms: standard work, stable baseline, deviations, standard work for AI, variability, human judgment, constraints
3.4.1 What the API service team established
The API service team replaces inconsistent individual AI practices with a shared prompt baseline and judges it by whether it reduces downstream work.
- Shared AI persona: Explain why the API service team created a shared AI persona and how it changed their use of AI.
Why it matters: A common baseline makes AI use less dependent on each developer’s improvised rules. - Downstream work test: Describe how the team could shape and evaluate its shared AI guidance.
Why it matters: The guidance is useful only if it prevents work later, not merely if it produces code.
Key terms: shared AI persona, architectural values and constraints, development-practice needs, downstream work, stable baseline
3.4.2 Making AI boundaries explicit
The section shows how explicit, accessible AI standards keep human responsibility clear while allowing teams to improve their practices as AI changes.
- Bounded AI responsibility: Explain why teams make AI's role explicit and require a human-authored statement of intent for AI-assisted changes.
Why it matters: Explicit ownership prevents AI-generated work from passing downstream without a person explaining its intent. - Reversibility based AI use: Distinguish appropriate AI use early in a change from its use when final decisions are being made.
Why it matters: The cost of reversing a mistake helps determine how much judgment to delegate to AI. - Production code guardrails: Describe the checks required before AI-generated code reaches review and the constraint placed on production-code prompts.
Why it matters: These guardrails keep broken output and invented requirements from creating work for others. - Accessible shared AI standards: Describe where teams put AI standards and how they become part of everyday work.
Why it matters: A standard is more likely to guide decisions when it is easy to find and reinforced in routine review. - Learning oriented standards: Distinguish a Lean standard from a compliance rule and explain how a team responds to a deliberate deviation.
Why it matters: Treating deviations as useful evidence lets AI practices improve instead of freezing them as models and circumstances change.
Key terms: standard work, human-authored statement of intent, bounded, reversibility, scaffolding, final behavior, semantics, contracts, existing tests, review
3.4.3 Standard work as flow protection
AI standard work protects delivery flow by filtering out avoidable variability before AI-generated changes reach review and integration.
- Upstream protection of review flow: Explain how AI standard work protects flow by defining acceptable output before code reaches review, rather than relying on reviewers to catch problems later.
Why it matters: Preventing uncertainty before review avoids stalled changes and rework without giving up AI assistance. - Validation standards and downstream friction: Trace how the form-validation example contrasts an unconstrained AI prompt with one that specifies the team's existing library and standards.
Why it matters: A specified existing pattern lets AI help solve the problem without introducing decisions that stall review.
Key terms: AI standard work, flow protection, upstream filter, review and integration pipeline, form validation, foobar, standards.md, downstream friction
3.5 Exercise: Compare handwritten vs AI-generated code
The exercise compares handwritten and AI-assisted versions of the same small change to reveal how AI affects waste, effort, and where understanding happens.
- Comparable implementation baselines: Describe how to create a fair baseline by implementing one small, realistic change by hand and then reimplementing it with AI assistance, recording the same observations for each.
Why it matters: A comparable baseline helps you judge what AI changed rather than relying on impressions. - Lean comparison of AI output: Explain how to compare the versions using ease of explanation, review, ownership, and change, while identifying both waste introduced by AI and genuine benefits.
Why it matters: AI can save effort in one place while creating work for reviewers or future maintainers. - Evidence based AI boundaries: Describe how to turn waste observed in the comparison into repeatable constraints for team AI use, and reflect on whether AI reduced effort or increased future commitment.
Why it matters: Observed problems can become practical boundaries that preserve AI’s benefits without repeating its waste.
Key terms: baseline, AI coding assistant, Lean criteria, overproduction, inventory, defects, motion, extra processing, standard work, constraints
3.6 Summary
Where this is used later
- Tests as design constraints (chapter 5) · The contract-derived tests are an example of tests constraining implementation.
- The code review (chapter 4) · Reviewers' ability to see intent provides context for code review.
- Design for deletion (chapter 4) · The possibility that AI-created work can produce waste.
- (chapter intro) (chapter 4) · The earlier example of an unconstrained AI prompt producing waste.
- Reflect (chapter 4) · The risks of an unconstrained prompt.
- AI as a dependency generator (chapter 4) · Provides an example of AI introducing unnecessary additions to code.
- Standard work for coding (chapter 4) · Introduces standard work as a way to establish consistent practices.
- AI as a dependency (chapter 4) · Making boundaries for AI use explicit.
Concepts explained in this chapter
- intentThe desired outcome, requirements, and rationale that guide software implementation.
- AI-generated codeSource code produced by an artificial-intelligence system from supplied inputs or instructions.
- standard workA single prescribed method applied across teams regardless of differences in their work contexts.
- wasteWork that creates no customer value and can be eliminated without harming delivery or its outcomes.
- scaffoldA temporary partial implementation that establishes structure while leaving some behavior incomplete or explicitly marked for later work.
- contractAn application programming interface is a defined set of operations and rules through which software components interact.
- inventoryInventory is the waste of work items, information, or decisions that have been started or accumulated but are not yet needed downstream.
- over-processingLean waste caused by doing more work or adding more complexity than is required to deliver the desired outcome.
- AI assistanceAI-assisted development is software development in which artificial-intelligence systems support activities such as coding, design, testing, or documentation.
- ai coding assistantA software tool that uses artificial intelligence to help generate, transform, explain, or review code.
- overproduction wasteLean waste caused by producing more, earlier, or sooner than demand requires.
- flowA Lean principle of moving work continuously by reducing queues, delays, and interruptions.
- constraintA condition or limitation that restricts how work can proceed within a delivery system.
- lean lensA perspective for analyzing software delivery in terms of value, flow, pull, quality, and learning.
- standardA standard is an agreed rule or specification that expresses intended behavior or practice.
- test-driven developmentA development practice in which failing tests are written before implementation and then used to guide code until the tests pass.
- artificial intelligenceArtificial intelligence is the field of computational methods that perform tasks associated with human perception, reasoning, learning, or goal-directed action.
- abstractionA software-design technique that hides implementation details behind a simplified model or interface.
- indirectionAn additional layer of reference or mediation through which software accesses an object, operation, or dependency.
- valueThe benefit users receive from software that meets their needs through usable, reliable behavior.
- business ruleA business rule is a domain-specific requirement that governs decisions, constraints, or behavior in a software system.
- flow protectionAn upstream quality-control technique that prevents defects, variability, and waste from entering a software delivery flow.
- bugA fault in software that can cause incorrect, unreliable, or unintended behavior.
- motion wasteLean waste caused by unnecessary physical or cognitive movement while performing work.
- commitmentA lasting investment in software work or artifacts that makes change, replacement, or deletion costly.
- lean principleA management and process-improvement philosophy focused on maximizing customer value, reducing waste, improving flow, and learning continuously.
- feedbackInformation about the effects or results of work that can guide subsequent decisions or changes.
- templateA prompt template is a reusable instruction structure containing fixed guidance and variable inputs for an AI system.
- value streamA value stream is the complete sequence of activities and handoffs through which work produces an outcome for a customer or user.
- system boundaryA boundary is a separation between system parts, representations, ownership areas, or organizational responsibilities across which information or work passes.
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.
