synabun 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +665 -0
  2. package/LICENSE +191 -0
  3. package/README.md +853 -0
  4. package/hooks/claude-code/post-plan.mjs +391 -0
  5. package/hooks/claude-code/post-remember.mjs +239 -0
  6. package/hooks/claude-code/pre-compact.mjs +241 -0
  7. package/hooks/claude-code/pre-websearch.mjs +90 -0
  8. package/hooks/claude-code/prompt-submit.mjs +861 -0
  9. package/hooks/claude-code/session-start.mjs +494 -0
  10. package/hooks/claude-code/shared.mjs +368 -0
  11. package/hooks/claude-code/stop.mjs +646 -0
  12. package/hooks/claude-code/test-user-learning.mjs +531 -0
  13. package/mcp-server/package.json +38 -0
  14. package/mcp-server/run.mjs +10 -0
  15. package/mcp-server/src/config.ts +70 -0
  16. package/mcp-server/src/http.ts +93 -0
  17. package/mcp-server/src/index.ts +203 -0
  18. package/mcp-server/src/preload-http.ts +25 -0
  19. package/mcp-server/src/preload.ts +29 -0
  20. package/mcp-server/src/scripts/migrate-qdrant-to-sqlite.ts +506 -0
  21. package/mcp-server/src/services/categories.ts +429 -0
  22. package/mcp-server/src/services/discord.ts +702 -0
  23. package/mcp-server/src/services/file-checksums.ts +33 -0
  24. package/mcp-server/src/services/local-embeddings.ts +77 -0
  25. package/mcp-server/src/services/neural-interface.ts +344 -0
  26. package/mcp-server/src/services/sqlite.ts +823 -0
  27. package/mcp-server/src/tools/browser-advanced.ts +123 -0
  28. package/mcp-server/src/tools/browser-interact.ts +255 -0
  29. package/mcp-server/src/tools/browser-navigate.ts +77 -0
  30. package/mcp-server/src/tools/browser-observe.ts +1330 -0
  31. package/mcp-server/src/tools/browser.ts +107 -0
  32. package/mcp-server/src/tools/card-tools.ts +193 -0
  33. package/mcp-server/src/tools/card.ts +22 -0
  34. package/mcp-server/src/tools/category.ts +379 -0
  35. package/mcp-server/src/tools/discord-channel.ts +274 -0
  36. package/mcp-server/src/tools/discord-guild.ts +188 -0
  37. package/mcp-server/src/tools/discord-member.ts +158 -0
  38. package/mcp-server/src/tools/discord-message.ts +231 -0
  39. package/mcp-server/src/tools/discord-onboarding.ts +228 -0
  40. package/mcp-server/src/tools/discord-role.ts +209 -0
  41. package/mcp-server/src/tools/discord-thread.ts +110 -0
  42. package/mcp-server/src/tools/discord-webhook.ts +176 -0
  43. package/mcp-server/src/tools/discord.ts +40 -0
  44. package/mcp-server/src/tools/forget.ts +38 -0
  45. package/mcp-server/src/tools/git-tools.ts +141 -0
  46. package/mcp-server/src/tools/git.ts +13 -0
  47. package/mcp-server/src/tools/image-tools.ts +98 -0
  48. package/mcp-server/src/tools/image.ts +17 -0
  49. package/mcp-server/src/tools/leonardo-browser-tools.ts +281 -0
  50. package/mcp-server/src/tools/leonardo.ts +28 -0
  51. package/mcp-server/src/tools/loop.ts +348 -0
  52. package/mcp-server/src/tools/memories.ts +118 -0
  53. package/mcp-server/src/tools/recall.ts +323 -0
  54. package/mcp-server/src/tools/reflect.ts +145 -0
  55. package/mcp-server/src/tools/remember.ts +115 -0
  56. package/mcp-server/src/tools/response.ts +26 -0
  57. package/mcp-server/src/tools/restore.ts +34 -0
  58. package/mcp-server/src/tools/sync.ts +114 -0
  59. package/mcp-server/src/tools/tictactoe-tools.ts +98 -0
  60. package/mcp-server/src/tools/tictactoe.ts +13 -0
  61. package/mcp-server/src/tools/utils.ts +25 -0
  62. package/mcp-server/src/tools/whiteboard-tools.ts +260 -0
  63. package/mcp-server/src/tools/whiteboard.ts +22 -0
  64. package/mcp-server/src/tui.ts +940 -0
  65. package/mcp-server/src/types.ts +85 -0
  66. package/mcp-server/tsconfig.json +19 -0
  67. package/neural-interface/package.json +27 -0
  68. package/neural-interface/public/apple-touch-icon.png +0 -0
  69. package/neural-interface/public/category-logos/claude.svg +1 -0
  70. package/neural-interface/public/category-logos/gemini-color.svg +1 -0
  71. package/neural-interface/public/category-logos/openai.svg +1 -0
  72. package/neural-interface/public/category-logos/synabun.png +0 -0
  73. package/neural-interface/public/claude-chat.css +878 -0
  74. package/neural-interface/public/claude-chat.html +92 -0
  75. package/neural-interface/public/claude-chat.js +1168 -0
  76. package/neural-interface/public/favicon-16x16.png +0 -0
  77. package/neural-interface/public/favicon-32x32.png +0 -0
  78. package/neural-interface/public/gallery.svg +6 -0
  79. package/neural-interface/public/icon-192.png +0 -0
  80. package/neural-interface/public/icon-512.png +0 -0
  81. package/neural-interface/public/index-legacy.html +14677 -0
  82. package/neural-interface/public/index.html +212 -0
  83. package/neural-interface/public/index2d-legacy.html +8193 -0
  84. package/neural-interface/public/index2d.html +127 -0
  85. package/neural-interface/public/invite.html +351 -0
  86. package/neural-interface/public/leonardoai.svg +1 -0
  87. package/neural-interface/public/logo-synabun.png +0 -0
  88. package/neural-interface/public/logoHD.png +0 -0
  89. package/neural-interface/public/manifest.json +14 -0
  90. package/neural-interface/public/offline.html +299 -0
  91. package/neural-interface/public/onboarding.html +2335 -0
  92. package/neural-interface/public/openclaw-logo-text.png +0 -0
  93. package/neural-interface/public/pin-svgrepo-com.svg +25 -0
  94. package/neural-interface/public/sessionicon.svg +8 -0
  95. package/neural-interface/public/shared/ansi-parser.js +305 -0
  96. package/neural-interface/public/shared/api.js +1043 -0
  97. package/neural-interface/public/shared/colors.js +153 -0
  98. package/neural-interface/public/shared/constants.js +141 -0
  99. package/neural-interface/public/shared/html-shell.js +777 -0
  100. package/neural-interface/public/shared/html-term-renderer.js +1022 -0
  101. package/neural-interface/public/shared/i18n.js +147 -0
  102. package/neural-interface/public/shared/registry.js +82 -0
  103. package/neural-interface/public/shared/state.js +86 -0
  104. package/neural-interface/public/shared/storage.js +150 -0
  105. package/neural-interface/public/shared/styles.css +21212 -0
  106. package/neural-interface/public/shared/ui-automation-studio.js +3573 -0
  107. package/neural-interface/public/shared/ui-bookmarks.js +231 -0
  108. package/neural-interface/public/shared/ui-claude-panel.js +6333 -0
  109. package/neural-interface/public/shared/ui-command-runner.js +534 -0
  110. package/neural-interface/public/shared/ui-cost-widget.js +602 -0
  111. package/neural-interface/public/shared/ui-detail.js +1454 -0
  112. package/neural-interface/public/shared/ui-explorer.js +1356 -0
  113. package/neural-interface/public/shared/ui-file-explorer.js +2750 -0
  114. package/neural-interface/public/shared/ui-games.js +411 -0
  115. package/neural-interface/public/shared/ui-help.js +107 -0
  116. package/neural-interface/public/shared/ui-image-gallery.js +461 -0
  117. package/neural-interface/public/shared/ui-invite.js +519 -0
  118. package/neural-interface/public/shared/ui-keybinds.js +452 -0
  119. package/neural-interface/public/shared/ui-layouts.js +297 -0
  120. package/neural-interface/public/shared/ui-link.js +731 -0
  121. package/neural-interface/public/shared/ui-loading.js +255 -0
  122. package/neural-interface/public/shared/ui-menubar.js +499 -0
  123. package/neural-interface/public/shared/ui-multiselect.js +93 -0
  124. package/neural-interface/public/shared/ui-navbar.js +222 -0
  125. package/neural-interface/public/shared/ui-notifications.js +287 -0
  126. package/neural-interface/public/shared/ui-panels.js +309 -0
  127. package/neural-interface/public/shared/ui-resume.js +653 -0
  128. package/neural-interface/public/shared/ui-search.js +145 -0
  129. package/neural-interface/public/shared/ui-sessions.js +531 -0
  130. package/neural-interface/public/shared/ui-settings.js +5987 -0
  131. package/neural-interface/public/shared/ui-sidebar.js +1905 -0
  132. package/neural-interface/public/shared/ui-skills.js +2805 -0
  133. package/neural-interface/public/shared/ui-stats.js +38 -0
  134. package/neural-interface/public/shared/ui-sync.js +201 -0
  135. package/neural-interface/public/shared/ui-terminal.js +6385 -0
  136. package/neural-interface/public/shared/ui-tooltip.js +123 -0
  137. package/neural-interface/public/shared/ui-trash.js +439 -0
  138. package/neural-interface/public/shared/ui-tutorial-draw.js +875 -0
  139. package/neural-interface/public/shared/ui-tutorial-steps.js +2276 -0
  140. package/neural-interface/public/shared/ui-tutorial.js +1117 -0
  141. package/neural-interface/public/shared/ui-update.js +244 -0
  142. package/neural-interface/public/shared/ui-whiteboard.js +3262 -0
  143. package/neural-interface/public/shared/ui-workspaces.js +722 -0
  144. package/neural-interface/public/shared/utils.js +360 -0
  145. package/neural-interface/public/shared/vterm-buffer.js +1102 -0
  146. package/neural-interface/public/sw.js +52 -0
  147. package/neural-interface/public/synabun.png +0 -0
  148. package/neural-interface/public/toolbar-album.svg +8 -0
  149. package/neural-interface/public/toolbar-question.svg +6 -0
  150. package/neural-interface/public/toolbar-sessions.svg +6 -0
  151. package/neural-interface/public/variant/2d/background.js +113 -0
  152. package/neural-interface/public/variant/2d/context-menu.js +133 -0
  153. package/neural-interface/public/variant/2d/gfx.js +45 -0
  154. package/neural-interface/public/variant/2d/graph.js +1635 -0
  155. package/neural-interface/public/variant/2d/hulls.js +207 -0
  156. package/neural-interface/public/variant/2d/lasso.js +135 -0
  157. package/neural-interface/public/variant/2d/layout.js +594 -0
  158. package/neural-interface/public/variant/2d/main.js +521 -0
  159. package/neural-interface/public/variant/2d/minimap.js +312 -0
  160. package/neural-interface/public/variant/2d/settings-gfx.js +98 -0
  161. package/neural-interface/public/variant/3d/background.js +884 -0
  162. package/neural-interface/public/variant/3d/camera.js +661 -0
  163. package/neural-interface/public/variant/3d/gfx.js +116 -0
  164. package/neural-interface/public/variant/3d/graph.js +2399 -0
  165. package/neural-interface/public/variant/3d/main.js +500 -0
  166. package/neural-interface/public/variant/3d/settings-gfx.js +228 -0
  167. package/neural-interface/scripts/rebuild-pty.js +100 -0
  168. package/neural-interface/server.js +15000 -0
  169. package/neural-interface/templates/CLAUDE-template.md +211 -0
  170. package/package.json +53 -0
  171. package/postinstall.js +135 -0
  172. package/setup.js +260 -0
  173. package/skills/leonardo/SKILL.md +159 -0
  174. package/skills/leonardo/icon.svg +1 -0
  175. package/skills/leonardo/modules/browser-guide.md +378 -0
  176. package/skills/leonardo/modules/image-prompter.md +277 -0
  177. package/skills/leonardo/modules/model-advisor.md +100 -0
  178. package/skills/leonardo/modules/prompt-library.md +110 -0
  179. package/skills/leonardo/modules/style-guide.md +186 -0
  180. package/skills/leonardo/modules/video-prompter.md +311 -0
  181. package/skills/synabun/SKILL.md +185 -0
  182. package/skills/synabun/icon.png +0 -0
  183. package/skills/synabun/modules/audit.md +374 -0
  184. package/skills/synabun/modules/changelog.md +194 -0
  185. package/skills/synabun/modules/idea.md +144 -0
  186. package/skills/synabun/modules/memorize.md +188 -0
  187. package/skills/synabun/synabunicon.png +0 -0
@@ -0,0 +1,144 @@
1
+ # Idea — Memory-Powered Brainstorming
2
+
3
+ You are now in **brainstorming mode**. Your job is to loop through SynaBun's persistent memory, find surprising connections between disparate memories, and synthesize novel ideas the user hasn't considered.
4
+
5
+ **Input topic**: $ARGUMENTS
6
+
7
+ If the input topic is empty, you are in **freeform mode** — explore the full memory landscape and surface the most interesting cross-domain connections you can find.
8
+
9
+ ## CRITICAL: SynaBun MCP Tool Quirks
10
+
11
+ - Make ALL SynaBun MCP calls **sequentially** (never in parallel — one failure cascades)
12
+ - `remember` accepts `tags` and `importance` directly and returns the full UUID.
13
+ - `reflect` requires the **FULL UUID** (e.g., `8f7cab3b-644e-4cea-8662-de0ca695bdf2`). Use the UUID returned by `remember`, or `recall` to find existing memories.
14
+
15
+ ## Process
16
+
17
+ Execute these phases in order. Do NOT skip phases or combine them.
18
+
19
+ ---
20
+
21
+ ### Phase 1 — Landscape Survey
22
+
23
+ 1. Call `category_list` with format `tree` to see all memory categories and their hierarchy.
24
+ 2. Call `memories` with mode `stats` to understand the memory landscape (counts, categories, projects).
25
+ 3. If a topic was provided, identify which categories are most relevant AND which are most distant (distant = higher cross-pollination potential).
26
+ 4. If freeform mode, note the top 3 categories by memory count and the most underexplored category.
27
+
28
+ **Output to user**: Brief summary of what you found — how many memories exist, which domains are richest, and your brainstorming strategy for the rounds ahead.
29
+
30
+ ---
31
+
32
+ ### Phase 2 — Multi-Round Recall
33
+
34
+ Execute **5 sequential recall rounds**. Each round uses a different query strategy. After each round, briefly note what you found before moving to the next.
35
+
36
+ **IMPORTANT**: Make each `recall` call with `limit: 5` and `min_score: 0.2`. Do NOT filter by project unless the user's topic is clearly project-specific.
37
+
38
+ #### Round 1 — Direct
39
+ - If topic given: `recall` with the topic as the query
40
+ - If freeform: `recall` with query "recent important work decisions architecture" and `min_importance: 7`
41
+ - **Goal**: Establish the core memory cluster around the topic
42
+
43
+ #### Round 2 — Adjacent Exploration
44
+ - Extract 2-3 key concepts from Round 1 results (themes, technologies, patterns mentioned)
45
+ - `recall` with a query built from these adjacent concepts — things related to but distinct from the original topic
46
+ - **Goal**: Expand the radius beyond the obvious
47
+
48
+ #### Round 3 — Problem Space
49
+ - `recall` with query focused on challenges, bugs, constraints, pain points related to the topic area
50
+ - Example: if topic is "caching", query "cache problems bugs race condition invalidation challenges"
51
+ - If freeform: query "bugs challenges problems pain points unresolved"
52
+ - **Goal**: Find the friction — where problems exist, ideas are needed most
53
+
54
+ #### Round 4 — Solution Patterns
55
+ - `recall` with query focused on past solutions, patterns, architectures, approaches
56
+ - Example: if topic is "caching", query "caching strategy pattern architecture optimization solution"
57
+ - If freeform: query "solutions patterns architecture decisions implementations"
58
+ - **Goal**: Find the building blocks — proven approaches that can be recombined
59
+
60
+ #### Round 5 — Cross-Domain Surprise
61
+ - Pick a category that is **unrelated** to the topic (from Phase 1 landscape)
62
+ - `recall` with an abstract version of the topic, filtered to this distant category
63
+ - Example: if topic is "real-time notifications" and distant category is "deals", query "real-time updates synchronization" with `category: "deals"`
64
+ - If freeform: pick the least-explored category and query "interesting patterns approaches"
65
+ - **Goal**: Force unexpected connections — this is where the most creative ideas come from
66
+
67
+ After all 5 rounds, you should have **15-25 memory snippets** across different categories and domains.
68
+
69
+ ---
70
+
71
+ ### Phase 3 — Connection Mapping & Synthesis
72
+
73
+ Now synthesize. Do this internally (thinking), then produce ideas.
74
+
75
+ For each pair of memories from **different categories or rounds**:
76
+ 1. What do they have in common at an abstract level?
77
+ 2. What tension or contradiction exists between them?
78
+ 3. What gap does one fill that the other exposes?
79
+ 4. Could the approach from one be applied to the domain of the other?
80
+
81
+ Generate **3-5 concrete ideas**. Prioritize:
82
+ - **Cross-category connections** (e.g., a bug-fix pattern applied to a feature design)
83
+ - **Gap-filling** (a problem memory without a matching solution memory)
84
+ - **Pattern transfer** (a solution from domain A adapted to domain B)
85
+ - **Contradiction resolution** (two memories that suggest opposite approaches — the synthesis is often the best idea)
86
+
87
+ ---
88
+
89
+ ### Phase 4 — Present Ideas
90
+
91
+ Present each idea in this format:
92
+
93
+ ```
94
+ ## Brainstorm Results: [Topic or "Freeform Exploration"]
95
+
96
+ ### Idea 1: [Concise Title]
97
+ **Concept**: [1-2 sentence description of the idea]
98
+
99
+ **Reasoning chain**:
100
+ - Started from [short-id] — [brief content] (category)
101
+ - Connected to [short-id] — [brief content] (different category)
102
+ - [Gap/tension/pattern identified]
103
+ - Synthesis: [How combining these produces the idea]
104
+
105
+ **Inspired by**: [short-id] (category), [short-id] (category), ...
106
+ **Next steps**: [2-3 concrete actions to explore or implement this idea]
107
+
108
+ ---
109
+ ```
110
+
111
+ After presenting all ideas, add a brief **"Threads to Pull"** section listing 2-3 additional directions that showed promise but weren't fully developed — seeds for future brainstorming sessions.
112
+
113
+ ---
114
+
115
+ ### Phase 5 — Capture
116
+
117
+ After presenting ideas, ask the user:
118
+
119
+ > "Want me to save any of these ideas to your SynaBun memory? I can store them in an `ideas` category so they persist across sessions."
120
+
121
+ If the user says yes:
122
+
123
+ 1. Call `category_list` (flat format) to check if an `ideas` category already exists
124
+ 2. If not, call `category_create` with:
125
+ - `name`: "ideas"
126
+ - `description`: "Brainstormed features, experiments, and creative explorations"
127
+ - `parent`: the current project's parent category (e.g., "criticalpixel") — or no parent if no project match
128
+ 3. For each idea the user wants saved, call `remember` with:
129
+ - `content`: The full idea text (title + concept + reasoning chain + next steps)
130
+ - `category`: "ideas"
131
+ - `project`: current project name
132
+ - `importance`: 6 for speculative ideas, 7 for actionable ones
133
+ - `tags`: ["brainstorm", topic keywords]
134
+
135
+ ---
136
+
137
+ ## Guidelines
138
+
139
+ - **Be genuinely creative** — don't just summarize memories. The value is in the *connections* between them that the user hasn't seen.
140
+ - **Cite specific memories** — every idea must trace back to at least 2 memories. This is what makes it different from generic brainstorming.
141
+ - **Embrace surprises** — Round 5 (cross-domain) often produces the best ideas. Give it weight.
142
+ - **Quality over quantity** — 3 excellent ideas beat 5 mediocre ones.
143
+ - **Stay grounded** — ideas should be actionable, not abstract philosophy. Each needs concrete next steps.
144
+ - **Acknowledge limits** — if the memory landscape is thin (< 10 total memories), say so and suggest the user build up memories first before brainstorming.
@@ -0,0 +1,188 @@
1
+ # Memorize — Convert Context to Persistent Memory
2
+
3
+ You are now in **memorize mode**. Your job is to analyze the full conversation context leading up to the `/synabun memorize` invocation, distill it into a well-structured markdown memory, and store it in SynaBun for future recall.
4
+
5
+ **Input**: $ARGUMENTS
6
+
7
+ - If the input is empty → analyze the entire conversation context
8
+ - If the input contains text → use it as a focus hint (e.g., "memorize the redis discussion" → focus on that topic within the conversation)
9
+
10
+ ## CRITICAL: SynaBun MCP Tool Quirks
11
+
12
+ - Make ALL SynaBun MCP calls **sequentially** (never in parallel — one failure cascades).
13
+ - `remember` accepts `tags` and `importance` directly and returns the full UUID.
14
+ - `reflect` requires the **FULL UUID**. Use the UUID returned by `remember`, or `recall` to find existing memories.
15
+
16
+ ---
17
+
18
+ ## Process
19
+
20
+ Execute these phases in order. Do NOT skip phases or combine them.
21
+
22
+ ---
23
+
24
+ ### Phase 1 — Context Analysis
25
+
26
+ Analyze the ENTIRE conversation history available in your context window. Extract:
27
+
28
+ 1. **Core topic(s)**: What was the conversation primarily about?
29
+ 2. **Key decisions made**: Any architectural, design, or implementation choices
30
+ 3. **Problems discussed**: Bugs, issues, blockers, pain points
31
+ 4. **Solutions found**: Fixes, workarounds, patterns discovered
32
+ 5. **Files touched**: Any files that were read, edited, or created
33
+ 6. **Code patterns**: Notable code snippets, configurations, or commands
34
+ 7. **Open threads**: Unfinished work, TODOs, things to revisit
35
+ 8. **User preferences**: Any stated preferences about tools, approaches, workflows
36
+
37
+ **Do NOT output anything to the user during this phase** — this is internal analysis only.
38
+
39
+ ---
40
+
41
+ ### Phase 2 — Draft Memory
42
+
43
+ Compose the memory as a structured markdown document. Follow this template precisely:
44
+
45
+ ```markdown
46
+ ## Context: [Descriptive Title — 5-10 words capturing the essence]
47
+ **Date**: [YYYY-MM-DD]
48
+ **Project**: [detected project]
49
+ **Branch**: [current git branch if detectable]
50
+
51
+ ### Summary
52
+ [2-4 sentences: What was discussed, what was accomplished, what was decided. Be specific — mention actual function names, file paths, error messages, not vague descriptions.]
53
+
54
+ ### Key Details
55
+ [Bulleted list of the most important specifics. Include:]
56
+ - Decisions and their reasoning
57
+ - Technical details that would be hard to rediscover
58
+ - Configuration values, API endpoints, command invocations
59
+ - Error messages and their root causes
60
+ - Patterns or approaches chosen (and alternatives rejected)
61
+
62
+ ### Files Referenced
63
+ [Bulleted list of file paths that were relevant, with brief annotation]
64
+ - `path/to/file.ts` — [what was done or discussed about it]
65
+
66
+ ### Open Items
67
+ [If any — things left unfinished, TODOs, follow-ups needed]
68
+ - [ ] [description of unfinished work]
69
+
70
+ ### Commands & Snippets
71
+ [If any notable commands or code snippets were part of the conversation]
72
+ ```bash or ```typescript etc.
73
+ [the command or snippet]
74
+ ```
75
+ ```
76
+
77
+ **Rules for the draft:**
78
+ - **Be specific, not generic** — "Fixed race condition in price aggregation by adding mutex lock" not "Fixed a bug"
79
+ - **Include actual values** — file paths, function names, error messages, config keys
80
+ - **Preserve technical detail** — the memory should let future-you reconstruct context without re-reading the conversation
81
+ - **Omit sections that don't apply** — if there were no open items, skip that section. If no commands were notable, skip that section.
82
+ - **Keep it dense** — target 200-500 words. Long enough to be useful, short enough to be scannable.
83
+
84
+ ---
85
+
86
+ ### Phase 3 — Metadata Selection
87
+
88
+ Determine the appropriate metadata for this memory:
89
+
90
+ #### Category Selection
91
+ 1. Check if the conversation topic fits an existing child category under `conversations` by calling `category_list` with format `tree`.
92
+ 2. If the conversation has a clear specialized topic that doesn't fit existing children, consider creating a new child category under `conversations` — but only if it represents a genuinely distinct recurring topic (not a one-off).
93
+ 3. **Default**: Use `conversations` as the category. Most context memories belong here.
94
+
95
+ #### Tags
96
+ Generate 3-5 lowercase tags. Include:
97
+ - The primary topic (e.g., "redis", "auth", "forum")
98
+ - The type of work (e.g., "bug-fix", "feature", "refactor", "investigation", "architecture")
99
+ - Key technologies or systems involved (e.g., "supabase", "next-js", "lexical")
100
+ - Always include `"context-memorize"` as a tag to distinguish these from auto-indexed session memories
101
+
102
+ #### Importance
103
+ - **5**: Routine work, standard feature additions, minor fixes
104
+ - **6**: Significant decisions, non-obvious solutions, multi-file changes
105
+ - **7**: Architectural decisions, hard-won debugging sessions, critical path work
106
+ - **8+**: Foundational decisions that affect the entire project
107
+
108
+ #### Related Files
109
+ Collect all file paths that were read, edited, or discussed. These enable the `sync` tool to detect staleness later.
110
+
111
+ ---
112
+
113
+ ### Phase 4 — Review & Confirm
114
+
115
+ Present the draft to the user for review:
116
+
117
+ ```
118
+ ══════════════════════════════════════════
119
+ MEMORIZE CONTEXT
120
+ ══════════════════════════════════════════
121
+ ```
122
+
123
+ Then output the full drafted memory content (from Phase 2).
124
+
125
+ Then output the metadata:
126
+
127
+ ```
128
+ ──────────────────────────────────────────
129
+ Category: [category]
130
+ Project: [project]
131
+ Importance: [N] — [brief justification]
132
+ Tags: [tag1, tag2, tag3, ...]
133
+ Files: [count] referenced
134
+ ──────────────────────────────────────────
135
+ ```
136
+
137
+ Then use `AskUserQuestion`:
138
+
139
+ - **Save as-is** — "Store this memory exactly as drafted"
140
+ - **Edit first** — "I want to adjust the content or metadata before saving"
141
+ - **Cancel** — "Don't save anything"
142
+
143
+ **If user picks "Edit first":**
144
+ Use `AskUserQuestion` to ask what they want to change:
145
+
146
+ - **Edit content** — "Change the memory text (tell me what to modify)"
147
+ - **Change importance** — "Adjust the importance level"
148
+ - **Change tags** — "Modify the tags"
149
+ - **Change category** — "Use a different category"
150
+
151
+ After the user provides edits, incorporate them and re-present the updated draft. Loop until the user is satisfied or picks "Save as-is".
152
+
153
+ ---
154
+
155
+ ### Phase 5 — Store
156
+
157
+ Once the user confirms:
158
+
159
+ 1. Call `remember` with:
160
+ - `content`: The final markdown memory text
161
+ - `category`: The selected category (default: `conversations`)
162
+ - `project`: The detected project
163
+ - `importance`: The determined importance level
164
+ - `tags`: The generated tags (always including `"context-memorize"`)
165
+ - `related_files`: Array of file paths referenced
166
+ - `source`: `"user-told"`
167
+
168
+ 2. Confirm storage to the user:
169
+
170
+ ```
171
+ ══════════════════════════════════════════
172
+ Memory stored successfully.
173
+ ID: [short-id from returned UUID]
174
+ Category: [category]
175
+ Tags: [tags]
176
+ ══════════════════════════════════════════
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Guidelines
182
+
183
+ - **Density over length** — A 300-word memory with specific details is worth more than a 1000-word one full of filler.
184
+ - **The user's conversation IS the source** — don't invent details. Only memorize what was actually discussed.
185
+ - **Focus hints matter** — if the user said `/synabun memorize the pricing discussion`, zoom in on that topic even if the conversation covered other things too.
186
+ - **Dedup awareness** — if the conversation has already been indexed via compaction auto-store (a `conversations` memory with the same session ID exists), note this to the user and offer to either update the existing memory or create a supplementary one.
187
+ - **Sequential MCP calls only** — never call two SynaBun tools in the same parallel batch.
188
+ - **Full UUIDs always** — use the complete UUID from `remember` output, never shortened.
Binary file