Versions in this module Expand all Collapse all v0 v0.8.0 Mar 29, 2026 Changes in this version + const MaxPoolSize + const ReservedGhostRange + const TestPriorityCritical + const TestPriorityLikely + const TestPriorityPeripheral + var DefaultEdgeWeights = map[EdgeType]float64 + var EdgeTypeCatalog = []EdgeTypeDescriptor + var Pool = NewStringPool() + func CrossDomainCategory(et EdgeType) string + func ExportDOT(nodes []*Node, edges []*Edge, repoRoot string, includeMeta bool) string + func ExportGraphML(nodes []*Node, edges []*Edge, repoRoot string) string + func ExportMermaid(nodes []*Node, edges []*Edge, repoRoot string, includeMeta bool) string + func IntentCarveWeights(intent string) map[EdgeType]float64 + func IntentDirectionBoost(intent string) float64 + func IsCrossDomainEdge(et EdgeType) bool + func NodeTypeToUint8(nt NodeType) uint8 + func Serialize(fg *FlatGraph, w io.Writer) error + type APISurfaceInfo struct + BreakingRisk string + Exported bool + ExternalPackages int + type BulkEdge struct + From NodeIndex + To NodeIndex + Weight float32 + type CallSite struct + CallerFile string + CallerID NodeID + FuncName string + PkgAlias string + type CarveConfig struct + Alpha float64 + CrossDomainDecay float64 + DecayFactor float64 + DirectionBoost float64 + EdgeWeights map[EdgeType]float64 + EmbeddingLookup func(ids []NodeID) map[NodeID][]float32 + ExcludeTestFiles bool + ExcludeTypes map[NodeType]bool + HybridLambda float64 + IntentID string + LearnedEdgeWeights map[EdgeWeightKey]float64 + LearnedEdgeWeightsVersion int64 + MaxDepth int + MinRelevance float64 + QualityScoreLookup func(nodes []QualityNode) map[NodeID]float64 + TokenBudget int + UsePPR bool + func DefaultCarveConfig() CarveConfig + type CarvedNode struct + Hop int + Node *Node + Relevance float64 + type CrossDomainContext struct + ConfiguredBy []CarvedNode + Consumes []CarvedNode + Deploys []CarvedNode + DocumentedIn []CarvedNode + Manual []CarvedNode + Mentions []CarvedNode + Related []CarvedNode + func (c *CrossDomainContext) IsEmpty() bool + type CrossDomainRef struct + Category string + EdgeType EdgeType + type DomainType string + const DomainAPI + const DomainCode + const DomainCustom + const DomainDocs + const DomainInfra + const DomainIssues + const DomainKnowledge + type Edge struct + From NodeID + To NodeID + Type EdgeType + type EdgeIndex uint32 + type EdgeType string + const EdgeCalls + const EdgeCausedBy + const EdgeConfiguredBy + const EdgeConsumes + const EdgeContains + const EdgeContradicts + const EdgeDataFlows + const EdgeDefines + const EdgeDependsOn + const EdgeDeploys + const EdgeDocumentedBy + const EdgeDocuments + const EdgeEmbeds + const EdgeExplains + const EdgeExports + const EdgeHandles + const EdgeImplements + const EdgeImports + const EdgeInstanceOf + const EdgeLinksTo + const EdgeManual + const EdgeMentions + const EdgeRelatesTo + type EdgeTypeDescriptor struct + Description string + Direction string + Domain DomainType + Name EdgeType + SemanticWeight float64 + Synthetic bool + func GetEdgeTypes() []EdgeTypeDescriptor + type EdgeWeightKey struct + From NodeID + To NodeID + Type EdgeType + type EntityInfo struct + Fanin int + Fanout int + type EntityRef struct + File string + ID NodeID + Line int + Name string + Type NodeType + type ErrNodeNotFound NodeID + func (e ErrNodeNotFound) Error() string + type FlatGraph struct + FileIDs []StringID + InEdges []NodeIndex + InOffsets []uint64 + InWeights []float32 + Names []StringID + NamespaceIDs []uint16 + OutEdges []NodeIndex + OutOffsets []uint64 + OutWeights []float32 + RepoID string + TombstoneCount int + Tombstones []bool + Types []NodeType + func Deserialize(r io.Reader) (*FlatGraph, error) + func NewFlatGraph(repoID string) *FlatGraph + func (fg *FlatGraph) AddNode(name StringID, nodeType NodeType, fileID StringID, nsID uint16) NodeIndex + func (fg *FlatGraph) BulkAddEdges(edges []BulkEdge) int + func (fg *FlatGraph) ExtID(idx NodeIndex) NodeID + func (fg *FlatGraph) LookupIndex(id NodeID) (NodeIndex, bool) + func (fg *FlatGraph) Neighbors(idx NodeIndex) []NodeIndex + func (fg *FlatGraph) NodeIDAt(idx NodeIndex) NodeID + type Graph struct + func New(repoID string) *Graph + func (g *Graph) AddCallSite(cs CallSite) + func (g *Graph) AddEdge(e *Edge) + func (g *Graph) AddImportAlias(file, alias, importPath string) + func (g *Graph) AddInstantiatedType(file, typeName string) + func (g *Graph) AddNode(n *Node) + func (g *Graph) AddTerraformRef(ref TerraformRef) + func (g *Graph) AddVarType(file, varName, typeName string) + func (g *Graph) AllEdges() []*Edge + func (g *Graph) AllNodes() []*Node + func (g *Graph) BulkAddCallSites(sites []CallSite) + func (g *Graph) CacheLen() int + func (g *Graph) CarveEgoGraph(rootID NodeID, cfg CarveConfig) (*SubGraph, error) + func (g *Graph) ClearFileSnapshot(file string) + func (g *Graph) Compact() + func (g *Graph) CrossDomainImpactForNode(nodeID NodeID) ([]CrossDomainRef, bool) + func (g *Graph) CrossRepoCalls(primaryRepoID string) (crossCallCount int, linkedRepos []string) + func (g *Graph) DirectNeighbors(id NodeID) []NodeID + func (g *Graph) DrainCallSites() []CallSite + func (g *Graph) DrainTerraformRefs() []TerraformRef + func (g *Graph) EdgeCount() int + func (g *Graph) EdgeCountsByType() map[EdgeType]int + func (g *Graph) EdgesForFile(file string) []*Edge + func (g *Graph) EnableFlatGraph() + func (g *Graph) Fanin(id NodeID) int + func (g *Graph) Fanout(id NodeID) int + func (g *Graph) FindByFile(filePath string) []*Node + func (g *Graph) FindByName(name string) []*Node + func (g *Graph) FindByPattern(pattern string) []*Node + func (g *Graph) FindByPatternLimit(pattern string, limit int) []*Node + func (g *Graph) FindByType(t NodeType) []*Node + func (g *Graph) FindTestsFor(nodeID NodeID) []string + func (g *Graph) FindTestsWithDistance(nodeID NodeID) []TestRef + func (g *Graph) GetImportAliases(file string) map[string]string + func (g *Graph) GetInstantiatedTypes() map[string]bool + func (g *Graph) GetNode(id NodeID) *Node + func (g *Graph) GetVarTypes(file string) map[string]string + func (g *Graph) HasEdge(from, to NodeID, edgeType EdgeType) bool + func (g *Graph) ImpactAnalysis(rootID NodeID, maxDepth int) (*ImpactResult, error) + func (g *Graph) InEdges(id NodeID) []*Edge + func (g *Graph) InEdgesForFile(file string) []*Edge + func (g *Graph) Index() *GraphIndex + func (g *Graph) InvalidateCache() + func (g *Graph) InvalidateCacheForFile(file string) + func (g *Graph) MakeNodeID(file, name string) NodeID + func (g *Graph) MergeFrom(other *Graph) + func (g *Graph) MigrateStableID(n *Node) + func (g *Graph) NodeCount() int + func (g *Graph) NodeCountsByDomain() map[DomainType]int + func (g *Graph) NodesForFile(file string) []*Node + func (g *Graph) OutEdges(id NodeID) []*Edge + func (g *Graph) OutEdgesForFile(file string) []*Edge + func (g *Graph) PeekCallSites() []CallSite + func (g *Graph) ProjectIdentity() *ProjectIdentity + func (g *Graph) RebuildIndex() ([]byte, error) + func (g *Graph) RemoveCallSitesForFile(file string) + func (g *Graph) RemoveEdge(from, to NodeID, edgeType EdgeType) + func (g *Graph) RemoveFile(file string) + func (g *Graph) RemoveTerraformRefsForFile(file string) + func (g *Graph) RepoID() string + func (g *Graph) Root() string + func (g *Graph) SetFileProvenance(filePath string, p ProvenanceType) + func (g *Graph) SetIndex(idx *GraphIndex) + func (g *Graph) SetRoot(root string) + func (g *Graph) SnapshotCallsAdjacency() map[NodeID][]NodeID + func (g *Graph) SnapshotEdgesAndNodes() (map[NodeID][]*Edge, map[NodeID]*Node) + func (g *Graph) SnapshotFileStableIDs(file string) + func (g *Graph) SnapshotImportAdjacency() (map[NodeID][]NodeID, map[NodeID]*Node) + func (g *Graph) SnapshotImportAliases() map[string]map[string]string + func (g *Graph) SuggestRules() []SuggestedRule + func (g *Graph) ToFlatGraph() *FlatGraph + func (g *Graph) UpdateFileNodeMetadata(absFile string, update func(n *Node)) + func (g *Graph) UpdateNodeMetadata(id NodeID, update func(n *Node)) + func (g *Graph) UpsertRouteNode(n *Node) bool + type GraphIndex struct + EigenvectorCentrality []float64 + Exported []bool + FileIDs []StringID + IDToSeq map[NodeID]uint32 + InEnd []uint32 + InStart []uint32 + InTargets []uint32 + InTypes []StringID + Lines []int32 + Names []StringID + OutEnd []uint32 + OutStart []uint32 + OutTargets []uint32 + OutTypes []StringID + PkgIDs []StringID + Pool *StringPool + SeqIDs []NodeID + Tombstone []bool + TombstoneCount int32 + Types []StringID + func LoadSnapshot(data []byte, pool *StringPool) (*GraphIndex, error) + func (idx *GraphIndex) InNeighbours(seq uint32) (sources []uint32, types []StringID) + func (idx *GraphIndex) IsTombstoned(seq uint32) bool + func (idx *GraphIndex) MarkTombstone(seq uint32) + func (idx *GraphIndex) NodeFile(seq uint32) string + func (idx *GraphIndex) NodeName(seq uint32) string + func (idx *GraphIndex) OutNeighbours(seq uint32) (targets []uint32, types []StringID) + func (idx *GraphIndex) Ready() bool + func (idx *GraphIndex) ReceiverMethodSeqs(receiverName string) []uint32 + func (idx *GraphIndex) SaveSnapshot() ([]byte, error) + func (idx *GraphIndex) Seq(nid NodeID) uint32 + func (idx *GraphIndex) TombstoneRatio() float64 + func (idx *GraphIndex) UnsafeInNeighbours(seq uint32) (sources []uint32, types []StringID) + func (idx *GraphIndex) UnsafeIsTombstoned(seq uint32) bool + func (idx *GraphIndex) UnsafeOutNeighbours(seq uint32) (targets []uint32, types []StringID) + func (idx *GraphIndex) UnsafeSeq(nid NodeID) uint32 + type GraphSummary struct + Edges int + Files int + Functions int + Interfaces int + Methods int + Packages int + Structs int + type ImpactResult struct + APISurface *APISurfaceInfo + AffectedFiles []string + CrossDomainAffected int + CrossDomainImpact []CrossDomainRef + CrossDomainTruncated bool + ImplementorImpact []EntityRef + Root EntityRef + TestCoverage []string + TestPriority []TestRef + Tiers []ImpactTier + TotalAffected int + Truncated bool + type ImpactTier struct + Confidence float64 + Depth int + Label string + Nodes []EntityRef + TotalNodes int + Truncated bool + type Node struct + Domain DomainType + Exported bool + File string + ID NodeID + Line int + Metadata map[string]string + Name string + Package string + Provenance ProvenanceType + StableID string + Type NodeType + type NodeID string + type NodeIndex uint32 + type NodeType string + const NodeArtifact + const NodeConcept + const NodeDecision + const NodeEntity + const NodeFile + const NodeFunction + const NodeInterface + const NodeMethod + const NodePackage + const NodeRoute + const NodeSection + const NodeStruct + const NodeVariable + type ProjectIdentity struct + EntryPoints []EntityRef + KeyEntities []EntityInfo + RepoID string + Scale Scale + SuggestedRules []SuggestedRule + Summary GraphSummary + ToolGuidance string + type ProvenanceType string + const ProvenanceExternal + const ProvenanceGenerated + const ProvenanceUserAuthored + const ProvenanceVendored + type QualityNode struct + File string + ID NodeID + Name string + type Scale string + const ScaleLarge + const ScaleMedium + const ScaleMicro + const ScaleSmall + type StringID uint32 + type StringPool struct + func NewStringPool() *StringPool + func (p *StringPool) Intern(s string) StringID + func (p *StringPool) Value(id StringID) string + type SubGraph struct + Edges []*Edge + Nodes []CarvedNode + Root NodeID + Truncated bool + TruncatedCount int + type SuggestedRule struct + Confidence float64 + Description string + EdgeType EdgeType + FromDirPattern string + ID string + SampleCount int + ToDirPattern string + type TerraformRef struct + FromFile string + FromID NodeID + RefName string + type TestRef struct + Distance int + File string + Priority string