Documentation
¶
Overview ¶
Package explore provides a fast, structured overview of a repository. No LLM calls — purely static analysis combining file stats, language breakdown, top symbols by call frequency, dead code summary, and packages.
Index ¶
Constants ¶
const HintApproxExploreHealth = "Overview score — excludes dependency-freshness and vulnerability penalties; " +
"run code_health for the full vuln/freshness-adjusted score."
HintApproxExploreHealth is the caveat attached to HealthSummary values produced by the explore tool. The overview score omits dependency-freshness and vulnerability penalties (those require the freshness scanner, which explore does not run). The score may therefore be higher than the full code_health score.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitSummary ¶
type CommitSummary struct {
Hash string `json:"hash"`
Message string `json:"message"`
Date string `json:"date"`
Files int `json:"files_changed"`
}
CommitSummary is a compact view of a recent git commit.
type CommunityCluster ¶
type CommunityCluster struct {
ID int `json:"id"`
Size int `json:"size"`
Symbols []string `json:"symbols"`
}
CommunityCluster describes one community by its top members.
type CommunityOverview ¶
type CommunityOverview struct {
Count int `json:"count"`
Clusters []CommunityCluster `json:"clusters"`
}
CommunityOverview summarizes Louvain community detection results.
type CoupledSummary ¶
type CoupledSummary struct {
FileA string `json:"file_a"`
FileB string `json:"file_b"`
CoChanges int `json:"co_changes"`
}
CoupledSummary is a pair of files that frequently change together.
type DeadCodeSummary ¶
DeadCodeSummary is a compact view of dead code findings.
type DepHighlights ¶
type DepHighlights struct {
ExternalDeps int `json:"external_deps"`
TopFanIn []DepEntry `json:"top_fan_in,omitempty"`
TopFanOut []DepEntry `json:"top_fan_out,omitempty"`
HasCycles bool `json:"has_cycles"`
}
DepHighlights is a compact dependency summary for explore results.
type HealthSummary ¶
type HealthSummary struct {
Score int `json:"score"`
Grade string `json:"grade"`
Approximate bool `json:"approximate,omitempty"`
Hint string `json:"hint,omitempty"`
}
HealthSummary is a lightweight code quality score for explore results.
type LanguageStat ¶
type LanguageStat struct {
Name string `json:"name"`
Files int `json:"files"`
Ratio float64 `json:"ratio"`
}
LanguageStat holds file count and ratio for a detected language.
type OxCodesHealthChecks ¶
type OxCodesHealthChecks struct {
TodoCount int `json:"todo_count,omitempty"`
UnhandledErrors int `json:"unhandled_errors,omitempty"`
MagicNumbers int `json:"magic_numbers_in_functions,omitempty"`
}
OxCodesHealthChecks holds additional quality indicators from ox-codes scoped search.
func RunOxCodesHealthChecks ¶
func RunOxCodesHealthChecks(ctx context.Context, client *oxcodes.Client, root, language string) *OxCodesHealthChecks
RunOxCodesHealthChecks runs additional quality checks via ox-codes scoped search. Returns nil when client is nil or all checks fail.
type Result ¶
type Result struct {
ReadmeExcerpt string `json:"readme_excerpt,omitempty"`
FocusMode string `json:"focus_mode,omitempty"`
FileCount int `json:"file_count"`
SymbolCount int `json:"symbol_count"`
TotalLines int `json:"total_lines"`
Languages []LanguageStat `json:"languages"`
TopSymbols []SymbolSummary `json:"top_symbols"`
DeadCode *DeadCodeSummary `json:"dead_code,omitempty"`
Communities *CommunityOverview `json:"communities,omitempty"`
Packages []string `json:"packages"`
DepHighlights *DepHighlights `json:"dep_highlights,omitempty"`
Health *HealthSummary `json:"health,omitempty"`
Tier string `json:"tier,omitempty"`
Backend string `json:"backend,omitempty"`
RecentCommits []CommitSummary `json:"recent_commits,omitempty"`
TopCoupled []CoupledSummary `json:"top_coupled_files,omitempty"`
}
Result is the structured output of an exploration.