Skip to content

M28-A: Sub-agent definition format and parser #710

@bug-ops

Description

@bug-ops

Parent: #709

Summary

Implement the sub-agent definition format (markdown with TOML frontmatter) and parser. Reuse the +++ delimiter pattern from zeph-skills.

Scope

  • SubAgentDef struct with fields: name, description, model, tools (ToolPolicy), permissions (SubAgentPermissions), skills (SkillFilter), system_prompt
  • ToolPolicy enum: AllowList / DenyList / InheritAll
  • SubAgentPermissions: secrets, max_turns, background, timeout_secs
  • SkillFilter: include/exclude glob patterns
  • TOML frontmatter parser (reuse pattern from zeph-skills loader)
  • Definition loader scanning .zeph/agents/ and ~/.config/zeph/agents/

Acceptance Criteria

  • SubAgentDef parses valid markdown+TOML definition files
  • Invalid definitions produce clear error messages
  • Loader discovers definitions from project and user directories
  • Unit tests for parser edge cases (missing fields, defaults)
  • serde(default) for optional fields with sensible defaults (max_turns=50, timeout_secs=300)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions