4-Layer Prompt Pipeline

Description

System prompt assembly pipeline with four layers and an explicit cache boundary after Layer 2. L1 core prompt (most cacheable, rarely changes), L2 MCP tool definitions (cache boundary here), L3 dynamic context (CLAUDE.md, project state), L4 user turn injection. Built-in tools are ordered BEFORE MCP tools so that adding/removing an MCP server does not invalidate the expensive built-in tool definitions.

Key claims

Relations

Sources

src-20260419-be936b1b7d4c