Skip to content

engineer@aine:~/book$ tree chapters/ --depth 2

The whole book,section by section.

Generated from the manuscript itself, so it is what is actually written rather than what was planned. Chapter titles link to a page with that chapter's takeaways and figures.

  • 11 chapters
  • 392 sections
  • 135k words
  • generated from source
ainativesoftware.engineering/book/toc12 directories, 392 entries

learning-ai-native-software-engineering/

    • The Vibe-Coding Trap
    • Two Engineers, One Task
    • What AI-Native Engineering Is Not
    • The Role Transformation: From Implementer to Orchestrator
    • Why the Traditional Workflow No Longer Scales
    • The New Center of Gravity: Intent, Constraints, and Verification
    • Intent
    • Constraints
    • Verification
    • Human-in-the-Loop: The Nonnegotiable Checkpoint
    • What AI-Native Engineers Actually Do
    • Before the work
    • During the work
    • Throughout
    • The New Skill Stack: Eight Skills That Make You Irreplaceable
    • The Cost of Not Adapting
    • Career Implications: Why Software Engineering Is Becoming a Leadership Role
    • Starting Out: How Junior Engineers Grow When AI Writes the Basics
    • Summary
    • How LLMs Work: An Engineer's-Eye View
    • Tokens
    • The Transformer and attention
    • In-weights knowledge versus in-context knowledge
    • The context window is your working-memory budget
    • Why LLMs Are Good at Code
    • Training with verifiable outcomes: RLHF and RLVR
    • Chain-of-thought and reasoning models
    • Nondeterminism, Temperature, and Sampling
    • The Model Landscape
    • Open source versus closed source
    • Small language models
    • Multimodal models
    • Embeddings and semantic search
    • Where LLMs Excel and Where They Fail
    • Benchmarks: What They Do and Don't Measure
    • The API Layer: How Engineers Talk to LLMs
    • What Makes an Agent: LLM, Tools, Context, Loop
    • The LLM: The reasoning core
    • Tools: How agents act on the world
    • Context: Accumulated state
    • The agentic loop: Reason, act, observe, adjust
    • Beyond single agents
    • Building an Agent in 50 Lines of Code
    • Stopping conditions and iteration limits
    • Agent frameworks
    • Why this matters for users of coding agents
    • Practice
    • The Agent Execution Model: Reason, Act, Observe
    • The self-correction loop: Tests as observations
    • Tool Use and Function Calling
    • How function calling works under the hood
    • Memory and State
    • In-context memory
    • Long-term memory through files
    • Retrieved memory with RAG
    • Agent-generated memory
    • Context rot
    • Agent Economics: Cost, Latency, and Scope
    • Human-in-the-Loop
    • HITL as a design principle
    • Feedback as context enrichment
    • The agent decides when it needs you
    • Calibrating HITL to risk
    • The AI Tool Landscape
    • IDE-integrated coding assistants
    • CLI and terminal-native agents
    • Cloud and background agents
    • Code review assistants
    • Design and UI generation tools
    • Choosing tools without chasing hype
    • Summary
    • From Prompt Engineering to Context Engineering
    • Practice
    • The Core Problem: Right Context, Right Time, Limited Window
    • The attention problem
    • The lost-in-the-middle phenomenon
    • Context rot
    • The human working-memory parallel
    • Practice
    • The right-time problem
    • The two failure modes
    • Mandatory and Optional Context Components
    • A Taxonomy of Context Components
    • System prompts
    • User input and user-provided context
    • Rules, style guides, and constraints
    • Skills
    • Tools
    • Custom agents
    • Environment context: runtime and metadata
    • Conversation history and memory management
    • Practice
    • The Context Assembly Process
    • Autonomous Context Discovery: How Agents Explore Before They Write
    • Code indexing and semantic search
    • CLI-based exploration
    • Language servers and symbolic code understanding
    • What autonomous discovery does and doesn't replace
    • Practice
    • The Agent Runtime Pipeline: From Request to Action
    • Context assembly, planning, and tool execution
    • The iterative loop: reason, act, observe, adjust
    • The Golden Balance: Too Little Focus, Too Much Distraction
    • Practice
    • Avoiding Context Rot
    • Session management
    • Token efficiency for large payloads
    • Practice
    • Summary
    • What MCP Is and Why It Matters
    • What MCP actually does
    • Why the MCP standard matters for engineers
    • The MCP Architecture: Clients, Servers, and Transports
    • Hosts, clients, and servers
    • Transports
    • Local servers versus remote servers
    • How it connects in your daily workflow
    • The MCP Ecosystem
    • Configuring a server: a typical example
    • The Economics of MCP
    • What you pay for in an MCP session
    • Controlling tool output size
    • MCP Security Model
    • Threats
    • What Real Incidents Teach Us About MCP Security
    • MCP Security Best Practices
    • Four Security Principles
    • Operating MCP in Production
    • MCP Approved Registry
    • Debugging MCP
    • The server won't start
    • The server connects but shows no tools
    • The agent doesn't use the tool you expect
    • A tool call fails with an error
    • Reading tool-call logs
    • MCP and Context Pollution
    • Why Too Many MCP Servers Degrade Performance
    • Agent-Specific MCP Server Configuration
    • Practice
    • Building Your Own MCP Server
    • When to build rather than use
    • How hard is it?
    • Writing good tool descriptions
    • MCP in Agentic Pipelines
    • What changes when there's no human in the loop
    • Practical use cases for MCP in pipelines
    • The reliability constraint
    • Skills and CLI Scripts: When You Don't Need an MCP Server
    • The pattern
    • Skills that reference project scripts
    • The CLI-first movement
    • When to use skills and CLI tools versus MCP
    • Advanced Tool Use: Scaling Beyond Static Tool Lists
    • The three bottlenecks
    • Tool search: Dynamic discovery instead of static loading
    • Programmatic tool calling: Code as orchestration
    • Tool-use examples: Teaching by showing
    • Matching the solution to the bottleneck
    • Where the industry is heading
    • Summary
    • The Root Problem: Why Do We Need SDD?
    • Garbage In, Garbage Out: At Scale
    • The Compounding Problem
    • The Human Parallel
    • You Already Write Specs
    • When These Documents Are Missing
    • The Case for Spec-Driven Development
    • The Power of Learning by Writing a Spec
    • Uncovering Unclear Requirements with a Spec
    • The Economics of Writing Specs
    • When SDD Is Not the Right Fit
    • Specs as Durable Artifacts That Survive Tool Changes
    • Specs and Organizational Knowledge
    • SDD and Human-in-the-Loop
    • Why Engineers Resist Writing Specs
    • Plan Mode: The Bridge Between Vibe Coding and SDD
    • Plan Mode in Practice
    • Plan Mode and Spec-Driven Development
    • Three Levels of SDD Maturity
    • 1. Spec-First: Writing Specs Before Implementation
    • 2. Spec-Anchored: Keeping Specs During Evolution
    • 3. Spec-as-Source: The Spec as Primary Artifact
    • What Good Specs Look Like
    • Summary
    • The Canonical Loop: Specify, Plan, Execute, Verify, Integrate, Learn
    • Where Humans Must Stay in the Loop
    • Stop Conditions and Escalation Rules
    • Practice
    • Before the Loop: When You Need a Prototype First
    • The Throwaway Branch Pattern
    • Scratch Repo Prototypes
    • A Concrete Example
    • Consolidating Learnings into the Spec
    • When to Skip the Prototype
    • Practice
    • The Core Artifact Set
    • spec.md: Intent, Constraints, Acceptance Criteria
    • Practice
    • plan.md: Approach, Trade-Offs, Sequencing
    • tasks.md: Atomic Tasks with Done Checks
    • Optional Artifacts: risks.md, rollback.md, adr.md
    • Practice
    • From Idea to Spec: Turning Intent into a Document
    • From Spec to Plan: Turning Intent into Action
    • Practice
    • From Plan to Tasks: Decomposition and Dependency Management
    • Practice
    • Execution Patterns and Prompts
    • Verification as Hard Rails: CI Gates That Make Output Shippable
    • Practice
    • Integration and Deployment
    • Learning and Iteration: Closing the Loop
    • Practice
    • The Spec Lifecycle: What Happens After Implementation?
    • The Two-Tier Model: What Works in Practice
    • The Learning Phase as the Bridge
    • Practice
    • SDD in Brownfield Projects
    • The Core Challenge: Specs for Code That Was Never Specified
    • Starting Small: The Spec Island Strategy
    • Reverse-Engineering Intent with AI Assistance
    • Handling Undocumented Behavior and Implicit Contracts
    • Prioritizing What Gets Specified First
    • Practice
    • Summary
    • Why Frameworks Exist: Structure, Consistency, Team Alignment
    • Practice
    • GitHub Spec Kit
    • Practice
    • OpenSpec
    • Practice
    • BMAD Method
    • Roles, Personas, and Guided Workflows
    • BMAD in Practice
    • BMAD in Brownfield Projects
    • Custom Workflows, Custom Agents, and Adapting BMAD for Your Use Case
    • Practice
    • Other Tools Worth Knowing
    • Kiro
    • Agent Skills
    • Choosing the Right Framework
    • Frequently Asked Questions on Using SDD in Production
    • Summary
    • The Bottleneck Moves
    • Why Manual Review Doesn't Scale
    • What This Chapter Promises
    • The Two Big Questions
    • Harness Validations and Self-Check Loops
    • Before Merge, Layer 1: Deterministic Guardrails
    • Linting and Formatting as a Baseline
    • Dead Code and Unused Dependencies
    • Type Checks and Compilation
    • The Test Suite
    • Mutation Testing as a Test Quality Gate
    • Property-Based Testing for Invariants
    • Static Application Security Testing (SAST)
    • Dependency and Container Scanning
    • Secrets Scanning
    • Infrastructure as Code Scanning
    • Supply-Chain Integrity
    • Architecture Fitness Functions
    • Performance and Bundle Budgets
    • Query and Data-Access Performance
    • Dependency Updates
    • Contract Gates: API and Schema Breakage
    • Accessibility and Internationalization
    • Pull-Request Size and Scope Discipline
    • Before Merge, Layer 2: LLM-Based Review
    • Why Deterministic Checks Are Not Enough
    • Adversarial Review Before the PR
    • How an LLM Reviewer Works
    • Two Ways to Organize the Review
    • What to Look For
    • Tuning the Reviewer to Your Codebase
    • After Merge, Layer 3: Safe Deployment Strategies
    • Feature Flags as the Default
    • Blue-Green Deployments
    • Canary Deployments
    • Shadow Traffic and Dark Launches
    • Progressive Delivery by User Segment
    • Automated Rollback on Error Budget Burn
    • Choosing Strategies
    • Data Safety
    • After Merge, Layer 4: Runtime Safety and AI-Powered Ops
    • The Three Pillars, Briefly
    • OpenTelemetry as the Common Substrate
    • SLOs and Error Budgets
    • Reducing Alert Fatigue
    • Where AI Changes the Game
    • AI Anomaly Detection on Metrics and Logs
    • Post-Deploy Observability Analysis
    • AI-Driven Root-Cause Analysis
    • The Bug-Resolution Pipeline
    • Closing the Loop Back to the Coding Agent
    • Synthetic Monitoring and Chaos Engineering
    • The Human in the Loop: Deciding What Needs You
    • Two Mechanisms to Decide What Needs a Human
    • The Deterministic Gate: Changes That Always Need a Human
    • The AI Risk Scorer
    • How Human Review Is Changing
    • Reviewing the Reviewer
    • Putting It Together
    • A Reference Pipeline, End to End
    • What to Adopt First
    • Metrics for the System Itself
    • Failure Modes
    • The Trust Ladder
    • Further Reading
    • Summary
    • Why Software Engineers Need to Understand Agent Orchestration Patterns
    • Why Using a Single Agent Doesn't Scale
    • The Tradeoffs of Orchestrating Multiple Agents
    • One Agent, Bigger Jobs: Compaction and Scratchpads
    • Compaction: The Automatic Fix That Gets Messy
    • Scratchpads: Memory in a File You Control
    • Practice
    • SDD as an Orchestration Pattern
    • Using Different Models in Different SDD Phases
    • The Generator-Critic Loop
    • Worked Example: Adversarial Code Review
    • Practice
    • The Goal Pattern: Looping Until the Goal Is Met
    • The Ralph Loop
    • How It Works
    • What Makes It Work, and What Keeps It Safe
    • Tools
    • Practice
    • Running Multiple Agents in Parallel on the Same Codebase
    • Context-Window Isolation
    • Git Worktrees
    • Isolated Cloud VMs
    • Practice
    • The Subagent Pattern
    • Ways to Arrange Work
    • Practice
    • The Advisor: A Stronger Model for the Hard Parts
    • Workflows: Orchestration as Code
    • A Fixed Script: Letting the Agent Decide
    • Practice
    • The Dark Factory: Where This Is All Going
    • Two Modes of Working
    • Final Considerations
    • Why Scaling to the Team Level Is a Different Problem
    • The Bottleneck Moves, It Doesn't Disappear
    • New Failure Modes That Only Show Up at Team Scale
    • AI Is a Mirror and a Multiplier
    • Practice
    • The AI-Native Team Canvas: Design How Your Team Adopts AI
    • A Business Model Canvas, but for AI Adoption
    • How to Run It
    • The Eight Boxes
    • Skill Gaps and System Gaps
    • Practice
    • Usage Is Not Readiness
    • Resistance Is Rational: Why Engineers Push Back
    • The Three Objections You Will Hear
    • Reframing the Craft
    • What This Means for Leaders
    • Practice
    • Standardize the Team Stack
    • Standardize What Matters
    • The Shared Context Is the Real Stack
    • The Harness Gets Better Over Time
    • Someone Has to Own It
    • Leave Room to Experiment
    • How an AI-Native Team Works
    • Pair on the Agent, Not Just the Code
    • Write and Review Specs as a Team
    • The Team Gets Smaller and Tighter
    • The Human Cost of Running a Fleet
    • Agents That Work Overnight
    • Product and Design Move Closer to the Code
    • Practice
    • Measuring Adoption
    • Practice
    • Summary
    • Gridlock at Cogwheel
    • The Mission: A Greenfield Service Inside a Brownfield World
    • Week 1: Everything Except Signals
    • A PRD, Written Together
    • The AINE Canvas: How the Team Will Work
    • Building the User Harness
    • Wiring In Cogwheel's World
    • Week 2: Splitting Into Stories
    • Prototyping in Code, Not Pictures
    • The Loop in Motion
    • Weeks 3–4: Trusting the Code
    • Watch One PR Go Through
    • Weeks 5–8: A Fleet, Not a Hero
    • Making It the Team's Way
    • Measuring Honestly
    • Week 9: Cogwheel Ships Pulse

ls chapters/

Chapter pages

Takeaways, figures, and what each one is for.

cat foreword.md

Read the opening

Free, three minutes.

open --oreilly

Read it all free ↗

30 days with code ANSE2026.