superlocalmemory 4.1.21 → 4.1.23

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 (179) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +210 -0
  3. package/README.md +101 -33
  4. package/antigravity-plugin/_GENERATED.md +33 -0
  5. package/antigravity-plugin/agents/slm-governance-advisor.md +78 -0
  6. package/antigravity-plugin/agents/slm-loop-runner.md +82 -0
  7. package/antigravity-plugin/agents/slm-memory-advisor.md +50 -0
  8. package/antigravity-plugin/agents/slm-optimize-advisor.md +44 -0
  9. package/antigravity-plugin/commands/slm-loop.md +33 -0
  10. package/antigravity-plugin/hooks/hooks.json +59 -0
  11. package/antigravity-plugin/hooks.json +42 -0
  12. package/antigravity-plugin/mcp_config.json +14 -0
  13. package/antigravity-plugin/plugin.json +25 -0
  14. package/antigravity-plugin/scripts/antigravity_hook_adapter.py +85 -0
  15. package/antigravity-plugin/skills/slm-bot-memory/SKILL.md +146 -0
  16. package/antigravity-plugin/skills/slm-cache/SKILL.md +147 -0
  17. package/antigravity-plugin/skills/slm-compress/SKILL.md +150 -0
  18. package/antigravity-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
  19. package/antigravity-plugin/skills/slm-governance/SKILL.md +221 -0
  20. package/antigravity-plugin/skills/slm-graph/SKILL.md +327 -0
  21. package/antigravity-plugin/skills/slm-loop/SKILL.md +153 -0
  22. package/antigravity-plugin/skills/slm-mesh/SKILL.md +287 -0
  23. package/antigravity-plugin/skills/slm-profile/SKILL.md +159 -0
  24. package/antigravity-plugin/skills/slm-recall/SKILL.md +430 -0
  25. package/antigravity-plugin/skills/slm-remember/SKILL.md +370 -0
  26. package/antigravity-plugin/skills/slm-scope/SKILL.md +183 -0
  27. package/antigravity-plugin/skills/slm-session/SKILL.md +291 -0
  28. package/antigravity-plugin/skills/slm-status/SKILL.md +185 -0
  29. package/antigravity-plugin/skills/slm-web-access/SKILL.md +91 -0
  30. package/codex-plugin/.claude-plugin/plugin.json +19 -0
  31. package/codex-plugin/.codex/config.toml +40 -0
  32. package/codex-plugin/.codex-plugin/plugin.json +43 -0
  33. package/codex-plugin/.mcp.json +16 -0
  34. package/codex-plugin/AGENTS.md +161 -0
  35. package/codex-plugin/README.md +205 -0
  36. package/codex-plugin/_GENERATED.md +52 -0
  37. package/codex-plugin/agents/slm-governance-advisor.md +78 -0
  38. package/codex-plugin/agents/slm-loop-runner.md +82 -0
  39. package/codex-plugin/agents/slm-memory-advisor.md +50 -0
  40. package/codex-plugin/agents/slm-optimize-advisor.md +44 -0
  41. package/codex-plugin/commands/slm-loop.md +33 -0
  42. package/codex-plugin/hooks/hooks.json +59 -0
  43. package/codex-plugin/scripts/ensure-venv.bat +108 -0
  44. package/codex-plugin/scripts/ensure-venv.sh +100 -0
  45. package/codex-plugin/scripts/slm-launch +55 -0
  46. package/codex-plugin/scripts/slm-launch.bat +30 -0
  47. package/codex-plugin/skills/slm-bot-memory/SKILL.md +146 -0
  48. package/codex-plugin/skills/slm-cache/SKILL.md +147 -0
  49. package/codex-plugin/skills/slm-compress/SKILL.md +150 -0
  50. package/codex-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
  51. package/codex-plugin/skills/slm-governance/SKILL.md +221 -0
  52. package/codex-plugin/skills/slm-graph/SKILL.md +327 -0
  53. package/codex-plugin/skills/slm-loop/SKILL.md +153 -0
  54. package/codex-plugin/skills/slm-mesh/SKILL.md +287 -0
  55. package/codex-plugin/skills/slm-profile/SKILL.md +159 -0
  56. package/codex-plugin/skills/slm-recall/SKILL.md +430 -0
  57. package/codex-plugin/skills/slm-remember/SKILL.md +370 -0
  58. package/codex-plugin/skills/slm-scope/SKILL.md +183 -0
  59. package/codex-plugin/skills/slm-session/SKILL.md +291 -0
  60. package/codex-plugin/skills/slm-status/SKILL.md +185 -0
  61. package/codex-plugin/skills/slm-web-access/SKILL.md +91 -0
  62. package/copilot-plugin/.github/agents/slm-governance-advisor.agent.md +80 -0
  63. package/copilot-plugin/.github/agents/slm-loop-runner.agent.md +84 -0
  64. package/copilot-plugin/.github/agents/slm-memory-advisor.agent.md +52 -0
  65. package/copilot-plugin/.github/agents/slm-optimize-advisor.agent.md +46 -0
  66. package/copilot-plugin/.github/copilot-instructions.md +52 -0
  67. package/copilot-plugin/.github/hooks/slm-hooks.json +44 -0
  68. package/copilot-plugin/.github/prompts/slm-bot-memory.prompt.md +147 -0
  69. package/copilot-plugin/.github/prompts/slm-cache.prompt.md +151 -0
  70. package/copilot-plugin/.github/prompts/slm-compress.prompt.md +154 -0
  71. package/copilot-plugin/.github/prompts/slm-getting-started-bot.prompt.md +147 -0
  72. package/copilot-plugin/.github/prompts/slm-governance.prompt.md +224 -0
  73. package/copilot-plugin/.github/prompts/slm-graph.prompt.md +322 -0
  74. package/copilot-plugin/.github/prompts/slm-loop.prompt.md +159 -0
  75. package/copilot-plugin/.github/prompts/slm-mesh.prompt.md +290 -0
  76. package/copilot-plugin/.github/prompts/slm-profile.prompt.md +155 -0
  77. package/copilot-plugin/.github/prompts/slm-recall.prompt.md +434 -0
  78. package/copilot-plugin/.github/prompts/slm-remember.prompt.md +375 -0
  79. package/copilot-plugin/.github/prompts/slm-scope.prompt.md +183 -0
  80. package/copilot-plugin/.github/prompts/slm-session.prompt.md +291 -0
  81. package/copilot-plugin/.github/prompts/slm-status.prompt.md +190 -0
  82. package/copilot-plugin/.github/prompts/slm-web-access.prompt.md +95 -0
  83. package/copilot-plugin/.vscode/mcp.json +11 -0
  84. package/copilot-plugin/README.md +26 -0
  85. package/copilot-plugin/_GENERATED.md +49 -0
  86. package/copilot-plugin/scripts/ensure-venv.bat +122 -0
  87. package/copilot-plugin/scripts/ensure-venv.sh +169 -0
  88. package/copilot-plugin/scripts/slm-launch +207 -0
  89. package/copilot-plugin/scripts/slm-launch.bat +32 -0
  90. package/copilot-plugin/scripts/slm-resolve.sh +128 -0
  91. package/copilot-plugin/scripts/slm-run +76 -0
  92. package/copilot-plugin/scripts/torch-cpu-resolve.sh +86 -0
  93. package/docs/pi-dev-integration.md +0 -2
  94. package/hermes-plugin/README.md +30 -0
  95. package/hermes-plugin/_GENERATED.md +3 -0
  96. package/hermes-plugin/__init__.py +417 -0
  97. package/hermes-plugin/agents/slm-governance-advisor.md +78 -0
  98. package/hermes-plugin/agents/slm-loop-runner.md +82 -0
  99. package/hermes-plugin/agents/slm-memory-advisor.md +50 -0
  100. package/hermes-plugin/agents/slm-optimize-advisor.md +44 -0
  101. package/hermes-plugin/command-inventory.json +7 -0
  102. package/hermes-plugin/plugin.yaml +24 -0
  103. package/hermes-plugin/remote.py +390 -0
  104. package/hermes-plugin/skills/slm-bot-memory/SKILL.md +146 -0
  105. package/hermes-plugin/skills/slm-cache/SKILL.md +147 -0
  106. package/hermes-plugin/skills/slm-compress/SKILL.md +150 -0
  107. package/hermes-plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
  108. package/hermes-plugin/skills/slm-governance/SKILL.md +221 -0
  109. package/hermes-plugin/skills/slm-graph/SKILL.md +327 -0
  110. package/hermes-plugin/skills/slm-loop/SKILL.md +153 -0
  111. package/hermes-plugin/skills/slm-mesh/SKILL.md +287 -0
  112. package/hermes-plugin/skills/slm-profile/SKILL.md +159 -0
  113. package/hermes-plugin/skills/slm-recall/SKILL.md +430 -0
  114. package/hermes-plugin/skills/slm-remember/SKILL.md +370 -0
  115. package/hermes-plugin/skills/slm-scope/SKILL.md +183 -0
  116. package/hermes-plugin/skills/slm-session/SKILL.md +291 -0
  117. package/hermes-plugin/skills/slm-status/SKILL.md +185 -0
  118. package/hermes-plugin/skills/slm-web-access/SKILL.md +91 -0
  119. package/package.json +9 -16
  120. package/plugin/.claude-plugin/plugin.json +2 -2
  121. package/plugin/.cursor-plugin/plugin.json +24 -0
  122. package/plugin/CLAUDE.md +14 -12
  123. package/plugin/agents/slm-governance-advisor.md +14 -16
  124. package/plugin/agents/slm-loop-runner.md +22 -11
  125. package/plugin/agents/slm-memory-advisor.md +14 -14
  126. package/plugin/agents/slm-optimize-advisor.md +5 -5
  127. package/plugin/assets/logo.svg +36 -0
  128. package/plugin/commands/slm-loop.md +5 -3
  129. package/plugin/cursor-skills/slm-bot-memory/SKILL.md +146 -0
  130. package/plugin/cursor-skills/slm-getting-started-bot/SKILL.md +146 -0
  131. package/plugin/cursor-skills/slm-recall/SKILL.md +430 -0
  132. package/plugin/cursor-skills/slm-remember/SKILL.md +370 -0
  133. package/plugin/cursor-skills/slm-scope/SKILL.md +183 -0
  134. package/plugin/cursor-skills/slm-session/SKILL.md +291 -0
  135. package/plugin/hooks/hooks.json +9 -9
  136. package/plugin/mcp.cursor.json +23 -0
  137. package/plugin/requirements-cpu-torch.txt +13 -0
  138. package/plugin/requirements.txt +1 -1
  139. package/plugin/scripts/ensure-venv.sh +45 -3
  140. package/plugin/scripts/slm-launch +93 -9
  141. package/plugin/scripts/torch-cpu-resolve.sh +86 -0
  142. package/plugin/skills/slm-bot-memory/SKILL.md +146 -0
  143. package/plugin/skills/slm-cache/SKILL.md +6 -7
  144. package/plugin/skills/slm-compress/SKILL.md +3 -3
  145. package/plugin/skills/slm-getting-started-bot/SKILL.md +146 -0
  146. package/plugin/skills/slm-governance/SKILL.md +126 -153
  147. package/plugin/skills/slm-graph/SKILL.md +27 -15
  148. package/plugin/skills/slm-loop/SKILL.md +74 -20
  149. package/plugin/skills/slm-mesh/SKILL.md +17 -12
  150. package/plugin/skills/slm-profile/SKILL.md +101 -91
  151. package/plugin/skills/slm-recall/SKILL.md +151 -54
  152. package/plugin/skills/slm-remember/SKILL.md +132 -35
  153. package/plugin/skills/slm-scope/SKILL.md +24 -17
  154. package/plugin/skills/slm-session/SKILL.md +77 -57
  155. package/plugin/skills/slm-status/SKILL.md +54 -35
  156. package/plugin/skills/slm-web-access/SKILL.md +91 -0
  157. package/plugin-src/agents/slm-governance-advisor.md +78 -0
  158. package/plugin-src/agents/slm-loop-runner.md +82 -0
  159. package/plugin-src/agents/slm-memory-advisor.md +14 -14
  160. package/plugin-src/agents/slm-optimize-advisor.md +5 -5
  161. package/plugin-src/commands/slm-loop.md +33 -0
  162. package/plugin-src/rules/AGENTS.md +45 -36
  163. package/plugin-src/rules/CLAUDE.md.fragment +47 -0
  164. package/plugin-src/skills/slm-bot-memory/SKILL.md +146 -0
  165. package/plugin-src/skills/slm-cache/SKILL.md +6 -7
  166. package/plugin-src/skills/slm-compress/SKILL.md +3 -3
  167. package/plugin-src/skills/slm-getting-started-bot/SKILL.md +146 -0
  168. package/plugin-src/skills/slm-governance/SKILL.md +126 -153
  169. package/plugin-src/skills/slm-graph/SKILL.md +27 -15
  170. package/plugin-src/skills/slm-loop/SKILL.md +74 -20
  171. package/plugin-src/skills/slm-mesh/SKILL.md +17 -12
  172. package/plugin-src/skills/slm-profile/SKILL.md +101 -91
  173. package/plugin-src/skills/slm-recall/SKILL.md +151 -54
  174. package/plugin-src/skills/slm-remember/SKILL.md +132 -35
  175. package/plugin-src/skills/slm-scope/SKILL.md +24 -17
  176. package/plugin-src/skills/slm-session/SKILL.md +77 -57
  177. package/plugin-src/skills/slm-status/SKILL.md +54 -35
  178. package/plugin-src/skills/slm-web-access/SKILL.md +91 -0
  179. package/scripts/postinstall.js +107 -0
@@ -0,0 +1,430 @@
1
+ ---
2
+ name: slm-recall
3
+ description: Search and retrieve facts, decisions, and past context from SuperLocalMemory. Use when the user asks to recall, find, search, or "what did we decide/say about X". Triggers multi-channel semantic retrieval with reranking; always call before storing anything new.
4
+ when_to_use: |
5
+ - "What did we decide about X?"
6
+ - "Recall anything about Y"
7
+ - "Do we have context on the Z feature?"
8
+ - "Find stored information about authentication / the database / error handling"
9
+ - "Search for what I said about Y"
10
+ - Automatically before any non-trivial task, to surface prior context
11
+ allowed-tools: recall, search, fetch, list_recent, get_memory_summary, run_view, report_outcome, report_feedback, Bash
12
+ ---
13
+
14
+ # slm-recall — Search & Retrieve Memory
15
+
16
+ Retrieve stored facts, decisions, and past context from SuperLocalMemory using
17
+ multi-channel retrieval. The golden rule: **recall before you remember**.
18
+
19
+ ---
20
+
21
+ ## When to use recall vs search vs fetch vs list_recent
22
+
23
+ | Situation | Tool |
24
+ |-----------|------|
25
+ | Conceptual or paraphrase query ("what did we agree on for auth?") | `recall` — full multi-channel retrieval + rerank |
26
+ | Exact keyword match needed ("find facts containing BM25") | `search` — FTS5 BM25 only, lower latency |
27
+ | You have a specific `fact_id` from a prior result | `fetch` — exact lookup, full detail |
28
+ | Browse newest entries without a query | `list_recent` |
29
+ | A day, a project or a session in readable form | `get_memory_summary` |
30
+ | A question the user saved under a name | `run_view` |
31
+
32
+ Use `recall` as the default. `search` is a fallback for zero-result recall on a
33
+ known exact term. `fetch` is for when you already know the ID.
34
+
35
+ ---
36
+
37
+ ## Recall-before-remember discipline
38
+
39
+ Before storing anything new, always call `recall` first. If a near-duplicate
40
+ fact already exists, call `update_memory(fact_id, content)` to refine it
41
+ rather than creating a duplicate. Duplicates degrade retrieval quality for
42
+ every future session.
43
+
44
+ ---
45
+
46
+ ## MCP-first workflow
47
+
48
+ ### 1. Standard recall
49
+
50
+ ```
51
+ recall(
52
+ query="authentication strategy decision",
53
+ limit=20, # default 20; reduce to 5 for quick pre-task checks
54
+ session_id="<sid>", # pass the session_id returned by session_init
55
+ fast=None, # leave unset; see "Fast mode" below for what it controls
56
+ )
57
+ ```
58
+
59
+ Real response shape (trimmed to the fields that matter; `slm recall --json`
60
+ wraps the same data in a `data` envelope):
61
+ ```json
62
+ {
63
+ "success": true,
64
+ "results": [
65
+ {
66
+ "fact_id": "f8a2bc91",
67
+ "memory_id": "m7e19ca0",
68
+ "content": "Decided to use JWT with 1h expiry for API auth (2026-06-10)",
69
+ "score": 0.87,
70
+ "confidence": 0.91,
71
+ "trust_score": 0.84,
72
+ "fact_type": "semantic",
73
+ "memory_kind": "decision",
74
+ "memory_kind_state": "confirmed",
75
+ "age_label": "4 months ago",
76
+ "channel_scores": {
77
+ "semantic": 0.88,
78
+ "bm25": 0.61,
79
+ "temporal": 0.72,
80
+ "hopfield": 0.55
81
+ }
82
+ }
83
+ ],
84
+ "count": 1,
85
+ "query_type": "semantic",
86
+ "channel_weights": {
87
+ "semantic": 0.4,
88
+ "bm25": 0.2,
89
+ "temporal": 0.2,
90
+ "hopfield": 0.2
91
+ },
92
+ "channel_status": {
93
+ "semantic": "ok",
94
+ "bm25": "ok",
95
+ "temporal": "empty",
96
+ "hopfield": "ok",
97
+ "spreading_activation": "no_candidates",
98
+ "entity_graph": "no_embedding",
99
+ "profile": "disabled"
100
+ },
101
+ "incomplete_channels": [],
102
+ "retrieval_time_ms": 134,
103
+ "query_id": "q-3f9a",
104
+ "no_confident_match": false,
105
+ "calibration_status": "uncalibrated",
106
+ "calibration_id": null,
107
+ "answer_confidence": null,
108
+ "abstained": false,
109
+ "abstention_reason": null,
110
+ "answer_check_status": "off",
111
+ "answerability": "unjudged",
112
+ "answerability_reason": "disabled"
113
+ }
114
+ ```
115
+
116
+ Other fields that can appear: `profile` (the namespace that answered),
117
+ `project_scope` (what a `project` filter did), `tag_scope` (what a `tags`
118
+ filter did), `temporal_frame`, `reranker_status`, and `thematic_context`.
119
+ Long contents are clamped and later results can come back as short stubs
120
+ (`truncated` / `stub` on the result); call `fetch` for the full text.
121
+
122
+ **Read `channel_status` before concluding that nothing is stored.** It reports
123
+ what each retrieval channel did on this query. `channel_weights` says how much
124
+ each channel counts; `channel_status` says whether it ran at all.
125
+
126
+ | status | meaning |
127
+ |---|---|
128
+ | `ok` | the channel ran and contributed candidates |
129
+ | `empty` | it ran and there was genuinely nothing to return |
130
+ | `no_candidates` | it ran but nothing survived fusion |
131
+ | `error` | it raised — **its results are missing from this answer** |
132
+ | `timeout` | it exceeded its guard — **results missing** |
133
+ | `no_embedding` | the query could not be embedded, so it could not run |
134
+ | `warming` | the embedding model, or the entity graph, was still loading right after a start — **results missing**, and the same question a little later usually works |
135
+ | `disabled` | switched off by configuration |
136
+ | `not_configured` | the backing service is not set up |
137
+
138
+ `semantic`, `bm25`, `temporal`, `hopfield` and `spreading_activation` each
139
+ search and return their own candidates. `profile` is a shortcut that runs before
140
+ them and can answer directly. `entity_graph` produces nothing of its own — it
141
+ re-scores what the others found, by how well each result connects to the
142
+ entities in your question, which is why it reports `no_candidates` when the
143
+ rest come back empty.
144
+
145
+ `empty`, `no_candidates`, `disabled` and `not_configured` are normal. `error`,
146
+ `timeout`, `no_embedding` and `warming` mean the answer is **incomplete, not
147
+ negative** — say so to the user rather than reporting "no memories found".
148
+ `incomplete_channels` lists the channels abandoned at the time limit, so two
149
+ runs of the same question that differ only there are an incomplete answer, not
150
+ a changed memory.
151
+
152
+ **Refine on low confidence.** `recall` returns confidence signals with every result. If `no_confident_match` is `true` (or `answer_confidence` is low / `abstained` is `true`), do NOT invent a memory — rewrite the query into 1–3 more specific sub-queries (split multi-hop questions; try entity names, synonyms, or broader phrasing) and call `recall` again before concluding nothing was found. A confident match → use it directly. SLM answers from this machine, typically in a second or two, with no server-side LLM round — unless the user turned on the online answer check, which adds one request to that service per recall — and lets you, the calling model, drive this refinement.
153
+
154
+ **`abstained` means the results shown do not answer the question.** If `abstained` is `true`, say you don't have it, or ask — never present the returned memories as the answer anyway. `abstention_reason` distinguishes why: `"judged_insufficient"` means candidates were found and scored, but none of them actually answers this question; `"evidence_floor"` / `"no_candidates"` means nothing was found at all. `answer_confidence` is a measurement, not a guarantee — treat a low number the same way you'd treat `abstained: true`. `calibration_status: "uncalibrated"` means no judge is configured for this recall; in that case `abstained` only ever reflects the older "nothing found" signal.
155
+
156
+ **`abstained: false` does not mean the answer was checked.** `answerability` says
157
+ whether it was: `supported` (the answer check ran and judged the shown memories
158
+ sufficient), `unsupported` (it ran and judged them insufficient) or `unjudged`
159
+ (it produced no verdict). `answerability_reason` gives the cause: `judged_fresh`
160
+ or `judged_from_memo` for a verdict, and for `unjudged` one of `disabled`,
161
+ `warming`, `unavailable`, `busy`, `budget_exhausted`, `no_results`,
162
+ `not_a_question` or `other_profile`. An empty result set is `unjudged` /
163
+ `no_results`, which is not evidence that no answer exists (check
164
+ `channel_status`). `answer_check_note` carries a sentence you can show a person.
165
+
166
+ ### 2. Passing session_id
167
+
168
+ Pass the `session_id` returned by `session_init`, on **every** recall in that
169
+ session. It does two things.
170
+
171
+ 1. **It carries the conversation forward.** Each recall offers its five
172
+ best-ranked results to a small per-session working set of seven slots. A
173
+ memory that keeps coming back is reinforced rather than duplicated, and the
174
+ least-activated slot is the one evicted, so something referenced across
175
+ several turns is hard to lose. Later recalls in the same session rank the
176
+ held memories higher, and turn three is not as cold as turn one. The bias is
177
+ deliberately small — it nudges the order, it never overrides an exact match.
178
+ 2. **It attributes engagement to the session**, so a later `report_outcome`
179
+ can close the loop on the right recall.
180
+
181
+ If you omit it, SLM looks for `SLM_SESSION_ID`, `CLAUDE_SESSION_ID` or
182
+ `CLAUDE_CODE_SESSION_ID` in the environment, then for the host's registered
183
+ session, and only then falls back to a per-agent label that is never credited
184
+ to a conversation. Recall still returns correct results either way, but a
185
+ fallback label means turns start cold and feedback cannot be attributed.
186
+
187
+ **Use the real id, not a made-up one.** An id beginning `http:`, `mcp:`, `cli:`,
188
+ `probe:`, `engine:`, `agent:`, `api:` or `view:` is treated as a synthetic
189
+ per-request label, not a conversation, and is excluded from the working set —
190
+ inventing one per call would otherwise fill the registry and evict genuine
191
+ conversations.
192
+
193
+ ### 3. Fast mode
194
+
195
+ `fast` controls **one** thing: whether the server runs its own internal LLM
196
+ reformulation round. It does **not** disable any retrieval channel — every
197
+ channel and the reranker run either way. Four channels register always: meaning,
198
+ keyword, entity graph and time. Spreading activation and Hopfield register as a
199
+ fifth and sixth when their prerequisites are present, so a store sees up to six
200
+ (`profile` in `channel_status` is a shortcut ahead of them, not a search).
201
+
202
+ Leave it unset. Unset resolves to "skip the internal round", because you are the
203
+ reasoner: you refine the query yourself using the confidence signals above, and
204
+ you do it better than a local model would. Pass `fast=False` only when SLM is
205
+ deployed with no capable client in front of it.
206
+
207
+ ```
208
+ recall(query="rate limiting approach", limit=5, session_id="<sid>")
209
+ ```
210
+
211
+ ### 4. Keyword fallback via search
212
+
213
+ When `recall` returns zero results on a specific term, try `search`:
214
+
215
+ ```
216
+ search(query="BM25 indexing", limit=20)
217
+ ```
218
+
219
+ Full-text FTS5 with BM25 ranking, no semantic channel. It takes the same
220
+ `kind`, `tags` / `tags_match` and `profile_id` arguments as `recall` (below).
221
+ The response has `success`, `results` (each with `fact_id`, `content`,
222
+ `fact_type`, `confidence`, `date` and the memory-kind fields) and `count`, but
223
+ no `channel_scores`, `query_type` or answer-check fields.
224
+
225
+ ### 5. Pull full detail for a known fact
226
+
227
+ ```
228
+ fetch(fact_ids="f8a2bc91,d4c1e203")
229
+ ```
230
+
231
+ Returns the full record for each ID: `entities`, `lifecycle`, `access_count`,
232
+ `importance`, `observation_date`, `referenced_date`, `project`. `fact_ids` may be
233
+ a comma-separated string or a list. Ids it could not resolve come back in
234
+ `not_found`; if none resolve, `success` is `false`. Use this when the recall
235
+ summary (120-char truncation in `list_recent`) is not enough.
236
+
237
+ ### 6. Browse recent memories
238
+
239
+ ```
240
+ list_recent(limit=20, kind="", tags="", tags_match="all", profile_id="")
241
+ ```
242
+
243
+ Returns facts newest-first. Content is truncated to 120 chars. Use `fetch`
244
+ once you have the `fact_id` for full content.
245
+
246
+ ### 7. Narrow a recall
247
+
248
+ Every filter below is optional and composes with the others as AND.
249
+
250
+ | Argument | Effect |
251
+ |---|---|
252
+ | `project` | Only memories saved under that project (a name or a path; case ignored). If none of the memories found were saved under it, the unfiltered results come back and `project_scope.filter.applied` is `false` with a `note` — never a silent empty answer. |
253
+ | `project_strict=True` | With `project`: no fall-back, only that project's memories even if there are none. |
254
+ | `prefer_project` | Ranks memories saved under that project above others of similar relevance and removes nothing. Pass your working directory on every recall in a project. |
255
+ | `saved_by` | Only memories saved by that agent id (for example `claude-desktop`). |
256
+ | `about` | Only memories that mention that person, project or tool. |
257
+ | `kind` | Only memories of one kind: `semantic`, `episodic`, `status`, `opinion`, `rule`, `decision`, `procedure`, `prospective` or `correction`. An unknown value is refused with `INVALID_KIND`. |
258
+ | `tags`, `tags_match` | Only memories saved with these exact labels (a comma-separated string, or a list when a label contains a comma). `tags_match` is `"all"` (default) or `"any"`. Case and spacing do not matter. Unlike `project`, a tag filter never falls back; an empty answer says why in `tag_scope`. |
259
+ | `window` | Event-time range: `"24h"`, `"7d"`, `"30d"`, `"1y"` or `"2026-07-01..2026-07-31"`. An unreadable value is refused. |
260
+ | `as_of`, `known_as_of`, `valid_at` | Point-in-time recall (ISO 8601). `known_as_of` is what SLM knew by then; `valid_at` is what was true then. `include_unknown=True` also admits older memories with no recorded time provenance. |
261
+ | `profile_id` | Serve this one call from another existing profile without moving the active one. |
262
+
263
+ Questions phrased like "what did we decide", "how do I" or "what is the current
264
+ status of" are answered with decisions, how-tos and the newest current-state
265
+ memory first, without any filter.
266
+
267
+ ```
268
+ recall(query="rollback procedure", kind="procedure", tags="ops", prefer_project="/work/api", session_id="<sid>")
269
+ ```
270
+
271
+ ### 8. Summaries and saved views
272
+
273
+ `get_memory_summary(kind="day", target="")` returns a readable summary of a
274
+ `day` (an ISO date, `today` or `yesterday`), a `project` (a directory path), a
275
+ `session` (a session id; leave `target` empty to get `recent_sessions` to pick
276
+ from) or a `community` (the `community_id` a recall gave in `thematic_context`).
277
+ It comes with `coverage` and `source_fact_ids`; session data is sparse, so do
278
+ not present a partial summary as a complete record.
279
+
280
+ `run_view(name="")` lists the user's saved views; with a name it runs that
281
+ saved question through ordinary recall, and the same `no_confident_match` rule
282
+ applies. Views are created from the dashboard, with `slm view create`, or with
283
+ `manage_view`.
284
+
285
+ ---
286
+
287
+ ### 9. Close the loop — say which memories helped
288
+
289
+ Whether a memory has been useful is evidence SLM records only if you supply it.
290
+ It is stored as learning signals (the count shows in `session_init`'s `learning`
291
+ block and on the dashboard). Signals reorder results only where adaptive ranking
292
+ is switched on by the operator (`SLM_RANKING`); it is off unless set, so do not
293
+ promise the user that a report changes the next answer.
294
+
295
+ ```
296
+ report_outcome(
297
+ memory_ids="f8a2bc91,c31d0f77", # the ids you actually used
298
+ outcome="success", # "success" | "failure" | "partial"
299
+ context="used the JWT expiry decision to write the refresh handler",
300
+ recall_query_id="q-3f9a", # the query_id of the recall; ties the report to that answer
301
+ )
302
+ ```
303
+
304
+ `report_outcome` and `report_feedback` are not in the smallest (`core`) tool set.
305
+ If your host does not list them, skip this step; nothing else depends on it.
306
+
307
+ Call it when a recall visibly changed what you did: you applied the decision,
308
+ followed the convention, or avoided the gotcha. Report `failure` when a
309
+ confidently-returned memory turned out to be wrong or stale — a negative signal
310
+ is recorded the same as a positive one. To retire a stale memory outright, save
311
+ the new version with `replaces` (see `slm-remember`).
312
+
313
+ Report only ids you genuinely used. Reporting every returned id marks the
314
+ irrelevant ones useful and records noise as signal. Without `recall_query_id`
315
+ the report is matched to a recall by overlapping memory ids within a time window.
316
+
317
+ `report_feedback(fact_id, feedback, query)` is the finer-grained form for a
318
+ single fact and the query that surfaced it; `feedback` is `"relevant"` (the
319
+ default), `"irrelevant"` or `"partial"`. If the signal could not be written to
320
+ the learning store it answers `success: false` with `durable: false`: do not
321
+ tell the user it was recorded.
322
+
323
+ ---
324
+
325
+ ## How multi-channel retrieval works
326
+
327
+ `recall` runs multiple candidate producers in parallel — semantic vector similarity,
328
+ keyword matching, temporal recency weighting, and contextual graph channels — then
329
+ fuses and reranks the combined results, with an optional entity-graph score
330
+ enhancement. The `channel_weights` field in the response shows how each channel
331
+ contributed for that query. Adaptive re-weighting from engagement signals is an
332
+ operator opt-in (`SLM_RANKING`) and is off by default.
333
+
334
+ To inspect per-channel scores for a real query against your own data:
335
+
336
+ ```bash
337
+ slm trace "<query>" [--limit N] [--json]
338
+ ```
339
+
340
+ No benchmark numbers are cited here; performance is workload-dependent.
341
+
342
+ ---
343
+
344
+ ## CLI fallback (when MCP is unavailable)
345
+
346
+ ```bash
347
+ # Multi-channel recall
348
+ slm recall "<query>" [--limit N] [--json]
349
+
350
+ # Narrow it (all optional, combined as AND)
351
+ slm recall "<query>" --project <name-or-path> [--project-strict] [--prefer-project <path>]
352
+ slm recall "<query>" --kind decision --tag auth --tag security [--tags-match any]
353
+ slm recall "<query>" --saved-by claude-desktop --about "Alice" --window 7d
354
+ slm recall "<query>" --as-of 2026-01-01T00:00:00+00:00 [--known-as-of ...] [--valid-at ...] [--include-unknown]
355
+
356
+ # Opt into shared/global facts for one query (off by default)
357
+ slm recall "<query>" --include-global --include-shared
358
+
359
+ # Per-channel score breakdown
360
+ slm trace "<query>" [--limit N] [--json]
361
+
362
+ # Browse recent memories; each line shows the memory's kind and its id
363
+ slm list [--limit N] [--kind KIND] [--tag LABEL ...] [--tags-match all|any] [--json]
364
+
365
+ # Summaries and saved views
366
+ slm summary day [today|yesterday|YYYY-MM-DD] | project <path> | session <id> | sessions [--json]
367
+ slm view list | create <name> "<query>" [--kind K --window W --limit N] | run <name> | show <name> | rename <name> <new> | delete <name>
368
+ ```
369
+
370
+ `slm search` is an alias of `slm recall`: it runs the same multi-channel
371
+ retrieval, not the FTS5-only keyword search the MCP `search` tool performs.
372
+ `--fast` forces the quick path; it is already the default for agents.
373
+
374
+ Flags that do **not** exist on `slm recall`: `--min-score`, `--format`,
375
+ `--tags` (the flag is the repeatable `--tag`).
376
+
377
+ Recall returns only this profile's own memories unless you pass
378
+ `--include-global` / `--include-shared` (or the MCP `include_global` /
379
+ `include_shared` arguments), or the user has set the defaults in their
380
+ configuration. See [docs/shared-memory.md](../../../docs/shared-memory.md).
381
+
382
+ ---
383
+
384
+ ## Never fabricate a memory
385
+
386
+ After re-querying with refined sub-queries (see **Refine on low confidence** above), if `no_confident_match` is still `true` or results are empty, report it plainly.
387
+ Never construct a response as if a memory was found when it was not. The user
388
+ trusts that what you surface came from the store.
389
+
390
+ ---
391
+
392
+ ## Shared and global memories (opt-in)
393
+
394
+ By default `recall` returns only memories in the active profile (personal scope).
395
+ To also surface memories shared from other profiles, pass the scope flags:
396
+
397
+ ```
398
+ recall(
399
+ query="...",
400
+ include_global=True, # include global-scope memories (visible to all profiles)
401
+ include_shared=True, # include shared-scope memories (shared with this profile)
402
+ session_id="<sid>",
403
+ )
404
+ ```
405
+
406
+ Scope flags are **off by default**. Only enable them when the user explicitly asks
407
+ to see shared or global facts. See `slm-scope` for the full sharing model.
408
+
409
+ ---
410
+
411
+ ## Profile-aware retrieval
412
+
413
+ `recall` queries the active profile. To read another existing profile for one
414
+ call, pass `profile_id="<name>"` (the active profile is not moved). The
415
+ `switch_profile` tool changes the active profile for every later call and for
416
+ other sessions on this machine, so reserve it for when the user asks to move.
417
+ See `slm-profile`.
418
+
419
+ ---
420
+
421
+ ## Related skills
422
+
423
+ - `slm-remember` — store the decisions and facts that recall surfaces later
424
+ - `slm-session` — session lifecycle (must call before first recall)
425
+ - `slm-scope` — multi-scope sharing model (personal / shared / global)
426
+ - `slm-profile` — workspace isolation and profile switching
427
+
428
+ ---
429
+
430
+ *SuperLocalMemory v4.1.23 · Qualixar · AGPL-3.0-or-later*