Cover and Bibliographic Information
Harness Engineering for AI Agents: Re:Zero, Starting AI Software Engineering from Zero
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 — Naia, the Visual Agent
- 12.1 At First, I Called It an OS
- 12.2 From Alpha to Naia
- 12.3 Naia’s Name and Character
- 12.4 Why Go All the Way to an Operating System?
- 12.5 Why Bazzite?
- 12.6 What Naia Provides
- 12.7 What Makes Naia Different — Compared with OpenClaw, Hermes, and Claude Code
- 12.8 Workspace: The Desk Where AI Works
- 12.9 Why Operate Open Source Primarily in Korean?
- 12.10 Public Repos Where You Can Participate Now
- 12.11 The Meaning of Paid Subscriptions and Sponsorship
- 12.12 What to Take Away from This Chapter
Chapter 13 — The naia-omni-cascade Runtime: Naia’s Voice and Face on My GPU
- 13.1 First, What Becomes Possible?
- 13.2 Why Use a Local Voice Model at All?
- 13.3 Cascade Structure: Replaceable Parts, Not One Monolith
- 13.4 What Should You Try First?
- 13.5 Downloads and Prerequisites
- 13.6 Authentication Structure
- 13.7 Connecting from naia-shell
- 13.8 REST API for Developers
- 13.9 Realtime Voice API
- 13.10 Language and Emotion Tags
- 13.11 Putting a Face on the Voice: Video Avatars and the Open Exchange Format (nva)
- 13.12 What to Hold On To from This Chapter
Chapter 14 — 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 15 — 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 16 — 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 17 — 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
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