analyzer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer uses an LLM provider to extract a developer persona from crawled data.

func New

func New(provider llm.Provider) *Analyzer

New returns an Analyzer that uses the given LLM provider.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, username string, data *ghcrawl.CrawlResult) (*Persona, error)

Analyze runs parallel LLM analyses on the crawl data and synthesizes a Persona.

type Persona

type Persona struct {
	Username          string
	CodeStyle         string
	ReviewStyle       string
	Communication     string
	DeveloperIdentity string
	Synthesis         *SynthesisResult
}

Persona holds all analysis results for a developer.

type SynthesisResult

type SynthesisResult struct {
	CodingPhilosophy      string `json:"coding_philosophy"`
	CodeStyleRules        string `json:"code_style_rules"`
	ReviewPriorities      string `json:"review_priorities"`
	ReviewDecisionStyle   string `json:"review_decision_style"`
	ReviewNonBlockingNits string `json:"review_non_blocking_nits"`
	ReviewContext         string `json:"review_context_sensitivity"`
	ReviewVoice           string `json:"review_voice"`
	CommunicationPatterns string `json:"communication_patterns"`
	TestingPhilosophy     string `json:"testing_philosophy"`
	DistinctiveTraits     string `json:"distinctive_traits"`
	DeveloperInterests    string `json:"developer_interests"`
	ActivityPatterns      string `json:"activity_patterns"`
	ProjectPatterns       string `json:"project_patterns"`
	CollaborationStyle    string `json:"collaboration_style"`
	CodeExamples          string `json:"code_examples"`
}

SynthesisResult holds the structured fields produced by the LLM synthesis step.

func ParseSynthesis

func ParseSynthesis(raw string) (*SynthesisResult, error)

ParseSynthesis extracts a SynthesisResult from the LLM response. It handles both raw JSON and JSON wrapped in markdown code fences.

Jump to

Keyboard shortcuts

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