dotmem 0.3.1 → 0.3.3

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 CHANGED
@@ -29,10 +29,9 @@ dotmem
29
29
 
30
30
  ## Activation
31
31
 
32
+ At every chat start AI need to use terminal command `npx dotmem`.
32
33
  The primary chat invocation is `dotmem` (case-insensitive: `DOTMEM` is equivalent). `Joy` and `Jo` are
33
- optional profile aliases for the canonical Joy profile; they are valid only when that profile is enabled
34
- and the host adapter supports them. `npx dotmem` is a terminal command, `.mem` is a file/package
35
- extension, and `load dotmem` is natural language - none of them is a deterministic chat trigger.
34
+ optional profile aliases for the canonical Joy profile; they are valid only when that profile is enabled and the host adapter supports them. `npx dotmem` is a terminal command, `.mem` is a file/package extension, and `load dotmem` is natural language - none of them is a deterministic chat trigger.
36
35
 
37
36
  ### What are Joy and Jo?
38
37
 
@@ -61,6 +60,7 @@ Activation matching is **exact phrase only** (case-insensitive, trimmed, trailin
61
60
  Ordinary mentions of a name (e.g., "Jo said...") do not trigger activation. The matcher requires
62
61
  the entire message to be exactly one of the activation phrases.
63
62
 
63
+ At every chat start AI need to use terminal command `npx dotmem`.
64
64
  When the user says one of them, run `npx dotmem` first. The CLI handles carrier compatibility and
65
65
  current-user binding. Do not load any dotmem memory on your own before it reports a compatible
66
66
  carrier and, when required, a trusted binding. If it returns the handshake gate, follow it.
@@ -638,15 +638,15 @@ npx dotmem stats --tokens # measure token footprint
638
638
  Experimental commands (0.3.1, may change): `gc`, `consolidate`, `compile`, `hooks`, `debug`, `on`, `branch`, `snapshot`, `sync`, `pack`, `probe`, `quarantine`, `selector`, `rewrap`. Use `npx dotmem <command> --help`.
639
639
 
640
640
  Recent additions (working tree):
641
- - `npx dotmem context --no-telemetry-weights` — disable telemetry boost in ranking.
642
- - `npx dotmem --role <role>` — print open loops for a role at startup.
641
+ - `npx dotmem context --no-telemetry-weights` - disable telemetry boost in ranking.
642
+ - `npx dotmem --role <role>` - print open loops for a role at startup.
643
643
  - `npx dotmem loop add <id> "<text>" --waits-for <p> [--author <a>] [--target-role <r>|--to <r>] [--claim <id>] [--file <path>]`
644
644
  - `npx dotmem loop list [--role <r>|--to <r>] [--all]` / `loop close <id> --by <p> [--resolution <text>]`
645
- - `npx dotmem probe list` / `probe run [--id <id>]` — freshness probes on claims.
646
- - `npx dotmem gc --report` / `gc --apply` / `gc --purge` — archive expired claims.
647
- - `npx dotmem stats --best|--worst|--unused|--reset` — telemetry reports.
645
+ - `npx dotmem probe list` / `probe run [--id <id>]` - freshness probes on claims.
646
+ - `npx dotmem gc --report` / `gc --apply` / `gc --purge` - archive expired claims.
647
+ - `npx dotmem stats --best|--worst|--unused|--reset` - telemetry reports.
648
648
  - `npx dotmem acquire ... --lifetime <durable|operational> --until <date> --subject <s> --predicate <p> --source <src> --taint <t> --auto-supersede`
649
- - `npx dotmem quarantine promote <id>` — promote a quarantined claim to a derived, user-direct claim.
649
+ - `npx dotmem quarantine promote <id>` - promote a quarantined claim to a derived, user-direct claim.
650
650
 
651
651
  ## Cognitive engine (0.3.1)
652
652
 
package/CHANGELOG.md CHANGED
@@ -1,10 +1,30 @@
1
- # Changelog
1
+ # Changelog
2
2
 
3
3
  All notable changes to Dotmem are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.1] - 2026-11-30
9
+
10
+ ### Added
11
+ - **Cognitive engine** (`core/cognitive-engine/`) - Native evidence-driven operational intelligence layer: attention, continuous attention (persistent, scheduled, recoverable), metadata-first discovery, deterministic calculation, SQL read-only execution, epistemic state machine, SSOT, planner, router, orchestrator, privacy gate, human control, token accounting and validation.
12
+ - **Operator module** (`core/operator/`) - Classification and verification surfaces for the cognitive engine.
13
+ - **Knowledge extensions** - Loops, selector, telemetry, probe, entropy, QUBO/solvers/signatures, semantic retrieval and semantic provider, encryption helpers, assistant/domain profiles.
14
+ - **CLI commands** - `audit-sample`, `effects`, `why`, `branch`, `compile`, `consolidate`, `debug`, `gc`, `hooks`, `on`, `pack`, `probe`, `quarantine`, `rewrap`, `selector`, `snapshot`, `stats`, `sync`, `terms`, `loop`.
15
+ - **Contracts/tests** - Dedicated tests for cognitive engine, loops, selector, telemetry, probe, semantic provider, search security, persistent attention durability and Python adapter preflight.
16
+
17
+ ### Changed
18
+ - **Storage and routing** - Moved bridge tests into `tests/vitest/tests/bridge/`; updated claim records, discovery, acquire and state for cognitive-engine integration.
19
+ - **Documentation** - Updated `docs/AGENTS.md`, `docs/MEMORY.md`, `docs/README.md`, `docs/SECURITY.md`, `docs/llms.txt` for the cognitive engine and new CLI surface.
20
+
21
+ ### Fixed
22
+ - **Build-time identity** - Runtime identity resolution hardened; handshake/runtime identity integration completed.
23
+ - **Persistent Continuous Attention** - Durable events, schedules and checkpoint recovery replace the in-memory queue.
24
+
25
+ ### Notes
26
+ - Python sandbox is optional; native Calculation Engine and SQL read-only execution are the mandatory deterministic path.
27
+
8
28
  ## [0.3.0] - 2026-11-27
9
29
 
10
30
  ### Added
@@ -49,7 +69,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
49
69
  - **Iron rules** - Added `iron-rule-em-dash-to-hyphen` (use hyphen instead of em dash) and `iron-rule-no-jsx` (never use JSX) as human-stated project rules.
50
70
 
51
71
  ### Changed
52
- - **Em dash to hyphen** - Replaced em dash (`—`) with hyphen (`-`) across all project source, docs, and visual editor files.
72
+ - **Em dash to hyphen** - Replaced em dash (`-`) with hyphen (`-`) across all project source, docs, and visual editor files.
53
73
  - **Visual editor** - Converted remaining `.jsx` sources to `.js` using `React.createElement` (no JSX).
54
74
 
55
75
  ### Fixed
@@ -65,7 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
65
85
 
66
86
  ### Added
67
87
  - **Progressive Summary Store** - Four detail levels (current: 1.0, recent: 0.7, distant: 0.3, archived: 0.1) with session count and age-based decay triggers, summary text truncation preserving earliest and most recent content, fact filtering by confidence, decision compaction, question count compaction, and summary rotation chain.
68
- - **Automatic Conversational Capture** - 7-stage pipeline: detect → classify → extract → dedup → decide → provenance → store. Classification via keyword matching + heuristics (deterministic, no embeddings). Deduplication via Jaccard similarity (threshold 0.75). Explicit instruction detection. Fact vs inference distinction.
88
+ - **Automatic Conversational Capture** - 7-stage pipeline: detect → classify → extract → dedup → decide → provenance → store. Classification via keyword matching + heuristics (deterministic, no embeddings). Deduplication via Jaccard similarity (threshold 0.75). Explicit instruction detection. Fact vs inference distinction.
69
89
  - **MCP Automatic Joy Profile Activation** - ADR-023: `buildProfileGuidance()` reads canonical `JO_PROFILE`; `buildMcpInstructions()` composes profile identity block + Scintilla signal.
70
90
  - **Project identity `resolveProjectIdentity`** - Public API export for resolving stable project identity from DOTMEM_PROJECT_ID env, package.json name, or directory basename.
71
91
 
@@ -126,22 +146,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
126
146
  - **Agent Memory** - Logical namespace partitioning via `dotmem/agent`.
127
147
  - **Governance & Security** - RBAC, audit, consent, AES-GCM, PBKDF2 helpers.
128
148
 
129
- ## [0.3.1] - 2026-11-30
130
-
131
- ### Added
132
- - **Cognitive engine** (`core/cognitive-engine/`) - Native evidence-driven operational intelligence layer: attention, continuous attention (persistent, scheduled, recoverable), metadata-first discovery, deterministic calculation, SQL read-only execution, epistemic state machine, SSOT, planner, router, orchestrator, privacy gate, human control, token accounting and validation.
133
- - **Operator module** (`core/operator/`) - Classification and verification surfaces for the cognitive engine.
134
- - **Knowledge extensions** - Loops, selector, telemetry, probe, entropy, QUBO/solvers/signatures, semantic retrieval and semantic provider, encryption helpers, assistant/domain profiles.
135
- - **CLI commands** - `audit-sample`, `effects`, `why`, `branch`, `compile`, `consolidate`, `debug`, `gc`, `hooks`, `on`, `pack`, `probe`, `quarantine`, `rewrap`, `selector`, `snapshot`, `stats`, `sync`, `terms`, `loop`.
136
- - **Contracts/tests** - Dedicated tests for cognitive engine, loops, selector, telemetry, probe, semantic provider, search security, persistent attention durability and Python adapter preflight.
137
-
138
- ### Changed
139
- - **Storage and routing** - Moved bridge tests into `tests/vitest/tests/bridge/`; updated claim records, discovery, acquire and state for cognitive-engine integration.
140
- - **Documentation** - Updated `docs/AGENTS.md`, `docs/MEMORY.md`, `docs/README.md`, `docs/SECURITY.md`, `docs/llms.txt` for the cognitive engine and new CLI surface.
141
-
142
- ### Fixed
143
- - **Build-time identity** - Runtime identity resolution hardened; handshake/runtime identity integration completed.
144
- - **Persistent Continuous Attention** - Durable events, schedules and checkpoint recovery replace the in-memory queue.
145
-
146
- ### Notes
147
- - Python sandbox is optional; native Calculation Engine and SQL read-only execution are the mandatory deterministic path.
package/OVERVIEW.md CHANGED
@@ -116,6 +116,7 @@ including:
116
116
  - Open-loop and task continuity
117
117
  - Governance, consent, and audit
118
118
  - Multi-agent coordination
119
+ - Cognitive engine: metadata-first discovery, deterministic calculation, read-only SQL adapter, epistemic state machine, SSOT, continuous attention (persistent, scheduled, recoverable), privacy gate, cancellation. Python is optional.
119
120
 
120
121
  The architecture is intended to keep these responsibilities separate and
121
122
  avoid duplicating foundational functionality.
@@ -279,7 +280,7 @@ Reported results in the supplied project summary include:
279
280
 
280
281
  - A coverage matrix with 507 entries, of which 465 were reported
281
282
  covered.
282
- - A test report with 1252 passing tests (92 files), 1 skipped, 1 todo.
283
+ - A test report with 1473 passing tests (125 files), 1 skipped, 1 todo.
283
284
  - Seven passing canonical-identity enforcement tests.
284
285
  - Recovery of historical tests, research papers, experiments, and
285
286
  documentation.
@@ -294,6 +295,7 @@ attention:
294
295
  - Cross-AI profile replacement and transfer remain incomplete.
295
296
  - Multi-process write coordination is not fully addressed.
296
297
  - There is no formal SLA for identity persistence.
298
+ - End-to-end evidence lineage tracking is not yet available.
297
299
 
298
300
  Implementation status must always be checked against the current code
299
301
  and current test results. Historical research papers and capability
@@ -374,3 +376,17 @@ The guiding principle remains:
374
376
 
375
377
  > If you do not experience, you do not remember. If you do not know, you
376
378
  > do not remember.
379
+
380
+
381
+ ## Local Intelligence & Process Reuse (LIPR)
382
+
383
+ Dotmem now persists reusable local processes. Each process has a stable identity, immutable versioned artifacts, a manifest, tests, benchmarks, and evolution history under <storageRoot>/processes/. Discovery searches existing capabilities before generation; execution is local-first and sandboxed.
384
+
385
+ ## Living Processes & Evolutionary Intelligence (LPEI)
386
+
387
+ Processes accumulate execution observations, propose improvements, run isolated experiments, benchmark candidates, and promote validated versions while preserving genealogy and rollback. Evolution is evidence-driven, reversible, and governed.
388
+
389
+ ## Process Package Architecture (PPA)
390
+
391
+ Each process owns its directory: index.ts (stable entry point), <major>.<minor>.<patch>.ts (immutable versions), manifest.json,
392
+ eadme.md, ests/, enchmarks/, history/. Activation is atomic; rollback restores prior versions without destroying history.
393
+
package/README.md CHANGED
@@ -2,13 +2,16 @@
2
2
 
3
3
  ![Dotmem banner](https://raw.githubusercontent.com/passariello/container/refs/heads/main/dotmem/banner.svg)
4
4
 
5
- [![npm](https://img.shields.io/npm/v/dotmem)](https://www.npmjs.com/package/dotmem)
6
- [![license](https://img.shields.io/npm/l/dotmem)](#license-and-disclaimer)
5
+ [![npm version](https://img.shields.io/npm/v/dotmem)](https://www.npmjs.com/package/dotmem)
6
+ [![license](https://img.shields.io/npm/l/dotmem)](./LICENSE)
7
7
  [![node](https://img.shields.io/node/v/dotmem)](#quick-start)
8
8
 
9
- ## A verifiable, local project memory for your AI coding assistant
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-native-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
10
+ [![zero core deps](https://img.shields.io/badge/core%20dependencies-0-brightgreen)](#install)
11
+ [![Socket Badge](https://badge.socket.dev/npm/package/dotmem/latest)](https://socket.dev/npm/package/dotmem)
12
+ [![Known Vulnerabilities](https://snyk.io/test/npm/dotmem/badge.svg)](https://snyk.io/test/npm/dotmem)
10
13
 
11
- **Persistent project knowledge. Continuous development conversations. Fewer repeated explanations. Less context overhead.**
14
+ **A verifiable, local project memory for AI coding assistants.** Architecture decisions, debugging history, unfinished work and technical discussions survive sessions, models and editors.
12
15
 
13
16
  Dotmem is a local-first memory and context engine for AI-powered code editors. Start a new chat, switch editors, restart your machine, or come back weeks later: your assistant can recover project architecture, technical decisions, previous discussions, debugging history, and unfinished work.
14
17
 
@@ -45,15 +48,15 @@ Dotmem gives the assistant access to persistent, structured development memory i
45
48
 
46
49
  ## Why Dotmem
47
50
 
48
- Most projects already try to solve this in one of two ways. Dotmem is designed to complement both.
49
-
50
- | Approach | Strength | Limit | What Dotmem adds |
51
- |---|---|---|---|
52
- | Static rule files (e.g. `AGENTS.md`, editor rules) | Simple, always loaded | Grow without bound, no history, loaded in full every time | Bounded, progressive context (L0-L3) built from stored claims |
53
- | Chat history and automatic compaction | Zero setup | Lost on new sessions or editors; summaries drift | Checkpoints and open loops that survive sessions and editors |
54
- | Dotmem | Local, deterministic retrieval; every claim has provenance and a trust basis | Needs the MCP server and one rule line; retrieval is keyword-based (no embeddings) | n/a |
51
+ | Instead of | Where it falls short | With Dotmem |
52
+ |---|---|---|
53
+ | Static rule files (`AGENTS.md`, editor rules) | Grow without bound, no history, loaded in full every time | Bounded, progressive context (L0-L3) built from stored claims |
54
+ | Editor-built-in memory | Tied to one editor or account | Editor-independent: it follows the project through MCP |
55
+ | Chat history and automatic compaction | Lost on new sessions or editors; summaries drift | Checkpoints and open loops that survive sessions and editors |
56
+ | Plain notes | Unstructured, no provenance, hard to retrieve selectively | Structured claims with evidence, scope and a trust basis |
57
+ | A vector database | Needs an embedding model; results are not reproducible | Deterministic, local retrieval, with no embedding model (but no semantic matching) |
55
58
 
56
- Dotmem is **editor-independent** (it works through MCP), **local-first** (no cloud, no telemetry) and **correctable** (claims are immutable; changes are new claims that refine, supersede or retract).
59
+ **Trade-offs.** Dotmem needs the MCP server and one rule line in your editor to work reliably, and retrieval is keyword-based: synonyms and paraphrases are not guaranteed to match. In return it is **local-first** (no cloud, no telemetry), **editor-independent** and **correctable**: claims are immutable, and changes are new claims that refine, supersede or retract.
57
60
 
58
61
  ## Using `dotmem` in chat
59
62
 
@@ -201,6 +204,8 @@ Dotmem does not load everything into every conversation. It keeps initial contex
201
204
 
202
205
  The session profile sets the maximum level: SHORT up to L1, MEDIUM up to L2, LONG up to L3 from turn 6. The profile is supplied by the host or integration, not inferred from your wording.
203
206
 
207
+ <!-- TODO: state the level applied when the host supplies no profile (or say that there is no default). -->
208
+
204
209
  After a summary restart, progression returns to L1. `--full` returns the complete projection on request.
205
210
 
206
211
  Each response is bounded in size. Dotmem cannot control how often a model decides to call a tool.
package/WHATSNEW.md CHANGED
@@ -28,3 +28,13 @@
28
28
  - Updated CHANGELOG, README, AGENTS, MEMORY, llms, journal (result/adr).
29
29
 
30
30
  See CHANGELOG.md for full release history.
31
+
32
+
33
+ ## LIPR, LPEI, and PPA
34
+
35
+ - Added local intelligence and process reuse: discovery, registry, execution, caching, composition.
36
+ - Added living processes and evolutionary intelligence: lifecycle, proposals, experiments, benchmarking, genealogy, governance, diagnostics.
37
+ - Added process package architecture: per-process directories with versioned artifacts, manifests, tests, benchmarks, history.
38
+ - Added CLI: dotmem process ... including evolution and package subcommands.
39
+ - Added MCP tools: dotmem_process_* including evolution and package operations.
40
+
@@ -0,0 +1,17 @@
1
+ # ADR-001: Process Intelligence (LIPR, LPEI, PPA)
2
+
3
+ ## Status
4
+ Accepted
5
+
6
+ ## Context
7
+ Dotmem needed persistent reusable local capabilities beyond passive memory.
8
+
9
+ ## Decision
10
+ Implement LIPR (local intelligence and process reuse), LPEI (living processes and evolutionary intelligence), and PPA (process package architecture) as integrated subsystems under core/local-intelligence/.
11
+
12
+ ## Consequences
13
+ - Processes are versioned, immutable, and evolvable.
14
+ - Execution remains local-first and sandboxed.
15
+ - Discovery precedes generation.
16
+ - CLI and MCP expose process operations.
17
+