From 1c3a04cfade937239549d9d2e7064db0b1f96e10 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 18:09:06 +0100 Subject: [PATCH] Add Persona memory recall to MVP gate --- .../bin/epiphany-repo-swarm-mvp-gate-smoke.rs | 276 ++++++++++++++++++ notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 381778 -> 382147 bytes state/map.yaml | 6 +- 4 files changed, 280 insertions(+), 4 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs b/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs index 68d854c4..7e95000b 100644 --- a/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs +++ b/epiphany-core/src/bin/epiphany-repo-swarm-mvp-gate-smoke.rs @@ -2,11 +2,35 @@ use anyhow::Context; use anyhow::Result; use anyhow::anyhow; use chrono::Utc; +use epiphany_core::EpiphanyAgentMemoryEntry; +use epiphany_core::GhostlightAgent; +use epiphany_core::GhostlightCanonicalState; +use epiphany_core::GhostlightIdentity; +use epiphany_core::GhostlightMemories; +use epiphany_core::GhostlightMemory; +use epiphany_core::GhostlightValue; +use epiphany_core::GhostlightWorld; +use epiphany_core::PersonaIdentity; +use epiphany_core::PersonaInterpreterInput; +use epiphany_core::PersonaMemoryCacheConfig; +use epiphany_core::PersonaProjectorInput; +use epiphany_core::PersonaTurnInput; use epiphany_core::WeksaInterlinguaInput; use epiphany_core::WeksaSpeakerContext; +use epiphany_core::build_persona_interpreter_prompt; +use epiphany_core::build_persona_memory_chunks; +use epiphany_core::build_persona_projector_prompt; +use epiphany_core::build_persona_turn_prompt; use epiphany_core::build_weksa_interlingua_packet; use epiphany_core::build_weksa_target_lowering_request; use epiphany_core::record_weksa_target_lowering_receipt; +use epiphany_core::render_persona_memory_recall_with_cache; +use epiphany_core::render_persona_semantic_memory_recall; +use epiphany_core::semantic_memory_recall_from_heartbeat_action; +use epiphany_state_model::EpiphanyMemoryContextPacket; +use epiphany_state_model::EpiphanyMemoryFreshnessStatus; +use epiphany_state_model::EpiphanyMemoryNode; +use epiphany_state_model::EpiphanyMemorySummary; use serde_json::Value; use serde_json::json; use std::env; @@ -130,6 +154,7 @@ fn run_smoke(args: Args) -> Result { verify_deployment_handoff(&deployment_handoff)?; verify_daemon_survival(&daemon_survival)?; let weksa_interlingua = verify_weksa_interlingua()?; + let persona_memory_recall = verify_persona_memory_recall()?; let gate_rows = vec![ green( @@ -144,6 +169,11 @@ fn run_smoke(args: Args) -> Result { "Weksa", "Persona SAY meaning lowers through Weksa interlingua packet/request/receipt without transport authority", ), + green( + "persona-memory-recall", + "Persona/Mind", + "Qdrant-backed Persona memory cache and typed graph fallback feed Projector, Persona, and Interpreter prompts without exposing private state", + ), green( "imagination-plan", "Imagination", @@ -240,6 +270,7 @@ fn run_smoke(args: Args) -> Result { "deploymentHandoffSmokeDir": deployment_handoff["smokeDir"], "daemonSurvivalSmokeDir": daemon_survival["smokeDir"], "weksaInterlingua": weksa_interlingua, + "personaMemoryRecall": persona_memory_recall, "mvpReady": false, "demoReady": true, "greenGateCount": green_gate_count, @@ -454,6 +485,243 @@ fn verify_weksa_interlingua() -> Result { })) } +fn verify_persona_memory_recall() -> Result { + let fallback_recall = render_persona_semantic_memory_recall(&EpiphanyMemoryContextPacket { + id: "memctx-repo-swarm-mvp-gate-persona".to_string(), + query_id: "repo-swarm-mvp-gate-persona-current-turn".to_string(), + summaries: vec![EpiphanyMemorySummary { + id: "summary-repo-swarm-mvp-gate-persona-contracts".to_string(), + target: "role:Persona".to_string(), + claim: + "Persona remembers that public speech is a reviewed mouth edge, not raw side effect authority." + .to_string(), + action_implication: + "Shape public voice, then let Mind, Bifrost, and the mouth edge route effects." + .to_string(), + freshness: EpiphanyMemoryFreshnessStatus::Ready, + confidence: 84, + ..Default::default() + }], + nodes: vec![EpiphanyMemoryNode { + id: "node-repo-swarm-mvp-gate-persona-qdrant-pressure".to_string(), + title: "Persona memory retrieval pressure".to_string(), + claim: "VoidBot rebuilds semantic Persona recall from typed memory before each Face turn." + .to_string(), + action_implication: + "Epiphany Persona prompts must receive derived memory recall as hints before speech." + .to_string(), + ..Default::default() + }], + ..Default::default() + }); + + let memory_entry = persona_memory_entry(); + let chunks = build_persona_memory_chunks(&memory_entry, "state/agents.msgpack#Persona"); + if !chunks + .iter() + .any(|chunk| chunk.text.contains("public typed-contract zeal")) + { + return Err(anyhow!( + "Persona memory chunks did not include public identity memory" + )); + } + if chunks + .iter() + .any(|chunk| chunk.text.contains("sealed private note")) + { + return Err(anyhow!( + "Persona memory chunks exposed sealed private notes" + )); + } + + let bridge = render_persona_memory_recall_with_cache( + &memory_entry, + "state/agents.msgpack#Persona", + "typed-contract zeal before public speech", + 4, + Some(&EpiphanyMemoryContextPacket { + id: "memctx-repo-swarm-mvp-gate-fallback".to_string(), + query_id: "repo-swarm-mvp-gate-persona-fallback".to_string(), + summaries: vec![EpiphanyMemorySummary { + id: "summary-repo-swarm-mvp-gate-fallback".to_string(), + target: "role:Persona".to_string(), + claim: fallback_recall, + action_implication: + "This fallback is heartbeat-carried context, not direct state authority." + .to_string(), + freshness: EpiphanyMemoryFreshnessStatus::Ready, + confidence: 80, + ..Default::default() + }], + nodes: vec![EpiphanyMemoryNode { + id: "node-repo-swarm-mvp-gate-fallback".to_string(), + title: "Smoke fallback memory".to_string(), + claim: "Fallback typed memory graph context remains available.".to_string(), + action_implication: "Do not pretend live Qdrant was required for this smoke." + .to_string(), + ..Default::default() + }], + ..Default::default() + }), + &PersonaMemoryCacheConfig { + qdrant_url: "http://127.0.0.1:1".to_string(), + qdrant_api_key: None, + qdrant_timeout_ms: 1, + ollama_base_url: "http://127.0.0.1:1".to_string(), + ollama_model: "qwen3-embedding:0.6b".to_string(), + ollama_timeout_ms: 1, + collection_name: "epiphany_persona_memory_mvp_gate".to_string(), + query_instruction: "repo-swarm-mvp-gate".to_string(), + }, + ); + if bridge.status != "fallback" { + return Err(anyhow!( + "expected Persona memory recall fallback status, got {:?}", + bridge.status + )); + } + if bridge.private_state_exposed || bridge.rendered_recall.contains("sealed private note") { + return Err(anyhow!("Persona memory recall exposed private state")); + } + require_contains( + &bridge.rendered_recall, + "Fallback typed memory graph context", + "Persona memory recall fallback", + )?; + + let heartbeat_action = json!({ + "action_type": "persona_turn", + "persona_memory_recall": { + "privateStateExposed": false, + "renderedRecall": bridge.rendered_recall, + } + }); + let recall = semantic_memory_recall_from_heartbeat_action(&heartbeat_action); + require_contains( + &recall, + "Fallback typed memory graph context", + "heartbeat Persona recall", + )?; + + let identity = PersonaIdentity { + identity_id: "epiphany".to_string(), + display_name: "Epiphany".to_string(), + repo_name: "EpiphanyAgent".to_string(), + public_description: "Repo Persona for typed agent substrate.".to_string(), + jurisdiction: vec!["typed state and review-gated agency".to_string()], + }; + + let projector_prompt = build_persona_projector_prompt(&PersonaProjectorInput { + identity: identity.clone(), + semantic_memory_recall: recall.clone(), + ..Default::default() + }); + require_contains( + &projector_prompt, + "Semantic memory recall", + "Persona Projector prompt", + )?; + require_contains( + &projector_prompt, + "typed memory graph", + "Persona Projector prompt", + )?; + require_contains( + &projector_prompt, + "not durable authority", + "Persona Projector prompt", + )?; + + let persona_prompt = build_persona_turn_prompt(&PersonaTurnInput { + identity: identity.clone(), + projected_state: "Epiphany feels the mouth edge as a public contract, not a vent." + .to_string(), + semantic_memory_recall: recall.clone(), + ..Default::default() + }); + require_contains(&persona_prompt, "Semantic memory recall", "Persona prompt")?; + require_contains( + &persona_prompt, + "Fallback typed memory graph context", + "Persona prompt", + )?; + + let interpreter_prompt = build_persona_interpreter_prompt(&PersonaInterpreterInput { + identity, + persona_prompt, + persona_output: "I can speak, but the effect needs a receipt.".to_string(), + semantic_memory_recall: recall, + pending_mentions: Vec::new(), + allowed_channel_ids: vec!["aquarium".to_string()], + }); + require_contains( + &interpreter_prompt, + "Dynamic semantic memory recall", + "Persona Interpreter prompt", + )?; + require_contains( + &interpreter_prompt, + "STATE NOTE", + "Persona Interpreter prompt", + )?; + require_contains(&interpreter_prompt, "SAY", "Persona Interpreter prompt")?; + + Ok(json!({ + "schemaVersion": "epiphany.repo_swarm_mvp_persona_memory_recall_gate.v0", + "status": bridge.status, + "cacheStatus": bridge.cache_status, + "chunkCount": bridge.chunk_count, + "hitCount": bridge.hit_count, + "fallbackContainsTypedGraph": true, + "heartbeatRecallWired": true, + "personaLayers": ["projector", "persona", "interpreter"], + "liveQdrantRequiredForSmoke": false, + "privateStateExposed": false, + })) +} + +fn persona_memory_entry() -> EpiphanyAgentMemoryEntry { + EpiphanyAgentMemoryEntry { + schema_version: "ghostlight.agent_state.v0".to_string(), + role_id: "Persona".to_string(), + world: GhostlightWorld::default(), + agent: GhostlightAgent { + agent_id: "epiphany.Persona".to_string(), + identity: GhostlightIdentity { + name: "Epiphany".to_string(), + roles: vec!["Persona".to_string()], + origin: "EpiphanyAgent".to_string(), + public_description: "public typed-contract zeal".to_string(), + private_notes: vec!["sealed private note".to_string()], + }, + memories: GhostlightMemories { + semantic: vec![GhostlightMemory { + memory_id: "semantic-1".to_string(), + summary: "Persona recall should be semantically available before speech." + .to_string(), + salience: 0.9, + confidence: 0.9, + ..Default::default() + }], + ..Default::default() + }, + canonical_state: GhostlightCanonicalState { + values: vec![GhostlightValue { + value_id: "value-1".to_string(), + label: "Keep memory recall typed and sealed.".to_string(), + priority: 0.9, + unforgivable_if_betrayed: true, + }], + ..Default::default() + }, + ..Default::default() + }, + relationships: Vec::new(), + events: Vec::new(), + scenes: Vec::new(), + } +} + fn green(gate: &str, owner: &str, evidence: &str) -> Value { json!({ "gate": gate, @@ -557,6 +825,14 @@ fn require_bool(value: &Value, path: &[&str], expected: bool) -> Result<()> { } } +fn require_contains(haystack: &str, needle: &str, label: &str) -> Result<()> { + if haystack.contains(needle) { + Ok(()) + } else { + Err(anyhow!("expected {label} to contain {needle:?}")) + } +} + fn require_row( value: &Value, path: &[&str], diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 6907052c..dd85cf7b 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -194,7 +194,7 @@ remembers doctrine; the branch remembers the blade. - `bifrost-publication` is the compact non-mutating Bifrost publication proof; use it to prove body-change routing, credit, and GitHub publication receipt state without performing GitHub mutation. Its JSON now points back to compact swarm overview and tool-directory readback. - `bifrost-artifact-acceptance` and `bifrost-metrics` are compact Bifrost/Maintainer closure rites for the safe-family planning/accounting lanes. They write typed accepted-artifact and metrics receipts from explicit artifact/public-proof/review/model-spend/review-load/credit refs, verify latest receipt readback, and let `bifrost-ledger` close `artifact-acceptance-request` and `metrics-request` rows from Bifrost-owned receipts instead of request cargo. The request-family smokes now prove both states: `.epiphany-smoke\repo-artifact-acceptance-request-family-20260621-130520` and `.epiphany-smoke\repo-metrics-request-family-20260621-130635` first assert open request rows, then write final receipts and assert closed rows; wrapper proof `local-20260621-140740-750-2815f6f7` read the closed metrics row with `privateStateExposed=False`. `epiphany-repo-bifrost-accounting-bundle-smoke` consumes the closed family summaries and emits one operator-safe aggregate receipt; wrapper mode `tools/epiphany_local_run.ps1 -Mode bifrost-accounting-bundle` now builds/runs that verifier, accepts optional exact summary paths, writes normal operator run receipts, and proved bundle `.epiphany-smoke\repo-bifrost-accounting-bundle-20260621-132815` via wrapper artifact `local-20260621-142716-268-d6bc58b4` with final Bifrost receipt ids, `planningAuthorityOnly=true`, and `privateStateExposed=false`. - `daemon-survival-rehearsal` is the bounded Idunn physiology proof. `epiphany-daemon-survival-rehearsal-smoke` writes a durable restart policy for `epiphany-daemon-self`, runs `epiphany-daemon-supervisor serve --max-iterations 2 --force --loop-interval-seconds 0`, verifies two scheduler pulses and the scheduler receipt row, and keeps service-manager mutation/elevation/private-state exposure false. Wrapper proof `tools/epiphany_local_run.ps1 -Mode daemon-survival-rehearsal -SkipBuild` emitted `.epiphany-smoke\daemon-survival-rehearsal-20260621-135723` via artifact `local-20260621-145723-011-1175e273`. -- `repo-swarm-mvp-gate` is the compact aggregate MVP proof rite. `epiphany-repo-swarm-mvp-gate-smoke` consumes the latest fresh-repo MVP, repo-work readiness, Bifrost accounting-bundle, Idunn deployment handoff, and daemon survival summaries, verifies the green proof rows, and leaves only Idunn elevated service/install/start/remote execution as an explicit warning gate instead of laundering it into completion. Wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-swarm-mvp-gate -RepoSwarmMvpDeploymentHandoffSummaryPath .\.epiphany-smoke\repo-deployment-config-family-20260621-141231\summary.json` proved `.epiphany-smoke\repo-swarm-mvp-gate-20260621-141554` via wrapper artifact `local-20260621-151512-514-a0c77e3f`: `demoReady=True`, `mvpReady=False`, `green=13`, `warnings=1`, `blockers=0`, and `privateStateExposed=False`. This is live-fire ready for a controlled repo Body; unattended/elevated production service or deployment execution remains an operator-granted Idunn rite. +- `repo-swarm-mvp-gate` is the compact aggregate MVP proof rite. `epiphany-repo-swarm-mvp-gate-smoke` consumes the latest fresh-repo MVP, repo-work readiness, Bifrost accounting-bundle, Idunn deployment handoff, daemon survival, Weksa interlingua, and Persona semantic memory recall proofs, verifies the green proof rows, and leaves only Idunn elevated service/install/start/remote execution as an explicit warning gate instead of laundering it into completion. Direct proof `.epiphany-smoke\repo-swarm-mvp-gate-20260621-170445` reports `demoReady=true`, `mvpReady=false`, `green=15`, `warnings=1`, `blockers=0`, `personaMemoryRecall.cacheStatus=qdrant-unavailable`, `personaMemoryRecall.status=fallback`, `personaMemoryRecall.heartbeatRecallWired=true`, Projector/Persona/Interpreter prompt coverage, and `privateStateExposed=false`. This is live-fire ready for a controlled repo Body; unattended/elevated production service or deployment execution remains an operator-granted Idunn rite. - `bifrost-ledger` is the compact Bifrost/Imagination readback rite; use it after collaboration, publication, accepted-artifact, or metrics writes to see the latest body-change, public-proof, accepted-artifact, metrics, GitHub, feedback, consensus, credit/review-count, and accounting closure rows without opening the full local Verse. - `tool-directory` is the non-mutating daemon tool sight rite; it shows which globally available daemon-hosted tools any agent can invoke through typed intents and receipts, while still exposing host readiness. - `tool-invoke` now embeds compact readbacks for common daemon-hosted tools. Status calls return `daemonStatusReadback`, Eve calls return `eveConnectionReadback`, Self `service-health` returns Idunn-owned `serviceHealthReadback`, Self `service-policy-directory` returns Idunn-owned `servicePolicyDirectoryReadback`, Self `swarm-online-runbook` returns Idunn-owned `swarmOnlineRunbookReadback`, and Hands/Soul authority tools return `authorityToolReadback` with gate, input contract, receipt contract, intent/receipt routes, host cluster, and private-state seal. This proves global tool ergonomics without moving action, verification, or daemon lifecycle ownership into the wrapper; live proofs routed Persona to Hands `repo-action` (`local-20260619-021628-143-7bf7f2e0`), Soul `verify` (`local-20260619-021701-458-852cfa6f`), Self `swarm-online-runbook` (`local-20260619-032244-273-acb3c6a4`), and Self `service-policy-directory` (`local-20260619-035238-138-633f3ff0`) with `privateStateExposed=false`. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 0d1ff780cbe7824af2a90db7e46c4e51baed02ce..8dd95c104501d43b1a133f4863bf65e4c372decf 100644 GIT binary patch delta 314 zcmXYpFHgik5XI?n6(nE~oPdxa*lw=d+#k{eK~U#Tpm5uE=#}g3_NIG1i9jGRG__zz zK#?E_0!0D>L*N4t!goNkO%QM9W#+x#$93!ZrggVwt@M3&$M5jNmj(Ot@_yTzTGsh# z**Gg3mQlSIjhYW-!+v^Sy?FFougBaT^Y{U;yVduoxxT!=7srIL&ot zn6^x0?0^eFs=_gnc}^n|QnQ&9g-B8nqzFeMO#=~*4KOs;fe{MQ0qzR@e}Z{J7&$N` jb&R1_)E*j`lA=A38Yv?*6EaehOhc#&BoS9vKh3Q_kTYz| delta 55 zcmX@SQvA{~@eN{(yk=IW=2k}LQO6iqFX?YqW-Mf6>}#IN)IODo5r{!FGZ3?EpUT9# G_W}U+)e+zT diff --git a/state/map.yaml b/state/map.yaml index 45764ef4..904c5f79 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -627,7 +627,7 @@ current_status: - `epiphany-verse-query connect-eve` and `tools/epiphany_local_run.ps1 -Mode eve-connect` provide the compact Odin-to-Eve collaboration receipt. The command selects the daemon-published surface through the narrow Eve directory, writes connection intent/receipt documents, verifies latest receipt keys through narrow CultMesh loaders, defaults the wrapper target to `epiphany.cluster.persona`, and exposes no private state. - `epiphany-verse-query collaboration-feedback` and `tools/epiphany_local_run.ps1 -Mode collaboration-feedback` provide the public Persona feedback to Imagination consensus receipt path. The wrapper records the prerequisite Eve connection receipt, writes feedback plus Imagination consensus receipt documents, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for wrapper feedback, Eve connection, direct Bifrost publication, and wrapper Bifrost publication, and exposes no private state. The command returns compact TUI rows for the feedback and Imagination consensus receipt with explicit `owner=Persona->Imagination` / `owner=Imagination`, `public=`, candidate action refs, consensus packet ref, adoption gate, and `private=false`; wrapper proof `local-20260618-224207-941-2ca01b41` prints both rows in `feedbackRows`, including Persona public discussion feedback routed to Imagination consensus discovery before Mind/Bifrost adoption. - `epiphany-verse-query bifrost-publication` and `tools/epiphany_local_run.ps1 -Mode bifrost-publication` provide the non-mutating Bifrost body-change publication proof path. It writes Bifrost intent, Bifrost publication receipt, and GitHub publication receipt documents from explicit review/verification/credit inputs, verifies latest keys through narrow CultMesh loaders, publishes follow-on command hints for swarm overview, tool directory, and wrapper Bifrost publication readback, and exposes no private state. - - `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` provide the compact Bifrost ledger sight organ. It reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, public-proof publication receipt, artifact-acceptance receipt, metrics receipt, repo-work readiness-review receipt, collaboration feedback, Imagination consensus receipt, and Mind-admitted repo-work map entries through narrow CultMesh loaders, returns agent-friendly ledger TUI rows, publishes follow-on command hints for swarm overview, tool directory, collaboration feedback, Bifrost publication, artifact acceptance, metrics, and ledger readback, and exposes no private state. Compact ledger rows carry explicit `owner=`, `public=`, and `private=false`, so body-change/public-feedback proof is inspectable without opening raw local Verse payloads or inferring authority from document names. Bifrost ledger readback derives six `BIFROST-ACCOUNTING` rows for `body-change-publication`, `public-proof-publication`, `repo-work-readiness-review`, `artifact-acceptance-request`, `metrics-request`, and `collaboration-consensus`, with closure status, ledger/receipt/public refs, review and credit receipt counts, artifact count, and private-state seal. Readiness-review accounting closes only when latest `epiphany.cultmesh.repo_work_readiness_review.v0` has four Maintainer/Soul/Mind/Bifrost review refs, readiness approval, zero missing required rows, present review artifact, and no durable-state/publication/merge/sync/deployment/service/Hands/private authority. Artifact-acceptance and metrics request rows are `open` when only Mind-admitted request map entries exist, and close only from typed Bifrost/Maintainer receipts: `epiphany-verse-query bifrost-artifact-acceptance` writes `gamecult.bifrost.artifact_acceptance_receipt` from explicit artifact/public-proof/ledger/review refs, while `epiphany-verse-query bifrost-metrics` writes `gamecult.bifrost.metrics_receipt` from explicit accepted-artifact, model-spend, review-load, credit-readback, public-proof, and metrics summary refs. Wrapper modes `bifrost-artifact-acceptance` and `bifrost-metrics` expose the same closure rites. Focused smokes `.epiphany-smoke\repo-artifact-acceptance-request-family-20260621-130520` and `.epiphany-smoke\repo-metrics-request-family-20260621-130635` now prove request rows open first and then close from final Bifrost receipts without private-state exposure; wrapper proof `local-20260621-140740-750-2815f6f7` printed the closed metrics row from the repo-local Verse target. `epiphany-repo-bifrost-accounting-bundle-smoke` consumes the closed request-family summaries as an operator-safe aggregate proof, and `tools/epiphany_local_run.ps1 -Mode bifrost-accounting-bundle` now wraps that verifier with optional exact summary path inputs and the normal operator run receipts. Wrapper proof `local-20260621-142716-268-d6bc58b4` built the verifier, emitted bundle `.epiphany-smoke\repo-bifrost-accounting-bundle-20260621-132815`, and verified artifact acceptance and metrics close statuses, final Bifrost receipt ids, closed accounting rows, `planningAuthorityOnly=true`, and `privateStateExposed=false`. `epiphany-daemon-survival-rehearsal-smoke` now proves Idunn's bounded `serve` physiology can consume a durable restart policy, run two scheduler pulses, write scheduler receipts, and keep service-manager mutation/elevation/private-state exposure false; wrapper proof `local-20260621-145723-011-1175e273` emitted `.epiphany-smoke\daemon-survival-rehearsal-20260621-135723` with `serveIterations=2` and scheduler receipt `daemon-scheduler-receipt-epiphany-daemon-survival-rehearsal-2`. `epiphany-repo-swarm-mvp-gate-smoke` now consumes the fresh-repo MVP, repo-work readiness, Bifrost accounting-bundle, and daemon survival summaries as one operator-safe MVP gate report; wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-swarm-mvp-gate` proved `demoReady=true`, `mvpReady=false`, twelve green gates, one Idunn elevated-service warning gate, zero blockers, and `privateStateExposed=false` in `.epiphany-smoke\repo-swarm-mvp-gate-20260621-135754` / wrapper artifact `local-20260621-145752-946-d1d4d118`. + - `epiphany-verse-query bifrost-ledger` and `tools/epiphany_local_run.ps1 -Mode bifrost-ledger` provide the compact Bifrost ledger sight organ. It reads only the latest Bifrost body-change intent, Bifrost publication receipt, GitHub publication receipt, public-proof publication receipt, artifact-acceptance receipt, metrics receipt, repo-work readiness-review receipt, collaboration feedback, Imagination consensus receipt, and Mind-admitted repo-work map entries through narrow CultMesh loaders, returns agent-friendly ledger TUI rows, publishes follow-on command hints for swarm overview, tool directory, collaboration feedback, Bifrost publication, artifact acceptance, metrics, and ledger readback, and exposes no private state. Compact ledger rows carry explicit `owner=`, `public=`, and `private=false`, so body-change/public-feedback proof is inspectable without opening raw local Verse payloads or inferring authority from document names. Bifrost ledger readback derives six `BIFROST-ACCOUNTING` rows for `body-change-publication`, `public-proof-publication`, `repo-work-readiness-review`, `artifact-acceptance-request`, `metrics-request`, and `collaboration-consensus`, with closure status, ledger/receipt/public refs, review and credit receipt counts, artifact count, and private-state seal. Readiness-review accounting closes only when latest `epiphany.cultmesh.repo_work_readiness_review.v0` has four Maintainer/Soul/Mind/Bifrost review refs, readiness approval, zero missing required rows, present review artifact, and no durable-state/publication/merge/sync/deployment/service/Hands/private authority. Artifact-acceptance and metrics request rows are `open` when only Mind-admitted request map entries exist, and close only from typed Bifrost/Maintainer receipts: `epiphany-verse-query bifrost-artifact-acceptance` writes `gamecult.bifrost.artifact_acceptance_receipt` from explicit artifact/public-proof/ledger/review refs, while `epiphany-verse-query bifrost-metrics` writes `gamecult.bifrost.metrics_receipt` from explicit accepted-artifact, model-spend, review-load, credit-readback, public-proof, and metrics summary refs. Wrapper modes `bifrost-artifact-acceptance` and `bifrost-metrics` expose the same closure rites. Focused smokes `.epiphany-smoke\repo-artifact-acceptance-request-family-20260621-130520` and `.epiphany-smoke\repo-metrics-request-family-20260621-130635` now prove request rows open first and then close from final Bifrost receipts without private-state exposure; wrapper proof `local-20260621-140740-750-2815f6f7` printed the closed metrics row from the repo-local Verse target. `epiphany-repo-bifrost-accounting-bundle-smoke` consumes the closed request-family summaries as an operator-safe aggregate proof, and `tools/epiphany_local_run.ps1 -Mode bifrost-accounting-bundle` now wraps that verifier with optional exact summary path inputs and the normal operator run receipts. Wrapper proof `local-20260621-142716-268-d6bc58b4` built the verifier, emitted bundle `.epiphany-smoke\repo-bifrost-accounting-bundle-20260621-132815`, and verified artifact acceptance and metrics close statuses, final Bifrost receipt ids, closed accounting rows, `planningAuthorityOnly=true`, and `privateStateExposed=false`. `epiphany-daemon-survival-rehearsal-smoke` now proves Idunn's bounded `serve` physiology can consume a durable restart policy, run two scheduler pulses, write scheduler receipts, and keep service-manager mutation/elevation/private-state exposure false; wrapper proof `local-20260621-145723-011-1175e273` emitted `.epiphany-smoke\daemon-survival-rehearsal-20260621-135723` with `serveIterations=2` and scheduler receipt `daemon-scheduler-receipt-epiphany-daemon-survival-rehearsal-2`. `epiphany-repo-swarm-mvp-gate-smoke` now consumes the fresh-repo MVP, repo-work readiness, Bifrost accounting-bundle, Idunn deployment handoff, daemon survival, Weksa interlingua, and Persona semantic memory recall proofs as one operator-safe MVP gate report; direct proof `.epiphany-smoke\repo-swarm-mvp-gate-20260621-170445` reports `demoReady=true`, `mvpReady=false`, fifteen green gates, one Idunn elevated-service warning gate, zero blockers, `personaMemoryRecall.cacheStatus=qdrant-unavailable`, `personaMemoryRecall.status=fallback`, `personaMemoryRecall.heartbeatRecallWired=true`, Projector/Persona/Interpreter prompt coverage, and `privateStateExposed=false`. - `epiphany-verse-query receipt-directory` and `tools/epiphany_local_run.ps1 -Mode receipt-directory` provide the compact latest-witness directory over local Verse. It indexes operator run, daemon poke, daemon tool invocation, Eve connection, Bifrost publication, Imagination consensus, coordinator run, Hands gate, role review, work-loop, cluster service lifecycle, single-service lifecycle, cluster service execution runbook, single-service execution runbook, scheduler, Persona speech, and agent-state SoA witness families from typed local Verse projections; returns agent-friendly `OK`/`ABSENT`/`ATTN` TUI rows with owner, family, status, route, latest id, follow-up command, `presentRowCount`, and `absentRowCount`; preserves `missingRowCount` as compatibility for absent witnesses; flags sealed service lifecycle failure states such as `not-elevated`, `execution-refused-not-elevated`, and `incomplete` as attention without exposing receipt payloads; routes service lifecycle receipts by their typed receipt action through `service_execution_check_follow_up_command` (readiness to readiness, install to install execute, start/stop to control execute, status/reconcile to their readback rites, audit to audit), while cluster/single execution-runbook witnesses route to their runbook regeneration wrappers; and exposes no private state or receipt payload previews. The lifecycle projection now reads the typed receipt family, splits `cluster-service-lifecycle` from `service-lifecycle`, selects the latest attention receipt before falling back to latest overall, and exposes `service-id::action` route values such as `epiphany-cluster-daemon-services::cluster-windows-service-execution-audit`, so agents can see the owning lifecycle action without opening raw audit JSON. Compact receipt TUI rows append `followUp=`, artifact status, and SHA-256; wrapper proof `local-20260618-205920-451-383b0da7` now prints all seventeen compact rows in `receiptRows`, including missing Hands/role/work-loop gates, runbook hashes, scheduler follow-up, Bifrost/Imagination witnesses, and the active service lifecycle attention rows. It also exposes `cluster-service-execution-runbook` plus `service-execution-runbook` as display-only rows, so newer harmless planned/runbook lifecycle receipts cannot hide the active seven-service cluster wound. Receipt-directory JSON now carries Rust-owned `attentionRouteRows` derived from the same policy predicate as `attentionRowCount`, and the wrapper prints that field instead of rebuilding attention from ad hoc status strings; source smoke now proves a `cluster-windows-service-execution-readiness` receipt routes to `cluster-service-execution-readiness` and wrapper mode `cluster-service-execution-readiness` instead of laundering the row through audit. Live proof `local-20260618-212134-758-c7c56240` left the old degraded Hands daemon-poke receipt as an `OK` historical witness while attention routes named only the cluster and single-service lifecycle wounds. Daemon-poke rows now resolve historical receipt status against current daemon liveness: source smoke proves degraded remains degraded before heartbeat recovery and becomes `resolved` after current status returns ready, while live wrapper proof `local-20260618-212649-563-48647018` printed the old Hands poke receipt as `OK | Self | daemon-poke | resolved`. - `tools/epiphany_local_run.ps1 -Mode service-tick` is the wrapper-owned daemon scheduler pulse rite. It runs `epiphany-daemon-supervisor tick` through the same local Verse store, operator run intent/receipt, agent-state SoA refresh, and swarm-brake preflight as other service lifecycle modes, but leaves restart authority inside durable daemon restart policies. The receipt directory scheduler row now follows up with `tools/epiphany_local_run.ps1 -Mode service-tick` instead of passive service status. Proof seeded one disabled Persona restart policy as inert policy metadata, then the wrapper wrote `daemon-scheduler-receipt-epiphany-daemon-supervisor-0` with `status=tickComplete`, `outcomeCount=1`, `skippedCount=1`, `restartedCount=0`, `refusedCount=0`, and `privateStateExposed=false`; the follow-up receipt-directory proof reported the scheduler row as present with route `*`, follow-up command `service-tick`, and no private-state exposure. - `epiphany-cluster-daemon` is the first real per-cluster daemon heartbeat body. It runs as a narrow Rust binary parameterized by daemon id, publishes typed `epiphany.cultmesh.daemon_status.v0` heartbeats into the shared local Verse, can run once or loop, and exposes no private state. Durable restart policies for Self, Hands, Persona, Imagination, Eyes, Modeling, and Soul now invoke `epiphany-cluster-daemon heartbeat`, not the generic query/debug writer. A degraded proof showed `service-tick` invoking all seven daemon bodies through the supervisor and restoring ready liveness with sealed scheduler/poke receipts; a fresh tick no-ops when all heartbeats are current. `epiphany-daemon-supervisor cluster-service-runbook` and wrapper `-Mode cluster-service-runbook` write a non-mutating service runbook plus `daemon_service_lifecycle` receipt for all seven organ daemon `epiphany-cluster-daemon serve` commands. Direct `service-runbook` and `cluster-service-runbook` wrapper summaries now print local artifact SHA-256 plus follow-up/aftercare wrapper routes; live proofs `local-20260618-232133-314-4e55120e` and `local-20260618-232146-541-982dd60b` showed hashes `85a956f768e584a9d098f13a9bf03fc3560915821a2ae7eaab94889dd9ecda85` and `40616423a9210101486949d07291bf795175579a39e99de5e5a759f8e0d7a78c` without service mutation. Wrapper `service-plan` and `service-launch` now expose the native daemon-supervisor service lifecycle surfaces under the same brake gate; `service-launch` silences child stdout/stderr so the parent lifecycle receipt remains the only stdout JSON. Live proof `local-20260618-232935-349-7e3901c8` completed a bounded one-iteration launch with `exitCode=0` and no private-state exposure. `epiphany-daemon-supervisor cluster-service-install-plan` and wrapper `-Mode cluster-service-install-plan` write a non-mutating Windows install script plus lifecycle receipt for seven distinct per-organ Windows services. Wrapper `-Mode cluster-service-install-execute` requests execution through the same typed path and, in non-elevated shells, writes `execution-refused-not-elevated` with `executed=false` instead of mutating services. Direct cluster install wrapper summaries now include `artifactSha256=` and `followUp=tools/epiphany_local_run.ps1 -Mode cluster-service-install-execute`; live proofs `local-20260618-230937-335-71c4fdaa` and `local-20260618-230937-313-cb288388` showed the planned and non-elevated-refused cluster install artifact hash `c6b697e173eb319073da341fc90c2963bcd6bee63d804349205b6309c88df764`. `epiphany-daemon-supervisor cluster-service-audit` and wrapper `-Mode cluster-service-audit` read Windows service-manager state for those seven expected service names, writing an incomplete audit receipt when they are missing; direct audit summaries now point missing cluster services to `cluster-service-install-plan` plus `cluster-service-execution-audit` aftercare, with live proof `local-20260618-232200-992-b842ae01` reporting seven missing services and no mutation. `epiphany-daemon-supervisor cluster-service-start`/`cluster-service-stop` and wrapper `-Mode cluster-service-start-plan`, `cluster-service-stop-plan`, `cluster-service-start-execute`, and `cluster-service-stop-execute` record cluster lifecycle receipts for all seven services: plan modes emit seven `*-planned` rows without mutation, and explicit execute modes refuse as `execution-refused-not-elevated` with seven refused rows when the shell lacks service authority. The cluster install/audit/control wrapper summaries now print compact `serviceRows` for all seven daemon-owned Windows service names with daemon id, status or observed status, cluster id, executed flag, exit code, start type, and `private=false`; live proofs `local-20260618-211051-126-2a89d61c`, `local-20260618-211051-125-cd687ee2`, `local-20260618-211051-063-f0ff980d`, and `local-20260618-211118-108-df5cb8cd` show seven missing audit rows, seven ready/demand install-plan rows, seven start-planned rows, and seven stop-planned rows without service mutation. `cluster-service-execution-runbook` writes an admin-gated wrapper sequence for cluster-native readiness, cluster install, cluster start, cluster audit, cluster stop, and final cluster audit; the artifact now uses `Invoke-EpiphanyRunbookStep` to reset `$LASTEXITCODE`, catch thrown/nonzero failures, continue gathering receipts after a failed step, and always runs `cluster-service-execution-audit` from `finally`; generated child execution runbooks no longer use `Invoke-Expression`, and each step invokes the known wrapper `ScriptPath` with an explicit `Arguments` array. The wrapper calls `epiphany-daemon-supervisor cluster-service-execution-runbook` after artifact generation, so the runbook itself has a typed `daemon_service_lifecycle` receipt with action `cluster-windows-service-execution-runbook`, status `written`, artifact path, final-audit metadata, step-failure policy metadata, and `privateStateExposed=false`. Its wrapper JSON and typed receipt args expose `runbookTryModes`, `finalAuditMode=cluster-service-execution-audit`, `finalAuditRunsInFinally=true`, `stepFailurePolicy=continue-after-step-failure`, `continueAfterStepFailure=true`, `nonzeroExitFailsStep=true`, and `exitsNonzeroAfterFinalAudit=true`; direct wrapper summaries now print the exact `elevatedCommand=Start-Process PowerShell -Verb RunAs -Wait ...` invocation, `artifactSha256=`, and `aftercare=tools/epiphany_local_run.ps1 -Mode cluster-service-execution-audit`. Live proof `local-20260619-010940-407-b0744f08` generated the robust cluster artifact and printed hash `bf116ed4fd5bb2c9dc77f5032d19e792b012941a60b109389b79e5fcb0a2a5f6` without service mutation. `cluster-service-execution-audit` first requires the sealed `cluster-windows-service-execution-runbook` receipt, then checks the latest cluster-native readiness plus cluster install/start/audit/stop lifecycle receipts by receipt timestamp and reports `complete` only when the runbook and elevated effect receipts are sealed and successful. Audit check rows retain lifecycle `operatorArtifactRef`; wrapper summaries now print OK runbook witnesses with SHA-256 before compact failed-check anatomy. Live proof `local-20260618-170322-330-e6cb2117` printed `cluster-windows-service-execution-runbook=...\epiphany-cluster-daemon-services-execution-runbook.ps1:sha256=3239ac17008b1ce857970e40b17d37a1ecf1631a3a6636bb2b8678312fb604a0` and the expected five failed checks without mutating Windows services. @@ -649,5 +649,5 @@ current_status: - `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now emits an explicit Idunn preflight summary before the operator elevation boundary. Its JSON and one-line summary report `preflightStatus`, child artifact present/hash-verified/mismatch/missing counts, aggregate service execution failed/missing check counts, child preflight rows with expected/actual SHA-256s, and private-state exposure. Live proof `local-20260619-025627-410-9724e2f6` generated the non-mutating parent artifact with `preflightStatus=ready-for-elevated-operator`, two child runbooks present, two hashes verified, zero mismatches, zero missing artifacts, eleven failed sealed service checks, zero missing checks, explicit aftercare audits, and `privateStateExposed=false`. The remaining scar is still explicit elevated operator execution followed by complete Idunn audits, not missing parent/child artifact readiness. - Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass. - `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure. - last_completed_repo_swarm_cut: Repo Persona intake now carries semantic Persona memory recall on the product path before public pressure becomes Imagination work. `epiphany-work persona-intake` loads repo-local `agents.msgpack`, builds a RoleSelf memory-graph fallback context, gives the Qdrant/Ollama Persona-memory cache a bounded chance to retrieve typed Persona memories, and records sealed recall status/cache status/hit count in the intake output plus full internal receipt. Direct proof on disposable fresh-repo fixture `.epiphany-smoke\fresh-repo-mvp-20260621-164107\repo-body` returned `memoryRecallStatus=fallback`, `memoryRecallCacheStatus=qdrant-unavailable`, `memoryRecallHitCount=0`, `privateStateExposed=false`, and the stored receipt contained typed memory-graph recall without the deliberately sealed private note. Focused proof `epiphany-persona-memory-recall-smoke` still shows the Qdrant bridge, heartbeat recall, and Projector/Persona/Interpreter prompt slots are wired with `privateStateExposed=false`; unit tests `persona_memory_recall_bridge_*` prove both mocked Qdrant-hit and fallback paths. Fresh-repo MVP smoke now asserts Persona intake returns memory recall status/cache status as well as the Weksa lowering receipt id. - next_action: Continue repo-swarm MVP work from `notes/epiphany-repo-swarm-mvp-contract.md`. The aggregate MVP gate is now sealed: `tools/epiphany_local_run.ps1 -Mode repo-swarm-mvp-gate` reports `demoReady=true`, `mvpReady=false`, thirteen green proof gates, one Idunn elevated-service warning gate, zero blockers, and `privateStateExposed=false`. Useful next cuts are live-fire testing on a disposable or low-stakes repo Body, explicit elevated/operator Idunn execution proof only when the human grants that authority, or another repo-owned safe action family only if it materially improves the MVP story. Persona-to-Imagination consensus readback, Mind-owned interpreter brief cargo, safe-family planning depth and closure, Gjallar closure/readiness/readiness-review rows, receipt-directory readiness-review indexing, Bifrost ledger accounting rows including readiness-review closure plus artifact/metrics final receipt closure, readiness wrapper mouth, repo deployment handoff/readback wrappers, readiness deployment-aftercare closure, readiness Idunn/tool-directory receipt validation, readiness Bifrost/GitHub publication-chain validation, readiness upstream-main sync validation, readiness review/adoption receipt validation, aggregate fresh-repo/readiness/Bifrost/deployment-handoff/daemon-survival MVP gate reporting, and bounded Idunn daemon survival rehearsal are sealed; preserve Idunn service lifecycle ownership, Bifrost publication/upstream-main ownership, Mind durable-state admission, and existing CultMesh/Odin/Eve tool directories. Windows service install/start/deployment execution still requires explicit elevated operator authority. + last_completed_repo_swarm_cut: The aggregate MVP gate now carries Persona semantic memory recall as a first-class green proof row. `epiphany-repo-swarm-mvp-gate-smoke` builds sealed Persona memory chunks, proves private notes are not exposed, gives the Qdrant/Ollama Persona-memory cache a bounded chance to answer, falls back to typed memory-graph context when Qdrant is unavailable, and checks that Projector, Persona, and Interpreter prompts all receive semantic recall as non-authoritative context. Direct proof `.epiphany-smoke\repo-swarm-mvp-gate-20260621-170445` reports `personaMemoryRecall.cacheStatus=qdrant-unavailable`, `personaMemoryRecall.status=fallback`, `chunkCount=3`, `hitCount=0`, `heartbeatRecallWired=true`, `liveQdrantRequiredForSmoke=false`, fifteen green gates, one Idunn warning, zero blockers, and `privateStateExposed=false`. The product path also remains wired: `epiphany-work persona-intake` loads repo-local `agents.msgpack`, builds a RoleSelf memory-graph fallback context, tries the bounded Qdrant/Ollama cache, and records sealed recall status/cache status/hit count before public pressure becomes Imagination work. + next_action: Continue repo-swarm MVP work from `notes/epiphany-repo-swarm-mvp-contract.md`. The aggregate MVP gate is now sealed with Weksa and Persona memory recall included: direct `epiphany-repo-swarm-mvp-gate-smoke` reports `demoReady=true`, `mvpReady=false`, fifteen green proof gates, one Idunn elevated-service warning gate, zero blockers, and `privateStateExposed=false`. Useful next cuts are live-fire testing on a disposable or low-stakes repo Body, explicit elevated/operator Idunn execution proof only when the human grants that authority, or another repo-owned safe action family only if it materially improves the MVP story. Persona-to-Imagination consensus readback, Mind-owned interpreter brief cargo, safe-family planning depth and closure, Gjallar closure/readiness/readiness-review rows, receipt-directory readiness-review indexing, Bifrost ledger accounting rows including readiness-review closure plus artifact/metrics final receipt closure, readiness wrapper mouth, repo deployment handoff/readback wrappers, readiness deployment-aftercare closure, readiness Idunn/tool-directory receipt validation, readiness Bifrost/GitHub publication-chain validation, readiness upstream-main sync validation, readiness review/adoption receipt validation, aggregate fresh-repo/readiness/Bifrost/deployment-handoff/daemon-survival/Weksa/Persona-memory MVP gate reporting, and bounded Idunn daemon survival rehearsal are sealed; preserve Idunn service lifecycle ownership, Bifrost publication/upstream-main ownership, Mind durable-state admission, and existing CultMesh/Odin/Eve tool directories. Windows service install/start/deployment execution still requires explicit elevated operator authority.