# Summary

[Preface](./preface.md)

---

# Part I: Architecture — How Claude Code Works

- [Chapter 1: The Full Tech Stack of an AI Coding Agent](./part1/ch01.md)
- [Chapter 2: Tool System — 40+ Tools as the Model's Hands](./part1/ch02.md)
- [Chapter 3: Agent Loop — The Full Lifecycle from User Input to Model Response](./part1/ch03.md)
- [Chapter 4: Tool Execution Orchestration — Permissions, Concurrency, Streaming, and Interrupts](./part1/ch04.md)
- [Chapter 4b: Plan Mode — From "Act First, Ask Later" to "Look Before You Leap"](./part1/ch04b.md)

---

# Part II: Prompt Engineering — System Prompts as the Control Plane

- [Chapter 5: System Prompt Architecture](./part2/ch05.md)
- [Chapter 6: Steering Behavior Through Prompts](./part2/ch06.md)
- [Chapter 6b: API Communication Layer — Retry, Streaming, and Degradation Engineering](./part2/ch06b.md)
- [Chapter 7: Model-Specific Tuning and A/B Testing](./part2/ch07.md)
- [Chapter 8: Tool Prompts as Micro-Harnesses](./part2/ch08.md)

---

# Part III: Context Management — The 200K Token Arena

- [Chapter 9: Automatic Compaction — When and How Context Gets Compressed](./part3/ch09.md)
- [Chapter 10: File State Preservation After Compaction](./part3/ch10.md)
- [Chapter 11: Micro-Compaction — Precise Context Pruning](./part3/ch11.md)
- [Chapter 12: Token Budgeting Strategies](./part3/ch12.md)

---

# Part IV: Prompt Caching — The Hidden Cost Optimizer

- [Chapter 13: Cache Architecture and Breakpoint Design](./part4/ch13.md)
- [Chapter 14: Cache Break Detection System](./part4/ch14.md)
- [Chapter 15: Cache Optimization Patterns](./part4/ch15.md)

---

# Part V: Safety and Permissions — Defense in Depth

- [Chapter 16: Permission System](./part5/ch16.md)
- [Chapter 17: YOLO Classifier](./part5/ch17.md)
- [Chapter 17b: Prompt Injection Defense — From Unicode Sanitization to Defense in Depth](./part5/ch17b.md)
- [Chapter 18: Hooks — User-Defined Interception Points](./part5/ch18.md)
- [Chapter 18b: Sandbox System — Multi-Platform Isolation from Seatbelt to Bubblewrap](./part5/ch18b.md)
- [Chapter 19: CLAUDE.md — User Instructions as an Override Layer](./part5/ch19.md)

---

# Part VI: Advanced Subsystems

- [Chapter 20: Agent Spawning and Orchestration](./part6/ch20.md)
- [Chapter 20b: Teams and Multi-Process Collaboration](./part6/ch20b.md)
- [Chapter 20c: Ultraplan — Remote Multi-Agent Planning](./part6/ch20c.md)
- [Chapter 21: Effort, Fast Mode, and Thinking](./part6/ch21.md)
- [Chapter 22: Skills System — From Built-In to User-Defined](./part6/ch22.md)
- [Chapter 22b: Plugin System — From Packaging to Marketplace Extension Engineering](./part6/ch22b.md)
- [Chapter 23: The Unreleased Feature Pipeline — The Roadmap Behind 89 Feature Flags](./part6/ch23.md)
- [Chapter 24: Cross-Session Memory — From Forgetfulness to Persistent Learning](./part6/ch24.md)

---

# Part VII: Lessons for AI Agent Builders

- [Chapter 25: Harness Engineering Principles](./part7/ch25.md)
- [Chapter 26: Context Management as a Core Capability](./part7/ch26.md)
- [Chapter 27: Production-Grade AI Coding Patterns](./part7/ch27.md)
- [Chapter 28: Where Claude Code Falls Short](./part7/ch28.md)
- [Chapter 29: Observability Engineering — From logEvent to Production-Grade Telemetry](./part7/ch29.md)
- [Chapter 30: Build Your Own AI Agent — From Claude Code Patterns to Practice](./part7/ch30.md)

---

# Appendix

- [Appendix A: Key File Index](./appendix/a-file-index.md)
- [Appendix B: Environment Variable Reference](./appendix/b-env-vars.md)
- [Appendix C: Glossary](./appendix/c-glossary.md)
- [Appendix D: Full List of 89 Feature Flags](./appendix/d-feature-flags.md)
- [Appendix E: Version Evolution Log](./appendix/e-version-evolution.md)
- [Appendix F: End-to-End Case Traces](./appendix/f-e2e-traces.md)
- [Appendix G: Authentication & Subscription System](./appendix/g-auth-subscription.md)
