Documentation
¶
Overview ¶
Package systemspec provides system-spec extraction for knowledge graphs. It extracts infrastructure topology from system-spec JSON files, enabling queries that span both code and infrastructure.
Index ¶
Constants ¶
const ( // Language is the canonical name for system-spec. Language = "system-spec" // NodePrefix is the prefix for system-spec node IDs. // Note: system-spec uses its own prefixes (svc:, rds:, etc.) so this is not used. NodePrefix = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor implements provider.LanguageExtractor for system-spec JSON files. It wraps the system-spec graphize.Provider to integrate with graphize's extraction pipeline.
func (*Extractor) CanExtract ¶
CanExtract returns true if the file is a system-spec JSON document. It checks for the presence of "name" and "services" fields at the root.
func (*Extractor) DetectFramework ¶
func (e *Extractor) DetectFramework(path string) *provider.FrameworkInfo
DetectFramework returns nil as system-spec is not a code framework.
func (*Extractor) Extensions ¶
Extensions returns JSON file extension. Note: Not all JSON files are system-spec files; CanExtract does content detection.
func (*Extractor) ExtractFile ¶
ExtractFile extracts nodes and edges from a system-spec JSON file. It produces:
- System node (system:<name>)
- Service nodes (svc:<name>) with links_to edges to repos
- Cloud resource nodes (rds:, sqs:, s3:, etc.)
- Connection edges between services
- Deployment nodes (helm:, terraform:)