AI Programming
34 posts

File Index Handbook - Claude Code Source Code Quick Reference
Claude Code core source code file index, organized by functional modules, with quick location guide for key classes, functions, and configuration files.

200K Context Window——AI's "Memory Palace" Management
Deep dive into Claude Code’s context management mechanism: 200K tokens isn’t “unlimited memory,” how it auto-compacts, precisely prunes, and budget allocates. Unveiling how AI manages massive code information within a limited context window.

Shortcomings - What Claude Code Still Does Imperfectly
An objective analysis of Claude Code’s six major shortcomings: context window ceiling, tool latency accumulation, cost-quality tradeoffs, lack of offline capability, complex logic limitations, and memory system boundaries.

Tool Descriptions——Helping AI "Understand" Each Tool's Manual
Deep dive into Claude Code’s tool description design: how to help AI accurately understand each tool’s purpose and use cases. Unveiling how tool descriptions become “instructions for the model,” how inputSchema affects parameter selection, and the application of dynamic descriptions.

Production-Grade AI Coding Patterns - 6 Reusable Engineering Practices
Six production-grade AI coding patterns extracted from Claude Code source code: Read Before Edit, Graduated Autonomy, Defensive Git, Structured Verification, Scope-Matched Response, and Tool-Level Prompts, plus the wisdom of dual-layer constraints.

Why Does AI Sometimes "Misbehave"?——Prompt Behavior Guidance Techniques
Deep dive into guiding AI behavior through prompts: from Few-shot examples to A/B testing, unveiling how Claude Code uses carefully designed prompts to turn an “impatient” AI into a “patient” one, and solving problems of AI being “over-eager” or “failing to ask when it should.”

Context Management - The Core Capability of AI Coding
An in-depth analysis of Claude Code’s five context management principles: budget setting, content preservation, transparent disclosure, circuit breakers, and conservative estimation - and how to manage 200K tokens like a professional organizer.

System Prompts——The "Director Behind the Scenes"
Deep dive into Claude Code’s system prompt architecture: segmented composition design, division of identity/tools/format/safety modules, and the secrets of model-specific tuning. Unveiling why the same request gets completely different response styles from Claude Code versus ChatGPT.

Agent Loop——How Does an AI's "Brain" Work?
Deep dive into Claude Code’s core Agent Loop: the complete lifecycle from user input to model response. Unveiling the query.ts state machine, tool execution orchestration, and continuation decision logic to understand how the AI coding assistant “thinks” and “acts.”

Different Models, Different "Scripts"——Model-Specific Tuning Revealed
Deep dive into how Claude Code tunes prompts for different models: differences between Claude 3.5 Sonnet and Claude 3 Opus, application of A/B testing in prompt optimization, and prompt version management.
