Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 2.38 KB

File metadata and controls

81 lines (57 loc) · 2.38 KB

Sight

AI-powered code review for diffs

Go License CI


Sight provides intelligent code review capabilities by analyzing diffs with AI. It understands context, identifies issues, and suggests improvements.

Ecosystem Boundaries

Sight is a Hawk support engine. Keep the dependency edge one-way:

  • use hawk-core-contracts for any cross-repo shared contracts (severity/finding vocabulary)
  • do not import hawk/internal/*
  • do not import removed legacy path hawk/shared/types; use hawk-core-contracts/types
  • do not import other engines (eyrie, yaad, tok, trace, inspect) — engines are peers, not dependencies

Features

  • Diff-aware analysis - Reviews only changed code with full context
  • Severity classification - Categorizes findings by impact
  • Provider agnostic - Works with any LLM provider through the Provider interface
  • Extensible rules - Add custom review rules for your codebase

Quick Start

go get github.com/GrayCodeAI/sight
import "github.com/GrayCodeAI/sight"

reviewer := sight.NewReviewer(
    sight.WithProvider(myLLMProvider),
    sight.Thorough,
)

result, err := reviewer.Review(ctx, diff)
for _, f := range result.Findings {
    fmt.Printf("[%s] %s:%d - %s\n", f.Severity, f.File, f.Line, f.Message)
}

Examples

See the examples/ directory for runnable code samples.

Provider Interface

Implement the Provider interface to use any LLM:

type Provider interface {
    Chat(ctx context.Context, messages []Message, opts ChatOpts) (*Response, error)
}

Installation

go get github.com/GrayCodeAI/sight@latest

Requires Go 1.26+.

Contributing

Contributions are welcome — please read CONTRIBUTING.md before opening a pull request.

License

MIT - see LICENSE for details.