Skip to content

0.2 (3/4): extension point for relevance, off unless named - #15

Merged
Yanir-R merged 2 commits into
mainfrom
claude/0.2-plugins
Nov 16, 2026
Merged

Yanir-R merged 2 commits into
mainfrom
claude/0.2-plugins

Conversation

@Yanir-R

@Yanir-R Yanir-R commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Requested by Yanir · project thread

What changed

One thing: an extension point for how relevance is scored. Split out of #12. Independent of the decay and digest pull requests; whichever merges second needs a small merge of main (both touch cli.py and the docs), which I will do.

  • plugins: one hook, relevance, (question, memories) -> one score per memory. The built-in word overlap is its default, so there is one code path and no duplicate logic.
  • A plugin registers in the personakit.plugins entry-point group. Nothing loads unless PERSONAKIT_PLUGINS names it; a name that is not installed is an error, not a silent fallback.
  • Policy stays in the core. retrieve.search still decides what may be served; a test proves a plugin that scores everything as relevant cannot serve restricted or archived memories.
  • docs/PLUGINS.md describes the hook, the limits and how to write one. ARCHITECTURE, PRIVACY, README and REVIEW-LOG updated.

Why

Word overlap is a baseline: it matches whole words in Latin letters only. An extension point lets a different scorer be used without forking the core, while the read policy cannot be widened by it.

How to verify

ruff check .
python -m coverage run -m unittest discover -s tests -t . && python -m coverage report   # 97 tests, 96%
./scripts/check_hygiene.sh

Also checked with a separately installed demo plugin: off when not named, on when named, a clear error when misspelled.

Checklist

  • Every commit is signed off (git commit -s), see CONTRIBUTING.md (owner is exempt; commits are not signed off on the owner's behalf)
  • No personal data, real paths, hostnames or credentials in code, tests, fixtures or docs
  • Test fixtures use invented data only
  • No duplicated logic; the change respects the module boundaries in docs/ARCHITECTURE.md
  • Docs updated if behavior or privacy claims changed

Generated by Claude Code

A plugin registers in the personakit.plugins entry-point group and replaces how
relevance is scored. Nothing loads unless PERSONAKIT_PLUGINS names it. The read
policy stays in the core; a test proves a plugin cannot serve restricted or
archived memories.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014dGcvUc3LqzKojYnqVGCjK
Conflicts were additive: module table, privacy list, review log and the
cli import line keep both sides.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014dGcvUc3LqzKojYnqVGCjK
@Yanir-R
Yanir-R merged commit 2cbe50d into main Nov 16, 2026
5 checks passed
@Yanir-R Yanir-R mentioned this pull request Nov 17, 2026
4 of 5 tasks
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.

2 participants