analysis

package
v0.0.0-...-a1f8bd1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Cache file paths
	AnalysisCacheFile  = ".sc/analysis-cache.json"
	AnalysisReportFile = ".sc/analysis-report.md"
	CacheValidityHours = 24    // Cache expires after 24 hours
	AnalyzerVersion    = "1.1" // Increment when cache format changes
)

Variables

This section is empty.

Functions

func CacheExists

func CacheExists(projectPath string) bool

CacheExists checks if valid cache exists for a project

func HasResourcesInCache

func HasResourcesInCache(projectPath string) bool

HasResourcesInCache checks if cache contains resource analysis

func SaveAnalysisCache

func SaveAnalysisCache(analysis *ProjectAnalysis, projectPath string) error

SaveAnalysisCache saves analysis to JSON cache file

func ShouldSkipPath

func ShouldSkipPath(path string) bool

ShouldSkipPath checks if a path should be skipped (for nested dependencies)

Types

type AnalysisCache

type AnalysisCache struct {
	Timestamp       time.Time              `json:"timestamp"`
	ProjectPath     string                 `json:"project_path"`
	AnalyzerVersion string                 `json:"analyzer_version"`
	Resources       *ResourceAnalysis      `json:"resources,omitempty"`
	TechStacks      []TechStackInfo        `json:"tech_stacks"`
	Architecture    string                 `json:"architecture"`
	Confidence      float32                `json:"confidence"`
	PrimaryStack    *TechStackInfo         `json:"primary_stack,omitempty"`
	Files           []FileInfo             `json:"files,omitempty"`
	Git             *GitAnalysis           `json:"git,omitempty"`
	Recommendations []Recommendation       `json:"recommendations"`
	Metadata        map[string]interface{} `json:"metadata"`
}

AnalysisCache represents cached analysis data

func LoadAnalysisCache

func LoadAnalysisCache(projectPath string) (*AnalysisCache, error)

LoadAnalysisCache loads cached analysis from JSON file

type AnalysisMode

type AnalysisMode int

AnalysisMode defines the depth of analysis

const (
	QuickMode     AnalysisMode = iota // Fast analysis for chat startup
	FullMode                          // Comprehensive analysis for reports
	CachedMode                        // Load from cache if available
	ForceFullMode                     // Force full analysis even if cache exists
	SetupMode                         // For project setup, includes resource confirmation
)

type CodeComplexity

type CodeComplexity struct {
	LinesOfCode     int     `json:"lines_of_code"`
	CyclomaticScore int     `json:"cyclomatic_score,omitempty"`
	FunctionCount   int     `json:"function_count,omitempty"`
	ClassCount      int     `json:"class_count,omitempty"`
	ImportCount     int     `json:"import_count,omitempty"`
	CommentRatio    float32 `json:"comment_ratio,omitempty"`
	ComplexityLevel string  `json:"complexity_level"` // "low", "medium", "high", "very_high"
}

CodeComplexity represents code complexity metrics

type CommitActivity

type CommitActivity struct {
	TotalCommits   int     `json:"total_commits"`
	RecentCommits  int     `json:"recent_commits_30d"`
	AveragePerWeek float32 `json:"average_per_week"`
	MostActiveDay  string  `json:"most_active_day,omitempty"`
	MostActiveHour int     `json:"most_active_hour,omitempty"`
}

CommitActivity represents commit patterns

type ComplexityAnalyzer

type ComplexityAnalyzer struct{}

ComplexityAnalyzer analyzes code complexity metrics

func NewComplexityAnalyzer

func NewComplexityAnalyzer() *ComplexityAnalyzer

NewComplexityAnalyzer creates a new complexity analyzer

func (*ComplexityAnalyzer) AnalyzeFile

func (ca *ComplexityAnalyzer) AnalyzeFile(filePath, language string) (*CodeComplexity, error)

AnalyzeFile analyzes complexity metrics for a single file

type ConsoleProgressReporter

type ConsoleProgressReporter struct {
	// contains filtered or unexported fields
}

ConsoleProgressReporter provides console-based progress reporting

func NewConsoleProgressReporter

func NewConsoleProgressReporter(writer io.Writer) *ConsoleProgressReporter

NewConsoleProgressReporter creates a new console progress reporter

func (*ConsoleProgressReporter) ReportProgress

func (c *ConsoleProgressReporter) ReportProgress(phase string, message string, percentage int)

ReportProgress reports progress to the console

type Database

type Database struct {
	Type        string            `json:"type"` // "postgresql", "mysql", "mongodb", "redis", etc.
	Name        string            `json:"name,omitempty"`
	Sources     []string          `json:"sources"`              // Files where detected
	Connection  string            `json:"connection,omitempty"` // Connection method/library
	Version     string            `json:"version,omitempty"`
	Config      map[string]string `json:"config,omitempty"` // Database-specific config
	Confidence  float32           `json:"confidence"`
	Recommended string            `json:"recommended,omitempty"` // Recommended Simple Container resource
}

Database represents detected database usage

type DatabaseDetector

type DatabaseDetector struct{}

DatabaseDetector enhanced to detect databases beyond just dependencies

func (*DatabaseDetector) Detect

func (d *DatabaseDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*DatabaseDetector) Name

func (d *DatabaseDetector) Name() string

func (*DatabaseDetector) Priority

func (d *DatabaseDetector) Priority() int

type Dependency

type Dependency struct {
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
	Type    string `json:"type,omitempty"` // "runtime", "dev", "peer", etc.
}

Dependency represents a project dependency

type DockerDetector

type DockerDetector struct{}

DockerDetector detects containerized projects

func (*DockerDetector) Detect

func (d *DockerDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*DockerDetector) Name

func (d *DockerDetector) Name() string

func (*DockerDetector) Priority

func (d *DockerDetector) Priority() int

type EnvironmentVariable

type EnvironmentVariable struct {
	Name        string   `json:"name"`
	Sources     []string `json:"sources"`    // Files where found
	UsageType   string   `json:"usage_type"` // "config", "secret", "url", "feature_flag", etc.
	Description string   `json:"description,omitempty"`
	Required    bool     `json:"required"`
	DefaultVal  string   `json:"default_value,omitempty"`
}

EnvironmentVariable represents a detected environment variable

type EnvironmentVariableDetector

type EnvironmentVariableDetector struct{}

EnvironmentVariableDetector scans for environment variable usage

func (*EnvironmentVariableDetector) Detect

func (d *EnvironmentVariableDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*EnvironmentVariableDetector) Name

func (*EnvironmentVariableDetector) Priority

func (d *EnvironmentVariableDetector) Priority() int

type ExternalAPI

type ExternalAPI struct {
	Name       string   `json:"name"`                // "stripe", "sendgrid", "openai", etc.
	Sources    []string `json:"sources"`             // Files where detected
	Endpoints  []string `json:"endpoints,omitempty"` // API endpoints found
	Purpose    string   `json:"purpose,omitempty"`   // "payment", "email", "ai", etc.
	Confidence float32  `json:"confidence"`
}

ExternalAPI represents detected external API usage

type ExternalAPIDetector

type ExternalAPIDetector struct{}

ExternalAPIDetector detects external API services

func (*ExternalAPIDetector) Detect

func (d *ExternalAPIDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*ExternalAPIDetector) Name

func (d *ExternalAPIDetector) Name() string

func (*ExternalAPIDetector) Priority

func (d *ExternalAPIDetector) Priority() int

type FastEnvironmentVariableDetector

type FastEnvironmentVariableDetector struct {
	// contains filtered or unexported fields
}

FastEnvironmentVariableDetector is a filtered version that skips heavy directories

func (*FastEnvironmentVariableDetector) Detect

func (f *FastEnvironmentVariableDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*FastEnvironmentVariableDetector) Name

func (*FastEnvironmentVariableDetector) Priority

func (f *FastEnvironmentVariableDetector) Priority() int

type FileChangeInfo

type FileChangeInfo struct {
	Path    string `json:"path"`
	Changes int    `json:"changes"`
	Type    string `json:"type"`
}

FileChangeInfo represents file change information

type FileChangeStats

type FileChangeStats struct {
	MostChangedFiles []FileChangeInfo `json:"most_changed_files,omitempty"`
	LanguageChanges  map[string]int   `json:"language_changes,omitempty"`
	LargestFiles     []FileInfo       `json:"largest_files,omitempty"`
}

FileChangeStats represents file change patterns

type FileInfo

type FileInfo struct {
	Path       string            `json:"path"`
	Type       string            `json:"type"` // "config", "source", "build", "docs"
	Language   string            `json:"language,omitempty"`
	Purpose    string            `json:"purpose,omitempty"`
	Size       int64             `json:"size"`
	Complexity *CodeComplexity   `json:"complexity,omitempty"`
	Metadata   map[string]string `json:"metadata,omitempty"`
}

FileInfo represents analyzed file information

type FilteredResourceDetector

type FilteredResourceDetector struct {
	// contains filtered or unexported fields
}

FilteredResourceDetector wraps existing detectors with intelligent file filtering

func NewFilteredResourceDetector

func NewFilteredResourceDetector(detector ResourceDetector, analyzer *ProjectAnalyzer) *FilteredResourceDetector

NewFilteredResourceDetector creates a filtered wrapper around a resource detector

func (*FilteredResourceDetector) Detect

func (f *FilteredResourceDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*FilteredResourceDetector) Name

func (f *FilteredResourceDetector) Name() string

func (*FilteredResourceDetector) Priority

func (f *FilteredResourceDetector) Priority() int

type GitAnalysis

type GitAnalysis struct {
	IsGitRepo      bool              `json:"is_git_repo"`
	RemoteURL      string            `json:"remote_url,omitempty"`
	Branch         string            `json:"current_branch,omitempty"`
	LastCommit     *GitCommit        `json:"last_commit,omitempty"`
	Contributors   []GitContributor  `json:"contributors,omitempty"`
	CommitActivity *CommitActivity   `json:"commit_activity,omitempty"`
	FileChanges    *FileChangeStats  `json:"file_changes,omitempty"`
	HasCI          bool              `json:"has_ci"`
	CIPlatforms    []string          `json:"ci_platforms,omitempty"`
	Tags           []string          `json:"tags,omitempty"`
	ProjectAge     int               `json:"project_age_days,omitempty"`
	Metadata       map[string]string `json:"metadata,omitempty"`
}

GitAnalysis contains Git repository analysis

type GitAnalyzer

type GitAnalyzer struct {
	// contains filtered or unexported fields
}

GitAnalyzer provides Git repository analysis functionality

func NewGitAnalyzer

func NewGitAnalyzer(projectPath string) *GitAnalyzer

NewGitAnalyzer creates a new Git analyzer

func NewGitAnalyzerWithProgress

func NewGitAnalyzerWithProgress(projectPath string, progressTracker *ProgressTracker) *GitAnalyzer

NewGitAnalyzerWithProgress creates a new Git analyzer with progress tracking

func (*GitAnalyzer) AnalyzeGitRepository

func (ga *GitAnalyzer) AnalyzeGitRepository() (*GitAnalysis, error)

AnalyzeGitRepository performs comprehensive Git repository analysis

func (*GitAnalyzer) GetBasicGitInfo

func (ga *GitAnalyzer) GetBasicGitInfo() (*GitAnalysis, error)

GetBasicGitInfo provides minimal git information for quick analysis

type GitCommit

type GitCommit struct {
	Hash         string `json:"hash"`
	Author       string `json:"author"`
	Email        string `json:"email"`
	Date         string `json:"date"`
	Message      string `json:"message"`
	FilesChanged int    `json:"files_changed"`
}

GitCommit represents a Git commit

type GitContributor

type GitContributor struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Commits int    `json:"commits"`
}

GitContributor represents a contributor

type GoDetector

type GoDetector struct{}

GoDetector detects Go projects

func (*GoDetector) Detect

func (d *GoDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*GoDetector) Name

func (d *GoDetector) Name() string

func (*GoDetector) Priority

func (d *GoDetector) Priority() int

type JSONProgressReporter

type JSONProgressReporter struct {
	// contains filtered or unexported fields
}

JSONProgressReporter provides JSON-formatted progress updates for programmatic consumption

func NewJSONProgressReporter

func NewJSONProgressReporter(writer io.Writer) *JSONProgressReporter

NewJSONProgressReporter creates a new JSON progress reporter

func (*JSONProgressReporter) ReportProgress

func (j *JSONProgressReporter) ReportProgress(phase string, message string, percentage int)

ReportProgress reports progress in JSON format

type LLMProvider

type LLMProvider interface {
	GenerateResponse(ctx context.Context, prompt string) (string, error)
}

LLMProvider interface for project analysis enhancement

type NoOpProgressReporter

type NoOpProgressReporter struct{}

NoOpProgressReporter is a no-op implementation for backward compatibility

func (*NoOpProgressReporter) ReportProgress

func (n *NoOpProgressReporter) ReportProgress(phase string, message string, percentage int)

type NodeJSDetector

type NodeJSDetector struct{}

NodeJSDetector detects Node.js projects

func (*NodeJSDetector) Detect

func (d *NodeJSDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*NodeJSDetector) Name

func (d *NodeJSDetector) Name() string

func (*NodeJSDetector) Priority

func (d *NodeJSDetector) Priority() int

type ProgressPhase

type ProgressPhase struct {
	Name           string
	Weight         float32 // How much this phase contributes to total progress (0.0-1.0)
	TotalTasks     int     // Total number of tasks in this phase
	CompletedTasks int     // Number of completed tasks
	Description    string  // Current description for this phase
}

ProgressPhase represents a phase of analysis with its weight and sub-tasks

type ProgressReporter

type ProgressReporter interface {
	ReportProgress(phase string, message string, percentage int)
}

ProgressReporter interface for reporting analysis progress

type ProgressTracker

type ProgressTracker struct {
	// contains filtered or unexported fields
}

ProgressTracker manages dynamic progress reporting based on actual analyzer completion

func NewProgressTracker

func NewProgressTracker(reporter ProgressReporter, totalDetectors, totalResourceDetectors int) *ProgressTracker

NewProgressTracker creates a new progress tracker with predefined phases

func (*ProgressTracker) CompletePhase

func (pt *ProgressTracker) CompletePhase(phaseName, description string)

CompletePhase marks an entire phase as completed

func (*ProgressTracker) CompleteTask

func (pt *ProgressTracker) CompleteTask(phaseName, taskDescription string)

CompleteTask marks one task as completed in the given phase

func (*ProgressTracker) GetOverallProgress

func (pt *ProgressTracker) GetOverallProgress() int

GetOverallProgress returns the current overall progress percentage

func (*ProgressTracker) GetPhaseProgress

func (pt *ProgressTracker) GetPhaseProgress(phaseName string) (int, bool)

GetPhaseProgress returns the progress of a specific phase

func (*ProgressTracker) SetPhaseDescription

func (pt *ProgressTracker) SetPhaseDescription(phaseName, description string)

SetPhaseDescription updates the description for a phase

func (*ProgressTracker) StartPhase

func (pt *ProgressTracker) StartPhase(phaseName string)

StartPhase marks the beginning of a phase

type ProjectAnalysis

type ProjectAnalysis struct {
	Path            string                 `json:"path"`
	Name            string                 `json:"name"`
	TechStacks      []TechStackInfo        `json:"tech_stacks"`
	PrimaryStack    *TechStackInfo         `json:"primary_stack,omitempty"`
	Architecture    string                 `json:"architecture,omitempty"`
	Recommendations []Recommendation       `json:"recommendations"`
	Files           []FileInfo             `json:"files,omitempty"`
	Resources       *ResourceAnalysis      `json:"resources,omitempty"` // Detected resources
	Git             *GitAnalysis           `json:"git,omitempty"`       // Git repository analysis
	Confidence      float32                `json:"overall_confidence"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

ProjectAnalysis contains complete analysis results

func ConvertCacheToAnalysis

func ConvertCacheToAnalysis(cache *AnalysisCache) *ProjectAnalysis

ConvertCacheToAnalysis converts cached data back to ProjectAnalysis

type ProjectAnalyzer

type ProjectAnalyzer struct {
	// contains filtered or unexported fields
}

ProjectAnalyzer orchestrates tech stack detection and generates recommendations

func NewProjectAnalyzer

func NewProjectAnalyzer() *ProjectAnalyzer

NewProjectAnalyzer creates a new analyzer with default detectors

func NewProjectAnalyzerWithEmbeddings

func NewProjectAnalyzerWithEmbeddings(embeddingsDB *embeddings.Database) *ProjectAnalyzer

NewProjectAnalyzerWithEmbeddings creates an analyzer with existing embeddings DB (for reuse)

func (*ProjectAnalyzer) AddDetector

func (pa *ProjectAnalyzer) AddDetector(detector TechStackDetector)

AddDetector adds a custom detector

func (*ProjectAnalyzer) AddResourceDetector

func (pa *ProjectAnalyzer) AddResourceDetector(detector ResourceDetector)

AddResourceDetector adds a custom resource detector

func (*ProjectAnalyzer) AnalyzeProject

func (pa *ProjectAnalyzer) AnalyzeProject(projectPath string) (*ProjectAnalysis, error)

AnalyzeProject performs project analysis with caching support

func (*ProjectAnalyzer) EnableFullAnalysis

func (pa *ProjectAnalyzer) EnableFullAnalysis()

EnableFullAnalysis enables comprehensive analysis (git, complexity, LLM)

func (*ProjectAnalyzer) EnableLLMEnhancement

func (pa *ProjectAnalyzer) EnableLLMEnhancement()

EnableLLMEnhancement enables LLM with unlimited token usage (expensive)

func (*ProjectAnalyzer) SetAnalysisMode

func (pa *ProjectAnalyzer) SetAnalysisMode(mode AnalysisMode)

SetAnalysisMode configures the analysis depth and active detectors

func (*ProjectAnalyzer) SetLLMProvider

func (pa *ProjectAnalyzer) SetLLMProvider(provider LLMProvider)

SetLLMProvider sets the LLM provider for enhanced analysis

func (*ProjectAnalyzer) SetProgressReporter

func (pa *ProjectAnalyzer) SetProgressReporter(reporter ProgressReporter)

SetProgressReporter sets the progress reporter for analysis feedback

func (*ProjectAnalyzer) SetTokenLimit

func (pa *ProjectAnalyzer) SetTokenLimit(maxTokens int, skipIfExpensive bool)

SetTokenLimit configures maximum tokens to send to LLM

type PulumiDetector

type PulumiDetector struct{}

PulumiDetector detects Pulumi infrastructure as code usage

func (*PulumiDetector) Detect

func (d *PulumiDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*PulumiDetector) Name

func (d *PulumiDetector) Name() string

func (*PulumiDetector) Priority

func (d *PulumiDetector) Priority() int

type PythonDetector

type PythonDetector struct{}

PythonDetector detects Python projects

func (*PythonDetector) Detect

func (d *PythonDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*PythonDetector) Name

func (d *PythonDetector) Name() string

func (*PythonDetector) Priority

func (d *PythonDetector) Priority() int

type Queue

type Queue struct {
	Type        string   `json:"type"` // "rabbitmq", "sqs", "kafka", "redis_pubsub", etc.
	Name        string   `json:"name,omitempty"`
	Sources     []string `json:"sources"`          // Files where detected
	Topics      []string `json:"topics,omitempty"` // Detected topics/queues
	Confidence  float32  `json:"confidence"`
	Recommended string   `json:"recommended,omitempty"` // Recommended Simple Container resource
}

Queue represents detected queue/messaging system

type QueueDetector

type QueueDetector struct{}

QueueDetector detects messaging queues and pub/sub systems

func (*QueueDetector) Detect

func (d *QueueDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*QueueDetector) Name

func (d *QueueDetector) Name() string

func (*QueueDetector) Priority

func (d *QueueDetector) Priority() int

type Recommendation

type Recommendation struct {
	Type        string `json:"type"`     // "resource", "template", "configuration", "optimization"
	Category    string `json:"category"` // "database", "storage", "compute", "security", etc.
	Priority    string `json:"priority"` // "high", "medium", "low"
	Title       string `json:"title"`
	Description string `json:"description"`
	Action      string `json:"action,omitempty"`   // Specific action to take
	Resource    string `json:"resource,omitempty"` // Simple Container resource type
	Template    string `json:"template,omitempty"` // Simple Container template
	Code        string `json:"code,omitempty"`     // Code snippet
}

Recommendation for Simple Container configuration

type ResourceAnalysis

type ResourceAnalysis struct {
	EnvironmentVars []EnvironmentVariable `json:"environment_variables,omitempty"`
	Secrets         []Secret              `json:"secrets,omitempty"`
	Databases       []Database            `json:"databases,omitempty"`
	Queues          []Queue               `json:"queues,omitempty"`
	Storage         []Storage             `json:"storage,omitempty"`
	ExternalAPIs    []ExternalAPI         `json:"external_apis,omitempty"`
}

ResourceAnalysis contains detected project resources

func GetResourcesFromCache

func GetResourcesFromCache(projectPath string) (*ResourceAnalysis, error)

GetResourcesFromCache loads only resources from cache (fast operation)

type ResourceDetector

type ResourceDetector interface {
	Detect(projectPath string) (*ResourceAnalysis, error)
	Name() string
	Priority() int
}

ResourceDetector interface for implementing different resource detection strategies

type Secret

type Secret struct {
	Type        string   `json:"type"` // "api_key", "database_url", "jwt_secret", etc.
	Name        string   `json:"name,omitempty"`
	Sources     []string `json:"sources"`               // Files where patterns found
	Pattern     string   `json:"pattern,omitempty"`     // Regex pattern that matched
	Confidence  float32  `json:"confidence"`            // How confident we are this is a secret
	Recommended string   `json:"recommended,omitempty"` // Recommended Simple Container resource
}

Secret represents detected sensitive data patterns

type SecretDetector

type SecretDetector struct{}

SecretDetector scans for hardcoded secrets and sensitive data patterns

func (*SecretDetector) Detect

func (d *SecretDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*SecretDetector) Name

func (d *SecretDetector) Name() string

func (*SecretDetector) Priority

func (d *SecretDetector) Priority() int

type SimpleContainerDetector

type SimpleContainerDetector struct{}

SimpleContainerDetector detects existing Simple Container usage

func (*SimpleContainerDetector) Detect

func (d *SimpleContainerDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*SimpleContainerDetector) Name

func (d *SimpleContainerDetector) Name() string

func (*SimpleContainerDetector) Priority

func (d *SimpleContainerDetector) Priority() int

type Storage

type Storage struct {
	Type        string   `json:"type"` // "s3", "gcs", "azure_blob", "file_upload", etc.
	Name        string   `json:"name,omitempty"`
	Sources     []string `json:"sources"`           // Files where detected
	Buckets     []string `json:"buckets,omitempty"` // Detected bucket names
	Purpose     string   `json:"purpose,omitempty"` // "uploads", "static", "backup", etc.
	Confidence  float32  `json:"confidence"`
	Recommended string   `json:"recommended,omitempty"` // Recommended Simple Container resource
}

Storage represents detected storage services

type StorageDetector

type StorageDetector struct{}

StorageDetector detects cloud storage and file upload systems

func (*StorageDetector) Detect

func (d *StorageDetector) Detect(projectPath string) (*ResourceAnalysis, error)

func (*StorageDetector) Name

func (d *StorageDetector) Name() string

func (*StorageDetector) Priority

func (d *StorageDetector) Priority() int

type StreamingProgressReporter

type StreamingProgressReporter struct {
	// contains filtered or unexported fields
}

StreamingProgressReporter provides streaming progress updates for MCP compatibility

func NewStreamingProgressReporter

func NewStreamingProgressReporter(writer io.Writer) *StreamingProgressReporter

NewStreamingProgressReporter creates a new streaming progress reporter

func (*StreamingProgressReporter) ReportProgress

func (s *StreamingProgressReporter) ReportProgress(phase string, message string, percentage int)

ReportProgress reports streaming progress updates

type TechStackDetector

type TechStackDetector interface {
	Detect(projectPath string) (*TechStackInfo, error)
	Priority() int // Higher priority detectors run first
	Name() string
}

TechStackDetector interface for implementing different detection strategies

type TechStackInfo

type TechStackInfo struct {
	Language     string            `json:"language"`
	Framework    string            `json:"framework,omitempty"`
	Runtime      string            `json:"runtime,omitempty"`
	Version      string            `json:"version,omitempty"`
	Dependencies []Dependency      `json:"dependencies,omitempty"`
	DevDeps      []Dependency      `json:"dev_dependencies,omitempty"`
	Scripts      map[string]string `json:"scripts,omitempty"`
	Confidence   float32           `json:"confidence"`
	Evidence     []string          `json:"evidence,omitempty"`
	Metadata     map[string]string `json:"metadata,omitempty"`
}

TechStackInfo represents detected technology information

type TerraformDetector

type TerraformDetector struct{}

TerraformDetector detects Terraform infrastructure as code usage

func (*TerraformDetector) Detect

func (d *TerraformDetector) Detect(projectPath string) (*TechStackInfo, error)

func (*TerraformDetector) Name

func (d *TerraformDetector) Name() string

func (*TerraformDetector) Priority

func (d *TerraformDetector) Priority() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL