docs(oss): record the memory contract decision (ADR-0007)

ADR-0007 maps today's memory usage onto the contract and mem0: profile
card and tasks move to waggle.db, learned facts stay in mem0, extraction
runs in the background in batches. Research notes cover what mem0 3.3.1
does and how 68 files use memory today. Two defects found on the way are
logged for the main project (UF-025, UF-026).
This commit is contained in:
shumeiko.it
2026-10-18 14:28:13 +02:00
parent cd6553061b
commit 10ad678547
7 changed files with 299 additions and 6 deletions

View File

@@ -53,6 +53,8 @@ Baseline: commit `b20b138` of `git.os-dev.tech/oleg.m/waggle-os`.
| UF-022 | Unit tests write into the developer's real `~/.waggle` | Fixed | Tests |
| UF-023 | Four unit-test files fail on macOS | Open | Tests, macOS |
| UF-024 | Workspace packages import packages they do not declare | Fixed | Build, packaging |
| UF-025 | Workspace chat writes entities and error-path messages into personal memory | Open | Memory, privacy |
| UF-026 | Three memory tools of the agent are never wired | Open | Agent, memory |
## Entries
@@ -244,3 +246,21 @@ Entries UF-010 to UF-019 come from the UI audit `anti-slop/audit-001-2026-10-14.
- Cause: no check compares imports with declared dependencies.
- What we did: declared the missing dependencies (`playwright-core` as an optional peer, because `agent` loads it only when available; `@waggle/server` as a dev dependency of `launcher`, because its build bundles `@waggle/*`), removed the unused ones, and added `scripts/check-workspace-deps.mjs` (`npm run check:deps`) to CI.
- Recommendation: apply the same declarations in the main project and run the check in CI.
### UF-025. Workspace chat writes entities and error-path messages into personal memory
- Status: Open
- Found: 2026-10-16
- Where: `packages/server/src/local/index.ts:1298` (`createSessionOrchestrator` builds every session orchestrator on `multiMind.personal`); `packages/server/src/local/routes/chat.ts:3435` and `:3786`
- Symptom: in a workspace chat, entities extracted from the agent's answer and, on the error path, the user's message are written to the personal mind, not to the workspace mind. The comment at `chat.ts:3428` says they go to "the knowledge graph of the active workspace mind". Workspace content leaks into personal memory, which follows the user into every other workspace.
- Cause: `getKnowledge()`, `getFrames()` and `getSessions()` on the orchestrator return the layers of the database it was built on, which is always the personal one; the workspace mind is only attached with `setWorkspaceMind`.
- What we did: nothing in the old code. Found by reading the code, not reproduced at runtime. In the community edition these writes move to the memory contract in P1.5, where the scope is explicit on every call.
- Recommendation: write through the workspace layers when a workspace mind is attached, and add a test that a workspace chat leaves the personal mind unchanged.
### UF-026. Three memory tools of the agent are never wired
- Status: Open
- Found: 2026-10-16
- Where: `packages/agent/src/orchestrator.ts:187` (the only `createMindTools` call); `packages/agent/src/tools.ts:96-109`, `:314`, `:474`, `:657`
- Symptom: `search_all_workspaces` searches only personal memory although its description promises all workspaces; `correct_knowledge` always answers "Feedback handler not available. Cannot correct knowledge."; the embedding-based duplicate check in `save_memory` never runs.
- Cause: `createMindTools` is called without `getAllWorkspaceSearches`, `feedback` and `embedder`, and each tool silently falls back when its dependency is missing.
- What we did: nothing in the old code. In the community edition these tools are rebuilt on the memory contract in P1.5.
- Recommendation: pass the three dependencies, or remove the tools whose dependency cannot be provided so the agent is not offered a tool that cannot work.