Documentation
¶
Overview ¶
Package messages provides metadata for hook message templates.
Index ¶
Constants ¶
const CategoryCtxSpecific = "ctx-specific"
CategoryCtxSpecific marks messages specific to ctx's own development workflow.
const CategoryCustomizable = "customizable"
CategoryCustomizable marks messages intended for project-specific customization.
Variables ¶
This section is empty.
Functions ¶
func Hooks ¶
func Hooks() []string
Hooks returns a deduplicated list of hook names in the registry.
Returns:
- []string: Hook names in alphabetical order
func RegistryError ¶
func RegistryError() error
RegistryError returns any error encountered while parsing the embedded registry.yaml. Nil on success.
Types ¶
type HookMessageInfo ¶
type HookMessageInfo struct {
// Hook is the hook directory name (e.g., "qa-reminder").
Hook string `yaml:"hook"`
// Variant is the template file stem (e.g., "gate").
Variant string `yaml:"variant"`
// Category is "customizable" or "ctx-specific".
Category string `yaml:"category"`
// Description is a one-line human description of this message.
Description string `yaml:"description"`
// TemplateVars lists available Go template variables (e.g., "PromptsSinceNudge").
TemplateVars []string `yaml:"vars,omitempty"`
}
HookMessageInfo describes a single hook message template entry.
func Lookup ¶
func Lookup(hook, variant string) *HookMessageInfo
Lookup returns the HookMessageInfo for the given hook and variant, or nil if not found.
Parameters:
- hook: Hook directory name (e.g., "qa-reminder")
- variant: Template file stem (e.g., "gate")
Returns:
- *HookMessageInfo: The matching entry, or nil
func Registry ¶
func Registry() []HookMessageInfo
Registry returns the list of all hook message entries parsed from the embedded registry.yaml.
Returns:
- []HookMessageInfo: All entries sorted by hook then variant