agent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() []string

Available returns the names of all available agent configurations

Types

type Config

type Config struct {
	// Name is the identifier for this agent (e.g., "claude-code", "cursor")
	Name string `yaml:"name"`

	// Entrypoints are the files that serve as starting points for analysis
	Entrypoints []string `yaml:"entrypoints"`

	// ReferencePatterns define how to extract references from config files
	ReferencePatterns []ReferencePattern `yaml:"reference_patterns"`

	// Markers define keywords that affect priority scoring
	Markers Markers `yaml:"markers"`

	// FilePatterns define additional files to include in analysis
	FilePatterns []string `yaml:"file_patterns"`
}

Config represents an agent configuration that defines how to parse and analyze configuration files for a specific AI coding agent.

func Load

func Load(name string) (*Config, error)

Load loads an agent configuration by name

func LoadFromFile

func LoadFromFile(path string) (*Config, error)

LoadFromFile loads an agent configuration from a YAML file

type Markers

type Markers struct {
	// HighPriority keywords indicate critical instructions
	HighPriority []string `yaml:"high_priority"`

	// MediumPriority keywords indicate important instructions
	MediumPriority []string `yaml:"medium_priority"`

	// LowPriority keywords indicate suggestions
	LowPriority []string `yaml:"low_priority"`

	// Sections define expected section headers
	Sections []string `yaml:"sections"`
}

Markers define keywords that affect priority scoring

type ReferencePattern

type ReferencePattern struct {
	// Regex is the pattern to match
	Regex string `yaml:"regex"`

	// Type categorizes the reference (file, url, tool, etc.)
	Type string `yaml:"type"`
	// contains filtered or unexported fields
}

ReferencePattern defines a pattern for extracting references from text

func (*ReferencePattern) Compile

func (rp *ReferencePattern) Compile() error

Compile compiles the regex pattern

func (*ReferencePattern) CompiledRegex

func (rp *ReferencePattern) CompiledRegex() *regexp.Regexp

CompiledRegex returns the compiled regex

Jump to

Keyboard shortcuts

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