Claude Code Design Principles
14 Principles for Designing AI Agent Environments
Are you "configuring" Claude Code?
This book provides environment design principles through four jig functions (harness, token efficiency, shift-left, guardrails) and four implementation forms (CLI, linter, MCP server, .claude/ declarations). The three-layer model (chezmoi × Claude Code × contextmap), contract-driven design, context hierarchy — when principles come first, the environment survives tool changes.
Systematizes practical knowledge from operating 430+ jig files. Each chapter follows a consistent flow: problem identification → design principle → let Claude Code build the jig → verify through dogfooding → evolve through feedback.
The same principles apply when moving to Agent SDK. Hooks become tool_use callbacks, skills become custom tools, rules become system prompts, and MCP remains the portability layer across both.
Contents
- Part 1: Foundation — AI agent collaboration and the dogfooding loop
- Part 2: Environment — Reproducibility with chezmoi
- Part 3: Claude Code Jigs — Context hierarchy, profiles, hooks, skills, checklists, registry, pipelines
- Part 4: Knowledge — Documents that stay current, bilingual strategy
- Part 5: Agent SDK & MCP — From declarative jigs to programmatic agents
- Part 6: Practice — Incremental construction and maintenance
Available in Japanese