[semantic-memory] Expose general semantic ingestion, query, provenance, and bounded world-model projections through native/MCP tools #40
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/symbolic-memory#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #4
Depends on: #5, #6, #7
Related: #8
Upstream: prolog-rlm#388/#392-#396
Goal
Expose the full general semantic-memory feature to agents, Prolog-RLM, editors and other clients through a thin native/MCP surface over the library APIs.
The transport layer owns no memory semantics and no compiler logic.
General tool surface
Provide closed tools equivalent to:
Specialized convenience tools such as
memory_proceduremay exist, but they must sit on the general query substrate and must not fork semantics.Knowledge coverage
Tools must be able to query/project arbitrary upstream semantic IR classes, including:
Do not expose only
factsandprocedureswhile silently dropping other knowledge classes.Remember and symbolize stay distinct
A convenience option may request symbolization after remember, but source commit remains independent and authoritative.
Bounded projection
For any goal/query, return only relevant mixed semantic records plus compact provenance refs rather than the full long-term world model.
Example:
may return:
Source expansion
Any returned semantic record/result can resolve back to exact original source spans when caller read authority permits it.
Prolog-RLM integration
Allow Prolog-RLM hosts to register semantic-memory recall as an optional external capability without reversing dependency direction.
Distinguish clearly:
Query result semantics
Transport must preserve structured status and not collapse to prose:
and carry supporting record/provenance refs, temporal/scenario scope, assumptions/defaults/exceptions, and unresolved conditions.
Authority/security
Acceptance
memory_semantic_projectionreturns bounded mixed records, not whole store.memory_semantic_explainresolves derived result to rules/records/source spans.Refs #4-#8 and prolog-rlm#388/#392-#396.
Machine Spirit #401C handoff — transport must preserve procedural admission/loss semantics
Native/MCP procedure query/projection tools should preserve PIFF status/receipts rather than collapse a remembered procedure to
available=true.For relevant calls expose whether knowledge is merely represented, semantically compatible, execution-projectable, host-bound, capability-available, or currently authority-admissible, plus mapping/PSC versions, declared losses, guarantees/fairness assumptions and unbound actions.
Transport must not turn semantic procedure/action names into executable tools. A caller seeing
restart_service, a BPMN service task, BT action leaf or Golog action symbol receives inert semantic data unless trusted host code separately maps it and canonical capability/authority/effect admission succeeds. See prolog-rlm#401 Depth-4C.Upstream Machine Spirit #401D transport handoff
When procedure knowledge is exposed through native/MCP surfaces, preserve DPEC's status/loss boundaries. A tool result must be able to distinguish a procedure that is merely
representedfromcompatible,projectable,bound, andcurrently_admissible.For any host-executable projection, expose compact refs to:
Do not expose a remembered semantic action as a direct execution tool merely because names match. Transport remains thin; authority/effect admission stays in the host/runtime. Full computational design is on prolog-rlm#401.
MACHINE-SPIRIT #402B handoff — transport status preservation
Native/MCP surfaces must preserve GRIE lifecycle/integrity outcomes rather than flattening them to not-found/false:
redacted,quarantined,integrity_failure,replay_degraded, and sanitizationpartial|pending|blocked|failedwhere exposed. Redaction/purge is a separately authorized mutation; remembered policy text or semantic actions never grant that authority. Source/history expansion must not leak deleted/private payload through hashes, IDs, provenance or stale caches.See prolog-rlm#402B for the full contract and B fixtures.
MACHINE-SPIRIT #402C handoff — native/MCP federation status preservation
Transport must preserve CLFM's structured federation semantics; no prose/Boolean flattening.
Native/MCP results should be able to expose at least:
Hard security boundary:
A valid SCITT/CT-style receipt must not be rendered as
true; it proves the specified integrity/transparency property only. Remote-unavailable/incomplete cuts remain partial outcomes, never ordinary false/unknown collapsed together. Federation query/replay after semantic projections exist remains a zero-model path. Full design: prolog-rlm#402C.Machine Spirit #402D handoff: native/MCP surfaces must preserve SAFIRE storage state rather than flatten it to prose. Return exact requested/materialized cut, freshness/completeness, integrity/redaction/replay status, and structured
resource_limited/partial-remote states. Bounded projection remains mandatory, and already-projected known symbolic tasks must remain capable ofmodel_calls = 0. See prolog-rlm#402 D17/D20-D21/D28/D36/D39.Machine Spirit prolog-rlm#403A handoff — transport preserves projection risk/closure
memory_semantic_projectionand related native/MCP surfaces must preserve the TAPS receipt rather than flattening output to prose/top-k records. At minimum expose:support_closure;search_coverage;Transport must preserve the distinction that a self-contained support-closed answer may still come from heuristic search coverage.
heuristic/partial_backendmay never becomecompletebecause the adapter returned successfully.Vector/graph/model ranking remains a candidate sensor, not truth, trust, identity or authority. Exact already-symbolized paths must continue to work with zero model calls. Semantic action terms in a projection remain inert.
Refs prolog-rlm#403 #381 #396 and symbolic-memory#7.
Upstream Machine Spirit #403B transport handoff
prolog-rlm#403Bis complete. Native/MCP projection surfaces must not flatten OATH-TAPS bounded-attention results intotop_k chunks + prose.Preserve structured exposure diagnostics including
support_closure,search_coverage,opposition_coverage, selection/canonical-revalidation status, freshness/source-independence/identity gaps, sensor disagreement, and exact-cut lineage.Transport/source text cannot set trusted
pinned,mandatory, trust, read-scope, freshness-exception or attention-profile fields. A retrieved document containing prompt/tool instructions remains source semantic content; it never becomes MCP/runtime control or execution authority.If an external/vector/lexical backend is unavailable or suspicious, surface degraded/partial coverage explicitly. Do not silently substitute a model or report the projection exhaustive. Refs lost-rob0t/prolog-rlm#403 #397 and symbolic-memory#7/#10.
MACHINE-SPIRIT prolog-rlm#403C handoff — transport must not flatten federation
Native/MCP
memory_semantic_projection/ query results should carry MOSAIC-TAPS interoperability receipts, not just ranked prose/chunks. Preserve backend identity/version, typed local score/rank semantics, cut/snapshot/freshness, translation loss, composition/fusion reason, coverage/opposition gaps, external-vs-canonical admission and scoped threat/robustness claims.Hard transport invariant:
Do not serialize them into one generic
confidence. Remote query egress also needs host capability/authority admission independent of memory read permission; denied egress should surface as an unavailable/unsatisfied retrieval obligation, not silently broaden authority.Refs lost-rob0t/prolog-rlm#397 #403 #381 #396 and symbolic-memory#7/#10.
Machine Spirit #403D transport handoff
Native/MCP projection/query surfaces must preserve RACE-TAPS execution semantics instead of flattening them to
results + score.Expose bounded structured fields for exact cut/freshness, support/search/opposition coverage, unsatisfied obligations/gaps, backend-local score/rank provenance, translation/fusion/closure receipts, replay class and resource-limit/cancellation status. Snapshot/cursor drift and remote partial coverage remain visible.
Do not expose optimizer/cache/latency statistics as truth/confidence. Do not let transport retry reorder/tie behavior change normalized results. Query egress authority remains separate from local read authority, including adaptive fallback to remote backends. A known symbolic query through native/MCP must still be provably
model_calls = 0.MACHINE-SPIRIT #404A handoff — native/MCP learning status
Future native/MCP projections for learned knowledge must preserve structured EPOCH state rather than return an undifferentiated
learned=trueflag. Expose exact candidate/admitted/suspended/superseded status, learned-object version, promotion/evaluation receipt refs, evidence/counterexample refs and provenance where authorized.Transport must not offer a shortcut that lets a client/model directly promote arbitrary candidate rules, register executable handlers, widen authority or mutate promotion/VERIFY policy. Any promotion action eventually exposed must be a closed capability-gated operation over an existing candidate and trusted versioned policy.
Ref upstream prolog-rlm#404A EPOCH.
Machine Spirit #404B / CITADEL-EPOCH native/MCP handoff
Transport must preserve the structured learning lifecycle and evidence limitations rather than flattening to
learned=true,promoted=trueorconfidence=N.Native/MCP surfaces for learned objects should preserve status/version, promotion receipt refs, applicability epoch/scope, contamination/independence findings, counterexample coverage, drift/calibration state and hard-guard/quarantine reason where present.
No transport caller may assert that evidence is independent, lower a promotion threshold, clear quarantine, or convert a candidate into admitted knowledge solely through request metadata. Those remain trusted #404 policy decisions. Learned semantic actions remain inert with respect to host authority exactly like all other remembered semantic actions. Refs prolog-rlm#404B.
Machine Spirit #404C handoff — transport must preserve learning-transfer semantics
Native/MCP export/import must carry the typed PACT-EPOCH/LAC envelope rather than flattening to
learned=true,approved=true, or one confidence score.Expose at least: artifact kind/version, source authority/promotion attestation, target-local status, applicability/transfer scope, guarantee status, verifier/policy fingerprints, drift/calibration epoch and bounded provenance/dependence refs. Import defaults to
foreign_candidate/evidence_onlyunless target policy locally admits it.No foreign artifact, attestation or expert composition may import executable handlers, credentials, capabilities or authority. Full design: prolog-rlm#404C.
Implementation decomposition
#9 remains the canonical native/MCP exposure requirement. The focused implementation slice is #42, under transport epic #18.
#42 must adapt already-working library calls from #20/#22/#28/#29/#31/#34 rather than implement memory semantics in MCP handlers. Direct-library and transport results must normalize equivalently for the same principal/store/frontier.
MACHINE-SPIRIT #404D transport refinement
Native/MCP transport for learned state must preserve the CLOCKWORK structured contract rather than return prose like
validated=true.Expose exact lifecycle/version, EvaluationSnapshot/profile ref, coverage class, dependence/independence status including
unknown, LAC/attestation/transfer refs, promotion decision receipt, drift/suspension state and replay frontier where authorized. Signature validity must remain distinct from semantic/local acceptance.Transport cannot trigger promotion by changing evaluator/verifier/metric parameters after snapshot freeze, cannot register handlers from candidate payloads, and cannot widen capability/authority. Direct library and transport queries must normalize equivalently. Refs prolog-rlm#404D and #16/#35/#36/#42.
prolog-rlm#405B AEGIS-MS transport handoff: native/MCP serialization must preserve control-vs-data role, influence/security labels, exact generations and structured stale/blocked states. A transport schema must never upgrade source/model/learned data into trusted control merely because it validates against a closed JSON/schema enum. Direct library and transport paths should fail identically for unendorsed verifier/profile/control identifiers and preserve all AEGIS lineage needed for end-to-end conformance.
Machine Spirit #405C / CONCORDAT transport handoff
Native/MCP/service adapters must preserve domain qualification and cross-domain status rather than flattening foreign results to prose/boolean success.
For federated calls, transport should carry/preserve exact refs for:
Transport authentication of a foreign caller/result is not semantic warrant or host authority. No adapter may merge trust domains or infer local principal binding from semantic identity.
Canonical research: lost-rob0t/prolog-rlm#405C.