catalog

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SharedCoreDir = "core"

SharedCoreDir is the path within the embedded FS to shared core files (memory, self-awareness). Agent-specific core/ dirs can override any shared file.

Variables

This section is empty.

Functions

func DisplayNameFrom

func DisplayNameFrom(name string) string

DisplayNameFrom derives a human-readable display name from a kebab-case machine name. Acronym-aware ("api-design-standards" → "API Design Standards") and article-aware ("issue-to-implementation" → "Issue to Implementation"). First token always capitalized regardless of article status.

Types

type AgentCompat

type AgentCompat struct {
	All   bool
	Names []string
}

AgentCompat handles the YAML "agents" field which can be "all" or a list of strings.

func (AgentCompat) CompatibleWith

func (a AgentCompat) CompatibleWith(agentType string) bool

func (AgentCompat) String

func (a AgentCompat) String() string

func (*AgentCompat) UnmarshalYAML

func (a *AgentCompat) UnmarshalYAML(value *yaml.Node) error

type AgentDef

type AgentDef struct {
	Name             string
	DisplayName      string
	Description      string
	DefaultSkills    []string
	DefaultWorkflows []string
	DefaultProtocols []string
	DefaultSensors   []string
	DefaultRoutines  []string
	CoreDir          string // path within FS to core/ directory

	// Hints is the parsed catalog/agents/<type>/hints.yaml payload, keyed
	// by command ("init", "add", "remove", "update"). Nil when the file is
	// absent — hints are optional and the tui/hints renderer falls back to
	// a zero Block silently. Plan 31 Phase H.
	Hints map[string]HintSection
}

AgentDef represents an agent type definition from the catalog.

type Catalog

type Catalog struct {
	Agents      []AgentDef
	Skills      []CatalogItem
	Workflows   []CatalogItem
	Protocols   []CatalogItem
	Sensors     []SensorItem
	Routines    []RoutineItem
	Scaffolding []ScaffoldingItem
	// contains filtered or unexported fields
}

Catalog holds all loaded catalog data with lookup helpers.

func New

func New(fsys fs.FS) (*Catalog, error)

New loads the full catalog from an embedded filesystem.

func (*Catalog) FS

func (c *Catalog) FS() fs.FS

func (*Catalog) GetAgent

func (c *Catalog) GetAgent(name string) *AgentDef

func (*Catalog) GetItem

func (c *Catalog) GetItem(name string) *CatalogItem

func (*Catalog) GetProtocol

func (c *Catalog) GetProtocol(name string) *CatalogItem

func (*Catalog) GetRoutine

func (c *Catalog) GetRoutine(name string) *RoutineItem

func (*Catalog) GetScaffolding

func (c *Catalog) GetScaffolding(name string) *ScaffoldingItem

func (*Catalog) GetSensor

func (c *Catalog) GetSensor(name string) *SensorItem

func (*Catalog) GetSkill

func (c *Catalog) GetSkill(name string) *CatalogItem

func (*Catalog) GetWorkflow

func (c *Catalog) GetWorkflow(name string) *CatalogItem

func (*Catalog) ProtocolsFor

func (c *Catalog) ProtocolsFor(agentType string) []CatalogItem

func (*Catalog) RoutinesFor

func (c *Catalog) RoutinesFor(agentType string) []RoutineItem

func (*Catalog) SensorsFor

func (c *Catalog) SensorsFor(agentType string) []SensorItem

func (*Catalog) SkillsFor

func (c *Catalog) SkillsFor(agentType string) []CatalogItem

func (*Catalog) WorkflowsFor

func (c *Catalog) WorkflowsFor(agentType string) []CatalogItem

type CatalogItem

type CatalogItem struct {
	Name        string      `yaml:"name"`
	DisplayName string      `yaml:"display_name"`
	Description string      `yaml:"description"`
	Agents      AgentCompat `yaml:"agents"`
	Required    AgentCompat `yaml:"required"`
	Triggers    *Triggers   `yaml:"triggers,omitempty"`
	ContentPath string      `yaml:"-"`
}

CatalogItem represents a skill, workflow, or protocol.

type HintPrompt added in v0.3.0

type HintPrompt struct {
	Label string `yaml:"label"`
	Body  string `yaml:"body"`
}

HintPrompt is a single "ASK YOUR AGENT" copy-paste entry inside a HintSection. Both fields are template-rendered at Load time so values like `{{ .DocsPath }}` resolve to the project's workspace path.

type HintSection added in v0.3.0

type HintSection struct {
	NextCLI      []string     `yaml:"next_cli,omitempty"`
	NextWorkflow []string     `yaml:"next_workflow,omitempty"`
	AIPrompts    []HintPrompt `yaml:"ai_prompts,omitempty"`
}

HintSection is the per-command hints payload. Each field maps 1:1 to a section in the tui/hints 3-layer renderer.

type RoutineItem

type RoutineItem struct {
	Name        string      `yaml:"name"`
	DisplayName string      `yaml:"display_name"`
	Description string      `yaml:"description"`
	Agents      AgentCompat `yaml:"agents"`
	Required    AgentCompat `yaml:"required"`
	Frequency   string      `yaml:"frequency"`
	ContentPath string      `yaml:"-"`
}

RoutineItem represents a periodic self-maintenance routine.

type ScaffoldingItem

type ScaffoldingItem struct {
	Name        string   `yaml:"name"`
	DisplayName string   `yaml:"display_name"`
	Description string   `yaml:"description"`
	Required    bool     `yaml:"required"`
	Affects     string   `yaml:"affects"`
	Files       []string `yaml:"files"`
}

ScaffoldingItem represents a project scaffolding group (e.g. logs, playbook, reports).

type SensorItem

type SensorItem struct {
	Name        string      `yaml:"name"`
	DisplayName string      `yaml:"display_name"`
	Description string      `yaml:"description"`
	Agents      AgentCompat `yaml:"agents"`
	Required    AgentCompat `yaml:"required"`
	Event       string      `yaml:"event"`
	Matcher     string      `yaml:"matcher,omitempty"`
	ContentPath string      `yaml:"-"`
}

SensorItem represents a sensor (hook).

type TriggerExample added in v0.2.0

type TriggerExample struct {
	Prompt string `yaml:"prompt"`
	Action string `yaml:"action"`
}

TriggerExample is a prompt-action pair showing how an ability activates.

type Triggers added in v0.2.0

type Triggers struct {
	Scenarios []string         `yaml:"scenarios,omitempty"`
	Examples  []TriggerExample `yaml:"examples,omitempty"`
	Paths     []string         `yaml:"paths,omitempty"`
}

Triggers holds activation metadata for skills and workflows.

Jump to

Keyboard shortcuts

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