Versions in this module Expand all Collapse all v0 v0.1.1 Jun 25, 2026 Changes in this version + const EmbeddingDimension + func CosineSimilarity(a, b []float32) float32 + func CrossRepoImpact(repos []string, symbol string, maxDepth int) (map[string]*ImpactResult, error) + func CrossRepoQuery(repos []string, query string, limit int) (map[string][]Node, error) + func GenerateEmbedding(node Node) []float32 + type ASTEdge struct + Source string + Target string + Type string + type ASTNode struct + EndPos int + File string + ID string + Name string + StartPos int + Type string + type ASTView struct + Edges []ASTEdge + Nodes []ASTNode + type BetweennessResult struct + Scores map[string]float64 + Top []NodeCentrality + type CFGEdge struct + Source string + Target string + Type string + type CFGNode struct + File string + Function string + ID string + Line int + Type string + type CFGView struct + Edges []CFGEdge + Nodes []CFGNode + type CallEdge struct + Callee string + Caller string + File string + Line int + type CallNode struct + File string + ID string + IsExport bool + Line int + Name string + type CallView struct + Edges []CallEdge + Nodes []CallNode + type CodeGraph struct + func Open(root string) (*CodeGraph, error) + func (cg *CodeGraph) AnalyzeCoupling(topN int) ([]CouplingMetric, error) + func (cg *CodeGraph) BetweennessCentrality(topN int) (*BetweennessResult, error) + func (cg *CodeGraph) BuildContext(query string, maxNodes int) (string, error) + func (cg *CodeGraph) Close() error + func (cg *CodeGraph) CommunityDetection() (*CommunityDetectionResult, error) + func (cg *CodeGraph) ConnectedComponents() ([][]string, error) + func (cg *CodeGraph) DiffGraph(beforeNodes map[string]bool, beforeEdges map[string]bool) *GraphDiff + func (cg *CodeGraph) Explore(query string, maxFiles int) (*ExploreResult, error) + func (cg *CodeGraph) Files(dirFilter string) ([]FileEntry, error) + func (cg *CodeGraph) FindDeadCode() ([]DeadCodeEntry, error) + func (cg *CodeGraph) GetCallees(nodeID string, maxDepth int) ([]Node, error) + func (cg *CodeGraph) GetCallers(nodeID string, maxDepth int) ([]Node, error) + func (cg *CodeGraph) GetImpactRadius(nodeID string, maxDepth int) ([]Node, error) + func (cg *CodeGraph) GetNode(id string) (Node, error) + func (cg *CodeGraph) HybridSearch(query string, limit int) ([]Node, error) + func (cg *CodeGraph) ImpactAnalysis(nodeID string, maxDepth int) (*ImpactResult, error) + func (cg *CodeGraph) IndexDir(dir string) error + func (cg *CodeGraph) IndexFile(filePath string) error + func (cg *CodeGraph) PageRank(iterations int, damping float64) (map[string]float64, error) + func (cg *CodeGraph) ResolveRefs() error + func (cg *CodeGraph) Search(query string, limit int) ([]Node, error) + func (cg *CodeGraph) SemanticSearch(query string, limit int) ([]Node, error) + func (cg *CodeGraph) SnapshotGraph() (nodes map[string]bool, edges map[string]bool, err error) + func (cg *CodeGraph) Stats() (map[string]interface{}, error) + func (cg *CodeGraph) Status() (*StatusResult, error) + func (cg *CodeGraph) Sync() (*SyncResult, error) + func (cg *CodeGraph) Trace(fromName, toName string) ([]Node, error) + type CodePattern struct + Description string + Example string + Files []string + Frequency int + Name string + PatternID string + Tags []string + WhenToUse string + func ExtractPatternsFromCode(nodes []Node) []CodePattern + type CodeVectorStore struct + func NewCodeVectorStore() *CodeVectorStore + func (cvs *CodeVectorStore) HybridSearch(ctx context.Context, query string, limit int, keywordResults []Node) ([]Node, error) + func (cvs *CodeVectorStore) IndexNode(ctx context.Context, node Node) error + func (cvs *CodeVectorStore) SearchCode(ctx context.Context, query string, limit int) ([]Node, error) + func (cvs *CodeVectorStore) Stats() map[string]interface{} + type Collection struct + type Community struct + ID int + Nodes []string + Score float64 + type CommunityDetectionResult struct + Communities []Community + Modularity float64 + type CouplingMetric struct + Coupling float64 + FileA string + FileB string + SharedDeps int + type CrossRepoCall struct + File string + FromRepo string + Line int + Symbol string + Target Node + ToRepo string + func FindCrossRepoCalls(repos []string) ([]CrossRepoCall, error) + type DFGEdge struct + Source string + Target string + Type string + type DFGNode struct + File string + ID string + Line int + Name string + Type string + Variable string + type DFGView struct + Edges []DFGEdge + Nodes []DFGNode + type DeadCodeEntry struct + Confidence float64 + Node Node + Reason string + type Edge struct + ID int + Kind string + Line int + Metadata string + Source string + Target string + type ExploreResult struct + Files map[string][]Node + SourceLines map[string]string + type FileEntry struct + IndexedAt int + Language string + NodeCount int + Path string + Size int + type GraphDiff struct + AddedEdges int + AddedNodes []string + Affected []string + RemovedEdges int + RemovedNodes []string + type ImpactResult struct + Impacted map[string]int + MaxDepth int + Nodes []Node + Root string + type IssueMemory struct + Approach string + CreatedAt time.Time + Description string + Duration string + FilesChanged []string + FixPattern string + IssueID string + RootCause string + Success bool + SymbolsUsed []string + Tags []string + Title string + type LanguageExtractor struct + BodyField string + CallTypes []string + ClassTypes []string + EnumTypes []string + ExtractImport func(node *sitter.Node, source []byte) (fromPath string, names []string) + FunctionTypes []string + GetSignature func(node *sitter.Node, source []byte) string + GetVisibility func(node *sitter.Node, source []byte) string + ImportTypes []string + InterfaceTypes []string + IsExported func(node *sitter.Node, source []byte) bool + MethodTypes []string + NameField string + ParamsField string + StructTypes []string + TypeAliasTypes []string + VariableTypes []string + type MemoryStore interface + Delete func(key string) error + List func(prefix string) ([]string, error) + Load func(key string) ([]byte, error) + Save func(key string, value []byte) error + type MultiViewGraph struct + AST *ASTView + CFG *CFGView + Call *CallView + DFG *DFGView + func BuildMultiViewGraph(filePath string, source []byte) (*MultiViewGraph, error) + type Node struct + Docstring string + EndLine int + FilePath string + ID string + IsExported bool + Kind string + Language string + Name string + QualifiedName string + Signature string + StartLine int + Visibility string + type NodeCentrality struct + FilePath string + Kind string + Name string + NodeID string + Score float64 + type RepoMemory struct + func NewRepoMemory(store MemoryStore) *RepoMemory + func (rm *RepoMemory) BuildContextFromMemory(query string) string + func (rm *RepoMemory) FindRelevantPatterns(context string, limit int) ([]CodePattern, error) + func (rm *RepoMemory) FindSimilarIssues(description string, limit int) ([]IssueMemory, error) + func (rm *RepoMemory) SaveIssue(mem IssueMemory) error + func (rm *RepoMemory) SavePattern(pattern CodePattern) error + type SearchResult struct + ID string + Metadata map[string]string + Score float32 + type StatusResult struct + DBPath string + DBSizeBytes int64 + Edges int + Files int + FilesByLang map[string]int + JournalMode string + Nodes int + NodesByKind map[string]int + ProjectRoot string + Unresolved int + UpToDate bool + type SyncResult struct + DurationMs int + FilesAdded int + FilesChecked int + FilesModified int + FilesRemoved int + NodesUpdated int + type UnresolvedRef struct + FilePath string + FromNodeID string + Language string + Line int + ReferenceKind string + ReferenceName string + type Vector struct + Embedding []float32 + ID string + Metadata map[string]string + type VectorStore struct + func NewVectorStore(dim int) *VectorStore + func (vs *VectorStore) Add(ctx context.Context, id string, embedding []float32, ...) error + func (vs *VectorStore) Count(ctx context.Context) int + func (vs *VectorStore) Delete(ctx context.Context, id string) error + func (vs *VectorStore) Search(ctx context.Context, query []float32, k int) ([]SearchResult, error)