iiRecord
Agentic AI Atlas · GAP-PERF-001: Prompt Caching (Ephemeral)
page:docs-harness-features-backlog-gaps-performance-gap-perf-001a5c.ai
II.
Page JSON

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

Structured · live

GAP-PERF-001: Prompt Caching (Ephemeral) json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/harness-features-backlog/gaps/performance/gap-perf-001.mdCluster · wiki
Record JSON
{
  "id": "page:docs-harness-features-backlog-gaps-performance-gap-perf-001",
  "_kind": "Page",
  "_file": "wiki/docs/harness-features-backlog/gaps/performance/gap-perf-001.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/harness-features-backlog/gaps/performance/GAP-PERF-001.md",
    "sourceKind": "repo-docs",
    "title": "GAP-PERF-001: Prompt Caching (Ephemeral)",
    "displayName": "GAP-PERF-001: Prompt Caching (Ephemeral)",
    "slug": "docs/harness-features-backlog/gaps/performance/gap-perf-001",
    "articlePath": "wiki/docs/harness-features-backlog/gaps/performance/GAP-PERF-001.md",
    "article": "\n# GAP-PERF-001: Prompt Caching (Ephemeral)\n\n| Field | Value |\n|-------|-------|\n| Category | performance |\n| Priority | Critical |\n| Effort | L |\n| Status | Missing |\n\n## Description\nImplement prompt caching so that stable prompt segments are reused across orchestration iterations, avoiding redundant token processing on every harness invocation.\n\n## Current State\nEach harness invocation via `invokeHarness()` spawns a fresh CLI process with no mechanism to carry prompt cache state between invocations. Every iteration pays full prompt processing cost.\n\n## Target State\nStable prompt strata are cached between iterations. Cache hit rate is measurable via `tokens:stats`. For a 20-iteration run with a 50K-token system prompt, redundant processing is eliminated.\n\n## Dependencies\n- [GAP-PROMPT-001](../prompt-engineering/GAP-PROMPT-001.md) -- strata separation identifies cacheable segments\n\n## Key Files\n| Component | Path |\n|-----------|------|\n| Harness invoker | `packages/sdk/src/harness/invoker.ts` |\n| Prompts module | `packages/sdk/src/prompts/` |\n| Token stats CLI | `packages/sdk/src/cli/` |\n\n## Recommendation\nPhase 2 implementation. Options: direct API integration bypassing harness CLI (highest savings), session-persistent prompt prefix with harness session binding, or harness-side prompt prefix caching with TTL.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-harness-features-backlog",
      "to": "page:docs-harness-features-backlog-gaps-performance-gap-perf-001",
      "kind": "contains_page"
    }
  ]
}