abstraction

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractionAgent

type AbstractionAgent struct {
	// contains filtered or unexported fields
}

func NewAbstractionAgent

func NewAbstractionAgent(s store.Store, llmProv llm.Provider, cfg AbstractionConfig, log *slog.Logger) *AbstractionAgent

func (*AbstractionAgent) GetTriggerChannel

func (aa *AbstractionAgent) GetTriggerChannel() chan<- struct{}

GetTriggerChannel returns a send-only reference to the on-demand trigger channel. Used by the reactor engine to send abstraction signals.

func (*AbstractionAgent) Health

func (aa *AbstractionAgent) Health(ctx context.Context) error

func (*AbstractionAgent) Name

func (aa *AbstractionAgent) Name() string

func (*AbstractionAgent) RunOnce

func (aa *AbstractionAgent) RunOnce(ctx context.Context) (*CycleReport, error)

func (*AbstractionAgent) Start

func (aa *AbstractionAgent) Start(ctx context.Context, bus events.Bus) error

func (*AbstractionAgent) Stop

func (aa *AbstractionAgent) Stop() error

type AbstractionConfig

type AbstractionConfig struct {
	Interval                   time.Duration
	MinStrength                float32
	MaxLLMCalls                int
	StartupDelay               time.Duration
	DefaultConfidence          float32
	PatternAxiomConfidence     float32
	ConfidenceModerateDecay    float32
	ConfidenceSignificantDecay float32
	ConfidenceSevereDecay      float32
	GroundingFloor             float32
	// DedupMinConceptOverlap is the minimum number of shared concepts required
	// for findSimilarAbstraction to treat a new principle/axiom as a duplicate
	// of an existing abstraction. Prevents the same embedding-only attractor
	// behavior fixed for consolidation in PRs #412 and #414. Default: 2.
	DedupMinConceptOverlap int
	// ArchiveDecayConfidence is the confidence threshold below which a
	// chronically-demoted abstraction is archived instead of cycled through
	// demotion indefinitely. Default: 0.2.
	ArchiveDecayConfidence float32
	// ArchiveDemotionStreak is the number of consecutive grounding-verification
	// cycles in which the abstraction's grounding ratio must stay below the
	// "healthy" threshold (0.5) before decay-driven archival fires. Counted
	// via the DemotionStreak field on the abstraction and reset to 0 on any
	// healthy cycle. Robust to adaptive scheduler cadence in a way that a
	// wall-clock age threshold is not. Default: 10.
	ArchiveDemotionStreak int
}

type CycleReport

type CycleReport struct {
	Duration                  time.Duration
	PatternsEvaluated         int
	PrinciplesCreated         int
	AxiomsCreated             int
	AbstractionsDemoted       int
	AbstractionsArchived      int
	PrinciplesSkippedNoChange bool
	AxiomsSkippedNoChange     bool
}

Jump to

Keyboard shortcuts

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