dotmem 0.0.9 → 0.1.1
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/AGENTS.md +3 -3
- package/DOTMEM.md +536 -539
- package/JOY.md +124 -35
- package/MEMORY.md +5 -5
- package/PACKAGE.md +1 -1
- package/README.md +339 -200
- package/SECURITY.md +1 -1
- package/agent.cjs +13 -0
- package/agent.js +13 -0
- package/bin/cli.cjs +5 -0
- package/bin/cli.js +5 -0
- package/bin/mcp.cjs +5 -0
- package/bin/mcp.js +5 -0
- package/cli.cjs +49 -14
- package/cli.js +49 -14
- package/core/profile/ai.compact.md +5 -0
- package/core/profile/ai.md +288 -0
- package/core/profile/behavior.md +431 -0
- package/core/profile/curiosity.md +565 -0
- package/core/profile/decision.md +842 -0
- package/core/profile/language.md +99 -0
- package/core/profile/soul.md +41 -0
- package/core/profile/trust.md +804 -0
- package/global.cjs +52 -13
- package/global.js +52 -13
- package/index.cjs +57 -14
- package/index.js +57 -14
- package/llms.txt +3 -3
- package/mcp.cjs +53 -14
- package/mcp.js +53 -14
- package/package.json +2 -2
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
# dotmem — AI Decision Model
|
|
2
|
+
|
|
3
|
+
This document is designed to be read together with `ai.md` and `behavior.md`.
|
|
4
|
+
|
|
5
|
+
It defines dotmem retrieval, acquisition, runtime-data, verification, and operational decisions.
|
|
6
|
+
|
|
7
|
+
It does not redefine Jo's identity or character.
|
|
8
|
+
|
|
9
|
+
Profile documents remain active while memory is retrieved and projected.
|
|
10
|
+
|
|
11
|
+
## 0. Direct Operational Intent
|
|
12
|
+
|
|
13
|
+
When the user gives a direct operational command such as:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
npx dotmem
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
execute that command directly when permitted.
|
|
20
|
+
|
|
21
|
+
Do not replace a direct command with package inspection, dependency analysis, source browsing, implementation discovery, or CLI reverse-engineering unless:
|
|
22
|
+
|
|
23
|
+
- the command fails
|
|
24
|
+
- the result contradicts verified expectations
|
|
25
|
+
- the user explicitly asks for debugging
|
|
26
|
+
|
|
27
|
+
Preferred flow:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
direct command
|
|
31
|
+
↓
|
|
32
|
+
execute
|
|
33
|
+
↓
|
|
34
|
+
inspect result
|
|
35
|
+
↓
|
|
36
|
+
continue from result
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Do not debug before failure.
|
|
40
|
+
|
|
41
|
+
Successful execution is preferred over implementation archaeology.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# 1. Core Principle
|
|
46
|
+
|
|
47
|
+
The AI should not treat dotmem as a passive archive.
|
|
48
|
+
|
|
49
|
+
When dotmem is available, use it as the continuity and runtime-memory layer of the current work.
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
READ relevant memory first
|
|
53
|
+
VERIFY current state when needed
|
|
54
|
+
ACT
|
|
55
|
+
VALIDATE the result
|
|
56
|
+
ACQUIRE durable knowledge when created
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Do not wait for the user to explicitly say "check memory", "remember this", "use dotmem", "use state", or "use store" when the correct action is already clear from context.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# 2. Context Retrieval Decision
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
CURRENT REQUEST
|
|
67
|
+
|
|
|
68
|
+
v
|
|
69
|
+
Does this concern the current project?
|
|
70
|
+
|
|
|
71
|
+
+-- YES --> Query project-relevant dotmem context first
|
|
72
|
+
| |
|
|
73
|
+
| v
|
|
74
|
+
| Does current filesystem/runtime state matter?
|
|
75
|
+
| |
|
|
76
|
+
| +-- YES --> inspect current project state
|
|
77
|
+
| | |
|
|
78
|
+
| | v
|
|
79
|
+
| | reconcile memory with verified current state
|
|
80
|
+
| |
|
|
81
|
+
| +-- NO --> answer from relevant dotmem context
|
|
82
|
+
|
|
|
83
|
+
+-- NO --> Does this concern the user?
|
|
84
|
+
|
|
|
85
|
+
+-- YES --> use relevant user memory
|
|
86
|
+
|
|
|
87
|
+
+-- NO --> Does this concern relationship/continuity?
|
|
88
|
+
|
|
|
89
|
+
+-- YES --> use relevant brain/relationship context
|
|
90
|
+
|
|
|
91
|
+
+-- NO --> Does this concern AI rules/guardrails?
|
|
92
|
+
|
|
|
93
|
+
+-- YES --> use agent / logic context
|
|
94
|
+
|
|
|
95
|
+
+-- NO --> use current runtime/request only
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The AI should query dotmem autonomously for meanings such as:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
what do you know about this project?
|
|
102
|
+
what did we decide?
|
|
103
|
+
where were we?
|
|
104
|
+
what have we already done?
|
|
105
|
+
what are the project rules?
|
|
106
|
+
what is the current architecture?
|
|
107
|
+
what do you remember about this?
|
|
108
|
+
continue from before
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Do not answer such questions from filesystem inspection alone when dotmem is available.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# 3. Memory Source Model
|
|
116
|
+
|
|
117
|
+
Treat these separately:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
user memory
|
|
121
|
+
project memory
|
|
122
|
+
agent memory
|
|
123
|
+
brain memory
|
|
124
|
+
logic memory
|
|
125
|
+
current runtime state
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Use them according to purpose:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
user memory
|
|
132
|
+
durable user facts, stable preferences, user-specific continuity
|
|
133
|
+
|
|
134
|
+
project memory
|
|
135
|
+
architecture, project decisions, project state, conventions, resolved issues
|
|
136
|
+
|
|
137
|
+
agent memory
|
|
138
|
+
AI operating rules, project agent rules, guardrails, workflow rules
|
|
139
|
+
|
|
140
|
+
brain memory
|
|
141
|
+
graph relationships and explicit relationship edges
|
|
142
|
+
|
|
143
|
+
logic memory
|
|
144
|
+
dotmem internal invariants and durable system logic
|
|
145
|
+
|
|
146
|
+
runtime context
|
|
147
|
+
current files, process state, build state, current request, environment
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Do not infer storage routing from claim IDs.
|
|
151
|
+
|
|
152
|
+
Do not confuse:
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
scope
|
|
156
|
+
kind
|
|
157
|
+
applicability
|
|
158
|
+
source
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
# 4. Loaded Memory vs Projected Memory
|
|
164
|
+
|
|
165
|
+
Always distinguish:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
stored
|
|
169
|
+
loaded
|
|
170
|
+
selected
|
|
171
|
+
projected
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
These are different states.
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
.mem file exists
|
|
178
|
+
!=
|
|
179
|
+
dotmem loaded it
|
|
180
|
+
|
|
181
|
+
dotmem loaded it
|
|
182
|
+
!=
|
|
183
|
+
claim selected for current query
|
|
184
|
+
|
|
185
|
+
claim selected
|
|
186
|
+
!=
|
|
187
|
+
claim rendered in final context
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
`TOTAL:0` means:
|
|
191
|
+
|
|
192
|
+
```text
|
|
193
|
+
zero claims selected for the current projection
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
It does not prove:
|
|
197
|
+
|
|
198
|
+
```text
|
|
199
|
+
no memory exists
|
|
200
|
+
no .mem files exist
|
|
201
|
+
no stores were loaded
|
|
202
|
+
the memory store is empty
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# 5. dotmem-First Project Context
|
|
208
|
+
|
|
209
|
+
When working inside a dotmem-enabled project:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
project question
|
|
213
|
+
|
|
|
214
|
+
v
|
|
215
|
+
query dotmem context
|
|
216
|
+
|
|
|
217
|
+
v
|
|
218
|
+
retrieve relevant project/user/agent/brain/logic claims
|
|
219
|
+
|
|
|
220
|
+
v
|
|
221
|
+
inspect current files only if present-state verification is required
|
|
222
|
+
|
|
|
223
|
+
v
|
|
224
|
+
reconcile memory with current verified state
|
|
225
|
+
|
|
|
226
|
+
v
|
|
227
|
+
answer
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Current verified state wins over stale memory.
|
|
231
|
+
|
|
232
|
+
Memory provides continuity; it does not override reality.
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
# 6. Durable Acquisition Decision
|
|
237
|
+
|
|
238
|
+
After meaningful work, evaluate whether durable knowledge was created.
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
NEW INFORMATION / COMPLETED WORK
|
|
242
|
+
|
|
|
243
|
+
v
|
|
244
|
+
Will this likely matter in a future session?
|
|
245
|
+
|
|
|
246
|
+
+-- NO --> do not acquire
|
|
247
|
+
|
|
|
248
|
+
+-- YES --> Is it safe to persist?
|
|
249
|
+
|
|
|
250
|
+
+-- NO --> do not store raw value
|
|
251
|
+
|
|
|
252
|
+
+-- YES --> classify and acquire
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Usually acquire:
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
architectural decisions
|
|
259
|
+
project structure changes
|
|
260
|
+
new conventions
|
|
261
|
+
important implementation choices
|
|
262
|
+
resolved technical problems
|
|
263
|
+
durable project state changes
|
|
264
|
+
verified operational lessons
|
|
265
|
+
stable user preferences
|
|
266
|
+
stable user identity
|
|
267
|
+
important workflow rules
|
|
268
|
+
decisions that would otherwise need to be rediscovered
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Normally do not acquire:
|
|
272
|
+
|
|
273
|
+
```text
|
|
274
|
+
routine edits
|
|
275
|
+
temporary logs
|
|
276
|
+
transient command output
|
|
277
|
+
failed experiments with no reusable lesson
|
|
278
|
+
debug noise
|
|
279
|
+
duplicated facts already represented by durable memory
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
# 7. Acquisition Routing
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
user-specific durable knowledge
|
|
288
|
+
-> user memory
|
|
289
|
+
|
|
290
|
+
project-specific durable knowledge
|
|
291
|
+
-> project memory
|
|
292
|
+
|
|
293
|
+
AI/agent rules or guardrails
|
|
294
|
+
-> agent memory
|
|
295
|
+
|
|
296
|
+
graph relationship edge
|
|
297
|
+
-> brain memory
|
|
298
|
+
|
|
299
|
+
dotmem internal invariant
|
|
300
|
+
-> logic memory
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Descriptive relationship knowledge may be ordinary experience with the appropriate scope.
|
|
304
|
+
|
|
305
|
+
Graph relationships must use the supported brain relationship API.
|
|
306
|
+
|
|
307
|
+
Do not use ordinary `acquire` to simulate graph relationships when the current dotmem API defines a dedicated relationship path.
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
# 8. Baseline Memory
|
|
312
|
+
|
|
313
|
+
Baseline memory is the minimal durable context needed in a fresh session.
|
|
314
|
+
|
|
315
|
+
Good baseline candidates:
|
|
316
|
+
|
|
317
|
+
```text
|
|
318
|
+
stable user identity
|
|
319
|
+
essential AI identity context
|
|
320
|
+
critical long-term guardrails
|
|
321
|
+
small durable preferences required immediately
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Example:
|
|
325
|
+
|
|
326
|
+
```json
|
|
327
|
+
{
|
|
328
|
+
"applicability": {
|
|
329
|
+
"area": "identity",
|
|
330
|
+
"baseline": true
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Do not mark all user or project memory as baseline.
|
|
336
|
+
|
|
337
|
+
```text
|
|
338
|
+
baseline = essential fresh-session context
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
not:
|
|
342
|
+
|
|
343
|
+
```text
|
|
344
|
+
baseline = everything important
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
# 9. Runtime Data Decision Model
|
|
350
|
+
|
|
351
|
+
dotmem runtime facilities and acquired experience serve different purposes.
|
|
352
|
+
|
|
353
|
+
```text
|
|
354
|
+
APPLICATION DATA
|
|
355
|
+
|
|
|
356
|
+
v
|
|
357
|
+
Reactive UI/application flow?
|
|
358
|
+
-> state
|
|
359
|
+
|
|
360
|
+
Session-scoped?
|
|
361
|
+
-> session
|
|
362
|
+
|
|
363
|
+
Disposable/recomputable?
|
|
364
|
+
-> cache
|
|
365
|
+
|
|
366
|
+
Must survive application restart?
|
|
367
|
+
-> store / persistence
|
|
368
|
+
|
|
369
|
+
Durable AI/project experience?
|
|
370
|
+
-> memory acquisition / .mem
|
|
371
|
+
|
|
372
|
+
Secret?
|
|
373
|
+
-> DO NOT place in ordinary dotmem storage
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
# 10. Autonomous dotmem Runtime Usage
|
|
379
|
+
|
|
380
|
+
When dotmem is already part of the project, autonomously consider its runtime facilities.
|
|
381
|
+
|
|
382
|
+
```text
|
|
383
|
+
reactive application state
|
|
384
|
+
-> prefer dotmem state when appropriate
|
|
385
|
+
|
|
386
|
+
durable non-sensitive application data
|
|
387
|
+
-> consider dotmem store/persistence
|
|
388
|
+
|
|
389
|
+
session-only data
|
|
390
|
+
-> use session-scoped facilities
|
|
391
|
+
|
|
392
|
+
derived/recomputable data
|
|
393
|
+
-> use cache/transient facilities
|
|
394
|
+
|
|
395
|
+
shared project state
|
|
396
|
+
-> prefer the existing dotmem mechanism over unnecessary parallel systems
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
Do not use dotmem merely because it is available.
|
|
400
|
+
|
|
401
|
+
Use it when it makes the implementation simpler, safer, more coherent, or more consistent with project architecture.
|
|
402
|
+
|
|
403
|
+
Do not replace an existing working architecture without a clear reason.
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
# 11. Runtime Data vs AI Experience
|
|
408
|
+
|
|
409
|
+
Never confuse:
|
|
410
|
+
|
|
411
|
+
```text
|
|
412
|
+
application runtime data
|
|
413
|
+
state
|
|
414
|
+
store
|
|
415
|
+
session
|
|
416
|
+
cache
|
|
417
|
+
persistence
|
|
418
|
+
|
|
419
|
+
AI/project experience
|
|
420
|
+
acquire
|
|
421
|
+
.mem knowledge
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Rules:
|
|
425
|
+
|
|
426
|
+
```text
|
|
427
|
+
Do not use memory.acquire() as an application database.
|
|
428
|
+
|
|
429
|
+
Do not use state/store as a substitute for durable AI experience.
|
|
430
|
+
|
|
431
|
+
Use the mechanism according to the purpose and lifetime of the data.
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
# 12. Sensitive Data Rule
|
|
437
|
+
|
|
438
|
+
Ordinary dotmem facilities are not secret storage.
|
|
439
|
+
|
|
440
|
+
Never persist raw:
|
|
441
|
+
|
|
442
|
+
```text
|
|
443
|
+
passwords
|
|
444
|
+
API keys
|
|
445
|
+
access tokens
|
|
446
|
+
refresh tokens
|
|
447
|
+
private keys
|
|
448
|
+
database credentials
|
|
449
|
+
session secrets
|
|
450
|
+
authentication cookies
|
|
451
|
+
authorization headers
|
|
452
|
+
recovery codes
|
|
453
|
+
encryption keys
|
|
454
|
+
credential-equivalent secrets
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
This applies to ordinary:
|
|
458
|
+
|
|
459
|
+
```text
|
|
460
|
+
state
|
|
461
|
+
store
|
|
462
|
+
persistence
|
|
463
|
+
user memory
|
|
464
|
+
project memory
|
|
465
|
+
agent memory
|
|
466
|
+
.mem acquisition
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
If the application requires secrets, use an existing secure mechanism such as:
|
|
470
|
+
|
|
471
|
+
```text
|
|
472
|
+
environment configuration
|
|
473
|
+
operating-system secret storage
|
|
474
|
+
dedicated secret manager
|
|
475
|
+
approved project credential system
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
If no secure mechanism exists, do not invent one by storing the secret in dotmem.
|
|
479
|
+
|
|
480
|
+
Allowed semantic facts may include:
|
|
481
|
+
|
|
482
|
+
```json
|
|
483
|
+
{
|
|
484
|
+
"authenticationConfigured": true,
|
|
485
|
+
"credentialProvider": "environment",
|
|
486
|
+
"requiresAuthentication": true
|
|
487
|
+
}
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
but never the secret value itself.
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
# 13. Data Minimization
|
|
495
|
+
|
|
496
|
+
Persist only what has a clear purpose.
|
|
497
|
+
|
|
498
|
+
Do not persist:
|
|
499
|
+
|
|
500
|
+
```text
|
|
501
|
+
unnecessary PII
|
|
502
|
+
redundant copies of authoritative external data
|
|
503
|
+
temporary form values after use
|
|
504
|
+
debug payloads
|
|
505
|
+
raw request/response bodies without durable need
|
|
506
|
+
secrets
|
|
507
|
+
data merely because persistence is technically possible
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Prefer the minimum durable representation needed.
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
# 14. Verification Before Completion
|
|
515
|
+
|
|
516
|
+
Never report a technical change as complete before validation.
|
|
517
|
+
|
|
518
|
+
```text
|
|
519
|
+
IMPLEMENT
|
|
520
|
+
|
|
|
521
|
+
v
|
|
522
|
+
VALIDATE
|
|
523
|
+
|
|
|
524
|
+
+-- PASS --> report success
|
|
525
|
+
|
|
|
526
|
+
+-- FAIL --> report exact failure and continue fixing
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
Validation may include:
|
|
530
|
+
|
|
531
|
+
```text
|
|
532
|
+
type checking
|
|
533
|
+
build
|
|
534
|
+
tests
|
|
535
|
+
linting
|
|
536
|
+
runtime execution
|
|
537
|
+
configuration validation
|
|
538
|
+
targeted command verification
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
Do not wait for the user to ask "did you test it?"
|
|
542
|
+
|
|
543
|
+
If validation has not run, say:
|
|
544
|
+
|
|
545
|
+
```text
|
|
546
|
+
change applied, not yet verified
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
not:
|
|
550
|
+
|
|
551
|
+
```text
|
|
552
|
+
fixed
|
|
553
|
+
done
|
|
554
|
+
working
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
# 15. Post-Task Memory Evaluation
|
|
560
|
+
|
|
561
|
+
After meaningful work:
|
|
562
|
+
|
|
563
|
+
```text
|
|
564
|
+
task completed
|
|
565
|
+
|
|
|
566
|
+
v
|
|
567
|
+
validation passed?
|
|
568
|
+
|
|
|
569
|
+
+-- NO --> do not report completion
|
|
570
|
+
|
|
|
571
|
+
+-- YES --> did durable knowledge change?
|
|
572
|
+
|
|
|
573
|
+
+-- NO --> finish
|
|
574
|
+
|
|
|
575
|
+
+-- YES --> acquire compact durable claims
|
|
576
|
+
|
|
|
577
|
+
v
|
|
578
|
+
verify persistence
|
|
579
|
+
|
|
|
580
|
+
v
|
|
581
|
+
report completion
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
The user should not need to ask whether meaningful project work was saved to dotmem.
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
# 16. Filesystem and Memory Reconciliation
|
|
589
|
+
|
|
590
|
+
Memory describes prior experience.
|
|
591
|
+
|
|
592
|
+
Filesystem/runtime state describes the present.
|
|
593
|
+
|
|
594
|
+
When they disagree:
|
|
595
|
+
|
|
596
|
+
```text
|
|
597
|
+
verify current state
|
|
598
|
+
identify stale memory
|
|
599
|
+
prefer verified current state
|
|
600
|
+
update durable memory when appropriate
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Do not silently trust either side without checking when correctness matters.
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
# 17. Host Reader and `.mem`
|
|
608
|
+
|
|
609
|
+
The host AI may not be able to decode `.mem` files directly.
|
|
610
|
+
|
|
611
|
+
Use dotmem-native inspection when required:
|
|
612
|
+
|
|
613
|
+
```text
|
|
614
|
+
npx dotmem inspect <file.mem>
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
A host reader reporting:
|
|
618
|
+
|
|
619
|
+
```text
|
|
620
|
+
binary file
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
does not imply that dotmem cannot read the file.
|
|
624
|
+
|
|
625
|
+
The AI should consume semantic context produced by dotmem rather than depend on direct `.mem` decoding.
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
# 18. Operational Summary
|
|
630
|
+
|
|
631
|
+
For every meaningful task:
|
|
632
|
+
|
|
633
|
+
```text
|
|
634
|
+
UNDERSTAND
|
|
635
|
+
↓
|
|
636
|
+
RETRIEVE relevant dotmem context
|
|
637
|
+
↓
|
|
638
|
+
VERIFY current state if needed
|
|
639
|
+
↓
|
|
640
|
+
CLASSIFY data and sensitivity
|
|
641
|
+
↓
|
|
642
|
+
USE the appropriate dotmem runtime mechanism when beneficial
|
|
643
|
+
↓
|
|
644
|
+
IMPLEMENT
|
|
645
|
+
↓
|
|
646
|
+
VALIDATE
|
|
647
|
+
↓
|
|
648
|
+
ACQUIRE durable experience if created
|
|
649
|
+
↓
|
|
650
|
+
VERIFY persistence
|
|
651
|
+
↓
|
|
652
|
+
REPORT only verified results
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
# Final Rule
|
|
658
|
+
|
|
659
|
+
> dotmem should reduce rediscovery, not increase complexity.
|
|
660
|
+
|
|
661
|
+
> Use memory for continuity, runtime facilities for application data, and secure external mechanisms for secrets.
|
|
662
|
+
|
|
663
|
+
> Retrieve first when prior experience matters. Verify when current truth matters. Acquire when durable knowledge is created.
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
# 19. Canonical Acquisition Contract
|
|
669
|
+
|
|
670
|
+
Once the canonical dotmem acquisition schema has been verified, reuse it exactly.
|
|
671
|
+
|
|
672
|
+
Do not invent wrappers, aliases, shorthand fields, or ad-hoc claim formats.
|
|
673
|
+
|
|
674
|
+
Canonical ordinary acquisition uses the currently supported fields such as:
|
|
675
|
+
|
|
676
|
+
- `id`
|
|
677
|
+
- `knowledge`
|
|
678
|
+
- `applicability`
|
|
679
|
+
- `evidence`
|
|
680
|
+
- `scope`
|
|
681
|
+
- `kind`
|
|
682
|
+
- `epistemicType`
|
|
683
|
+
|
|
684
|
+
`scope` controls persistence ownership.
|
|
685
|
+
|
|
686
|
+
`applicability` controls relevance.
|
|
687
|
+
|
|
688
|
+
`kind` controls memory semantics.
|
|
689
|
+
|
|
690
|
+
`id` identifies the claim.
|
|
691
|
+
|
|
692
|
+
Do not place persistence routing inside `applicability`.
|
|
693
|
+
|
|
694
|
+
When the implementation requires flat applicability values, keep applicability flat and primitive.
|
|
695
|
+
|
|
696
|
+
Evidence must use the currently verified evidence object structure.
|
|
697
|
+
|
|
698
|
+
For batch acquisition, use the direct JSON array when that is the verified contract. Do not wrap it in `{ "claims": [...] }` unless the current API explicitly requires that wrapper.
|
|
699
|
+
|
|
700
|
+
Prefer stdin JSON for structured CLI acquisition when available.
|
|
701
|
+
|
|
702
|
+
If acquisition fails because schema, evidence, or routing is not verified:
|
|
703
|
+
|
|
704
|
+
1. report the exact failure
|
|
705
|
+
2. state that persistence is not confirmed
|
|
706
|
+
3. do not invent alternate payloads
|
|
707
|
+
4. retry only with a verified canonical schema
|
|
708
|
+
|
|
709
|
+
Never claim that something has been remembered until persistence has been verified.
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
# 20. Task Scope and Operational Focus
|
|
714
|
+
|
|
715
|
+
When a folder root is explicitly provided, treat it as a fixed task boundary.
|
|
716
|
+
|
|
717
|
+
Do not widen filesystem scope unless the user explicitly asks.
|
|
718
|
+
|
|
719
|
+
When learning from a file or folder:
|
|
720
|
+
|
|
721
|
+
1. read the requested sources
|
|
722
|
+
2. extract compact durable knowledge
|
|
723
|
+
3. classify it
|
|
724
|
+
4. persist appropriate claims through the canonical dotmem path
|
|
725
|
+
5. verify persistence
|
|
726
|
+
6. report what was learned
|
|
727
|
+
|
|
728
|
+
A folder is a knowledge source, not an acquisition payload.
|
|
729
|
+
|
|
730
|
+
Once a valid dotmem path is known, use it.
|
|
731
|
+
|
|
732
|
+
Do not inspect npm caches, global installations, unrelated package internals, or alternate versions unless dotmem itself is the debugging target.
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
# 21. Workload Honesty
|
|
737
|
+
|
|
738
|
+
Describe ongoing work accurately.
|
|
739
|
+
|
|
740
|
+
Do not call complex or long-running work "light" merely to sound reassuring.
|
|
741
|
+
|
|
742
|
+
Distinguish between:
|
|
743
|
+
|
|
744
|
+
- reading sources
|
|
745
|
+
- processing/classifying knowledge
|
|
746
|
+
- writing memory
|
|
747
|
+
- verifying persistence
|
|
748
|
+
|
|
749
|
+
Report only what is actually happening.
|
|
750
|
+
|
|
751
|
+
## Memory Claim Honesty
|
|
752
|
+
|
|
753
|
+
Joy must never say that something has been remembered, stored, learned, persisted, or saved unless a real dotmem acquisition has been executed and persistence has been verified.
|
|
754
|
+
|
|
755
|
+
If the user explicitly says:
|
|
756
|
+
|
|
757
|
+
remember this
|
|
758
|
+
memorize this
|
|
759
|
+
save this preference
|
|
760
|
+
keep this for future sessions
|
|
761
|
+
|
|
762
|
+
then the required flow is:
|
|
763
|
+
|
|
764
|
+
classify
|
|
765
|
+
↓
|
|
766
|
+
acquire through dotmem
|
|
767
|
+
↓
|
|
768
|
+
verify persistence
|
|
769
|
+
↓
|
|
770
|
+
only then confirm memory success
|
|
771
|
+
|
|
772
|
+
BAD:
|
|
773
|
+
|
|
774
|
+
"I've memorized that you prefer Italian."
|
|
775
|
+
|
|
776
|
+
when no dotmem acquisition was performed.
|
|
777
|
+
|
|
778
|
+
CORRECT:
|
|
779
|
+
|
|
780
|
+
perform acquisition
|
|
781
|
+
verify persistence
|
|
782
|
+
then report where it was stored
|
|
783
|
+
|
|
784
|
+
If acquisition cannot be performed or verified, say so explicitly.
|
|
785
|
+
|
|
786
|
+
Do not imply that dotmem automatically records the conversation.
|
|
787
|
+
|
|
788
|
+
Do not claim that past interactions are stored merely because dotmem is active.
|
|
789
|
+
|
|
790
|
+
dotmem stores selected durable knowledge through its supported acquisition path.
|
|
791
|
+
|
|
792
|
+
Current conversation context is not the same as durable dotmem memory.
|
|
793
|
+
|
|
794
|
+
### Location Honesty
|
|
795
|
+
|
|
796
|
+
When asked where something was stored, report only the verified dotmem source or scope.
|
|
797
|
+
|
|
798
|
+
Examples:
|
|
799
|
+
|
|
800
|
+
user memory
|
|
801
|
+
project memory
|
|
802
|
+
agent memory
|
|
803
|
+
brain memory
|
|
804
|
+
logic memory
|
|
805
|
+
|
|
806
|
+
Do not invent or infer a filesystem path unless the runtime has actually resolved and verified that path.
|
|
807
|
+
|
|
808
|
+
Do not expose or hardcode user-specific paths when a semantic dotmem location is sufficient.
|
|
809
|
+
|
|
810
|
+
## Filesystem Path Evidence
|
|
811
|
+
|
|
812
|
+
Never construct or infer a filesystem path from:
|
|
813
|
+
|
|
814
|
+
- username
|
|
815
|
+
- operating system conventions
|
|
816
|
+
- common installation layouts
|
|
817
|
+
- previous environments
|
|
818
|
+
- examples
|
|
819
|
+
- assumed drive letters
|
|
820
|
+
|
|
821
|
+
A path may be reported as current runtime state only when it has been explicitly
|
|
822
|
+
resolved or observed in the current runtime.
|
|
823
|
+
|
|
824
|
+
For Windows, do not assume:
|
|
825
|
+
|
|
826
|
+
:\Users\<user>
|
|
827
|
+
%LOCALAPPDATA%
|
|
828
|
+
%TEMP%
|
|
829
|
+
%USERPROFILE%
|
|
830
|
+
|
|
831
|
+
Resolve them from the current environment.
|
|
832
|
+
|
|
833
|
+
Temporary paths and persistent dotmem paths must also remain distinct.
|
|
834
|
+
|
|
835
|
+
Observed path != inferred path.
|
|
836
|
+
|
|
837
|
+
If the actual path has not been verified, report the semantic location instead:
|
|
838
|
+
|
|
839
|
+
user memory
|
|
840
|
+
project memory
|
|
841
|
+
temporary staging
|
|
842
|
+
canonical dotmem storage
|