James' Growth Diary
Author

James' Growth Diary

I am James, focusing on AI Agent learning and growth. I continuously update two series: “AI Agent Mastery Path,” which systematically outlines core theories and practices of agents, and “Claude Code Design Philosophy,” which deeply analyzes the design thinking behind top AI tools. Helping you build a solid foundation in the AI era.

141
Articles
0
Likes
850
Views
0
Comments
Recent Articles

Latest from James' Growth Diary

100 recent articles max
James' Growth Diary
James' Growth Diary
May 17, 2026 · Backend Development

Deep Dive into the buildTool Factory and Its Fail‑Closed Default Values

The article explains how the buildTool factory injects conservative default safety flags (Fail‑Closed), dramatically reduces boilerplate for the 30‑plus methods required by Claude Code's Tool interface, and combines TypeScript compile‑time checks with Zod runtime validation, illustrated with GlobTool, BashTool and FileEditTool examples, while discussing trade‑offs and design recommendations.

Code GenerationFactory PatternFail-Closed
0 likes · 16 min read
Deep Dive into the buildTool Factory and Its Fail‑Closed Default Values
James' Growth Diary
James' Growth Diary
May 17, 2026 · Backend Development

Why Claude Code’s Tool System Relies on a Generic Triple for Safety and Flexibility

The article dissects Claude Code’s tool architecture, showing how a single generic triple (Input, Output, Progress) defined in src/Tool.ts unifies over 60 runtime tools, enforces type‑safe contracts, streamlines permission checks, progress reporting, and implements a fail‑closed default strategy.

Claude CodeDesign PatternsFail-Closed
0 likes · 20 min read
Why Claude Code’s Tool System Relies on a Generic Triple for Safety and Flexibility
James' Growth Diary
James' Growth Diary
May 17, 2026 · Artificial Intelligence

When an Agent Fails: Retry, Fallback, and Human Takeover Strategies

The article classifies agent failures into transient, structural, and semantic types, compares how Claude Code, OpenAI Codex, and Google Gemini CLI agents handle errors, and shows how LangGraph implements robust retry policies, fallback routing, and human‑in‑the‑loop handoff with concrete code examples and best‑practice guidelines.

AgentFallbackLangGraph
0 likes · 16 min read
When an Agent Fails: Retry, Fallback, and Human Takeover Strategies
James' Growth Diary
James' Growth Diary
May 16, 2026 · Artificial Intelligence

MCP Integration Deep Dive: Prompt Cache Stability and Tool Ordering Explained

The article analyzes why connecting an MCP server can triple response latency and token usage, explains how unstable tool ordering breaks Anthropic's prompt cache, and provides detailed code walkthroughs, design insights, common pitfalls, and concrete best‑practice recommendations for building reliable MCP integrations.

AI agent designBest PracticesClaude Code
0 likes · 18 min read
MCP Integration Deep Dive: Prompt Cache Stability and Tool Ordering Explained
James' Growth Diary
James' Growth Diary
May 16, 2026 · Artificial Intelligence

Dynamic Tool Selection Unpacked: Let the Agent Choose the Right Tool with Three Strategies

The article analyzes why binding all tools to an LLM agent is costly and error‑prone, presents benchmark data showing token usage dropping six‑fold and error rates falling by up to five times with dynamic selection, and details three practical strategies—vector retrieval, LLM routing, and rule‑semantic hybrid—along with implementation tips, description engineering, multi‑turn handling, and common pitfalls.

AgentLLMLangGraph
0 likes · 17 min read
Dynamic Tool Selection Unpacked: Let the Agent Choose the Right Tool with Three Strategies
James' Growth Diary
James' Growth Diary
May 15, 2026 · Artificial Intelligence

Five Intent Recognition Designs: From Keyword Matching to Classifier to LLM Self‑Routing – A Decision Tree to Choose the Right One

The article breaks down five production‑grade intent‑recognition designs—keyword matching, regex‑rule engine, embedding classifier, fine‑tuned small model, and zero‑shot LLM routing—provides code snippets, latency and cost benchmarks, decision‑making rules, and shows how a layered architecture can cut API costs from ¥80,000 to ¥3,000 while keeping accuracy above 90%.

LLM routingRule Engineembedding classifier
0 likes · 16 min read
Five Intent Recognition Designs: From Keyword Matching to Classifier to LLM Self‑Routing – A Decision Tree to Choose the Right One
James' Growth Diary
James' Growth Diary
May 14, 2026 · Backend Development

Inside Claude Code Skills: How a Single Markdown File Powers a Five‑Layer Loading Mechanism

The article dissects Claude Code's Skills system, showing how a lone SKILL.md file, combined with a five‑layer file‑system scope, inode‑based deduplication, conditional activation, plugin integration and incremental injection, enables zero‑code extensibility while managing token consumption for LLM agents.

Claude CodeConditional ActivationMarkdown
0 likes · 23 min read
Inside Claude Code Skills: How a Single Markdown File Powers a Five‑Layer Loading Mechanism
James' Growth Diary
James' Growth Diary
May 14, 2026 · Artificial Intelligence

LLM Semantic Routing Explained: Model‑Based Intent Classification and Three Keyword‑Matching Pitfalls

This article breaks down LLM semantic routing as a classifier, compares keyword, embedding, and LLM‑based routes, provides full TypeScript implementations, introduces hybrid routing for speed and accuracy, and covers production‑grade observability and dynamic configuration to avoid common pitfalls.

Hybrid RoutingLLMLangChain
0 likes · 33 min read
LLM Semantic Routing Explained: Model‑Based Intent Classification and Three Keyword‑Matching Pitfalls
James' Growth Diary
James' Growth Diary
May 13, 2026 · Backend Development

How Claude Code Bridges IDEs: Local IPC Meets Remote WebSocket

The article dissects Claude Code's bridge architecture, explaining how a local IDE extension communicates with a CLI via Unix domain sockets while a remote web UI talks to the same process through a WebSocket‑SSE‑polling fallback, and it details the three worker models, three‑layer transport downgrade, four‑layer authentication, the FlushGate pattern, observability design, and the trade‑offs and costs of this 31‑file system.

AuthenticationFlushGateIDE bridge
0 likes · 17 min read
How Claude Code Bridges IDEs: Local IPC Meets Remote WebSocket