Documentation
¶
Overview ¶
Package analyze provides built-in analysis prompts for file-level reviews.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TestFixtures = AnalysisType{ Name: "test-fixtures", Description: "Find test fixture and helper opportunities to reduce duplication", // contains filtered or unexported fields } Duplication = AnalysisType{ Name: "duplication", Description: "Find code duplication across files", // contains filtered or unexported fields } Refactor = AnalysisType{ Name: "refactor", Description: "Suggest refactoring opportunities", // contains filtered or unexported fields } Complexity = AnalysisType{ Name: "complexity", Description: "Analyze complexity and suggest simplifications", // contains filtered or unexported fields } APIDesign = AnalysisType{ Name: "api-design", Description: "Review API consistency and design patterns", // contains filtered or unexported fields } DeadCode = AnalysisType{ Name: "dead-code", Description: "Find unused exports and unreachable code", // contains filtered or unexported fields } Architecture = AnalysisType{ Name: "architecture", Description: "Review architectural patterns and structure", // contains filtered or unexported fields } )
Available analysis types
var AllTypes = []AnalysisType{ TestFixtures, Duplication, Refactor, Complexity, APIDesign, DeadCode, Architecture, }
AllTypes returns all available analysis types
Functions ¶
This section is empty.
Types ¶
type AnalysisType ¶
type AnalysisType struct {
Name string
Description string
// contains filtered or unexported fields
}
AnalysisType represents a built-in analysis type
func GetType ¶
func GetType(name string) *AnalysisType
GetType returns an analysis type by name, or nil if not found
func (AnalysisType) BuildPrompt ¶
func (t AnalysisType) BuildPrompt(files map[string]string) (string, error)
BuildPrompt constructs the full prompt with file contents
func (AnalysisType) BuildPromptWithPaths ¶
func (t AnalysisType) BuildPromptWithPaths(repoRoot string, filePaths []string) (string, error)
BuildPromptWithPaths constructs a prompt with file paths only (no contents). The agent is expected to read the files itself. Used when files are too large to embed in the prompt. The repoRoot is displayed in the header for context; filePaths should be absolute paths that the agent can read directly.
func (AnalysisType) GetPrompt ¶
func (t AnalysisType) GetPrompt() (string, error)
GetPrompt returns the prompt template for this analysis type