Versions in this module Expand all Collapse all v0 v0.5.0 May 11, 2026 v0.4.0 May 5, 2026 v0.2.0 May 3, 2026 Changes in this version + func FilterFindings(ctx context.Context, provider Provider, findings []Finding, ...) ([]Finding, []FilterResult, error) + type ConcernSpec struct + Enabled bool + MinConfidence float64 + SystemPrompt string + Type ConcernType + func DefaultConcerns() []ConcernSpec + func RouteConcerns(diff string, allConcerns []ConcernSpec) []ConcernSpec + type ConcernType string + const ConcernCorrectness + const ConcernMaintainability + const ConcernPerformance + const ConcernSecurity + const ConcernStyle + const ConcernTestCoverage + type FilterConfig struct + BatchSize int + ConfidenceThreshold float64 + MaxParallel int + MinSeverity Severity + func DefaultFilterConfig() FilterConfig + type FilterResult struct + Confidence float64 + Confirmed bool + Finding Finding + Reasoning string v0.1.0 May 2, 2026 Changes in this version + const FilterAdded + const FilterDiffContext + const FilterFile + const FilterNone + var ErrContextCancelled = errors.New("sight: context cancelled") + var ErrEmptyDiff = errors.New("sight: empty diff; nothing to review") + var ErrNoProvider = errors.New("sight: no provider configured; use WithProvider()") + func CustomChecksToConcerns(checks []CustomCheck) []review.Concern + func EvalSummary(results []EvalResult) (passed, failed int, rate float64) + func LoadProjectRules(dir string) string + type ChatOpts struct + MaxTokens int + Model string + System string + Temperature float64 + type CustomCheck struct + Enabled bool + Languages []string + Name string + Prompt string + Severity string + func LoadChecks(dir string) ([]CustomCheck, error) + func LoadChecksFromRepo(repoDir string) ([]CustomCheck, error) + type Description struct + ChangeType string + Changes []string + Risk string + Summary string + TestPlan string + Title string + func Describe(ctx context.Context, rawDiff string, opts ...Option) (*Description, error) + type EvalCase struct + DenyFindings []EvalDenial + Diff string + ExpectFindings []EvalExpectation + Name string + type EvalDenial struct + Concern string + MessageContains string + type EvalExpectation struct + Concern string + File string + MessageContains string + MinSeverity string + type EvalResult struct + Case string + Failures []string + Findings []Finding + Passed bool + func RunEval(ctx context.Context, suite *EvalSuite, opts ...Option) ([]EvalResult, error) + type EvalSuite struct + Cases []EvalCase + func LoadEvalSuite(path string) (*EvalSuite, error) + func ParseEvalSuite(data []byte) (*EvalSuite, error) + type FileChange struct + Content string + Diff string + OldPath string + Path string + type FileConfig struct + Concerns []string + Exclude []string + FailOn string + GitContext *bool + MaxTokens int + Model string + Parallel *bool + Prompts map[string]string + Reflection *bool + func LoadConfigFile(dir string) (*FileConfig, error) + type FilterMode = comment.FilterMode + type Finding struct + CWE string + Concern string + EndLine int + File string + Fix string + Line int + Message string + Reasoning string + Severity Severity + type ImproveResult struct + Improvements []Improvement + TokensUsed int + func Improve(ctx context.Context, rawDiff string, opts ...Option) (*ImproveResult, error) + type Improvement struct + After string + Before string + Category string + Description string + EndLine int + File string + Line int + Reasoning string + type IncrementalState struct + func NewIncrementalState(lastSHA string) *IncrementalState + func (s *IncrementalState) LastReviewedSHA() string + func (s *IncrementalState) SetLastReviewedSHA(sha string) + type InlineComment struct + Body string + EndLine int + Path string + StartLine int + Suggestion string + type Message struct + Content string + Role string + type Option interface + var CI Option = optFunc(func(c *config) { ... }) + var Quick Option = optFunc(func(c *config) { ... }) + var SecurityFocus Option = optFunc(func(c *config) { ... }) + var Thorough Option = optFunc(func(c *config) { ... }) + func ApplyFileConfig(fc *FileConfig) []Option + func WithConcerns(concerns ...string) Option + func WithContextLines(n int) Option + func WithCustomChecks(dir string) Option + func WithCustomChecksFromRepo(repoDir string) Option + func WithExclude(patterns ...string) Option + func WithFailOn(sev Severity) Option + func WithFilterMode(mode FilterMode) Option + func WithGitContext(enabled bool) Option + func WithMaxTokens(n int) Option + func WithMinScore(n int) Option + func WithModel(model string) Option + func WithParallel(enabled bool) Option + func WithProjectRules(rules string) Option + func WithProvider(p Provider) Option + func WithReflection(enabled bool) Option + func WithSymbols(enabled bool) Option + type PRSource struct + Number int + Owner string + Repo string + type Provider interface + Chat func(ctx context.Context, messages []Message, opts ChatOpts) (*Response, error) + type Response struct + Content string + TokensUsed int + type Result struct + Comments []InlineComment + FailOn Severity + Findings []Finding + Report string + Stats Stats + func Review(ctx context.Context, diff string, opts ...Option) (*Result, error) + func ReviewIncremental(ctx context.Context, base, head string, state *IncrementalState, ...) (*Result, error) + func (r *Result) Failed() bool + func (r *Result) MaxSeverity() Severity + type Reviewer struct + func NewReviewer(opts ...Option) *Reviewer + func (r *Reviewer) Review(ctx context.Context, rawDiff string) (*Result, error) + func (r *Reviewer) ReviewFiles(ctx context.Context, files []FileChange) (*Result, error) + type Severity int + const SeverityCritical + const SeverityHigh + const SeverityInfo + const SeverityLow + const SeverityMedium + func ParseSeverity(s string) Severity + func (s Severity) AtLeast(threshold Severity) bool + func (s Severity) String() string + type Stats struct + ByConcern map[string]int + BySeverity map[Severity]int + DurationPerConcern map[string]time.Duration + FilesReviewed int + FindingsTotal int + HunksAnalyzed int + TokensUsed int