Drafter hardening: reverse lookup by location + the write-path trigger #79
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Milestone #232 (Drafter — recall hardening and discovery), 6 of 10 steps. 8 commits, CI green on head
e0328f2(run 2997).Together these make recorded reuse findable at the moment it matters: an agent about to write a helper is now shown the prior art instead of discovering it a turn too late.
What lands
cca40affc9c811notes.dataJSONB + GIN (migration 0070), the indexed mirror of snippet fields8977bed[snippet],[issue], …)9fa474bget_note/get_taskover MCP were owner-only; a shared record the menu had just offered read as "not found"0d396dedd1b5e5083944flist_snippets(repo=…, path=…, symbol=…)e0328f2Things worth knowing before touching this code
permissionDecision. It returnsadditionalContextonly, so it informs a write and cannot block one. Plain stdout from a PreToolUse hook doesn't reach the model, and deny/ask would turn a recall aid into a gate on the operator's work. A test enforces this.services/knowledge.py): jsonpathdata @?for the SQL arms,location_matchesfor the semantic arm. They must change together — an integration test pins them to identical results over seven filter shapes.notes.datais now backfilled at startup, so every consumer may assume the mirror is present. No body-regex fallback arm is needed anywhere.data=Nonepersists JSONnull, not SQL NULL (SQLAlchemy'snone_as_null=False). The backfill covers both; this cost a CI cycle.Deployment note
plugin.jsongoes 0.1.16 → 0.1.18, and the write-path trigger needs the newGET /api/plugin/prior-artendpoint — clients on the old image get a 404 and fail silent by design.Also note the trigger is live but quiet until snippets exist: an empty result is indistinguishable from "no prior art here", so verify with a snippet known to sit at the path being edited.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UaYUaouG9jjhATyuxCKrQs