Expand description
Subagent definitions: Markdown files with YAML frontmatter, compatible with Claude Code’s
.claude/agents/*.md. The frontmatter has name, description, optional tools (a
comma list or a YAML list) and optional model; the body is the subagent’s system
prompt. Unknown keys (color, permissionMode, …) are kept in AgentDef::meta and
otherwise ignored, so files written for Claude Code load unchanged.
byob looks in <workspace>/.byob/agents, <workspace>/.claude/agents, <config>/agents
and each plugin’s agents/ folder (see crate::Plugin::agents).
Structs§
- Agent
Def - One subagent definition.
Functions§
- agent_
name - A name as written (
Code Reviewer) → a valid agent name (code-reviewer). - agent_
name_ ok [a-z0-9][a-z0-9_-]{0,63}- load_
agents_ dir - Every
<dir>/*.md(sorted by file name). Bad files become errors; the rest still load. A missingdiris simply empty. Later files with an existing name are reported and skipped. - merge_
agents - Merge agent lists, earlier lists winning by name (workspace before user before plugins).
- parse_
agent - Parse an agent file.
filenames the fallback agent (its stem) when the frontmatter has noname; a missingdescriptionfalls back to the body’s first line. - tool_
aliases - What a Claude Code tool name means in byob. Names byob has (
read_file) map to themselves; Claude Code’s own tools map to the closest byob tools; tools with no counterpart (WebSearch,Task) map to nothing.