ExternalConfigs.Agent (fnord v0.9.26)

View Source

A parsed Claude Code subagent definition from a single .md file under ~/.claude/agents/ or <project>/.claude/agents/.

Agents are sibling to skills: a named, described capability with an instruction body. They differ in format (a single .md file instead of a directory with SKILL.md) and in intent: an agent is a role (system prompt + allowed tools + model hint) that Claude Code would delegate to, whereas a skill is a procedure to follow. Fnord doesn't have a subagent-delegation mechanism, so from the coordinator's perspective an agent is reference material: the body is guidance to internalize when the description matches the task.

Data flow

  1. ExternalConfigs.Loader.load_claude_agents/1 discovers .md files under the global and project agents dirs, calls from_file/2 per entry, and caches the resulting list.
  2. ExternalConfigs.Catalog filters out agents whose tools list implies edit capability when fnord isn't in edit mode (the partition_agents helper inside that module), then feeds the rest to the skills catalog prompt.
  3. The coordinator's bootstrap (the external_configs_msg step) appends the catalog as a system message; the Frippery log_external_skills boot line prints the enabled agents' names.

Summary

Functions

Load an agent from a single .md file. The agent name is derived from the filename (without the .md extension) when no name key is set in frontmatter.

Types

source()

@type source() :: :global | :project

t()

@type t() :: %ExternalConfigs.Agent{
  body: String.t(),
  description: String.t() | nil,
  model: String.t() | nil,
  name: String.t(),
  path: String.t(),
  source: source(),
  tools: [String.t()]
}

Functions

from_file(path, source)

@spec from_file(String.t(), source()) :: {:ok, t()} | {:error, term()}

Load an agent from a single .md file. The agent name is derived from the filename (without the .md extension) when no name key is set in frontmatter.