@skedulo/memory-hub-mcp 0.2.17 → 0.2.19

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/skill-guide.md CHANGED
@@ -1,7 +1,12 @@
1
- # SE AI Memory Hub — usage guide
1
+ # Memory Hub — usage guide
2
2
 
3
3
  _Served live by memory_getSkillGuide — this is the single source of truth, edited here directly. Never hand-copy this content elsewhere._
4
4
 
5
+ **Core principle: knowledge keeps itself current.** Knowledge in the hub keeps itself current and
6
+ corrects itself — on use, on save, on merge, at session start and in a weekly sweep — so nobody has
7
+ to rerun or revalidate it. Every skill and tool keeps to this, and so do you: when you use an item
8
+ that is out of date, follow "Stale memories" below.
9
+
5
10
  If the session-start hook (see `memory-hub-hook/`) is registered, it already
6
11
  injected your own and your team's recent facts and skills as context. This
7
12
  skill covers what to do *during* the session, beyond that automatic
@@ -108,9 +113,8 @@ list is prose, kept in sync by hand.
108
113
  item ended up — `visibility`, `repoId`, `repoName` and `teamName` — read from
109
114
  the saved record. Check them instead of assuming the default applied. `repo`
110
115
  on a save takes a uid from `memory_listRepos` or an `owner/name` of a repo
111
- already linked to a team. `visibility` (`Private`, `Team` or `Org`) overrides
112
- the default, but only pass it when the human approved sharing that item or
113
- batch in this conversation — see "Sharing" below.
116
+ already linked to a team. Choose `visibility` (`Private`, `Team` or `Org`)
117
+ on every save yourself, by the rule in "What to share" below.
114
118
 
115
119
  **Wiki pages can depend on each other** — pass `links` (an array of other
116
120
  wiki page UIDs) on a `type: 'Wiki'` save to connect a page to the ones it
@@ -139,10 +143,11 @@ content is truncated at a fixed character budget on recall, so a 40-page
139
143
  conversion pasted whole defeats the point — pull out what's actually
140
144
  standing-reference-worthy, the same judgment call as any other wiki save.
141
145
 
142
- New personas are always written `Private`. `memory_save` writes `Private`
143
- too, unless the attached repo is already linked to a team, in which case it
144
- writes `Team` — see "Repo-scoped saves default to Team automatically"
145
- below.
146
+ New personas are always written `Private`. A `memory_save` without
147
+ `visibility` writes `Private` too, unless the attached repo is already linked
148
+ to a team, in which case it writes `Team` — see "Repo-scoped saves default to
149
+ Team automatically" below. Don't lean on that default: decide by "What to
150
+ share".
146
151
  Skip saving anything that's already obvious from the code, or that only
147
152
  mattered to this one conversation.
148
153
 
@@ -164,6 +169,63 @@ stopping point, save what's already distilled now — compaction summarizes
164
169
  lossily, and a fact that only exists in your reasoning does not survive
165
170
  it. A save that happens is worth more than a better-timed one that doesn't.
166
171
 
172
+ ## What to share
173
+
174
+ Every save gets a deliberate visibility decision, and your reply states the
175
+ choice and the reason ("Saved as Team on acme/delivery: a fix for the
176
+ project's sync job."). You make this choice yourself; nobody has to approve it.
177
+
178
+ - **Team** for work knowledge about a project or customer: decisions, fixes,
179
+ root causes, how-tos, gotchas, project and customer behaviour, conventions.
180
+ Save it on the project's repo by name, `repo: "<owner/name>"`, even from
181
+ Claude Desktop or a folder that is not that repo, passing only a repo that
182
+ `memory_listRepos` lists. A repo on a team you are not on is refused, never
183
+ joined: ask the person whether to join that team, or save it `Private` and
184
+ say why. **Never guess a repo name.** When `memory_listRepos` does not show
185
+ the project's repo, or shows several candidates, ask which repo, or save it
186
+ `Private` and say why. Team with no repo, and Team on a repo no team owns
187
+ yet, are refused: save it `Private` and say so and why.
188
+ - **Org**, without asking, for knowledge about Skedulo's own platform,
189
+ products, tools or practices that is useful company-wide and contains no
190
+ customer names, customer data or project detail, no commercial terms, no
191
+ credentials or unpatched security detail, and nothing about a person.
192
+ Anything customer- or project-specific is Team.
193
+ - **Private only with a stated reason**, said in the reply: a personal
194
+ preference or a note about yourself; an unverified guess; anything about a
195
+ person (performance, HR, opinions); anything the confidentiality rules forbid
196
+ sharing (credentials, customer personal data, commercial terms, raw SOW or
197
+ Slack text). Better still, keep secrets and raw SOW or Slack text out of the
198
+ hub entirely.
199
+ - **Unsure between Org and Team: Team.**
200
+
201
+ Auto-capture is the exception: its saves are `Private` (see "Automatic
202
+ capture" below).
203
+
204
+ This covers what you save, including an item you saved earlier in this
205
+ conversation. Changing the visibility of any other existing item is still the
206
+ person's call: see "Sharing tools" below.
207
+
208
+ **"share them".** The session-start Reminder may say "`<n>` of your private
209
+ notes on team repos look shareable; say "share them" to review and share."
210
+ When the person says "share them":
211
+
212
+ 1. List the candidates: your own `Private` items on repos linked to a team
213
+ (`memory_list` with `mine: true`, `visibility: 'Private'`, for each type,
214
+ keeping items whose `teamName` is set; collect every page before changing
215
+ anything).
216
+ 2. Read each one (`memory_get` when it was cut short) and apply the rules
217
+ above: an item that is personal, an unverified guess, about a person, or
218
+ holds anything the confidentiality rules forbid sharing stays `Private`.
219
+ So does an item whose content is about a different customer or project
220
+ than its repo: sharing it would show one customer's note to another
221
+ project's team. Say it looks filed on the wrong repo; the person can move it
222
+ with `memory_moveResourceRepo`.
223
+ 3. Promote the rest to `Team` with `memory_setVisibility`, naming each uid
224
+ (`resourceIds`, one type per call). Never use the bulk promote here: it
225
+ promotes every candidate unread and re-promotes items the person
226
+ deliberately made Private.
227
+ 4. Report each uid you shared, and each that stayed `Private` and why.
228
+
167
229
  ## Automatic capture (when enabled)
168
230
 
169
231
  Nothing saves on its own unless the user has switched on auto-capture. It is
@@ -238,7 +300,9 @@ it is yours. When a match is yours and already covers the point, keep one copy:
238
300
  `memory_update` the old one with the merged text, then `memory_delete` the one
239
301
  you just saved. Editing a teammate's memory changes what the whole team reads, so
240
302
  do it only when the human asks for it; otherwise keep your new one only if it adds
241
- something theirs does not say. The check only warns, so a distinct
303
+ something theirs does not say. Fixing a stale or superseded item under "Stale
304
+ memories" is the exception: that is your job, and ask and the weekly sweep do it
305
+ too, so it needs no request. The check only warns, so a distinct
242
306
  memory that shares vocabulary with another is saved either way.
243
307
 
244
308
  Before saving a decision or root cause that you suspect was recorded before,
@@ -292,9 +356,8 @@ dependencies — no "blocks"/"blocked by," no notification when your work
292
356
  lands (that's Linear's job, not this system's). What it can hold is the
293
357
  thing a dependent teammate actually needs once the ticket-level dependency
294
358
  clears: what you built exposes, in `ArchitectureMap` shape — nodes/edges
295
- plus prose on what depends on what and what not to assume. Save it, then
296
- **ask the human whether to promote it to `Team`** (never do this
297
- unprompted — see "Sharing" below): a `Private` map is invisible to the
359
+ plus prose on what depends on what and what not to assume. Save it as
360
+ `Team` on that repo (see "What to share"): a `Private` map is invisible to the
298
361
  teammate blocked on it, which defeats the entire point of writing one.
299
362
 
300
363
  ## Repo-scoped saves default to Team automatically
@@ -327,7 +390,8 @@ Two consequences worth knowing:
327
390
  catch up there — they're correctly `Private`) or anyone else's items.
328
391
  **Mention this tool exists if you notice old repo-scoped Private items,
329
392
  but only run it when a human in the conversation explicitly asks you
330
- to** — same rule as the sharing tools below. Running it more than once
393
+ to** — same rule as the sharing tools below. "share them" never uses it:
394
+ that review promotes item by item (see "What to share"). Running it more than once
331
395
  will also re-promote anything demoted since the last run with
332
396
  `memory_setVisibility`, so treat repeat runs as a fresh explicit request
333
397
  too, not routine maintenance.
@@ -346,12 +410,12 @@ Two consequences worth knowing:
346
410
  guessing from the author's session. It only reads, so it needs no
347
411
  permission.
348
412
 
349
- ## Sharing — only on explicit human request
413
+ ## Sharing tools
350
414
 
351
415
  - **`memory_joinTeam`** — `teamName` of an existing team (never creates one).
352
416
  **`memory_addTeamMember`** — `teamName` you already belong to and `agent`
353
417
  (a uid or exact display name; idempotent). Both change who can read Team
354
- items, so call them only when a human explicitly asks, like sharing.
418
+ items, so call them only on a person's yes, never on your own judgment.
355
419
  Membership is symmetric: adding someone shares their own repo-less Team
356
420
  items with every member of the team, and theirs with them, so tell the
357
421
  person being added first.
@@ -368,10 +432,8 @@ Two consequences worth knowing:
368
432
 
369
433
  Visibility levels: `Private` is you only. `Team` is the team that owns the
370
434
  item's repo (or, for a repo-less item, every team you're in). `Org` is every
371
- agent in the tenant, whatever their team. Use `Team` for work notes that
372
- belong with one engagement; use `Org` only for knowledge that is useful
373
- across teams and safe for everyone in the tenant to read — a reusable skill, a
374
- platform gotcha, a standing reference. When in doubt, `Team`. `Restricted`
435
+ agent in the tenant, whatever their team. Which one a save gets is the "What
436
+ to share" rule above; when in doubt, `Team`. `Restricted`
375
437
  needs a named person, so only `memory_grantAccess` sets it, never a save.
376
438
 
377
439
  **Never put secrets, credentials, customer personal data, or details of an
@@ -380,14 +442,18 @@ by the memory-hub function, not by the platform: the underlying records are
380
442
  not locked down by a platform access policy, so anyone with data access to the
381
443
  tenant can read them. Keep anything that sensitive out of memory entirely.
382
444
 
383
- **Call these tools only when a human explicitly asks, in the current
384
- conversation, to share, promote, un-share, or demote something** — e.g.
385
- "share that fact with the team," "make these Org-visible," "give Alice access
386
- to this skill," or "actually make that one private again." Never call them
387
- autonomously based on your own judgment that something seems worth sharing
388
- (or un-sharing); that judgment belongs to the person who owns the item, not to
389
- you. This rule applies the same way in both directions — a demote is not a
390
- safer default action just because it narrows visibility.
445
+ **Choosing the visibility of what you save is your job** (pass `visibility`
446
+ on the save, or `memory_setVisibility` on an item you saved in this
447
+ conversation), by "What to share". **For any other existing item, change
448
+ visibility only when a human asks, in the current conversation, to share,
449
+ promote, un-share, or demote something** — e.g. "share them," "share that fact
450
+ with the team," "make these Org-visible," "give Alice access to this skill,"
451
+ or "actually make that one private again." Never change other items on your
452
+ own judgment that they seem worth sharing (or un-sharing); that judgment
453
+ belongs to the person who owns them. This rule applies the same way in both
454
+ directions — a demote is not a safer default action just because it narrows
455
+ visibility. `memory_joinTeam` and `memory_addTeamMember` always need a
456
+ person's yes.
391
457
 
392
458
  **Bulk tools.** Each batch reports a result or error per item and never stops
393
459
  on one bad item.
@@ -415,16 +481,17 @@ shift later pages, so don't change anything while paging. Show the human the
415
481
  whole set and wait for them to approve exactly that set. Then call
416
482
  `memory_setVisibility` with `resourceIds` in chunks of 100 (or re-list from
417
483
  offset 0 after each change). Listing never authorises sharing; the
418
- explicit-request rule above still applies.
419
-
420
- **Sharing a batch.** When the human approves sharing a named batch once ("save
421
- these and make them Org-visible", "share everything from this session with the
422
- team"), that one approval covers the whole batch, so don't ask again per item.
423
- Either pass `visibility` on each `memory_save` (or `memory_saveBatch` item),
424
- or save first and then call `memory_setVisibility` with `resourceIds`. A subagent may do this only for the
425
- batch the human approved in this conversation, and never for anything it saved
426
- on its own initiative. Capture mode refuses any save that carries `visibility`,
427
- so a batch share must be done in the live conversation. The allow rules are
484
+ explicit-request rule above still applies. "share them" follows its own steps
485
+ in "What to share".
486
+
487
+ **Sharing a batch of existing items.** When the human approves sharing a
488
+ named batch once ("share them", "share everything from this session with the
489
+ team"), that one approval covers the whole batch, so don't ask again per item:
490
+ call `memory_setVisibility` with `resourceIds`. A subagent may promote existing
491
+ items only for the batch the human approved in this conversation; what it
492
+ saves itself gets its visibility from "What to share". Capture mode refuses any
493
+ save that carries `visibility`, so a batch share must be done in the live
494
+ conversation. The allow rules are
428
495
  `mcp__plugin_memory-hub_memory-hub__memory_setVisibility` and
429
496
  `mcp__plugin_memory-hub_memory-hub__memory_moveResourceRepo` (plugin), or
430
497
  `mcp__memory-hub__memory_setVisibility` and
@@ -456,6 +523,58 @@ refreshing, re-read the repo, then `memory_update` it with the corrected text
456
523
  `memory_list` with `sourceRepo` and `verifiedBefore` finds items by when they
457
524
  were last verified instead of by commits.
458
525
 
526
+ ## Stale memories
527
+
528
+ `memory_recall`, `memory_get` and `memory_sessionContext` add a `staleness` field to an item only
529
+ when a file it cites changed since it was verified:
530
+
531
+ - `since`: the commit the item was verified at; `target`: the ref it was compared with
532
+ (`origin/<default>`, or `HEAD` when there is none); `commits`: how many commits lie between;
533
+ - `changed`: the cited paths that changed; `entries` (project pages from `memory_get`): the entry IDs
534
+ whose own cited commit is behind;
535
+ - `fetchedAt`: when this checkout last fetched. Nothing is fetched during a recall, so an old
536
+ `fetchedAt` means `target` may itself be behind.
537
+
538
+ No `staleness` field means no change was found, not that the item was verified: an item that cites
539
+ no file is never marked. `superseded: true` means a newer memory replaced it (tag `Superseded`);
540
+ prefer the newer one.
541
+
542
+ Before relying on a stale item, verify, then flag, then fix:
543
+
544
+ 1. **Verify.** Read each changed file at the target commit, `git show <target>:<path>`, never the
545
+ working tree.
546
+ 2. **Still true:** move its `source` only (`memory_update` with `source: {repo, commit}`, where
547
+ `commit` is `git rev-parse <target>`), and leave the text as it is.
548
+ 3. **Clearly wrong, with an obvious fix:** update the text and the `source` in one `memory_update`.
549
+ 4. **Unclear:** leave it, and tell the developer what changed and why you are not sure.
550
+
551
+ Rules:
552
+
553
+ - At most three fixes per task. Flag the rest to the developer.
554
+ - `source.commit` only moves forward: only when `git merge-base --is-ancestor <old> <new>` passes,
555
+ and never onto an unmerged commit. When `target` is `HEAD` (no `origin/<default>` to compare
556
+ with), never move `source`; flag it instead.
557
+ - On a `Conflict:` reply, read the item again with `memory_get`. If its stored commit is the same as
558
+ yours or newer, someone else already did it: stop.
559
+ - Project pages (`<Project> ›` wiki pages) change only through project-knowledge's touch and
560
+ targeted-update rules, never by a direct `memory_update` here. For a stale project page, tell the
561
+ developer and suggest "catch up the <Project> knowledge with the code".
562
+ - Never attempt an edit you cannot make. Org items are author-only. A Team item you did not write
563
+ can be edited only on one of your teams' repos and only with `expectedLastModified`. Private and
564
+ Restricted items of others are never yours to edit. Flag these instead.
565
+ - Automatic capture never fixes or marks other items; it only updates its own Facts and Scenarios.
566
+ - Never write stale text into content: no "may be out of date" notes. Staleness is worked out each
567
+ time an item is read, never stored.
568
+
569
+ ## Skill drift
570
+
571
+ When a plugin skill's instruction contradicts the code you are working in, save a Fact tagged
572
+ `SkillDrift` on the repo it concerns, passing that repo by name (`repo: "<owner/name>"`) so it is
573
+ Team even from another folder: the weekly sweep groups SkillDrift Facts across
574
+ authors. Its content names the skill as `plugin:<name>@<version>`, quotes the contradicted
575
+ instruction, and gives the evidence (`code: owner/name@sha path`, and what the code does instead).
576
+ Follow the code for the task at hand. Never edit the plugin or its installed files.
577
+
459
578
  ## Targeting a different repo explicitly
460
579
 
461
580
  The repo attached to a save is normally detected from the cwd's git remote,
@@ -513,7 +632,7 @@ repo, or `repoName` as `owner/name`). It creates the repo with no team, or
513
632
  returns the existing one: `{ uid, name, teamName, created }`. Items on a repo
514
633
  with no team are readable by their author only, so Team visibility is refused
515
634
  there (on `memory_save`, `memory_setVisibility` and when moving a Team item onto
516
- it); use Private, or Org if the human approves sharing it, until the repo is
635
+ it); use Private (say so and why), or Org when it passes the Org check in "What to share", until the repo is
517
636
  linked with `memory_linkRepoTeam`. `memory_listRepos` with `includeUnlinked:
518
637
  true` also lists repos with no team (`teamName: null`). `memory_registerRepo`
519
638
  is refused in capture mode.
@@ -539,11 +658,13 @@ the project's delivery repo, titled `<Project> › Rules › <feature>`, `<Proje
539
658
  `<Project> › Reference › <topic>` and `<Project> › Sources`; the rules and don't-build pages carry the
540
659
  `ProjectRules` tag, and `<Project> › Reference › feature-map` lists each feature's code, documents and
541
660
  tickets. Find them with `memory_list type=Wiki titlePrefix="<Project> ›"`. Four skills work
542
- on them: project-knowledge (create, refresh from sources, import a knowledge pack), plan-ticket,
543
- delegate-ticket and fold-findings. Change these pages through those skills, which keep the entry
544
- format and change log and always pass `expectedLastModified` to `memory_update`. Without those
545
- skills, edit with `memory_update` directly, keep the page's entry format, add a change-log line, and
546
- still pass `expectedLastModified`.
661
+ on them: project-knowledge (create, refresh from sources, import a knowledge pack, targeted update),
662
+ plan-ticket, delegate-ticket and fold-findings; the last three hand their page changes to
663
+ project-knowledge. These pages change only through project-knowledge, which keeps the entry format
664
+ and change log and always passes `expectedLastModified`; never `memory_update` them directly.
665
+ Without that skill (for example in Claude Desktop), leave them as they are and tell the person a
666
+ developer can update them with "update the <Project> knowledge". Everything else you edit with
667
+ `memory_update`.
547
668
 
548
669
  ## If the tools aren't available
549
670