Documentation
¶
Overview ¶
Package pipeline defines the filtering pyramid (PRD section 15): cheap layers run first and only what they cannot conclude is escalated to the next, more expensive layer. Layer 0 (change filter), 1 (regex) and 2 (AST) are all that codefit runs — MCP-first, codefit never reaches a layer-3 LLM; the agent reasons over the mapped surface with its own model.
Pipeline runs its LayerProcessor tiers in FilterLayer order, threading each layer's escalated files into the next. The concrete layer implementations arrive with the sensors.
Status: INERT. Built and tested, but not yet wired to any consumer. The MCP orchestrator will use it in Fase 1; kept in the core per PRD section 15.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterLayer ¶
type FilterLayer int
FilterLayer identifies a tier of the filtering pyramid, ordered from cheapest (0) to most expensive (2). Cheaper layers run first and only what they cannot conclude is escalated to the next (PRD section 15). codefit never goes past layer 2: it produces deterministic findings and maps surface; the agent does the layer-3 reasoning over the surface with its own LLM.
const ( LayerChanges FilterLayer = 0 // unchanged files (via --since or cache hash) LayerPatterns FilterLayer = 1 // regex / obvious patterns LayerAST FilterLayer = 2 // AST: deterministic findings + surface mapping )
type LayerProcessor ¶
type LayerProcessor interface {
Layer() FilterLayer
Process(files []string, ctx auditctx.AuditContext) (PipelineResult, error)
}
LayerProcessor is one tier of the pyramid.
type Pipeline ¶
type Pipeline struct {
Layers []LayerProcessor
}
Pipeline orchestrates the layers in order, threading each layer's escalated files into the next.
type PipelineResult ¶
PipelineResult is what a layer returns: the findings it concluded and the files/fragments it escalates to the next layer.