Versions in this module Expand all Collapse all v0 v0.1.1 Jun 25, 2026 Changes in this version + var DefaultConventionFiles = []string + var DefaultRuleSources = []RuleSource + func MatchGlobs(globs []string, filePath string) bool + func ShouldInject(fm *RuleFrontmatter, filePath string) bool + type ConventionFile struct + Content string + FileName string + Level int + Path string + type InjectionCache struct + func NewInjectionCache() *InjectionCache + func (c *InjectionCache) Clear() + func (c *InjectionCache) IsSeen(path, hash string) bool + func (c *InjectionCache) Len() int + func (c *InjectionCache) Mark(path, hash string) + type Rule struct + Content string + Distance int + Hash string + Local bool + Path string + Priority int + Source string + type RuleDiscoverer struct + func NewRuleDiscoverer(projectRoot string) *RuleDiscoverer + func (rd *RuleDiscoverer) Cache() *InjectionCache + func (rd *RuleDiscoverer) Discover(filePath string) []Rule + type RuleFrontmatter struct + AlwaysApply *bool + Description string + Globs []string + func ParseFrontmatter(content string) (*RuleFrontmatter, string) + type RuleSource struct + IsDir bool + Name string + Priority int + type WalkUpDiscoverer struct + func NewWalkUpDiscoverer(projectRoot string) *WalkUpDiscoverer + func (d *WalkUpDiscoverer) Cache() *InjectionCache + func (d *WalkUpDiscoverer) Discover(filePath string) []ConventionFile + func (d *WalkUpDiscoverer) FlushPending() string + func (d *WalkUpDiscoverer) HandleCompact(ctx interface{}, envelope hooks.EventEnvelope) error + func (d *WalkUpDiscoverer) HandlePostTool(ctx interface{}, envelope hooks.EventEnvelope) error + func (d *WalkUpDiscoverer) WithFileNames(names []string) *WalkUpDiscoverer + func (d *WalkUpDiscoverer) WithMaxFileKB(kb int) *WalkUpDiscoverer + func (d *WalkUpDiscoverer) WithMaxTotalKB(kb int) *WalkUpDiscoverer