II.
Page JSON
Structured · livepage:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-001
GAP-PROMPT-001: Prompt Strata Model json
Inspect the normalized record payload exactly as the atlas UI reads it.
{
"id": "page:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-001",
"_kind": "Page",
"_file": "wiki/docs/harness-features-backlog/gaps/prompt-engineering/gap-prompt-001.md",
"_cluster": "wiki",
"attributes": {
"nodeKind": "Page",
"sourcePath": "docs/harness-features-backlog/gaps/prompt-engineering/GAP-PROMPT-001.md",
"sourceKind": "repo-docs",
"title": "GAP-PROMPT-001: Prompt Strata Model",
"displayName": "GAP-PROMPT-001: Prompt Strata Model",
"slug": "docs/harness-features-backlog/gaps/prompt-engineering/gap-prompt-001",
"articlePath": "wiki/docs/harness-features-backlog/gaps/prompt-engineering/GAP-PROMPT-001.md",
"article": "\n# GAP-PROMPT-001: Prompt Strata Model\n\n| Field | Value |\n|-------|-------|\n| Category | prompt-engineering |\n| Priority | Critical |\n| Effort | L |\n| Status | Partial |\n\n## Description\nSeparate prompt assembly into formal strata (stable rules, runtime facts, turn-local instructions) to enable cache optimization and deterministic prompt composition across all harness adapters.\n\n## Current State\nThe prompts module (`packages/sdk/src/prompts/`) has `PromptContext` with per-harness context factories and section render functions. However, there is no formal separation between stable, runtime, and volatile content. The `session:iteration-message` command generates full prompts that mix all strata.\n\n## Target State\nPrompt assembly follows a strata model:\n1. **Stable stratum**: System identity, core rules, tool definitions (rarely changes, highly cacheable)\n2. **Runtime stratum**: Available capabilities, feature flags, workspace context (changes per session)\n3. **Turn-local stratum**: Recent messages, current task, turn-specific instructions (changes every turn)\n\nEach prompt section tagged with its stratum. Composition preserves stratum ordering. Strata boundaries exposed for cache optimization.\n\n## Dependencies\n- None (foundation gap)\n\n## Key Files\n| Component | Path |\n|-----------|------|\n| Prompts module | `packages/sdk/src/prompts/` |\n| Instructions CLI | `packages/sdk/src/cli/` |\n| Session management | `packages/sdk/src/session/` |\n| CC prompt phrasing analysis | [`11-prompt-phrasing-analysis.md`](../../11-prompt-phrasing-analysis.md) -- Section 1 (System Prompt Architecture) documents CC's priority hierarchy model |\n\n## Recommendation\nPhase 1 implementation. Define `PromptStratum` type in `packages/sdk/src/prompts/`. Tag each prompt section with `stable`, `runtime`, or `turnLocal`. Compose prompts stratum-by-stratum with clear boundaries. Add `--show-strata` flag to `instructions:*` commands for debugging.\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": [
{
"from": "page:docs-harness-features-backlog",
"to": "page:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-001",
"kind": "contains_page"
}
]
}