Documentation
¶
Overview ¶
Package frontmatter provides a minimal, dependency-free parser for the ---fenced "key: value" blocks that prefix skill, command, and memory files. It mirrors the YAML-like frontmatter convention without pulling in a YAML library, keeping fairpeer's single-(TOML)-dependency promise.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Split ¶
Split separates an optional leading ---fenced block of "key: value" lines from the body. It returns the parsed keys (lowercased) and the remaining body. With no opening/closing fence the whole input is the body. An opened but never closed fence treats the entire input as body (no partial parse).
Values are trimmed of surrounding whitespace and outer quotes (" or '). A key with an empty value heads either a section ("metadata:") whose indented "key: value" lines flatten (metadata.type → fm["type"]), or a YAML list whose "- item" lines are joined comma-separated (allowed-tools → "read_file, grep"), so list-valued keys from skills authored for other agent tools survive. The last write wins for duplicate keys.
Types ¶
This section is empty.