bash git clone https://github.com/Windy3f3f3f3f/how-claude-code-works cd how-claude-code-works Open docs/ folder — plain Markdown, readable in any editor User Input │ ▼ QueryEngine (session management) │ ▼ query() main loop ◄──────────────────────┐ │ │ ▼ │ Claude API (streaming) │ │ │ ├─► Text tokens → stream to terminal │ │ │ └─► Tool calls → ToolExecutionEngine │ │ │ ├─ ReadFile │ ├─ EditFile │ ├─ Shell │ ├─ Search │ └─ MCP Tools │ │ │ └─ results ────────┘ Context Engineering layer feeds: - System prompt - Git status - CLAUDE.md files - Compression pipeline Level 1: TRUNCATE └─ Cut large to…