snippets table fields
- title, language (select), code (rich text), tags
- usage_count (number) — +1 each time used
- context (text) — why it was written
- source_doc (doc-link) — which note
Two ways the agent helps
- Scan git log, suggest "new code from this week worth archiving"
- Filter snippets by the current document’s language on insert