Skip to main content

Crate tokmd_context_policy

Crate tokmd_context_policy 

Source
Expand description

Deterministic context/handoff policy helpers.

Constants§

DEFAULT_DENSE_THRESHOLD
Default tokens-per-line threshold for dense blob detection.
DEFAULT_MAX_FILE_PCT
Default maximum fraction of budget a single file may consume.
DEFAULT_MAX_FILE_TOKENS
Default hard cap for a single file when no explicit cap is provided.

Functions§

assign_policy
Assign an inclusion policy based on size and file classifications.
classify_file
Classify a file for context/handoff hygiene policy evaluation.
compute_file_cap
Compute the maximum tokens a single file may consume.
is_spine_file
Returns true when a path matches a “spine” file that should be prioritized.
smart_exclude_reason
Returns the smart-exclude reason for a path, if any.