[EPIC][CORE] Library-first Symbolic Memory v1: durable semantic world model, learning history, federation, and zero-model recall #38

Open
opened 2026-09-08 01:57:03 +00:00 by nsaspy · 3 comments
Owner

Mission

Turn symbolic-memory into a reusable library-first SWI-Prolog semantic memory system with optional native/MCP/service adapters.

The repository is the durable world-model half of Machine Spirit. It stores exact source evidence and versioned symbolic semantics, exposes bounded query/projection/replay surfaces, and persists learning/promotion history without becoming a second semantic compiler, planner, expert runtime, or authority system.

applications (Zara / AgentProlog / Mara / StarIntel / others)
             ↓
      symbolic-memory library
             ↓
 exact source + append-only semantic ledger
 current/history/bitemporal projections
 indexes/query/attention/identity
 experience + learning/promotion history
 federation/redaction/integrity/replay
             ↓
       prolog-rlm semantic contracts/reasoners

Dependency direction remains:

symbolic-memory -> prolog-rlm
applications -> symbolic-memory
prolog-rlm -/-> symbolic-memory

prolog-rlm must remain usable entirely in-memory without this repository.

Existing implementation family to retain

  • #1 exact durable memory_remember + memory_get vertical slice
  • #4 durable general semantic-memory/world-model epic
  • #5 semantic compiler adapter + projection lifecycle
  • #6 append-only semantic ledger/current/history views
  • #7 general symbolic recall/query/reasoning
  • #8 resumable corpus/backfill ingestion
  • #9 native/MCP surface
  • #10 cross-memory identity/ontology reconciliation

Do not replace these with duplicates. New epics/slices refine and complete them.

Core architectural boundary

Symbolic Memory owns

  • public library/API and host lifecycle;
  • namespace/project/global/session identity and memory authority policy;
  • exact-source durability;
  • backend-neutral storage SPI;
  • append-only/bitemporal semantic ledger;
  • semantic projection generations and replay lineage;
  • current/history/world-model projections;
  • provenance/source-dependence and identity indexes;
  • bounded TAPS/OATH/MOSAIC/RACE-compatible projection persistence;
  • large-corpus ingestion/backfill/resume;
  • experience/candidate/promotion/quarantine/drift persistence for EPOCH/CITADEL;
  • SAFIRE segments/frontiers/checkpoints/projection invalidation;
  • GRIE redaction/integrity lifecycle;
  • CLFM federation/replica/anti-entropy persistence;
  • thin native/MCP/service adapters;
  • crash/replay/scaling/conformance tests.

Prolog-RLM owns

  • #392 semantic IR / meaning algebra;
  • #393 semantic compilation/SCL/SCC;
  • #394 epistemic consequence semantics;
  • #395 semantic conformance semantics;
  • #396 compiler/projection library contract;
  • #376-#387 expert runtime and VERIFY/Repair/Review;
  • #397-#405 Machine Spirit reasoning/research contracts;
  • EPOCH/CITADEL promotion decision semantics.

Symbolic Memory persists promotion inputs/outputs/history; it does not independently decide that a learned rule is safe.

Library shape

Target public modules conceptually:

library(symbolic_memory)
library(symbolic_memory/source)
library(symbolic_memory/ledger)
library(symbolic_memory/semantic)
library(symbolic_memory/query)
library(symbolic_memory/provenance)
library(symbolic_memory/identity)
library(symbolic_memory/attention)
library(symbolic_memory/experience)
library(symbolic_memory/federation)
library(symbolic_memory/admin)

Exact module split follows implementation evidence; transport adapters call these modules and own no semantics.

Delivery model

Implementation is organized as subsystem epics plus ordered vertical slices. A slice should land one coherent capability with local tests and integrate through the existing library boundary. Avoid one-ticket-per-function micro-slicing.

The intended progression is approximately:

library/source foundation
→ append-only semantic ledger
→ temporal/current/epistemic projections
→ indexes + identity + general query
→ bounded symbolic attention
→ corpus ingestion
→ experience/learning history
→ SAFIRE scaling
→ GRIE/CLFM federation/integrity
→ native/MCP adapters
→ end-to-end conformance/benchmarks

Global hard invariants

source durability != semantic projection success
semantic knowledge != execution authority
record identity != proposition/assertion/event/commit identity
withdraw(P) != assert(not(P))
current view != canonical history
retrieved != warranted
similar != same identity
replica != corroborating source
candidate != admitted learned knowledge
admitted knowledge != capability/authority
remote requery != exact replay
cache/projection != canonical ledger

Known symbolic recall/query/replay/learning-history operations target providers disabled and model_calls = 0.

North-star executable acceptance

After restart, with original prose absent from model context:

  1. remember exact heterogeneous source material;
  2. symbolize it through Prolog-RLM and persist full semantic IR;
  3. query taxonomy/facts/rules/defaults/time/causality/procedure/constraints/conflicting claims;
  4. expose support, counterevidence and exact provenance;
  5. return a bounded dependency-complete projection;
  6. reconcile reversible identities across memories;
  7. record one execution experience and a candidate learned lesson;
  8. persist independent evaluation/promotion/quarantine/drift lineage;
  9. replay exact historical state at an explicit frontier;
  10. restart/rebuild derived state and obtain equivalent normalized answers;
  11. execute known symbolic recall/reasoning with model_calls = 0;
  12. prove remembered actions/policies never grant host authority.

Scale/distributed claims require benchmark/failure-injection evidence, not design prose.

Program management

This epic is the umbrella implementation graph. Child epics may close independently when their executable acceptance passes. Existing #4-#10 remain canonical for their subject areas and should be cross-linked rather than superseded without evidence.

## Mission Turn `symbolic-memory` into a reusable **library-first SWI-Prolog semantic memory system** with optional native/MCP/service adapters. The repository is the durable world-model half of Machine Spirit. It stores exact source evidence and versioned symbolic semantics, exposes bounded query/projection/replay surfaces, and persists learning/promotion history without becoming a second semantic compiler, planner, expert runtime, or authority system. ```text applications (Zara / AgentProlog / Mara / StarIntel / others) ↓ symbolic-memory library ↓ exact source + append-only semantic ledger current/history/bitemporal projections indexes/query/attention/identity experience + learning/promotion history federation/redaction/integrity/replay ↓ prolog-rlm semantic contracts/reasoners ``` Dependency direction remains: ```text symbolic-memory -> prolog-rlm applications -> symbolic-memory prolog-rlm -/-> symbolic-memory ``` `prolog-rlm` must remain usable entirely in-memory without this repository. ## Existing implementation family to retain - #1 exact durable `memory_remember` + `memory_get` vertical slice - #4 durable general semantic-memory/world-model epic - #5 semantic compiler adapter + projection lifecycle - #6 append-only semantic ledger/current/history views - #7 general symbolic recall/query/reasoning - #8 resumable corpus/backfill ingestion - #9 native/MCP surface - #10 cross-memory identity/ontology reconciliation Do not replace these with duplicates. New epics/slices refine and complete them. ## Core architectural boundary ### Symbolic Memory owns - public library/API and host lifecycle; - namespace/project/global/session identity and memory authority policy; - exact-source durability; - backend-neutral storage SPI; - append-only/bitemporal semantic ledger; - semantic projection generations and replay lineage; - current/history/world-model projections; - provenance/source-dependence and identity indexes; - bounded TAPS/OATH/MOSAIC/RACE-compatible projection persistence; - large-corpus ingestion/backfill/resume; - experience/candidate/promotion/quarantine/drift persistence for EPOCH/CITADEL; - SAFIRE segments/frontiers/checkpoints/projection invalidation; - GRIE redaction/integrity lifecycle; - CLFM federation/replica/anti-entropy persistence; - thin native/MCP/service adapters; - crash/replay/scaling/conformance tests. ### Prolog-RLM owns - #392 semantic IR / meaning algebra; - #393 semantic compilation/SCL/SCC; - #394 epistemic consequence semantics; - #395 semantic conformance semantics; - #396 compiler/projection library contract; - #376-#387 expert runtime and VERIFY/Repair/Review; - #397-#405 Machine Spirit reasoning/research contracts; - EPOCH/CITADEL promotion *decision semantics*. Symbolic Memory persists promotion inputs/outputs/history; it does not independently decide that a learned rule is safe. ## Library shape Target public modules conceptually: ```text library(symbolic_memory) library(symbolic_memory/source) library(symbolic_memory/ledger) library(symbolic_memory/semantic) library(symbolic_memory/query) library(symbolic_memory/provenance) library(symbolic_memory/identity) library(symbolic_memory/attention) library(symbolic_memory/experience) library(symbolic_memory/federation) library(symbolic_memory/admin) ``` Exact module split follows implementation evidence; transport adapters call these modules and own no semantics. ## Delivery model Implementation is organized as subsystem epics plus ordered **vertical slices**. A slice should land one coherent capability with local tests and integrate through the existing library boundary. Avoid one-ticket-per-function micro-slicing. The intended progression is approximately: ```text library/source foundation → append-only semantic ledger → temporal/current/epistemic projections → indexes + identity + general query → bounded symbolic attention → corpus ingestion → experience/learning history → SAFIRE scaling → GRIE/CLFM federation/integrity → native/MCP adapters → end-to-end conformance/benchmarks ``` ## Global hard invariants ```text source durability != semantic projection success semantic knowledge != execution authority record identity != proposition/assertion/event/commit identity withdraw(P) != assert(not(P)) current view != canonical history retrieved != warranted similar != same identity replica != corroborating source candidate != admitted learned knowledge admitted knowledge != capability/authority remote requery != exact replay cache/projection != canonical ledger ``` Known symbolic recall/query/replay/learning-history operations target providers disabled and `model_calls = 0`. ## North-star executable acceptance After restart, with original prose absent from model context: 1. remember exact heterogeneous source material; 2. symbolize it through Prolog-RLM and persist full semantic IR; 3. query taxonomy/facts/rules/defaults/time/causality/procedure/constraints/conflicting claims; 4. expose support, counterevidence and exact provenance; 5. return a bounded dependency-complete projection; 6. reconcile reversible identities across memories; 7. record one execution experience and a candidate learned lesson; 8. persist independent evaluation/promotion/quarantine/drift lineage; 9. replay exact historical state at an explicit frontier; 10. restart/rebuild derived state and obtain equivalent normalized answers; 11. execute known symbolic recall/reasoning with `model_calls = 0`; 12. prove remembered actions/policies never grant host authority. Scale/distributed claims require benchmark/failure-injection evidence, not design prose. ## Program management This epic is the umbrella implementation graph. Child epics may close independently when their executable acceptance passes. Existing #4-#10 remain canonical for their subject areas and should be cross-linked rather than superseded without evidence.
Author
Owner

Canonical implementation graph — library-first Symbolic Memory v1

The implementation decomposition is now complete. Existing #1/#4-#10 remain canonical requirements/legacy verticals; the new epics/slices make them executable in bounded PR-sized work.

Subsystem epics

  • #12 CORE-A — library/runtime/source/namespace/authority/storage SPI
  • #13 CORE-B — append-only ledger + SAFIRE storage/frontiers/checkpoints/replay
  • #14 CORE-C — world-model query + epistemics/provenance/identity/TAPS attention
  • #15 CORE-D — semantic projection + corpus ingestion/backfill
  • #16 CORE-E — EPOCH/CITADEL experience + learning/promotion history
  • #17 CORE-F — CLFM federation + GRIE integrity/redaction/retention
  • #18 CORE-G — thin native/MCP/service adapters
  • #19 CORE-H — conformance/failure injection/migration/benchmarks/north-star integration

Existing #4 remains the durable-general-semantic-world-model domain epic and cross-cuts the implementation graph.

Ordered slices

  1. #1 — existing durable memory_remember + memory_get vertical slice
  2. #20 — library facade / SWI pack / store lifecycle / backend SPI
  3. #21 — namespace + principal/capability + trust + audit
  4. #22 — Prolog-RLM semantic compiler adapter + projection lifecycle
  5. #23 — append-only full semantic-IR commit protocol
  6. #24 — bitemporal current/history/lifecycle projections
  7. #25 — epistemic support graph + justification/provenance/counterevidence
  8. #26 — general semantic indexes
  9. #27 — reversible identity/ontology + source-dependence groups
  10. #28 — general semantic query API
  11. #29 — TAPS/OATH bounded dependency-complete projection
  12. #30 — RACE cursor/cache/generation/replay receipts
  13. #31 — resumable corpus/backfill work engine
  14. #32 — structured LLM-log/issues/docs/JSONL/web/trace adapters
  15. #33 — immutable reasoning/execution experience ledger
  16. #34 — candidate/evaluation/promotion lifecycle persistence
  17. #35 — CITADEL evidence roles/exposure/contamination lineage
  18. #36 — drift/calibration/quarantine/counterexample/baseline receipts
  19. #37 — SAFIRE segmented production backend + frontiers/manifests/checkpoints
  20. #38 — projection DAG + dependency generations + selective invalidation/rebuild
  21. #39 — GRIE redaction/retention/integrity/payload availability
  22. #40 — CLFM federation/replica/anti-entropy/fork/remote obligations
  23. #41 — backup/restore/integrity verification/disaster-recovery lineage
  24. #42 — native/MCP adapters over the library
  25. #43 — deterministic cross-domain conformance + crash/failure injection
  26. #44 — backend migration + scale benchmark harness
  27. #45 — Symbolic Memory v1 north-star end-to-end integration gate

Parallelism / worker lanes

The numbering is conceptual delivery order, not a requirement to serialize every later task.

Hard early spine:

#1 -> #20 -> #21 -> #22 -> #23

After #23, workers may branch subject to each issue's explicit dependencies:

world-model lane: #24 -> #25 -> #26 -> #27 -> #28 -> #29 -> #30
ingestion lane:   #31 -> #32
learning lane:    #33 -> #34 -> #35 -> #36
scale lane:       #37 -> #38
governance lane:  #39 -> #40 and #41
transport lane:   #42
closure lane:     #43 -> #44 -> #45

The issue Depends on: fields override this shorthand.

Worker rule

Workers must implement the smallest currently dependency-ready slice. Do not treat #11, #4, or subsystem epics as direct coding tickets. Do not widen a slice to pull later semantic/scaling/federation work forward merely because the API has an extension point.

Definition of v1

#45 is the only integration issue allowed to claim Symbolic Memory v1 implementation complete, and only after executable provider-disabled north-star acceptance passes. It does not claim Machine Spirit complete; that remains gated by prolog-rlm#405.

## Canonical implementation graph — library-first Symbolic Memory v1 The implementation decomposition is now complete. Existing #1/#4-#10 remain canonical requirements/legacy verticals; the new epics/slices make them executable in bounded PR-sized work. ### Subsystem epics - #12 **CORE-A** — library/runtime/source/namespace/authority/storage SPI - #13 **CORE-B** — append-only ledger + SAFIRE storage/frontiers/checkpoints/replay - #14 **CORE-C** — world-model query + epistemics/provenance/identity/TAPS attention - #15 **CORE-D** — semantic projection + corpus ingestion/backfill - #16 **CORE-E** — EPOCH/CITADEL experience + learning/promotion history - #17 **CORE-F** — CLFM federation + GRIE integrity/redaction/retention - #18 **CORE-G** — thin native/MCP/service adapters - #19 **CORE-H** — conformance/failure injection/migration/benchmarks/north-star integration Existing #4 remains the durable-general-semantic-world-model domain epic and cross-cuts the implementation graph. ### Ordered slices 1. **#1** — existing durable `memory_remember` + `memory_get` vertical slice 2. **#20** — library facade / SWI pack / store lifecycle / backend SPI 3. **#21** — namespace + principal/capability + trust + audit 4. **#22** — Prolog-RLM semantic compiler adapter + projection lifecycle 5. **#23** — append-only full semantic-IR commit protocol 6. **#24** — bitemporal current/history/lifecycle projections 7. **#25** — epistemic support graph + justification/provenance/counterevidence 8. **#26** — general semantic indexes 9. **#27** — reversible identity/ontology + source-dependence groups 10. **#28** — general semantic query API 11. **#29** — TAPS/OATH bounded dependency-complete projection 12. **#30** — RACE cursor/cache/generation/replay receipts 13. **#31** — resumable corpus/backfill work engine 14. **#32** — structured LLM-log/issues/docs/JSONL/web/trace adapters 15. **#33** — immutable reasoning/execution experience ledger 16. **#34** — candidate/evaluation/promotion lifecycle persistence 17. **#35** — CITADEL evidence roles/exposure/contamination lineage 18. **#36** — drift/calibration/quarantine/counterexample/baseline receipts 19. **#37** — SAFIRE segmented production backend + frontiers/manifests/checkpoints 20. **#38** — projection DAG + dependency generations + selective invalidation/rebuild 21. **#39** — GRIE redaction/retention/integrity/payload availability 22. **#40** — CLFM federation/replica/anti-entropy/fork/remote obligations 23. **#41** — backup/restore/integrity verification/disaster-recovery lineage 24. **#42** — native/MCP adapters over the library 25. **#43** — deterministic cross-domain conformance + crash/failure injection 26. **#44** — backend migration + scale benchmark harness 27. **#45** — Symbolic Memory v1 north-star end-to-end integration gate ### Parallelism / worker lanes The numbering is conceptual delivery order, not a requirement to serialize every later task. Hard early spine: ```text #1 -> #20 -> #21 -> #22 -> #23 ``` After #23, workers may branch subject to each issue's explicit dependencies: ```text world-model lane: #24 -> #25 -> #26 -> #27 -> #28 -> #29 -> #30 ingestion lane: #31 -> #32 learning lane: #33 -> #34 -> #35 -> #36 scale lane: #37 -> #38 governance lane: #39 -> #40 and #41 transport lane: #42 closure lane: #43 -> #44 -> #45 ``` The issue `Depends on:` fields override this shorthand. ### Worker rule Workers must implement the smallest currently dependency-ready slice. Do not treat #11, #4, or subsystem epics as direct coding tickets. Do not widen a slice to pull later semantic/scaling/federation work forward merely because the API has an extension point. ### Definition of v1 #45 is the only integration issue allowed to claim **Symbolic Memory v1 implementation complete**, and only after executable provider-disabled north-star acceptance passes. It does **not** claim Machine Spirit complete; that remains gated by `prolog-rlm#405`.
Author
Owner

Machine Spirit #405A baseline synthesis handoff

Depth 8A in prolog-rlm#405 adopts COVENANT-MS and preserves this repository's library-first boundary.

Symbolic Memory is the durable half of the contract spine: exact source, append-only/bitemporal semantic history, exact world/frontier cuts, indexes/provenance/source-dependence/identity, bounded projection mechanics, corpus jobs, experience/candidate/promotion history and replay/invalidation. It does not become the semantic compiler, epistemic consequence engine, planner/expert runtime, VERIFY authority or promotion-decision engine.

Required direction remains:

symbolic-memory -> prolog-rlm
prolog-rlm -/-> symbolic-memory

COVENANT adds a cross-layer ms_run_envelope/conformance capsule so durable query/projection results name exact world cut, schema/profile and relevant generations. A cached/current view is never the canonical history, and a memory/learned-object record never grants host authority.

The bounded single-ledger functional spine for the first Machine Spirit fixture is roughly #1 -> #20/#21 -> #22 -> #23 -> #24 -> #25 -> #26 -> #27 -> #28 -> #29, plus experience/promotion-history #33-#36. SAFIRE #37/#38 is required before exact scalable frontier/replay claims; federation/redaction claims require their own gates.

Refs lost-rob0t/prolog-rlm#397/#405 and #4-#10 #19 #43 #45.

## Machine Spirit #405A baseline synthesis handoff Depth 8A in `prolog-rlm#405` adopts **COVENANT-MS** and preserves this repository's library-first boundary. Symbolic Memory is the durable half of the contract spine: exact source, append-only/bitemporal semantic history, exact world/frontier cuts, indexes/provenance/source-dependence/identity, bounded projection mechanics, corpus jobs, experience/candidate/promotion history and replay/invalidation. It does **not** become the semantic compiler, epistemic consequence engine, planner/expert runtime, VERIFY authority or promotion-decision engine. Required direction remains: ```text symbolic-memory -> prolog-rlm prolog-rlm -/-> symbolic-memory ``` COVENANT adds a cross-layer `ms_run_envelope`/conformance capsule so durable query/projection results name exact world cut, schema/profile and relevant generations. A cached/current view is never the canonical history, and a memory/learned-object record never grants host authority. The bounded single-ledger functional spine for the first Machine Spirit fixture is roughly #1 -> #20/#21 -> #22 -> #23 -> #24 -> #25 -> #26 -> #27 -> #28 -> #29, plus experience/promotion-history #33-#36. SAFIRE #37/#38 is required before exact scalable frontier/replay claims; federation/redaction claims require their own gates. Refs lost-rob0t/prolog-rlm#397/#405 and #4-#10 #19 #43 #45.
Author
Owner

Machine Spirit #405D executable-conformance handoff: current main provides the useful RAGE-001 exact memory_remember → durable source/memory/audit → memory_get foundation, but it does not yet satisfy the Machine Spirit durable-world-model/replay bar. The repo's own IMPLEMENTATION-STATUS.md correctly says authored tests are not green until actually executed; #402 also records that the current whole-snapshot backend is not SAFIRE. #405D therefore assigns this repo MSD-LEDGER-*, MSD-ATTN-*, learning-history and replay/fault evidence: append-only semantic records/frontiers, restart/rebuild/current/history equivalence, identity/provenance/dependence generations, cold/warm/cache-drop/incremental differential results, crash injection, resource ceilings and provider-disabled known-symbolic paths. Parent prolog-rlm#397 now contains a proposed Cycle-2 ranking, blocked on operator authorization.

Machine Spirit #405D executable-conformance handoff: current `main` provides the useful RAGE-001 exact `memory_remember → durable source/memory/audit → memory_get` foundation, but it does not yet satisfy the Machine Spirit durable-world-model/replay bar. The repo's own `IMPLEMENTATION-STATUS.md` correctly says authored tests are not green until actually executed; #402 also records that the current whole-snapshot backend is not SAFIRE. #405D therefore assigns this repo `MSD-LEDGER-*`, `MSD-ATTN-*`, learning-history and replay/fault evidence: append-only semantic records/frontiers, restart/rebuild/current/history equivalence, identity/provenance/dependence generations, cold/warm/cache-drop/incremental differential results, crash injection, resource ceilings and provider-disabled known-symbolic paths. Parent prolog-rlm#397 now contains a proposed Cycle-2 ranking, blocked on operator authorization.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/symbolic-memory#38
No description provided.