knowledge

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package knowledge scans knowledge files against configured thresholds and emits warnings when limits are exceeded.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckKnowledgeHealth

func CheckKnowledgeHealth(sessionID string) (string, bool)

CheckKnowledgeHealth runs the full knowledge health check: scans files, formats warnings, and builds output if any thresholds are exceeded.

Parameters:

  • sessionID: session identifier for notifications

Returns:

  • string: formatted nudge box, or empty string if no warnings
  • bool: true if warnings were found

func EmitKnowledgeWarning

func EmitKnowledgeWarning(sessionID, fileWarnings string) string

EmitKnowledgeWarning builds the knowledge file growth warning box.

Parameters:

  • sessionID: session identifier for notifications
  • fileWarnings: pre-formatted findings text

Returns:

  • string: formatted nudge box, or empty string if silenced

func FormatKnowledgeWarnings

func FormatKnowledgeWarnings(findings []finding) string

FormatKnowledgeWarnings builds a pre-formatted findings list string from the given findings.

Parameters:

  • findings: knowledge file threshold violations

Returns:

  • string: formatted warning lines for template injection

func ScanKnowledgeFiles

func ScanKnowledgeFiles(
	contextDir string, decThreshold, lrnThreshold, convThreshold int,
) []finding

ScanKnowledgeFiles checks knowledge files against their configured thresholds and returns any that exceed the limits.

Parameters:

  • contextDir: absolute path to the context directory
  • decThreshold: max decision entries (0 = disabled)
  • lrnThreshold: max learning entries (0 = disabled)
  • convThreshold: max convention lines (0 = disabled)

Returns:

  • []KnowledgeFinding: files exceeding thresholds, or nil if all within limits

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL