Expand description
Typed incremental ModelContext / WorldState fragments.
CodeWhale already assembles prompts most-static → most-volatile for prefix
caching (prompts.rs). This module adds the missing identity layer: each
volatile concern is a capped, marked fragment with render_diff so an
environment or agent-topology change does not rebuild unrelated material.
The constitution / mode base stays outside WorldState and remains the cache-stable prefix. WorldState owns only the mutable mid-session layers.
Structs§
- Model
Context Fragment - One capped WorldState section with a stable marker and content hash.
- World
State - Mutable mid-session context layer living below the constitution prefix.
- World
State Snapshot - Constitution (cache-stable) + WorldState (volatile) assembly point.
Enums§
- Fragment
Id - Stable identity for a WorldState concern. Markers are public contract — do not rename without a migration note (prefix-cache + tests pin them).
- Fragment
Render - Result of comparing a fragment against its previous render.
- Fragment
Role - Explicit role of a fragment relative to the cache-stable constitution.
Constants§
- DEFAULT_
FRAGMENT_ MAX_ BYTES - Re-export the core hard caps — single source of truth.