Skip to main content

Module pipeline

Module pipeline 

Source
Expand description

§Context Pipeline

The pipeline defines the processing stages that content flows through between raw input and the compressed output delivered to the LLM.

§Pipeline Flow

Input → Intent → Relevance → Compression → Translation → Delivery
  • Input: Raw file content / shell output enters the pipeline
  • Intent: Task-conditioned filtering — what is relevant to the current goal?
  • Relevance: Graph/heatmap-based prioritization of content sections
  • Compression: AST signatures, entropy filtering, delta encoding
  • Translation: Token shorthand (TDD), symbol replacement
  • Delivery: LITM positioning, CRP formatting, final output assembly

Each layer can be enabled/disabled per profile (see core::profiles). PipelineStats aggregates per-layer metrics across all runs for observability.

Structs§

AggregatedMetrics
Cumulative token counts and timing for a single pipeline layer across all runs.
LayerInput
Content and metadata passed into a pipeline layer for processing.
LayerMetrics
Performance metrics for a single layer execution: tokens in/out, timing, ratio.
LayerOutput
Result produced by a pipeline layer after processing.
Pipeline
A chain of processing layers that content flows through sequentially.
PipelineStats
Persistent aggregated statistics across all pipeline runs.

Enums§

LayerKind
Identifies a stage in the compression pipeline.

Traits§

Layer
A single processing stage in the compression pipeline.

Functions§

is_layer_enabled
Returns whether a given layer is enabled according to a profile’s pipeline config.