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