4-Layer Prompt Pipeline
- Entity ID:
ent-20260419-1ef0c2d239f3 - Type:
concept - Scope:
shared - Status:
active - Aliases: four-layer system prompt, prompt assembly layers
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
- Built-in tools ordered before MCP tools for cache stability
- CLAUDE.md stability is the single biggest cache optimization
- System prompt has five input layers (static, dynamic, tools, memory, user)
Relations
- 4-Layer Prompt Pipeline --[supports]--> Cache Economics
- 4-Layer Prompt Pipeline --[related_to]--> System Prompt Assembly
- David Breunig System Prompt Interactive Map --[summarizes]--> 4-Layer Prompt Pipeline