docs/18-cache-harness.md
18 — Cache Harness
Picasso v2 treats caching as a harness problem, not only a provider feature. Providers can discount or reuse repeated prompt prefixes, but Picasso owns the decisions that make those prefixes stable, compact, private, and measurable.
Layers
- Local artifact cache: repo maps, symbol outlines, formatted tool schemas, context packs, session summaries, and episode packages.
- Context selector: token-budgeted selection across repo map, memory, active snippets, tool observations, and session state.
Runtime note
Cache accounting: the engine's token-meter usage chunks project into cache-usage LoopEvents (packages/core/src/dsh/project.ts), so picasso run --cache observe --cache-report reports cached tokens on every run. The offline H0–H3 scenario suite (scripts/cache/*) is runtime-independent and remains the evaluation layer.