liveBook · Manning

What you will learn in Vibe Engineering

Best practices, mistakes, and tradeoffs

by Tomasz Lelek and Artur Skowroński · Manning Early Access Program (MEAP)

Chapter by chapter

Chapter 1: Building on quicksand: the challenges of vibe engineering

The chapter introduction contrasts the real speed gains of AI-assisted development with the risks of unverified code and argues for an explicit engineering discipline.

1.1 Illusion of speed or “vibe over engineering” · 1.1.1 A startup hacked within days of launch · 1.1.2 A command that erased an entire project · 1.1.3 A pull request that turned into a trojan · 1.1.4 An agent that decided to “clean up” production data · 1.2 The end of scale worship: diminishing returns · 1.3 Two faces of the vibe: coding vs engineering · 1.4 Trust: a new kind of debt · 1.4.1 From intelligent autocompletion to a partner · 1.5 The vibe engineering loop in practice · 1.6 Owning - where judgment begins · 1.7 The beginning of “software engineering” · 1.8 Summary

What you learn in chapter 1 →

Chapter 2: Building a legacy modernization framework powered by Vibe Engineering

The chapter introduces LLM-assisted legacy migration as a way to recover knowledge from unfamiliar code and make understandable, incremental changes.

2.1 Context and application · 2.2 Pre-analysis of the application · 2.2.1 Extracting the bigger picture · 2.2.2 Visualizing with Mermaid · 2.2.3 Deployment models · 2.2.4 Decisions and assumptions · 2.3 Trade-offs: copying the code in place vs a new repo · 2.3.1 A hybrid approach · 2.3.2 Procedure for code increments · 2.4 Testing · 2.4.1 Generate missing tests · 2.4.2 Migrate tightly coupled tests from the old framework · 2.4.3 Mistake of missing steps in the process · 2.5 Production code migration trade-offs · 2.5.1 Applying a minimal set of changes · 2.6 Cleanup stage · 2.7 UI layer migration · 2.7.1 Taking a step back when AI tools did too much · 2.7.2 Trade-off between LLM inferring too much vs too little · 2.7.3 Fixing bugs with AI tools · 2.8 Cleanup - the 2nd stage · 2.8.1 Mistake of overusing LLMs over static code refactoring tools · 2.9 Adding documentation · 2.10 Migrating the persistence layer · 2.10.1 Adding Mongo support · 2.10.2 Improving tests not to require a manual step · 2.11 Conclude with merge pull requests · 2.12 Summary

What you learn in chapter 2 →

Chapter 3: Context fabric: optimizing context for AI agents

The introduction explains why agents often fail because of the context they receive, distinguishes context engineering from prompt engineering, and defines a shared Context Fabric.

3.1 Vibe Coding traps: garbage in, garbage out · 3.2 Context vacuum: first potential mistake · 3.2.1 From a single-shot to multi-shot examples · 3.2.2 Good multishot prompt vs bad multishot prompt · 3.2.3 Let the model do the gap analysis · 3.3 Building context together with LLMs · 3.3.1 Using Model Context Protocol to instrument LLMs · 3.3.2 Building context for a UI component with MCPs · 3.3.3 Accessing external knowledge through MCPs · 3.3.4 Deep integration with Language Server Protocol · 3.3.5 MCP governance · 3.3.6 Agentic skills: procedure as loadable context · 3.4 Context rot: is too much context a bad thing? · 3.4.1 “Lost in the middle” problem · 3.4.2 Manual reordering: "Sandwich" Method · 3.5 Using AI coding tools to manage context · 3.5.1 Automated retrieval: from RAG to agentic search · 3.5.2 Context anchor: todo list for LLM · 3.5.3 Beyond compaction: meta-prompting and state externalization · 3.5.4 …can I be lousy again if I’m using coding AI? · 3.6 Context through reasoning · 3.6.1 Chain-of-Thought: forcing the LLM to “show its work” · 3.6.2 Chain-of-Verification: internal fact-checking loop · 3.6.3 How to introduce self correction? · 3.6.4 Is reasoning always THE solution? · 3.7 Summary

What you learn in chapter 3 →

Chapter 4: LLM-driven data science

The introduction explains how LLMs can turn business questions into data-analysis notebooks while emphasizing that plausible-looking results still require human verification.

4.1 Choosing the proper dataset · 4.2 Set up the environment · 4.3 Exploratory data analysis · 4.3.1 Data analysis when we know the questions · 4.4 Applying feature engineering · 4.5 Predicting the price of drugs with machine learning techniques · 4.5.1 Supervised learning for predicting a label · 4.5.2 The train/test data split · 4.5.3 The full predict-the-price ML pipeline · 4.5.4 Vibe engineer the price prediction · 4.5.5 Accessing the results · 4.5.6 Improving the model · 4.6 Building a digital guardian angel · 4.6.1 Correlating long text with predicted class · 4.6.2 Tokenization of medicine description · 4.6.3 Deep learning based classification with vibe engineering · 4.6.4 How to use the model? · 4.6.5 Picking the proper threshold · 4.6.6 Understanding the architecture · 4.7 Summary

What you learn in chapter 4 →

Chapter 5: From autocomplete to agent fleets: the road to Continuous AI

The chapter introduces AI coding tools as task-dependent forms of assistance moving toward Continuous AI, while arguing that greater autonomy requires accumulated operational maturity and guardrails.

5.1 Passive AI: ChatGPT as a coding partner · 5.1.1 GitHub Copilot: AI moves into the IDE · 5.1.2 Tab-Tab-Tab: the illusion of productivity · 5.1.3 The context blindness wall · 5.2 Agents in IDE, but still on leash · 5.2.1 The Cambrian explosion of AI coding agents · 5.2.2 Approval fatigue · 5.2.3 Trade-off: vision vs. vigilance · 5.2.4 Slopsquatting and package hallucinations · 5.3 Headless era: Moving into terminal · 5.3.1 Codex, Antigravity and Claude Code: AI in the UNIX pipeline · 5.3.2 Agent as gatekeeper and reviewer in Git · 5.3.3 Debugging a lost agent · 5.3.4 Trade-off: autonomy vs. observability · 5.4 Standardizing team workflows with agents · 5.4.1 From .cursorrules to AGENTS.md · 5.4.2 Agent handoff: passing context between agents · 5.5 Governance and compliance · 5.5.1 Agent policies: the missing standard · 5.5.2 Governance needs an evidence layer · 5.5.3 Trade-off: scalability vs. bureaucracy · 5.6 Swarm of agents and orchestration · 5.6.1 Poor man's parallelism: Git worktrees · 5.6.2 Observability becomes critical · 5.6.3 IDE support: parallelism gets easier (and harder) · 5.6.4 Mission Control: Agent HQ and Antigravity · 5.6.5 Artifacts as the currency of trust · 5.6.6 Sandboxing: safety through isolation · 5.6.7 Tradeoffs of swarm of agents · 5.7 Where are we now? · 5.8 Summary

What you learn in chapter 5 →

Chapter 6: A scientific approach for validating LLM-based solutions

The chapter introduces a text-to-SQL service and explains why provider independence and measured accuracy matter when building an LLM-based solution.

6.1 Creating a text-to-SQL service · 6.1.1 Creating the service skeleton · 6.1.2 Defining the API of the service · 6.2 Integration with the OpenAI API · 6.2.1 Testing the integration · 6.3 Developing the accuracy verification framework · 6.3.1 Delving into the bird-bench dataset · 6.3.2 Methods for comparing expected vs the actual generated SQL and their trade-offs · 6.3.3 Submitting the queries to the SQL-generator-service · 6.4 Trade-offs with input-context size · 6.4.1 Accuracy vs context-size · 6.4.2 Context-size vs cost of running the model · 6.4.3 Migration to another AI provider - Google Gemini · 6.4.4 Deploying the application to Google Cloud Run · 6.4.5 Verifying the text-to-SQL running in the cloud · 6.4.6 Switch the AI provider · 6.5 Summary

What you learn in chapter 6 →

Chapter 7: Vibe performance engineering: when assumptions mislead

The introduction identifies false traffic assumptions and missed hot-paths as two ways performance work can add complexity without delivering production benefits, including when LLMs assist.

7.1 Mistakes of LLMs over-engineering performance improvements · 7.1.1 The human solution · 7.1.2 Vibe performance engineering solution · 7.1.3 Adding traffic expectations to the vibe performance engineering solution · 7.2 Vibe performance engineering of the hot-path in code · 7.2.1 Understanding the Pareto principle in the context of software systems · 7.2.2 A word service with a potential hot-path · 7.2.3 Hot-path detection in your code · 7.3 Measuring the code · 7.3.1 Measuring the code with vibe performance engineering techniques · 7.3.2 Mistake of generating too much code · 7.4 Improvements for hot-path performance · 7.4.1 Improving performance with vibe performance engineering techniques · 7.4.2 Comparing performance results based on Gatling simulations · 7.5 Concluding thoughts · 7.6 Summary

What you learn in chapter 7 →

Chapter 8: Evaluation is king: how to trust code you didn’t write

The introduction explains why AI-generated code creates a distinct trust problem and calls for confidence based on verified properties rather than an AI’s assurance.

8.1 Evaluation matters more than generation · 8.1.1 Code is now produced faster than confidence · 8.1.2 Scale of generation creates scale of potential debt · 8.1.3 "Works for me" means nothing now · 8.1.4 How the community measures "good AI code" (and why it's misleading) · 8.1.5 The benchmark-reality gap · 8.1.6 Where evaluation actually lives · 8.2 Always-on verification · 8.2.1 Compilation and type checking: a signal, not proof · 8.2.2 Static analysis: linters, rule engines, and SAST · 8.2.3 AI code review: rules, checklists, and heuristics · 8.2.4 Dependency, license, and security scanning · 8.2.5 Diff-based sanity checks: what actually changed? · 8.2.6 The limits of always-on gates · 8.3 Tests as contracts, not as coverage · 8.3.1 Manual testing: still necessary, but different · 8.3.2 Unit tests: the foundation that can betray you · 8.3.3 TDD with AI and test-driven prompting · 8.3.4 Code coverage: why AI can game it · 8.3.5 Snapshot and golden testing: where they help and where they rot · 8.3.6 Approval testing and visual regression · 8.3.7 Key shift: tests describe intent, not implementation · 8.4 Tests that break AI-generated code · 8.4.1 Property-based testing: from examples to universals · 8.4.2 Invariants, metamorphic relations, and conservation laws · 8.4.3 Fuzzing: when random isn't random enough · 8.4.4 Mutation testing: testing your tests · 8.4.5 Differential testing: multiple versions, one truth · 8.4.6 New mindset: adversarial verification · 8.5 System-level and contract testing · 8.5.1 Design by contract: making assumptions explicit · 8.5.2 Contract testing: AI and API stability · 8.5.3 Integration and end-to-end tests · 8.5.4 Self-healing tests: real value vs. marketing · 8.5.5 Testing what the AI didn't know it changed · 8.6 Formalism and proofs (the high-cost zone) · 8.6.1 Much more strong(er) type systems · 8.6.2 SMT solvers: automated theorem proving · 8.6.3 LLM + symbolic execution: the emerging hybrid · 8.6.4 Formal verification with AI assistance · 8.6.5 When to consider such a level of evaluation · 8.7 Runtime verification and production · 8.7.1 Regression testing as CI for every AI change · 8.7.2 Observability as evaluation: logging, tracing, and metrics · 8.7.3 Canary deployments and progressive rollout · 8.7.4 Chaos engineering: testing resilience · 8.7.5 Non-functional testing: performance, security, accessibility, compatibility · 8.8 Choosing evaluation methods · 8.8.1 What determines "sufficient confidence"? · 8.8.2 System criticality vs. evaluation cost · 8.8.3 When to test more vs. when to regenerate · 8.8.4 Minimum viable testing for AI-first teams · 8.8.5 Evaluation as competence, not checklist · 8.8.6 Revenge of the QA · 8.9 Summary

What you learn in chapter 8 →

Chapter 9: Economics of vibe engineering: cost optimization at scale

The introduction frames the move from AI prototype to production as a collision between model costs, unit economics, and the need to preserve quality.

9.1 The true cost of AI in production · 9.1.1 Token economics 101 · 9.1.2 The pricing war timeline · 9.1.3 When NOT to optimize · 9.2 The optimization ladder · 9.2.1 The starting point: maximum settings, zero awareness · 9.2.2 The behavioral problem: wrong tool for the job · 9.2.3 The context problem: paying for noise · 9.2.4 The model problem: one size doesn't fit all · 9.2.5 Output problem: paying for explanations nobody reads · 9.2.6 Timing: not everything needs an instant answer · 9.2.7 Structural: one tool can't serve every workflow · 9.2.8 The diminishing returns, and where to stop · 9.3 Running models locally · 9.3.1 When local makes sense for developers · 9.3.2 The developer hardware landscape · 9.3.3 Setup: Ollama + OpenCode, the free Copilot · 9.3.4 Which model for which coding task · 9.3.5 Quantization: which download to pick · 9.3.6 The local model's honest niche · 9.4 Measuring the investment · 9.4.1 The real cost of a development team's AI stack · 9.4.2 Measuring AI coding ROI · 9.4.3 When quality degrades, the silent erosion · 9.4.4 The monthly health check · 9.5 Advanced strategies · 9.5.1 MCP vs. CLI, the hidden context tax · 9.5.2 Taming agentic costs · 9.5.3 Multi-agent patterns and their economics · 9.5.4 Latency-cost-quality triangle · 9.5.5 The CI pipeline, infrastructure meets development · 9.5.6 The rebound effect · 9.6 Summary

What you learn in chapter 9 →

Chapter 10: Your codebase is the bottleneck: code organization for the agent era

The introduction explains why AI agents that work well within individual projects can struggle at team scale when they lack system-wide context, and why existing engineering infrastructure matters more as agent use grows.

10.1 The context fragmentation problem · 10.1.1 Monorepo as a context delivery mechanism · 10.2 The navigation and blast radius problem · 10.2.1 The second failure mode: blast radius · 10.2.2 The dependency graph as the agent's GPS, and safety net · 10.2.3 Strict deps as contract enforcement · 10.2.4 Target granularity: reasoning boundaries and build boundaries · 10.2.5 Beyond static documentation: the build system as agent collaborator · 10.2.6 The organizational cost of coherence · 10.3 The throughput wall · 10.3.1 Where the agent runs matters more than how fast it runs · 10.3.2 Hermetic sandboxes: same source, same config, same result · 10.3.3 Remote caching: the more agents you run, the faster everyone goes · 10.3.4 Progressive validation: not every iteration needs full verification · 10.3.5 Module architecture as throughput investment · 10.3.6 The 4x hidden tax · 10.4 The lying oracle · 10.4.1 The three lies · 10.4.2 Fix the lies before you fix the speed · 10.5 The review bottleneck · 10.5.1 Lint-as-architecture: encoding what you know · 10.5.2 Green/Yellow/Red: making auto-merge trustworthy · 10.5.3 Compound interest on governance · 10.6 The night shift and the production feedback loop · 10.6.1 Continuous modernization: making the dead walk · 10.6.2 The open loop: production knows what's broken · 10.6.3 Where all the pillars converge · 10.7 Measuring what matters at team scale · 10.7.1 The metrics that actually matter · 10.7.2 The metric nobody tracks, and everybody needs · 10.8 What remains when AI writes all the code? · 10.8.1 What doesn't change · 10.8.2 The tech lead's job, rewritten · 10.8.3 The uncomfortable truth about this book · 10.8.4 Your Monday morning · 10.9 Summary

What you learn in chapter 10 →

Concepts explained in this book

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.