Skip to main content

Module litm

Module litm 

Source

Structs§

LitmProfile
PositionedOutput

Constants§

DEFAULT_ACTIVE_SESSION_BUDGET
Default hard ceiling (tokens) on the re-injected ACTIVE SESSION block (#962). Generous: a true safety cap that normal sessions never hit, so default output is unchanged while a pathological session can no longer crowd out the task.
DEFAULT_BEGIN_SHARE
Share of items placed at the begin position (the static layout).

Functions§

active_session_budget
Effective ACTIVE SESSION token budget (LEAN_CTX_ACTIVE_SESSION_BUDGET overrides).
position_optimize
Sorts session state fields by attention priority: P1 (begin): task, decisions, project topology, file refs P2 (end): recent findings, test results, next steps P3 (dropped): old completed tasks, historical reads beyond limit
position_optimize_with_share
Variant with an explicit begin_share: < 0.6 means the begin position under-performs for this client — progress moves to the end block and the task line is duplicated there (recency rescue for the most critical item). At the default share the layout is byte-identical to the uncalibrated version.