superlocalmemory 4.1.22 → 4.1.24

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 (172) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +145 -0
  3. package/README.md +72 -46
  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 +93 -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 +93 -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 +97 -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 +93 -0
  119. package/package.json +9 -18
  120. package/plugin/.claude-plugin/plugin.json +1 -1
  121. package/plugin/.cursor-plugin/plugin.json +1 -1
  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/commands/slm-loop.md +5 -3
  128. package/plugin/cursor-skills/slm-bot-memory/SKILL.md +19 -12
  129. package/plugin/cursor-skills/slm-getting-started-bot/SKILL.md +17 -9
  130. package/plugin/cursor-skills/slm-recall/SKILL.md +151 -54
  131. package/plugin/cursor-skills/slm-remember/SKILL.md +132 -35
  132. package/plugin/cursor-skills/slm-scope/SKILL.md +24 -17
  133. package/plugin/cursor-skills/slm-session/SKILL.md +77 -57
  134. package/plugin/mcp.cursor.json +1 -1
  135. package/plugin/requirements.txt +1 -1
  136. package/plugin/skills/slm-bot-memory/SKILL.md +19 -12
  137. package/plugin/skills/slm-cache/SKILL.md +6 -7
  138. package/plugin/skills/slm-compress/SKILL.md +3 -3
  139. package/plugin/skills/slm-getting-started-bot/SKILL.md +17 -9
  140. package/plugin/skills/slm-governance/SKILL.md +126 -153
  141. package/plugin/skills/slm-graph/SKILL.md +27 -15
  142. package/plugin/skills/slm-loop/SKILL.md +74 -20
  143. package/plugin/skills/slm-mesh/SKILL.md +17 -12
  144. package/plugin/skills/slm-profile/SKILL.md +101 -92
  145. package/plugin/skills/slm-recall/SKILL.md +151 -54
  146. package/plugin/skills/slm-remember/SKILL.md +132 -35
  147. package/plugin/skills/slm-scope/SKILL.md +24 -17
  148. package/plugin/skills/slm-session/SKILL.md +77 -57
  149. package/plugin/skills/slm-status/SKILL.md +54 -35
  150. package/plugin/skills/slm-web-access/SKILL.md +93 -0
  151. package/plugin-src/agents/slm-governance-advisor.md +78 -0
  152. package/plugin-src/agents/slm-loop-runner.md +82 -0
  153. package/plugin-src/agents/slm-memory-advisor.md +14 -14
  154. package/plugin-src/agents/slm-optimize-advisor.md +5 -5
  155. package/plugin-src/commands/slm-loop.md +33 -0
  156. package/plugin-src/rules/AGENTS.md +45 -36
  157. package/plugin-src/rules/CLAUDE.md.fragment +47 -0
  158. package/plugin-src/skills/slm-bot-memory/SKILL.md +19 -12
  159. package/plugin-src/skills/slm-cache/SKILL.md +6 -7
  160. package/plugin-src/skills/slm-compress/SKILL.md +3 -3
  161. package/plugin-src/skills/slm-getting-started-bot/SKILL.md +17 -9
  162. package/plugin-src/skills/slm-governance/SKILL.md +126 -153
  163. package/plugin-src/skills/slm-graph/SKILL.md +27 -15
  164. package/plugin-src/skills/slm-loop/SKILL.md +74 -20
  165. package/plugin-src/skills/slm-mesh/SKILL.md +17 -12
  166. package/plugin-src/skills/slm-profile/SKILL.md +101 -92
  167. package/plugin-src/skills/slm-recall/SKILL.md +151 -54
  168. package/plugin-src/skills/slm-remember/SKILL.md +132 -35
  169. package/plugin-src/skills/slm-scope/SKILL.md +24 -17
  170. package/plugin-src/skills/slm-session/SKILL.md +77 -57
  171. package/plugin-src/skills/slm-status/SKILL.md +54 -35
  172. package/plugin-src/skills/slm-web-access/SKILL.md +93 -0
@@ -0,0 +1,375 @@
1
+ ---
2
+ name: slm-remember
3
+ description: Capture durable facts, decisions, constraints, and gotchas into SuperLocalMemory. Use when the user says "remember that", "save this decision", "note this constraint", or when a session produces a conclusion worth persisting across sessions. Always recall first to avoid duplicates.
4
+ version: "4.1.24"
5
+ agent: agent
6
+ tools:
7
+ - remember
8
+ - recall
9
+ - update_memory
10
+ - set_memory_kind
11
+ - review_memory_kinds
12
+ - confirm_memory_kinds
13
+ - list_corrections
14
+ - review_correction
15
+ - delete_memory
16
+ - Bash
17
+ ---
18
+
19
+ # slm-remember — Capture Durable Facts
20
+
21
+ Store atomic, durable facts into SuperLocalMemory for retrieval in future
22
+ sessions. One fact per call. Recall before you remember.
23
+
24
+ ---
25
+
26
+ ## What to store (and what not to)
27
+
28
+ **Store:**
29
+ - Architectural decisions ("Decided to use Postgres not MySQL — reason: JSONB support")
30
+ - Project conventions ("All API routes follow /api/v1/resource/{id} pattern")
31
+ - Hard constraints ("Never expose raw SQL errors to the HTTP response")
32
+ - Resolved gotchas ("Ollama needs keep_alive=-1 or it unloads the model between calls")
33
+ - Security rules ("Rate limit all public endpoints at 100 req/min")
34
+
35
+ **Do not store:**
36
+ - Transient context that is only relevant within this conversation
37
+ - Large blobs of code or full file contents (those belong in the project, not memory)
38
+ - Facts the project README already captures
39
+
40
+ ---
41
+
42
+ ## Recall-before-remember (mandatory discipline)
43
+
44
+ Before calling `remember`, always call `recall` first with the core terms of
45
+ what you are about to store. If a near-duplicate exists:
46
+
47
+ - If the new text **replaces** the old one (a status that moved on, a decision
48
+ that changed, a rule that was reworded), save it with
49
+ `remember(..., replaces="<fact_id>")`. It takes effect at once and can be
50
+ undone.
51
+ - If you are **correcting** the old memory and want a person to approve the
52
+ change, use `update_memory(fact_id, content)`. This opens a correction for
53
+ review; it does not overwrite anything (see "Updating a memory" below).
54
+ - Only call `remember` with neither when no sufficiently similar fact is found.
55
+
56
+ Duplicates degrade retrieval quality for every future session.
57
+
58
+ ---
59
+
60
+ ## MCP-first workflow
61
+
62
+ ### 1. Check for duplicates first
63
+
64
+ ```
65
+ recall(query="JWT token expiry auth", limit=5, session_id="<sid>")
66
+ ```
67
+
68
+ If a near-duplicate is returned:
69
+
70
+ ```
71
+ remember(
72
+ content="JWT tokens use 1h expiry for API access tokens; refresh tokens 30d",
73
+ tags="auth,security,decision",
74
+ project="superlocalmemory",
75
+ kind="decision",
76
+ replaces="f8a2bc91",
77
+ )
78
+ ```
79
+
80
+ The old memory is retired, not deleted: recall stops returning it and it is no
81
+ longer loaded at session start. The response's `replaced` says what was retired,
82
+ or why nothing was (the new memory is saved either way). An unknown id, or an id
83
+ from another profile, is refused before anything is saved.
84
+
85
+ ### 2. Store a new fact
86
+
87
+ ```
88
+ remember(
89
+ content="Decided to use JWT with 1h expiry for API auth; refresh tokens persist 30 days",
90
+ tags="auth,security,decision",
91
+ project="superlocalmemory",
92
+ importance=8,
93
+ session_id="<sid>",
94
+ )
95
+ ```
96
+
97
+ Real response shape:
98
+ ```json
99
+ {
100
+ "success": true,
101
+ "fact_ids": ["c9d4e112"],
102
+ "count": 1,
103
+ "pending": false,
104
+ "pending_id": null,
105
+ "operation_id": "op-7c21",
106
+ "materialization_state": "complete",
107
+ "message": "Stored through canonical daemon ingestion."
108
+ }
109
+ ```
110
+
111
+ `pending: true` with `materialization_state` `queryable` or `enriching` means the
112
+ memory is already stored and findable by its words while enrichment finishes;
113
+ do not re-save. A reply with `materialization_state: "accepted"` and `count: 0`
114
+ means the memory is durable but the writer was busy; it becomes searchable
115
+ within seconds, and resending the same `idempotency_key` returns the final
116
+ receipt. When the call used `replaces` the reply carries `replaced`; when the
117
+ same words were already saved under another confirmed kind it carries
118
+ `kind_conflict` and keeps that kind.
119
+
120
+ Failures come back as `success: false` with a `code` and `retryable`:
121
+ `DAEMON_UNAVAILABLE` (`retryable: true`), `INVALID_KIND`, `NOT_AUTHORIZED`, or an
122
+ unknown-profile / unknown-`replaces` refusal (`retryable: false`).
123
+
124
+ **Never claim "saved" unless `success: true` is in the response.**
125
+
126
+ ### 3. Parameter reference
127
+
128
+ ```
129
+ remember(
130
+ content: str, # required — the atomic fact to store
131
+ tags: str = "", # comma-separated tags, e.g. "auth,security,gotcha"
132
+ project: str = "", # project scope, e.g. "superlocalmemory"
133
+ importance: int = 5,# 1–10; see scale below
134
+ session_id: str = "",# from session_init; attributes the write to this session
135
+ session_date: str = "",# when the memory is ABOUT, if not today
136
+ scope: str = None, # "personal" (default) | "shared" | "global"
137
+ shared_with: str = "",# comma-separated profile_ids for scope="shared"
138
+ idempotency_key: str = "",# replaying the same key will not store a second copy
139
+ kind: str = "", # what sort of memory this is; see "Say what kind it is"
140
+ replaces: str = None,# fact_id (or memory_id) of the earlier memory this one replaces
141
+ profile_id: str = "",# write to another existing profile; "" = the active one
142
+ agent_id: str = "mcp_client", # attribution; resolved from the connection when left alone
143
+ )
144
+ ```
145
+
146
+ > **Multi-scope (opt-in):** leave `scope` unset for `personal` (private to
147
+ > this profile — the default, the same as a single-profile install). `"global"` is visible to every
148
+ > profile on the machine; `"shared"` is visible to the profiles in `shared_with`.
149
+ > See [docs/shared-memory.md](../../../docs/shared-memory.md).
150
+
151
+ **importance scale:**
152
+ - 1–3: Low — passing notes, ideas, soft preferences
153
+ - 4–6: Normal — patterns, conventions, standard decisions (default: 5)
154
+ - 7–8: High — architectural decisions, integration contracts, known gotchas
155
+ - 9–10: Critical — security rules, blockers, irreversible decisions
156
+
157
+ Use 7–10 only for facts that would cause real damage if forgotten.
158
+
159
+ ### 4. Date a memory to when it happened
160
+
161
+ `session_date` says **when the memory is about**, as distinct from when you
162
+ wrote it. Omit it and the memory is dated today.
163
+
164
+ ```
165
+ remember(
166
+ content="The outage on the payments queue was caused by a stale DNS entry",
167
+ tags="incident,payments,postmortem",
168
+ project="platform",
169
+ session_date="2026-08-14", # YYYY-MM-DD, or a full ISO 8601 timestamp
170
+ session_id="<sid>",
171
+ )
172
+ ```
173
+
174
+ Use it whenever you are writing something down after the fact — a postmortem, a
175
+ decision taken in a meeting last week, a migration that ran on a known date.
176
+ Time-filtered recall (`window="7d"`, `window="2026-07-01..2026-07-31"`) reads
177
+ event time, so a mis-dated memory is one a time-scoped question cannot find.
178
+
179
+ `session_date` does not change what **kind** of memory it is. A memory that
180
+ describes something planned — "the migration is scheduled for Tuesday", "the
181
+ certificate expires on 2026-09-01" — is stored as a **prospective** memory, and
182
+ recall reports it as `"fact_type": "prospective"`. That is inferred from how the
183
+ content reads, not from the date you pass. Older stores spelled this type
184
+ `"temporal"`; that value still reads correctly and needs nothing from you.
185
+
186
+ ---
187
+
188
+ ### 5. Say what kind it is
189
+
190
+ `kind` is one of nine values: `rule` (a standing instruction: "always/never
191
+ ..."), `decision` (a choice that settles a question), `status` (the current
192
+ state of something, which a later update will replace), `procedure` (steps or
193
+ commands), `prospective` (a plan or to-do), `opinion` (a preference or view),
194
+ `correction` (says an earlier memory was wrong), `episodic` (something that
195
+ happened) or `semantic` (a lasting fact). An unknown value is refused with
196
+ `INVALID_KIND` before anything is saved.
197
+
198
+ Set it whenever you know. A kind you declare is confirmed, and confirmed rules
199
+ (up to 10) and confirmed decisions (up to 5) are loaded by `session_init` at
200
+ the start of later sessions. Leave `kind` empty when unsure: SLM may suggest
201
+ one later, and a suggestion changes nothing until someone confirms it. Never
202
+ set a kind just to get a memory loaded at session start.
203
+
204
+ Manage kinds after the fact:
205
+
206
+ | Tool | Use |
207
+ |---|---|
208
+ | `set_memory_kind(fact_id, kind)` | Set and confirm the kind of one memory you know the type of |
209
+ | `review_memory_kinds(kind="", limit=20)` | List suggestions waiting for confirmation (limit 1–100) |
210
+ | `confirm_memory_kinds(items)` | Confirm up to 200 at once; each item is `{"fact_id": ..., "kind": ...}`, and omitting `kind` accepts the suggestion |
211
+ | `memory_kinds_status()` | Counts per kind, the classifying backend, any run in progress |
212
+
213
+ CLI: `slm remember "<text>" --kind rule`, `slm kinds status|set|review|confirm`,
214
+ `slm kinds backfill start|pause|resume|cancel|revert|status`, and
215
+ `slm kinds settings` (backend, standing rules on or off). Classifying with Jev
216
+ sends memory text online and needs its own consent (`--jev-consent yes`).
217
+
218
+ ### 6. Updating a memory: `replaces` versus `update_memory`
219
+
220
+ `update_memory(fact_id, content)` and `slm update <fact_id> "<new text>"` do not
221
+ overwrite a memory. They keep the original and propose a correction: the reply
222
+ has `predecessor_fact_id`, `successor_fact_id`, `correction_case` (with
223
+ `case_id`, `status`, `version`) and `review_required: true`. Until a person
224
+ applies the case, **the original stays current and the new text is not
225
+ returned by recall**. A memory can have only one open correction at a time; a
226
+ second edit is refused with a message naming the open case.
227
+
228
+ Review cases with `list_corrections(limit=100)` and
229
+ `review_correction(case_id, action, expected_version)`, where `action` is
230
+ `apply`, `reject` or `rollback` and `expected_version` is the case's current
231
+ `version`. `apply` retires the original and admits the new text; `rollback`
232
+ undoes an applied case (including one made by `replaces`). CLI:
233
+ `slm review-correction <case_id> apply|reject|rollback <expected_version>`.
234
+
235
+ Two rules about SLM's own guesses. When it saves a memory that looks like an
236
+ update to an older one, it may file a correction case of its own. That guess
237
+ never hides the memory you saved: both stay findable until a person reviews it,
238
+ approving retires the older one, and rejecting keeps both. And if you edit,
239
+ replace or delete a memory that only such an unreviewed machine guess names,
240
+ your action wins and the guess is closed as overtaken (`slm corrections
241
+ overtaken` lists them, `slm corrections restore-overtaken <case_id>` puts one
242
+ back). A correction a person proposed, or one already decided, is kept
243
+ permanently and protects the memories in it from being deleted.
244
+
245
+ ### 7. One fact per call
246
+
247
+ Store one atomic fact per `remember` call. Do not concatenate multiple unrelated
248
+ points into a single content string — they will be hard to update individually
249
+ and harder to retrieve cleanly. If you have three separate decisions, make three
250
+ calls.
251
+
252
+ ### 8. Always set tags and project
253
+
254
+ Untagged, unscoped facts are harder to retrieve and harder to manage. Minimum:
255
+ set `tags` to one or two relevant terms and `project` to the repo/product name.
256
+
257
+ ---
258
+
259
+ ## Deleting stale facts
260
+
261
+ The MCP `forget(dry_run=True)` tool runs an Ebbinghaus decay cycle over the
262
+ whole profile — it does NOT delete by query. To delete one memory you have the
263
+ id of, call `delete_memory(fact_id)`. To delete by query, use the CLI:
264
+
265
+ ```bash
266
+ # Preview what would be deleted (always do this first)
267
+ slm forget "<query>" --dry-run [--json]
268
+
269
+ # Execute deletion after confirming the preview
270
+ slm forget "<query>" --yes [--json]
271
+
272
+ # Delete a specific fact by exact ID (use when you have the fact_id)
273
+ slm delete <fact_id> --yes [--json]
274
+ ```
275
+
276
+ Flags verified in source (main.py):
277
+ - `slm forget`: positional `query`, `--dry-run`, `--yes` / `-y`, `--json`
278
+ - `slm delete`: positional `fact_id`, `--yes` / `-y`, `--json`
279
+
280
+ Always run `--dry-run` first and review the preview before passing `--yes`.
281
+ A memory that belongs to a reviewed correction cannot be deleted (it is refused
282
+ with the case ids and nothing is changed). Treat every other deletion as permanent.
283
+
284
+ ---
285
+
286
+ ## CLI fallback (when MCP is unavailable)
287
+
288
+ ```bash
289
+ # Store a fact
290
+ slm remember "<content>" [--tags a,b,c] [--kind rule|decision|...] [--json]
291
+
292
+ # Replace an earlier memory (takes effect at once; undo with review-correction)
293
+ slm remember "<content>" --replaces <fact_id> --kind status
294
+
295
+ # Store a shared/global fact (opt-in)
296
+ slm remember "<content>" --scope global
297
+ slm remember "<content>" --scope shared --shared-with alice,bob
298
+
299
+ # Propose a reviewed correction instead of replacing
300
+ slm update <fact_id> "<new text>"
301
+ slm review-correction <case_id> apply|reject|rollback <expected_version>
302
+
303
+ # Flags: --tags, --kind, --replaces, --json, --sync, --scope, --shared-with
304
+ # --sync: wait for full enrichment before returning (default is async)
305
+ # --scope: personal (default) | shared | global ; --shared-with: profile ids for shared
306
+ ```
307
+
308
+ **Flags that do NOT exist** on `slm remember`:
309
+ `--importance`, `--project`, `--format` — these are MCP-only params or fabricated.
310
+
311
+ ---
312
+
313
+ ## Update vs forget discipline
314
+
315
+ | Scenario | Action |
316
+ |----------|--------|
317
+ | Fact has changed and the new version should win now | `remember(..., replaces="<fact_id>")` |
318
+ | Fact needs a correction a person should approve | `update_memory(fact_id, new_content)`, then `review_correction` |
319
+ | Duplicate found that matches recall result | `replaces` the existing one, or leave it |
320
+ | Fact is wrong and should disappear | `slm forget "<query>" --dry-run` then `--yes` |
321
+ | Fact has a known ID and is clearly obsolete | `delete_memory(fact_id)` or `slm delete <fact_id> --yes` |
322
+
323
+ ---
324
+
325
+ ## Sharing across profiles (opt-in)
326
+
327
+ Every `remember` call defaults to `personal` scope — private to the active profile.
328
+ To share a fact with other profiles on the same machine, set the `scope` parameter:
329
+
330
+ ```
331
+ # Share with every profile on this machine
332
+ remember(
333
+ content="API rate limit is 100 req/min per tenant",
334
+ tags="api,limits,shared",
335
+ project="platform",
336
+ scope="global", # visible to all profiles
337
+ session_id="<sid>",
338
+ )
339
+
340
+ # Share with specific profiles only
341
+ remember(
342
+ content="Staging DB migration runs Fridays 22:00 UTC",
343
+ tags="db,ops",
344
+ scope="shared",
345
+ shared_with="work-profile,devops-profile",
346
+ session_id="<sid>",
347
+ )
348
+ ```
349
+
350
+ **Only set scope when the user explicitly asks to share.** The default
351
+ `personal` scope is identical to single-profile SLM. See `slm-scope` for the
352
+ complete sharing model and when to use each scope.
353
+
354
+ ---
355
+
356
+ ## Profile-aware storage
357
+
358
+ `remember` stores in the active profile. To write one memory to another existing
359
+ profile, pass `profile_id="<name>"`; an unknown name is rejected, never created.
360
+ `switch_profile` moves the active profile for every later call and for other
361
+ sessions on this machine, so use it only when the user asks to move. See
362
+ `slm-profile`.
363
+
364
+ ---
365
+
366
+ ## Related skills
367
+
368
+ - `slm-recall` — retrieve what was remembered
369
+ - `slm-session` — session lifecycle; session_id is required for attribution
370
+ - `slm-scope` — complete guide to personal / shared / global scopes
371
+ - `slm-profile` — workspace isolation and profile switching
372
+
373
+ ---
374
+
375
+ *SuperLocalMemory v4.1.24 · Qualixar · AGPL-3.0-or-later*
@@ -0,0 +1,183 @@
1
+ ---
2
+ name: slm-scope
3
+ description: Controls memory visibility across profiles — personal (private, default), shared (selected profiles), or global (all profiles on this machine). Default is always personal. Only change scope when the user explicitly asks to share a memory across workspaces. Works with both remember (write scope) and recall (read scope flags).
4
+ version: "4.1.24"
5
+ agent: agent
6
+ tools:
7
+ - remember
8
+ - recall
9
+ - search
10
+ - list_recent
11
+ - Bash
12
+ ---
13
+
14
+ # slm-scope — Memory Scope and Sharing Model
15
+
16
+ SuperLocalMemory is profile-isolated by default. Every profile is a fully
17
+ independent memory namespace. The scope model adds controlled, opt-in sharing
18
+ between profiles on the same machine — it is never active unless you explicitly
19
+ set it.
20
+
21
+ ---
22
+
23
+ ## The Three Scopes
24
+
25
+ | Scope | Visibility | When to use |
26
+ |-------|-----------|-------------|
27
+ | `personal` | Active profile only | Default — all facts. Never set explicitly. |
28
+ | `shared` | Active profile + `shared_with` profiles | Team handoffs, shared project context |
29
+ | `global` | Every profile on this machine | Machine-wide conventions, org-wide rules |
30
+
31
+ **The default is always `personal`.** A fact stored without a `scope` argument
32
+ is private to the profile that stored it. Recall without scope flags returns only
33
+ personal facts. This is identical to single-profile SLM.
34
+
35
+ ---
36
+
37
+ ## Opt-in is mandatory
38
+
39
+ Never set `scope="shared"` or `scope="global"` (or the recall equivalents
40
+ `include_shared`, `include_global`) unless the user explicitly asks you to share
41
+ or read across profiles. This is a hard rule — scope expansion is an action with
42
+ team-wide or machine-wide impact, and it must always be user-initiated.
43
+
44
+ ---
45
+
46
+ ## Writing a shared or global fact
47
+
48
+ ### share with specific profiles
49
+
50
+ ```
51
+ remember(
52
+ content="API gateway rate limit is 1000 req/min per client",
53
+ tags="api,limits,ops",
54
+ project="platform",
55
+ importance=8,
56
+ session_id="<sid>",
57
+ scope="shared",
58
+ shared_with="devops-profile,backend-profile",
59
+ )
60
+ ```
61
+
62
+ `shared_with` is a comma-separated list of profile IDs that should be able to
63
+ recall this fact. Use `slm status` to see the current profile name — that is the
64
+ `profile_id` to supply.
65
+
66
+ ### share with all profiles on the machine
67
+
68
+ ```
69
+ remember(
70
+ content="All services must enforce TLS 1.3 minimum",
71
+ tags="security,tls,global",
72
+ project="infra",
73
+ importance=9,
74
+ session_id="<sid>",
75
+ scope="global",
76
+ )
77
+ ```
78
+
79
+ `scope="global"` makes the fact visible to every profile on this machine. Use
80
+ this only for machine-wide conventions (security rules, org-wide constraints).
81
+
82
+ ---
83
+
84
+ ## Reading shared or global facts
85
+
86
+ By default, `recall` returns only the active profile's personal facts. To surface
87
+ shared and global facts, pass the opt-in flags:
88
+
89
+ ```
90
+ recall(
91
+ query="rate limiting rules",
92
+ limit=20,
93
+ include_global=True, # include global-scope facts
94
+ include_shared=True, # include facts shared with this profile
95
+ session_id="<sid>",
96
+ )
97
+ ```
98
+
99
+ You can opt in to either or both flags independently. Only the active profile's
100
+ permitted shared facts are returned — you cannot read another profile's personal
101
+ facts.
102
+
103
+ ### CLI equivalents
104
+
105
+ ```bash
106
+ # Recall with global facts included
107
+ slm recall "rate limiting rules" --include-global
108
+
109
+ # Recall with shared facts included
110
+ slm recall "rate limiting rules" --include-shared
111
+
112
+ # Both
113
+ slm recall "rate limiting rules" --include-global --include-shared
114
+
115
+ # Store a global fact
116
+ slm remember "TLS 1.3 minimum" --scope global
117
+
118
+ # Store a shared fact (shared-with is a comma-separated list of profile IDs)
119
+ slm remember "API rate limit 1000/min" --scope shared --shared-with devops,backend
120
+ ```
121
+
122
+ CLI flags: `--include-global` / `--no-global`, `--include-shared` / `--no-shared`
123
+ on `slm recall`; `--scope personal|shared|global` and `--shared-with <profile-ids>`
124
+ on `slm remember`. Leaving a flag unset uses the configured default.
125
+
126
+ ---
127
+
128
+ ## Configuring scope defaults
129
+
130
+ The defaults live in the `scope` section of the mode config files (`mode_a.json`,
131
+ `mode_b.json`, `mode_c.json`, and the active `config.json`). To make a profile's
132
+ recalls always include global facts without passing a flag each time:
133
+
134
+ ```json
135
+ {
136
+ "scope": {
137
+ "default_scope": "personal",
138
+ "recall_include_global": true,
139
+ "recall_include_shared": false
140
+ }
141
+ }
142
+ ```
143
+
144
+ Omit the section, or any field, to keep the safe defaults (`personal`, `false`,
145
+ `false`). An invalid `default_scope` is ignored with a warning. Changing the
146
+ default requires editing the config directly — this is an admin-level operation,
147
+ and an agent must not do it on its own.
148
+
149
+ ---
150
+
151
+ ## Enterprise governance
152
+
153
+ In a workspace with roles (company mode, see `slm-governance`):
154
+ - **Viewers** cannot write at all, whatever `scope` says.
155
+ - **Members and admins** can write `shared` and `global` facts: both hold the
156
+ share permission. Deleting needs the delete permission, which only admins hold.
157
+ - Explicit `include_global=True` / `include_shared=True` on `recall` are quietly
158
+ turned off while the recall policy forbids cross-profile reads, which is the
159
+ default in company mode. If an opt-in recall returns only personal facts in a
160
+ governed workspace, that is the policy working, not a bug; do not try to work
161
+ around it.
162
+
163
+ ---
164
+
165
+ ## Scope deletion and retention
166
+
167
+ A `scope="global"` fact deleted by one profile is deleted for all profiles. A
168
+ `scope="shared"` fact is deleted from all profiles that had access to it.
169
+ Use `slm forget "<query>" --dry-run` before any deletion involving shared facts
170
+ to review the impact. See `slm-remember` for the full deletion discipline.
171
+
172
+ ---
173
+
174
+ ## Related skills
175
+
176
+ - `slm-remember` — full fact storage reference including scope parameters
177
+ - `slm-recall` — full retrieval reference including include_global/include_shared
178
+ - `slm-profile` — what a profile is and how to switch between them
179
+ - `slm-governance` — enterprise role restrictions on scope
180
+
181
+ ---
182
+
183
+ *SuperLocalMemory v4.1.24 · Qualixar · AGPL-3.0-or-later*