diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 9e9c94e3..dad95a90 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "grimoire", "description": "Grimoire for Claude Code: connects the grimoire MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Grimoire skills (using-grimoire, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting, family-canon), and syncs your saved Grimoire Processes as skills (/grimoire:sync).", - "version": "2026.11.25.0016", + "version": "2026.11.25.1721", "author": { "name": "Bryan Van Deusen" }, diff --git a/tests/test_services_plugin_context.py b/tests/test_services_plugin_context.py index de5f8e8c..0d5bd4e6 100644 --- a/tests/test_services_plugin_context.py +++ b/tests/test_services_plugin_context.py @@ -462,11 +462,12 @@ async def test_a_process_counts_as_reuse_too(): # --- write-path prior art beyond snippets ------------------------------------ @pytest.mark.asyncio -async def test_write_path_semantic_arm_asks_for_experience_not_just_snippets(): - """The inverse of auto-inject's mistake. This arm was snippets-only, so an - issue saying "we tried this and it deadlocked" could never reach the moment - that code was about to be written — arguably the better prior art, because - it says what NOT to do.""" +async def test_write_path_search_by_resemblance_asks_its_own_row_for_notes(): + """The search by resemblance on an edit reads its own row of the + record-kinds table (`work.change.similar`), notes by default. A snippet + reaches an edit through the file it is recorded at, and an issue saying + "we tried this and it deadlocked" through the file or area it names (the + `work.change` row), so neither is offered by resemblance by default.""" from grimoire.services import plugin_context as pc hits = [(0.72, fake_note(id=9, title="debounce helper", user_id=1, note_type="snippet")), @@ -487,10 +488,8 @@ async def test_write_path_semantic_arm_asks_for_experience_not_just_snippets(): ) kw = search.await_args.kwargs - # An open to-do resembling the code answers nothing; an ISSUE carries a root - # cause and a NOTE carries durable knowledge. Only the todo is excluded. - assert kw["record_kinds"] == ["note", "snippet", "task:issue"] - # Telemetry must not claim this was a notes-only retrieval any more. + assert kw["record_kinds"] == ["note"] + # The call row is not a tasks-only or notes-only retrieval by is_task. assert rec.call_args.kwargs["is_task"] is None diff --git a/tests/test_write_path_trigger.py b/tests/test_write_path_trigger.py index c49d64ac..5544f693 100644 --- a/tests/test_write_path_trigger.py +++ b/tests/test_write_path_trigger.py @@ -247,7 +247,7 @@ async def test_a_failing_location_lookup_does_not_sink_the_hint(): # --- arm 2: by meaning, under the milestone-93 gates ------------------------- @pytest.mark.asyncio -async def test_semantic_arm_is_snippet_only_and_browse_scoped(): +async def test_semantic_arm_offers_notes_by_default_and_is_browse_scoped(): from grimoire.services import plugin_context as pc search = AsyncMock(return_value=[]) with patch.object(pc, "get_writepath_config", AsyncMock(return_value=_cfg())), \ @@ -256,12 +256,10 @@ async def test_semantic_arm_is_snippet_only_and_browse_scoped(): patch.object(pc, "record_retrieval", MagicMock()): await pc.build_write_path_hint(1, "src/x.py", code=REAL_CODE) kwargs = search.await_args.kwargs - # Prior art is snippets AND recorded experience — an issue saying "we tried - # this and it broke" belongs here — AND lessons, which are often about a - # code shape. What - # stays out is the open to-do list, which resembles the code and answers - # nothing. - assert kwargs["record_kinds"] == ["note", "snippet", "task:issue"] + # By resemblance an edit is offered notes; snippets and issues reach it + # through where they are recorded (the `work.change` row), lessons + # through their situation, and the open to-do list not at all. + assert kwargs["record_kinds"] == ["note"] # Nobody asked for this, so it must not reach a one-to-one direct share. assert kwargs["scope"] == "browse"