Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// Description is parsed from top-level frontmatter key "description".
// Agent-specific descriptions override this during formatting if present.
Description string `yaml:"-"`
// Raw contains the full frontmatter as a generic map. Agent-specific
// keys like "claude", "roo", "cline", "copilot" remain here.
Raw map[string]any `yaml:"-"`
// Content is the markdown body after frontmatter.
Content string `yaml:"-"`
// Path is the original file path (not in frontmatter)
Path string `yaml:"-"`
}
Command represents a command definition in an agent-agnostic way. Frontmatter keys are preserved in Raw. Description is a common, top-level field used as a fallback by agents.
func ParseCommand ¶
ParseCommand parses a command definition from file content into an agent-agnostic Command.
func (*Command) UnmarshalSection ¶ added in v0.0.4
UnmarshalSection marshals a sub-map from c.Raw[key] to YAML and unmarshals into out. This mirrors model.Mode.UnmarshalSection and centralizes section extraction for all agents.
type Mode ¶ added in v0.0.4
type Mode struct {
// Description is parsed from top-level frontmatter key "description".
// Agent-specific descriptions override this during formatting if present.
Description string `yaml:"-"`
// Raw contains the full frontmatter as a generic map. Agent-specific
// keys like "claude", "roo", "cline", "copilot" remain here.
Raw map[string]any `yaml:"-"`
// Content is the markdown body after frontmatter.
Content string
}
Mode represents a subagent definition in an agent-agnostic way. Frontmatter keys are preserved in Raw. Description is a common, top-level field used as a fallback by agents.
func ParseMode ¶ added in v0.0.4
ParseMode parses a mode definition from file content into an agent-agnostic Mode. It mirrors ParseCommand behavior for frontmatter handling, but preserves body content exactly (no trimming) to maintain compatibility with existing tests.
func (*Mode) UnmarshalSection ¶ added in v0.0.4
UnmarshalSection marshals a sub-map from m.Raw[key] to YAML and unmarshals into out. This centralizes section extraction for all agents (claude, roo, etc). Note: Go methods cannot be generic, so out is an interface{}.