Skip to content

opsx: memory-core-redesign — proposal, design, spec deltas, tasks#1570

Merged
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:openspec/memory-core-redesign
Jul 3, 2026
Merged

opsx: memory-core-redesign — proposal, design, spec deltas, tasks#1570
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:openspec/memory-core-redesign

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

What this is

The OpenSpec change for the memory-core structural redesign — the follow-on to the audit + quick wins in #1568. Planning artifacts only (no production code): proposal, design, spec deltas, and a six-slice task breakdown. openspec validate: passing, 17 deltas.

Framing

The July 2026 audit (#1568, docs/research/memory-audit-2026-07.md) showed the memory system has lots of mechanism but no judgment (the semantic layers never functioned) and no metabolism (nothing is ever merged, expired, or deleted). This change adds both and subtracts the dead structure three redesign cycles left behind:

Add judgment

  • memory-embeddings (new capability): in-process ONNX runtime (snowflake-arctic-embed 137M int8, CPU, zero sidecars), pinned hash-verified model allowlist with download-at-initialization, embed-on-write with derived backfill state, loud degradation (doctor + status + structured logs; lexical keeps serving, never silently).
  • Write-side dedup becomes nominate-by-embedding → decide-by-LLM through one shared evaluator for both pipelines (May 2026 measured: no cosine threshold separates duplicates from siblings, so similarity never auto-merges).
  • Read-side hybrid recall with an absolute cosine floor: turns where nothing is relevant inject nothing (the measured correct outcome for 65% of real queries).

Add metabolism

  • Lossless merges: LLM-synthesized merged bodies validated by a deterministic MergeGuard with structural-append fallback; raw whole-body overwrite becomes unreachable.
  • memory-maintenance (new capability): netclaw memory backfill-embeddings, ratified consolidation (dry-run plan files → operator-edited → backup-first apply), an expiry sweep that actually deletes (204/384 evidence records are currently expired-but-mummified), netclaw memory status.
  • Trace revival: the 72-hour short-lived memory class gets a reachable producer, fresh-recall eligibility, and real deletion.
  • Tool-use lesson memories: captured explicitly + by the sidecar, surfaced via per-tool context injection on first tool use per session.

Subtract

  • BREAKING (semantic fix): searchable recall mode leaves the automatic recall pool; formation defaults new durable facts to searchable (breaks the measured 97%-auto monoculture at the source).
  • The never-used hierarchical anchor-graph requirement is REMOVED (0 edges ever); facet inference (4 demo facets vs ~900 real) and the 95%-waste turn-complete checkpoint enqueue are retired.

Sequencing

Six independently-shippable slices (tasks.md): shared evaluator → embedding foundation → write-side nominate/decide → read-side hybrid → taxonomy/trace/lessons → maintenance + subtraction. Each slice carries its constitution gates; explicit measurement gate on ONNX query-embedding latency before the hybrid slice ships.

Relationship to other PRs

OpenSpec change for the memory-core structural redesign, grounded in the
July 2026 audit (PR netclaw-dev#1568, tools/recall-research/AUDIT-2026-07.md):

- New capabilities: memory-embeddings (in-process ONNX runtime, pinned
  allowlist provisioning, embed-on-write, loud degradation) and
  memory-maintenance (backfill, ratified consolidation with plan files,
  expiry sweep, memory status).
- netclaw-agent-memory deltas: hybrid recall with an absolute cosine floor
  (zero-injection turns are intended), nominate-by-embedding /
  decide-by-LLM curation through one shared evaluator, lossless merges
  with a deterministic MergeGuard, recall modes that mean what they say
  (searchable leaves the automatic pool), short-lived trace revival,
  tool-use lesson memories with per-tool context injection, checkpoint
  enqueue gating; the never-used hierarchical anchor graph requirement is
  removed.
- tasks.md: six independently-shippable slices with constitution gates.

openspec validate: passing (17 deltas).
…h/ — research tooling is repo-external (tools/recall-research is gitignored)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant