Versions in this module Expand all Collapse all v0 v0.6.0 Feb 3, 2026 Changes in this version + const ActiveRulesFile + const CachedContextFile + const CachedContextFilesListFile + const ContextFile + const FilesListFile + const GroveDir + const RulesDir + const RulesExt + const RulesFile + const RulesWorkDir + const StatsCacheDirName + var BinaryExtensions = map[string]bool + var IsZombieWorktree = workspace.IsZombieWorktree + var IsZombieWorktreeCwd = workspace.IsZombieWorktreeCwd + func ExpandBraces(pattern string) []string + func ExtractCommitFromPath(filePath string) string + func FindRulesetFile(projectPath, rulesetName string) (string, error) + func FormatBytes(bytes int) string + func FormatTokenCount(tokens int) string + func GetCacheFilePathForRepo(repoURL string) (string, error) + func GetExtsFromLanguage(extName string) []string + func GetGitInfo() (branch string, hasChanges bool, err error) + func IsBinaryFile(path string) bool + func MatchesGitRule(rule GitRule, ...) bool + func TruncatePath(path string, maxLen int) string + type AttributionResult map[int][]string + type CachedFileStats struct + Path string + Size int64 + Tokens int + type ConceptManifest struct + Description string + ID string + RelatedConcepts []string + RelatedNotes []string + RelatedPlans []string + Status string + Title string + type ContextConfig struct + AllowedPaths []string + ExcludedWorkspaces []string + IncludedWorkspaces []string + type ContextStats struct + AllFiles []FileStats + AvgTokens int + ContextType string + Distribution []TokenDistribution + Languages map[string]*LanguageStats + LargestFiles []FileStats + MedianTokens int + TotalFiles int + TotalSize int64 + TotalTokens int + func (s *ContextStats) Print(title string) + func (s *ContextStats) String(title string) string + type DiffResult struct + Added []FileInfo + CompareFiles map[string]FileInfo + CompareTotalSize int64 + CompareTotalTokens int + CurrentFiles map[string]FileInfo + CurrentTotalSize int64 + CurrentTotalTokens int + Removed []FileInfo + func (d *DiffResult) Print(compareName string) + type ExclusionResult map[int][]string + type FileInfo struct + Path string + Size int64 + Tokens int + type FileStats struct + Path string + Percentage float64 + Size int64 + Tokens int + type FilteredFileInfo struct + File string + WinningLineNum int + type FilteredResult map[int][]FilteredFileInfo + type GitOptions struct + Branch string + Commits int + Since string + Staged bool + type GitRule struct + ContextType RuleStatus + IsExclude bool + RepoURL string + Ruleset string + Version string + type ImportInfo struct + Directive string + DirectiveQuery string + ImportIdentifier string + LineNum int + OriginalLine string + type LanguageStats struct + FileCount int + Name string + Patterns []string + Percentage float64 + TotalTokens int + type LineType int + const LineTypeAliasPattern + const LineTypeCmdDirective + const LineTypeComment + const LineTypeEmpty + const LineTypeExclude + const LineTypeFindDirective + const LineTypeGitURL + const LineTypeGitURLRuleset + const LineTypeGrepDirective + const LineTypeOtherDirective + const LineTypePattern + const LineTypeRulesetImport + const LineTypeSeparator + const LineTypeUnknown + const LineTypeViewDirective + type Manager struct + func NewManager(workDir string) *Manager + func (m *Manager) AppendRule(rulePath, contextType string) error + func (m *Manager) ClassifyAllProjectFiles(showGitIgnored bool) (map[string]NodeStatus, error) + func (m *Manager) ClearSkippedRules() + func (m *Manager) DiffContext(rulesetName string) (*DiffResult, error) + func (m *Manager) EditRulesCmd() (*exec.Cmd, error) + func (m *Manager) EnsureAndGetRulesPath() (string, error) + func (m *Manager) FixContext() error + func (m *Manager) GenerateCachedContext() error + func (m *Manager) GenerateContext(useXMLFormat bool) error + func (m *Manager) GenerateContextFromRulesFile(rulesFilePath string, useXMLFormat bool) error + func (m *Manager) GetAllowedRoots() ([]string, error) + func (m *Manager) GetDefaultRuleName() string + func (m *Manager) GetExpireTime() (time.Duration, error) + func (m *Manager) GetRuleStatus(rulePath string) RuleStatus + func (m *Manager) GetSkippedRules() []SkippedRule + func (m *Manager) GetStats(contextType string, files []string, topN int) (*ContextStats, error) + func (m *Manager) GetWorkDir() string + func (m *Manager) IsPathAllowed(path string) (bool, string) + func (m *Manager) ListFiles() ([]string, error) + func (m *Manager) ListGitRules() ([]GitRule, error) + func (m *Manager) ListPlanRules() ([]PlanRule, error) + func (m *Manager) LoadDefaultRulesContent() (content []byte, rulesPath string) + func (m *Manager) LoadRulesContent() (content []byte, path string, err error) + func (m *Manager) ParseGitRule(rule string) (isGitURL bool, repoURL, version, ruleset string) + func (m *Manager) ReadFilesList(filename string) ([]string, error) + func (m *Manager) RemoveRule(rulePath string) error + func (m *Manager) RemoveRuleForPath(path string) error + func (m *Manager) ResolveColdContextFiles() ([]string, error) + func (m *Manager) ResolveFilesFromCustomRulesFile(rulesFilePath string) (hotFiles []string, coldFiles []string, err error) + func (m *Manager) ResolveFilesFromPatterns(patterns []string) ([]string, error) + func (m *Manager) ResolveFilesFromRules() ([]string, error) + func (m *Manager) ResolveFilesWithAttribution(rulesContent string) (AttributionResult, []RuleInfo, ExclusionResult, FilteredResult, error) + func (m *Manager) ResolveLineForRulePreview(line string) (string, error) + func (m *Manager) SetActiveRules(sourcePath string) error + func (m *Manager) ShouldDisableCache() (bool, error) + func (m *Manager) ShouldDisableExpiration() (bool, error) + func (m *Manager) ShouldFreezeCache() (bool, error) + func (m *Manager) ShowContext() error + func (m *Manager) ToggleViewDirective(path string) error + func (m *Manager) UpdateFromCmd(command string) error + func (m *Manager) UpdateFromGit(opts GitOptions) error + func (m *Manager) UpdateFromRules() error + func (m *Manager) ValidateContext(files []string) (*ValidationResult, error) + func (m *Manager) WriteFilesList(filename string, files []string) error + func (m *Manager) WriteRulesTo(destPath string) error + type NodeStatus int + const StatusDirectory + const StatusExcludedByRule + const StatusIgnoredByGit + const StatusIncludedCold + const StatusIncludedHot + const StatusOmittedNoMatch + type ParsedLine struct + Content string + Parts map[string]string + Type LineType + func ParseRulesLine(line string) ParsedLine + type PlanRule struct + Name string + Path string + PlanName string + WorkspaceName string + type RepoCache struct + CreatedAt time.Time + Files map[string]CachedFileStats + WorktreePath string + type RuleInfo struct + Directive string + DirectiveQuery string + EffectiveLineNum int + IsExclude bool + LineNum int + Pattern string + type RuleStatus int + const RuleCold + const RuleExcluded + const RuleHot + const RuleNotFound + const StateSourceKey + type SkippedRule struct + LineNum int + Reason string + Rule string + type StatsProvider struct + func GetStatsProvider() *StatsProvider + func (sp *StatsProvider) GetFileStats(filePath string) (FileInfo, error) + type TokenDistribution struct + FileCount int + Percentage float64 + RangeLabel string + type ValidationResult struct + AccessibleFiles int + Duplicates map[string]int + MissingFiles []string + PermissionIssues []string + TotalFiles int + func (r *ValidationResult) Print() v0.0.1 Jan 16, 2026