Documentation
¶
Overview ¶
Package classifier maps deterministic evidence packets to per-comment classifications via short-circuit rules and an LLM provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyShortCircuit ¶
func ApplyShortCircuit(e types.CommentEvidence) (string, *types.Classification)
ApplyShortCircuit is exposed for tests.
func ParseClassification ¶
ParseClassification is exposed for tests.
Types ¶
type Diagnostics ¶
type Diagnostics struct {
Source types.ClassificationSource
RuleName string
RawText string
ParseError string
Usage llm.Usage
}
Diagnostics carries provenance metadata about a classification.
type Options ¶
type Options struct {
LLM llm.Provider
Model string
MaxTokens int
// HistoryRewritten signals that the PR branch was force-pushed: commit
// SHAs may be unreachable, so the prompt forbids referencing them in
// draft replies and we strip evidence SHAs from the final classification.
HistoryRewritten bool
}
Options configures a single classification call.
type Result ¶
type Result struct {
Classification types.Classification
Diagnostics Diagnostics
}
Result wraps a classification with its diagnostics.
func ClassifyComment ¶
ClassifyComment classifies a single inline comment evidence packet.
func ClassifyIssueLevel ¶
func ClassifyIssueLevel(ctx context.Context, e types.IssueLevelEvidence, opts Options) (*Result, error)
ClassifyIssueLevel classifies a review summary or issue comment evidence packet.
Click to show internal directories.
Click to hide internal directories.