Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Frontmatter ¶
type Frontmatter struct {
Priority int `yaml:"priority,omitempty"` // Rule priority (higher = more important)
Tools []string `yaml:"tools,omitempty"` // Which tools this rule applies to
Applies string `yaml:"applies,omitempty"` // File pattern this rule applies to (e.g., "*.ts") - legacy
Paths []string `yaml:"paths,omitempty"` // File patterns for conditional rules (Claude Code style)
Globs []string `yaml:"globs,omitempty"` // File patterns for conditional rules (Cursor style)
}
Frontmatter represents the optional YAML frontmatter in a rule file
type Rule ¶
type Rule struct {
Name string `json:"name"`
Frontmatter *Frontmatter `json:"frontmatter,omitempty"`
Content string `json:"content"` // Markdown content
Path string `json:"path"` // Source file path
// Runtime fields (not serialized)
Scope string `json:"-"` // "local" or "global" - where this rule came from
Tool string `json:"-"` // Which tool owns this (e.g., "claude", "gemini", "agentctl")
}
Rule represents a rule/instruction configuration
func (*Rule) InspectContent ¶ added in v0.3.0
InspectContent returns the formatted content for the inspector viewport
func (*Rule) InspectTitle ¶ added in v0.3.0
InspectTitle returns the display name for the inspector modal header
Click to show internal directories.
Click to hide internal directories.