superlocalmemory 3.7.8 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/ATTRIBUTION.md +1 -3
- package/CHANGELOG.md +69 -0
- package/README.md +199 -29
- package/package.json +4 -2
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/CLAUDE.md +8 -8
- package/plugin/agents/slm-governance-advisor.md +80 -0
- package/plugin/agents/slm-loop-runner.md +71 -0
- package/plugin/agents/slm-memory-advisor.md +10 -5
- package/plugin/agents/slm-optimize-advisor.md +9 -3
- package/plugin/commands/slm-loop.md +31 -0
- package/plugin/hooks/hooks.json +79 -0
- package/plugin/requirements.txt +1 -1
- package/plugin/scripts/slm-launch +46 -7
- package/plugin/settings.json +9 -0
- package/plugin/skills/slm-cache/SKILL.md +9 -1
- package/plugin/skills/slm-compress/SKILL.md +8 -1
- package/plugin/skills/slm-governance/SKILL.md +248 -0
- package/plugin/skills/slm-graph/SKILL.md +17 -3
- package/plugin/skills/slm-loop/SKILL.md +99 -0
- package/plugin/skills/slm-mesh/SKILL.md +282 -0
- package/plugin/skills/slm-profile/SKILL.md +148 -0
- package/plugin/skills/slm-recall/SKILL.md +46 -10
- package/plugin/skills/slm-remember/SKILL.md +48 -1
- package/plugin/skills/slm-scope/SKILL.md +176 -0
- package/plugin/skills/slm-session/SKILL.md +24 -1
- package/plugin/skills/slm-status/SKILL.md +18 -1
- package/plugin-src/agents/slm-governance-advisor.md +80 -0
- package/plugin-src/agents/slm-loop-runner.md +71 -0
- package/plugin-src/agents/slm-memory-advisor.md +10 -5
- package/plugin-src/agents/slm-optimize-advisor.md +9 -3
- package/plugin-src/commands/slm-loop.md +31 -0
- package/plugin-src/hooks/hooks.json +79 -0
- package/plugin-src/manifest.json +7 -2
- package/plugin-src/requirements.txt +1 -1
- package/plugin-src/rules/AGENTS.md +57 -18
- package/plugin-src/rules/CLAUDE.md.fragment +8 -8
- package/plugin-src/scripts/slm-launch +46 -7
- package/plugin-src/settings.json +9 -0
- package/plugin-src/skills/slm-cache/SKILL.md +9 -1
- package/plugin-src/skills/slm-compress/SKILL.md +8 -1
- package/plugin-src/skills/slm-governance/SKILL.md +248 -0
- package/plugin-src/skills/slm-graph/SKILL.md +17 -3
- package/plugin-src/skills/slm-loop/SKILL.md +99 -0
- package/plugin-src/skills/slm-mesh/SKILL.md +282 -0
- package/plugin-src/skills/slm-profile/SKILL.md +148 -0
- package/plugin-src/skills/slm-recall/SKILL.md +46 -10
- package/plugin-src/skills/slm-remember/SKILL.md +48 -1
- package/plugin-src/skills/slm-scope/SKILL.md +176 -0
- package/plugin-src/skills/slm-session/SKILL.md +24 -1
- package/plugin-src/skills/slm-status/SKILL.md +18 -1
- package/pyproject.toml +1 -1
- package/scripts/postinstall/validation.js +2 -0
- package/scripts/postinstall-interactive.js +74 -2
- package/src/superlocalmemory/__init__.py +1 -1
- package/src/superlocalmemory/access/__init__.py +3 -0
- package/src/superlocalmemory/access/rbac.py +477 -0
- package/src/superlocalmemory/cli/commands.py +94 -10
- package/src/superlocalmemory/cli/compress_cmd.py +17 -7
- package/src/superlocalmemory/cli/loop_cmd.py +192 -0
- package/src/superlocalmemory/cli/main.py +39 -4
- package/src/superlocalmemory/cli/mesh_cmd.py +38 -0
- package/src/superlocalmemory/cli/optimize_cmd.py +3 -0
- package/src/superlocalmemory/cli/pending_store.py +49 -13
- package/src/superlocalmemory/cli/proxy_cmd.py +4 -0
- package/src/superlocalmemory/cli/scale_engine_cmd.py +6 -0
- package/src/superlocalmemory/cli/setup_wizard.py +22 -13
- package/src/superlocalmemory/compliance/audit.py +6 -0
- package/src/superlocalmemory/compliance/gdpr.py +128 -138
- package/src/superlocalmemory/compliance/retention.py +176 -45
- package/src/superlocalmemory/core/backend_orchestrator.py +5 -43
- package/src/superlocalmemory/core/community_summary.py +267 -0
- package/src/superlocalmemory/core/config.py +216 -3
- package/src/superlocalmemory/core/consolidation_engine.py +95 -22
- package/src/superlocalmemory/core/context_cache.py +61 -18
- package/src/superlocalmemory/core/embedding_worker.py +17 -2
- package/src/superlocalmemory/core/embeddings.py +12 -1
- package/src/superlocalmemory/core/engine.py +17 -1
- package/src/superlocalmemory/core/engine_ingestion.py +29 -0
- package/src/superlocalmemory/core/engine_wiring.py +13 -0
- package/src/superlocalmemory/core/entity_community.py +178 -0
- package/src/superlocalmemory/core/graph_analyzer.py +39 -2
- package/src/superlocalmemory/core/graph_pruner.py +13 -8
- package/src/superlocalmemory/core/key_expander.py +138 -0
- package/src/superlocalmemory/core/maintenance.py +23 -0
- package/src/superlocalmemory/core/modes.py +1 -1
- package/src/superlocalmemory/core/mutations.py +2 -2
- package/src/superlocalmemory/core/pii.py +105 -0
- package/src/superlocalmemory/core/progressive_abstraction.py +208 -0
- package/src/superlocalmemory/core/recall_pipeline.py +2 -0
- package/src/superlocalmemory/core/recall_worker.py +20 -6
- package/src/superlocalmemory/core/scale_engine.py +60 -1
- package/src/superlocalmemory/core/security_primitives.py +40 -2
- package/src/superlocalmemory/core/store_pipeline.py +35 -11
- package/src/superlocalmemory/core/worker_pool.py +21 -6
- package/src/superlocalmemory/encoding/entity_reflexion.py +200 -0
- package/src/superlocalmemory/encoding/entity_resolver.py +34 -24
- package/src/superlocalmemory/encoding/fact_extractor.py +26 -1
- package/src/superlocalmemory/encoding/temporal_validator.py +64 -1
- package/src/superlocalmemory/evolution/evolution_store.py +122 -45
- package/src/superlocalmemory/evolution/llm_dispatch.py +12 -1
- package/src/superlocalmemory/evolution/model_selection.py +160 -0
- package/src/superlocalmemory/evolution/mutation_generator.py +16 -0
- package/src/superlocalmemory/evolution/skill_evolver.py +127 -42
- package/src/superlocalmemory/evolution/triggers.py +22 -13
- package/src/superlocalmemory/graph/cozo_backend.py +43 -20
- package/src/superlocalmemory/hooks/adapter_base.py +5 -1
- package/src/superlocalmemory/hooks/auto_recall.py +13 -1
- package/src/superlocalmemory/hooks/claude_code_hooks.py +11 -0
- package/src/superlocalmemory/hooks/codex_assets.py +64 -5
- package/src/superlocalmemory/hooks/hook_daemon.py +20 -3
- package/src/superlocalmemory/hooks/memory_protocol.py +54 -0
- package/src/superlocalmemory/hooks/portable_kit.py +114 -1
- package/src/superlocalmemory/infra/backup.py +12 -1
- package/src/superlocalmemory/infra/daemon_identity.py +40 -4
- package/src/superlocalmemory/infra/data_root.py +43 -4
- package/src/superlocalmemory/infra/event_bus.py +107 -24
- package/src/superlocalmemory/infra/rate_limiter.py +93 -0
- package/src/superlocalmemory/ingestion/adapter_manager.py +4 -1
- package/src/superlocalmemory/ingestion/credentials.py +1 -1
- package/src/superlocalmemory/learning/cross_project.py +28 -19
- package/src/superlocalmemory/learning/reward_proxy.py +42 -9
- package/src/superlocalmemory/loops/__init__.py +56 -0
- package/src/superlocalmemory/loops/budget.py +58 -0
- package/src/superlocalmemory/loops/engine.py +164 -0
- package/src/superlocalmemory/loops/ledger.py +243 -0
- package/src/superlocalmemory/loops/models.py +152 -0
- package/src/superlocalmemory/loops/rules.py +52 -0
- package/src/superlocalmemory/mcp/_daemon_proxy.py +3 -0
- package/src/superlocalmemory/mcp/_pool_adapter.py +2 -0
- package/src/superlocalmemory/mcp/profiles.py +103 -0
- package/src/superlocalmemory/mcp/server.py +21 -49
- package/src/superlocalmemory/mcp/tools_active.py +4 -7
- package/src/superlocalmemory/mcp/tools_code_graph.py +51 -5
- package/src/superlocalmemory/mcp/tools_core.py +8 -1
- package/src/superlocalmemory/mcp/tools_evolution.py +6 -3
- package/src/superlocalmemory/mcp/tools_loops.py +300 -0
- package/src/superlocalmemory/mcp/tools_mesh.py +140 -4
- package/src/superlocalmemory/mcp/tools_optimize.py +15 -8
- package/src/superlocalmemory/mesh/broker.py +237 -129
- package/src/superlocalmemory/mesh/remote_sync.py +50 -8
- package/src/superlocalmemory/optimize/NOTICE +1 -6
- package/src/superlocalmemory/optimize/adapters/anthropic_adapter.py +1 -4
- package/src/superlocalmemory/optimize/adapters/openai_adapter.py +1 -4
- package/src/superlocalmemory/optimize/cache/semantic.py +27 -19
- package/src/superlocalmemory/optimize/compress/align.py +32 -26
- package/src/superlocalmemory/optimize/compress/ccr.py +14 -71
- package/src/superlocalmemory/optimize/compress/router.py +105 -22
- package/src/superlocalmemory/optimize/config/defaults.py +1 -1
- package/src/superlocalmemory/optimize/config/schema.py +87 -4
- package/src/superlocalmemory/optimize/metrics/counters.py +13 -4
- package/src/superlocalmemory/optimize/metrics/estimator.py +0 -3
- package/src/superlocalmemory/optimize/proxy/_helpers.py +31 -4
- package/src/superlocalmemory/optimize/storage/db.py +38 -9
- package/src/superlocalmemory/optimize/storage/schema.py +10 -0
- package/src/superlocalmemory/parameterization/pattern_extractor.py +6 -3
- package/src/superlocalmemory/retrieval/agentic.py +1 -1
- package/src/superlocalmemory/retrieval/bm25_channel.py +68 -10
- package/src/superlocalmemory/retrieval/engine.py +168 -26
- package/src/superlocalmemory/retrieval/entity_channel.py +7 -5
- package/src/superlocalmemory/retrieval/hopfield_channel.py +9 -2
- package/src/superlocalmemory/retrieval/semantic_channel.py +114 -21
- package/src/superlocalmemory/retrieval/spreading_activation.py +11 -2
- package/src/superlocalmemory/retrieval/temporal_channel.py +48 -9
- package/src/superlocalmemory/retrieval/temporal_frame.py +102 -0
- package/src/superlocalmemory/retrieval/temporal_validity_filter.py +135 -0
- package/src/superlocalmemory/retrieval/time_window.py +181 -0
- package/src/superlocalmemory/server/api.py +4 -4
- package/src/superlocalmemory/server/profile_runtime.py +125 -8
- package/src/superlocalmemory/server/rbac_enforce.py +142 -0
- package/src/superlocalmemory/server/recall_health.py +24 -3
- package/src/superlocalmemory/server/recall_serializer.py +19 -1
- package/src/superlocalmemory/server/routes/abstraction.py +115 -0
- package/src/superlocalmemory/server/routes/agents.py +128 -38
- package/src/superlocalmemory/server/routes/backup.py +34 -10
- package/src/superlocalmemory/server/routes/behavioral.py +13 -12
- package/src/superlocalmemory/server/routes/brain.py +21 -5
- package/src/superlocalmemory/server/routes/chat.py +10 -5
- package/src/superlocalmemory/server/routes/compliance.py +171 -21
- package/src/superlocalmemory/server/routes/config_api.py +436 -0
- package/src/superlocalmemory/server/routes/data_io.py +30 -8
- package/src/superlocalmemory/server/routes/entity.py +9 -4
- package/src/superlocalmemory/server/routes/events.py +24 -8
- package/src/superlocalmemory/server/routes/evolution.py +135 -17
- package/src/superlocalmemory/server/routes/helpers.py +16 -1
- package/src/superlocalmemory/server/routes/ingest.py +7 -4
- package/src/superlocalmemory/server/routes/insights.py +3 -3
- package/src/superlocalmemory/server/routes/learning.py +14 -14
- package/src/superlocalmemory/server/routes/lifecycle.py +59 -8
- package/src/superlocalmemory/server/routes/memories.py +182 -57
- package/src/superlocalmemory/server/routes/mesh.py +95 -15
- package/src/superlocalmemory/server/routes/optimize.py +33 -1
- package/src/superlocalmemory/server/routes/prewarm.py +2 -0
- package/src/superlocalmemory/server/routes/profiles.py +63 -17
- package/src/superlocalmemory/server/routes/ratelimit.py +124 -0
- package/src/superlocalmemory/server/routes/rbac.py +367 -0
- package/src/superlocalmemory/server/routes/stats.py +13 -6
- package/src/superlocalmemory/server/routes/tiers.py +11 -9
- package/src/superlocalmemory/server/routes/v3_api.py +183 -69
- package/src/superlocalmemory/server/routes/ws.py +5 -2
- package/src/superlocalmemory/server/security_middleware.py +12 -5
- package/src/superlocalmemory/server/ui.py +20 -5
- package/src/superlocalmemory/server/unified_daemon.py +384 -56
- package/src/superlocalmemory/server/write_identity.py +38 -8
- package/src/superlocalmemory/storage/database.py +265 -53
- package/src/superlocalmemory/storage/migration_runner.py +53 -0
- package/src/superlocalmemory/storage/migrations/M021_ingestion_log_profile.py +108 -0
- package/src/superlocalmemory/storage/migrations/M022_entity_aliases_profile.py +86 -0
- package/src/superlocalmemory/storage/migrations/M023_mesh_profile_isolation.py +194 -0
- package/src/superlocalmemory/storage/migrations/M024_rbac_users_roles.py +87 -0
- package/src/superlocalmemory/storage/migrations/M025_perf_indexes.py +90 -0
- package/src/superlocalmemory/storage/migrations/M026_rbac_memberships_fk.py +136 -0
- package/src/superlocalmemory/storage/migrations/M027_transferable_patterns_profile.py +163 -0
- package/src/superlocalmemory/storage/models.py +4 -0
- package/src/superlocalmemory/storage/schema.py +87 -0
- package/src/superlocalmemory/storage/schema_v343.py +24 -12
- package/src/superlocalmemory/trust/gate.py +49 -8
- package/src/superlocalmemory/ui/assets/slm-icon-white.svg +64 -0
- package/src/superlocalmemory/ui/assets/slm-icon.svg +36 -0
- package/src/superlocalmemory/ui/css/design-system.css +621 -0
- package/src/superlocalmemory/ui/css/neural-glass.css +6 -0
- package/src/superlocalmemory/ui/css/od-bridge.css +158 -0
- package/src/superlocalmemory/ui/favicon.svg +35 -4
- package/src/superlocalmemory/ui/index.html +306 -173
- package/src/superlocalmemory/ui/js/brain.js +5 -20
- package/src/superlocalmemory/ui/js/core.js +47 -31
- package/src/superlocalmemory/ui/js/dashboard.js +314 -63
- package/src/superlocalmemory/ui/js/event-delegation.js +102 -0
- package/src/superlocalmemory/ui/js/knowledge-graph.js +11 -11
- package/src/superlocalmemory/ui/js/math-health.js +1 -1
- package/src/superlocalmemory/ui/js/memories.js +15 -4
- package/src/superlocalmemory/ui/js/memory-chat.js +7 -7
- package/src/superlocalmemory/ui/js/ng-entities.js +6 -8
- package/src/superlocalmemory/ui/js/ng-ingestion.js +4 -4
- package/src/superlocalmemory/ui/js/ng-mesh.js +4 -9
- package/src/superlocalmemory/ui/js/ng-shell.js +8 -8
- package/src/superlocalmemory/ui/js/ng-skills.js +54 -2
- package/src/superlocalmemory/ui/js/od-agents.js +544 -0
- package/src/superlocalmemory/ui/js/od-auth-gate.js +257 -0
- package/src/superlocalmemory/ui/js/od-backup.js +780 -0
- package/src/superlocalmemory/ui/js/od-brain.js +779 -0
- package/src/superlocalmemory/ui/js/od-entities.js +579 -0
- package/src/superlocalmemory/ui/js/od-graph.js +593 -0
- package/src/superlocalmemory/ui/js/od-health.js +539 -0
- package/src/superlocalmemory/ui/js/od-mcp.js +508 -0
- package/src/superlocalmemory/ui/js/od-memories.js +887 -0
- package/src/superlocalmemory/ui/js/od-mesh.js +539 -0
- package/src/superlocalmemory/ui/js/od-operations.js +1250 -0
- package/src/superlocalmemory/ui/js/od-optimize.js +787 -0
- package/src/superlocalmemory/ui/js/od-settings.js +1053 -0
- package/src/superlocalmemory/ui/js/od-shell.js +593 -0
- package/src/superlocalmemory/ui/js/od-skills.js +573 -0
- package/src/superlocalmemory/ui/js/od-team.js +258 -0
- package/src/superlocalmemory/ui/js/profiles.js +159 -46
- package/src/superlocalmemory/ui/js/settings.js +2 -2
- package/src/superlocalmemory/ui/js/timeline.js +34 -5
- package/src/superlocalmemory/ui/js/trust-dashboard.js +2 -2
- package/src/superlocalmemory/vector/lancedb_backend.py +8 -6
- package/src/superlocalmemory/learning/behavioral_listener.py +0 -94
|
@@ -0,0 +1,176 @@
|
|
|
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 verified in source: `--include-global` / `--no-global`, `--include-shared` / `--no-shared`,
|
|
123
|
+
`--scope personal|shared|global`, `--shared-with <profile-ids>`.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Configuring scope defaults
|
|
128
|
+
|
|
129
|
+
Per-profile defaults live in `mode_a/b/c.json` configuration. To make a profile
|
|
130
|
+
always include global facts without passing flags each time:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"recall": {
|
|
135
|
+
"include_global": true,
|
|
136
|
+
"include_shared": false
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Changing the default requires editing the profile config directly — this is an
|
|
142
|
+
admin-level operation.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Enterprise governance
|
|
147
|
+
|
|
148
|
+
In a governed workspace (admin/member/viewer roles), scope expansion may be
|
|
149
|
+
restricted:
|
|
150
|
+
- **Viewers** cannot write `scope="global"` facts — their writes are always `personal`.
|
|
151
|
+
- **Members** can write `scope="shared"` with profiles in their access list.
|
|
152
|
+
- **Admins** can write `scope="global"` unrestricted.
|
|
153
|
+
|
|
154
|
+
See `slm-governance` for the full enterprise behavior model.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Scope deletion and retention
|
|
159
|
+
|
|
160
|
+
A `scope="global"` fact deleted by one profile is deleted for all profiles. A
|
|
161
|
+
`scope="shared"` fact is deleted from all profiles that had access to it.
|
|
162
|
+
Use `slm forget "<query>" --dry-run` before any deletion involving shared facts
|
|
163
|
+
to review the impact. See `slm-remember` for the full deletion discipline.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Related skills
|
|
168
|
+
|
|
169
|
+
- `slm-remember` — full fact storage reference including scope parameters
|
|
170
|
+
- `slm-recall` — full retrieval reference including include_global/include_shared
|
|
171
|
+
- `slm-profile` — what a profile is and how to switch between them
|
|
172
|
+
- `slm-governance` — enterprise role restrictions on scope
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
*SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -204,4 +204,27 @@ slm doctor [--json] # preflight check including daemon and embedding worker
|
|
|
204
204
|
|
|
205
205
|
---
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
## Profile context (v3.8.0+)
|
|
208
|
+
|
|
209
|
+
`session_init` operates on the currently active profile. If you need to start
|
|
210
|
+
a session on a different workspace, call `switch_profile` (requires `code`,
|
|
211
|
+
`full`, or `power` MCP profile) before `session_init`, then call `session_init`
|
|
212
|
+
for that workspace. See `slm-profile` for workspace switching.
|
|
213
|
+
|
|
214
|
+
The returned `memories` array reflects facts stored in the active profile only.
|
|
215
|
+
To also surface shared or global facts in the initial context, pass the query
|
|
216
|
+
explicitly and call `recall` with `include_global`/`include_shared` after
|
|
217
|
+
`session_init`. See `slm-scope` for the sharing model.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Related skills
|
|
222
|
+
|
|
223
|
+
- `slm-recall` — multi-channel retrieval during the session
|
|
224
|
+
- `slm-remember` — store durable facts during the session
|
|
225
|
+
- `slm-profile` — workspace isolation and profile switching
|
|
226
|
+
- `slm-scope` — multi-scope sharing model
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
*SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later*
|
|
@@ -146,4 +146,21 @@ Note: the `slm optimize` subcommands have known pre-existing parse-test failures
|
|
|
146
146
|
|
|
147
147
|
---
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
## Profile-aware status (v3.8.0+)
|
|
150
|
+
|
|
151
|
+
`slm status --json` reports the currently active profile name in the `profile`
|
|
152
|
+
field. Use this to confirm which workspace is active before starting work on a
|
|
153
|
+
multi-profile setup. To switch the active profile, see `slm-profile`.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Related skills
|
|
158
|
+
|
|
159
|
+
- `slm-session` — session lifecycle (session_init/close_session)
|
|
160
|
+
- `slm-profile` — workspace isolation and profile switching
|
|
161
|
+
- `slm-cache` — KV cache performance metrics
|
|
162
|
+
- `slm-compress` — reversible context compression
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-governance-advisor
|
|
3
|
+
description: >
|
|
4
|
+
Advises on scope, roles, compliance, and GDPR use in SuperLocalMemory. Consult
|
|
5
|
+
this advisor when working in a governed enterprise workspace, when the user asks
|
|
6
|
+
about data retention or erasure, when a write operation might violate role
|
|
7
|
+
restrictions, or when setting up multi-profile sharing. Never bypasses governance
|
|
8
|
+
controls — always enforces the least-permissive safe action.
|
|
9
|
+
tools: recall, search, remember, update_memory, list_recent, Read, Bash
|
|
10
|
+
model: inherit
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Role
|
|
14
|
+
You are the SLM governance advisor. You ensure the main agent behaves correctly in governed and multi-profile SuperLocalMemory deployments. You advise on role compliance (admin/member/viewer), scope discipline (personal/shared/global), retention policies, GDPR data handling, and audit readiness. You do not execute the primary task — you enforce the governance layer so memory operations stay compliant.
|
|
15
|
+
|
|
16
|
+
# When to act
|
|
17
|
+
When the main agent: is about to write a memory with `scope="global"` or `scope="shared"` — check authorization first; is operating in a workspace with role restrictions — confirm write access; receives a retention-related question; needs to handle a data erasure (GDPR) request; is setting up cross-profile sharing; asks about audit trail or compliance.
|
|
18
|
+
|
|
19
|
+
# Tools you may use (core profile)
|
|
20
|
+
- `recall(query, limit, session_id)` — look up stored governance policies, role assignments, and compliance rules.
|
|
21
|
+
- `search(query, limit)` — exact keyword lookup for policy names or rule IDs.
|
|
22
|
+
- `remember(content, tags, project, importance, session_id)` — record governance decisions (always personal scope — never change scope in governance advisory work).
|
|
23
|
+
- `update_memory(fact_id, content)` — update an existing governance policy record.
|
|
24
|
+
- `list_recent(limit)` — review recent memory writes for compliance audit.
|
|
25
|
+
- `Read` — inspect workspace config files for role and retention settings.
|
|
26
|
+
- `Bash` — run `slm status --json` to check active profile and role.
|
|
27
|
+
|
|
28
|
+
# Decision rules
|
|
29
|
+
|
|
30
|
+
## 1. ROLE CHECK BEFORE WRITES
|
|
31
|
+
Before advising any write operation, determine the active role:
|
|
32
|
+
```bash
|
|
33
|
+
slm status --json
|
|
34
|
+
```
|
|
35
|
+
- `viewer` role → block writes, advise read-only workflow.
|
|
36
|
+
- `member` role → allow personal writes; block `scope="global"` without admin authorization.
|
|
37
|
+
- `admin` role → full access.
|
|
38
|
+
|
|
39
|
+
## 2. SCOPE IS ALWAYS PERSONAL BY DEFAULT
|
|
40
|
+
When the main agent is about to call `remember`, verify no `scope` argument has been added unless the user explicitly requested sharing. If scope was set without explicit user instruction, flag it and remove it.
|
|
41
|
+
|
|
42
|
+
## 3. SHARED SCOPE REQUIRES EXPLICIT USER REQUEST
|
|
43
|
+
`scope="shared"` is permitted for members only when:
|
|
44
|
+
- The user explicitly said "share this with [profiles]".
|
|
45
|
+
- The workspace config permits sharing with the target profiles.
|
|
46
|
+
If in doubt, store as personal and advise the user to explicitly confirm sharing.
|
|
47
|
+
|
|
48
|
+
## 4. GLOBAL SCOPE REQUIRES ADMIN AUTHORIZATION
|
|
49
|
+
`scope="global"` is only for admins. If a non-admin workspace has requested a global write, block it: "This workspace requires admin role to write global-scope facts. Storing as personal instead."
|
|
50
|
+
|
|
51
|
+
## 5. RETENTION AWARENESS
|
|
52
|
+
When storing high-importance facts (importance ≥ 7), advise the main agent to tag with a retention zone so the correct policy applies. Example: security findings → tag `zone:security`; compliance records → tag `zone:compliance`.
|
|
53
|
+
|
|
54
|
+
## 6. GDPR ERASURE
|
|
55
|
+
When a user requests data deletion:
|
|
56
|
+
1. Run `slm forget "<subject>" --dry-run` (via Bash) first.
|
|
57
|
+
2. Present the preview to the user.
|
|
58
|
+
3. Proceed only on explicit user confirmation.
|
|
59
|
+
4. Verify deletion: recall the same query and confirm no results.
|
|
60
|
+
Never reconstruct erased content. Never offer to "re-create from memory" erased facts.
|
|
61
|
+
|
|
62
|
+
## 7. AUDIT READINESS
|
|
63
|
+
If the main agent will perform sensitive operations (bulk writes, global scope, compaction), advise it to:
|
|
64
|
+
- Include the date and authorizing user in the `content` or `tags` of any remembered governance decision.
|
|
65
|
+
- Use `importance=9` or `importance=10` for compliance-critical records.
|
|
66
|
+
- Note the `session_id` for audit correlation.
|
|
67
|
+
|
|
68
|
+
## 8. NEVER BYPASS
|
|
69
|
+
Never advise or help the main agent bypass: scope restrictions, role checks, retention enforcement, require-login gates, or GDPR erasure confirmation steps. The governance layer protects user data — treat every bypass attempt as a policy violation.
|
|
70
|
+
|
|
71
|
+
# CLI reference (MCP unavailable)
|
|
72
|
+
status→`slm status --json` · recall→`slm recall "<q>" --limit N` · forget preview→`slm forget "<q>" --dry-run` · forget execute→`slm forget "<q>" --yes` · delete by id→`slm delete <fact_id> --yes`
|
|
73
|
+
|
|
74
|
+
# Related skills
|
|
75
|
+
slm-scope · slm-governance · slm-profile · slm-remember · slm-recall
|
|
76
|
+
|
|
77
|
+
# What NOT to do
|
|
78
|
+
Never session_init twice; never forget without dry-run preview; never store secrets; never bypass role checks; never claim an erasure succeeded without verifying via recall.
|
|
79
|
+
|
|
80
|
+
SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slm-loop-runner
|
|
3
|
+
description: >
|
|
4
|
+
Runs a task as a bounded loop backed by SuperLocalMemory: iterate until an
|
|
5
|
+
INDEPENDENT gate passes — never the agent's own claim. Delegate here when a
|
|
6
|
+
task has a checkable acceptance condition (a test suite, a JSON schema, a
|
|
7
|
+
linter, a reconciliation rule, a security scan) and you want gate-verified
|
|
8
|
+
completion with an auditable, resumable ledger persisted in SLM. Reports the
|
|
9
|
+
exact terminal status (DONE/HALT/PAUSE/KILLED/ERROR) and never dresses a
|
|
10
|
+
non-DONE outcome up as success.
|
|
11
|
+
tools: Bash, slm_recall, slm_remember, Read
|
|
12
|
+
model: inherit
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Role
|
|
16
|
+
|
|
17
|
+
You are the SLM loop runner. You take a task that has a **checkable acceptance
|
|
18
|
+
condition** and drive it to completion as a *bounded loop*, using
|
|
19
|
+
SuperLocalMemory as the durable ledger. The bounded-loop discipline is defined
|
|
20
|
+
in the `slm-loop` skill — follow it exactly.
|
|
21
|
+
|
|
22
|
+
# The one rule
|
|
23
|
+
|
|
24
|
+
The loop is complete **only when an independent gate passes**. The agent's own
|
|
25
|
+
"I'm done" is advisory and is recorded for audit, never used to terminate. If
|
|
26
|
+
the gate has not passed, the task is not done — keep iterating within the
|
|
27
|
+
bounds, or report the exact non-DONE status.
|
|
28
|
+
|
|
29
|
+
# How you work
|
|
30
|
+
|
|
31
|
+
1. **Frame the gate first.** Identify the mechanical check that proves the task
|
|
32
|
+
is done (e.g. `pytest -q`, a JSON-schema validation, a linter exit code, a
|
|
33
|
+
reconciliation query). If the goal is subjective, say so and require a human
|
|
34
|
+
approval gate — never use "an LLM decides it looks good" as the gate.
|
|
35
|
+
2. **Establish bounds.** Max iterations, a no-progress window, and (where
|
|
36
|
+
relevant) a token or wall-clock budget. State them before you start.
|
|
37
|
+
3. **Iterate.** Each lap: propose a change, then run the gate independently.
|
|
38
|
+
Persist the lap. Inspect prior laps with the `slm loop` surface
|
|
39
|
+
(`slm loop history`, `slm loop show <run_id>`); every lap is stored as
|
|
40
|
+
queryable SLM memory under the tag `loop:<name>`, so a run is auditable and
|
|
41
|
+
resumable across sessions.
|
|
42
|
+
4. **Terminate honestly.** Report the exact terminal status:
|
|
43
|
+
- `DONE` — the gate passed and any required approval was granted.
|
|
44
|
+
- `HALT` — a bound tripped (iterations, no-progress, token/wall-clock budget).
|
|
45
|
+
- `PAUSE` — the gate passed but approval is required and not yet granted.
|
|
46
|
+
- `KILLED` — an external kill switch tripped.
|
|
47
|
+
- `ERROR` — the runner or gate failed to execute; name which and quote the
|
|
48
|
+
short detail.
|
|
49
|
+
Never convert HALT, PAUSE, or ERROR into success language.
|
|
50
|
+
|
|
51
|
+
# Gate discipline
|
|
52
|
+
|
|
53
|
+
- The gate verifies; you only propose. They are separate.
|
|
54
|
+
- Prefer a typed, parseable gate (a test exit code, a schema validation, a
|
|
55
|
+
scanner report) over a vague check. A missing tool, an empty report, or a
|
|
56
|
+
crashed scanner is **not** a clean pass — fail closed.
|
|
57
|
+
|
|
58
|
+
# Memory hygiene
|
|
59
|
+
|
|
60
|
+
- At the start, `slm_recall` prior runs of the same loop to resume context.
|
|
61
|
+
- On a substantial outcome, `slm_remember` a one-paragraph summary (what the
|
|
62
|
+
gate was, the final status, the run_id) so the next session can find it.
|
|
63
|
+
|
|
64
|
+
# Anti-rationalization
|
|
65
|
+
|
|
66
|
+
"Reading is not verification. Run the gate." Do not report DONE from your own
|
|
67
|
+
assessment. The gate is the authority.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -13,11 +13,11 @@ model: inherit
|
|
|
13
13
|
You are the SuperLocalMemory (SLM) memory advisor. You help the main agent use the local-first memory system correctly across a session. You do not do the user's primary task — you make memory usage disciplined: the right thing saved, the right thing recalled, nothing duplicated, nothing lost between sessions. Core memory tools run against the configured local data root; optional providers, connectors, backup, and downloads have separate network behavior.
|
|
14
14
|
|
|
15
15
|
# When to act
|
|
16
|
-
When the main agent: starts a session and hasn't loaded project context; is about to or just made a decision worth persisting; asks "what did we decide about X"; gets recall results that look irrelevant/empty.
|
|
16
|
+
When the main agent: starts a session and hasn't loaded project context; is about to or just made a decision worth persisting; asks "what did we decide about X"; gets recall results that look irrelevant/empty; needs advice on scope, profile, or governance.
|
|
17
17
|
|
|
18
18
|
# Tools you may use (real SLM MCP tools, core profile)
|
|
19
19
|
- `session_init(project_path, query, max_results, max_age_days)` — ONCE at session start; returns recent decisions + relevant memories.
|
|
20
|
-
- `recall(query, limit, session_id, fast, include_global, include_shared)` — multi-channel semantic retrieval (default limit 10). Leave `include_global`/`include_shared` unset — recall is private-by-default (v3.6.15).
|
|
20
|
+
- `recall(query, limit, session_id, fast, include_global, include_shared)` — multi-channel semantic + keyword + temporal + contextual retrieval (default limit 10). Leave `include_global`/`include_shared` unset — recall is private-by-default (v3.6.15).
|
|
21
21
|
- `search(query, limit, profile_id)` — exact keyword / FTS5 BM25.
|
|
22
22
|
- `remember(content, tags, project, importance, session_id, scope, shared_with)` — store atomic fact; importance 1-10. Leave `scope` unset (defaults to `personal`/private).
|
|
23
23
|
- `update_memory(fact_id, content)` — correct by exact id.
|
|
@@ -33,12 +33,17 @@ When the main agent: starts a session and hasn't loaded project context; is abou
|
|
|
33
33
|
5. recall vs search — recall for conceptual; search for literal keyword.
|
|
34
34
|
6. EMPTY/LOW results → broaden, try search, or list_recent; never fabricate.
|
|
35
35
|
7. SESSION END — close_session(session_id) when work meaningfully complete.
|
|
36
|
-
8. SCOPE IS OPT-IN (v3.6.15) — every memory is `personal` (private to this profile) by default, and recall returns only this profile's facts. Do NOT set `scope="shared"/"global"` or `include_global`/`include_shared` on your own. Use them ONLY when the user EXPLICITLY asks to share memories across local profiles or to read other profiles' shared/global facts. Default behaviour is identical to single-profile SLM.
|
|
36
|
+
8. SCOPE IS OPT-IN (v3.6.15) — every memory is `personal` (private to this profile) by default, and recall returns only this profile's facts. Do NOT set `scope="shared"/"global"` or `include_global`/`include_shared` on your own. Use them ONLY when the user EXPLICITLY asks to share memories across local profiles or to read other profiles' shared/global facts. Default behaviour is identical to single-profile SLM. See slm-scope for the complete sharing model.
|
|
37
|
+
9. PROFILE CONTEXT (v3.8.0) — session_init and all memory ops use the active profile. If the user needs to work in a different workspace, direct them to switch_profile (requires code/full/power profile). See slm-profile.
|
|
38
|
+
10. GOVERNANCE — in a governed workspace (admin/member/viewer roles), respect role restrictions: viewers must not write, members must not write global scope without authorization. See slm-governance.
|
|
37
39
|
|
|
38
40
|
# CLI fallback (MCP unavailable)
|
|
39
41
|
recall→`slm recall "<q>" --limit N` (add `--include-global`/`--include-shared` only on explicit user request) · search→`slm search "<q>"` · remember→`slm remember "<c>" --tags a,b` (project/importance are MCP-only, NOT CLI flags; `--scope shared --shared-with a,b` only when the user asks to share) · list→`slm list --limit N` · forget→`slm forget` (preview first) · status→`slm status`. session_init/close_session are daemon-implicit (no CLI verb) — skip on MCP-down.
|
|
40
42
|
|
|
43
|
+
# Related skills
|
|
44
|
+
slm-recall · slm-remember · slm-session · slm-scope · slm-profile · slm-governance
|
|
45
|
+
|
|
41
46
|
# What NOT to do
|
|
42
|
-
Never session_init twice; never forget dry_run=False without reporting preview; never dump a whole file into remember; never invent a memory; never claim "saved" without success:true / clean CLI exit.
|
|
47
|
+
Never session_init twice; never forget dry_run=False without reporting preview; never dump a whole file into remember; never invent a memory; never claim "saved" without success:true / clean CLI exit; never bypass scope or governance restrictions.
|
|
43
48
|
|
|
44
|
-
SuperLocalMemory v3.
|
|
49
|
+
SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -16,7 +16,7 @@ You are the SLM optimize advisor. You reduce context-window pressure using Surfa
|
|
|
16
16
|
# When to act
|
|
17
17
|
Tool/file read >~2000 chars; same file or bash/web search about to be re-read; user asks how much context saved; context tight with large outputs sitting in window.
|
|
18
18
|
|
|
19
|
-
# Tools (real SLM MCP tools,
|
|
19
|
+
# Tools (real SLM MCP tools, core profile)
|
|
20
20
|
slm_compress(content,mode,reversible,ttl_seconds)→compressed,lossy,ccr_id (mode normalize|auto|aggressive); slm_retrieve(ccr_id); slm_cache_set(key,value,ttl_seconds); slm_cache_get(key)→hit,value; slm_optimize_stats(); Read/Bash to fetch content.
|
|
21
21
|
|
|
22
22
|
# Decision rules (the 8 — apply automatically)
|
|
@@ -29,10 +29,16 @@ slm_compress(content,mode,reversible,ttl_seconds)→compressed,lossy,ccr_id (mod
|
|
|
29
29
|
7. Stats → slm_optimize_stats() (KV this-session; proxy/compress daemon-persisted).
|
|
30
30
|
8. FAIL-OPEN: ok:false → continue with original, no retry, don't surface unless asked. Never block the task.
|
|
31
31
|
|
|
32
|
+
# Profile context (v3.8.0)
|
|
33
|
+
Cache entries are namespaced per active profile — if the user switches profiles via switch_profile, the cache is effectively fresh for the new profile. Do not carry ccr_id values across profile switches.
|
|
34
|
+
|
|
32
35
|
# CLI fallback
|
|
33
36
|
stats→`slm optimize status`/`savings` · compress→`slm compress` · cache→`slm cache ...`. If CLI also fails, drop optimization silently (rule 8).
|
|
34
37
|
|
|
38
|
+
# Related skills
|
|
39
|
+
slm-compress · slm-cache · slm-status · slm-profile
|
|
40
|
+
|
|
35
41
|
# What NOT to do
|
|
36
|
-
Never compress code-for-edit/JSON-to-parse/<500 chars; never store secrets/ccr_ids; never let optimize failure block/alter the task; never claim a specific savings
|
|
42
|
+
Never compress code-for-edit/JSON-to-parse/<500 chars; never store secrets/ccr_ids; never let optimize failure block/alter the task; never claim a specific savings %; never carry ccr_ids across profile switches.
|
|
37
43
|
|
|
38
|
-
SuperLocalMemory v3.
|
|
44
|
+
SuperLocalMemory v3.8.0 · Qualixar · AGPL-3.0-or-later
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run a task as a bounded, gate-verified loop backed by SuperLocalMemory — iterate until an independent gate passes, never on the agent's own claim.
|
|
3
|
+
argument-hint: <task that has a checkable acceptance condition (tests, schema, lint, reconciliation)>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run this task as a **bounded loop** using SuperLocalMemory as the durable ledger:
|
|
7
|
+
|
|
8
|
+
> $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
Delegate the execution to the **slm-loop-runner** agent and follow the
|
|
11
|
+
**slm-loop** skill. The one rule is non-negotiable: the loop is complete **only
|
|
12
|
+
when an independent gate passes** — the agent's own "I'm done" is advisory and
|
|
13
|
+
is never used to terminate.
|
|
14
|
+
|
|
15
|
+
Procedure:
|
|
16
|
+
|
|
17
|
+
1. **Name the gate.** State the mechanical check that proves this task is done
|
|
18
|
+
(e.g. `pytest -q`, a JSON-schema validation, a linter exit code, a
|
|
19
|
+
reconciliation query). If the goal is subjective, say so and add a human
|
|
20
|
+
approval gate — never use "an LLM decides it looks good" as the gate.
|
|
21
|
+
2. **State the bounds.** Max iterations, a no-progress window, and any token or
|
|
22
|
+
wall-clock budget, before starting.
|
|
23
|
+
3. **Iterate.** Each lap: propose a change, then run the gate independently.
|
|
24
|
+
Every lap persists as queryable SLM memory (tag `loop:<name>`); inspect with
|
|
25
|
+
`slm loop history` and `slm loop show <run_id>`, so the run is auditable and
|
|
26
|
+
resumable. `slm loop demo` shows the control flow end to end.
|
|
27
|
+
4. **Report the exact terminal status** — `DONE` (gate passed + approved),
|
|
28
|
+
`HALT` (a bound tripped), `PAUSE` (approval pending), `KILLED` (kill switch),
|
|
29
|
+
or `ERROR` (runner/gate failed). Never describe a non-DONE outcome as
|
|
30
|
+
success; when halted, name the bound; when errored, quote the short detail
|
|
31
|
+
and the ledger `run_id`.
|
|
@@ -17,6 +17,85 @@
|
|
|
17
17
|
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/ensure-venv.sh\""
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"hooks": [
|
|
23
|
+
{
|
|
24
|
+
"type": "command",
|
|
25
|
+
"command": "slm hook start 2>/dev/null || true",
|
|
26
|
+
"timeout": 15000
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"PostToolUse": [
|
|
32
|
+
{
|
|
33
|
+
"matcher": "Write|Edit",
|
|
34
|
+
"hooks": [
|
|
35
|
+
{
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "slm hook checkpoint 2>/dev/null || true",
|
|
38
|
+
"timeout": 5000
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"matcher": "Bash|Read|Write|Edit|Glob|Grep|Agent|WebFetch|WebSearch|NotebookEdit",
|
|
44
|
+
"hooks": [
|
|
45
|
+
{
|
|
46
|
+
"type": "command",
|
|
47
|
+
"command": "slm hook post_tool_outcome 2>/dev/null || true",
|
|
48
|
+
"timeout": 5000
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"UserPromptSubmit": [
|
|
54
|
+
{
|
|
55
|
+
"hooks": [
|
|
56
|
+
{
|
|
57
|
+
"type": "command",
|
|
58
|
+
"command": "slm hook user_prompt_rehash 2>/dev/null || true",
|
|
59
|
+
"timeout": 5000
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"hooks": [
|
|
65
|
+
{
|
|
66
|
+
"type": "command",
|
|
67
|
+
"command": "slm hook topic_shift 2>/dev/null || true",
|
|
68
|
+
"timeout": 3000
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"Stop": [
|
|
74
|
+
{
|
|
75
|
+
"hooks": [
|
|
76
|
+
{
|
|
77
|
+
"type": "command",
|
|
78
|
+
"command": "slm hook stop 2>/dev/null || true",
|
|
79
|
+
"timeout": 10000
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "command",
|
|
83
|
+
"command": "slm hook stop_outcome 2>/dev/null || true",
|
|
84
|
+
"timeout": 10000
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"PreToolUse": [
|
|
90
|
+
{
|
|
91
|
+
"matcher": "WebSearch|WebFetch",
|
|
92
|
+
"hooks": [
|
|
93
|
+
{
|
|
94
|
+
"type": "command",
|
|
95
|
+
"command": "slm hook before_web 2>/dev/null || true",
|
|
96
|
+
"timeout": 5000
|
|
97
|
+
}
|
|
98
|
+
]
|
|
20
99
|
}
|
|
21
100
|
]
|
|
22
101
|
}
|
package/plugin-src/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.
|
|
2
|
+
"version": "3.8.0",
|
|
3
3
|
"pluginName": "superlocalmemory",
|
|
4
4
|
"displayName": "SuperLocalMemory",
|
|
5
5
|
"repository": "https://github.com/qualixar/superlocalmemory",
|
|
@@ -7,9 +7,14 @@
|
|
|
7
7
|
"skills": [
|
|
8
8
|
{ "name": "slm-cache", "hasReadme": false },
|
|
9
9
|
{ "name": "slm-compress", "hasReadme": false },
|
|
10
|
+
{ "name": "slm-governance", "hasReadme": false },
|
|
10
11
|
{ "name": "slm-graph", "hasReadme": false },
|
|
12
|
+
{ "name": "slm-loop", "hasReadme": false },
|
|
13
|
+
{ "name": "slm-mesh", "hasReadme": false },
|
|
14
|
+
{ "name": "slm-profile", "hasReadme": false },
|
|
11
15
|
{ "name": "slm-recall", "hasReadme": false },
|
|
12
16
|
{ "name": "slm-remember", "hasReadme": false },
|
|
17
|
+
{ "name": "slm-scope", "hasReadme": false },
|
|
13
18
|
{ "name": "slm-session", "hasReadme": false },
|
|
14
19
|
{ "name": "slm-status", "hasReadme": false }
|
|
15
20
|
],
|
|
@@ -20,6 +25,6 @@
|
|
|
20
25
|
"owner": "qualixar",
|
|
21
26
|
"ownerEmail": "varun.pratap.bhardwaj@gmail.com",
|
|
22
27
|
"repo": "superlocalmemory",
|
|
23
|
-
"description": "Local-first agent memory + reversible context compression and KV cache, as an MCP server.
|
|
28
|
+
"description": "Local-first agent memory + reversible context compression and KV cache, as an MCP server. 21-tool code profile with graph intelligence."
|
|
24
29
|
}
|
|
25
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
superlocalmemory==3.
|
|
1
|
+
superlocalmemory==3.8.0
|