agentfs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package agentfs discovers and reads agent metadata from the filesystem.

Agents are represented as subdirectories under a team path, each containing a CLAUDE.md file with YAML frontmatter fields (name, role, voice, emoji, etc.). Provides functions to discover all agents, look up a single agent by name or path, filter by role, and update individual frontmatter fields in place.

Plane: shared

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(teamPath string) (int, error)

Count returns the number of agent directories in teamPath.

func DiscoverAgents

func DiscoverAgents(teamPath string) ([]string, error)

DiscoverAgents returns sorted agent names from teamPath subdirs containing CLAUDE.md.

func SetField

func SetField(teamPath, name, field, value string) error

SetField updates a single frontmatter field in an agent's CLAUDE.md. If no frontmatter exists, it adds one. Preserves existing content.

Types

type AgentInfo

type AgentInfo struct {
	Name             string // directory name (lowercase)
	Path             string // absolute path to agent directory
	Voice            string // Kokoro TTS voice ID
	Emoji            string // display emoji
	Description      string // short role summary
	Role             string // e.g. designer, researcher — matches [prompts] key
	FlicknoteProject string // default flicknote project for this agent
}

AgentInfo holds agent metadata parsed from CLAUDE.md frontmatter.

func Discover

func Discover(teamPath string) ([]AgentInfo, error)

Discover scans teamPath for agent directories (subdirs with CLAUDE.md). Returns sorted list of agents with metadata parsed from frontmatter.

func FindByRole

func FindByRole(teamPath, role string) ([]AgentInfo, error)

FindByRole returns all agents with a matching role field.

func Get

func Get(teamPath, name string) (*AgentInfo, error)

Get returns metadata for a single agent by name.

func GetFromPath

func GetFromPath(agentPath string) (*AgentInfo, error)

GetFromPath returns agent metadata from an absolute agent directory path.

Jump to

Keyboard shortcuts

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