agents

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package agents encodes the agent_directory_conventions table and derives output paths for mln compile based on a project's agent_compat list.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownAgent = errors.New("agents: unknown agent")

ErrUnknownAgent is returned when an agent_compat value has no known convention.

Functions

func DeriveOutputs

func DeriveOutputs(agentCompat []string, projectDir string) (map[string]string, error)

DeriveOutputs maps each agent in agentCompat to its project-scoped skills directory. Returns a map of target path (relative to project root) -> dep name glob ("*"), suitable for use as the outputs block in melon.yaml.

Returns ErrUnknownAgent (wrapped) if any value in agentCompat is not in the convention table.

Example: agentCompat=["claude-code"] → {".claude/skills/": "*"}

func DeriveTargets

func DeriveTargets(agentCompat []string) ([]string, error)

DeriveTargets returns the deduplicated, sorted list of project-scoped skill directories for each agent in m.AgentCompat. Returns ErrUnknownAgent if any agent is not in the convention table.

func KnownAgents

func KnownAgents() []string

KnownAgents returns the sorted list of all known agent names.

Types

type Convention

type Convention struct {
	// Project is the project-scoped skills directory, relative to the project root.
	Project string
	// Global is the user-global skills directory (unexpanded ~ path).
	Global string
}

Convention holds the known install paths for a single agent.

Jump to

Keyboard shortcuts

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