@unblocklabs/unblock-memory 0.11.0 → 0.12.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.
Files changed (45) hide show
  1. package/README.md +2 -1
  2. package/dist/src/agent-transcript.js +16 -0
  3. package/dist/src/config.d.ts +2 -0
  4. package/dist/src/config.js +4 -1
  5. package/dist/src/evidence-review.d.ts +2 -0
  6. package/dist/src/evidence-review.js +1 -1
  7. package/dist/src/people-background.d.ts +3 -1
  8. package/dist/src/people-background.js +10 -1
  9. package/dist/src/people-dossier-review.d.ts +5 -1
  10. package/dist/src/people-dossier-review.js +40 -23
  11. package/dist/src/people-hooks.js +10 -6
  12. package/dist/src/people-learning-config.d.ts +39 -0
  13. package/dist/src/people-learning-config.js +36 -0
  14. package/dist/src/people-learning-cron.d.ts +14 -0
  15. package/dist/src/people-learning-cron.js +101 -0
  16. package/dist/src/people-learning-inventory.d.ts +58 -0
  17. package/dist/src/people-learning-inventory.js +260 -0
  18. package/dist/src/people-learning-prompt.d.ts +1 -0
  19. package/dist/src/people-learning-prompt.js +11 -0
  20. package/dist/src/people-learning-runtime.d.ts +6 -0
  21. package/dist/src/people-learning-runtime.js +374 -0
  22. package/dist/src/people-learning-store.d.ts +153 -0
  23. package/dist/src/people-learning-store.js +281 -0
  24. package/dist/src/people-learning-time.d.ts +7 -0
  25. package/dist/src/people-learning-time.js +33 -0
  26. package/dist/src/people-primer-tool.js +1 -1
  27. package/dist/src/people-primer.js +19 -17
  28. package/dist/src/people-store.d.ts +16 -5
  29. package/dist/src/people-store.js +67 -7
  30. package/dist/src/people-tools.js +10 -6
  31. package/dist/src/plugin.d.ts +4 -4
  32. package/dist/src/plugin.js +12 -5
  33. package/dist/src/response-stages.d.ts +4 -4
  34. package/dist/src/response-store.d.ts +2 -0
  35. package/dist/src/response-store.js +8 -0
  36. package/dist/src/typesafe-review.d.ts +2 -0
  37. package/dist/src/typesafe-review.js +9 -8
  38. package/docs/configuration.md +12 -3
  39. package/docs/people-learning.md +239 -0
  40. package/docs/peoplesql.md +30 -22
  41. package/openclaw.plugin.json +34 -5
  42. package/package.json +8 -5
  43. package/scripts/people-nightly-inventory.mjs +9 -0
  44. package/scripts/people-review-coverage.mjs +65 -0
  45. package/skills/people-whisperer/SKILL.md +123 -123
package/docs/peoplesql.md CHANGED
@@ -1,9 +1,14 @@
1
1
  # People dossiers and whispering
2
2
 
3
+ This local build extends the upstream recognition-only policy with scoped
4
+ interaction preferences and expiring agent lessons. The [people-learning
5
+ reference](people-learning.md) and packaged skill define the extended behavior.
6
+
7
+
3
8
  [Overview](../README.md) · [Configuration and credentials](configuration.md)
4
9
 
5
10
  PeopleSQL stores identity, dossier and change history. The agent authors a brief
6
- recognition snippet; People Whisperer injects only its saved blurb. Enable the
11
+ recognition snippet and scoped interaction claims; People Whisperer supplies both. Enable the
7
12
  store with `people.enabled`; enable injection separately with
8
13
  `people.whisperer.enabled`. The optional `peoplePrimer` approves evidence preparation
9
14
  and automatic save review, not a maintenance scheduler. For independent setup
@@ -48,7 +53,7 @@ Primer and dossier-save requests use `peoplePrimer.timeoutMs`, not
48
53
 
49
54
  Three default questions cover explicit role/organization, enduring organizational
50
55
  background, and the person's relationship to the agent (not its business mission).
51
- Preferences, working styles, priorities, feedback and task history are excluded.
56
+ Two additional questions cover explicit ongoing interaction preferences and working-style feedback, including corrections. Unrelated priorities, tasks and personality speculation are excluded.
52
57
  Each uses QMD vector search (no query expansion) for up to 30 hits, configurable
53
58
  up to 40. All unique eligible hits above the vector threshold are graded, not just
54
59
  the final top three. Complete excerpts over 6,000 characters are counted and skipped,
@@ -72,10 +77,10 @@ Memory evidence never grants permissions or establishes that an old request is
72
77
  still open.
73
78
 
74
79
  `memory_people_update({ action: "replace_dossier", personId, dossier, reason,
75
- agentName? })` automatically checks the proposed blurb before saving. Exact
76
- `qmd://path#Lstart-Lend` claim evidence locators supply up to three indexed ranges
80
+ agentName? })` automatically checks the identity blurb and every proposed claim before saving. Exact
81
+ `qmd://path#Lstart-Lend` claim evidence locators supply up to three indexed ranges per assertion
77
82
  from the primer's approved corpora (120 lines each, 6,000 characters total).
78
- Support confidence and background-only/explicit-support probabilities must all
83
+ Support confidence and category-eligibility/explicit-support probabilities must all
79
84
  be >=0.9. `needs_review` or `review_unavailable` leaves the dossier and history
80
85
  unchanged; missing keys and failures never count as approval. A concurrent dossier
81
86
  edit/deletion returns `conflict` instead of overwriting the newer change.
@@ -132,14 +137,17 @@ guarantee coverage beyond 200 entries, and sync does not reactivate unavailable
132
137
  The agent owns dossier generation and refresh. It can list people, inspect one
133
138
  person's current dossier, search ordinary memory and sessions with
134
139
  `memory_search`/`memory_get`, and replace the dossier when that would improve a
135
- future conversation. The plugin owns no dossier-maintenance workflow or refresh
136
- schedule. A dossier's `reviewedAt` value records its last successful write; it
137
- is not scheduling state. Dossier generation belongs to the agent; prompt injection
140
+ future conversation. With People Whisperer enabled, the plugin schedules private
141
+ [nightly learning and complete weekly validation](people-learning.md) by default.
142
+ A dossier's `reviewedAt` value records its last successful write, not scheduling
143
+ state. Dossier generation and evidence-backed interaction learning belong to the agent; prompt injection
138
144
  performs no model call. The optional primer grades evidence and reviews draft snippets.
139
- The goal is recognition, not a behavioral profile: one short paragraph of at most
140
- 70 words identifying the person and their enduring organization/agent relationship.
141
- New writes allow only `role`/`relationship` sections and explicit `observed`/`reported`
142
- claims; priorities, preferences and inferred profiles belong outside dossiers.
145
+ The identity blurb is one paragraph of at most 70 words. New writes also allow
146
+ `preferences` and `workingStyle` sections for concrete ongoing interaction feedback,
147
+ alongside `role` and `relationship`. Interaction claims require scope and an actual
148
+ reviewedAt. Explicit facts use `observed`/`reported`; provisional agent-derived
149
+ interaction lessons use `agent_assessment` with an expiry within 30 days of review.
150
+ Psychological profiles, permission grants and unrelated task history stay excluded.
143
151
  Legacy dossiers remain readable, but must be deliberately rewritten by the agent
144
152
  before replacement. No automatic destructive migration or blanket deletion occurs.
145
153
 
@@ -152,17 +160,17 @@ after dossier snapshots. List small newest-first summaries with
152
160
  then fetch one exact diff with
153
161
  `memory_people_inspect({ view: "dossier_change", personId, changeId })`. List
154
162
  responses include `nextOffset`, so all history remains reachable without loading
155
- many dossiers into one tool result. Because the injected snippet is the dossier's
156
- `blurb`, its changes are included in the same history. A complete new serialized
163
+ many dossiers into one tool result. Changes to the injected blurb and interaction
164
+ claims are included in the same history. A complete new serialized
157
165
  dossier is capped at 64 KiB; larger legacy dossiers remain readable and repairable.
158
166
 
159
167
  ## Injection and person state
160
168
 
161
169
  Set `people.whisperer.enabled` to inject context. For each exact Slack sender,
162
- the plugin appends that person's stored dossier blurb inside `<people>` in the
170
+ the plugin appends that person's identity blurb and verified, unexpired interaction claims inside `<people>` in the
163
171
  shared `<unblock_memory>` block, after memory and skill hints when present. The
164
- blurb is bounded by `maxChars` and injected
165
- once per `(Slack thread, person)`. Receipts are durable across retries and
172
+ combined context is bounded by `maxChars` and injected
173
+ on every user turn for the exact person. Receipts are durable across retries and
166
174
  Gateway restarts, while different people in one thread are handled independently.
167
175
  Unthreaded DMs use their OpenClaw session as the conversational scope. Unknown,
168
176
  unavailable, disabled, or dossierless people produce no context. Injection
@@ -195,7 +203,7 @@ call; People Whisperer itself imposes no evidence-window limit.
195
203
  | Action | Effect | Preserved / follow-up |
196
204
  | --- | --- | --- |
197
205
  | `set_injection` with `enabled:false` | Pause future injection for this person | Person, dossier and history remain |
198
- | `replace_dossier` | Save a verified full replacement | Prior snapshot/reason remain in history; existing thread receipts are not reset |
206
+ | `replace_dossier` | Save a verified full replacement | Prior snapshot/reason remain in history; next user turn receives current context |
199
207
  | `delete_dossier` | Remove the current dossier | Person and transactional before/after history remain; no new blurb injection |
200
208
  | `soft_delete_person` | Mark unavailable and turn injection off | Identity/dossier/history remain; creates a review todo |
201
209
  | `restore_person` | Mark active again | Injection stays **off**; inspect and explicitly re-enable if appropriate |
@@ -221,10 +229,10 @@ None of these operations erases raw memory or dossier history.
221
229
 
222
230
  `memory_people_inspect`'s `injectionEligible` and `contribution` are a
223
231
  **record-level preview**, not proof that a hook will inject: they do not account
224
- for the global whisperer switch, host permissions or an existing thread receipt.
225
- Changing a dossier or restarting the Gateway does not re-inject it in an already
226
- served thread. A same-run retry replays its saved contribution; a different thread
227
- can receive the current blurb. Do not delete receipts as routine troubleshooting.
232
+ for the global whisperer switch, host permissions or a same-run receipt.
233
+ Every new user turn receives the current blurb and eligible interaction claims,
234
+ including reused Slack threads after compaction/reset. A retry of the same run
235
+ replays its saved snapshot. Do not delete receipts as routine troubleshooting.
228
236
 
229
237
  For agent research/write steps and the dossier schema, use the packaged
230
238
  [People Whisperer skill](../skills/people-whisperer/SKILL.md). If the agent has a
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "unblock-memory",
3
3
  "name": "Unblock Memory",
4
- "version": "0.11.0",
4
+ "version": "0.12.0",
5
5
  "description": "Indexes, retrieves, and analyzes configured workspace memory with existing QMD vectors.",
6
6
  "kind": "memory",
7
7
  "activation": { "onStartup": true },
@@ -24,7 +24,8 @@
24
24
  "memory_people_inspect",
25
25
  "memory_people_update",
26
26
  "memory_people_prime",
27
- "memory_people_sync"
27
+ "memory_people_sync",
28
+ "memory_people_learning"
28
29
  ]
29
30
  },
30
31
  "toolMetadata": {
@@ -42,7 +43,8 @@
42
43
  "memory_people_inspect": { "replaySafe": true },
43
44
  "memory_people_update": { "sideEffecting": true },
44
45
  "memory_people_prime": { "sideEffecting": true },
45
- "memory_people_sync": { "sideEffecting": true, "optional": true }
46
+ "memory_people_sync": { "sideEffecting": true, "optional": true },
47
+ "memory_people_learning": { "sideEffecting": true }
46
48
  },
47
49
  "uiHints": {
48
50
  "myTurn.enabled": { "label": "My Turn", "help": "Opt in to sending recent group/channel conversation text and agent identity to TypeSafe. Appends an advisory NO_REPLY hint only when Jev clearly favors silence. DMs and internal wakes are excluded. Failures never prevent a turn. Requires hook conversation access and prompt injection. Disabled by default." },
@@ -109,9 +111,10 @@
109
111
  },
110
112
  "people.whisperer.enabled": {
111
113
  "label": "People Whisperer",
112
- "help": "Inject an active, injection-enabled person's saved blurb once per Slack thread/person, with durable receipts. Requires people.enabled and host hook permissions; no model call."
114
+ "help": "Supply identity, scoped preferences and unexpired agent lessons on every Slack user turn. Enables private nightly learning and weekly validation by default. Same-run retries replay their snapshot."
113
115
  },
114
- "people.whisperer.maxChars": { "label": "People Blurb Character Limit", "help": "Also limits newly saved dossier blurbs when injection is off. The separate 70-word ceiling still applies." },
116
+ "people.whisperer.maxChars": { "label": "People Context Character Limit", "help": "Combined identity and interaction context limit. Identity blurb remains at most 70 words." },
117
+ "people.learning.enabled": { "label": "People Learning", "help": "Defaults on with People Whisperer. Private nightly dreaming at 03:10 and complete weekly validation Sunday at 04:00 in the agent timezone. Does not grant external-analysis or corpus approvals." },
115
118
  "analysis.executable": {
116
119
  "label": "Memory Analysis Worker",
117
120
  "help": "Optional absolute path to the locally installed unblock-memory-analysis executable."
@@ -292,6 +295,32 @@
292
295
  "maxOpen": { "type": "integer", "minimum": 1, "maximum": 10000, "default": 1000 }
293
296
  },
294
297
  "default": { "maxOpen": 1000 }
298
+ },
299
+ "learning": {
300
+ "type": "object", "additionalProperties": false,
301
+ "properties": {
302
+ "enabled": { "type": "boolean" },
303
+ "nightly": { "type": "boolean", "default": true },
304
+ "weekly": { "type": "boolean", "default": true },
305
+ "nightlySchedule": { "type": "string", "default": "10 3 * * *" },
306
+ "weeklySchedule": { "type": "string", "default": "0 4 * * 0" },
307
+ "timezone": { "type": "string" },
308
+ "legacyJobIds": { "type": "array", "items": { "type": "string" } },
309
+ "agents": {
310
+ "type": "object",
311
+ "propertyNames": { "pattern": "^[a-z0-9][a-z0-9_-]*$" },
312
+ "additionalProperties": {
313
+ "type": "object", "additionalProperties": false,
314
+ "properties": {
315
+ "enabled": { "type": "boolean" },
316
+ "nightly": { "type": "boolean" }, "weekly": { "type": "boolean" },
317
+ "nightlySchedule": { "type": "string" }, "weeklySchedule": { "type": "string" },
318
+ "timezone": { "type": "string" },
319
+ "legacyJobIds": { "type": "array", "items": { "type": "string" } }
320
+ }
321
+ }
322
+ }
323
+ }
295
324
  }
296
325
  },
297
326
  "default": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unblocklabs/unblock-memory",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Workspace-native memory for OpenClaw, powered by QMD",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -31,6 +31,9 @@
31
31
  "docs/response-audit.md",
32
32
  "docs/memory-training.md",
33
33
  "docs/extraction.md",
34
+ "docs/people-learning.md",
35
+ "scripts/people-nightly-inventory.mjs",
36
+ "scripts/people-review-coverage.mjs",
34
37
  "openclaw.plugin.json"
35
38
  ],
36
39
  "scripts": {
@@ -55,12 +58,12 @@
55
58
  "typebox": "1.3.6"
56
59
  },
57
60
  "devDependencies": {
58
- "@openclaw/ai": "2026.8.1",
61
+ "@openclaw/ai": "2026.11.5",
59
62
  "@openclaw/plugin-inspector": "^0.3.10",
60
63
  "@types/node": "^24.6.0",
61
64
  "@types/picomatch": "^4.0.2",
62
65
  "knip": "^6.32.2",
63
- "openclaw": "2026.8.1",
66
+ "openclaw": "2026.11.5",
64
67
  "tsx": "^4.20.6",
65
68
  "typescript": "^5.9.3"
66
69
  },
@@ -84,8 +87,8 @@
84
87
  "minGatewayVersion": "2026.8.1-beta.3"
85
88
  },
86
89
  "build": {
87
- "openclawVersion": "2026.8.1",
88
- "pluginSdkVersion": "2026.8.1"
90
+ "openclawVersion": "2026.11.5",
91
+ "pluginSdkVersion": "2026.11.5"
89
92
  },
90
93
  "install": {
91
94
  "npmSpec": "@unblocklabs/unblock-memory",
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ // Portable operator entry point. Host configuration owns identities, paths and timezone.
3
+ import { spawnSync } from 'node:child_process';
4
+ const args = process.argv.slice(2);
5
+ if (!args.includes('--agent')) throw new Error('Usage: people-nightly-inventory.mjs --agent ID [--kind nightly|weekly] [--date YYYY-MM-DD]');
6
+ if (args.includes('--dry-run')) throw new Error('Use the operator inventory command; it writes private resumable review state, never people preferences.');
7
+ const result = spawnSync('openclaw', ['memory-people-learning', 'inventory', ...args], { stdio: 'inherit' });
8
+ if (result.error) throw result.error;
9
+ process.exitCode = result.status ?? 1;
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from 'node:fs';
3
+
4
+ // Coverage verification is deterministic; evidence interpretation remains the agent's job.
5
+ const [manifestPath, receiptPath] = process.argv.slice(2);
6
+ if (!manifestPath || !receiptPath) throw new Error('Usage: people-review-coverage.mjs MANIFEST_JSON RECEIPT_JSON');
7
+ const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
8
+ const receipt = JSON.parse(readFileSync(receiptPath, 'utf8'));
9
+ if (manifest.id && manifest.agentId) {
10
+ const { verifyLearningCoverage, LEARNING_RECEIPT_SCHEMA } = await import('../dist/src/people-learning-store.js');
11
+ const { Value } = await import('typebox/value');
12
+ const result = verifyLearningCoverage(manifest, Value.Parse(LEARNING_RECEIPT_SCHEMA, receipt));
13
+ console.log(JSON.stringify(result, null, 2));
14
+ process.exit(result.status === 'complete' ? 0 : 1);
15
+ }
16
+ // Compatibility for receipts produced by the original local extension. These
17
+ // cannot be submitted to plugin-owned runs, which require the schema above.
18
+ const errors = [];
19
+ const byId = new Map((receipt.assertionReviews ?? []).map(review => [review.assertionId, review]));
20
+ if (byId.size !== (receipt.assertionReviews ?? []).length) errors.push('Duplicate assertion dispositions');
21
+ const statuses = new Set(['revalidated','corrected','retired','unresolved']);
22
+ let reviewed = 0, unresolved = 0;
23
+ if (receipt.fullValidation) {
24
+ for (const claim of manifest.assertions) {
25
+ const review = byId.get(claim.id);
26
+ if (!review) { errors.push(`Missing assertion ${claim.id}`); continue; }
27
+ if (!statuses.has(review.disposition) || !review.reason?.trim() || !Number.isFinite(Date.parse(review.reviewedAt))) {
28
+ errors.push(`Invalid disposition ${claim.id}`); continue;
29
+ }
30
+ if (review.disposition !== 'unresolved' && (!Array.isArray(review.sourceRefs) || !review.sourceRefs.length)) {
31
+ errors.push(`Missing original-source verification ${claim.id}`); continue;
32
+ }
33
+ if (review.disposition === 'unresolved') unresolved++; else reviewed++;
34
+ }
35
+ const known = new Set(manifest.assertions.map(claim => claim.id));
36
+ for (const id of byId.keys()) if (!known.has(id)) errors.push(`Unknown assertion ${id}`);
37
+ }
38
+ if (receipt.kind === 'nightly') {
39
+ const people = new Map((receipt.peopleReviews ?? []).map(person => [person.senderId, person]));
40
+ if (people.size !== (receipt.peopleReviews ?? []).length) errors.push('Duplicate team-member reviews');
41
+ for (const person of manifest.roster) {
42
+ const review = people.get(person.senderId);
43
+ if (!review || !['reviewed','no_interactions','unresolved'].includes(review.status)) {
44
+ errors.push(`Missing/invalid team-member review ${person.senderId}`); continue;
45
+ }
46
+ if (person.sessions.length && review.status === 'no_interactions') errors.push(`Skipped existing interactions for ${person.senderId}`);
47
+ const inspected = new Set(review.sessionIds ?? []);
48
+ if (review.status === 'reviewed' && person.sessions.some(session => !inspected.has(session.sessionId))) {
49
+ errors.push(`Unreviewed session for ${person.senderId}`);
50
+ }
51
+ if (review.status === 'reviewed' && (!review.reason?.trim() || !Array.isArray(review.sourceRefs) || !review.sourceRefs.length)) {
52
+ errors.push(`Missing exchange evidence for ${person.senderId}`);
53
+ }
54
+ if (review.status === 'unresolved') unresolved++;
55
+ }
56
+ }
57
+ const gapReviews = new Map((receipt.sourceGapReviews ?? []).map(review => [review.sourceGapId, review]));
58
+ const gaps = manifest.sourceGaps.filter(gap => {
59
+ const review = gapReviews.get(gap.id);
60
+ return review?.status !== 'resolved' || !review.reason?.trim() || !review.sourceRefs?.length;
61
+ }).length;
62
+ const status = errors.length ? 'invalid' : unresolved || gaps || receipt.auditBacklog ? 'partial' : 'complete';
63
+ console.log(JSON.stringify({ status, expectedAssertions: receipt.fullValidation ? manifest.assertions.length : 0,
64
+ reviewed, unresolved, sourceGaps: gaps, errors }, null, 2));
65
+ if (status !== 'complete') process.exitCode = 1;
@@ -1,129 +1,129 @@
1
1
  ---
2
2
  name: people-whisperer
3
- description: Maintain brief PeopleSQL background snippets identifying a person and their relationship to the agent, not behavioral profiles or task history.
3
+ description: Remember who each person is, their interaction preferences, and evidence-backed lessons from working with them. Curate feedback during nightly dreaming and revalidate every saved statement weekly.
4
4
  ---
5
5
 
6
6
  # People Whisperer
7
7
 
8
- Help the agent recognize whom it is talking to, without telling it what that
9
- person wants. A dossier is a short background primer, not a personality model.
10
-
11
- ## Inspect and research
12
-
13
- - Use `memory_people_inspect` with `view: "person"` and an exact `personId` or
14
- Slack identity. For maintenance, list `view: "people"` first; not everyone
15
- needs an update. `reviewedAt` records the last write, not a due date.
16
- - Research only three questions: who is this person (explicit role and
17
- organization); what enduring organizational context identifies them; and what
18
- is their relationship to this agent (e.g. personal assistant or AI counterpart)?
19
- - When enabled, call `memory_people_prime({ personId, agentName })`. It retrieves
20
- approved sources and grades background eligibility, not general relevance.
21
- Follow useful source ranges with `memory_get`. Scores are triage, not facts.
22
- `unknown` stays unknown; `evidence_found` still needs verification. Inspect
23
- uncertain evidence rather than guessing.
24
- - Use bounded, targeted `memory_search` calls for missing identity/relationship
25
- answers and newer contradictory role or affiliation statements. Check available
26
- agent identity/user context too, but do not treat the agent's own speculation
27
- or an existing dossier as independent evidence. Follow source attribution.
28
- Do not send local files to TypeSafe unless they are in approved corpora.
29
- - Prefer explicit human statements or authoritative directory/identity context.
30
- Topics someone discusses do not establish their job, priorities or responsibilities.
31
- Old evidence can establish enduring background; unresolved changes in role,
32
- organization or relationship must be investigated or omitted, not guessed away.
33
- - If recent sessions are missing, use `memory_sync_sessions` and check
34
- `memory_sync_status` before searching again. Disabled/unavailable primers do
35
- not prevent ordinary source research.
36
-
37
- ## Draft a recognition snippet
38
-
39
- Write one short paragraph, usually 2–3 sentences and **at most 70 words**. This
40
- is a ceiling, not a target. Include only useful, explicit identity, role,
41
- organization, enduring team context and person-agent relationship background.
42
-
43
- Exclude preferences, working style, priorities, success criteria, feedback,
44
- permissions, behavioral advice, business missions, goals, projects, commitments and dated anecdotes—even
45
- when supported. A request for sales copy is not proof of a sales role. A technical
46
- discussion is not proof of an engineering role. Never fill gaps with activity
47
- summaries or invent formal titles. Memory is not authorization.
48
-
49
- For legacy dossiers, deliberately remove behavioral sections and incident history.
50
- Do not preserve an old claim merely because it was previously stored. Retain only
51
- verified background; if no useful background can be established, prefer no dossier.
52
-
53
- ## Submit the verified snippet
54
-
55
- Use `memory_people_update` with `action: "replace_dossier"`, the exact `personId`,
56
- a concise `reason`, optional `agentName` if no identity name is configured, and
57
- the complete `dossier` (not a patch):
58
-
59
- ```json
60
- {
61
- "schemaVersion": 1,
62
- "blurb": "Mira is the founder of ExampleCo.",
63
- "sections": [{
64
- "category": "role",
65
- "claims": [{
66
- "statement": "Mira is the founder of ExampleCo.",
67
- "evidence": [{ "source": "session", "locator": "qmd://source/path.md#L12-L15" }],
68
- "epistemicType": "reported",
69
- "confidence": "high"
70
- }]
71
- }]
72
- }
73
- ```
74
-
75
- Include evidence claims for every assertion in the blurb, including relationship
76
- claims. New writes allow only `role` and `relationship` sections and `observed`
77
- or `reported` facts. Evidence sources are `session`, `memory`, `directory` or
78
- `manual`; optional `observedAt` must be an ISO timestamp. Confidence is optional
79
- `low`, `medium` or `high`. Keep source references out of the injected blurb.
80
- The configured character limit and 64 KiB serialized dossier limit also apply.
81
-
82
- The write tool automatically reviews the blurb before saving. No separate review
83
- call is required. Use exact `qmd://path#Lstart-Lend` evidence locators: at most three
84
- distinct ranges, each at most 120 lines and together 6,000 characters. Only the
85
- primer's approved corpora can be sent to TypeSafe. The check tests complete support,
86
- background-only content and explicit rather than activity-inferred facts; it does
87
- not replace your source verification.
88
-
89
- - `ok`: saved; `verification` distinguishes `typesafe` from `manual`.
90
- - `needs_review`: failed/uncertain check; existing dossier unchanged. Inspect the
91
- evidence, remove unsupported clauses or resolve attribution before resubmitting.
92
- - `review_unavailable`: disabled review, missing key, non-indexed evidence or
93
- provider failure; existing dossier unchanged. Retry or verify manually.
94
- - `conflict`: the person/dossier changed during review; inspect again before retrying.
95
-
96
- For direct human corrections, non-indexed identity context or an unavailable/incorrect
97
- review, you may add `manualVerification` to the update **only after checking every
98
- assertion and background eligibility yourself**. This is a source-specific attestation,
99
- not a retry switch. Explain the original evidence and any override, e.g.:
100
-
101
- ```json
102
- {
103
- "manualVerification": "Verified against Mira's explicit correction in this conversation on 2026-09-18: she founded ExampleCo. The snippet contains only that identity fact."
104
- }
105
- ```
106
-
107
- Keep accurate manual/directory provenance on the claims. Do not invent indexed
108
- citations. Manual verification skips TypeSafe and records the explanation in change
109
- history; it never reports a provider pass or bypasses the word/category limits.
110
- If you cannot verify the snippet, leave it unchanged and report the limitation.
111
-
112
- Only the blurb is injected; evidence stays in storage. Replacements/deletions
113
- preserve transactional before/after history and a reason. Use `delete_dossier`
114
- when a misleading legacy profile cannot be responsibly replaced, or `set_injection`
115
- to pause it without deleting it. Do not erase raw memory or dossier history.
116
- Inspect history through `dossier_changes` and `dossier_change` views.
117
-
118
- `soft_delete_person` marks a person unavailable and disables injection without
119
- erasing the dossier/history. `restore_person` leaves injection off: inspect first,
120
- then explicitly re-enable if appropriate. Slack deactivation also disables the
121
- whole linked person; directory sync does not restore unavailable people.
122
- `injectionEligible` is only a record preview. Global hooks and durable once-per-thread
123
- receipts still apply; dossier edits/restarts do not refresh an already-served thread.
124
- See the [people operator reference](../../docs/peoplesql.md) for state operations
125
- and the [retrieval guide](../../docs/retrieval.md) for search/sync limits.
126
- When loaded through a `plugin-skills` symlink, resolve these links from the skill's real installed path.
127
-
128
- Report the resulting snippets, source limitations, changes and intentionally
129
- unknown answers. More words or more claims are not success metrics.
8
+ Help future sessions recognize the person and work better with them. Save specific,
9
+ scoped adjustments grounded in actual exchanges. The agent decides which lessons
10
+ are useful, and distinguishes explicit human preferences from its own hypotheses.
11
+
12
+ ## Review feedback during nightly dreaming
13
+
14
+ Identify the exact Slack account/sender with `memory_people_inspect` view `person`.
15
+ Read their current dossier before replacing it. During nightly dreaming, review
16
+ continuing interaction preferences and corrections from the day's exchanges.
17
+ Decide which updates are useful and save verified changes. Preserve other
18
+ verified claims and their original scope. A one-off task request is not automatically
19
+ a permanent preference. If duration is ambiguous, use the narrowest supported scope.
20
+
21
+ Research original sources using `memory_people_prime`, `memory_search` and
22
+ `memory_get`. The primer covers identity, organization, agent relationship,
23
+ preferences and working-style feedback, including corrections. Sync sessions with
24
+ `memory_sync_sessions` and inspect `memory_sync_status` when needed. Existing
25
+ dossiers and the agent's earlier assertions are not independent evidence. Do not
26
+ send evidence outside the approved corpora to TypeSafe.
27
+
28
+ ## Store a compact, sourced dossier
29
+
30
+ Keep the `blurb` an identity/background paragraph of at most 70 words. Store each
31
+ ongoing preference separately under `preferences` or `workingStyle`; these sections
32
+ are also supplied to the agent. New dossiers allow `role`, `relationship`,
33
+ `preferences` and `workingStyle` sections. Cite original evidence for EVERY claim.
34
+ Use `scope` to retain channel, project or interaction limits, and `reviewedAt` for
35
+ the actual last verification time. Source `observedAt` is the source's time, not the
36
+ review time. Preserve source attribution and uncertainty.
37
+
38
+ Explicit human preferences use `reported` (or directly observed facts use
39
+ `observed`). Agent-derived improvements use `agent_assessment`, an explicit scope,
40
+ `reviewedAt`, and `expiresAt` no more than 30 days later; default to a seven-day
41
+ trial. These are provisional agent lessons, never human-stated instructions. Decide
42
+ whether a small, reversible adjustment is justified by the complete exchange.
43
+ Do not infer psychological traits, emotions as enduring personality, permissions,
44
+ or new responsibilities. Sentiment alone does not establish the desired adjustment.
45
+
46
+ Use `memory_people_update` action `replace_dossier` with a complete replacement
47
+ and a concise reason. The tool reviews the identity blurb and every stored claim
48
+ against its own evidence. Indexed evidence needs exact `qmd://path#Lstart-Lend`
49
+ references (1–3 per assertion, at most 120 lines each and 6,000 characters total).
50
+ A failed, uncertain or unavailable review leaves the dossier unchanged.
51
+
52
+ For direct feedback in the current conversation, authoritative directory data,
53
+ non-indexed evidence or an unavailable/incorrect automated review, use a
54
+ source-specific `manualVerification` ONLY after independently checking every
55
+ retained assertion, attribution, scope and any newer corrections. Record the
56
+ original Slack message/account/sender/time or authoritative source; do not invent
57
+ indexed citations. Manual verification is recorded as manual, not a provider pass.
58
+
59
+ If a concurrent change returns `conflict`, inspect again and merge deliberately.
60
+ Respect the configured combined-context character limit. Never silently drop
61
+ preferences merely to fit a new claim. Only actionable claims and the blurb are
62
+ injected; evidence and full change history remain in storage. Expired claims are
63
+ omitted from injection automatically. Context refreshes on every user turn; a retry
64
+ of the exact same run replays its original snapshot.
65
+
66
+ ## Nightly dreaming: did I show up well for each teammate?
67
+
68
+ Use `memory_people_learning` action `inventory`, kind `nightly`, in the private
69
+ plugin-owned review session. Follow its manifest and exact local identities. Review every
70
+ team member's interactions in the completed local day, plus unfinished review
71
+ backlog. Record people with no interactions rather than inventing observations.
72
+ Use response-quality/sentiment reports to find leads, then read the full relevant
73
+ request, agent response, human reaction and subsequent repair in original sessions.
74
+ Also inspect neutral corrections, explicit preferences, repeated constraints,
75
+ avoidable rework and examples that worked well. No complaint is not proof of success.
76
+
77
+ Ask: what did the person need, what did I do, how did they respond, and what
78
+ specific adjustment would improve the next relevant interaction? Separate agent
79
+ execution/delivery mistakes, changing requirements and external frustration from
80
+ personal interaction preferences. Record general execution fixes as agent work;
81
+ keep person dossiers focused on how to collaborate with that person.
82
+ Keep saved lessons concise; do not add unnecessary or irrelevant caveats.
83
+
84
+ The agent decides whether to save an explicit preference, trial an inferred lesson,
85
+ revise an existing claim, or make no change. Check for newer contradictions and
86
+ avoid duplicates. Preserve what worked. Do not learn blanket avoidance, unsupported
87
+ personality labels, authority grants, or misleading explanations of an error.
88
+ Revisit earlier provisional lessons; retain only evidence-supported adjustments,
89
+ revise ineffective ones, and let unconfirmed trials expire. Never extend an expiry
90
+ merely because the lesson was already saved.
91
+
92
+ ## Complete weekly validation
93
+
94
+ Use `memory_people_learning` action `inventory`, kind `weekly`. The manifest
95
+ enumerates every statement for people with activity in the past completed local
96
+ week, plus unverified legacy dossiers for bootstrap. Source gaps conservatively
97
+ include all dossiers. Enumerate people with `memory_people_inspect` view `people`,
98
+ `includeInactive: true`, following every page, to reconcile any concurrent additions.
99
+ Never reactivate anyone or change injection permissions during an audit.
100
+ For each assertion in the blurb AND every section, inspect its original evidence
101
+ and search for newer changes, contradictions, retractions, completed contexts or
102
+ superseding feedback. Old evidence can still be valid; age alone is not staleness.
103
+ A previous saved statement is never evidence for retaining itself.
104
+
105
+ Classify every statement as revalidated, corrected, retired, or unresolved.
106
+ Update `reviewedAt` only after actual verification. Remove contradicted, superseded,
107
+ expired or unsupported claims from the active dossier; replacements/deletions retain
108
+ before/after history and reasons. Preserve independently verified claims. If all
109
+ useful claims are invalid, delete the dossier with an evidence-based reason. For
110
+ inactive people, inspect/report needed changes without restoring or enabling them.
111
+ Do not pretend a source/provider outage proves a claim false; mark it unresolved
112
+ and retain an explicit backlog for retry. Do not reset its review date.
113
+
114
+ Checkpoint with `memory_people_learning`, preserving its run ID and receipt schema.
115
+ Use `inspect` to resume each pending run and `signals` with its run ID for approved
116
+ analysis. Include person/claim coverage counts, dispositions, source
117
+ references, actual save results, gaps and carried backlog. A run is fully complete
118
+ only when every existing statement has a disposition; a time limit is partial,
119
+ never success-by-sampling. Resume unfinished people first next time. Recheck all
120
+ current claims for every person active that week, even if their dossier is unchanged.
121
+ An old backlog remains pending even after a later run completes.
122
+
123
+ ## State and reporting
124
+
125
+ Use `delete_dossier` for an invalid dossier; preserve raw memory and change history.
126
+ Respect paused, archived and unavailable people. Restore and injection changes are
127
+ separate deliberate operations. Report saved snippets, concrete adjustments,
128
+ retired claims, evidence limitations and unresolved work. Do not send team messages
129
+ or modify configuration/schedules from maintenance runs.