驾驭工程:从 Claude Code 源码到 AI 编码最佳实践
这是一本围绕 Harness Engineering(驾驭工程)的中文技术书。它以 Claude Code v2.1.88 的公开发布包与 source map 还原结果为分析材料,不试图复刻官方产品文档,而是从真实工程实现中提炼 AI 编码 Agent 的架构模式、上下文策略、权限体系和生产实践。
课时
- 第一篇:架构 — Claude Code 如何运作
- 第二篇:提示工程 — 系统提示词作为控制面
- 第三篇:上下文管理 — 200K Token 竞技场
- 第四篇:提示词缓存 — 隐藏的成本优化器
- 第五篇:安全与权限 — 纵深防御
- 第六篇:高级子系统
- 第七篇:AI Agent 构建者的经验教训
- 附录
- book-en
- 源码
- Preface
- Summary
- appendix
- part1
- Chapter 1: The Full Tech Stack of an AI Coding Agent
- Chapter 2: Tool System — 40+ Tools as the Model's Hands
- Chapter 3: Agent Loop — The Full Lifecycle from User Input to Model Response
- Chapter 4: Tool Execution Orchestration — Permissions, Concurrency, Streaming, and Interrupts
- Chapter 4b: Plan Mode — From "Act First, Ask Later" to "Look Before You Leap"
- part2
- part3
- part4
- part5
- Chapter 16: Permission System
- Chapter 17: YOLO Classifier
- Chapter 17b: Prompt Injection Defense — From Unicode Sanitization to Defense in Depth
- Chapter 18: Hooks — User-Defined Interception Points
- Chapter 18b: Sandbox System — Multi-Platform Isolation from Seatbelt to Bubblewrap
- Chapter 19: CLAUDE.md — User Instructions as an Override Layer
- part6
- Chapter 20: Agent Spawning and Orchestration
- Chapter 20b: Teams and Multi-Process Collaboration
- Chapter 20c: Ultraplan -- Remote Multi-Agent Planning
- Chapter 21: Effort, Fast Mode, and Thinking
- Chapter 22: Skills System -- From Built-In to User-Defined
- Chapter 22b: Plugin System -- Extension Engineering from Packaging to Marketplace
- Chapter 23: The Unreleased Feature Pipeline -- The Roadmap Behind 89 Feature Flags
- Supplementary Chapter: Cross-Session Memory -- From Forgetfulness to Persistent Learning
- Chapter 24: Cross-Session Memory -- From Forgetfulness to Persistent Learning
- part7
- Chapter 24: Harness Engineering Principles
- Chapter 25: Harness Engineering Principles
- Chapter 26: Context Management as a Core Competency
- Chapter 27: Production-Grade AI Coding Patterns
- Chapter 28: Where Claude Code Falls Short (And What You Can Fix)
- Chapter 29: Observability Engineering — From logEvent to Production-Grade Telemetry
- Chapter 30: Build Your Own AI Agent — From Claude Code Patterns to Practice
- 源码
- book
- 文档
- 示例
开始学习 → Appendix A: Key File Index