Snippets gain notes; when_to_use is the situation it is ranked on (#4378) #184

Merged
bvandeusen merged 1 commits from dev into main 2026-09-23 18:00:36 -04:00
Owner

Snippets had no field for free text, so explanations ended up in when_to_use. That text is the trigger, and it is joined onto every chunk the snippet is embedded as. Write-ups of up to 3 KB were found there.

  • notes is stored after the code under ## Notes and parsed back from the body. It is carried through by update, merge and un-merge. A snippet with no notes produces the same body byte for byte, so nothing re-embeds.
  • MCP create_snippet and update_snippet take notes. They return trigger_advice when when_to_use is long, has headings, or runs to several paragraphs.
  • Tool docs, the reusing-code skill and the editor hint describe the trigger as the situation. The editor gains a Notes field, and the detail view renders notes as markdown.
  • Plugin version is 2026.09.23.2127.

CI run 7403 on 4ae18a9: all six jobs green.

🤖 Generated with Claude Code

Snippets had no field for free text, so explanations ended up in `when_to_use`. That text is the trigger, and it is joined onto every chunk the snippet is embedded as. Write-ups of up to 3 KB were found there. - `notes` is stored after the code under `## Notes` and parsed back from the body. It is carried through by update, merge and un-merge. A snippet with no notes produces the same body byte for byte, so nothing re-embeds. - MCP `create_snippet` and `update_snippet` take `notes`. They return `trigger_advice` when `when_to_use` is long, has headings, or runs to several paragraphs. - Tool docs, the reusing-code skill and the editor hint describe the trigger as the situation. The editor gains a Notes field, and the detail view renders notes as markdown. - Plugin version is 2026.09.23.2127. CI run 7403 on 4ae18a9: all six jobs green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 1 commit 2026-09-23 18:00:25 -04:00
feat(snippets): a snippet has notes; when_to_use is the situation it is ranked on (#4378)
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / Python tests (push) Successful in 1m37s
CI & Build / Python lint (push) Successful in 3s
CI & Build / integration (push) Successful in 50s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / Build & push image (push) Successful in 34s
4ae18a9dd9
A snippet had no field for prose, so what a session learned about one went
into when_to_use — the trigger joined onto every chunk it is embedded as. A
sweep found write-ups of up to 3 KB there, headings and all.

- notes: stored after the code under `## Notes`, parsed back from the body,
  carried by every path that rebuilds it (update, merge, un-merge). A
  snippet with no notes composes the body it always did.
- create/update_snippet (MCP) take notes and return trigger_advice when
  when_to_use is long, headed or multi-paragraph. Advice, not a refusal.
- Tool docs, the reusing-code skill and the editor hint describe the trigger
  as the situation and point the explanation at notes.
- Editor gains a Notes field; the detail view renders it as markdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit eb6912c722 into main 2026-09-23 18:00:36 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#184