iiRecord
Agentic AI Atlas · GAP-PERF-005: Cache-Aware Prompt Assembly
page:docs-harness-features-backlog-gaps-performance-gap-perf-005a5c.ai
II.
Page reference

page:docs-harness-features-backlog-gaps-performance-gap-perf-005

Reading · 1 min

GAP-PERF-005: Cache-Aware Prompt Assembly reference

Structure prompt assembly so stable segments come first and volatile segments come last, maximizing cache prefix reuse across iterations.

Pagewiki/docs/harness-features-backlog/gaps/performance/GAP-PERF-005.mdOutgoing · 0Incoming · 1

GAP-PERF-005: Cache-Aware Prompt Assembly

FieldValue
Categoryperformance
PriorityHigh
EffortL
StatusMissing

Description

Structure prompt assembly so stable segments come first and volatile segments come last, maximizing cache prefix reuse across iterations.

Current State

The prompts module has PromptContext and per-harness context factories, but prompt sections are assembled without considering cache hit optimization. Phase-specific prompts change between iterations.

Target State

Prompt sections tagged with volatility levels and sorted by stability. Stable segments (system identity, tool definitions) precede runtime segments (workspace context) which precede turn-local segments (current task). Cache-break detection identifies which stratum changed.

Dependencies

Key Files

ComponentPath
Prompts modulepackages/sdk/src/prompts/
Instructions CLIpackages/sdk/src/cli/

Recommendation

Phase 2 implementation. Tag prompt sections with volatility levels and sort by stability during composition.