Cover and Bibliographic Information
Harness Engineering for AI Agents: Re:Zero, Starting AI Software Engineering from Zero
Second Edition Changes
- Version 2026.08.03 — Second Edition
- Next Revision
Preface
- Author’s Note
- To Be Honest
Chapter 0 — This Book’s Promise: A Report, Not a Proof
- 0.1 What This Book Is Trying to Cover, and Three Things You Can Actually Use
- 0.2 This Is a Report, Not a Proof
- 0.3 How to Read Code Links
- 0.4 This Book Was Written the Same Way
Chapter 1 — How the Way We Use AI Has Changed
- 1.1 From ChatGPT Copy-Paste to Agent Coding
- 1.2 From Prompt to Context, and Then to Harness
- 1.3 Vibe Coding and Harnesses Are Layers, Not Opposites
Chapter 2 — What Is a Harness? (Agent = Model + Harness)
- 2.1 Models Are Commodities; the Harness Is the Moat
- 2.2 The Five Components of a Harness
- 2.3 Same Model, Different Harness, Different Results
- 2.4 The Two Sides of the Term: The Market May Wobble, but We Are Developers
Chapter 3 — In the End, It Is Software Engineering
- 3.1 One Sentence from Simon Willison
- 3.2 What Is Software Engineering?
- 3.3 New Words, Familiar Engineering
- 3.4 Harness: Discipline Has Moved
- 3.5 The Pain in the Field Is Real
- 3.6 The Four Weapons Chosen for This Book
- 3.7 Why Now?
Chapter 4 — The Nature of Language Models
- 4.1 A Machine That Probabilistically Guesses the Next Thing to Say
- 4.2 Tokens: The Link Between Code Volume and Your Wallet
- 4.3 Context Window: The AI’s Field of View
- 4.4 It Accumulates, Overflows, and Drifts Away
- 4.5 Three Core Traits: Confidently Wrong - Unable to Self-Verify - Hallucination
Chapter 5 — The Nature of Agents
- 5.1 Observe -> Plan -> Act -> Observe
- 5.2 How Agents Read and Edit Code
- 5.3 What Agents Read First: AGENTS.md Is Not Free
- 5.4 Tool Landscape: Hooks, Skills, Subagents, MCP
- 5.5 Context Management and Better Prompting
- 5.6 Three Traps (Preview of Part 3)
Chapter 6 — Why Go This Far?
- 6.1 “All 16 Succeeded”… and Every One Was Fake
- 6.2 Not My Mistake, but AI’s Structural Weakness
- 6.3 As-Is -> To-Be: From Single App to Modules
- 6.4 The Answer Has Two Axes: Isolation and Contract Harness
Chapter 7 — Weapon ① Contract
- 7.1 What It Means to Design With Contracts
- 7.2 Fixing AI-Touched Boundaries With Port Contracts
- 7.3 gRPC Type Contracts: Process Only Known Messages
- 7.4 Do Not Throw on Failure (Never-Throws)
- 7.5 File Anchors: Register Ownership and Contract Before Adding a New File
- The Cost and Limits of This Design
Chapter 8 — Weapon ② Structure and Isolation
- 8.1 Do Not Patch It. Transplant It.
- 8.2 Hexagonal: Push External Implementations Out with Ports and Adapters
- 8.3 Structure and Checks Should Be Treated Separately
- The Cost and Limits of This Design
Chapter 9 — Weapon ③ Traceability (Orthogonal to the Structure Axis)
- 9.1 The V-model: From Requirements to Tests
- 9.2 Automatically Raise a Red Flag When a Cell Is Empty
- 9.3 Treat Existing Behavior as the Baseline
- 9.4 The Traceability Table Found Four Missing Capabilities
- The Cost and Limits of This Design
Chapter 10 — Weapon ④ Verification
- 10.1 Verification Belongs Outside the AI
- 10.2 Automated Software Verification First, LLM Cross-Review Later
- 10.3 Case 1. Boundary Checks: Automatically Finding Import Violations
- 10.4 Case 2. Adversarial Review and Fixed Tests: The Masking Code Story
- 10.5 Charter Self-Protection: Preventing the AI from Removing Its Own Restraints
- 10.6 Tests Must Be Deterministic
- The Cost and Limits of This Design
Chapter 11 — Measurement and Operations
- 11.1 Why Benchmarks Matter
- 11.2 A Daily Issue Report Is the Project Dashboard
- 11.3 What Stops Drift Is Not a Checker, but a Baseline
- 11.4 Operations Is a Different Game: When AI Becomes the Attacker
- 11.5 Start with the Environment — Why This Environment Existed
- 11.6 What Code Can Block — Production DB Access Control and a Seven-Round Fight
- 11.7 What Code Cannot Block — Cache, Configuration, and the Script Itself
- 11.8 In the End, the Real Shield Is Permissions
- Conclusion of Part 3: In the End, We Did Not Invent a Single New Secret Technique
Chapter 12 — Optimizing Coding Costs with naia-adk
- 12.1 Saving Model Combinations as Profiles
- 12.2 Assigning Models by Role
- 12.3 Benchmarking the Model Assignments
- 12.4 Results from the Initial Worker Benchmark
- 12.5 What We Know—and What We Do Not
- 12.6 Next Steps
Chapter 13 — Building a Customer Channel Where Agents Work Through Discord
- 13.1 Receiving Discord Messages Through a Gateway
- 13.2 Fixing Each Bot’s Work Boundary in JSON
- 13.3 Recording Intake, Execution, and Delivery Separately
- 13.4 Running Codex and Claude Through One Job Interface
- 13.5 Separating the Conversation Coordinator from the Worker
- 13.6 Recovering from Records After a Reboot
- 13.7 Fixing the Infinite-Wait Failure
- 13.8 Large Jobs Skipped the Development Process
Chapter 14 — Naia, the Visual Agent
- 14.1 At First, I Called It an OS
- 14.2 From Alpha to Naia
- 14.3 The Name and Character of Naia
- 14.4 Why Go as Far as an Operating System?
- 14.5 Why Bazzite?
- 14.6 What Naia Provides
- 14.7 What Makes Naia Different? Comparing It with OpenClaw, Hermes, and Claude Code
- 14.8 The Workspace: A Desk Where AI Works
- 14.9 Why Run the Open-Source Project Primarily in Korean?
- 14.10 Where You Can Contribute Today
- 14.11 The Meaning of Paid Subscriptions and Sponsorship
- 14.12 What I Hope You Take from This Chapter
Chapter 15 - Zero-Shot Emotional Speech: Naia’s Voice
- 15.1 Speaking New Sentences from a Short Reference Recording
- 15.2 Voice and Expression Are Handled Together but Kept Distinct
- 15.3 Zero-Shot Does Not Mean Review-Free
- 15.4 Designed for Windows GPUs with 6GB or More
- 15.5 From Voice to Face
Chapter 16 - NVA: Building a Naia Video Avatar from Video Clips
- 16.1 NVA Is a Video-Clip-Based Avatar Format
- 16.2 In Environments Without a GPU, NVA Plays Prerendered Video
- 16.3 New Sentences Are Generated in Real Time with a Talking Head
- 16.4 The Product Player Connects the Two Paths Seamlessly
- 16.5 The File Format Can Be Public, but Authoring and Product Playback Technology Remain Separate
- 16.6 What We Have Verified and What Remains
Chapter 17 - Custom Cascades and Windows TRT
- 17.1 Cascades Connect Models into a Product Workflow
- 17.2 Profiles Lock In Hardware-Specific Configurations
- 17.3 We Did Not Convert All of VoxCPM2 to TensorRT
- 17.4 Ditto and VoxCPM2 Use Separate Runtime Environments
- 17.5 We Maintain a Boundary Between Open Models and the Proprietary Product Layer
- 17.6 What We Have Verified So Far - and What Remains
Chapter 18 — Naia Memory + Knowledge: My AI That Remembers Me
- 14.1 Why Memory Is Core to “My AI”
- 14.2 Naia Memory: A Structure Modeled After Human Memory
- 14.3 Learning Safely: Receiving Hermes-Style Self-Improvement Without Learning the Wrong Things
- 14.4 Knowledge: A Knowledge Compiler for Evidence-Based Answers
- 14.5 What to Take Away from This Chapter
Chapter 19 — Naia App Development
- 15.1 What Is an App?
- 15.2 Why Develop Apps Separately?
- 15.3 Basic App Structure
- 15.4 Installation and Management
- 15.5 Browser App
- 15.6 Workspace App
- 15.7 Content Studio App
- 15.8 What App Developers Should Care About
- 15.9 Examples of Apps Developers Can Build
- 15.10 What to Take From This Chapter
Chapter 20 — AI-Native Open Source
- 16.1 Large-Scale Collaboration Is More Expensive Than It Looks: Three Reasons Open Source Breaks Down
- 16.2 Is Rebuilding Everything Every Time the Answer? The Value of Accumulation
- 16.3 Naia’s Choice: Designing Together with AI (AX)
- 16.4 Repositories That Are Easy for AI to Participate In
- 16.5 Licenses and Charters Must Be Readable by AI Too
- 16.6 Open Source Mechanisms Built into naia-adk
- 16.7 What Actually Happened: vLLM-Omni and MiniCPM-o Work
- 16.8 What AI-Supported Open Source Can Look Like
- 16.9 What It Means to Participate in naia
Chapter 21 — The Future of Developers: How to Welcome a New Colleague
- 17.1 Why I Started naia
- 17.2 Cloud AI Is Excellent, but It Is Not My Colleague
- 17.3 Human Colleagues Are Also Hard to Predict
- 17.4 How Developer Work Is Being Reorganized
- 17.5 What It Means to Have My AI
- 17.6 How to Welcome a New Colleague
- 17.7 The Opportunity Left for Developers
- 17.8 From Zero Again
Epilogue — Preparing for an English Interview and the Naia Story I Did Not Get to Finish
- Why I Am Publishing the Complete Preparation Document
- The Argument This Book Makes
- How I Prepared for an English Interview with AI
- Turning the Preparation Document into an AI Video
- How the AI Voices and Video Were Made
- The Production Process Was Itself a Case Study in Using AI
- Complete Pre-Interview Preparation Scenario
Appendix A - Glossary
Appendix B — Source Map: Complete Code Index for This Book
- Chapter 7 — Contracts
- Chapter 8 — Structure and Isolation
- Chapter 9 — Traceability (V-Model)
- Chapter 10 — Verification
- Chapter 11 — Measurement and Operations
- Chapter 14 — Naia Memory + Knowledge (Absorbing Hermes Self-Improvement)
- Chapter 13 — Video Avatar (nva)
- Chapter 16 — AI-Native Open Source
Appendix C — External Sources and Confidence Level
- Methodology and Perspective
- Empirical Numbers (Handle With Care)
- Properties of Language Models
- Standards and Classics
- Ecosystem and Future (Forecasts = Loose)
- What to Compare
- What to Record: Three Numbers
- Recording Template
- How to Read the Results