Documentation
¶
Overview ¶
Package outputstyle adds a selectable "output style" — a block of persona / tone instructions appended to (or replacing) the system prompt — so the user can shift how the agent communicates without rewriting the system prompt. It mirrors the skill/command loaders: built-in styles plus markdown files with frontmatter discovered under the project and home convention dirs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(base string, st OutputStyle) string
Apply folds a style into a base system prompt: appended when KeepCoding is set, otherwise the style replaces the prompt (a pure persona). A style with an empty body leaves the base untouched.
func DescribeList ¶
func DescribeList(styles []OutputStyle, active string) string
DescribeList renders the available styles as a short listing for /output-style.
Types ¶
type OutputStyle ¶
type OutputStyle struct {
Name string
Description string
Body string
KeepCoding bool // true: append to the coding system prompt; false: replace it
Builtin bool
Path string // file it loaded from ("" for built-ins)
}
OutputStyle is one selectable persona. Body is appended to the system prompt (KeepCoding true) or used as the whole prompt (false). Name is the selector (case-insensitive); Builtin marks the baked-in ones for listing.
func List ¶
func List(dirs []string) []OutputStyle
List returns every available style — built-ins plus the markdown files under dirs — deduped by lowercased name, with custom files overriding built-ins. Sorted by name. Malformed files are skipped.