Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions internal/agent/consolidation/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ type ConsolidationConfig struct {
StrongEvidenceMinCount int // evidence count to unlock strong ceiling (default 10)

// Pattern decay tunables
PatternBaselineDecay float32 // per-cycle baseline decay (default 0.998)
StaleDecayHealthy float32 // decay when evidence ratio >= 0.5 (default 0.98)
StaleDecayModerate float32 // decay when evidence ratio >= 0.2 (default 0.95)
StaleDecayAggressive float32 // decay when evidence ratio < 0.2 (default 0.90)
PatternBaselineDecay float32 // per-cycle baseline decay (default 0.995)
StaleDecayHealthy float32 // decay when evidence ratio >= 0.5 (default 0.97)
StaleDecayModerate float32 // decay when evidence ratio >= 0.2 (default 0.93)
StaleDecayAggressive float32 // decay when evidence ratio < 0.2 (default 0.85)

// Self-sustaining pattern tunables
SelfSustainingMinEvidence int // evidence count to qualify (default 10)
SelfSustainingMinStrength float32 // minimum strength to qualify (default 0.9)
SelfSustainingDecay float32 // reduced decay for qualifying patterns (default 0.9999)
SelfSustainingDecay float32 // reduced decay for qualifying patterns (default 0.995)

// Never-recalled watcher memory archival
NeverRecalledArchiveDays int // archive non-MCP memories with 0 access after this many days (default 30, 0=disabled)
Expand Down Expand Up @@ -87,13 +87,13 @@ func DefaultConfig() ConsolidationConfig {
PatternStrengthCeiling: 0.95,
StrongEvidenceCeiling: 1.0,
StrongEvidenceMinCount: 10,
PatternBaselineDecay: 0.998,
StaleDecayHealthy: 0.98,
StaleDecayModerate: 0.95,
StaleDecayAggressive: 0.90,
PatternBaselineDecay: 0.995,
StaleDecayHealthy: 0.97,
StaleDecayModerate: 0.93,
StaleDecayAggressive: 0.85,
SelfSustainingMinEvidence: 10,
SelfSustainingMinStrength: 0.9,
SelfSustainingDecay: 0.9999,
SelfSustainingDecay: 0.995,
NeverRecalledArchiveDays: 30,
}
}
Expand Down Expand Up @@ -1531,12 +1531,12 @@ func (ca *ConsolidationAgent) decayPatterns(ctx context.Context) (int, error) {
p.Strength *= cfgFloat32(ca.config.PatternBaselineDecay, 0.998)
}

// Additional evidence-based decay for patterns not accessed within 7 days
// Additional evidence-based decay for patterns not accessed within 3 days
recency := p.LastAccessed
if recency.IsZero() {
recency = p.CreatedAt
}
stale := recency.IsZero() || time.Since(recency).Hours() >= 168
stale := recency.IsZero() || time.Since(recency).Hours() >= 72

if stale {
totalEvidence := len(p.EvidenceIDs)
Expand Down
3 changes: 2 additions & 1 deletion internal/agent/encoding/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type EncodingConfig struct {
EmbedBatchSize int // max memories to batch-embed in one call (default 10)
DeduplicationThreshold float32 // cosine sim above which new memory is a duplicate (default: 0.95)
MCPDeduplicationThreshold float32 // higher threshold for MCP-sourced memories (default: 0.98)
SalienceFloor float32 // min salience to encode; non-MCP sources below this are skipped (default: 0.0)
SalienceFloor float32 // min salience to encode; non-MCP sources below this are skipped (default: 0.5)
DisablePolling bool // if true, skip the polling loop (MCP processes should not poll)
}

Expand Down Expand Up @@ -129,6 +129,7 @@ func DefaultConfig() EncodingConfig {
BatchSizePoll: 10,
DeduplicationThreshold: 0.95,
MCPDeduplicationThreshold: 0.98,
SalienceFloor: 0.5,
}
}

Expand Down
5 changes: 3 additions & 2 deletions internal/agent/perception/heuristic.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,10 @@ func (h *HeuristicFilter) evaluateFilesystem(path, content string) (float32, str
"venv/", ".venv/", "site-packages/", ".tox/", ".mypy_cache/", ".ruff_cache/", ".pytest_cache/",
".egg-info/", ".eggs/"}

// Hard-reject lockfiles and checksums — deterministic files with zero semantic value
// Hard-reject lockfiles, checksums, and release tooling — deterministic files with zero semantic value
lockfileNames := []string{"go.sum", "package-lock.json", "yarn.lock", "Cargo.lock",
"poetry.lock", "pnpm-lock.yaml", "Gemfile.lock", "composer.lock"}
"poetry.lock", "pnpm-lock.yaml", "Gemfile.lock", "composer.lock",
".release-please-manifest.json", "CHANGELOG.md"}
baseName := path
if idx := strings.LastIndex(baseName, "/"); idx >= 0 {
baseName = baseName[idx+1:]
Expand Down