Add memory graph patch review law
This commit is contained in:
parent
735e31f2a6
commit
cef55e34f8
9 changed files with 334 additions and 5 deletions
|
|
@ -101,9 +101,12 @@ pub use memory_graph::EpiphanyMemoryGraphValidationError;
|
|||
pub use memory_graph::EpiphanyMemoryLifecycleReceipt;
|
||||
pub use memory_graph::EpiphanyMemoryNodeKind;
|
||||
pub use memory_graph::EpiphanyMemoryPatchCandidate;
|
||||
pub use memory_graph::EpiphanyMemoryPatchReview;
|
||||
pub use memory_graph::EpiphanyMemoryPatchReviewStatus;
|
||||
pub use memory_graph::MEMORY_GRAPH_KEY;
|
||||
pub use memory_graph::MEMORY_GRAPH_SCHEMA_VERSION;
|
||||
pub use memory_graph::MEMORY_GRAPH_TYPE;
|
||||
pub use memory_graph::apply_memory_patch_candidate;
|
||||
pub use memory_graph::compose_memory_graph_snapshots;
|
||||
pub use memory_graph::derive_memory_graph_freshness;
|
||||
pub use memory_graph::lifecycle_allowed_for_profile;
|
||||
|
|
@ -122,6 +125,7 @@ pub use memory_graph::plan_memory_graph_context_cut;
|
|||
pub use memory_graph::plan_memory_graph_context_cut_with_semantic_cache;
|
||||
pub use memory_graph::query_memory_graph_semantic_cache;
|
||||
pub use memory_graph::rebuild_memory_graph_embedding_cache;
|
||||
pub use memory_graph::review_memory_patch_candidate;
|
||||
pub use memory_graph::validate_memory_graph_entry;
|
||||
pub use memory_graph::validate_memory_graph_snapshot;
|
||||
pub use memory_graph::write_memory_graph_entry;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ pub mod context_cut;
|
|||
pub mod embedding;
|
||||
pub mod freshness;
|
||||
pub mod ids;
|
||||
pub mod patch;
|
||||
pub mod profiles;
|
||||
pub mod qdrant;
|
||||
pub mod semantic_context;
|
||||
|
|
@ -24,6 +25,8 @@ pub use epiphany_state_model::EpiphanyMemoryLifecycleReceipt;
|
|||
pub use epiphany_state_model::EpiphanyMemoryNode;
|
||||
pub use epiphany_state_model::EpiphanyMemoryNodeKind;
|
||||
pub use epiphany_state_model::EpiphanyMemoryPatchCandidate;
|
||||
pub use epiphany_state_model::EpiphanyMemoryPatchReview;
|
||||
pub use epiphany_state_model::EpiphanyMemoryPatchReviewStatus;
|
||||
pub use epiphany_state_model::EpiphanyMemoryProfile;
|
||||
pub use epiphany_state_model::EpiphanyMemorySummary;
|
||||
|
||||
|
|
@ -37,6 +40,8 @@ pub use freshness::derive_memory_graph_freshness;
|
|||
pub use ids::memory_graph_domain_id;
|
||||
pub use ids::memory_graph_edge_id;
|
||||
pub use ids::memory_graph_node_id;
|
||||
pub use patch::apply_memory_patch_candidate;
|
||||
pub use patch::review_memory_patch_candidate;
|
||||
pub use profiles::memory_graph_from_agent_memories;
|
||||
pub use profiles::memory_graph_from_epiphany_graphs;
|
||||
pub use profiles::memory_graph_from_heartbeat_cognition;
|
||||
|
|
|
|||
195
epiphany-core/src/memory_graph/patch.rs
Normal file
195
epiphany-core/src/memory_graph/patch.rs
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
use super::EpiphanyMemoryGraphSnapshot;
|
||||
use super::EpiphanyMemoryLifecycleReceipt;
|
||||
use super::EpiphanyMemoryPatchCandidate;
|
||||
use super::EpiphanyMemoryPatchReview;
|
||||
use super::EpiphanyMemoryPatchReviewStatus;
|
||||
use super::validate_memory_graph_snapshot;
|
||||
use std::collections::HashSet;
|
||||
|
||||
pub fn review_memory_patch_candidate(
|
||||
snapshot: &EpiphanyMemoryGraphSnapshot,
|
||||
candidate: &EpiphanyMemoryPatchCandidate,
|
||||
) -> EpiphanyMemoryPatchReview {
|
||||
let mut errors = Vec::new();
|
||||
let mut warnings = Vec::new();
|
||||
|
||||
if candidate.id.trim().is_empty() {
|
||||
errors.push("candidate id is required".to_string());
|
||||
}
|
||||
if candidate.status.trim().is_empty() {
|
||||
errors.push("candidate status is required".to_string());
|
||||
} else if candidate.status != "proposed" {
|
||||
warnings.push(format!(
|
||||
"candidate status {:?} is reviewable but not the normal proposed status",
|
||||
candidate.status
|
||||
));
|
||||
}
|
||||
if candidate.proposed_domains.is_empty()
|
||||
&& candidate.proposed_nodes.is_empty()
|
||||
&& candidate.proposed_edges.is_empty()
|
||||
{
|
||||
errors.push("candidate must propose at least one domain, node, or edge".to_string());
|
||||
}
|
||||
|
||||
let existing_domain_ids = snapshot
|
||||
.domains
|
||||
.iter()
|
||||
.map(|domain| domain.id.as_str())
|
||||
.collect::<HashSet<_>>();
|
||||
let existing_node_ids = snapshot
|
||||
.nodes
|
||||
.iter()
|
||||
.map(|node| node.id.as_str())
|
||||
.collect::<HashSet<_>>();
|
||||
let existing_edge_ids = snapshot
|
||||
.edges
|
||||
.iter()
|
||||
.map(|edge| edge.id.as_str())
|
||||
.collect::<HashSet<_>>();
|
||||
|
||||
let mut proposed_domain_ids = HashSet::new();
|
||||
for domain in &candidate.proposed_domains {
|
||||
if domain.profile != candidate.profile {
|
||||
errors.push(format!(
|
||||
"proposed domain {} profile does not match candidate profile",
|
||||
domain.id
|
||||
));
|
||||
}
|
||||
if existing_domain_ids.contains(domain.id.as_str()) {
|
||||
errors.push(format!(
|
||||
"proposed domain {} already exists; revision candidates need a separate reviewer",
|
||||
domain.id
|
||||
));
|
||||
}
|
||||
if !proposed_domain_ids.insert(domain.id.as_str()) {
|
||||
errors.push(format!("candidate repeats proposed domain {}", domain.id));
|
||||
}
|
||||
}
|
||||
|
||||
let mut proposed_node_ids = HashSet::new();
|
||||
for node in &candidate.proposed_nodes {
|
||||
if node.profile != candidate.profile {
|
||||
errors.push(format!(
|
||||
"proposed node {} profile does not match candidate profile",
|
||||
node.id
|
||||
));
|
||||
}
|
||||
if existing_node_ids.contains(node.id.as_str()) {
|
||||
errors.push(format!(
|
||||
"proposed node {} already exists; revision candidates need a separate reviewer",
|
||||
node.id
|
||||
));
|
||||
}
|
||||
if !proposed_node_ids.insert(node.id.as_str()) {
|
||||
errors.push(format!("candidate repeats proposed node {}", node.id));
|
||||
}
|
||||
}
|
||||
|
||||
let mut proposed_edge_ids = HashSet::new();
|
||||
for edge in &candidate.proposed_edges {
|
||||
if edge.profile != candidate.profile {
|
||||
errors.push(format!(
|
||||
"proposed edge {} profile does not match candidate profile",
|
||||
edge.id
|
||||
));
|
||||
}
|
||||
if existing_edge_ids.contains(edge.id.as_str()) {
|
||||
errors.push(format!(
|
||||
"proposed edge {} already exists; revision candidates need a separate reviewer",
|
||||
edge.id
|
||||
));
|
||||
}
|
||||
if !proposed_edge_ids.insert(edge.id.as_str()) {
|
||||
errors.push(format!("candidate repeats proposed edge {}", edge.id));
|
||||
}
|
||||
}
|
||||
|
||||
let mut projected = snapshot.clone();
|
||||
projected
|
||||
.domains
|
||||
.extend(candidate.proposed_domains.iter().cloned());
|
||||
projected
|
||||
.nodes
|
||||
.extend(candidate.proposed_nodes.iter().cloned());
|
||||
projected
|
||||
.edges
|
||||
.extend(candidate.proposed_edges.iter().cloned());
|
||||
errors.extend(
|
||||
validate_memory_graph_snapshot(&projected)
|
||||
.into_iter()
|
||||
.map(|error| format!("{}: {}", error.path, error.message)),
|
||||
);
|
||||
|
||||
EpiphanyMemoryPatchReview {
|
||||
candidate_id: candidate.id.clone(),
|
||||
status: if errors.is_empty() {
|
||||
EpiphanyMemoryPatchReviewStatus::Accepted
|
||||
} else {
|
||||
EpiphanyMemoryPatchReviewStatus::Rejected
|
||||
},
|
||||
accepted_domain_ids: if errors.is_empty() {
|
||||
candidate
|
||||
.proposed_domains
|
||||
.iter()
|
||||
.map(|domain| domain.id.clone())
|
||||
.collect()
|
||||
} else {
|
||||
Vec::new()
|
||||
},
|
||||
accepted_node_ids: if errors.is_empty() {
|
||||
candidate
|
||||
.proposed_nodes
|
||||
.iter()
|
||||
.map(|node| node.id.clone())
|
||||
.collect()
|
||||
} else {
|
||||
Vec::new()
|
||||
},
|
||||
accepted_edge_ids: if errors.is_empty() {
|
||||
candidate
|
||||
.proposed_edges
|
||||
.iter()
|
||||
.map(|edge| edge.id.clone())
|
||||
.collect()
|
||||
} else {
|
||||
Vec::new()
|
||||
},
|
||||
errors,
|
||||
warnings,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apply_memory_patch_candidate(
|
||||
snapshot: &EpiphanyMemoryGraphSnapshot,
|
||||
candidate: &EpiphanyMemoryPatchCandidate,
|
||||
accepted_at: Option<String>,
|
||||
) -> (EpiphanyMemoryGraphSnapshot, EpiphanyMemoryPatchReview) {
|
||||
let review = review_memory_patch_candidate(snapshot, candidate);
|
||||
if review.status != EpiphanyMemoryPatchReviewStatus::Accepted {
|
||||
return (snapshot.clone(), review);
|
||||
}
|
||||
|
||||
let mut accepted = snapshot.clone();
|
||||
accepted
|
||||
.domains
|
||||
.extend(candidate.proposed_domains.iter().cloned());
|
||||
accepted
|
||||
.nodes
|
||||
.extend(candidate.proposed_nodes.iter().cloned());
|
||||
accepted
|
||||
.edges
|
||||
.extend(candidate.proposed_edges.iter().cloned());
|
||||
accepted
|
||||
.lifecycle_receipts
|
||||
.push(EpiphanyMemoryLifecycleReceipt {
|
||||
id: format!("memreceipt-{}", candidate.id),
|
||||
operation: "memoryPatchCandidate.accept".to_string(),
|
||||
status: "accepted".to_string(),
|
||||
node_ids: review.accepted_node_ids.clone(),
|
||||
edge_ids: review.accepted_edge_ids.clone(),
|
||||
reason: (!candidate.reasons.is_empty()).then(|| candidate.reasons.join(" ")),
|
||||
created_at: accepted_at,
|
||||
});
|
||||
|
||||
(accepted, review)
|
||||
}
|
||||
|
|
@ -409,3 +409,91 @@ fn memory_graph_embedding_documents_are_stable_typed_cache_cargo() {
|
|||
assert!(manifest.source_hashes.contains(&"hash-a".to_string()));
|
||||
assert!(manifest.source_hashes.contains(&"hash-b".to_string()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn memory_patch_candidate_review_accepts_append_only_graph_growth() {
|
||||
let snapshot = fixture_snapshot();
|
||||
let domain_id = snapshot.domains[0].id.clone();
|
||||
let node_id = memory_graph_node_id(&domain_id, "module", "src/runtime_spine.rs", Some("role"));
|
||||
let candidate = EpiphanyMemoryPatchCandidate {
|
||||
id: "candidate-runtime-spine".to_string(),
|
||||
profile: EpiphanyMemoryProfile::RepoArchitecture,
|
||||
status: "proposed".to_string(),
|
||||
proposed_nodes: vec![EpiphanyMemoryNode {
|
||||
id: node_id.clone(),
|
||||
domain_id,
|
||||
profile: EpiphanyMemoryProfile::RepoArchitecture,
|
||||
kind: EpiphanyMemoryNodeKind::RuntimeContract,
|
||||
title: "Runtime spine role results".to_string(),
|
||||
claim: "Runtime role results carry typed memory patch candidates.".to_string(),
|
||||
question: "When should candidate review apply them?".to_string(),
|
||||
tension: String::new(),
|
||||
action_implication: "Review candidates against the typed graph before mutation."
|
||||
.to_string(),
|
||||
source_hashes: vec!["anchor:missing".to_string()],
|
||||
lifecycle: EpiphanyMemoryLifecycle::Proposed,
|
||||
confidence: 72,
|
||||
..Default::default()
|
||||
}],
|
||||
reasons: vec!["Typed result cargo needs a graph-owned review law.".to_string()],
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let (accepted, review) = apply_memory_patch_candidate(
|
||||
&snapshot,
|
||||
&candidate,
|
||||
Some("2026-05-18T00:00:00Z".to_string()),
|
||||
);
|
||||
|
||||
assert_eq!(review.status, EpiphanyMemoryPatchReviewStatus::Accepted);
|
||||
assert_eq!(review.accepted_node_ids, vec![node_id.clone()]);
|
||||
assert!(accepted.nodes.iter().any(|node| node.id == node_id));
|
||||
assert!(
|
||||
accepted
|
||||
.lifecycle_receipts
|
||||
.iter()
|
||||
.any(|receipt| receipt.operation == "memoryPatchCandidate.accept")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn memory_patch_candidate_review_rejects_duplicate_or_orphan_growth() {
|
||||
let snapshot = fixture_snapshot();
|
||||
let candidate = EpiphanyMemoryPatchCandidate {
|
||||
id: "candidate-bad".to_string(),
|
||||
profile: EpiphanyMemoryProfile::RepoArchitecture,
|
||||
status: "proposed".to_string(),
|
||||
proposed_nodes: vec![EpiphanyMemoryNode {
|
||||
id: snapshot.nodes[0].id.clone(),
|
||||
domain_id: "missing-domain".to_string(),
|
||||
profile: EpiphanyMemoryProfile::RepoArchitecture,
|
||||
kind: EpiphanyMemoryNodeKind::Module,
|
||||
title: "Duplicate".to_string(),
|
||||
claim: "Duplicate nodes must not be laundered through candidate review.".to_string(),
|
||||
question: "Where should revisions live?".to_string(),
|
||||
tension: String::new(),
|
||||
action_implication: "Reject duplicate append candidates.".to_string(),
|
||||
source_hashes: vec!["anchor:missing".to_string()],
|
||||
lifecycle: EpiphanyMemoryLifecycle::Proposed,
|
||||
..Default::default()
|
||||
}],
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let (unchanged, review) = apply_memory_patch_candidate(&snapshot, &candidate, None);
|
||||
|
||||
assert_eq!(unchanged, snapshot);
|
||||
assert_eq!(review.status, EpiphanyMemoryPatchReviewStatus::Rejected);
|
||||
assert!(
|
||||
review
|
||||
.errors
|
||||
.iter()
|
||||
.any(|error| error.contains("already exists"))
|
||||
);
|
||||
assert!(
|
||||
review
|
||||
.errors
|
||||
.iter()
|
||||
.any(|error| error.contains("missing domain"))
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1093,6 +1093,9 @@ pub struct EpiphanyMemoryPatchCandidate {
|
|||
pub profile: EpiphanyMemoryProfile,
|
||||
pub status: String,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<EpiphanyMemoryDomain>")]
|
||||
pub proposed_domains: Vec<EpiphanyMemoryDomain>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<EpiphanyMemoryNode>")]
|
||||
pub proposed_nodes: Vec<EpiphanyMemoryNode>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
|
|
@ -1103,6 +1106,38 @@ pub struct EpiphanyMemoryPatchCandidate {
|
|||
pub reasons: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, TS, Default)]
|
||||
pub struct EpiphanyMemoryPatchReview {
|
||||
pub candidate_id: String,
|
||||
pub status: EpiphanyMemoryPatchReviewStatus,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<string>")]
|
||||
pub accepted_domain_ids: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<string>")]
|
||||
pub accepted_node_ids: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<string>")]
|
||||
pub accepted_edge_ids: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<string>")]
|
||||
pub errors: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
#[ts(type = "Array<string>")]
|
||||
pub warnings: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, Hash, JsonSchema, TS, Default,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[ts(rename_all = "snake_case")]
|
||||
pub enum EpiphanyMemoryPatchReviewStatus {
|
||||
#[default]
|
||||
Rejected,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
fn is_zero_u32(value: &u32) -> bool {
|
||||
*value == 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -389,9 +389,11 @@ packets without serializing a second memory format. First landing: native role
|
|||
worker launch documents now include typed `memoryContext` packets derived from
|
||||
the accepted graph through the memory graph substrate and no longer carry full
|
||||
`graphs` cargo. Runtime role results can persist typed
|
||||
`memoryPatchCandidates`; the next cleanup is accepting/reviewing those
|
||||
candidates into the unified graph so Modeling stops using full graph
|
||||
replacement patches for ordinary graph growth.
|
||||
`memoryPatchCandidates`. The core graph substrate now owns append-only review
|
||||
and application for those candidates: proposed domains/nodes/edges are checked
|
||||
against the typed graph before they can be applied with lifecycle receipts. The
|
||||
next cleanup is adding the command/bridge acceptance path so Modeling stops
|
||||
using full graph replacement patches for ordinary graph growth.
|
||||
|
||||
### Phase 7: Sleep And Repo Refresh
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- The heartbeat initiative pass is landed as a bounded tool seam. `state/agent-heartbeats.msgpack` tracks Self, Face, Imagination, Eyes, Body, Hands, Soul, and Life as Ghostlight-style initiative participants with arena, participant kind, speed, next-ready time, reaction bias, interrupt threshold, load, status, constraints, personality cooldown, mood cooldown, effective cooldown, adaptive pacing, history, and pending turns through `epiphany-core::EpiphanyHeartbeatStateEntry` and the native `epiphany-heartbeat-store` binary. Role dossiers set baseline timing; appraisal mood/anxiety bends it through urgency, arousal, thought pressure, guardedness, and reaction intensity, so Hands-like work pressure and high-need anxious lanes recover sooner without being heartbeaten while a prior turn is running. `epiphany-heartbeat-store pump` computes pressure from external urgency, mood/anxiety, reaction intensity, thought pressure, and current pending load, then chooses tempo plus target concurrency: calm can launch zero and sleep slow; alarm can fill most active lanes. Idle turns are for rumination: light thought shuffling, role-quality attention, and candidate selfPatch pressure. Sleep/dream cycle passes are the intended distillation window for durable self-memory and doctrine. JSON heartbeat state and Python wrapper state are gone; general CultCache schema sync, polyglot domain loading, and debug display tools belong in CultLib. This is a callable scheduler seam, not yet an always-on daemon; a heart valve, not a whole circulatory god.
|
||||
- The first Ghostlight-derived timing slice is landed in Epiphany, but Ghostlight is reference lineage rather than a sibling runtime to preserve. `epiphany-heartbeat-store init --profile ghostlight-scene --scene-id <id> --scene-participant <id|name|speed|reaction|threshold|constraints>` creates a typed CultCache MessagePack scene heartbeat store whose participants are `arena=scene`, `participantKind=character`; `tick` emits `ghostlight.initiative_schedule.v0` receipts with `scene_turn` actions and local-affordance basis. The generic Epiphany maintenance lanes are not auto-patched into scene stores.
|
||||
- The first Void-derived routine slice is landed in Epiphany, but VoidBot is reference lineage rather than a runtime dependency. `epiphany-heartbeat-store routine --store .\state\agent-heartbeats.msgpack --artifact-dir .\.epiphany-heartbeats --agent-store .\state\agents.msgpack` reads typed role dossiers, computes bounded memory resonance, maintains incubation themes, runs analytic and associative cognition lanes, writes bridge syntheses/saturation/tension, projects the active thought cluster through each role's Ghostlight-shaped personality vectors, derives participant-local reactions, applies personality/mood timing, advances the sleep/dream cycle, updates the typed heartbeat store, and emits an auditable `epiphany.void_routine.v0` receipt. The routine now also carries anti-loop physiology imported from Void's calmer brain: `noveltyToSelf`, `noveltyToRoom`, source coverage, saturation pressure, refractory cooling, and explicit permission to let a live unsaturated thought deepen without forcing novelty theater every pass. This mutates only heartbeat physiology fields: project truth and role memory mutation remain on their reviewed surfaces.
|
||||
- The next memory foundation must not build separate engines for repo graph and agent mind. Heartbeat cognition, role self-memory, repo architecture/dataflow, evidence scars, incubation, agency pressure, and context packets should converge through `EpiphanyMemoryGraph` profiles so one typed graph owns anchors, lifecycle, summaries, freshness, context cuts, and Qdrant embedding manifests. Repo, agent, and heartbeat profile producers now map accepted graph truth, reviewed role dossier memories/goals/values, and provisional heartbeat short-term/incubation/agency/candidate pressure into memory graph documents without scanner/model work. Heartbeat import deliberately does not mark durable promotion. Compose now merges profile snapshots into one validated graph and rejects duplicate authority; `epiphany-memory-graph compose` writes a composed typed CultCache graph from typed source graph stores; `epiphany-memory-graph refresh` can invoke live agent-memory plus heartbeat-cognition producers from their typed stores into one graph store; `epiphany-core` has a native typed `EpiphanyThreadState` CultCache store seam; the bridge mirrors loaded Codex-thread Epiphany state into `state/thread-state.msgpack`; CultNet advertises logical `EpiphanyThreadState` plus `EpiphanyMemoryGraph` snapshot contracts; memory graph nodes/edges/summaries project into deterministic typed embedding documents; `epiphany-memory-graph manifest` writes the embedding manifest back to the typed graph store; `epiphany-memory-graph index` fully rebuilds a Qdrant cache collection through the shared semantic cache transport; `epiphany-memory-graph semantic-context` uses ordered Qdrant IDs to seed typed graph context while falling back to graph traversal when the cache is absent; native role worker launch documents now carry typed `memoryContext` instead of full `graphs`; and typed runtime role results can persist `memoryPatchCandidates` for graph/memory growth proposals. The next clean slice is accepting/reviewing memory patch candidates into the unified graph rather than asking Modeling for full graph replacement patches.
|
||||
- The next memory foundation must not build separate engines for repo graph and agent mind. Heartbeat cognition, role self-memory, repo architecture/dataflow, evidence scars, incubation, agency pressure, and context packets should converge through `EpiphanyMemoryGraph` profiles so one typed graph owns anchors, lifecycle, summaries, freshness, context cuts, and Qdrant embedding manifests. Repo, agent, and heartbeat profile producers now map accepted graph truth, reviewed role dossier memories/goals/values, and provisional heartbeat short-term/incubation/agency/candidate pressure into memory graph documents without scanner/model work. Heartbeat import deliberately does not mark durable promotion. Compose now merges profile snapshots into one validated graph and rejects duplicate authority; `epiphany-memory-graph compose` writes a composed typed CultCache graph from typed source graph stores; `epiphany-memory-graph refresh` can invoke live agent-memory plus heartbeat-cognition producers from their typed stores into one graph store; `epiphany-core` has a native typed `EpiphanyThreadState` CultCache store seam; the bridge mirrors loaded Codex-thread Epiphany state into `state/thread-state.msgpack`; CultNet advertises logical `EpiphanyThreadState` plus `EpiphanyMemoryGraph` snapshot contracts; memory graph nodes/edges/summaries project into deterministic typed embedding documents; `epiphany-memory-graph manifest` writes the embedding manifest back to the typed graph store; `epiphany-memory-graph index` fully rebuilds a Qdrant cache collection through the shared semantic cache transport; `epiphany-memory-graph semantic-context` uses ordered Qdrant IDs to seed typed graph context while falling back to graph traversal when the cache is absent; native role worker launch documents now carry typed `memoryContext` instead of full `graphs`; typed runtime role results can persist `memoryPatchCandidates` for graph/memory growth proposals; and `epiphany-core` now reviews/appends candidate domains/nodes/edges against the typed graph with lifecycle receipts. The next clean slice is adding the command/bridge acceptance path so accepted candidates become graph state without asking Modeling for full graph replacement patches.
|
||||
- Manual Codex-run rumination still has an explicit aftercare rule until Epiphany owns the full sleep consolidator. In the intended Epiphany cycle, sub-agents ruminate when idle and distill when they sleep; in this supervising Codex thread, a heartbeat/routine vigil is only physiology until a separate closing pass reviews the receipts and decides whether map, handoff, evidence, or role self-memory should change.
|
||||
- The Face public-surface pass is landed as a bounded lane. Face's role dossier lives in `state/agents.msgpack`; `epiphany_specialists.toml` gives it a VoidBot-heartbeat-derived prompt stripped of moderation authority; `state/face-discord.toml` and the native `epiphany-face-discord` binary enforce that Face may interact only through #aquarium. Missing channel id or token writes candidate chat artifacts instead of posting elsewhere. If a Face has a persona name/avatar, `post` uses the shared Discord webhook pipe so each Epiphany can speak with its own nickname and avatar without a separate bot identity.
|
||||
- The Void memory bridge is now native enough to keep the useful organs attached. `state/void-memory.toml` and `epiphany-void-memory` can check Void's Docker Postgres state spine, query Qdrant Discord-history and source/lore collections with the configured Ollama embedding model, and fetch raw archive context windows from Void's file-backed Discord archive. Native `epiphany-mvp-status` includes a `voidMemory` block so Aquarium/backend clients can inspect whether the mouth and memory are actually wired.
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -297,4 +297,4 @@ current_status:
|
|||
freshness propagation, summary-versus-child context cuts, and a validated
|
||||
CultCache store entry; the native `epiphany-memory-graph` binary can
|
||||
status/validate/query/smoke the store without Qdrant.
|
||||
next_action: Continue the memory graph build unless a more urgent Codex starvation regression appears. Repo, agent, and heartbeat profile producers now map accepted architecture/dataflow graph truth, reviewed role dossier memory/goals/values, and heartbeat cognition pressure into `EpiphanyMemoryGraph` documents; compose merges profile snapshots into one validated graph; `epiphany-memory-graph compose` writes from typed graph stores; `epiphany-memory-graph refresh` can invoke live agent-memory and heartbeat-cognition producers from their typed stores; `epiphany-core` has a native typed `EpiphanyThreadState` CultCache store seam; the bridge mirrors loaded Codex-thread Epiphany state into `state/thread-state.msgpack`; CultNet advertises logical `EpiphanyThreadState` plus `EpiphanyMemoryGraph` snapshot contracts; memory graph nodes/edges/summaries project into deterministic typed embedding documents; `epiphany-memory-graph manifest` writes the embedding manifest back to the typed graph store; `epiphany-core::semantic_cache` owns shared Qdrant/Ollama transport; `epiphany-memory-graph index` fully rebuilds Qdrant from typed graph documents while keeping the manifest in the graph store; `epiphany-memory-graph semantic-context` asks Qdrant for graph IDs only, preserves hit order, then resolves context from typed graph state with a no-cache fallback; native role worker launches now carry typed `memoryContext` instead of full `graphs`; and typed runtime role results can persist `memoryPatchCandidates`. The next clean slice is accepting/reviewing memory patch candidates into the unified graph instead of asking Modeling for full graph replacement patches.
|
||||
next_action: Continue the memory graph build unless a more urgent Codex starvation regression appears. Repo, agent, and heartbeat profile producers now map accepted architecture/dataflow graph truth, reviewed role dossier memory/goals/values, and heartbeat cognition pressure into `EpiphanyMemoryGraph` documents; compose merges profile snapshots into one validated graph; `epiphany-memory-graph compose` writes from typed graph stores; `epiphany-memory-graph refresh` can invoke live agent-memory and heartbeat-cognition producers from their typed stores; `epiphany-core` has a native typed `EpiphanyThreadState` CultCache store seam; the bridge mirrors loaded Codex-thread Epiphany state into `state/thread-state.msgpack`; CultNet advertises logical `EpiphanyThreadState` plus `EpiphanyMemoryGraph` snapshot contracts; memory graph nodes/edges/summaries project into deterministic typed embedding documents; `epiphany-memory-graph manifest` writes the embedding manifest back to the typed graph store; `epiphany-core::semantic_cache` owns shared Qdrant/Ollama transport; `epiphany-memory-graph index` fully rebuilds Qdrant from typed graph documents while keeping the manifest in the graph store; `epiphany-memory-graph semantic-context` asks Qdrant for graph IDs only, preserves hit order, then resolves context from typed graph state with a no-cache fallback; native role worker launches now carry typed `memoryContext` instead of full `graphs`; typed runtime role results can persist `memoryPatchCandidates`; and `epiphany-core` can review/apply append-only candidate graph growth with lifecycle receipts. The next clean slice is adding the command/bridge acceptance path so reviewed memory patch candidates become unified graph state without asking Modeling for full graph replacement patches.
|
||||
|
|
|
|||
Reference in a new issue