From 30aa5cf1c612c0b74fc64fbece9aafd6f096ae6f Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 28 Nov 2026 17:20:31 -0500 Subject: [PATCH] feat(8191): knowledge reaches a session from every project, ranked below its own and labelled A per-kind reach beside the kind-by-moment table (setting record_reach, default snippet/note/process/lesson) widens the passive note arms and their slots to the user's other projects. A record from elsewhere gives up 0.05 before the floor and the ranking, and its line names the project. Work kinds stay in their project, the visibility clause is unchanged, and an explicit project search still means that project. Settings > Moments edits the reach. Co-Authored-By: Claude Opus 5.5 --- frontend/src/api/moments.ts | 13 ++ frontend/src/components/RecordKinds.vue | 54 ++++++- src/grimoire/mcp/tools/moments.py | 7 +- src/grimoire/routes/retrieval.py | 20 +++ src/grimoire/services/embeddings.py | 41 +++++- src/grimoire/services/plugin_context.py | 46 +++++- src/grimoire/services/record_kinds.py | 59 ++++++++ src/grimoire/services/retrieval_pipeline.py | 22 ++- src/grimoire/services/retrieval_review.py | 6 + tests/conftest.py | 11 +- tests/test_integration_cross_project.py | 147 ++++++++++++++++++++ tests/test_integration_record_kinds.py | 43 +++++- tests/test_note_pipeline.py | 29 ++++ tests/test_retrieval_review.py | 6 +- 14 files changed, 491 insertions(+), 13 deletions(-) create mode 100644 tests/test_integration_cross_project.py diff --git a/frontend/src/api/moments.ts b/frontend/src/api/moments.ts index b4628a8c..dd9c7778 100644 --- a/frontend/src/api/moments.ts +++ b/frontend/src/api/moments.ts @@ -297,9 +297,17 @@ export interface RecordKindsDoor { evidence: Record; } +/** Which kinds a door may offer from the user's other projects. */ +export interface RecordKindsReach { + kinds: string[]; + default: string[]; + changed: boolean; +} + export interface RecordKindsTable { days: number; evidence_failed: boolean; + reach: RecordKindsReach; kinds: { kind: string; label: string }[]; doors: RecordKindsDoor[]; } @@ -313,6 +321,11 @@ export function setRecordKinds(door: string, kinds: string[] | null): Promise { + return apiPut("/api/retrieval/record-kinds/reach", { kinds }); +} + /** How a record arrived in front of a session. */ export type RecordWay = "pushed" | "pointed" | "asked" | "direct"; diff --git a/frontend/src/components/RecordKinds.vue b/frontend/src/components/RecordKinds.vue index 0f61a4c1..bca811d9 100644 --- a/frontend/src/components/RecordKinds.vue +++ b/frontend/src/components/RecordKinds.vue @@ -1,7 +1,7 @@