EPIC: Persistent Prolog KB memory, evidence, and typed state #4

Open
opened 2026-08-22 22:30:26 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-22 22:30:26 +00:00 (Migrated from github.com)

Parent: #1

Goal

Replace history-as-state and heuristic memory accumulation with explicit typed state, provenance, verification and lifecycle rules, with durable symbolic memory represented in persistent Prolog knowledge bases whenever the Prolog-RLM control plane is active.

State model

Active state should be compact and typed:

  • goal
  • constraints
  • current_plan
  • verified_facts
  • decisions
  • open_questions
  • failed_approaches
  • blockers
  • artifacts/evidence refs
  • next_action

Memory lifecycle

Candidate -> verified -> active -> superseded/expired.

Each durable item should carry provenance, scope, timestamps, confidence, verifier/evidence refs and supersession links. A generated "solution" is not durable merely because it sounded plausible.

Persistent Prolog KB contract

When _prolog_rlm is enabled, durable memory needed by symbolic reasoning must be persisted as queryable Prolog KB state rather than being available only through vector search or reconstructed prompt prose.

Requirements:

  • persistent across Agent Zero/container restarts when the user data volume persists;
  • project/profile/user scope represented explicitly;
  • typed facts/decisions/goals/constraints/evidence rather than one opaque text blob;
  • provenance and verification metadata retained with each durable item;
  • supersession/retraction represented explicitly;
  • deterministic query interface for Prolog-RLM context compilation and reasoning;
  • writes pass through epistemic validation/policy rather than arbitrary model assertz/1 access;
  • normal Prolog reasoning can consume recalled facts directly;
  • vector/semantic memory may remain as a complementary retrieval index, but is not the symbolic source of truth when the RLM path is active;
  • migrations/import from existing _memory data are bounded and reversible;
  • disabling Prolog-RLM must not silently destroy existing memory.

The single-plugin runtime/bridge path that exposes these KBs belongs to #8. This epic owns memory semantics, persistence, provenance, lifecycle, and migration behavior.

Artifact/evidence contract

Large tool results, traces and files live outside the provider prompt. Active context receives a compact typed observation such as status/facts/errors/evidence_refs/artifacts/state_delta.

Use rlm_artifact where its exact API is stable and covered; avoid coupling the bootstrap to conversation/evolution modules while their current regressions remain unresolved.

RAGE loop

Review Agent Zero memory recall/write/compaction paths -> analyze epistemic gaps and earliest safe hook -> generate typed candidate/state path + focused migrations/tests -> execute contamination, supersession, abstention and persistence regressions -> repeat.

Acceptance

  • Unverified model claims cannot silently become durable facts.
  • Contradictory facts are surfaced and resolved/superseded rather than coexisting invisibly.
  • Project/profile scope prevents cross-project contamination.
  • User corrections supersede older inferred state immediately.
  • Raw tool output does not become long-lived prompt history by default.
  • Compaction preserves typed facts/decisions/open questions/evidence rather than only a literary summary.
  • Memory retrieval can abstain when evidence is weak.
  • Regression corpus covers temporal updates, selective forgetting and multi-session retrieval.
  • Prolog-RLM sessions can write verified durable KB records through a bounded API.
  • A new process/restarted container can query the same persisted KB state.
  • Prolog reasoning can consume recalled facts without first converting them back into untyped prose.
  • Superseded/retracted facts are excluded from active reasoning while provenance remains inspectable.
  • Existing memory can be migrated/imported without silent destructive conversion.

Non-goal

Do not replace the entire Agent Zero memory plugin in one PR. Introduce the typed/persistent verified path incrementally and measure it.

Parent: #1 ## Goal Replace history-as-state and heuristic memory accumulation with explicit typed state, provenance, verification and lifecycle rules, with durable symbolic memory represented in persistent Prolog knowledge bases whenever the Prolog-RLM control plane is active. ## State model Active state should be compact and typed: - goal - constraints - current_plan - verified_facts - decisions - open_questions - failed_approaches - blockers - artifacts/evidence refs - next_action ## Memory lifecycle Candidate -> verified -> active -> superseded/expired. Each durable item should carry provenance, scope, timestamps, confidence, verifier/evidence refs and supersession links. A generated "solution" is not durable merely because it sounded plausible. ## Persistent Prolog KB contract When `_prolog_rlm` is enabled, durable memory needed by symbolic reasoning must be persisted as queryable Prolog KB state rather than being available only through vector search or reconstructed prompt prose. Requirements: - persistent across Agent Zero/container restarts when the user data volume persists; - project/profile/user scope represented explicitly; - typed facts/decisions/goals/constraints/evidence rather than one opaque text blob; - provenance and verification metadata retained with each durable item; - supersession/retraction represented explicitly; - deterministic query interface for Prolog-RLM context compilation and reasoning; - writes pass through epistemic validation/policy rather than arbitrary model `assertz/1` access; - normal Prolog reasoning can consume recalled facts directly; - vector/semantic memory may remain as a complementary retrieval index, but is not the symbolic source of truth when the RLM path is active; - migrations/import from existing `_memory` data are bounded and reversible; - disabling Prolog-RLM must not silently destroy existing memory. The single-plugin runtime/bridge path that exposes these KBs belongs to #8. This epic owns memory semantics, persistence, provenance, lifecycle, and migration behavior. ## Artifact/evidence contract Large tool results, traces and files live outside the provider prompt. Active context receives a compact typed observation such as status/facts/errors/evidence_refs/artifacts/state_delta. Use `rlm_artifact` where its exact API is stable and covered; avoid coupling the bootstrap to conversation/evolution modules while their current regressions remain unresolved. ## RAGE loop Review Agent Zero memory recall/write/compaction paths -> analyze epistemic gaps and earliest safe hook -> generate typed candidate/state path + focused migrations/tests -> execute contamination, supersession, abstention and persistence regressions -> repeat. ## Acceptance - [ ] Unverified model claims cannot silently become durable facts. - [ ] Contradictory facts are surfaced and resolved/superseded rather than coexisting invisibly. - [ ] Project/profile scope prevents cross-project contamination. - [ ] User corrections supersede older inferred state immediately. - [ ] Raw tool output does not become long-lived prompt history by default. - [ ] Compaction preserves typed facts/decisions/open questions/evidence rather than only a literary summary. - [ ] Memory retrieval can abstain when evidence is weak. - [ ] Regression corpus covers temporal updates, selective forgetting and multi-session retrieval. - [ ] Prolog-RLM sessions can write verified durable KB records through a bounded API. - [ ] A new process/restarted container can query the same persisted KB state. - [ ] Prolog reasoning can consume recalled facts without first converting them back into untyped prose. - [ ] Superseded/retracted facts are excluded from active reasoning while provenance remains inspectable. - [ ] Existing memory can be migrated/imported without silent destructive conversion. ## Non-goal Do not replace the entire Agent Zero memory plugin in one PR. Introduce the typed/persistent verified path incrementally and measure it.
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/a0-symbolics#4
No description provided.