# Compile bounded context from reconciled state

Context should be a deterministic projection of validated Active State before optional retrieval or learned compression is allowed to enrich it.

Status: Planned · not available. Prelaunch; not a live service guarantee.
Managed payload-bearing context, complete model-request token budgeting, provider-cache integration, live runtime injection and action barriers are planned—not public capabilities.

Reviewed: 2026-10-06.
Backend source: 16f1e66d303a43e245a5cff5c392e9ebd3adf201.
Native toolkit review candidate: fe3df1c237b48d04347b6f159cc49e2f0d830a2c (unmerged).
HTML: /docs/context

> Models should reason; they should not have to rediscover required operational state every turn.

## Required evidence wins before optional relevance

A View owns requiredness, source identity, freshness and deterministic priority. Missing or expired required evidence should block rather than disappear because a token budget is tight.

Optional evidence can later use customer-provided retrieval and ranking adapters, but relevance scoring must not demote required operational dependencies.

## Prefer deterministic operators before model compression

1. **Project fields** — Select the task-relevant structured fields before summarizing an entire payload.

2. **Deduplicate exact evidence** — Render one repeated exact fact while preserving its provenance; contradictory evidence must remain visible.

3. **Budget deterministically** — Admit required dependency closure first, then optional evidence in stable order within a complete-request budget.

4. **Reuse safely** — Reuse deterministic output only while source versions, freshness, authority and renderer inputs remain applicable.

## Adapters connect providers; Rust keeps the rules

Retrievers, embeddings, rerankers, provider token counters and optional compressors belong behind explicit adapters. Their captured outputs can feed the deterministic core without becoming authorization or historical truth.

Provider prompt caching and Kam State reuse are separate optimizations: one reuses model-prefix processing, the other avoids rebuilding operational state.
