model

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIAnalysis

type AIAnalysis struct {
	Summary         string
	Before          string
	After           string
	Issues          []AIIssue
	ReviewQuestions []ReviewQuestion
	TestVerdict     TestVerdict
	Verdict         string
	VerdictReason   string
	RiskCommentary  []RiskComment
}

type AIIssue

type AIIssue struct {
	Severity    Severity
	File        string
	Line        int
	WhatChanged string
	WhyRisky    string
	TradeOff    string
	Suggestion  string
}

type AISlopResult

type AISlopResult struct {
	Verdict     string // "ai-assisted", "inconclusive", "human"
	Confidence  int
	Evidence    []string
	PatternHits []PatternHit
	LLMVerdict  string
}

type ASTResult

type ASTResult struct {
	Functions  []FuncChange
	NewExports []string
}

type ArchChange

type ArchChange struct {
	Description string
	Details     []string
}

type ArchResult

type ArchResult struct {
	Before          []ArchChange
	After           []ArchChange
	DesignDecisions []string
	NewDeps         []string
	NewPackages     []string
}

type AuthorProfile

type AuthorProfile struct {
	Login            string
	MergedPRs        int
	FirstContribDate time.Time
	LastContribDate  time.Time
	TopAreas         []string
	IsFirstTime      bool
}

type BlameLine

type BlameLine struct {
	Author string
	Email  string
	Login  string // GitHub username (may be empty if git author has no linked GitHub account)
	Line   int
	Date   time.Time
}

type BlameResult

type BlameResult struct {
	Path  string
	Lines []BlameLine
}

type ChangeType

type ChangeType string
const (
	ChangeTypeFeature  ChangeType = "Feature"
	ChangeTypeBugfix   ChangeType = "Bugfix"
	ChangeTypeRefactor ChangeType = "Refactor"
	ChangeTypeDocs     ChangeType = "Docs"
	ChangeTypeDeps     ChangeType = "Deps"
	ChangeTypeTest     ChangeType = "Test"
	ChangeTypeConfig   ChangeType = "Config"
	ChangeTypeMixed    ChangeType = "Mixed"
)

type ClassifyResult

type ClassifyResult struct {
	Type       ChangeType
	Confidence string
}

type CoverageResult

type CoverageResult struct {
	TestRatio float64
	TestLines int
	ImplLines int
	Functions []FuncCoverage
}

type CoverageStatus

type CoverageStatus int
const (
	CoverageCovered CoverageStatus = iota
	CoverageNotTested
	CoverageNoTestFile
)

func (CoverageStatus) String

func (c CoverageStatus) String() string

type CriticalPath

type CriticalPath struct {
	Path           string
	WhyCritical    string
	RegressionRisk string
}

type DirStat

type DirStat struct {
	Dir        string
	LinesAdded int
	Percentage float64
}

type FileContent

type FileContent struct {
	Path    string
	Content string
	SHA     string
}

type FileDiff

type FileDiff struct {
	Path        string
	OldPath     string
	Status      string // added, modified, deleted, renamed
	Additions   int
	Deletions   int
	Patch       string
	IsBinary    bool
	IsGenerated bool
}

type FuncChange

type FuncChange struct {
	Name       string
	File       string
	Exported   bool
	ChangeKind string // added, modified, deleted
	Signature  string
}

type FuncCoverage

type FuncCoverage struct {
	FuncName string
	File     string
	TestFile string
	TestFunc string
	Status   CoverageStatus
}

type MissingScenario

type MissingScenario struct {
	Scenario  string
	WhyNeeded string
}

type PRData

type PRData struct {
	Input     PRInput
	Meta      PRMetadata
	Diffs     []FileDiff
	BaseFiles []FileContent
	HeadFiles []FileContent
	Blames    []BlameResult
	Author    AuthorProfile
}

type PRInput

type PRInput struct {
	Owner  string
	Repo   string
	Number int
}

type PRMetadata

type PRMetadata struct {
	Title       string
	Author      string
	State       string
	CreatedAt   time.Time
	HeadBranch  string
	BaseBranch  string
	IsDraft     bool
	ReviewCount int
	CIStatus    string
	BaseSHA     string
	HeadSHA     string
}

type PRReport

type PRReport struct {
	Input         PRInput
	Meta          PRMetadata
	Scope         ScopeResult
	Classify      ClassifyResult
	AST           ASTResult
	Coverage      CoverageResult
	Risks         []RiskFlag
	Reviewers     []Reviewer
	Architecture  ArchResult
	ReviewFocus   []ReviewFocus
	Verdict       Verdict
	VerdictNote   string
	Author        AuthorProfile
	AI            *AIAnalysis
	AISlop        *AISlopResult
	PersonaReview string
}

type PatternHit

type PatternHit struct {
	Field       string
	Pattern     string
	MatchedText string
}

type ReviewFocus

type ReviewFocus struct {
	File     string
	Priority string
	Why      string
	LookFor  []string
}

type ReviewQuestion

type ReviewQuestion struct {
	Question  string
	WhereLook string
	HowVerify string
}

type Reviewer

type Reviewer struct {
	Login      string
	Confidence string
	Ownership  float64
	Files      []string
	Reason     string
	LastActive string
}

type RiskComment

type RiskComment struct {
	File          string
	Line          int
	Pattern       string
	AIAssessment  string
	IsRealProblem bool
}

type RiskFlag

type RiskFlag struct {
	Severity    Severity
	File        string
	Line        int
	Description string
	Code        string
}

type ScopeResult

type ScopeResult struct {
	FilesChanged  int
	TotalAdded    int
	TotalDeleted  int
	PackagesCount int
	DirBreakdown  []DirStat
	Complexity    int
}

type Severity

type Severity int
const (
	SeverityLow Severity = iota
	SeverityMedium
	SeverityHigh
)

func (Severity) String

func (s Severity) String() string

type TestVerdict

type TestVerdict struct {
	Sufficient       bool
	Summary          string
	CriticalUntested []CriticalPath
	KeyTestFiles     []string
	MissingScenarios []MissingScenario
}

type Verdict

type Verdict string
const (
	VerdictApprove        Verdict = "Approve"
	VerdictRequestChanges Verdict = "Request changes"
	VerdictDiscuss        Verdict = "Needs discussion"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL