Expand description
Context Compiler – builds minimal context packages under budget constraints.
Physical metaphor: Free Energy minimization. F = E - TS, where E = token cost, T = budget pressure, S = information (Phi).
Algorithm:
- LOAD ledger items + active overlays -> candidates
- SCORE Phi(i,t) for each candidate (Context Field)
- SELECT greedy knapsack with view selection
- DEDUP redundancy removal via Jaccard
- ORDER Lost-in-the-Middle reorder (LiTM profile)
- RENDER output in the requested mode
- PROVE record provenance in evidence ledger
Structs§
- Compile
Candidate - A candidate item ready for selection.
- Compile
Result - Result of a compilation run.
- Excluded
Item - Selected
Item
Enums§
- Compile
Mode - Compilation output mode.
Functions§
- compile
- Compile a minimal context package from candidates under budget constraints.
- format_
compile_ result - Format the compilation result for display.