docs(8206): a ruling says what a constraint is for and not for, and the comment names it
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Plugin hooks (push) Successful in 18s
CI & Build / Python lint (push) Successful in 7s
CI & Build / Python tests (push) Failing after 1m58s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / integration (push) Canceled after 2m9s

writing-records: the for/not-for form, naming a System's files so its
rulings reach an edit, and the comment at a constraint naming its ruling.
using-grimoire: read the area's rulings before changing a filter, gate or
default, and take a change that would undo one to the operator. The project
filter in embeddings now names its ruling, and the docstring that stretched
its reason to every kind is corrected. Plugin version minted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-28 17:50:11 -05:00
co-authored by Claude Opus 5.5
parent 3e87df6c84
commit 9e3767f375
4 changed files with 34 additions and 10 deletions
+8 -5
View File
@@ -1006,12 +1006,11 @@ async def semantic_search_notes(
only: a caller that also passes `note_type` still gets exactly the kinds it
asked for, so narrowing to snippets does not quietly acquire lessons.
Off by default, because two callers depend on the project filter holding.
The near-duplicate gate compares a record only against its own project on
Off by default, because the near-duplicate gate depends on the project
filter holding: it compares a record only against its own project on
purpose, and a globally-visible kind would let a lesson block an unrelated
note's create on a project its author never touched. Ordinary note recall
is project-scoped for the same reason — the point of the carve-out is that
ONE kind escapes, not that scoping is weaker.
note's create on a project its author never touched. The passive arms
widen the filter by the user's reach instead (`cross_kinds`).
`scope` ("own" | "browse" | "read", see access.notes_visibility_clause)
decides how far this may see. It exists because this one function serves
@@ -1084,6 +1083,10 @@ async def semantic_search_notes(
if orphan_only:
stmt = stmt.where(Note.project_id.is_(None))
elif project_id is not None:
# The project filter keeps other projects' open WORK out of a
# session; it is not there to keep knowledge in, which crosses
# through `cross_kinds` (ruling "Knowledge crosses projects;
# work stays in its own" on System "Retrieval & recall").
in_project = Note.project_id == project_id
if cross_kinds is not None:
# Which kinds cross is the caller's (the user's reach);