From c6357e52d935bad9b4b1aa8e035247bf919e28d5 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 12 May 2026 16:43:42 -0400 Subject: [PATCH] feat(journal): search-first heuristic for existing work in calibration prompt Co-Authored-By: Claude Opus 4.7 (1M context) --- src/fabledassistant/services/journal_pipeline.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fabledassistant/services/journal_pipeline.py b/src/fabledassistant/services/journal_pipeline.py index 35e5687..000d2e9 100644 --- a/src/fabledassistant/services/journal_pipeline.py +++ b/src/fabledassistant/services/journal_pipeline.py @@ -79,6 +79,15 @@ MOMENT ENTITY LINKING — be conservative. are NOT places — drop them and let the user name the real one if it matters. +EXISTING WORK — search before recording. + - If the user describes ongoing or completed work that references a specific + project or task by name or partial name (e.g. "the sebring task", + "continuing on the AT&T circuit", "finished the auth refactor"), CALL + search_notes FIRST to locate the existing task. Update its status or log + work on it instead of recording a new moment when an obvious match exists. + - Only call record_moment for that beat if no matching task surfaces and the + user confirms they want a moment recorded. + WHEN LINKING ENTITIES: use the *_names parameters (person_names, place_names, task_titles, note_titles). Server resolves them to IDs by lookup. Do NOT pass *_ids unless you have an exact ID returned from