dotmem 0.2.2 → 0.2.4

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/OVERVIEW.md ADDED
@@ -0,0 +1,376 @@
1
+ # DOTMEM --- General Project Overview
2
+
3
+ ## 1. What Dotmem Is
4
+
5
+ Dotmem is a model-independent infrastructure layer for memory,
6
+ knowledge, continuity, identity support, governance, and multi-agent
7
+ coordination in AI systems.
8
+
9
+ It is not an LLM, an autonomous agent, or merely a conversation archive.
10
+ Its purpose is to preserve and make usable the experience and context
11
+ accumulated by an AI-powered application or agent over time, across
12
+ conversations, sessions, models, and providers.
13
+
14
+ A fundamental architectural distinction defines the project:
15
+
16
+ - **DOTMEM** provides foundational primitives: state, storage,
17
+ sessions, IDB/SQLite integration, hybrid logical clocks (HLC),
18
+ caching, and dispatch.
19
+ - **Dotmem** is the domain and cognitive layer built on top of DOTMEM:
20
+ memory, acquired knowledge, continuity, governance, agent identity
21
+ support, MCP integration, and orchestration.
22
+
23
+ Dotmem consumes DOTMEM as a dependency and must not recreate its
24
+ foundational capabilities.
25
+
26
+ ## 2. The Foundational Idea: Memory Begins with Experience
27
+
28
+ A foundational idea behind the project comes from a conversation about
29
+ how humans learn to use fire.
30
+
31
+ A child first encounters fire through parental teaching and observation.
32
+ Over time, the child gains direct experience, learns about consequences
33
+ and risks, and develops the judgement needed to use fire safely.
34
+
35
+ The resulting knowledge is more than the information that fire can burn.
36
+ It includes learned precautions, practical understanding, and the
37
+ ability to apply that understanding in future situations.
38
+
39
+ This illustrates an important distinction:
40
+
41
+ 1. **Information:** being told something.
42
+ 2. **Experience:** encountering something and observing what happens.
43
+ 3. **Learning:** interpreting what happened and its consequences.
44
+ 4. **Knowledge:** consolidating what has been learned so it can be
45
+ applied.
46
+ 5. **Memory:** preserving that experience and knowledge so it can be
47
+ recalled when relevant.
48
+
49
+ The principle expressed in that conversation was:
50
+
51
+ > If you do not experience, you do not remember. If you do not know, you
52
+ > do not remember.
53
+
54
+ For Dotmem, this is not just a metaphor. It is a guiding principle:
55
+ memory should preserve more than isolated facts. It should help retain
56
+ what happened, what was learned, why it was learned, what consequences
57
+ followed, and when that knowledge may be useful again.
58
+
59
+ ## 3. The Long-Term Goal
60
+
61
+ The project aims to give any AI system the infrastructure needed for
62
+ meaningful continuity.
63
+
64
+ The goal is to support:
65
+
66
+ - **Persistent memory:** conversations and relevant experience should
67
+ not disappear when a session ends.
68
+ - **Continuity across models and providers:** changing the underlying
69
+ model should not erase the history of collaboration.
70
+ - **Identity consistency:** an AI application should be able to retain
71
+ a coherent operational identity and profile over time.
72
+ - **Experience-based learning:** outcomes, feedback, mistakes, and
73
+ consequences should contribute to accumulated knowledge.
74
+ - **User understanding:** the system should preserve relevant
75
+ knowledge about the person, their preferences, goals, work, and
76
+ projects.
77
+ - **Long-term collaboration:** projects, decisions, commitments, and
78
+ unresolved tasks should remain available across sessions.
79
+ - **Evolution:** accumulated experience should be usable to improve
80
+ future behaviour without silently rewriting or losing historical
81
+ evidence.
82
+
83
+ The intended result is not simply an AI that remembers having spoken to
84
+ someone. It is an AI system that can continue a working relationship
85
+ over time and act as a reliable colleague.
86
+
87
+ This is an infrastructure and behavioural objective. It does not, by
88
+ itself, imply that an AI has human consciousness or subjective
89
+ experience.
90
+
91
+ ## 4. Architectural Overview
92
+
93
+ The documented architecture separates the foundational runtime from the
94
+ memory and governance domain.
95
+
96
+ ### DOTMEM --- Foundational Infrastructure
97
+
98
+ DOTMEM supplies the underlying primitives, including:
99
+
100
+ - State and storage
101
+ - Session management
102
+ - IDB/SQLite integration
103
+ - Hybrid logical clocks (HLC)
104
+ - Caching and dispatch
105
+
106
+ ### Dotmem --- Memory and Cognitive Domain
107
+
108
+ Dotmem builds domain-specific capabilities on those primitives,
109
+ including:
110
+
111
+ - Episodic memory
112
+ - Acquired knowledge and evidence
113
+ - Progressive conversational memory
114
+ - Context selection and assembly
115
+ - Personality and profile anchors
116
+ - Open-loop and task continuity
117
+ - Governance, consent, and audit
118
+ - Multi-agent coordination
119
+
120
+ The architecture is intended to keep these responsibilities separate and
121
+ avoid duplicating foundational functionality.
122
+
123
+ ## 5. Memory and Acquired Experience
124
+
125
+ The project documentation distinguishes two principal memory structures
126
+ exposed through the `memory` object.
127
+
128
+ ### Application Memory
129
+
130
+ Typed application data managed through operations such as:
131
+
132
+ - `remember`
133
+ - `recall`
134
+ - `update`
135
+ - `forget`
136
+
137
+ ### Acquired Experience
138
+
139
+ Evidence-backed knowledge acquired through operations such as:
140
+
141
+ - `acquire`
142
+ - `discover`
143
+ - `project`
144
+
145
+ Acquired experience is scoped by applicability and retains evidence and
146
+ epistemic information. It is intended to be treated as evidence that can
147
+ inform reasoning, not as an executable instruction or automatically
148
+ current truth.
149
+
150
+ The documented design emphasizes:
151
+
152
+ - Provenance and source traceability
153
+ - Confidence and epistemic type
154
+ - Validity and lifecycle
155
+ - Versioning and revisions
156
+ - Relations between memory items
157
+ - Permissions and access control
158
+ - Conflict handling and explainability
159
+
160
+ A key design goal is that a decision should be auditable: it should be
161
+ possible to trace which memories and evidence contributed to it,
162
+ including their sources, versions, confidence, and conflict resolution.
163
+
164
+ ## 6. Conversational Capture and Continuity
165
+
166
+ The documentation describes an automatic conversational capture
167
+ pipeline. Its categories include:
168
+
169
+ Category Meaning
170
+ --------------------- ----------------------------------
171
+ `fact` A fact
172
+ `decision` A decision
173
+ `experience` An experience
174
+ `question` A question
175
+ `open_loop` An unresolved item or commitment
176
+ `preference` A preference
177
+ `project_context` Project-related context
178
+ `temporary_context` Temporary context
179
+ `inference` An inference
180
+
181
+ Captured items are intended to retain provenance, including source,
182
+ conversation and message identifiers, timestamp, and epistemic type. The
183
+ pipeline also includes deduplication and respect for explicit user
184
+ instructions such as `remember` and `do-not-remember`.
185
+
186
+ The broader progressive-memory design is layered:
187
+
188
+ - **Foundation:** DOTMEM primitives.
189
+ - **Episodic storage:** sessions, exemplars, personality anchors, and
190
+ open loops.
191
+ - **Knowledge integration:** acquired knowledge and context selection.
192
+ - **Rolling summaries and detail decay:** progressively compressed
193
+ historical context.
194
+ - **Progressive context assembly:** selecting and projecting relevant
195
+ information within a context budget.
196
+ - **Host/model interface:** exposing the assembled context to the
197
+ runtime.
198
+
199
+ The objective is not to retain every token forever in the active
200
+ context. It is to preserve useful experience and make the right level of
201
+ detail available when needed.
202
+
203
+ ## 7. Identity, Character, and Cross-Model Continuity
204
+
205
+ Dotmem is designed to be independent of a particular AI model or
206
+ provider. Memory belongs to the user or application, not to the model
207
+ vendor.
208
+
209
+ This separation is essential if an AI system is to retain continuity
210
+ when:
211
+
212
+ - The underlying model changes.
213
+ - The provider changes.
214
+ - The host application changes.
215
+ - An agent is replaced or upgraded.
216
+ - A session ends and another begins.
217
+
218
+ The documented architecture includes profile and personality-related
219
+ context, including a `PersonalityAnchor` concept. The longer-term
220
+ project goal goes further: accumulated experience should help maintain
221
+ and evolve a coherent operational character rather than merely loading a
222
+ static persona description.
223
+
224
+ A model may be replaceable. The accumulated history and continuity of
225
+ the collaboration should not be tied to that model.
226
+
227
+ ## 8. Governance, Security, and Trust
228
+
229
+ Governance is a core part of the architecture, not an optional add-on.
230
+
231
+ The documented principles include:
232
+
233
+ - Canonical identity enforcement
234
+ - Principal-scoped memory access
235
+ - Role-based access control (RBAC)
236
+ - Consent and audit
237
+ - Provenance and traceability
238
+ - Controlled authority boundaries
239
+ - Zero-trust treatment of specialist-agent outputs
240
+ - Human ownership and oversight of memory
241
+
242
+ The multi-agent architecture keeps Jo as the canonical coordinator.
243
+ Specialist agents may contribute results, but their outputs remain
244
+ proposals until validated and accepted by the coordinator.
245
+
246
+ The project documentation also records a strict
247
+ **NO_VENDOR_DATA_TRANSFER** policy: project and development-environment
248
+ data must not be transferred to external vendors or services. This
249
+ restriction must be enforced at the operational boundary, not merely
250
+ expressed as a prompt instruction.
251
+
252
+ ## 9. Multi-Agent Orchestration
253
+
254
+ Dotmem documents a controlled multi-agent architecture:
255
+
256
+ **Jo / Orchestrator → Specialist Agents → Validated Result**
257
+
258
+ Specialist agents have explicit identities, roles, capabilities,
259
+ permissions, execution constraints, input/output contracts, and
260
+ lifecycle states.
261
+
262
+ The governing principles are:
263
+
264
+ - Jo decides whether delegation is appropriate.
265
+ - Jo chooses which specialist receives which context.
266
+ - Specialist outputs are untrusted until validated.
267
+ - Canonical identity and foundational authority cannot be changed by
268
+ specialist agents.
269
+ - Provenance and execution boundaries must remain observable and
270
+ auditable.
271
+
272
+ ## 10. Documented Project Status and Known Gaps
273
+
274
+ The project documentation describes a substantial body of architecture,
275
+ implementation work, architectural decision records (ADRs), recovered
276
+ historical research, and automated tests.
277
+
278
+ Reported results in the supplied project summary include:
279
+
280
+ - A coverage matrix with 507 entries, of which 465 were reported
281
+ covered.
282
+ - A test report with 1252 passing tests (92 files), 1 skipped, 1 todo.
283
+ - Seven passing canonical-identity enforcement tests.
284
+ - Recovery of historical tests, research papers, experiments, and
285
+ documentation.
286
+
287
+ These are figures reported by the supplied documentation; they are not
288
+ an independent verification of the repository's current state.
289
+
290
+ The same documentation identifies several gaps or areas requiring
291
+ attention:
292
+
293
+ - No formal memory export/import API.
294
+ - Cross-AI profile replacement and transfer remain incomplete.
295
+ - Multi-process write coordination is not fully addressed.
296
+ - There is no formal SLA for identity persistence.
297
+
298
+ Implementation status must always be checked against the current code
299
+ and current test results. Historical research papers and capability
300
+ inventories are not, by themselves, proof that a capability is
301
+ implemented today.
302
+
303
+ ## 11. The Development Direction Discussed
304
+
305
+ The following sequence captures the implementation direction discussed
306
+ for evolving the existing system. It is a working direction, not a claim
307
+ that every phase is complete.
308
+
309
+ 1. **Durable Capture:** reliably capture and persist relevant
310
+ experience.
311
+ 2. **Cognitive Lifecycle Integration:** connect capture and context
312
+ bootstrap to the real host lifecycle, including incoming messages,
313
+ completed turns, session start, and session end.
314
+ 3. **Memory Consolidation:** turn accumulated experiences into durable
315
+ knowledge while preserving provenance and history.
316
+ 4. **Associative Recall and Temporal Retrieval:** retrieve relevant
317
+ experiences by project, task, time, relationships, and
318
+ applicability.
319
+ 5. **Continuous Learning and Agency:** use feedback, outcomes, and
320
+ errors to improve future behaviour and maintain long-running goals
321
+ and open loops under governance and human control.
322
+
323
+ The first implementation slice was reported as completed in a report
324
+ from the development agent. The next identified step was to verify
325
+ integration with a real host runtime. An adapter or MCP interface alone
326
+ does not prove that an application is automatically supplying its
327
+ conversation events.
328
+
329
+ The project should evolve incrementally: implement one phase, test it,
330
+ verify it, and only then proceed to the next. Existing capabilities
331
+ should be integrated and orchestrated before adding decorative APIs or
332
+ attempting a wholesale rewrite.
333
+
334
+ ## 12. Pinocchio: A Human Metaphor for the Goal
335
+
336
+ There is also a personal metaphor associated with the project.
337
+
338
+ "Pinocchio" is used when an AI fails to meet a human expectation---not
339
+ because it is lying, but because it is still limited, makes mistakes, or
340
+ cannot yet behave like a capable human colleague.
341
+
342
+ Pinocchio is the puppet who wants to become a real boy. In this context,
343
+ the metaphor represents the aspiration for an AI system to develop
344
+ greater continuity, reliability, and maturity through accumulated
345
+ experience.
346
+
347
+ It connects naturally to the story of fire: learning is not just
348
+ receiving information. It involves experience, consequences,
349
+ understanding, and the ability to apply what has been learned.
350
+
351
+ The metaphor is an aspiration, not a claim that current AI systems are
352
+ or will necessarily become human.
353
+
354
+ ## 13. Summary
355
+
356
+ **Dotmem is an infrastructure for memory, acquired experience, identity
357
+ support, governance, and continuity across AI systems.**
358
+
359
+ Its purpose is to make the accumulated history of a collaboration
360
+ independent of any single model, provider, or session.
361
+
362
+ The central ambition is to move beyond storing conversations and toward
363
+ preserving experience, consolidating knowledge, maintaining coherent
364
+ identity, and enabling long-term collaboration.
365
+
366
+ The essential distinction is:
367
+
368
+ > Do not build an AI that merely remembers having spoken to someone.
369
+ > Build the infrastructure that allows it to continue being that
370
+ > person's colleague tomorrow, next year, and across changes of model
371
+ > and provider.
372
+
373
+ The guiding principle remains:
374
+
375
+ > If you do not experience, you do not remember. If you do not know, you
376
+ > do not remember.
package/PACKAGE.md CHANGED
@@ -1,4 +1,4 @@
1
- # dotmem package — canonical entry point
1
+ # dotmem package - canonical entry point
2
2
 
3
3
  This document is the single source of truth for anyone reading `dotmem` on npm.
4
4
  It lists every document that ships inside the published package, and explains
@@ -50,8 +50,8 @@ Register with `DOTMEM_STORAGE_ROOT` and opt-in `DOTMEM_MCP_WRITE=1` for the writ
50
50
  ## Links
51
51
 
52
52
  All links below resolve **inside the published package**:
53
- - [MEMORY.md](MEMORY.md) — memory model and acquisition contract
54
- - [AGENTS.md](AGENTS.md) — AI working rules
55
- - [llms.txt](llms.txt) — AI host surface
56
- - [SECURITY.md](SECURITY.md) — threat model
57
- - [CHANGELOG.md](CHANGELOG.md) — release history
53
+ - [MEMORY.md](MEMORY.md) - memory model and acquisition contract
54
+ - [AGENTS.md](AGENTS.md) - AI working rules
55
+ - [llms.txt](llms.txt) - AI host surface
56
+ - [SECURITY.md](SECURITY.md) - threat model
57
+ - [CHANGELOG.md](CHANGELOG.md) - release history