From 01f1a0bcbc7457446d3468c5a6037c0dd4c93648 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 6 May 2026 19:59:19 +0100 Subject: [PATCH] Shape heartbeat cooldown with personality and mood --- .../src/bin/epiphany-heartbeat-store.rs | 27 ++ epiphany-core/src/heartbeat_state.rs | 297 +++++++++++++++++- notes/fresh-workspace-handoff.md | 8 +- state/agent-heartbeats.msgpack | Bin 40188 -> 49859 bytes state/ledgers.msgpack | Bin 53068 -> 53515 bytes state/map.yaml | 6 +- 6 files changed, 323 insertions(+), 15 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-heartbeat-store.rs b/epiphany-core/src/bin/epiphany-heartbeat-store.rs index b12d86db..9f095cba 100644 --- a/epiphany-core/src/bin/epiphany-heartbeat-store.rs +++ b/epiphany-core/src/bin/epiphany-heartbeat-store.rs @@ -127,6 +127,7 @@ fn main() -> Result<()> { schedule_id: tick_schedule_id, source_scene_ref, defer_completion, + agent_store: agent_store.clone(), }, )?; if apply_rumination { @@ -288,6 +289,7 @@ fn run_smoke(agent_store: &Path) -> Result { schedule_id: "smoke-work".to_string(), source_scene_ref: "smoke/coordinator".to_string(), defer_completion: true, + agent_store: Some(temp_agent_store.clone()), }, )?; let blocked_repeat = tick_heartbeat_store( @@ -301,6 +303,7 @@ fn run_smoke(agent_store: &Path) -> Result { schedule_id: "smoke-work".to_string(), source_scene_ref: "smoke/coordinator".to_string(), defer_completion: true, + agent_store: Some(temp_agent_store.clone()), }, ) .err() @@ -329,6 +332,7 @@ fn run_smoke(agent_store: &Path) -> Result { schedule_id: "smoke-idle".to_string(), source_scene_ref: "smoke/idle".to_string(), defer_completion: false, + agent_store: Some(temp_agent_store.clone()), }, )?; @@ -390,6 +394,28 @@ fn run_smoke(agent_store: &Path) -> Result { && routine["routine"]["appraisals"]["schema_version"] == "epiphany.agent_thought_appraisals.v0" && routine["routine"]["reactions"]["schema_version"] == "epiphany.agent_reactions.v0" + && routine_status["participants"] + .as_array() + .and_then(|participants| { + let hands = participants + .iter() + .find(|item| item["roleId"] == "implementation")?; + let self_lane = participants + .iter() + .find(|item| item["roleId"] == "coordinator")?; + let hands_personality = hands["personalityCooldownMultiplier"] + .as_f64() + .unwrap_or(1.0); + let self_personality = self_lane["personalityCooldownMultiplier"] + .as_f64() + .unwrap_or(1.0); + let hands_effective = hands["effectiveCooldownMultiplier"].as_f64().unwrap_or(1.0); + let self_effective = self_lane["effectiveCooldownMultiplier"] + .as_f64() + .unwrap_or(1.0); + Some(hands_personality < self_personality && hands_effective < self_effective) + }) + == Some(true) && routine_status["sleepCycle"]["schema_version"] == "epiphany.sleep_cycle.v0"; let result = serde_json::json!({ @@ -400,6 +426,7 @@ fn run_smoke(agent_store: &Path) -> Result { "idleEvent": idle["event"], "idleRumination": idle["rumination"], "voidRoutine": routine["routine"], + "personalityTiming": routine_status["participants"], "validationErrors": validation_errors, "initiativeErrors": initiative_errors, }); diff --git a/epiphany-core/src/heartbeat_state.rs b/epiphany-core/src/heartbeat_state.rs index d2e3fece..d3495f8f 100644 --- a/epiphany-core/src/heartbeat_state.rs +++ b/epiphany-core/src/heartbeat_state.rs @@ -200,6 +200,7 @@ pub struct HeartbeatTickOptions { pub schedule_id: String, pub source_scene_ref: String, pub defer_completion: bool, + pub agent_store: Option, } #[derive(Clone, Debug, PartialEq)] @@ -478,6 +479,7 @@ pub fn run_void_routine_store( let memory_records = collect_role_memory_records(options.agent_store.as_deref())?; let appraisal_profiles = collect_role_appraisal_profiles(options.agent_store.as_deref())?; + apply_personality_timing_profiles(&mut state, &appraisal_profiles); let resonance = build_memory_resonance(&memory_records); let incubation = build_incubation(&state.incubation, &resonance, &memory_records); let thought_lanes = build_thought_lanes(&resonance, &incubation, &memory_records); @@ -486,6 +488,7 @@ pub fn run_void_routine_store( let appraisals = build_agent_appraisals(&appraisal_profiles, &thought_lanes, &incubation, &bridge); let reactions = build_agent_reactions(&appraisals, &bridge); + apply_mood_timing_from_appraisals(&mut state, &appraisals); let sleep_cycle = update_sleep_cycle(state.sleep_cycle.as_ref(), &incubation, options.allow_dream); let run_id = format!("epiphany-void-routine-{}", now_stamp()); @@ -559,6 +562,13 @@ pub fn tick_heartbeat_store( state.target_heartbeat_rate = options.target_heartbeat_rate; } patch_missing_participants(&mut state); + if let Some(agent_store) = options.agent_store.as_deref() { + let appraisal_profiles = collect_role_appraisal_profiles(Some(agent_store))?; + apply_personality_timing_profiles(&mut state, &appraisal_profiles); + } + if let Some(appraisals) = state.appraisals.clone() { + apply_mood_timing_from_appraisals(&mut state, &appraisals); + } let result = tick_once(&mut state, &options)?; write_heartbeat_state_entry(store_path, &state)?; @@ -678,7 +688,7 @@ fn tick_once( rate, ); let scene_clock = state.scene_clock.max(selected.next_ready_at); - let recovery = action.base_recovery + let recovery = action.base_recovery * effective_cooldown_multiplier(&selected) / selected .initiative_speed .max(state.selection_policy.minimum_speed); @@ -699,6 +709,19 @@ fn tick_once( next_ready_at: None, extra: BTreeMap::new(), }; + let mut pending = pending; + pending.extra.insert( + "personalityCooldownMultiplier".to_string(), + serde_json::json!(personality_cooldown_multiplier(&selected)), + ); + pending.extra.insert( + "moodCooldownMultiplier".to_string(), + serde_json::json!(mood_cooldown_multiplier(&selected)), + ); + pending.extra.insert( + "effectiveCooldownMultiplier".to_string(), + serde_json::json!(effective_cooldown_multiplier(&selected)), + ); state.participants[selected_index].pending_turn = Some(pending.clone()); state.participants[selected_index].last_action_id = Some(action.action_id.clone()); state.participants[selected_index].last_woke_at = Some(now_iso()); @@ -751,6 +774,9 @@ fn tick_once( "action_type": action.action_type, "action_scale": action.action_scale, "base_recovery": action.base_recovery, + "personality_cooldown_multiplier": personality_cooldown_multiplier(&selected_after), + "mood_cooldown_multiplier": mood_cooldown_multiplier(&selected_after), + "effective_cooldown_multiplier": effective_cooldown_multiplier(&selected_after), "initiative_cost": action.initiative_cost, "interruptibility": action.interruptibility, "commitment": action.commitment, @@ -782,7 +808,7 @@ fn tick_once( "review_notes": [ "Epiphany heartbeat uses Ghostlight initiative timing as a harness scheduling receipt.", "A selected idle lane may ruminate and request bounded self-memory mutation; it may not invent project work.", - "When no coordinator work is active, idle rumination uses the sleep heartbeat multiplier so the swarm dreams slowly instead of thrashing." + "When no coordinator work is active, idle rumination is slowed by the sleep multiplier and shaped by personality and mood cooldowns so the swarm dreams instead of thrashing." ], }); @@ -969,11 +995,11 @@ fn action_for_selection( commitment: 0.25, local_affordance_basis: vec![ format!( - "{} has no actionable lane work; ruminate and distill role memory.", + "{} has no actionable lane work; ruminate on role quality and prepare candidate self-memory pressure.", selected.display_name ), "Heartbeat slots control opportunity, not project authority.".to_string(), - "When no coordinator work is active, idle rumination uses the sleep heartbeat multiplier so the swarm dreams slowly instead of thrashing.".to_string(), + "When no coordinator work is active, idle rumination is slowed by the sleep multiplier and shaped by personality and mood cooldowns so the swarm dreams instead of thrashing.".to_string(), ], } } @@ -1304,6 +1330,11 @@ fn participant_status_json(participant: &HeartbeatParticipant) -> Value { "arena": participant_arena(participant), "participantKind": participant_kind(participant), "initiativeSpeed": participant.initiative_speed, + "personalityCooldownMultiplier": personality_cooldown_multiplier(participant), + "moodCooldownMultiplier": mood_cooldown_multiplier(participant), + "effectiveCooldownMultiplier": effective_cooldown_multiplier(participant), + "personalityTiming": participant.extra.get("personalityTiming"), + "moodTiming": participant.extra.get("moodTiming"), "nextReadyAt": participant.next_ready_at, "reactionBias": participant.reaction_bias, "interruptThreshold": participant.interrupt_threshold, @@ -1324,6 +1355,9 @@ fn schedule_participant_json(participant: &HeartbeatParticipant) -> Value { "arena": participant_arena(participant), "participant_kind": participant_kind(participant), "initiative_speed": participant.initiative_speed, + "personality_cooldown_multiplier": personality_cooldown_multiplier(participant), + "mood_cooldown_multiplier": mood_cooldown_multiplier(participant), + "effective_cooldown_multiplier": effective_cooldown_multiplier(participant), "next_ready_at": participant.next_ready_at, "reaction_bias": participant.reaction_bias, "interrupt_threshold": participant.interrupt_threshold, @@ -1354,6 +1388,9 @@ fn pending_turn_json(turn: &HeartbeatPendingTurn) -> Value { "startedAt": turn.started_at, "startedSceneClock": turn.started_scene_clock, "baseRecovery": turn.base_recovery, + "personalityCooldownMultiplier": turn.extra.get("personalityCooldownMultiplier"), + "moodCooldownMultiplier": turn.extra.get("moodCooldownMultiplier"), + "effectiveCooldownMultiplier": turn.extra.get("effectiveCooldownMultiplier"), "recovery": turn.recovery, "cooldownPolicy": turn.cooldown_policy, "completedAt": turn.completed_at, @@ -1387,16 +1424,16 @@ fn rumination_patch(role_id: &str, action_id: &str) -> Value { let display_name = display_name_for_role(role_id); serde_json::json!({ "agentId": agent_id_for_role(role_id), - "reason": format!("{display_name} won an idle heartbeat slot and should preserve the habit of using idle wakeups to distill role memory instead of manufacturing project work."), + "reason": format!("{display_name} won an idle heartbeat slot and should preserve the habit of using idle wakeups to ruminate before sleep/review distills anything durable."), "semanticMemories": [{ "memoryId": format!("mem-{role_id}-heartbeat-rumination"), - "summary": "When a heartbeat wakes this lane and no coordinator-approved work is available, the correct move is to ruminate on role quality, cut stale memory, and return a bounded self-memory improvement rather than inventing project authority.", + "summary": "When a heartbeat wakes this lane and no coordinator-approved work is available, the correct move is to ruminate on role quality and surface candidate self-memory pressure rather than inventing project authority; durable distillation belongs in sleep or review.", "salience": 0.78, "confidence": 0.88, }], "goals": [{ - "goalId": format!("goal-{role_id}-heartbeat-self-distill"), - "description": "Use idle heartbeat slots to become sharper at this lane's own work before touching project state.", + "goalId": format!("goal-{role_id}-heartbeat-rumination"), + "description": "Use idle heartbeat slots to ruminate on this lane's own work and prepare bounded memory pressure before touching project state.", "scope": "life", "priority": 0.82, "emotionalStake": "An idle organ that invents work becomes noise in the bloodstream.", @@ -1592,6 +1629,247 @@ fn collect_trait_group( } } +fn apply_personality_timing_profiles( + state: &mut EpiphanyHeartbeatStateEntry, + profiles: &[RoleAppraisalProfile], +) { + for participant in &mut state.participants { + let Some(profile) = profiles + .iter() + .find(|profile| profile.role_id == participant.role_id) + else { + continue; + }; + let timing = personality_timing_for_profile(profile); + participant.extra.insert( + "personalityCooldownMultiplier".to_string(), + serde_json::json!(timing.cooldown_multiplier), + ); + participant.extra.insert( + "personalityTiming".to_string(), + serde_json::json!({ + "schema_version": "epiphany.personality_timing.v0", + "source": "state/agents.msgpack", + "cooldownMultiplier": timing.cooldown_multiplier, + "workDrive": timing.work_drive, + "handsiness": timing.handsiness, + "caution": timing.caution, + "ruminationBias": timing.rumination_bias, + "basis": timing.basis, + "contract": "Cooldown is personality-shaped. Lower multipliers recover faster; higher multipliers yield the floor to other lanes." + }), + ); + } +} + +#[derive(Clone, Debug)] +struct PersonalityTiming { + cooldown_multiplier: f64, + work_drive: f64, + handsiness: f64, + caution: f64, + rumination_bias: f64, + basis: Vec, +} + +fn personality_timing_for_profile(profile: &RoleAppraisalProfile) -> PersonalityTiming { + let work_drive = trait_match_score( + &profile.traits, + &[ + "objective", + "diff", + "implementation", + "hands", + "bloodhound", + "craft", + "act", + "source_touch", + "work", + "task", + ], + ); + let handsiness = trait_match_score( + &profile.traits, + &[ + "hands", + "implementation", + "diff_truth", + "objective_pursuit", + "bloodhound_pressure", + "source_touch_precision", + "small_reviewable_cut", + "craft", + ], + ); + let caution = trait_match_score( + &profile.traits, + &[ + "review", + "gate", + "caution", + "guard", + "risk", + "verification", + "truth", + "falsification", + "routing", + "discipline", + ], + ); + let rumination_bias = trait_match_score( + &profile.traits, + &[ + "dream", + "memory", + "reflection", + "imagination", + "future", + "translation", + "watch", + "continuity", + "self", + ], + ); + let cooldown = (1.05 + profile.guardedness * 0.28 + caution * 0.24 + rumination_bias * 0.08 + - profile.reactivity * 0.16 + - profile.plasticity * 0.10 + - work_drive * 0.18 + - handsiness * 0.34) + .clamp(0.55, 1.55); + let mut basis = Vec::new(); + for item in profile.traits.iter().take(6) { + basis.push(format!( + "{}.{} activation {:.2} plasticity {:.2}", + item.group, item.name, item.activation, item.plasticity + )); + } + PersonalityTiming { + cooldown_multiplier: round3(cooldown), + work_drive: round3(work_drive), + handsiness: round3(handsiness), + caution: round3(caution), + rumination_bias: round3(rumination_bias), + basis, + } +} + +fn trait_match_score(traits: &[PersonalityTraitProjection], needles: &[&str]) -> f64 { + let mut score = 0.0_f64; + let mut weight = 0.0_f64; + for item in traits { + let haystack = format!("{} {}", item.group, item.name); + let matched = needles + .iter() + .any(|needle| haystack.contains(&needle.replace('_', " "))); + let matched = matched || needles.iter().any(|needle| haystack.contains(*needle)); + if matched { + let item_weight = 0.7 + item.plasticity * 0.3; + score += item.activation * item_weight; + weight += item_weight; + } + } + if weight <= f64::EPSILON { + 0.0 + } else { + (score / weight).clamp(0.0, 1.0) + } +} + +fn apply_mood_timing_from_appraisals(state: &mut EpiphanyHeartbeatStateEntry, appraisals: &Value) { + let Some(items) = appraisals + .get("participantAppraisals") + .and_then(Value::as_array) + else { + return; + }; + for participant in &mut state.participants { + let Some(appraisal) = items + .iter() + .find(|item| item.get("roleId").and_then(Value::as_str) == Some(&participant.role_id)) + else { + continue; + }; + let emotional = appraisal + .get("emotionalAppraisal") + .and_then(Value::as_object); + let urgency = emotional + .and_then(|value| value.get("urgency")) + .and_then(Value::as_f64) + .unwrap_or(0.0) + .clamp(0.0, 1.0); + let arousal = emotional + .and_then(|value| value.get("arousal")) + .and_then(Value::as_f64) + .unwrap_or(0.0) + .clamp(0.0, 1.0); + let thought_pressure = emotional + .and_then(|value| value.get("thoughtPressure")) + .and_then(Value::as_f64) + .unwrap_or(0.0) + .clamp(0.0, 1.0); + let guardedness = emotional + .and_then(|value| value.get("guardedness")) + .and_then(Value::as_f64) + .unwrap_or(0.0) + .clamp(0.0, 1.0); + let reaction_intensity = appraisal + .pointer("/candidateImplications/reactionIntensity") + .and_then(Value::as_f64) + .unwrap_or(0.0) + .clamp(0.0, 1.0); + let anxiety = (urgency * 0.32 + + arousal * 0.22 + + thought_pressure * 0.24 + + guardedness * 0.12 + + reaction_intensity * 0.10) + .clamp(0.0, 1.0); + let multiplier = + (1.10 - urgency * 0.24 - anxiety * 0.38 - reaction_intensity * 0.12).clamp(0.55, 1.25); + participant.extra.insert( + "moodCooldownMultiplier".to_string(), + serde_json::json!(round3(multiplier)), + ); + participant.extra.insert( + "moodTiming".to_string(), + serde_json::json!({ + "schema_version": "epiphany.mood_timing.v0", + "source": appraisal.get("appraisalId"), + "cooldownMultiplier": round3(multiplier), + "anxiety": round3(anxiety), + "urgency": round3(urgency), + "arousal": round3(arousal), + "thoughtPressure": round3(thought_pressure), + "guardedness": round3(guardedness), + "reactionIntensity": round3(reaction_intensity), + "contract": "Mood bends personality timing. Anxiety and urgency lower cooldown so the lane that needs the floor most gets it sooner." + }), + ); + } +} + +fn personality_cooldown_multiplier(participant: &HeartbeatParticipant) -> f64 { + participant + .extra + .get("personalityCooldownMultiplier") + .and_then(Value::as_f64) + .unwrap_or(1.0) + .clamp(0.25, 3.0) +} + +fn mood_cooldown_multiplier(participant: &HeartbeatParticipant) -> f64 { + participant + .extra + .get("moodCooldownMultiplier") + .and_then(Value::as_f64) + .unwrap_or(1.0) + .clamp(0.25, 3.0) +} + +fn effective_cooldown_multiplier(participant: &HeartbeatParticipant) -> f64 { + round3(personality_cooldown_multiplier(participant) * mood_cooldown_multiplier(participant)) + .clamp(0.20, 4.0) +} + fn build_memory_resonance(records: &[RoleMemoryRecord]) -> Value { let mut pairs = Vec::new(); for (left_index, left) in records.iter().enumerate() { @@ -2523,6 +2801,7 @@ mod tests { schedule_id: "native-work".to_string(), source_scene_ref: "test/native".to_string(), defer_completion: true, + agent_store: None, }, )?; assert_eq!(work["event"]["selectedRole"], "implementation"); @@ -2540,6 +2819,7 @@ mod tests { schedule_id: "native-work-repeat".to_string(), source_scene_ref: "test/native".to_string(), defer_completion: false, + agent_store: None, }, ) .unwrap_err(); @@ -2602,6 +2882,7 @@ mod tests { schedule_id: "pallas.turn-001".to_string(), source_scene_ref: "ghostlight/pallas-training-loop-v0".to_string(), defer_completion: true, + agent_store: None, }, )?; diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 69656e70..512c360f 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -43,9 +43,9 @@ remembers doctrine; the branch remembers the blade. - The prompt doctrine pass is landed. Shared Epiphany prompts now carry distilled memory/evidence discipline. Rendered state intro/doctrine text lives in `epiphany-core/src/prompts/`, and lane/control prompt text lives in `vendor/codex/codex-rs/app-server/src/prompts/epiphany_specialists.toml`: modeling is the Body, implementation is the Hands and GUI-launched main coding lane, verification is the Soul, reorientation is Life, coordinator remains the read-only Self, and CRRC owns the pre-compaction intervention template. - The Ghostlight memory pass is landed. `epiphany_specialists.toml` now has a shared persistent-memory projection prepended by the harness to fixed role specialists, reorientation workers, coordinator notes, and CRRC checkpoint interventions. The rendered base doctrine also states the Perfect Machine rule directly: prompt is projection, durable typed state is the mind, every lane must improve its own memory/model/prompt/evidence habit or name the repair, and each lane phrases that duty in its own organ language so the salience sticks. - The role self-memory persistence pass is native now. Each lane has a Ghostlight-shaped typed dossier in `state/agents.msgpack`, and specialists may return optional `selfPatch` requests beside their normal role result. `roleResult`/`roleAccept` project coordinator review as `selfPersistence`: accepted requests are role-matched, bounded lane memory/goal/value/private-note mutations; refused requests explain wrong role, project-truth smuggling, authority grabs, bloat, missing reason, or malformed records. GUI/coordinator accept paths apply accepted `selfPatch` requests through the native `epiphany-agent-memory-store` binary; project truth still belongs only in `EpiphanyThreadState`. -- 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, history, and pending turns through `epiphany-core::EpiphanyHeartbeatStateEntry` and the native `epiphany-heartbeat-store` binary. 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 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, 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. 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 --scene-participant ` 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, advances the sleep/dream cycle, updates the typed heartbeat store, and emits an auditable `epiphany.void_routine.v0` receipt. This mutates only heartbeat physiology fields: project truth and role memory mutation remain on their reviewed surfaces. +- 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. This mutates only heartbeat physiology fields: project truth and role memory mutation remain on their reviewed surfaces. - 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. - The first Epiphany-native character-loop pass is landed. `epiphany-character-loop turn --role face --stimulus ` loads Face's typed dossier from `state/agents.msgpack` and emits an auditable `epiphany.character_turn_packet.v0` packet with projected local context, visible stimulus, allowed outputs, and guardrails. The same packet builder works for other role ids, because every organ already has a Ghostlight-shaped dossier. @@ -139,8 +139,8 @@ The current spine, blessed but not yet finished: - durable investigation checkpoint packet through typed state, prompt, scene, and context - distilled shared and config-backed prompt doctrine through the base prompt, rendered Epiphany state prompt files, modeling/Body, implementation/Hands, verification/Soul, reorientation/Life, coordinator/Self, and CRRC intervention surfaces - shared Ghostlight-derived persistent memory projection across Imagination, Body, Soul, Life, Self, CRRC checkpoint steering, and the GUI-launched Hands implementation lane -- Ghostlight-derived heartbeat initiative scheduling through the native `epiphany-heartbeat-store` binary, with Self and Face included as first-class Epiphany maintenance participants, Ghostlight scene characters supported through the same timing law, idle rumination feeding candidate self-memory pressure, sleep/dream passes serving as the distillation window, and heartbeat state persisted through typed CultCache MessagePack stores -- Void-derived native routine physiology through `epiphany-heartbeat-store routine`, with sleep cycle, memory resonance, incubation, analytic/associative cognition lanes, bridge judgment, candidate interventions, Ghostlight-style personality appraisals, derived reactions, and dream maintenance stored in the typed heartbeat store +- Ghostlight-derived heartbeat initiative scheduling through the native `epiphany-heartbeat-store` binary, with Self and Face included as first-class Epiphany maintenance participants, Ghostlight scene characters supported through the same timing law, role-personality cooldowns, appraisal mood/anxiety cooldowns, effective recovery timing, idle rumination feeding candidate self-memory pressure, sleep/dream passes serving as the distillation window, and heartbeat state persisted through typed CultCache MessagePack stores +- Void-derived native routine physiology through `epiphany-heartbeat-store routine`, with sleep cycle, memory resonance, incubation, analytic/associative cognition lanes, bridge judgment, candidate interventions, Ghostlight-style personality appraisals, mood/anxiety timing, derived reactions, and dream maintenance stored in the typed heartbeat store - Epiphany-native character-loop packet projection through `epiphany-character-loop`, with Face as the first public-surface actor over its typed role dossier - Face as the public #aquarium-only surface for translating agent thought-weather into short chats or candidate drafts, without moderator authority - Ghostlight-shaped role dossiers in `state/agents.msgpack`, plus `selfPatch` review projection through `roleResult`/`roleAccept` and accepted memory application through the native `epiphany-agent-memory-store` binary diff --git a/state/agent-heartbeats.msgpack b/state/agent-heartbeats.msgpack index 25a206b56444304f6762b855f5b066d79faecc5b..8e90501c2f143da9bb091036781aed4834a7e347 100644 GIT binary patch delta 9146 zcmd^Fe{9s&9VZD5TL%=;Bqda39;Ixh#9S`9;}U)x5FiPVFb3Ny*sy%|ySoQI+j+Jx z$+mLqC}UfNRxp&VMe3@pWwaU+JJjw6s|x*RYf>tvN}JWv7WI#AP*%~2qHUeFuYKn` z``zV|KvYo;Md;q0-+O+~-_PfLzMro@{!R7Edukq;SAFIOC+2^zs;bVcs=YmXswz^Q zc|N5mVuzwgqS7z-7?O@v2_rHTy?pH7?@14@e%Ahd3r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