specialist

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package specialist provides the specialist framework for hawk-eco. Specialists are sub-agents with specific tool permissions and scopes.

Index

Constants

View Source
const (
	ScopeBuiltin = "builtin"
	ScopeUser    = "user"
	ScopeProject = "project"
)

Scope constants define specialist scopes.

View Source
const (
	PermissionReadOnly = "read-only"
	PermissionPlan     = "plan"
	PermissionDeny     = "deny"
	PermissionAllow    = "allow"
)

Permission constants define tool permissions.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages specialists across different scopes.

func NewManager

func NewManager() *Manager

NewManager creates a new specialist manager.

func (*Manager) Delete

func (m *Manager) Delete(name string)

Delete removes a specialist from the manager.

func (*Manager) FindSpecialist

func (m *Manager) FindSpecialist(name string) *Specialist

FindSpecialist finds a specialist by name with scope priority.

func (*Manager) Get

func (m *Manager) Get(name string) *Specialist

Get retrieves a specialist by name.

func (*Manager) List

func (m *Manager) List() []*Specialist

List returns all registered specialists.

func (*Manager) ListByScope

func (m *Manager) ListByScope(scope string) []*Specialist

ListByScope lists specialists filtered by scope.

func (*Manager) LoadAllSpecialists

func (m *Manager) LoadAllSpecialists() error

LoadAllSpecialists loads all specialists from default locations.

func (*Manager) LoadProjectSpecialists

func (m *Manager) LoadProjectSpecialists(dir string) error

LoadProjectSpecialists loads specialists from every known project location that exists, merging their contents (later locations take precedence for a given name).

func (*Manager) LoadUserSpecialists

func (m *Manager) LoadUserSpecialists(dir string) error

LoadUserSpecialists loads specialists from user config directory.

func (*Manager) Register

func (m *Manager) Register(s *Specialist)

Register adds a specialist to the manager.

func (*Manager) RegisterBuiltin

func (m *Manager) RegisterBuiltin()

RegisterBuiltin registers all built-in specialists.

type Specialist

type Specialist struct {
	Name        string
	Description string
	Prompt      string
	Tools       []string
	Scope       string
}

Specialist represents a specialized review agent with specific permissions.

func BuiltinSpecialists

func BuiltinSpecialists() []*Specialist

BuiltinSpecialists returns the default built-in specialists.

func NewSpecialist

func NewSpecialist(name, description, prompt string, tools []string, scope string) *Specialist

NewSpecialist creates a new specialist.

func (*Specialist) HasTool

func (s *Specialist) HasTool(tool string) bool

HasTool checks if the specialist has a specific tool.

type SpecialistManifest

type SpecialistManifest struct {
	Description string   `yaml:"description"`
	Tools       []string `yaml:"tools"`
}

SpecialistManifest represents a specialist's manifest file.

Jump to

Keyboard shortcuts

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