superlocalmemory 4.2.5 → 4.2.6

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