Skip to content

fix: pattern project scoping, decay, and dismiss_pattern tool#311

Merged
CalebisGross merged 1 commit intomainfrom
fix/pattern-decay-and-scope
Mar 21, 2026
Merged

fix: pattern project scoping, decay, and dismiss_pattern tool#311
CalebisGross merged 1 commit intomainfrom
fix/pattern-decay-and-scope

Conversation

@CalebisGross
Copy link
Copy Markdown
Collaborator

Summary

  • Project scoping: Pattern embedding search now filters by project in SQL instead of post-hoc filtering that leaked cross-project patterns into project-scoped recalls
  • Decay fix: Self-sustaining immunity now requires evidence health ratio >= 0.5 (patterns with all-archived evidence no longer stay at strength 1.0 forever). Evidence-based decay applies regardless of access recency. Added fading→archived transition at strength < 0.05
  • dismiss_pattern tool: New MCP tool (Fix memory pipeline quality: ranking, LLM gating, decay, noise suppression #22) to archive stale/irrelevant patterns. Backed by new ArchivePattern store method
  • ListPatterns expanded: Now returns both active and fading patterns so the decay loop can process fading→archived transitions

Test plan

  • All existing tests pass (agent, store, MCP, reactor, dreaming)
  • Tool count test updated from 21 to 22
  • make build && make check clean
  • Full go test ./... green

Fixes #306

🤖 Generated with Claude Code

- Add SearchPatternsByEmbeddingInProject to scope pattern search by project
  instead of post-hoc filtering that leaked cross-project patterns
- Fix pattern decay: self-sustaining status now requires healthy evidence
  (>=50% active), evidence-based decay applies regardless of access recency,
  and fading patterns transition to archived at strength <0.05
- Add ArchivePattern store method for individual pattern archival
- Add dismiss_pattern MCP tool (22nd tool) to archive stale patterns
- Update ListPatterns to include fading patterns for decay processing
- Update tool count in CLAUDE.md and README.md (21 → 22)

Fixes #306

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CalebisGross CalebisGross merged commit f050a36 into main Mar 21, 2026
@CalebisGross CalebisGross deleted the fix/pattern-decay-and-scope branch March 21, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: patterns ignore project scope and never decay

1 participant