Documentation
¶
Index ¶
- func GenerateNodeID(filePath, symbolName string) string
- type ASTEdge
- type ASTNode
- type Community
- type CriticalPathNode
- type EdgeType
- type FileEvent
- type FileEventAction
- type Inspectable
- type InspectableResponse
- type NodeScore
- type NodeType
- type ProjectSummary
- type RecommendedStep
- type RiskFlag
- type RiskLevel
- type ScoreBreakdown
- type SearchResult
- type VerifiedWorkflowItem
- type VerifyWorkflowResponse
- type WorkflowBriefResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNodeID ¶
GenerateNodeID creates a deterministic SHA-256 hash ID from file path and symbol name. Uses a null byte separator to prevent collisions (e.g., "a:b"+"c" vs "a"+":b:c").
Types ¶
type ASTEdge ¶
type ASTEdge struct {
SourceID string `json:"source_id"`
TargetID string `json:"target_id"`
EdgeType EdgeType `json:"edge_type"`
TargetSymbol string `json:"target_symbol,omitempty"` // raw symbol name for cross-file resolution
}
ASTEdge represents a relationship between two AST nodes
type ASTNode ¶
type ASTNode struct {
ID string `json:"id"`
FilePath string `json:"file_path"`
SymbolName string `json:"symbol_name"`
NodeType NodeType `json:"node_type"`
StartByte uint32 `json:"start_byte"`
EndByte uint32 `json:"end_byte"`
ContentSum string `json:"content_sum"`
}
ASTNode represents a parsed code symbol (function, class, struct, method)
type CriticalPathNode ¶ added in v0.3.3
type CriticalPathNode struct {
ID string `json:"id"`
Name string `json:"name"`
Phase string `json:"phase"`
Confidence float64 `json:"confidence"`
Verified bool `json:"verified"`
}
CriticalPathNode is a workflow node used in the brief critical path representation.
type EdgeType ¶
type EdgeType uint8
EdgeType represents the type of relationship between AST nodes
const ( EdgeTypeCalls EdgeType = iota + 1 EdgeTypeImports EdgeTypeImplements EdgeTypeInstantiates EdgeTypeDefines // file → class/function (containment) EdgeTypeDefinesMethod // class → method (containment) EdgeTypeInherits // class → parent class (extends) EdgeTypeHandles // route → controller method (handler resolution) )
func (EdgeType) MarshalJSON ¶
MarshalJSON encodes an EdgeType as its string name (H46).
func (*EdgeType) UnmarshalJSON ¶
UnmarshalJSON decodes an EdgeType from its string name or numeric value (H46).
type FileEvent ¶
type FileEvent struct {
Path string
Action FileEventAction
}
type FileEventAction ¶
type FileEventAction uint8
FileEvent represents a filesystem change event
const ( FileEventCreated FileEventAction = iota + 1 FileEventModified FileEventDeleted )
type Inspectable ¶
type Inspectable struct {
Rank int `json:"rank"`
TargetType string `json:"target_type"`
Name string `json:"name"`
FilePath string `json:"file_path"`
ID string `json:"id,omitempty"`
Score float64 `json:"score"`
Reason string `json:"reason"`
WhyNow string `json:"why_now,omitempty"`
NextTool string `json:"next_tool"`
NextArgs map[string]string `json:"next_args,omitempty"`
}
Inspectable is a ranked discovery result returned by all discovery tools.
type InspectableResponse ¶
type InspectableResponse struct {
Inspectables []Inspectable `json:"inspectables"`
Total int `json:"total"`
Query string `json:"query,omitempty"`
Summary string `json:"summary"`
}
InspectableResponse wraps discovery tool output with metadata.
type NodeScore ¶
type NodeScore struct {
NodeID string `json:"node_id"`
PageRank float64 `json:"pagerank"`
Betweenness float64 `json:"betweenness"`
}
NodeScore holds precomputed graph metrics for a node
type NodeType ¶
type NodeType uint8
NodeType represents the type of an AST node
func (NodeType) MarshalJSON ¶
MarshalJSON encodes a NodeType as its string name (H46).
func (*NodeType) UnmarshalJSON ¶
UnmarshalJSON decodes a NodeType from its string name or numeric value (H46).
type ProjectSummary ¶
type ProjectSummary struct {
Project string `json:"project"`
Summary string `json:"summary"`
SourceHash string `json:"source_hash"`
}
ProjectSummary represents an architecture decision record or project summary
type RecommendedStep ¶ added in v0.3.2
type RiskFlag ¶ added in v0.3.3
type RiskFlag struct {
Severity string `json:"severity"`
Symbol string `json:"symbol"`
FilePath string `json:"file_path,omitempty"`
Issue string `json:"issue"`
}
RiskFlag captures verification gaps and failures that affect workflow trust.
type ScoreBreakdown ¶
type ScoreBreakdown struct {
PPR float64 `json:"ppr"`
BM25 float64 `json:"bm25"`
Betweenness float64 `json:"betweenness"`
InDegree float64 `json:"in_degree"`
Semantic float64 `json:"semantic"`
}
ScoreBreakdown holds the per-signal normalized scores that compose the final composite score.
type SearchResult ¶
type SearchResult struct {
Node ASTNode `json:"node"`
Score float64 `json:"score"`
Breakdown *ScoreBreakdown `json:"breakdown,omitempty"`
}
SearchResult represents a ranked result from hybrid search
type VerifiedWorkflowItem ¶ added in v0.3.2
type VerifiedWorkflowItem struct {
ID string `json:"id"`
Name string `json:"name"`
FilePath string `json:"file_path"`
Group string `json:"group"`
Verification string `json:"verification"`
Confidence float64 `json:"confidence"`
Path []string `json:"path,omitempty"`
PathIDs []string `json:"path_ids,omitempty"`
FailReason string `json:"fail_reason,omitempty"`
}
type VerifyWorkflowResponse ¶ added in v0.3.2
type VerifyWorkflowResponse struct {
Query string `json:"query"`
Items []VerifiedWorkflowItem `json:"items"`
Truncated bool `json:"truncated,omitempty"`
Summary string `json:"summary"`
Strategy string `json:"strategy"`
RecommendedSteps []RecommendedStep `json:"recommended_steps,omitempty"`
}
type WorkflowBriefResponse ¶ added in v0.3.3
type WorkflowBriefResponse struct {
Query string `json:"query"`
Narrative string `json:"narrative"`
CriticalPath []CriticalPathNode `json:"critical_path"`
HealthScore float64 `json:"health_score"`
Confidence string `json:"confidence"`
PhaseCounts map[string]int `json:"phase_counts"`
RiskFlags []RiskFlag `json:"risk_flags,omitempty"`
Strategy string `json:"strategy"`
RecommendedSteps []RecommendedStep `json:"recommended_steps,omitempty"`
}
WorkflowBriefResponse is a concise, grounded workflow summary synthesized from verified items.