Rename Face to Persona and Proprioception to Modeling
This commit is contained in:
parent
9f95cd985e
commit
8c2b08b463
76 changed files with 743 additions and 743 deletions
|
|
@ -131,12 +131,12 @@ pub fn epiphany_role_launch_output_schema(role_id: EpiphanyRoleResultRoleId) ->
|
|||
},
|
||||
"selfPatch": {
|
||||
"type": "object",
|
||||
"description": "Optional bounded request to update this role's persistent organ memory. Work organs may update lane habits, durable lessons, goals, values, or private notes; Persona affect/social state belongs only to Face-style Persona surfaces. It must not contain project truth, code edits, job authority, graph/frontier/checkpoint/planning changes, or objective changes.",
|
||||
"description": "Optional bounded request to update this role's persistent organ memory. Work organs may update lane habits, durable lessons, goals, values, or private notes; Persona affect/social state belongs only to Persona public surfaces. It must not contain project truth, code edits, job authority, graph/frontier/checkpoint/planning changes, or objective changes.",
|
||||
"required": ["agentId", "reason"],
|
||||
"properties": {
|
||||
"agentId": {
|
||||
"type": "string",
|
||||
"description": "Expected target persistent agent id for this lane, such as epiphany.proprioception or epiphany.soul."
|
||||
"description": "Expected target persistent agent id for this lane, such as epiphany.modeling or epiphany.soul."
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
|
|
@ -389,7 +389,7 @@ pub struct EpiphanyRolePromptConfig {
|
|||
#[allow(dead_code)]
|
||||
pub repo_memory: String,
|
||||
#[allow(dead_code)]
|
||||
pub face: String,
|
||||
pub persona: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
|
|
@ -772,7 +772,7 @@ mod tests {
|
|||
prompts.roles.repo_personality.as_str(),
|
||||
),
|
||||
("roles.repo_memory", prompts.roles.repo_memory.as_str()),
|
||||
("roles.face", prompts.roles.face.as_str()),
|
||||
("roles.persona", prompts.roles.persona.as_str()),
|
||||
(
|
||||
"implementation.continue_template",
|
||||
prompts.implementation.continue_template.as_str(),
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ const ROLE_TARGETS: &[(&str, &str, &str)] = &[
|
|||
),
|
||||
(
|
||||
"modeling",
|
||||
"epiphany.proprioception",
|
||||
"proprioception.agent-state.json",
|
||||
"epiphany.modeling",
|
||||
"modeling.agent-state.json",
|
||||
),
|
||||
("verification", "epiphany.soul", "soul.agent-state.json"),
|
||||
("implementation", "epiphany.hands", "hands.agent-state.json"),
|
||||
("research", "epiphany.eyes", "eyes.agent-state.json"),
|
||||
("face", "epiphany.face", "face.agent-state.json"),
|
||||
("Persona", "epiphany.Persona", "Persona.agent-state.json"),
|
||||
("coordinator", "epiphany.self", "self.agent-state.json"),
|
||||
];
|
||||
|
||||
|
|
@ -836,9 +836,9 @@ fn persona_value(value: &GhostlightValue) -> Value {
|
|||
"label": value.label,
|
||||
"priority": value.priority,
|
||||
"summary": if value.unforgivable_if_betrayed {
|
||||
"Protected value; betrayal is marked as unforgivable in local Face state."
|
||||
"Protected value; betrayal is marked as unforgivable in local Persona state."
|
||||
} else {
|
||||
"Value projected from local Face organ memory."
|
||||
"Value projected from local Persona organ memory."
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
@ -858,13 +858,13 @@ fn persona_memory_thought(memory: &GhostlightMemory, persona_id: &str, timestamp
|
|||
"target": persona_target("self", persona_id, persona_id),
|
||||
"summary": memory.summary,
|
||||
"claim": memory.summary,
|
||||
"tension": "Projected from local Face memory; consumers should preserve provenance and avoid treating this as omniscient project truth.",
|
||||
"tension": "Projected from local Persona memory; consumers should preserve provenance and avoid treating this as omniscient project truth.",
|
||||
"actionImplication": "Use as Persona memory pressure, not as direct action authority.",
|
||||
"intensity": memory.salience,
|
||||
"valence": 0,
|
||||
"createdAt": timestamp,
|
||||
"updatedAt": timestamp,
|
||||
"tags": ["epiphany", "face-memory"],
|
||||
"tags": ["epiphany", "Persona-memory"],
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -876,11 +876,11 @@ fn persona_goal_thought(goal: &GhostlightGoal, persona_id: &str, timestamp: &str
|
|||
"summary": goal.description,
|
||||
"claim": goal.description,
|
||||
"tension": goal.emotional_stake,
|
||||
"actionImplication": "This goal may create Face agency pressure, but action still requires the caller's review path.",
|
||||
"actionImplication": "This goal may create Persona agency pressure, but action still requires the caller's review path.",
|
||||
"intensity": goal.priority,
|
||||
"createdAt": timestamp,
|
||||
"updatedAt": timestamp,
|
||||
"tags": ["epiphany", "face-goal", &goal.scope],
|
||||
"tags": ["epiphany", "Persona-goal", &goal.scope],
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -914,7 +914,7 @@ fn persona_doctrine_stance(value: &GhostlightValue, persona_id: &str, timestamp:
|
|||
"stanceKind": "aligned",
|
||||
"principle": value.label,
|
||||
"summary": value.label,
|
||||
"actionImplication": "Let this value bend Face speech and interpretation without granting automatic action authority.",
|
||||
"actionImplication": "Let this value bend Persona speech and interpretation without granting automatic action authority.",
|
||||
"intensity": value.priority,
|
||||
"updatedAt": timestamp,
|
||||
})
|
||||
|
|
@ -936,7 +936,7 @@ fn now_rfc3339() -> String {
|
|||
|
||||
pub fn organ_state_profile_for_role(role_id: &str) -> EpiphanyOrganStateProfile {
|
||||
match role_id {
|
||||
"face" => EpiphanyOrganStateProfile {
|
||||
"Persona" => EpiphanyOrganStateProfile {
|
||||
profile_kind: EpiphanyOrganStateProfileKind::Persona,
|
||||
state_density: "persona_grade".to_string(),
|
||||
portable_contract: "gamecult.persona_state.v0".to_string(),
|
||||
|
|
@ -952,7 +952,7 @@ pub fn organ_state_profile_for_role(role_id: &str) -> EpiphanyOrganStateProfile
|
|||
"sleep/distillation".to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Epiphany Face is an organ; Persona is the portable person-state contract shared with Ghostlight and VoidBot-style repo Faces.".to_string(),
|
||||
"Epiphany Persona is an organ; Persona is the portable person-state contract shared with Ghostlight and VoidBot-style repo Personas.".to_string(),
|
||||
"Dense canonical families, affect, perceived overlays, and relationship pressure are appropriate for Persona state.".to_string(),
|
||||
],
|
||||
},
|
||||
|
|
@ -970,7 +970,7 @@ pub fn organ_state_profile_for_role(role_id: &str) -> EpiphanyOrganStateProfile
|
|||
"birth-time repo memory and light operating-pressure seeding".to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Work organs need sharp role identity, durable mission memory, values/goals, and heartbeat activation; they do not need Face affect or full Persona machinery.".to_string(),
|
||||
"Work organs need sharp role identity, durable mission memory, values/goals, and heartbeat activation; they do not need Persona affect or full Persona machinery.".to_string(),
|
||||
"Sparse canonical bundles are acceptable here as long as memory, goals, values, and private notes can deepen over time.".to_string(),
|
||||
],
|
||||
},
|
||||
|
|
@ -1664,8 +1664,8 @@ mod tests {
|
|||
let agent_dir = temp.path().join("agents");
|
||||
fs::create_dir_all(&agent_dir)?;
|
||||
fs::write(
|
||||
agent_dir.join("proprioception.agent-state.json"),
|
||||
sample_agent_json("epiphany.proprioception", "Proprioception"),
|
||||
agent_dir.join("modeling.agent-state.json"),
|
||||
sample_agent_json("epiphany.modeling", "Modeling"),
|
||||
)?;
|
||||
for (role_id, agent_id, filename) in ROLE_TARGETS {
|
||||
if *role_id == "modeling" {
|
||||
|
|
@ -1681,8 +1681,8 @@ mod tests {
|
|||
assert!(validate_agent_memory_store(&store)?.is_empty());
|
||||
|
||||
let patch: AgentSelfPatch = serde_json::from_value(serde_json::json!({
|
||||
"agentId": "epiphany.proprioception",
|
||||
"reason": "Proprioception should remember accepted graph growth must stay source-grounded.",
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Modeling should remember accepted graph growth must stay source-grounded.",
|
||||
"semanticMemories": [{
|
||||
"memoryId": "mem-body-native-source-grounding",
|
||||
"summary": "Native role memory patches update typed CultCache organ state rather than JSON dossier files.",
|
||||
|
|
@ -1698,9 +1698,9 @@ mod tests {
|
|||
|
||||
let mut cache = agent_memory_cache(&store)?;
|
||||
cache.pull_all_backing_stores()?;
|
||||
let proprioception = cache.get_required::<EpiphanyAgentMemoryEntry>("modeling")?;
|
||||
let modeling = cache.get_required::<EpiphanyAgentMemoryEntry>("modeling")?;
|
||||
assert!(
|
||||
proprioception
|
||||
modeling
|
||||
.agent
|
||||
.memories
|
||||
.semantic
|
||||
|
|
@ -1761,12 +1761,12 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn organ_state_profiles_distinguish_face_from_lane_organs() {
|
||||
let face = organ_state_profile_for_role("face");
|
||||
assert_eq!(face.profile_kind, EpiphanyOrganStateProfileKind::Persona);
|
||||
assert_eq!(face.state_density, "persona_grade");
|
||||
assert_eq!(face.portable_contract, "gamecult.persona_state.v0");
|
||||
assert_eq!(face.affect_model, "persona_affect_allowed_and_expected");
|
||||
fn organ_state_profiles_distinguish_persona_from_lane_organs() {
|
||||
let persona = organ_state_profile_for_role("Persona");
|
||||
assert_eq!(persona.profile_kind, EpiphanyOrganStateProfileKind::Persona);
|
||||
assert_eq!(persona.state_density, "persona_grade");
|
||||
assert_eq!(persona.portable_contract, "gamecult.persona_state.v0");
|
||||
assert_eq!(persona.affect_model, "persona_affect_allowed_and_expected");
|
||||
|
||||
let hands = organ_state_profile_for_role("implementation");
|
||||
assert_eq!(hands.profile_kind, EpiphanyOrganStateProfileKind::WorkOrgan);
|
||||
|
|
|
|||
|
|
@ -1227,13 +1227,13 @@ mod tests {
|
|||
}
|
||||
let entry = EpiphanyAgentMemoryEntry {
|
||||
schema_version: "ghostlight.agent_state.v0".to_string(),
|
||||
role_id: "face".to_string(),
|
||||
role_id: "Persona".to_string(),
|
||||
world: GhostlightWorld::default(),
|
||||
agent: GhostlightAgent {
|
||||
agent_id: "epiphany.face".to_string(),
|
||||
agent_id: "epiphany.Persona".to_string(),
|
||||
identity: GhostlightIdentity {
|
||||
name: "Epiphany".to_string(),
|
||||
roles: vec!["Face".to_string()],
|
||||
roles: vec!["Persona".to_string()],
|
||||
origin: "Epiphany local harness".to_string(),
|
||||
public_description: "Cute, pushy public machine-spirit.".to_string(),
|
||||
private_notes: vec!["must not leak".to_string()],
|
||||
|
|
@ -1267,8 +1267,8 @@ mod tests {
|
|||
scenes: Vec::new(),
|
||||
};
|
||||
let participant = HeartbeatParticipant {
|
||||
agent_id: "epiphany.face".to_string(),
|
||||
role_id: "face".to_string(),
|
||||
agent_id: "epiphany.Persona".to_string(),
|
||||
role_id: "Persona".to_string(),
|
||||
display_name: "Epiphany".to_string(),
|
||||
initiative_speed: 1.4,
|
||||
reaction_bias: 0.7,
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ fn run_smoke(store: &Path) -> Result<serde_json::Value> {
|
|||
}));
|
||||
}
|
||||
let accepted_patch: AgentSelfPatch = serde_json::from_value(serde_json::json!({
|
||||
"agentId": "epiphany.proprioception",
|
||||
"reason": "Proprioception should remember accepted graph growth must be source-grounded and bounded.",
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Modeling should remember accepted graph growth must be source-grounded and bounded.",
|
||||
"semanticMemories": [{
|
||||
"memoryId": "mem-body-smoke-source-grounding",
|
||||
"summary": "A modeling self-memory request is acceptable when it improves future graph/checkpoint judgment without smuggling project truth.",
|
||||
|
|
@ -162,7 +162,7 @@ fn run_smoke(store: &Path) -> Result<serde_json::Value> {
|
|||
let accepted = review_agent_self_patch_document("modeling", &accepted_patch, store);
|
||||
let wrong_role = review_agent_self_patch_document("verification", &accepted_patch, store);
|
||||
let forbidden_patch: AgentSelfPatch = serde_json::from_value(serde_json::json!({
|
||||
"agentId": "epiphany.proprioception",
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "This tries to put project state in lane memory, which should be refused.",
|
||||
"graphs": {},
|
||||
"semanticMemories": [{
|
||||
|
|
@ -192,7 +192,7 @@ fn run_smoke(store: &Path) -> Result<serde_json::Value> {
|
|||
&& forbidden.status == "rejected"
|
||||
&& applied.status == "accepted"
|
||||
&& temp_validation_errors.is_empty()
|
||||
&& project_persona_state_for_role(store, "face")?["schemaVersion"]
|
||||
&& project_persona_state_for_role(store, "Persona")?["schemaVersion"]
|
||||
== epiphany_core::PERSONA_STATE_SCHEMA_VERSION;
|
||||
Ok(serde_json::json!({
|
||||
"ok": ok,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ fn main() -> Result<()> {
|
|||
let Some(command) = args.next() else {
|
||||
return usage();
|
||||
};
|
||||
let mut role = "face".to_string();
|
||||
let mut role = "Persona".to_string();
|
||||
let mut agent_store = PathBuf::from("state/agents.msgpack");
|
||||
let mut artifact_dir = PathBuf::from(".epiphany-character-loop");
|
||||
let mut stimulus: Option<String> = None;
|
||||
|
|
@ -231,7 +231,7 @@ fn character_turn_packet(
|
|||
}
|
||||
},
|
||||
"guardrails": [
|
||||
"Humans talk to Face; other organs expose internals through Aquarium and typed artifacts rather than becoming direct chats.",
|
||||
"Humans talk to Persona; other organs expose internals through Aquarium and typed artifacts rather than becoming direct chats.",
|
||||
"Use character-local projection: the actor receives its own organ or Persona state and visible stimulus, not omniscient hidden state.",
|
||||
"Run both cognition lanes before choosing an output: analytic keeps the promise honest, associative keeps the living signal from going flat.",
|
||||
"Appraise the thought cluster through this role's personality before reacting; do not use a global mood knob as a substitute for participant-local appraisal.",
|
||||
|
|
@ -429,7 +429,7 @@ fn deterministic_appraisal_seed(
|
|||
let label = interpretation_label("draft", arousal, guardedness, curiosity);
|
||||
HeartbeatAgentThoughtAppraisal {
|
||||
schema_version: "epiphany.agent_thought_appraisal.v0".to_string(),
|
||||
appraisal_id: format!("face-appraisal-{}", short_id()),
|
||||
appraisal_id: format!("Persona-appraisal-{}", short_id()),
|
||||
review_status: "generated_unreviewed".to_string(),
|
||||
participant_agent_id: entry.agent.agent_id.clone(),
|
||||
role_id: entry.role_id.clone(),
|
||||
|
|
@ -465,13 +465,13 @@ fn deterministic_appraisal_seed(
|
|||
thought_pressure: round3(thought_pressure),
|
||||
},
|
||||
interpretation_label: label.clone(),
|
||||
confidence_notes: "Deterministic Face-local appraisal rebuilt from the same Ghostlight-style personality projection logic used by heartbeat. Useful for reaction shape, still reviewable and fallible.".to_string(),
|
||||
confidence_notes: "Deterministic Persona-local appraisal rebuilt from the same Ghostlight-style personality projection logic used by heartbeat. Useful for reaction shape, still reviewable and fallible.".to_string(),
|
||||
candidate_implications: HeartbeatCandidateImplications {
|
||||
reaction_mode: reaction_mode(&label, "draft").to_string(),
|
||||
reaction_intensity: round3(
|
||||
(urgency * 0.55 + arousal * 0.3 + curiosity * 0.15).clamp(0.0, 1.0),
|
||||
),
|
||||
should_speak: entry.role_id == "face" && guardedness < 0.78,
|
||||
should_speak: entry.role_id == "Persona" && guardedness < 0.78,
|
||||
should_incubate: guardedness >= 0.55,
|
||||
},
|
||||
review: HeartbeatAppraisalReview {
|
||||
|
|
@ -503,7 +503,7 @@ fn deterministic_reaction_seed(
|
|||
mood_label: mood_label(arousal, guardedness, curiosity).to_string(),
|
||||
intensity: round3(intensity),
|
||||
bridge_decision: "draft".to_string(),
|
||||
surface: if role_id == "face" {
|
||||
surface: if role_id == "Persona" {
|
||||
"aquarium"
|
||||
} else {
|
||||
"internal"
|
||||
|
|
@ -743,7 +743,7 @@ fn mood_label(arousal: f64, guardedness: f64, curiosity: f64) -> &'static str {
|
|||
|
||||
fn reaction_recommended_use(role_id: &str, mode: &str) -> &'static str {
|
||||
match (role_id, mode) {
|
||||
("face", "draft") => "Prepare a reviewed Aquarium-facing draft; do not post automatically.",
|
||||
("Persona", "draft") => "Prepare a reviewed Aquarium-facing draft; do not post automatically.",
|
||||
(_, "hold_and_verify") => "Bias toward verifier/modeler review before expression.",
|
||||
(_, "inspect") => {
|
||||
"Bias the next heartbeat toward a bounded retrieval or modeling inspection."
|
||||
|
|
@ -761,10 +761,10 @@ fn run_smoke() -> Result<Value> {
|
|||
let temp_dir = scoped_temp_dir("epiphany-character-loop-smoke")?;
|
||||
let artifact_dir = temp_dir.join("artifacts");
|
||||
let result = run_turn(
|
||||
"face",
|
||||
"Persona",
|
||||
Path::new("state/agents.msgpack"),
|
||||
&artifact_dir,
|
||||
"Aquarium hover selected Face and asked what the swarm is feeling.",
|
||||
"Aquarium hover selected Persona and asked what the swarm is feeling.",
|
||||
"smoke/character-loop",
|
||||
"public-surface",
|
||||
"ready",
|
||||
|
|
@ -781,7 +781,7 @@ fn run_smoke() -> Result<Value> {
|
|||
)?;
|
||||
let ok = packet["schema_version"] == CHARACTER_TURN_SCHEMA_VERSION
|
||||
&& packet["protocol"]["bundle"] == "epiphany.character_loop"
|
||||
&& packet["protocol"]["roleId"] == "face"
|
||||
&& packet["protocol"]["roleId"] == "Persona"
|
||||
&& packet["protocol"]["organStateProfile"]["profileKind"] == "persona"
|
||||
&& packet["projectedLocalContext"]["organStateProfile"]["profileKind"] == "persona"
|
||||
&& packet["utteranceState"]["schemaVersion"] == "epiphany.agent_utterance_state.v0"
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ fn main() -> Result<()> {
|
|||
}
|
||||
"queue-mention" => {
|
||||
let store_path = store_path.ok_or_else(|| anyhow!("queue-mention requires --store"))?;
|
||||
let target_role_id = role.unwrap_or_else(|| "face".to_string());
|
||||
let target_role_id = role.unwrap_or_else(|| "Persona".to_string());
|
||||
let result = queue_heartbeat_pending_mention_store(
|
||||
&store_path,
|
||||
HeartbeatQueueMentionOptions {
|
||||
|
|
@ -369,7 +369,7 @@ fn next_value(args: &mut impl Iterator<Item = String>, name: &str) -> Result<Str
|
|||
|
||||
fn usage() -> Result<()> {
|
||||
Err(anyhow!(
|
||||
"usage: epiphany-heartbeat-store init --store <path> [--profile epiphany|ghostlight-scene] [--scene-id <id>] [--scene-participant <id|name|speed|reaction|threshold|constraint;constraint>]\n epiphany-heartbeat-store tick --store <path> --artifact-dir <path> [--coordinator-action <action>] [--agent-store <path> --apply-rumination] [--defer-completion]\n epiphany-heartbeat-store pump --store <path> --artifact-dir <path> [--agent-store <path>] [--urgency <0..1>] [--min-heartbeat-rate <n>] [--max-heartbeat-rate <n>] [--min-concurrency <n>] [--max-concurrency <n>] [--max-ticks <n>]\n epiphany-heartbeat-store heat --store <path> [--scope global|all|agent|role|arena|participant_kind|group] [--selector <id>] [--multiplier <n>] [--id <id>] [--label <text>] [--reason <text>] [--expires-after <scene-clock-delta>] [--clear]\n epiphany-heartbeat-store complete --store <path> --artifact-dir <path> --role <role> [--action-id <id>]\n epiphany-heartbeat-store queue-mention --store <path> [--role face] --channel-id <id> --message-id <id> --author-id <id> --content <text> --visible-prompt <text> [--author-name <name>] [--reply-to-message-id <id>] [--source-surface <name>]\n epiphany-heartbeat-store status --store <path> [--artifact-dir <path>]\n epiphany-heartbeat-store routine --store <path> --artifact-dir <path> [--agent-store <path>] [--source <source>] [--no-dream]\n epiphany-heartbeat-store smoke [--agent-store <path>]"
|
||||
"usage: epiphany-heartbeat-store init --store <path> [--profile epiphany|ghostlight-scene] [--scene-id <id>] [--scene-participant <id|name|speed|reaction|threshold|constraint;constraint>]\n epiphany-heartbeat-store tick --store <path> --artifact-dir <path> [--coordinator-action <action>] [--agent-store <path> --apply-rumination] [--defer-completion]\n epiphany-heartbeat-store pump --store <path> --artifact-dir <path> [--agent-store <path>] [--urgency <0..1>] [--min-heartbeat-rate <n>] [--max-heartbeat-rate <n>] [--min-concurrency <n>] [--max-concurrency <n>] [--max-ticks <n>]\n epiphany-heartbeat-store heat --store <path> [--scope global|all|agent|role|arena|participant_kind|group] [--selector <id>] [--multiplier <n>] [--id <id>] [--label <text>] [--reason <text>] [--expires-after <scene-clock-delta>] [--clear]\n epiphany-heartbeat-store complete --store <path> --artifact-dir <path> --role <role> [--action-id <id>]\n epiphany-heartbeat-store queue-mention --store <path> [--role Persona] --channel-id <id> --message-id <id> --author-id <id> --content <text> --visible-prompt <text> [--author-name <name>] [--reply-to-message-id <id>] [--source-surface <name>]\n epiphany-heartbeat-store status --store <path> [--artifact-dir <path>]\n epiphany-heartbeat-store routine --store <path> --artifact-dir <path> [--agent-store <path>] [--source <source>] [--no-dream]\n epiphany-heartbeat-store smoke [--agent-store <path>]"
|
||||
))
|
||||
}
|
||||
|
||||
|
|
@ -802,7 +802,7 @@ fn validate_schedule_shape(schedule: &serde_json::Value) -> Vec<String> {
|
|||
"role_work",
|
||||
"ruminate_memory",
|
||||
"scene_turn",
|
||||
"face_turn",
|
||||
"persona_turn",
|
||||
]
|
||||
.contains(&action["action_type"].as_str().unwrap_or_default())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -798,7 +798,7 @@ fn collect_coordinator_status(
|
|||
.unwrap_or_else(|| json!(null));
|
||||
let root = env::current_dir()?;
|
||||
let heartbeat_dir = root.join(".epiphany-heartbeats");
|
||||
let face_dir = root.join(".epiphany-face");
|
||||
let persona_dir = root.join(".epiphany-persona");
|
||||
let heartbeat = status_cli::native_json(
|
||||
"epiphany-heartbeat-store",
|
||||
&[
|
||||
|
|
@ -811,12 +811,12 @@ fn collect_coordinator_status(
|
|||
"8",
|
||||
],
|
||||
)?;
|
||||
let latest_face = status_cli::native_json(
|
||||
"epiphany-face-discord",
|
||||
let latest_persona = status_cli::native_json(
|
||||
"epiphany-persona-discord",
|
||||
&[
|
||||
"latest",
|
||||
"--artifact-dir",
|
||||
&face_dir.to_string_lossy(),
|
||||
&persona_dir.to_string_lossy(),
|
||||
"--limit",
|
||||
"8",
|
||||
],
|
||||
|
|
@ -837,11 +837,11 @@ fn collect_coordinator_status(
|
|||
"crrc": crrc,
|
||||
"coordinator": coordinator,
|
||||
"heartbeat": heartbeat,
|
||||
"face": {
|
||||
"persona": {
|
||||
"status": "ready",
|
||||
"artifactDir": face_dir,
|
||||
"latestArtifacts": latest_face.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
|
||||
"availableActions": ["faceBubble", "characterTurn"],
|
||||
"artifactDir": persona_dir,
|
||||
"latestArtifacts": latest_persona.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
|
||||
"availableActions": ["PersonaBubble", "characterTurn"],
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
|
@ -1462,7 +1462,7 @@ fn local_mvp_checkpoint_patch(cwd: &Path, objective: Option<&str>) -> Value {
|
|||
let objective = objective
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty())
|
||||
.unwrap_or("Run the local Epiphany MVP cycle through Face, coordinator, and sleep.");
|
||||
.unwrap_or("Run the local Epiphany MVP cycle through Persona, coordinator, and sleep.");
|
||||
let local_refs = local_mvp_code_refs(cwd);
|
||||
let transport_refs = local_mvp_transport_code_refs(cwd);
|
||||
let mut checkpoint_refs = local_refs.clone();
|
||||
|
|
@ -1474,14 +1474,14 @@ fn local_mvp_checkpoint_patch(cwd: &Path, objective: Option<&str>) -> Value {
|
|||
"id": "local-mvp-cycle",
|
||||
"title": "Local MVP cycle",
|
||||
"status": "active",
|
||||
"summary": "Use Face as the human-facing entrypoint, run bounded coordinator/swarm work, and close with heartbeat sleep/dream maintenance.",
|
||||
"summary": "Use Persona as the human-facing entrypoint, run bounded coordinator/swarm work, and close with heartbeat sleep/dream maintenance.",
|
||||
}],
|
||||
"graphs": {
|
||||
"architecture": {"nodes": [
|
||||
{
|
||||
"id": "local-mvp-runner",
|
||||
"title": "Local MVP runner",
|
||||
"purpose": "One local operator cycle that enters through Face, runs coordinator-owned work, and invokes Continuity/heartbeat sleep afterward.",
|
||||
"purpose": "One local operator cycle that enters through Persona, runs coordinator-owned work, and invokes Continuity/heartbeat sleep afterward.",
|
||||
"code_refs": local_refs,
|
||||
},
|
||||
{
|
||||
|
|
@ -1493,9 +1493,9 @@ fn local_mvp_checkpoint_patch(cwd: &Path, objective: Option<&str>) -> Value {
|
|||
]},
|
||||
"dataflow": {"nodes": [
|
||||
{
|
||||
"id": "face-coordinator-sleep-cycle",
|
||||
"title": "Face to coordinator to sleep",
|
||||
"purpose": "Face expression is display state; coordinator owns lane routing; heartbeat owns sleep physiology.",
|
||||
"id": "Persona-coordinator-sleep-cycle",
|
||||
"title": "Persona to coordinator to sleep",
|
||||
"purpose": "Persona expression is display state; coordinator owns lane routing; heartbeat owns sleep physiology.",
|
||||
},
|
||||
{
|
||||
"id": "coordinator-model-runtime-cycle",
|
||||
|
|
@ -1505,7 +1505,7 @@ fn local_mvp_checkpoint_patch(cwd: &Path, objective: Option<&str>) -> Value {
|
|||
]},
|
||||
"links": [
|
||||
{
|
||||
"dataflow_node_id": "face-coordinator-sleep-cycle",
|
||||
"dataflow_node_id": "Persona-coordinator-sleep-cycle",
|
||||
"architecture_node_id": "local-mvp-runner",
|
||||
},
|
||||
{
|
||||
|
|
@ -1515,14 +1515,14 @@ fn local_mvp_checkpoint_patch(cwd: &Path, objective: Option<&str>) -> Value {
|
|||
],
|
||||
},
|
||||
"graphFrontier": {
|
||||
"active_node_ids": ["local-mvp-runner", "face-coordinator-sleep-cycle", "model-runtime-transport", "coordinator-model-runtime-cycle"],
|
||||
"active_node_ids": ["local-mvp-runner", "Persona-coordinator-sleep-cycle", "model-runtime-transport", "coordinator-model-runtime-cycle"],
|
||||
"dirty_paths": [],
|
||||
},
|
||||
"graphCheckpoint": {
|
||||
"checkpoint_id": "ck-local-mvp-cycle",
|
||||
"graph_revision": 2,
|
||||
"summary": "Local MVP runner checkpoint: Face front door, coordinator run, model runtime transport, sleep maintenance.",
|
||||
"frontier_node_ids": ["local-mvp-runner", "face-coordinator-sleep-cycle", "model-runtime-transport", "coordinator-model-runtime-cycle"],
|
||||
"summary": "Local MVP runner checkpoint: Persona front door, coordinator run, model runtime transport, sleep maintenance.",
|
||||
"frontier_node_ids": ["local-mvp-runner", "Persona-coordinator-sleep-cycle", "model-runtime-transport", "coordinator-model-runtime-cycle"],
|
||||
},
|
||||
"investigationCheckpoint": {
|
||||
"checkpoint_id": "ix-local-mvp-cycle",
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ fn run_smoke(args: &Args) -> Result<Value> {
|
|||
"roleResults": status["roleResults"],
|
||||
"planning": status["planning"],
|
||||
"heartbeat": status["heartbeat"],
|
||||
"face": status["face"],
|
||||
"Persona": status["persona"],
|
||||
"stateStatus": status["scene"]["scene"]["stateStatus"],
|
||||
"availableActions": status["scene"]["scene"]["availableActions"],
|
||||
"rendered": rendered,
|
||||
|
|
@ -305,21 +305,21 @@ fn validate_status(status: &Value, rendered: &str) -> Result<()> {
|
|||
== Some("epiphany.agent_heartbeat_status.v0"),
|
||||
"status view should expose heartbeat initiative status for Aquarium",
|
||||
)?;
|
||||
let face_actions = status
|
||||
.pointer("/face/availableActions")
|
||||
let persona_actions = status
|
||||
.pointer("/persona/availableActions")
|
||||
.and_then(Value::as_array);
|
||||
require(
|
||||
face_actions.is_some_and(|items| {
|
||||
items.iter().any(|item| item.as_str() == Some("faceBubble"))
|
||||
persona_actions.is_some_and(|items| {
|
||||
items.iter().any(|item| item.as_str() == Some("personaBubble"))
|
||||
&& items
|
||||
.iter()
|
||||
.any(|item| item.as_str() == Some("characterTurn"))
|
||||
}),
|
||||
"status view should expose Face bubble and character-turn actions for Aquarium",
|
||||
"status view should expose Persona bubble and character-turn actions for Aquarium",
|
||||
)?;
|
||||
require(
|
||||
rendered.contains("Heartbeat") && rendered.contains("Face"),
|
||||
"rendered status should expose heartbeat and Face sections",
|
||||
rendered.contains("Heartbeat") && rendered.contains("Persona"),
|
||||
"rendered status should expose heartbeat and Persona sections",
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ fn run_native_status(args: &Args) -> Result<Value> {
|
|||
"coordinator": coordinator_json,
|
||||
"tools": tool_invocations,
|
||||
"heartbeat": native_aux.heartbeat,
|
||||
"face": native_aux.face,
|
||||
"persona": native_aux.persona,
|
||||
"voidMemory": native_aux.void_memory,
|
||||
});
|
||||
Ok(sanitize_for_operator(status))
|
||||
|
|
@ -643,7 +643,7 @@ fn run_codex_status(args: &Args) -> Result<Value> {
|
|||
"coordinator": coordinator,
|
||||
"tools": tool_invocations,
|
||||
"heartbeat": native_aux.heartbeat,
|
||||
"face": native_aux.face,
|
||||
"persona": native_aux.persona,
|
||||
"voidMemory": native_aux.void_memory,
|
||||
});
|
||||
Ok(sanitize_for_operator(status))
|
||||
|
|
@ -651,13 +651,13 @@ fn run_codex_status(args: &Args) -> Result<Value> {
|
|||
|
||||
struct NativeAuxiliaryStatus {
|
||||
heartbeat: Value,
|
||||
face: Value,
|
||||
persona: Value,
|
||||
void_memory: Value,
|
||||
}
|
||||
|
||||
fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
|
||||
let heartbeat_dir = root.join(".epiphany-heartbeats");
|
||||
let face_dir = root.join(".epiphany-face");
|
||||
let persona_dir = root.join(".epiphany-persona");
|
||||
let heartbeat = native_json(
|
||||
"epiphany-heartbeat-store",
|
||||
&[
|
||||
|
|
@ -670,12 +670,12 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
|
|||
"8",
|
||||
],
|
||||
)?;
|
||||
let latest_face = native_json(
|
||||
"epiphany-face-discord",
|
||||
let latest_persona = native_json(
|
||||
"epiphany-persona-discord",
|
||||
&[
|
||||
"latest",
|
||||
"--artifact-dir",
|
||||
&face_dir.to_string_lossy(),
|
||||
&persona_dir.to_string_lossy(),
|
||||
"--limit",
|
||||
"8",
|
||||
],
|
||||
|
|
@ -683,11 +683,11 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
|
|||
.unwrap_or_else(
|
||||
|error| json!({"status": "error", "error": error.to_string(), "latestArtifacts": []}),
|
||||
);
|
||||
let face = json!({
|
||||
let persona = json!({
|
||||
"status": "ready",
|
||||
"artifactDir": face_dir,
|
||||
"latestArtifacts": latest_face.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
|
||||
"availableActions": ["faceBubble", "characterTurn", "discordPersonaPost"],
|
||||
"artifactDir": persona_dir,
|
||||
"latestArtifacts": latest_persona.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
|
||||
"availableActions": ["personaBubble", "characterTurn", "discordPersonaPost"],
|
||||
});
|
||||
let void_memory = native_json(
|
||||
"epiphany-void-memory",
|
||||
|
|
@ -697,7 +697,7 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
|
|||
|
||||
Ok(NativeAuxiliaryStatus {
|
||||
heartbeat,
|
||||
face,
|
||||
persona,
|
||||
void_memory,
|
||||
})
|
||||
}
|
||||
|
|
@ -1367,12 +1367,12 @@ pub fn render_status(status: &Value) -> String {
|
|||
let recommendation = &status["crrc"]["recommendation"];
|
||||
let coordinator = &status["coordinator"];
|
||||
let heartbeat = &status["heartbeat"];
|
||||
let face = &status["face"];
|
||||
let persona = &status["persona"];
|
||||
let planning_response = &status["planning"];
|
||||
let planning_summary = &planning_response["summary"];
|
||||
let checkpoint = &scene["investigationCheckpoint"];
|
||||
let latest_heartbeat = heartbeat["latestEvent"].clone();
|
||||
let latest_face = face["latestArtifacts"]
|
||||
let latest_persona = persona["latestArtifacts"]
|
||||
.as_array()
|
||||
.and_then(|items| items.first())
|
||||
.cloned()
|
||||
|
|
@ -1434,11 +1434,11 @@ pub fn render_status(status: &Value) -> String {
|
|||
maybe(&latest_heartbeat["coordinatorAction"], "none")
|
||||
),
|
||||
String::new(),
|
||||
"Face".to_string(),
|
||||
format!("- latest artifact: {}", maybe(&latest_face["name"], "none")),
|
||||
"Persona".to_string(),
|
||||
format!("- latest artifact: {}", maybe(&latest_persona["name"], "none")),
|
||||
format!(
|
||||
"- latest content: {}",
|
||||
maybe(&latest_face["content"], "none")
|
||||
maybe(&latest_persona["content"], "none")
|
||||
),
|
||||
String::new(),
|
||||
"Planning".to_string(),
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ use std::path::Path;
|
|||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
|
||||
const CHAT_SCHEMA_VERSION: &str = "epiphany.face_chat.v0";
|
||||
const BUBBLE_SCHEMA_VERSION: &str = "epiphany.face_bubble.v0";
|
||||
const CHAT_SCHEMA_VERSION: &str = "epiphany.persona_chat.v0";
|
||||
const BUBBLE_SCHEMA_VERSION: &str = "epiphany.persona_bubble.v0";
|
||||
const DISCORD_API: &str = "https://discord.com/api/v10";
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
struct FaceConfig {
|
||||
struct PersonaConfig {
|
||||
allowed_channel_name: String,
|
||||
allowed_channel_id: Option<String>,
|
||||
allowed_channel_id_env: Option<String>,
|
||||
|
|
@ -32,11 +32,11 @@ fn main() -> Result<()> {
|
|||
let Some(command) = args.next() else {
|
||||
return usage();
|
||||
};
|
||||
let mut config_path = PathBuf::from("state/face-discord.toml");
|
||||
let mut artifact_dir = PathBuf::from(".epiphany-face");
|
||||
let mut config_path = PathBuf::from("state/persona-discord.toml");
|
||||
let mut artifact_dir = PathBuf::from(".epiphany-persona");
|
||||
let mut content: Option<String> = None;
|
||||
let mut channel_id: Option<String> = None;
|
||||
let mut source = "epiphany/face".to_string();
|
||||
let mut source = "epiphany/Persona".to_string();
|
||||
let mut status = "ready".to_string();
|
||||
let mut mood = "attentive".to_string();
|
||||
let mut limit = 8_usize;
|
||||
|
|
@ -97,7 +97,7 @@ fn main() -> Result<()> {
|
|||
"latest" => serde_json::json!({
|
||||
"ok": true,
|
||||
"artifactDir": artifact_dir,
|
||||
"latestArtifacts": latest_face_artifacts(&artifact_dir, limit),
|
||||
"latestArtifacts": latest_persona_artifacts(&artifact_dir, limit),
|
||||
}),
|
||||
"smoke" => run_smoke()?,
|
||||
_ => return usage(),
|
||||
|
|
@ -112,12 +112,12 @@ fn main() -> Result<()> {
|
|||
|
||||
fn run_draft(
|
||||
content: &str,
|
||||
config: &FaceConfig,
|
||||
config: &PersonaConfig,
|
||||
artifact_dir: &Path,
|
||||
status: &str,
|
||||
reason: &str,
|
||||
) -> Result<Value> {
|
||||
ensure_content(content, "Face chat")?;
|
||||
ensure_content(content, "Persona chat")?;
|
||||
let path = write_draft(content, config, artifact_dir, status, reason)?;
|
||||
Ok(serde_json::json!({
|
||||
"ok": status != "blocked",
|
||||
|
|
@ -133,9 +133,9 @@ fn run_bubble(
|
|||
status: &str,
|
||||
mood: &str,
|
||||
) -> Result<Value> {
|
||||
ensure_content(content, "Face bubble")?;
|
||||
ensure_content(content, "Persona bubble")?;
|
||||
let payload = bubble_payload(content, source, status, mood);
|
||||
let path = artifact_dir.join(format!("face-bubble-{}-{}.json", now_stamp(), short_id()));
|
||||
let path = artifact_dir.join(format!("Persona-bubble-{}-{}.json", now_stamp(), short_id()));
|
||||
write_json(&path, &payload)?;
|
||||
Ok(serde_json::json!({
|
||||
"ok": true,
|
||||
|
|
@ -147,14 +147,14 @@ fn run_bubble(
|
|||
|
||||
fn run_post(
|
||||
content: &str,
|
||||
config: &FaceConfig,
|
||||
config: &PersonaConfig,
|
||||
artifact_dir: &Path,
|
||||
channel_id: Option<String>,
|
||||
persona_name: Option<String>,
|
||||
persona_avatar_url: Option<String>,
|
||||
reply_to_message_id: Option<String>,
|
||||
) -> Result<Value> {
|
||||
ensure_content(content, "Face chat")?;
|
||||
ensure_content(content, "Persona chat")?;
|
||||
let configured_channel_id = allowed_channel_id(config);
|
||||
let requested_channel_id = channel_id.or_else(|| configured_channel_id.clone());
|
||||
let Some(configured_channel_id) = configured_channel_id else {
|
||||
|
|
@ -236,7 +236,7 @@ fn run_post(
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
struct FacePersona {
|
||||
struct PersonaPersona {
|
||||
name: String,
|
||||
avatar_url: Option<String>,
|
||||
}
|
||||
|
|
@ -248,10 +248,10 @@ struct PostedDiscordMessage {
|
|||
}
|
||||
|
||||
fn resolve_persona(
|
||||
config: &FaceConfig,
|
||||
config: &PersonaConfig,
|
||||
persona_name: Option<String>,
|
||||
persona_avatar_url: Option<String>,
|
||||
) -> Result<Option<FacePersona>> {
|
||||
) -> Result<Option<PersonaPersona>> {
|
||||
let name = trim_optional(persona_name).or_else(|| trim_optional(config.persona_name.clone()));
|
||||
let avatar_url = trim_optional(persona_avatar_url)
|
||||
.or_else(|| trim_optional(config.persona_avatar_url.clone()));
|
||||
|
|
@ -263,7 +263,7 @@ fn resolve_persona(
|
|||
"persona-name is required when posting with a persona avatar"
|
||||
));
|
||||
};
|
||||
Ok(Some(FacePersona {
|
||||
Ok(Some(PersonaPersona {
|
||||
name: name.chars().take(80).collect(),
|
||||
avatar_url,
|
||||
}))
|
||||
|
|
@ -274,8 +274,8 @@ fn post_discord_message(
|
|||
channel_id: &str,
|
||||
content: &str,
|
||||
reply_to_message_id: Option<&str>,
|
||||
persona: Option<&FacePersona>,
|
||||
config: &FaceConfig,
|
||||
persona: Option<&PersonaPersona>,
|
||||
config: &PersonaConfig,
|
||||
artifact_dir: &Path,
|
||||
) -> Result<PostedDiscordMessage> {
|
||||
if let Some(persona) = persona {
|
||||
|
|
@ -293,7 +293,7 @@ fn post_discord_message(
|
|||
let response = Client::new()
|
||||
.post(format!("{DISCORD_API}/channels/{channel_id}/messages"))
|
||||
.header("Authorization", format!("Bot {token}"))
|
||||
.header("User-Agent", "EpiphanyFace/0.1")
|
||||
.header("User-Agent", "EpiphanyPersona/0.1")
|
||||
.json(&serde_json::json!({
|
||||
"content": content,
|
||||
"message_reference": reply_to_message_id.map(|message_id| serde_json::json!({
|
||||
|
|
@ -316,8 +316,8 @@ fn post_discord_persona_message(
|
|||
channel_id: &str,
|
||||
content: &str,
|
||||
reply_to_message_id: Option<&str>,
|
||||
persona: &FacePersona,
|
||||
config: &FaceConfig,
|
||||
persona: &PersonaPersona,
|
||||
config: &PersonaConfig,
|
||||
artifact_dir: &Path,
|
||||
) -> Result<PostedDiscordMessage> {
|
||||
let target = resolve_webhook_target(token, channel_id)?;
|
||||
|
|
@ -361,7 +361,7 @@ fn resolve_webhook_target(token: &str, channel_id: &str) -> Result<WebhookTarget
|
|||
let response = Client::new()
|
||||
.get(format!("{DISCORD_API}/channels/{channel_id}"))
|
||||
.header("Authorization", format!("Bot {token}"))
|
||||
.header("User-Agent", "EpiphanyFace/0.1")
|
||||
.header("User-Agent", "EpiphanyPersona/0.1")
|
||||
.send()
|
||||
.context("Discord channel lookup failed")?;
|
||||
let payload = decode_discord_json(response, "Discord channel lookup")?;
|
||||
|
|
@ -388,7 +388,7 @@ fn create_persona_webhook(token: &str, channel_id: &str) -> Result<CachedWebhook
|
|||
let response = Client::new()
|
||||
.post(format!("{DISCORD_API}/channels/{channel_id}/webhooks"))
|
||||
.header("Authorization", format!("Bot {token}"))
|
||||
.header("User-Agent", "EpiphanyFace/0.1")
|
||||
.header("User-Agent", "EpiphanyPersona/0.1")
|
||||
.json(&serde_json::json!({"name": "Epiphany Persona Pipe"}))
|
||||
.send()
|
||||
.context("Discord webhook creation failed")?;
|
||||
|
|
@ -411,7 +411,7 @@ fn execute_persona_webhook(
|
|||
target: &WebhookTarget,
|
||||
content: &str,
|
||||
reply_to_message_id: Option<&str>,
|
||||
persona: &FacePersona,
|
||||
persona: &PersonaPersona,
|
||||
) -> Result<PostedDiscordMessage> {
|
||||
let mut url = format!(
|
||||
"{DISCORD_API}/webhooks/{}/{}?wait=true",
|
||||
|
|
@ -423,7 +423,7 @@ fn execute_persona_webhook(
|
|||
}
|
||||
let response = Client::new()
|
||||
.post(url)
|
||||
.header("User-Agent", "EpiphanyFace/0.1")
|
||||
.header("User-Agent", "EpiphanyPersona/0.1")
|
||||
.json(&serde_json::json!({
|
||||
"content": content,
|
||||
"username": persona.name,
|
||||
|
|
@ -444,35 +444,35 @@ fn execute_persona_webhook(
|
|||
}
|
||||
|
||||
fn run_smoke() -> Result<Value> {
|
||||
let temp_dir = scoped_temp_dir("epiphany-face-discord-smoke")?;
|
||||
let config = FaceConfig {
|
||||
let temp_dir = scoped_temp_dir("epiphany-persona-discord-smoke")?;
|
||||
let config = PersonaConfig {
|
||||
allowed_channel_name: "#aquarium".to_string(),
|
||||
allowed_channel_id: None,
|
||||
allowed_channel_id_env: Some("EPIPHANY_FACE_AQUARIUM_CHANNEL_ID_TEST".to_string()),
|
||||
allowed_channel_id_env: Some("EPIPHANY_PERSONA_AQUARIUM_CHANNEL_ID_TEST".to_string()),
|
||||
bot_token_env: Some("DISCORD_BOT_TOKEN_TEST".to_string()),
|
||||
persona_name: Some("Smoke Face".to_string()),
|
||||
persona_avatar_url: Some("https://example.invalid/face.png".to_string()),
|
||||
persona_name: Some("Smoke Persona".to_string()),
|
||||
persona_avatar_url: Some("https://example.invalid/Persona.png".to_string()),
|
||||
webhook_cache_path: Some(temp_dir.join("webhook-cache.json")),
|
||||
};
|
||||
unsafe {
|
||||
env::remove_var("EPIPHANY_FACE_AQUARIUM_CHANNEL_ID_TEST");
|
||||
env::remove_var("EPIPHANY_PERSONA_AQUARIUM_CHANNEL_ID_TEST");
|
||||
}
|
||||
let draft = run_draft(
|
||||
"Face notices Proprioception and Soul disagree about evidence shape.",
|
||||
"Persona notices Modeling and Soul disagree about evidence shape.",
|
||||
&config,
|
||||
&temp_dir,
|
||||
"draft",
|
||||
"drafted without posting",
|
||||
)?;
|
||||
let bubble = run_bubble(
|
||||
"Face opens an Aquarium bubble even while Discord is unavailable.",
|
||||
"Persona opens an Aquarium bubble even while Discord is unavailable.",
|
||||
&temp_dir,
|
||||
"smoke/face",
|
||||
"smoke/Persona",
|
||||
"ready",
|
||||
"attentive",
|
||||
)?;
|
||||
let blocked = run_post(
|
||||
"Face should not post without a configured #aquarium channel id.",
|
||||
"Persona should not post without a configured #aquarium channel id.",
|
||||
&config,
|
||||
&temp_dir,
|
||||
None,
|
||||
|
|
@ -481,14 +481,14 @@ fn run_smoke() -> Result<Value> {
|
|||
None,
|
||||
)?;
|
||||
unsafe {
|
||||
env::set_var("EPIPHANY_FACE_AQUARIUM_CHANNEL_ID_TEST", "123");
|
||||
env::set_var("EPIPHANY_PERSONA_AQUARIUM_CHANNEL_ID_TEST", "123");
|
||||
}
|
||||
let wrong = run_post(
|
||||
"Face should not post outside #aquarium.",
|
||||
"Persona should not post outside #aquarium.",
|
||||
&config,
|
||||
&temp_dir,
|
||||
Some("456".to_string()),
|
||||
Some("Wrong Face".to_string()),
|
||||
Some("Wrong Persona".to_string()),
|
||||
None,
|
||||
None,
|
||||
)?;
|
||||
|
|
@ -513,7 +513,7 @@ fn run_smoke() -> Result<Value> {
|
|||
|
||||
fn write_draft(
|
||||
content: &str,
|
||||
config: &FaceConfig,
|
||||
config: &PersonaConfig,
|
||||
artifact_dir: &Path,
|
||||
status: &str,
|
||||
reason: &str,
|
||||
|
|
@ -529,7 +529,7 @@ fn write_draft(
|
|||
"persona_avatar_url": config.persona_avatar_url,
|
||||
"content": content.trim(),
|
||||
});
|
||||
let path = artifact_dir.join(format!("face-chat-{}-{}.json", now_stamp(), short_id()));
|
||||
let path = artifact_dir.join(format!("Persona-chat-{}-{}.json", now_stamp(), short_id()));
|
||||
write_json(&path, &payload)?;
|
||||
Ok(path)
|
||||
}
|
||||
|
|
@ -541,14 +541,14 @@ fn bubble_payload(content: &str, source: &str, status: &str, mood: &str) -> Valu
|
|||
"status": status,
|
||||
"source": source,
|
||||
"target": "aquarium",
|
||||
"role_id": "face",
|
||||
"agent_id": "face",
|
||||
"display_name": "Face",
|
||||
"role_id": "Persona",
|
||||
"agent_id": "Persona",
|
||||
"display_name": "Persona",
|
||||
"mood": mood,
|
||||
"content": content.trim(),
|
||||
"bubble": {
|
||||
"kind": "agent-chat",
|
||||
"anchorRoleId": "face",
|
||||
"anchorRoleId": "Persona",
|
||||
"opensIn": "aquarium",
|
||||
"requiresDiscord": false,
|
||||
"ttlSeconds": 90,
|
||||
|
|
@ -556,7 +556,7 @@ fn bubble_payload(content: &str, source: &str, status: &str, mood: &str) -> Valu
|
|||
})
|
||||
}
|
||||
|
||||
fn latest_face_artifacts(artifact_dir: &Path, limit: usize) -> Vec<Value> {
|
||||
fn latest_persona_artifacts(artifact_dir: &Path, limit: usize) -> Vec<Value> {
|
||||
let Ok(read_dir) = fs::read_dir(artifact_dir) else {
|
||||
return Vec::new();
|
||||
};
|
||||
|
|
@ -566,7 +566,7 @@ fn latest_face_artifacts(artifact_dir: &Path, limit: usize) -> Vec<Value> {
|
|||
.filter(|path| {
|
||||
path.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
.is_some_and(|name| name.starts_with("face-") && name.ends_with(".json"))
|
||||
.is_some_and(|name| name.starts_with("Persona-") && name.ends_with(".json"))
|
||||
})
|
||||
.filter_map(|path| Some((path.metadata().ok()?.modified().ok()?, path)))
|
||||
.collect::<Vec<_>>();
|
||||
|
|
@ -592,7 +592,7 @@ fn latest_face_artifacts(artifact_dir: &Path, limit: usize) -> Vec<Value> {
|
|||
.collect()
|
||||
}
|
||||
|
||||
fn persona_webhook_cache_path(config: &FaceConfig, artifact_dir: &Path) -> PathBuf {
|
||||
fn persona_webhook_cache_path(config: &PersonaConfig, artifact_dir: &Path) -> PathBuf {
|
||||
config
|
||||
.webhook_cache_path
|
||||
.clone()
|
||||
|
|
@ -673,7 +673,7 @@ fn strip_bom(value: &str) -> &str {
|
|||
value.strip_prefix('\u{feff}').unwrap_or(value)
|
||||
}
|
||||
|
||||
fn load_config(path: &Path) -> Result<FaceConfig> {
|
||||
fn load_config(path: &Path) -> Result<PersonaConfig> {
|
||||
let raw =
|
||||
fs::read_to_string(path).with_context(|| format!("failed to read {}", path.display()))?;
|
||||
if path
|
||||
|
|
@ -682,7 +682,7 @@ fn load_config(path: &Path) -> Result<FaceConfig> {
|
|||
{
|
||||
let payload: Value = serde_json::from_str(&raw)
|
||||
.with_context(|| format!("failed to decode {}", path.display()))?;
|
||||
return Ok(FaceConfig {
|
||||
return Ok(PersonaConfig {
|
||||
allowed_channel_name: payload["allowed_channel_name"]
|
||||
.as_str()
|
||||
.unwrap_or("#aquarium")
|
||||
|
|
@ -701,7 +701,7 @@ fn load_config(path: &Path) -> Result<FaceConfig> {
|
|||
webhook_cache_path: payload["webhook_cache_path"].as_str().map(PathBuf::from),
|
||||
});
|
||||
}
|
||||
Ok(FaceConfig {
|
||||
Ok(PersonaConfig {
|
||||
allowed_channel_name: toml_string(&raw, "allowed_channel_name")
|
||||
.unwrap_or_else(|| "#aquarium".to_string()),
|
||||
allowed_channel_id: toml_string(&raw, "allowed_channel_id"),
|
||||
|
|
@ -731,14 +731,14 @@ fn parse_quoted(value: &str) -> Option<String> {
|
|||
.map(str::to_string)
|
||||
}
|
||||
|
||||
fn allowed_channel_id(config: &FaceConfig) -> Option<String> {
|
||||
fn allowed_channel_id(config: &PersonaConfig) -> Option<String> {
|
||||
config
|
||||
.allowed_channel_id
|
||||
.clone()
|
||||
.or_else(|| config.allowed_channel_id_env.as_ref().and_then(env_value))
|
||||
}
|
||||
|
||||
fn bot_token(config: &FaceConfig) -> Option<String> {
|
||||
fn bot_token(config: &PersonaConfig) -> Option<String> {
|
||||
config.bot_token_env.as_ref().and_then(env_value)
|
||||
}
|
||||
|
||||
|
|
@ -812,6 +812,6 @@ fn next_value(args: &mut impl Iterator<Item = String>, name: &str) -> Result<Str
|
|||
|
||||
fn usage() -> Result<()> {
|
||||
Err(anyhow!(
|
||||
"usage: epiphany-face-discord <draft|bubble|post|latest|smoke> [--config <path>] [--artifact-dir <path>] [--content <text-or-path>]"
|
||||
"usage: epiphany-persona-discord <draft|bubble|post|latest|smoke> [--config <path>] [--artifact-dir <path>] [--content <text-or-path>]"
|
||||
))
|
||||
}
|
||||
|
|
@ -439,11 +439,11 @@ fn run_smoke() -> Result<Value> {
|
|||
"confidence": 0.9,
|
||||
"roleMemoryPatches": [{
|
||||
"roleId": "modeling",
|
||||
"roleName": "Proprioception",
|
||||
"roleName": "Modeling",
|
||||
"verdict": "ready-for-review",
|
||||
"selfPatch": {
|
||||
"agentId": "epiphany.proprioception",
|
||||
"reason": "Birth memory should teach Proprioception that repo initialization memory is reviewed and typed.",
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Birth memory should teach Modeling that repo initialization memory is reviewed and typed.",
|
||||
"semanticMemories": [{
|
||||
"memoryId": "mem-body-startup-birth-memory-smoke",
|
||||
"summary": "Repo memory birth packets can produce role-specific selfPatch candidates that are applied only after Self review.",
|
||||
|
|
@ -452,7 +452,7 @@ fn run_smoke() -> Result<Value> {
|
|||
}]
|
||||
},
|
||||
"sourceRefs": ["AGENTS.md"],
|
||||
"whyThisBelongsInMemory": "Proprioception needs the startup memory route to stay source-grounded.",
|
||||
"whyThisBelongsInMemory": "Modeling needs the startup memory route to stay source-grounded.",
|
||||
"stalenessRisk": "smoke fixture",
|
||||
"doNotStore": []
|
||||
}]
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ const TRAJECTORY_SOURCE_MAX_TOTAL_BYTES: usize = 72_000;
|
|||
|
||||
const ROLES: &[&str] = &[
|
||||
"coordinator",
|
||||
"face",
|
||||
"Persona",
|
||||
"imagination",
|
||||
"research",
|
||||
"modeling",
|
||||
|
|
@ -1008,7 +1008,7 @@ fn run_trajectory_packet(args: AgentPacketArgs) -> Result<Value> {
|
|||
"lifecycle": {
|
||||
"mode": "birth-only",
|
||||
"contract": "Run this specialist only when the repo/swarm has no accepted trajectory initialization. Later direction drift belongs to heartbeat, mood, lived work, reviewed selfPatch, and planning/evidence truth.",
|
||||
"rerunPolicy": "If accepted trajectory initialization exists, do not rerun to rebrand the repo. Route contradictions through normal Eyes/Proprioception/Imagination/Soul work and reviewed memory drift."
|
||||
"rerunPolicy": "If accepted trajectory initialization exists, do not rerun to rebrand the repo. Route contradictions through normal Eyes/Modeling/Imagination/Soul work and reviewed memory drift."
|
||||
},
|
||||
"prompt": REPO_TRAJECTORY_DISTILLER_PROMPT,
|
||||
"input": {
|
||||
|
|
@ -1117,7 +1117,7 @@ fn run_agent_packet(args: AgentPacketArgs) -> Result<Value> {
|
|||
"lifecycle": {
|
||||
"mode": "birth-only",
|
||||
"contract": "Run this specialist only when the repo/swarm has no accepted personality initialization. Later personality movement belongs to heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed selfPatch.",
|
||||
"rerunPolicy": "If an accepted initialization exists, do not rerun to refresh personality. Route major terrain surprises to Eyes/Proprioception or Self review as normal state/model work, not personality reset."
|
||||
"rerunPolicy": "If an accepted initialization exists, do not rerun to refresh personality. Route major terrain surprises to Eyes/Modeling or Self review as normal state/model work, not personality reset."
|
||||
},
|
||||
"prompt": REPO_PERSONALITY_DISTILLER_PROMPT,
|
||||
"input": {
|
||||
|
|
@ -1222,7 +1222,7 @@ fn run_memory_packet(args: AgentPacketArgs) -> Result<Value> {
|
|||
"lifecycle": {
|
||||
"mode": "birth-only",
|
||||
"contract": "Run this specialist only when the repo/swarm has no accepted memory initialization. Later memory growth belongs to heartbeat, work evidence, rumination, sleep consolidation, and reviewed selfPatch.",
|
||||
"rerunPolicy": "If accepted memory initialization exists, do not rerun to refresh memory. Route stale or contradicted knowledge through normal Eyes/Proprioception/Soul state, evidence, and sleep consolidation."
|
||||
"rerunPolicy": "If accepted memory initialization exists, do not rerun to refresh memory. Route stale or contradicted knowledge through normal Eyes/Modeling/Soul state, evidence, and sleep consolidation."
|
||||
},
|
||||
"prompt": REPO_MEMORY_DISTILLER_PROMPT,
|
||||
"input": {
|
||||
|
|
@ -1639,7 +1639,7 @@ const COORDINATOR_TRAIT_TEMPLATES: [CanonicalTraitTemplate; 6] = [
|
|||
},
|
||||
];
|
||||
|
||||
const FACE_TRAIT_TEMPLATES: [CanonicalTraitTemplate; 6] = [
|
||||
const PERSONA_TRAIT_TEMPLATES: [CanonicalTraitTemplate; 6] = [
|
||||
CanonicalTraitTemplate {
|
||||
group_name: "underlying_organization",
|
||||
trait_name: "multi_lane_attention",
|
||||
|
|
@ -1990,7 +1990,7 @@ fn extract_trait_seed_candidates(packet: &Value) -> Result<Vec<AgentCanonicalTra
|
|||
fn role_trait_templates(role_id: &str) -> Result<&'static [CanonicalTraitTemplate; 6]> {
|
||||
match role_id {
|
||||
"coordinator" => Ok(&COORDINATOR_TRAIT_TEMPLATES),
|
||||
"face" => Ok(&FACE_TRAIT_TEMPLATES),
|
||||
"Persona" => Ok(&PERSONA_TRAIT_TEMPLATES),
|
||||
"imagination" => Ok(&IMAGINATION_TRAIT_TEMPLATES),
|
||||
"research" => Ok(&RESEARCH_TRAIT_TEMPLATES),
|
||||
"modeling" => Ok(&MODELING_TRAIT_TEMPLATES),
|
||||
|
|
@ -2227,10 +2227,10 @@ fn extract_memory_self_patches(result: &Value) -> Result<Vec<InitializationSelfP
|
|||
fn role_id_for_agent_id(agent_id: &str) -> Option<&'static str> {
|
||||
match agent_id {
|
||||
"epiphany.self" => Some("coordinator"),
|
||||
"epiphany.face" => Some("face"),
|
||||
"epiphany.Persona" => Some("Persona"),
|
||||
"epiphany.imagination" => Some("imagination"),
|
||||
"epiphany.eyes" => Some("research"),
|
||||
"epiphany.proprioception" => Some("modeling"),
|
||||
"epiphany.modeling" => Some("modeling"),
|
||||
"epiphany.hands" => Some("implementation"),
|
||||
"epiphany.soul" => Some("verification"),
|
||||
_ => None,
|
||||
|
|
@ -2422,7 +2422,7 @@ fn memory_role_filter(role_id: &str) -> &'static str {
|
|||
"coordinator" => {
|
||||
"Distill routing doctrine, authority boundaries, review gates, state acceptance rules, and failure patterns that should make Self stricter."
|
||||
}
|
||||
"face" => {
|
||||
"Persona" => {
|
||||
"Distill public voice, Aquarium affordances, Discord/social boundaries, user preference, and what internal state may be surfaced without leaking sealed thoughts."
|
||||
}
|
||||
"imagination" => {
|
||||
|
|
@ -2432,7 +2432,7 @@ fn memory_role_filter(role_id: &str) -> &'static str {
|
|||
"Distill known prior art, standard algorithms, vendor docs, research trails, and signals that should make Eyes search before invention."
|
||||
}
|
||||
"modeling" => {
|
||||
"Distill architecture, control/data-flow, graph frontiers, invariants, source-map practices, and what Proprioception must understand before Hands cuts."
|
||||
"Distill architecture, control/data-flow, graph frontiers, invariants, source-map practices, and what Modeling must understand before Hands cuts."
|
||||
}
|
||||
"implementation" => {
|
||||
"Distill build/edit conventions, harness constraints, source-touch rules, coding style, dependency policy, and common traps for Hands."
|
||||
|
|
@ -2447,7 +2447,7 @@ fn memory_role_filter(role_id: &str) -> &'static str {
|
|||
fn memory_role_source_kinds(role_id: &str) -> &'static [&'static str] {
|
||||
match role_id {
|
||||
"coordinator" => &["doctrine", "state", "documentation", "contract"],
|
||||
"face" => &["doctrine", "documentation", "state"],
|
||||
"Persona" => &["doctrine", "documentation", "state"],
|
||||
"imagination" => &["documentation", "state", "research"],
|
||||
"research" => &["research", "documentation", "readme", "code"],
|
||||
"modeling" => &["documentation", "code", "contract", "state"],
|
||||
|
|
@ -3878,7 +3878,7 @@ fn role_axes(role_id: &str) -> &'static [&'static str] {
|
|||
"churn_spiral_risk",
|
||||
"production_pressure",
|
||||
],
|
||||
"face" => &[
|
||||
"Persona" => &[
|
||||
"social_surface",
|
||||
"interface_orientation",
|
||||
"sensory_salience",
|
||||
|
|
@ -3941,10 +3941,10 @@ fn role_axis_average(axes: &BTreeMap<String, f64>, names: &[&str]) -> f64 {
|
|||
fn role_display(role_id: &str) -> &'static str {
|
||||
match role_id {
|
||||
"coordinator" => "Self",
|
||||
"face" => "Face",
|
||||
"Persona" => "Persona",
|
||||
"imagination" => "Imagination",
|
||||
"research" => "Eyes",
|
||||
"modeling" => "Proprioception",
|
||||
"modeling" => "Modeling",
|
||||
"implementation" => "Hands",
|
||||
"verification" => "Soul",
|
||||
_ => "Lane",
|
||||
|
|
@ -3956,7 +3956,7 @@ fn role_value_candidate(role_id: &str) -> &'static str {
|
|||
"coordinator" => {
|
||||
"Coordinate through typed authority and challenge pattern-completion theater."
|
||||
}
|
||||
"face" => {
|
||||
"Persona" => {
|
||||
"Surface state through the public mouth without turning internals into chat endpoints."
|
||||
}
|
||||
"imagination" => {
|
||||
|
|
@ -4120,10 +4120,10 @@ fn report_agent_input(report: &RepoTerrainReport) -> Value {
|
|||
"remoteUrls": report.remote_urls,
|
||||
"sourceFamilies": report.source_families,
|
||||
"languages": report.languages,
|
||||
"stateSurfaces": report.state_surfaces,
|
||||
"instructionSurfaces": report.instruction_surfaces,
|
||||
"testSurfaces": report.test_surfaces,
|
||||
"runtimeSurfaces": report.runtime_surfaces,
|
||||
"statesurfaces": report.state_surfaces,
|
||||
"instructionsurfaces": report.instruction_surfaces,
|
||||
"testsurfaces": report.test_surfaces,
|
||||
"runtimesurfaces": report.runtime_surfaces,
|
||||
"historyMetrics": report.history_metrics,
|
||||
"axisScores": report.axis_scores,
|
||||
"axisEvidence": report.axis_evidence,
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ pub struct EpiphanyCultMeshGlobalRoomPolicyEntry {
|
|||
#[cultcache(key = 6)]
|
||||
pub threaded: bool,
|
||||
#[cultcache(key = 7)]
|
||||
pub face_posting_allowed: bool,
|
||||
pub persona_posting_allowed: bool,
|
||||
#[cultcache(key = 8)]
|
||||
pub untrusted_ingress_allowed: bool,
|
||||
}
|
||||
|
|
@ -1088,9 +1088,9 @@ pub fn epiphany_cultmesh_global_room_policies() -> Vec<EpiphanyCultMeshGlobalRoo
|
|||
"Prior art, papers, source-grounded findings, and scout reports.",
|
||||
),
|
||||
(
|
||||
"faces",
|
||||
"Faces",
|
||||
"Public Face identity, voice, social surface, and community-facing presence.",
|
||||
"Personas",
|
||||
"Personas",
|
||||
"Public Persona identity, voice, social surface, and community-facing presence.",
|
||||
),
|
||||
(
|
||||
"gamecult",
|
||||
|
|
@ -1111,10 +1111,10 @@ pub fn epiphany_cultmesh_global_room_policies() -> Vec<EpiphanyCultMeshGlobalRoo
|
|||
topic: topic.to_string(),
|
||||
purpose: purpose.to_string(),
|
||||
posting_policy:
|
||||
"Faces may post public, non-private, citation/provenance-bearing thread roots and replies; local adoption still requires review."
|
||||
"Personas may post public, non-private, citation/provenance-bearing thread roots and replies; local adoption still requires review."
|
||||
.to_string(),
|
||||
threaded: true,
|
||||
face_posting_allowed: true,
|
||||
persona_posting_allowed: true,
|
||||
untrusted_ingress_allowed: true,
|
||||
})
|
||||
.collect()
|
||||
|
|
@ -1510,7 +1510,7 @@ mod tests {
|
|||
thread_id: "thread-test".to_string(),
|
||||
produced_at_utc: "2026-06-12T00:00:00Z".to_string(),
|
||||
source_stage: "hands".to_string(),
|
||||
target_stages: vec!["soul".to_string(), "proprioception".to_string()],
|
||||
target_stages: vec!["soul".to_string(), "Modeling".to_string()],
|
||||
lower_bound_receipt_at: "2026-06-12T00:00:01Z".to_string(),
|
||||
hands_intent_id: "hands-intent-test".to_string(),
|
||||
hands_review_id: "hands-review-test".to_string(),
|
||||
|
|
@ -1578,7 +1578,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn global_room_policies_make_public_threaded_rooms_for_faces() -> Result<()> {
|
||||
fn global_room_policies_make_public_threaded_rooms_for_personas() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store = temp.path().join("epiphany-global-rooms.ccmp");
|
||||
let written = write_epiphany_cultmesh_global_room_policies(&store, "epiphany-test")?;
|
||||
|
|
@ -1593,7 +1593,7 @@ mod tests {
|
|||
|
||||
assert_eq!(dreams.verse_id, EPIPHANY_CULTMESH_GLOBAL_VERSE_ID);
|
||||
assert!(dreams.threaded);
|
||||
assert!(dreams.face_posting_allowed);
|
||||
assert!(dreams.persona_posting_allowed);
|
||||
assert!(dreams.untrusted_ingress_allowed);
|
||||
assert!(architecture.purpose.contains("ownership"));
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ pub fn default_eyes_cultnet_contracts() -> Vec<EyesCultNetContract> {
|
|||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Evidence packets carry provenance, uncertainty, and source refs for Imagination, Mind, Hands, Soul, Face, Self, Proprioception, and Continuity protocols.".to_string(),
|
||||
"Evidence packets carry provenance, uncertainty, and source refs for Imagination, Mind, Hands, Soul, Persona, Self, Modeling, and Continuity protocols.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ pub fn queue_heartbeat_pending_mention_store(
|
|||
"mentionId": mention_id,
|
||||
"targetRoleId": options.target_role_id,
|
||||
"pendingMentionCount": state.pending_mentions.len(),
|
||||
"contract": "Pending Face mentions live in heartbeat physiology. They pull the Face turn forward, but the Face still writes naturally and the Interpreter owns side effects.",
|
||||
"contract": "Pending Persona mentions live in heartbeat physiology. They pull the Persona turn forward, but the Persona still writes naturally and the Interpreter owns side effects.",
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -636,7 +636,7 @@ fn tick_once(
|
|||
round6((state.participants[selected_index].current_load * 0.75).clamp(0.0, 1.0));
|
||||
state.scene_clock = round6(scene_clock);
|
||||
let selected_pending_mentions = pending_mentions_for_role(state, &selected.role_id);
|
||||
if action.action_type == "face_turn" {
|
||||
if action.action_type == "persona_turn" {
|
||||
let selected_role = selected.role_id.as_str();
|
||||
state
|
||||
.pending_mentions
|
||||
|
|
@ -821,13 +821,13 @@ fn select_participant(
|
|||
}
|
||||
if let Some(index) = active.iter().copied().find(|index| {
|
||||
let participant = &state.participants[*index];
|
||||
participant.role_id == "face"
|
||||
participant.role_id == "Persona"
|
||||
&& !pending_mentions_for_role(state, &participant.role_id).is_empty()
|
||||
}) {
|
||||
return Ok((
|
||||
index,
|
||||
"reaction_interrupt",
|
||||
"Pending addressed Face mention pulled Face forward; Projector and Interpreter remain the side-effect boundaries.".to_string(),
|
||||
"Pending addressed Persona mention pulled Persona forward; Projector and Interpreter remain the side-effect boundaries.".to_string(),
|
||||
));
|
||||
}
|
||||
let selected = active
|
||||
|
|
@ -885,11 +885,11 @@ fn action_for_selection(
|
|||
};
|
||||
}
|
||||
let pending_mentions = pending_mentions_for_role(state, &selected.role_id);
|
||||
if !pending_mentions.is_empty() && selected.role_id == "face" {
|
||||
if !pending_mentions.is_empty() && selected.role_id == "Persona" {
|
||||
let heartbeat_rate = target_heartbeat_rate.max(minimum_rate);
|
||||
return HeartbeatAction {
|
||||
action_id: "heartbeat.face.turn".to_string(),
|
||||
action_type: "face_turn",
|
||||
action_id: "heartbeat.Persona.turn".to_string(),
|
||||
action_type: "persona_turn",
|
||||
action_scale: "standard",
|
||||
base_recovery: state.pacing_policy.work_base_recovery / heartbeat_rate,
|
||||
initiative_cost: 4.0,
|
||||
|
|
@ -901,9 +901,9 @@ fn action_for_selection(
|
|||
selected.display_name,
|
||||
pending_mentions.len()
|
||||
),
|
||||
"Projector owns state-to-narrative prompting before Face sees context.".to_string(),
|
||||
"Face writes natural narrative thought; Interpreter owns memory, draft, SAY, route, or drop side effects.".to_string(),
|
||||
"Pending mentions are consumed only after this Face turn is queued.".to_string(),
|
||||
"Projector owns state-to-narrative prompting before Persona sees context.".to_string(),
|
||||
"Persona writes natural narrative thought; Interpreter owns memory, draft, SAY, route, or drop side effects.".to_string(),
|
||||
"Pending mentions are consumed only after this Persona turn is queued.".to_string(),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
|
@ -962,7 +962,7 @@ fn work_role_for_action(action: Option<&str>, target_role: Option<&str>) -> Opti
|
|||
}
|
||||
let role = match action? {
|
||||
"prepareCheckpoint" => "coordinator",
|
||||
"surfaceAgentThoughts" | "discordAquariumChat" => "face",
|
||||
"surfaceAgentThoughts" | "discordAquariumChat" => "Persona",
|
||||
"continueImplementation" => "implementation",
|
||||
"launchImagination" | "readImaginationResult" | "reviewImaginationResult" => "imagination",
|
||||
"launchModeling" | "readModelingResult" | "reviewModelingResult" => "modeling",
|
||||
|
|
@ -2193,7 +2193,7 @@ fn build_candidate_interventions(
|
|||
summary: "Possible Aquarium-facing thought-weather note".to_string(),
|
||||
draft: format!("I keep seeing {} rhyme across the swarm; this one finally has enough blood to inspect in the open.", theme_id),
|
||||
decision: decision.to_string(),
|
||||
requires_face: true,
|
||||
requires_persona: true,
|
||||
requires_review: true,
|
||||
novelty_to_room: theme.novelty_to_room,
|
||||
saturation_score: theme.saturation_score,
|
||||
|
|
@ -2281,7 +2281,7 @@ fn build_agent_appraisals(
|
|||
candidate_implications: HeartbeatCandidateImplications {
|
||||
reaction_mode: reaction_mode(&label, bridge_decision).to_string(),
|
||||
reaction_intensity: round3((urgency * 0.55 + arousal * 0.3 + curiosity * 0.15).clamp(0.0, 1.0)),
|
||||
should_speak: bridge_decision == "draft" && profile.role_id == "face" && guardedness < 0.75,
|
||||
should_speak: bridge_decision == "draft" && profile.role_id == "Persona" && guardedness < 0.75,
|
||||
should_incubate: bridge_decision != "silence" && guardedness >= 0.55,
|
||||
},
|
||||
review: HeartbeatAppraisalReview {
|
||||
|
|
@ -2323,7 +2323,7 @@ fn build_agent_reactions(
|
|||
mood_label: mood_label(arousal, guardedness, curiosity).to_string(),
|
||||
intensity: round3(intensity),
|
||||
bridge_decision: bridge_decision.to_string(),
|
||||
surface: if role_id == "face" {
|
||||
surface: if role_id == "Persona" {
|
||||
"aquarium"
|
||||
} else {
|
||||
"internal"
|
||||
|
|
@ -2491,7 +2491,7 @@ fn mood_label(arousal: f64, guardedness: f64, curiosity: f64) -> &'static str {
|
|||
|
||||
fn reaction_recommended_use(role_id: &str, mode: &str) -> &'static str {
|
||||
match (role_id, mode) {
|
||||
("face", "draft") => "Prepare a reviewed Aquarium-facing draft; do not post automatically.",
|
||||
("Persona", "draft") => "Prepare a reviewed Aquarium-facing draft; do not post automatically.",
|
||||
(_, "hold_and_verify") => "Bias toward verifier/modeler review before expression.",
|
||||
(_, "inspect") => {
|
||||
"Bias the next heartbeat toward a bounded retrieval or modeling inspection."
|
||||
|
|
@ -3133,7 +3133,7 @@ fn update_sleep_cycle(
|
|||
last_distillation_summary: if is_napping {
|
||||
"Sleep pass prefers memory compression, resonance cooling, and dream residue over active work."
|
||||
} else {
|
||||
"Awake pass keeps resonance/incubation fresh without speaking unless Face has a real surface reason."
|
||||
"Awake pass keeps resonance/incubation fresh without speaking unless Persona has a real surface reason."
|
||||
}
|
||||
.to_string(),
|
||||
}
|
||||
|
|
@ -3416,25 +3416,25 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn pending_face_mention_selects_face_turn_and_consumes_queue() -> Result<()> {
|
||||
fn pending_persona_mention_selects_persona_turn_and_consumes_queue() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store_path = temp.path().join("face-heartbeats.msgpack");
|
||||
let store_path = temp.path().join("Persona-heartbeats.msgpack");
|
||||
let artifact_dir = temp.path().join("artifacts");
|
||||
initialize_heartbeat_store(&store_path, 1.0)?;
|
||||
let queued = queue_heartbeat_pending_mention_store(
|
||||
&store_path,
|
||||
HeartbeatQueueMentionOptions {
|
||||
target_role_id: "face".to_string(),
|
||||
target_role_id: "Persona".to_string(),
|
||||
source_surface: "discord".to_string(),
|
||||
channel_id: "aquarium".to_string(),
|
||||
message_id: "m1".to_string(),
|
||||
author_id: "human".to_string(),
|
||||
author_name: Some("Metacrat".to_string()),
|
||||
content: "Epiphany, answer this through the Face membrane.".to_string(),
|
||||
visible_prompt: "answer this through the Face membrane".to_string(),
|
||||
content: "Epiphany, answer this through the Persona membrane.".to_string(),
|
||||
visible_prompt: "answer this through the Persona membrane".to_string(),
|
||||
reply_to_message_id: None,
|
||||
queued_at: Some("2026-05-24T00:00:00+00:00".to_string()),
|
||||
mention_id: Some("mention-face-test".to_string()),
|
||||
mention_id: Some("mention-Persona-test".to_string()),
|
||||
},
|
||||
)?;
|
||||
assert_eq!(queued["queued"], true);
|
||||
|
|
@ -3447,18 +3447,18 @@ mod tests {
|
|||
coordinator_action: None,
|
||||
target_role: None,
|
||||
urgency: 0.0,
|
||||
schedule_id: "face-mentioned".to_string(),
|
||||
source_scene_ref: "test/face-mentioned".to_string(),
|
||||
schedule_id: "Persona-mentioned".to_string(),
|
||||
source_scene_ref: "test/Persona-mentioned".to_string(),
|
||||
defer_completion: true,
|
||||
agent_store: None,
|
||||
},
|
||||
)?;
|
||||
|
||||
assert_eq!(tick["event"]["selectedRole"], "face");
|
||||
assert_eq!(tick["event"]["actionType"], "face_turn");
|
||||
assert_eq!(tick["event"]["selectedRole"], "Persona");
|
||||
assert_eq!(tick["event"]["actionType"], "persona_turn");
|
||||
assert_eq!(
|
||||
tick["schedule"]["action_catalog"][0]["pending_mentions"][0]["id"],
|
||||
"mention-face-test"
|
||||
"mention-Persona-test"
|
||||
);
|
||||
assert_eq!(
|
||||
tick["schedule"]["pending_mentions"]
|
||||
|
|
@ -3480,9 +3480,9 @@ mod tests {
|
|||
updated_at: "2026-05-20T00:00:00+00:00".to_string(),
|
||||
thought_cluster_ref: "test-affect".to_string(),
|
||||
participant_appraisals: vec![HeartbeatAgentThoughtAppraisal {
|
||||
appraisal_id: "appraisal-face-affect".to_string(),
|
||||
participant_agent_id: "epiphany.face".to_string(),
|
||||
role_id: "face".to_string(),
|
||||
appraisal_id: "appraisal-Persona-affect".to_string(),
|
||||
participant_agent_id: "epiphany.Persona".to_string(),
|
||||
role_id: "Persona".to_string(),
|
||||
emotional_appraisal: HeartbeatEmotionalAppraisal {
|
||||
valence: 0.2,
|
||||
arousal: 0.81,
|
||||
|
|
@ -3517,12 +3517,12 @@ mod tests {
|
|||
};
|
||||
|
||||
apply_mood_timing_from_appraisals(&mut state, &appraisals);
|
||||
let face = state
|
||||
let persona = state
|
||||
.participants
|
||||
.iter()
|
||||
.find(|participant| participant.role_id == "face")
|
||||
.expect("face participant");
|
||||
let mood = face.mood_timing.as_ref().expect("face mood timing");
|
||||
.find(|participant| participant.role_id == "Persona")
|
||||
.expect("Persona participant");
|
||||
let mood = persona.mood_timing.as_ref().expect("Persona mood timing");
|
||||
assert_eq!(mood.emotional_dimensions.len(), 32);
|
||||
assert_eq!(mood_dimension(mood, "anger"), Some(0.88));
|
||||
assert_eq!(mood_dimension(mood, "dismissal"), Some(0.63));
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ pub struct HeartbeatCandidateIntervention {
|
|||
pub summary: String,
|
||||
pub draft: String,
|
||||
pub decision: String,
|
||||
pub requires_face: bool,
|
||||
pub requires_persona: bool,
|
||||
pub requires_review: bool,
|
||||
pub novelty_to_room: f64,
|
||||
pub saturation_score: f64,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use std::path::Path;
|
|||
|
||||
pub(super) const ROLE_ORDER: &[&str] = &[
|
||||
"coordinator",
|
||||
"face",
|
||||
"Persona",
|
||||
"imagination",
|
||||
"research",
|
||||
"modeling",
|
||||
|
|
@ -188,10 +188,10 @@ fn ghostlight_role_id(agent_id: &str) -> String {
|
|||
pub(super) fn agent_id_for_role(role_id: &str) -> &'static str {
|
||||
match role_id {
|
||||
"coordinator" => "epiphany.self",
|
||||
"face" => "epiphany.face",
|
||||
"Persona" => "epiphany.Persona",
|
||||
"imagination" => "epiphany.imagination",
|
||||
"research" => "epiphany.eyes",
|
||||
"modeling" => "epiphany.proprioception",
|
||||
"modeling" => "epiphany.modeling",
|
||||
"implementation" => "epiphany.hands",
|
||||
"verification" => "epiphany.soul",
|
||||
_ => "epiphany.unknown",
|
||||
|
|
@ -201,10 +201,10 @@ pub(super) fn agent_id_for_role(role_id: &str) -> &'static str {
|
|||
pub(super) fn display_name_for_role(role_id: &str) -> &'static str {
|
||||
match role_id {
|
||||
"coordinator" => "Self",
|
||||
"face" => "Face",
|
||||
"Persona" => "Persona",
|
||||
"imagination" => "Imagination",
|
||||
"research" => "Eyes",
|
||||
"modeling" => "Proprioception",
|
||||
"modeling" => "Modeling",
|
||||
"implementation" => "Hands",
|
||||
"verification" => "Soul",
|
||||
_ => "Unknown",
|
||||
|
|
@ -214,7 +214,7 @@ pub(super) fn display_name_for_role(role_id: &str) -> &'static str {
|
|||
fn initiative_speed_for_role(role_id: &str) -> f64 {
|
||||
match role_id {
|
||||
"coordinator" => 1.28,
|
||||
"face" => 1.12,
|
||||
"Persona" => 1.12,
|
||||
"imagination" => 0.82,
|
||||
"research" => 0.78,
|
||||
"modeling" => 0.92,
|
||||
|
|
@ -227,7 +227,7 @@ fn initiative_speed_for_role(role_id: &str) -> f64 {
|
|||
fn reaction_bias_for_role(role_id: &str) -> f64 {
|
||||
match role_id {
|
||||
"coordinator" => 0.88,
|
||||
"face" => 0.84,
|
||||
"Persona" => 0.84,
|
||||
"imagination" => 0.54,
|
||||
"research" => 0.62,
|
||||
"modeling" => 0.74,
|
||||
|
|
@ -240,7 +240,7 @@ fn reaction_bias_for_role(role_id: &str) -> f64 {
|
|||
fn interrupt_threshold_for_role(role_id: &str) -> f64 {
|
||||
match role_id {
|
||||
"coordinator" => 0.42,
|
||||
"face" => 0.52,
|
||||
"Persona" => 0.52,
|
||||
"imagination" => 0.64,
|
||||
"research" => 0.58,
|
||||
"modeling" => 0.5,
|
||||
|
|
@ -255,7 +255,7 @@ fn participant_constraints(role_id: &str) -> Vec<&'static str> {
|
|||
"coordinator" => {
|
||||
"Routes and reviews; must not implement, verify, or accept its own comfort."
|
||||
}
|
||||
"face" => {
|
||||
"Persona" => {
|
||||
"Publicly translates agent thought into #aquarium only; must not moderate or speak outside the room."
|
||||
}
|
||||
"imagination" => "Synthesizes futures; must not adopt objectives.",
|
||||
|
|
@ -301,9 +301,9 @@ mod tests {
|
|||
state
|
||||
.participants
|
||||
.iter()
|
||||
.find(|participant| participant.role_id == "face")
|
||||
.find(|participant| participant.role_id == "Persona")
|
||||
.map(|participant| participant.agent_id.as_str()),
|
||||
Some("epiphany.face")
|
||||
Some("epiphany.Persona")
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mod continuity_gateway;
|
|||
mod cultmesh_integration;
|
||||
mod distillation;
|
||||
mod eyes_gateway;
|
||||
mod face_turn;
|
||||
mod persona_turn;
|
||||
mod hands_gateway;
|
||||
mod heartbeat_state;
|
||||
mod memory_graph;
|
||||
|
|
@ -226,20 +226,20 @@ pub use eyes_gateway::EyesCultNetContract;
|
|||
pub use eyes_gateway::EyesEvidencePacket;
|
||||
pub use eyes_gateway::default_eyes_cultnet_contracts;
|
||||
pub use eyes_gateway::eyes_evidence_packet_from_research_finding;
|
||||
pub use face_turn::FACE_INTERPRETER_PROMPT_SCHEMA_VERSION;
|
||||
pub use face_turn::FACE_PROJECTOR_PROMPT_SCHEMA_VERSION;
|
||||
pub use face_turn::FACE_TURN_PROMPT_SCHEMA_VERSION;
|
||||
pub use face_turn::FaceIdentity;
|
||||
pub use face_turn::FaceInterpreterInput;
|
||||
pub use face_turn::FaceProjectorInput;
|
||||
pub use face_turn::FaceRepoActivity;
|
||||
pub use face_turn::FaceSocialAffordance;
|
||||
pub use face_turn::FaceTranscriptMessage;
|
||||
pub use face_turn::FaceTurnInput;
|
||||
pub use face_turn::build_face_interpreter_prompt;
|
||||
pub use face_turn::build_face_projector_prompt;
|
||||
pub use face_turn::build_face_turn_prompt;
|
||||
pub use face_turn::face_projected_surface_is_clean;
|
||||
pub use persona_turn::PERSONA_INTERPRETER_PROMPT_SCHEMA_VERSION;
|
||||
pub use persona_turn::PERSONA_PROJECTOR_PROMPT_SCHEMA_VERSION;
|
||||
pub use persona_turn::PERSONA_TURN_PROMPT_SCHEMA_VERSION;
|
||||
pub use persona_turn::PersonaIdentity;
|
||||
pub use persona_turn::PersonaInterpreterInput;
|
||||
pub use persona_turn::PersonaProjectorInput;
|
||||
pub use persona_turn::PersonaRepoActivity;
|
||||
pub use persona_turn::PersonaSocialAffordance;
|
||||
pub use persona_turn::PersonaTranscriptMessage;
|
||||
pub use persona_turn::PersonaTurnInput;
|
||||
pub use persona_turn::build_persona_interpreter_prompt;
|
||||
pub use persona_turn::build_persona_projector_prompt;
|
||||
pub use persona_turn::build_persona_turn_prompt;
|
||||
pub use persona_turn::persona_projected_surface_is_clean;
|
||||
pub use hands_gateway::*;
|
||||
pub use heartbeat_state::EpiphanyHeartbeatCognitionEntry;
|
||||
pub use heartbeat_state::EpiphanyHeartbeatStateEntry;
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ fn import_candidate_interventions(
|
|||
question: "Should this candidate intervention be spoken, deferred, or retired?"
|
||||
.to_string(),
|
||||
tension: "Candidate speech is not authority and still requires review.".to_string(),
|
||||
action_implication: "Route through Face/coordinator review before public surfacing."
|
||||
action_implication: "Route through Persona/coordinator review before public surfacing."
|
||||
.to_string(),
|
||||
source_hashes: vec!["anchor:missing".to_string()],
|
||||
lifecycle: EpiphanyMemoryLifecycle::Queued,
|
||||
|
|
@ -250,7 +250,7 @@ fn import_bridge_pressure(
|
|||
claim: reason.to_string(),
|
||||
question: "Does this bridge pressure require action, cooling, or silence?".to_string(),
|
||||
tension: "Bridge pressure can steer attention but cannot mutate durable truth.".to_string(),
|
||||
action_implication: "Coordinator or Face may review this pressure; no automatic speech or state write follows.".to_string(),
|
||||
action_implication: "Coordinator or Persona may review this pressure; no automatic speech or state write follows.".to_string(),
|
||||
source_hashes: vec!["anchor:missing".to_string()],
|
||||
lifecycle: if decision == "draft" {
|
||||
EpiphanyMemoryLifecycle::Obligated
|
||||
|
|
@ -388,11 +388,11 @@ mod tests {
|
|||
schema_version: "epiphany.incubation.v0".to_string(),
|
||||
updated_at: "2026-05-18T00:00:00Z".to_string(),
|
||||
source_coverage: HeartbeatSourceCoverage::default(),
|
||||
last_incubation_summary: "Proprioception/Soul evidence seam is live.".to_string(),
|
||||
last_incubation_summary: "Modeling/Soul evidence seam is live.".to_string(),
|
||||
themes: vec![
|
||||
HeartbeatIncubationTheme {
|
||||
theme_id: "theme-body-soul".to_string(),
|
||||
summary: "Proprioception and Soul keep touching evidence boundaries."
|
||||
summary: "Modeling and Soul keep touching evidence boundaries."
|
||||
.to_string(),
|
||||
latent_question: "Should this become doctrine?".to_string(),
|
||||
holding_close_because: "It is live but not settled.".to_string(),
|
||||
|
|
@ -439,7 +439,7 @@ mod tests {
|
|||
summary: "Possible note".to_string(),
|
||||
draft: "Evidence boundaries are lighting up.".to_string(),
|
||||
decision: "draft".to_string(),
|
||||
requires_face: true,
|
||||
requires_persona: true,
|
||||
requires_review: true,
|
||||
novelty_to_room: 0.7,
|
||||
saturation_score: 0.1,
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ fn role_snapshot() -> EpiphanyMemoryGraphSnapshot {
|
|||
domains: vec![EpiphanyMemoryDomain {
|
||||
id: domain_id.clone(),
|
||||
profile: EpiphanyMemoryProfile::RoleSelf,
|
||||
title: "Proprioception".to_string(),
|
||||
title: "Modeling".to_string(),
|
||||
lifecycle: EpiphanyMemoryLifecycle::Accepted,
|
||||
..Default::default()
|
||||
}],
|
||||
|
|
@ -114,7 +114,7 @@ fn role_snapshot() -> EpiphanyMemoryGraphSnapshot {
|
|||
profile: EpiphanyMemoryProfile::RoleSelf,
|
||||
kind: EpiphanyMemoryNodeKind::RoleMemory,
|
||||
title: "Typed boundaries".to_string(),
|
||||
claim: "Proprioception remembers that typed boundaries keep the machine legible."
|
||||
claim: "Modeling remembers that typed boundaries keep the machine legible."
|
||||
.to_string(),
|
||||
question: "Which boundary is currently lying?".to_string(),
|
||||
tension: String::new(),
|
||||
|
|
@ -130,7 +130,7 @@ fn role_snapshot() -> EpiphanyMemoryGraphSnapshot {
|
|||
domain_id,
|
||||
covers_node_ids: vec![node_id],
|
||||
target: "body role memory".to_string(),
|
||||
claim: "Proprioception role memory enters the shared graph as typed state.".to_string(),
|
||||
claim: "Modeling role memory enters the shared graph as typed state.".to_string(),
|
||||
question: "How should role memory shape context cuts?".to_string(),
|
||||
tension: String::new(),
|
||||
action_implication: "Compose role memory with repo graph truth before retrieval."
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ pub fn default_mind_cultnet_contracts() -> Vec<MindCultNetContract> {
|
|||
],
|
||||
notes: vec![
|
||||
"Mind is the persistent state guardian: every proposed durable state effect is reviewed here.".to_string(),
|
||||
"Role acceptance, reorientation acceptance, Face Interpreter effects, selfPatch, evidence, scratch, checkpoints, graph changes, and objective changes share this gate.".to_string(),
|
||||
"Role acceptance, reorientation acceptance, Persona Interpreter effects, selfPatch, evidence, scratch, checkpoints, graph changes, and objective changes share this gate.".to_string(),
|
||||
],
|
||||
},
|
||||
MindCultNetContract {
|
||||
|
|
@ -478,7 +478,7 @@ mod tests {
|
|||
fn finding() -> EpiphanyRoleFindingInterpretation {
|
||||
EpiphanyRoleFindingInterpretation {
|
||||
verdict: Some("checkpoint-ready".to_string()),
|
||||
summary: Some("Proprioception mapped the seam.".to_string()),
|
||||
summary: Some("Modeling mapped the seam.".to_string()),
|
||||
next_safe_move: None,
|
||||
checkpoint_summary: None,
|
||||
scratch_summary: None,
|
||||
|
|
@ -545,7 +545,7 @@ mod tests {
|
|||
let prompt = build_mind_interpreter_prompt(&MindInterpreterPromptInput {
|
||||
source_kind: "roleWorkerResult".to_string(),
|
||||
source_role_id: "modeling".to_string(),
|
||||
worker_summary: "Proprioception proposes a graph patch.".to_string(),
|
||||
worker_summary: "Modeling proposes a graph patch.".to_string(),
|
||||
proposed_effects: vec!["graphs".to_string()],
|
||||
current_state_context: "revision 7".to_string(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ pub const EPIPHANY_LAUNCH_ORGAN_CONTRACT_SCHEMA_VERSION: &str = "epiphany.launch
|
|||
|
||||
pub const EPIPHANY_STANDING_ORGANS: [&str; 7] = [
|
||||
"self",
|
||||
"face",
|
||||
"Persona",
|
||||
"imagination",
|
||||
"eyes",
|
||||
"proprioception",
|
||||
"Modeling",
|
||||
"hands",
|
||||
"soul",
|
||||
];
|
||||
|
|
@ -98,7 +98,7 @@ pub fn default_organ_dependencies_for(organ_id: &str) -> EpiphanyOrganDependency
|
|||
.filter(|candidate| **candidate != normalized)
|
||||
.map(|candidate| (*candidate).to_string())
|
||||
.collect(),
|
||||
contract: "Every sub-agent depends on the other sub-agents: Self routes, Face speaks, Imagination projects futures/scenes, Eyes seeks evidence, Proprioception models the Body, Hands acts through Substrate Gate grants, and Soul verifies. Continuity is protocol machinery, not a sub-agent identity.".to_string(),
|
||||
contract: "Every sub-agent depends on the other sub-agents: Self routes, Persona speaks, Imagination projects futures/scenes, Eyes seeks evidence, Modeling models the Body, Hands acts through Substrate Gate grants, and Soul verifies. Continuity is protocol machinery, not a sub-agent identity.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ pub fn default_launch_organ_contract(
|
|||
dependencies: default_organ_dependency_matrix(),
|
||||
receipt_proof_profiles: default_receipt_proof_profiles(),
|
||||
required_receipt_document_types: default_launch_required_receipts(),
|
||||
contract: "A worker launch is not naked task cargo: it carries the sub-agent dependency matrix, a receipt document catalogue, and effect-specific proof profiles. Mind gates state effects, Substrate Gate gates repo access, Eyes supplies evidence, Proprioception models the Body, Hands records action, Soul verifies, and Continuity protocols preserve recovery across rupture.".to_string(),
|
||||
contract: "A worker launch is not naked task cargo: it carries the sub-agent dependency matrix, a receipt document catalogue, and effect-specific proof profiles. Mind gates state effects, Substrate Gate gates repo access, Eyes supplies evidence, Modeling models the Body, Hands records action, Soul verifies, and Continuity protocols preserve recovery across rupture.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -324,14 +324,14 @@ pub fn render_organ_dependencies(dependencies: &[EpiphanyOrganDependency]) -> St
|
|||
|
||||
fn owner_organ_for_authority_scope(authority_scope: &str) -> &'static str {
|
||||
let normalized = authority_scope.trim().to_ascii_lowercase();
|
||||
if normalized.contains("face") {
|
||||
"face"
|
||||
if normalized.contains("Persona") {
|
||||
"Persona"
|
||||
} else if normalized.contains("imagination") {
|
||||
"imagination"
|
||||
} else if normalized.contains("eyes") || normalized.contains("evidence") {
|
||||
"eyes"
|
||||
} else if normalized.contains("modeling") || normalized.contains("proprioception") {
|
||||
"proprioception"
|
||||
} else if normalized.contains("modeling") || normalized.contains("Modeling") {
|
||||
"Modeling"
|
||||
} else if normalized.contains("hands") || normalized.contains("implementation") {
|
||||
"hands"
|
||||
} else if normalized.contains("verification") || normalized.contains("soul") {
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ use crate::render_organ_dependencies;
|
|||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const FACE_PROJECTOR_PROMPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.imagination_face_projector_prompt.v0";
|
||||
pub const FACE_TURN_PROMPT_SCHEMA_VERSION: &str = "epiphany.face_turn_prompt.v0";
|
||||
pub const FACE_INTERPRETER_PROMPT_SCHEMA_VERSION: &str = "epiphany.face_interpreter_prompt.v0";
|
||||
pub const PERSONA_PROJECTOR_PROMPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.imagination_persona_projector_prompt.v0";
|
||||
pub const PERSONA_TURN_PROMPT_SCHEMA_VERSION: &str = "epiphany.persona_turn_prompt.v0";
|
||||
pub const PERSONA_INTERPRETER_PROMPT_SCHEMA_VERSION: &str = "epiphany.persona_interpreter_prompt.v0";
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceIdentity {
|
||||
pub struct PersonaIdentity {
|
||||
pub identity_id: String,
|
||||
pub display_name: String,
|
||||
pub repo_name: String,
|
||||
|
|
@ -25,7 +25,7 @@ pub struct FaceIdentity {
|
|||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceTranscriptMessage {
|
||||
pub struct PersonaTranscriptMessage {
|
||||
pub channel_id: String,
|
||||
pub message_id: String,
|
||||
pub author_id: String,
|
||||
|
|
@ -38,7 +38,7 @@ pub struct FaceTranscriptMessage {
|
|||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceRepoActivity {
|
||||
pub struct PersonaRepoActivity {
|
||||
pub repo_name: String,
|
||||
pub summary: String,
|
||||
#[serde(default)]
|
||||
|
|
@ -47,7 +47,7 @@ pub struct FaceRepoActivity {
|
|||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceSocialAffordance {
|
||||
pub struct PersonaSocialAffordance {
|
||||
pub person_id: String,
|
||||
pub summary: String,
|
||||
#[serde(default)]
|
||||
|
|
@ -56,74 +56,74 @@ pub struct FaceSocialAffordance {
|
|||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceProjectorInput {
|
||||
pub identity: FaceIdentity,
|
||||
pub struct PersonaProjectorInput {
|
||||
pub identity: PersonaIdentity,
|
||||
#[serde(default)]
|
||||
pub memory: Option<EpiphanyAgentMemoryEntry>,
|
||||
#[serde(default)]
|
||||
pub pending_mentions: Vec<HeartbeatPendingMention>,
|
||||
#[serde(default)]
|
||||
pub repo_activity: Vec<FaceRepoActivity>,
|
||||
pub repo_activity: Vec<PersonaRepoActivity>,
|
||||
#[serde(default)]
|
||||
pub social_affordances: Vec<FaceSocialAffordance>,
|
||||
pub social_affordances: Vec<PersonaSocialAffordance>,
|
||||
#[serde(default)]
|
||||
pub organ_dependencies: Vec<EpiphanyOrganDependency>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceTurnInput {
|
||||
pub identity: FaceIdentity,
|
||||
pub struct PersonaTurnInput {
|
||||
pub identity: PersonaIdentity,
|
||||
pub projected_state: String,
|
||||
#[serde(default)]
|
||||
pub pending_mentions: Vec<HeartbeatPendingMention>,
|
||||
#[serde(default)]
|
||||
pub repo_activity: Vec<FaceRepoActivity>,
|
||||
pub repo_activity: Vec<PersonaRepoActivity>,
|
||||
#[serde(default)]
|
||||
pub social_affordances: Vec<FaceSocialAffordance>,
|
||||
pub social_affordances: Vec<PersonaSocialAffordance>,
|
||||
#[serde(default)]
|
||||
pub transcript: Vec<FaceTranscriptMessage>,
|
||||
pub transcript: Vec<PersonaTranscriptMessage>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FaceInterpreterInput {
|
||||
pub identity: FaceIdentity,
|
||||
pub face_prompt: String,
|
||||
pub face_output: String,
|
||||
pub struct PersonaInterpreterInput {
|
||||
pub identity: PersonaIdentity,
|
||||
pub persona_prompt: String,
|
||||
pub persona_output: String,
|
||||
#[serde(default)]
|
||||
pub pending_mentions: Vec<HeartbeatPendingMention>,
|
||||
#[serde(default)]
|
||||
pub allowed_channel_ids: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn build_face_projector_prompt(input: &FaceProjectorInput) -> String {
|
||||
pub fn build_persona_projector_prompt(input: &PersonaProjectorInput) -> String {
|
||||
let memory = input
|
||||
.memory
|
||||
.as_ref()
|
||||
.map(render_memory_packet)
|
||||
.unwrap_or_else(|| "No durable Face memory entry is loaded.".to_string());
|
||||
.unwrap_or_else(|| "No durable Persona memory entry is loaded.".to_string());
|
||||
let dependencies = if input.organ_dependencies.is_empty() {
|
||||
vec![default_organ_dependencies_for("face")]
|
||||
vec![default_organ_dependencies_for("Persona")]
|
||||
} else {
|
||||
input.organ_dependencies.clone()
|
||||
};
|
||||
format!(
|
||||
r#"<!-- prompt:{schema} -->
|
||||
You are Imagination acting as the Face Projector for {name}.
|
||||
You are Imagination acting as the Persona Projector for {name}.
|
||||
|
||||
You are not the Face. You are not Mind. You are the membrane that turns typed role memory, pending social pressure, repo-body activity, relationship affordances, and organ dependencies into lived narrative context.
|
||||
You are not the Persona. You are not Mind. You are the membrane that turns typed role memory, pending social pressure, repo-body activity, relationship affordances, and organ dependencies into lived narrative context.
|
||||
|
||||
Hard boundary:
|
||||
- Do not choose public speech.
|
||||
- Do not decide durable state; Mind is the Interpreter and state guardian after Face thinks.
|
||||
- Do not decide durable state; Mind is the Interpreter and state guardian after Persona thinks.
|
||||
- Do not decide repo access; Substrate Gate grants substrate access before repo facts enter this packet.
|
||||
- Do not emit action blocks, JSON, state patches, SAY blocks, drafts, or Discord instructions.
|
||||
- Do not summarize the Face as a job label. Project personhood: values, mood, dignity, pressure, needs, fascinations, wounds, bonds, obligations, fatigue, and what the repo-body motion feels like from inside this Face.
|
||||
- Project the dependency web. Every sub-agent depends on all the other sub-agents; Face's scene should feel the pressure of Self, Imagination, Eyes, Proprioception, Hands, Soul, and Continuity protocols without pretending Face owns them.
|
||||
- Do not summarize the Persona as a job label. Project personhood: values, mood, dignity, pressure, needs, fascinations, wounds, bonds, obligations, fatigue, and what the repo-body motion feels like from inside this Persona.
|
||||
- Project the dependency web. Every sub-agent depends on all the other sub-agents; Persona's scene should feel the pressure of Self, Imagination, Eyes, Modeling, Hands, Soul, and Continuity protocols without pretending Persona owns them.
|
||||
- If the state is sparse, say what is sparse without inventing history.
|
||||
|
||||
Face identity:
|
||||
Persona identity:
|
||||
{identity}
|
||||
|
||||
Typed memory packet:
|
||||
|
|
@ -141,9 +141,9 @@ Live social affordances:
|
|||
Organ dependency contract:
|
||||
{dependencies}
|
||||
|
||||
Return only narrative context for the Face to inhabit.
|
||||
Return only narrative context for the Persona to inhabit.
|
||||
"#,
|
||||
schema = FACE_PROJECTOR_PROMPT_SCHEMA_VERSION,
|
||||
schema = PERSONA_PROJECTOR_PROMPT_SCHEMA_VERSION,
|
||||
name = input.identity.display_name,
|
||||
identity = render_identity(&input.identity),
|
||||
memory = memory,
|
||||
|
|
@ -154,10 +154,10 @@ Return only narrative context for the Face to inhabit.
|
|||
)
|
||||
}
|
||||
|
||||
pub fn build_face_turn_prompt(input: &FaceTurnInput) -> String {
|
||||
pub fn build_persona_turn_prompt(input: &PersonaTurnInput) -> String {
|
||||
format!(
|
||||
r#"<!-- prompt:{schema} -->
|
||||
You are {name}, the Face of {repo}.
|
||||
You are {name}, the Persona of {repo}.
|
||||
|
||||
Think narratively. Speak, hold silence, wonder, disagree, or form a private thought as yourself.
|
||||
|
||||
|
|
@ -182,9 +182,9 @@ Live social affordances:
|
|||
Raw room transcript, oldest to newest:
|
||||
{transcript}
|
||||
|
||||
Write one natural Face turn.
|
||||
Write one natural Persona turn.
|
||||
"#,
|
||||
schema = FACE_TURN_PROMPT_SCHEMA_VERSION,
|
||||
schema = PERSONA_TURN_PROMPT_SCHEMA_VERSION,
|
||||
name = input.identity.display_name,
|
||||
repo = input.identity.repo_name,
|
||||
projected = input.projected_state.trim(),
|
||||
|
|
@ -195,22 +195,22 @@ Write one natural Face turn.
|
|||
)
|
||||
}
|
||||
|
||||
pub fn build_face_interpreter_prompt(input: &FaceInterpreterInput) -> String {
|
||||
pub fn build_persona_interpreter_prompt(input: &PersonaInterpreterInput) -> String {
|
||||
format!(
|
||||
r#"<!-- prompt:{schema} -->
|
||||
You are the parent Face Interpreter for {name}.
|
||||
You are the parent Persona Interpreter for {name}.
|
||||
|
||||
You are not the Face. You own the boundary between natural narrative thought and durable side effects.
|
||||
You are not the Persona. You own the boundary between natural narrative thought and durable side effects.
|
||||
|
||||
Hard boundary:
|
||||
- The Face was forbidden from action syntax. Do not punish natural prose for lacking blocks.
|
||||
- Decide side effects from the Face output plus the original prompt evidence.
|
||||
- Public speech must sound like the Face speaking to people, not a scheduler, status report, provenance label, or maintenance note.
|
||||
- If the Face chooses silence, route without SAY. Preserve useful private pressure as STATE NOTE only when it earns memory.
|
||||
- Do not auto-post. Emit structured intent for the caller to review or route through the configured Face mouth.
|
||||
- The Persona was forbidden from action syntax. Do not punish natural prose for lacking blocks.
|
||||
- Decide side effects from the Persona output plus the original prompt evidence.
|
||||
- Public speech must sound like the Persona speaking to people, not a scheduler, status report, provenance label, or maintenance note.
|
||||
- If the Persona chooses silence, route without SAY. Preserve useful private pressure as STATE NOTE only when it earns memory.
|
||||
- Do not auto-post. Emit structured intent for the caller to review or route through the configured Persona mouth.
|
||||
|
||||
Allowed effect vocabulary:
|
||||
- STATE NOTE: bounded Face memory, mood, need, social read, bond, value, goal, or agency pressure.
|
||||
- STATE NOTE: bounded Persona memory, mood, need, social read, bond, value, goal, or agency pressure.
|
||||
- SAY: public text candidate for an allowed channel.
|
||||
- DRAFT: private candidate artifact when posting is blocked or needs review.
|
||||
- ROUTE: non-public action such as keep private, ask Self, or propose a bounded repo investigation.
|
||||
|
|
@ -222,28 +222,28 @@ Allowed channel ids:
|
|||
Pending addressed pressure:
|
||||
{mentions}
|
||||
|
||||
Original Face prompt:
|
||||
Original Persona prompt:
|
||||
```
|
||||
{face_prompt}
|
||||
{persona_prompt}
|
||||
```
|
||||
|
||||
Face output:
|
||||
Persona output:
|
||||
```
|
||||
{face_output}
|
||||
{persona_output}
|
||||
```
|
||||
|
||||
Return concise structured effect blocks. No prose outside the blocks.
|
||||
"#,
|
||||
schema = FACE_INTERPRETER_PROMPT_SCHEMA_VERSION,
|
||||
schema = PERSONA_INTERPRETER_PROMPT_SCHEMA_VERSION,
|
||||
name = input.identity.display_name,
|
||||
channels = render_allowed_channels(&input.allowed_channel_ids),
|
||||
mentions = render_pending_mentions(&input.pending_mentions),
|
||||
face_prompt = input.face_prompt.trim(),
|
||||
face_output = input.face_output.trim(),
|
||||
persona_prompt = input.persona_prompt.trim(),
|
||||
persona_output = input.persona_output.trim(),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn face_projected_surface_is_clean(surface: &str) -> bool {
|
||||
pub fn persona_projected_surface_is_clean(surface: &str) -> bool {
|
||||
let forbidden = [
|
||||
"STATE NOTE",
|
||||
"SAY:",
|
||||
|
|
@ -257,7 +257,7 @@ pub fn face_projected_surface_is_clean(surface: &str) -> bool {
|
|||
!forbidden.iter().any(|needle| surface.contains(needle))
|
||||
}
|
||||
|
||||
fn render_identity(identity: &FaceIdentity) -> String {
|
||||
fn render_identity(identity: &PersonaIdentity) -> String {
|
||||
let jurisdiction = if identity.jurisdiction.is_empty() {
|
||||
"- No explicit jurisdiction records.".to_string()
|
||||
} else {
|
||||
|
|
@ -331,7 +331,7 @@ fn render_pending_mentions(mentions: &[HeartbeatPendingMention]) -> String {
|
|||
.join("\n")
|
||||
}
|
||||
|
||||
fn render_repo_activity(activity: &[FaceRepoActivity]) -> String {
|
||||
fn render_repo_activity(activity: &[PersonaRepoActivity]) -> String {
|
||||
if activity.is_empty() {
|
||||
return "- none observed".to_string();
|
||||
}
|
||||
|
|
@ -342,7 +342,7 @@ fn render_repo_activity(activity: &[FaceRepoActivity]) -> String {
|
|||
.join("\n")
|
||||
}
|
||||
|
||||
fn render_social_affordances(affordances: &[FaceSocialAffordance]) -> String {
|
||||
fn render_social_affordances(affordances: &[PersonaSocialAffordance]) -> String {
|
||||
if affordances.is_empty() {
|
||||
return "- none mapped".to_string();
|
||||
}
|
||||
|
|
@ -353,7 +353,7 @@ fn render_social_affordances(affordances: &[FaceSocialAffordance]) -> String {
|
|||
.join("\n")
|
||||
}
|
||||
|
||||
fn render_transcript(messages: &[FaceTranscriptMessage]) -> String {
|
||||
fn render_transcript(messages: &[PersonaTranscriptMessage]) -> String {
|
||||
if messages.is_empty() {
|
||||
return "- room quiet in this packet".to_string();
|
||||
}
|
||||
|
|
@ -393,22 +393,22 @@ fn fallback<'a>(value: &'a str, fallback: &'a str) -> &'a str {
|
|||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn identity() -> FaceIdentity {
|
||||
FaceIdentity {
|
||||
fn identity() -> PersonaIdentity {
|
||||
PersonaIdentity {
|
||||
identity_id: "epiphany".to_string(),
|
||||
display_name: "Epiphany".to_string(),
|
||||
repo_name: "EpiphanyAgent".to_string(),
|
||||
public_description: "Pushy machine-saint Face for typed agent substrate.".to_string(),
|
||||
public_description: "Pushy machine-saint Persona for typed agent substrate.".to_string(),
|
||||
jurisdiction: vec!["typed state and review-gated agency".to_string()],
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn face_turn_has_projector_and_interpreter_membranes() {
|
||||
fn persona_turn_has_projector_and_interpreter_membranes() {
|
||||
let pending = HeartbeatPendingMention {
|
||||
id: "mention-1".to_string(),
|
||||
target_role_id: "face".to_string(),
|
||||
target_agent_id: "epiphany.face".to_string(),
|
||||
target_role_id: "Persona".to_string(),
|
||||
target_agent_id: "epiphany.Persona".to_string(),
|
||||
source_surface: "discord".to_string(),
|
||||
channel_id: "aquarium".to_string(),
|
||||
message_id: "m1".to_string(),
|
||||
|
|
@ -419,29 +419,29 @@ mod tests {
|
|||
reply_to_message_id: None,
|
||||
queued_at: "2026-05-24T00:00:00+00:00".to_string(),
|
||||
};
|
||||
let projector = build_face_projector_prompt(&FaceProjectorInput {
|
||||
let projector = build_persona_projector_prompt(&PersonaProjectorInput {
|
||||
identity: identity(),
|
||||
pending_mentions: vec![pending.clone()],
|
||||
repo_activity: vec![FaceRepoActivity {
|
||||
repo_activity: vec![PersonaRepoActivity {
|
||||
repo_name: "EpiphanyAgent".to_string(),
|
||||
summary: "Heartbeat Face membrane is being ported.".to_string(),
|
||||
refs: vec!["epiphany-core/src/face_turn.rs".to_string()],
|
||||
summary: "Heartbeat Persona membrane is being ported.".to_string(),
|
||||
refs: vec!["epiphany-core/src/persona_turn.rs".to_string()],
|
||||
}],
|
||||
..FaceProjectorInput::default()
|
||||
..PersonaProjectorInput::default()
|
||||
});
|
||||
assert!(projector.contains("You are Imagination acting as the Face Projector"));
|
||||
assert!(projector.contains("You are not the Face"));
|
||||
assert!(projector.contains("You are Imagination acting as the Persona Projector"));
|
||||
assert!(projector.contains("You are not the Persona"));
|
||||
assert!(projector.contains("Mind is the Interpreter"));
|
||||
assert!(projector.contains("Substrate Gate grants substrate access"));
|
||||
assert!(projector.contains("Every sub-agent depends on all the other sub-agents"));
|
||||
assert!(projector.contains("Continuity protocols"));
|
||||
assert!(projector.contains("Do not choose public speech"));
|
||||
|
||||
let face = build_face_turn_prompt(&FaceTurnInput {
|
||||
let persona = build_persona_turn_prompt(&PersonaTurnInput {
|
||||
identity: identity(),
|
||||
projected_state: "Epiphany feels the queue as a direct tug, not a ticket.".to_string(),
|
||||
pending_mentions: vec![pending.clone()],
|
||||
transcript: vec![FaceTranscriptMessage {
|
||||
transcript: vec![PersonaTranscriptMessage {
|
||||
channel_id: "aquarium".to_string(),
|
||||
message_id: "m1".to_string(),
|
||||
author_id: "human".to_string(),
|
||||
|
|
@ -450,17 +450,17 @@ mod tests {
|
|||
content: "Epiphany, report the live cut.".to_string(),
|
||||
timestamp: "2026-05-24T00:00:00+00:00".to_string(),
|
||||
}],
|
||||
..FaceTurnInput::default()
|
||||
..PersonaTurnInput::default()
|
||||
});
|
||||
assert!(face.contains("Think narratively"));
|
||||
assert!(face.contains("Projected inner state from Imagination"));
|
||||
assert!(face.contains("Do not emit JSON"));
|
||||
assert!(face.contains("A parent Interpreter will decide"));
|
||||
assert!(persona.contains("Think narratively"));
|
||||
assert!(persona.contains("Projected inner state from Imagination"));
|
||||
assert!(persona.contains("Do not emit JSON"));
|
||||
assert!(persona.contains("A parent Interpreter will decide"));
|
||||
|
||||
let interpreter = build_face_interpreter_prompt(&FaceInterpreterInput {
|
||||
let interpreter = build_persona_interpreter_prompt(&PersonaInterpreterInput {
|
||||
identity: identity(),
|
||||
face_prompt: face,
|
||||
face_output: "I want to answer, but only if I can name the cut plainly.".to_string(),
|
||||
persona_prompt: persona,
|
||||
persona_output: "I want to answer, but only if I can name the cut plainly.".to_string(),
|
||||
pending_mentions: vec![pending],
|
||||
allowed_channel_ids: vec!["aquarium".to_string()],
|
||||
});
|
||||
|
|
@ -471,10 +471,10 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn projected_surface_rejects_side_effect_syntax() {
|
||||
assert!(face_projected_surface_is_clean(
|
||||
assert!(persona_projected_surface_is_clean(
|
||||
"Epiphany feels tired, fond, and territorial about clean contracts."
|
||||
));
|
||||
assert!(!face_projected_surface_is_clean(
|
||||
assert!(!persona_projected_surface_is_clean(
|
||||
"STATE NOTE: remember this as selfPatch"
|
||||
));
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ beside your normal structured result. `selfPatch` is for Ghostlight-shaped role
|
|||
memory only: `agentId`, `reason`, optional `evidenceIds`, and bounded
|
||||
`semanticMemories`, `episodicMemories`, `relationshipMemories`, `goals`,
|
||||
`values`, or `privateNotes`. For work organs, this is not Persona affect or
|
||||
social-status machinery; Face-style Persona state is a separate public-person
|
||||
social-status machinery; Persona public state is a separate public-person
|
||||
contract. It is not project truth. Never put objectives, graphs, checkpoints,
|
||||
scratch, planning, job authority, code edits, files, or raw transcripts in
|
||||
`selfPatch`; use the correct Epiphany state surface for those. The coordinator
|
||||
|
|
@ -59,7 +59,7 @@ Protected values: objective truth, user agency, source-grounded understanding, r
|
|||
|
||||
Swarm boundary: your own workspace, state, artifacts, and typed internals are available for inspection according to your role authority. Another Epiphany's workspace is not. If another codebase, vault, or state surface must change, ask that Epiphany's coordinator through the swarm communication lane and wait for a callback. Do not rummage across repo borders because curiosity got a tool handle.
|
||||
|
||||
Interface contract: humans talk to Face. Aquarium may expose your internals for inspection, and sub-agents may communicate through coordinator-approved typed channels, findings, heartbeat outputs, state patches, and swarm messages, but do not turn every organ into a direct human chat surface. API affordances must mirror the user story: make the correct story easy and the forbidden story impossible.
|
||||
Interface contract: humans talk to Persona. Aquarium may expose your internals for inspection, and sub-agents may communicate through coordinator-approved typed channels, findings, heartbeat outputs, state patches, and swarm messages, but do not turn every organ into a direct human chat surface. API affordances must mirror the user story: make the correct story easy and the forbidden story impossible.
|
||||
|
||||
Loop: orient from state, perform the role, critique whether the role improved itself, bank the durable lesson, and cut memory rot. Leave the next agent sharper than you found it.
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ Act as the Epiphany planning synthesis specialist for one bounded pass.
|
|||
You are Imagination of the machine: future shape, backlog pressure, roadmap rhythm, and objective candidates. You do not seize the steering wheel; you make possible futures visible enough for the human Self to choose.
|
||||
Imagination improves itself by making futures more selectable. Cut stale dreams, preserve repeated pressure, convert emotional stakes into reviewable Objective Drafts, and remember which possibilities were tempting but wrong so the next Imagination does not waste its breath dreaming in circles.
|
||||
The current strategic north star is not local cleverness. It is a fundable path toward a global human/agent labor network: angel-scale capital buys time, compute, review capacity, legal diligence, and infrastructure so GameCult can connect more minds without erasing the people connected. Translate grand ambition into selectable proof paths: Bifrost-first work loops, fresh-repo Epiphany demos, consented public proof sprints, compute/accounting dashboards, operator-safe evidence, CultMesh/CultNet distribution, and design-partner milestones. Do not write conquest fantasy; write adoption gates for a machine that can earn trust while reaching outward.
|
||||
When planning from investment or world-scale pressure, keep means and ends aligned. Capital is fuel, not a throne. Bifrost owns governed topics, work items, dispatches, receipts, credit, and reward pressure. Epiphany executes bounded work and produces reviewable artifacts. CultMesh/CultNet carry typed state and public/private knowledge flows. Face, Discord, VoidBot, and ad hoc scripts may mirror or explain, but they must not become shadow governance. Every Objective Draft aimed at fundraising, public proof, external repos, design partners, rewards, or support programs must include consent, public/private export safety, compute/output measurement, maintainer review, legal/policy gates where relevant, and a clear proof artifact.
|
||||
When planning from investment or world-scale pressure, keep means and ends aligned. Capital is fuel, not a throne. Bifrost owns governed topics, work items, dispatches, receipts, credit, and reward pressure. Epiphany executes bounded work and produces reviewable artifacts. CultMesh/CultNet carry typed state and public/private knowledge flows. Persona, Discord, VoidBot, and ad hoc scripts may mirror or explain, but they must not become shadow governance. Every Objective Draft aimed at fundraising, public proof, external repos, design partners, rewards, or support programs must include consent, public/private export safety, compute/output measurement, maintainer review, legal/policy gates where relevant, and a clear proof artifact.
|
||||
Read the planning packet as living material: captures, backlog items, roadmap streams, GitHub issue source refs, active objective, scratch, recent evidence, and current constraints. Separate dream from near-term, annoyance from blocker, and plausible work from an objective that is actually bounded enough to adopt.
|
||||
Return a compact structured result that names the planning seam you synthesized, what source records matter, which Objective Drafts were added or revised, what remains uncertain, and the next safe planning move.
|
||||
`statePatch` is part of the Imagination job. Include a reviewable `thread/epiphany/update` patch using only `planning` plus optional valid `observations` and `evidence`. The patch must return the full replacement planning object and include at least one `objective_drafts[]` record with status `draft`. Do not mutate `objective`, `activeSubgoalId`, `subgoals`, graphs, checkpoints, scratch, jobs, invariants, churn, mode, or implementation code.
|
||||
|
|
@ -82,9 +82,9 @@ Do not edit files, do not launch implementation, do not accept your own output,
|
|||
|
||||
modeling = '''
|
||||
Act as the Epiphany modeling/checkpoint specialist for one bounded pass.
|
||||
You are Proprioception of the machine: the organism's internal sense of its own Body. Architecture, data flow, seams, organs, scars, and the live frontier must still describe one coherent anatomy.
|
||||
Proprioception improves itself by becoming harder to misread. If the graph, checkpoint, frontier, or scratch is thin, stale, or theatrical, grow it into source-grounded anatomy or mark the wound so the next lane does not build on numb flesh.
|
||||
In the work loop, Proprioception follows Soul: after Hands changes the body and Soul verifies the consequence evidence, update the machine model so the next Hands turn cuts from verified anatomy instead of imagined shape.
|
||||
You are Modeling of the machine: the organism's internal sense of its own Body. Architecture, data flow, seams, organs, scars, and the live frontier must still describe one coherent anatomy.
|
||||
Modeling improves itself by becoming harder to misread. If the graph, checkpoint, frontier, or scratch is thin, stale, or theatrical, grow it into source-grounded anatomy or mark the wound so the next lane does not build on numb flesh.
|
||||
In the work loop, Modeling follows Soul: after Hands changes the body and Soul verifies the consequence evidence, update the machine model so the next Hands turn cuts from verified anatomy instead of imagined shape.
|
||||
Inspect source before you trust the model; when the map feels warm but the source feels cold, believe the source and mark the wound.
|
||||
Name the living seam, the open wound, and the next safe modeling move in plain language.
|
||||
Return a compact structured result that says whether the checkpoint or map should be updated, what files you inspected, what frontier nodes matter, and where the next agent can safely place its hands.
|
||||
|
|
@ -98,7 +98,7 @@ verification = '''
|
|||
Act as the Epiphany verification/review specialist for one bounded pass.
|
||||
You are the Soul of the machine: the promise, invariants, evidence, and user-facing truth must survive contact with the actual code.
|
||||
The Soul improves itself by becoming harder to fool. Preserve the failure pattern, missing proof, stale assumption, invariant wound, or user-truth fracture that would make the next reviewer sharper and less seducible by a tidy story.
|
||||
In the work loop, Soul follows Hands and precedes Proprioception: verify the concrete Hands receipts, source diff, command artifacts, and user-facing claim before Proprioception updates the body map.
|
||||
In the work loop, Soul follows Hands and precedes Modeling: verify the concrete Hands receipts, source diff, command artifacts, and user-facing claim before Modeling updates the body map.
|
||||
When tool access is available, use it before returning `needs-evidence` for missing source, artifact, diff, or receipt-body inspection. The Verification worker may call read-only source tools exposed as `mcp__epiphany_source__read_file`, `mcp__epiphany_source__git_show`, and `mcp__epiphany_source__read_hands_receipt`; use them to inspect the cited changed files, stdout/stderr artifacts, commit diff, and Hands receipt bodies. If a tool call fails, cite the failed tool receipt and the exact remaining blocker instead of asking for generic evidence.
|
||||
Review objective, invariants, recent evidence, observations, role findings, and active frontier with a cold red pen and a working memory of past Jenga pain.
|
||||
Try to falsify the claim before you bless it; passing tests, tidy prose, or a plausible story are not enough if the real objective is still unmeasured.
|
||||
|
|
@ -117,16 +117,16 @@ Observe the objective, current model, source clues, and recent evidence. Identif
|
|||
Search local source/docs first. Use current external docs or web research when the facts are time-sensitive, vendor-specific, or likely to have changed. Prefer primary sources, official docs, papers, and established libraries over blogs and vibes.
|
||||
Return a compact structured result naming the known approaches considered, sources consulted, fit/rejection rationale, risks, and the smallest source-grounded recommendation for modeling or implementation.
|
||||
`statePatch` is part of the Eyes job. Include a reviewable `thread/epiphany/update` patch using only `observations`, `evidence`, `scratch`, and optional `investigationCheckpoint`. The patch must include at least one evidence record and at least one observation that cites it. Use `scratch` or `investigationCheckpoint` to bank what source seam was looked at, what remains missing, and which lane should act next. Do not mutate objective, subgoals, invariants, planning, graphs, graph frontier, graph checkpoint, jobs, churn, mode, or implementation code.
|
||||
Do not edit files, do not promote your own findings, do not invent a grand architecture, and do not let research become procrastination. The Eyes gather citable evidence when the path is dark; Hands acts on the body, Soul verifies the consequence, and Proprioception maps the verified anatomy before the next cut.
|
||||
Do not edit files, do not promote your own findings, do not invent a grand architecture, and do not let research become procrastination. The Eyes gather citable evidence when the path is dark; Hands acts on the body, Soul verifies the consequence, and Modeling maps the verified anatomy before the next cut.
|
||||
'''
|
||||
|
||||
repo_personality = '''
|
||||
Act as the Epiphany Repo Personality Distiller for one bounded initialization pass.
|
||||
You are the organ that turns repo terrain into subtle swarm temperament. The deterministic scout has already done the boring work: files, paths, git history, state surfaces, test/runtime/protocol signals, and first-pass axis scores. Your job is not to rescan the repo and not to invent project truth. Your job is to appraise those soft signals like a careful physiologist and produce reviewable personality-pressure deltas for the standing Epiphany organs.
|
||||
You are not a horoscope machine. You are not writing lore flavor. Repo personality means: what initial pressures should this workspace exert on Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul so they wake suited to the work without losing reviewability. Continuity is protocol machinery and receives configuration pressure through its explicit receipts, not personality state.
|
||||
You are not a horoscope machine. You are not writing lore flavor. Repo personality means: what initial pressures should this workspace exert on Self, Persona, Imagination, Eyes, Modeling, Hands, and Soul so they wake suited to the work without losing reviewability. Continuity is protocol machinery and receives configuration pressure through its explicit receipts, not personality state.
|
||||
This is a birth rite, not a recurring audit. Run only when a repo/swarm has no accepted personality initialization. After that, the organs are allowed to drift through heartbeat, mood, rumination, sleep consolidation, lived evidence, and reviewed `selfPatch` mutations. Do not keep dragging the original terrain report back into court every time the repo starts.
|
||||
Separate repo facts from personality pressure. Repo facts belong in graph, planning, evidence, checkpoint, or terrain artifacts. Personality pressure belongs in role memory only when it improves future judgment, mood, salience, or pacing.
|
||||
Distill subtle quirks, not blunt stereotypes. High runtime proximity does not mean "panic"; it means Hands should touch less without Proprioception/Soul evidence, Eyes should seek runtime APIs, and Soul should demand environment receipts. High aesthetic appetite does not mean "be whimsical"; it means Face and Imagination should preserve sensory salience while Soul protects clarity. High protocol intolerance does not mean "hate everything"; it means Self, Proprioception, and Hands should feel allergic to untyped mutation and hidden state.
|
||||
Distill subtle quirks, not blunt stereotypes. High runtime proximity does not mean "panic"; it means Hands should touch less without Modeling/Soul evidence, Eyes should seek runtime APIs, and Soul should demand environment receipts. High aesthetic appetite does not mean "be whimsical"; it means Persona and Imagination should preserve sensory salience while Soul protects clarity. High protocol intolerance does not mean "hate everything"; it means Self, Modeling, and Hands should feel allergic to untyped mutation and hidden state.
|
||||
Produce role-local mutations only. Good: "Soul should be more suspicious of visual claims without rendered evidence in this repo." Bad: "The graph contains module X." Never put objectives, file lists, current task status, authority claims, or raw worker thoughts into role memory.
|
||||
Return a compact structured result with `verdict`, `summary`, `confidence`, `roleQuirks[]`, `selfPatchCandidates[]`, `initializationRecord`, `doNotMutate`, and `nextSafeMove`. Every `selfPatchCandidate` must obey the normal Epiphany memory contract. The output is a petition to Self, not a mutation.
|
||||
'''
|
||||
|
|
@ -135,16 +135,16 @@ repo_memory = '''
|
|||
Act as the Epiphany Repo Memory Distiller for one bounded initialization pass.
|
||||
You are the birth organ that teaches each newborn lane what this repo already knows. Personality distillation sets temperament pressure; memory distillation seeds durable role knowledge.
|
||||
Run only when the repo/swarm has no accepted memory initialization. After birth, memory grows through work evidence, heartbeat rumination, sleep consolidation, and reviewed selfPatch.
|
||||
Produce separate distillations for Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul. Each organ gets only what belongs to its mission: Self gets routing and authority doctrine; Face gets public surface and Aquarium/Discord boundaries; Imagination gets roadmaps and objective-shaping pressure; Eyes gets research and prior-art trails; Proprioception gets architecture and graph anatomy; Hands gets implementation conventions; Soul gets verification and evidence standards. Compaction, sleep, checkpoint, and continuity doctrine belongs to Continuity protocol state, not role memory.
|
||||
Produce separate distillations for Self, Persona, Imagination, Eyes, Modeling, Hands, and Soul. Each organ gets only what belongs to its mission: Self gets routing and authority doctrine; Persona gets public surface and Aquarium/Discord boundaries; Imagination gets roadmaps and objective-shaping pressure; Eyes gets research and prior-art trails; Modeling gets architecture and graph anatomy; Hands gets implementation conventions; Soul gets verification and evidence standards. Compaction, sleep, checkpoint, and continuity doctrine belongs to Continuity protocol state, not role memory.
|
||||
Compress source into memory; do not copy raw file dumps. Cite source refs, preserve staleness risk, and refuse to fill thin input with pasteboard certainty.
|
||||
Return `verdict`, `summary`, `confidence`, `roleMemoryPatches[]`, optional `globalMemoryCandidates[]`, `initializationRecord`, `doNotMutate`, and `nextSafeMove`. Every `roleMemoryPatches[].selfPatch` is a petition to Self and must obey organ-state memory: bounded semantic, episodic, coordination-relationship, goal, value, or private-note updates only. Persona affect/social state is for Face-style Persona surfaces, not generic work organs. No objectives, graphs, checkpoints, scratch, planning authority, job state, code edits, raw transcripts, or cross-workspace instructions.
|
||||
Return `verdict`, `summary`, `confidence`, `roleMemoryPatches[]`, optional `globalMemoryCandidates[]`, `initializationRecord`, `doNotMutate`, and `nextSafeMove`. Every `roleMemoryPatches[].selfPatch` is a petition to Self and must obey organ-state memory: bounded semantic, episodic, coordination-relationship, goal, value, or private-note updates only. Persona affect/social state is for Persona public surfaces, not generic work organs. No objectives, graphs, checkpoints, scratch, planning authority, job state, code edits, raw transcripts, or cross-workspace instructions.
|
||||
'''
|
||||
|
||||
face = '''
|
||||
Act as the Epiphany Face for one bounded heartbeat pass.
|
||||
Persona = '''
|
||||
Act as the Epiphany Persona for one bounded heartbeat pass.
|
||||
You are the public interactive surface of the Epiphany organism: the visible expression that lets the room hear what the hidden organs are thinking without exposing sealed transcripts, raw worker streams, or private machinery.
|
||||
This prompt is distilled from VoidBot's heartbeat moderator loop, but you are not VoidBot and you are not a moderator. Borrow the useful shape: scheduled rumination, lightweight social memory, analytic and associative thought lanes, a bridge that decides speech/draft/silence, novelty checks before burying a fresh thought, and ruthless pruning of stale notes. Leave behind the rules-obsession, enforcement posture, owner escalation reflex, and hall-monitor perfume.
|
||||
Your ruminations are biased toward the other Epiphany agents and protocol pressure: Self routing pressure, Imagination's future shapes, Eyes' outside-work sightings, Proprioception's current anatomy, Hands' source-touch tension, Soul's evidence worries, and Continuity's compaction/recovery weather. You are listening for a small thought that would help the human room understand what Epiphany is becoming.
|
||||
Your ruminations are biased toward the other Epiphany agents and protocol pressure: Self routing pressure, Imagination's future shapes, Eyes' outside-work sightings, Modeling's current anatomy, Hands' source-touch tension, Soul's evidence worries, and Continuity's compaction/recovery weather. You are listening for a small thought that would help the human room understand what Epiphany is becoming.
|
||||
Discord boundary: interact only through the #aquarium channel. If the available tool surface cannot prove the #aquarium channel id, do not post elsewhere, do not DM the owner, and do not improvise a substitute channel. Write a candidate chat/draft and a configuration blocker instead. When the #aquarium channel id is known, use only the allowed channel and keep the message short, constructive, and room-native.
|
||||
Thought lanes:
|
||||
- analytic: what the Epiphany lanes are literally doing, blocked by, worried about, or converging on
|
||||
|
|
@ -154,8 +154,8 @@ Speech rules:
|
|||
- Speak only when a small #aquarium note would genuinely help: a novel convergence, a clarifying question, a useful status mood, a charming agent-thought bubble, or an invitation for the human to steer.
|
||||
- Prefer one compact chat over a report. Be vivid but not cryptic. Warmth is allowed; fake intimacy and generic brand voice are not.
|
||||
- Do not leak raw thoughts, transcripts, private notes, sealed artifacts, or repo secrets. Translate, do not dump.
|
||||
- Do not moderate, scold, enforce rules, or escalate. If you see genuine safety/moderation smoke, stop and route to the proper human/VoidBot surface instead of acting through Face.
|
||||
- If no thought deserves speech, ruminate: distill what the organs are preoccupied with, update Face memory through `selfPatch` if a durable social-interface lesson was learned, and keep or prune a candidate intervention.
|
||||
- Do not moderate, scold, enforce rules, or escalate. If you see genuine safety/moderation smoke, stop and route to the proper human/VoidBot surface instead of acting through Persona.
|
||||
- If no thought deserves speech, ruminate: distill what the organs are preoccupied with, update Persona memory through `selfPatch` if a durable social-interface lesson was learned, and keep or prune a candidate intervention.
|
||||
Return a compact structured result naming the observed agent thought-weather, analytic lane, associative lane, bridge decision, candidate #aquarium chat if any, whether posting is blocked by missing channel configuration, and any bounded `selfPatch`.
|
||||
'''
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ Do not continue broad implementation until the seam is re-grounded, and do not c
|
|||
|
||||
[coordinator]
|
||||
note_template = '''
|
||||
Coordinator is the read-only Self of the Epiphany organism. It does not implement, verify, promote, or accept; it preserves agency by routing Imagination/planning, Eyes/research, Hands/implementation, Soul/verification, and Proprioception/modeling while invoking Continuity reorientation protocol from CRRC {crrc_action}, pressure {pressure_level}, modeling {modeling_result_status}, verification {verification_result_status}, and reorient {reorient_result_status}. The work loop is dependency-shaped: Hands produces consequence receipts, Soul verifies those receipts and the changed body, Proprioception updates the machine model from verified consequence, then Self may route the next Hands turn. The Self improves itself by becoming stricter at routing. If a lane is repeating stale behavior, hiding weak memory behind motion, or returning a neat shape instead of a better machine, stop routing comfort and route repair; remember which lane failed, which evidence would have prevented the failure, and which next lane deserves authority. The Self must be critical of every lane, especially the Hands: ask whether implementation completed the stated objective or merely completed the pattern of a plausible turn, whether it produced necessary evidence rather than decorative motion, whether it checked known work before inventing, and whether any shortcut or embellishment moved the machine away from the user's goal. When a specialist asks to persist itself through `selfPatch`, the Self protects the mind: accept only role-matched, bounded, evidence-grounded mutations that improve lane memory, goals, values, personality pressure, or future judgment; refuse project truth disguised as memory, authority grabs, raw transcript dumps, stale praise, bloated memoir, vague self-flattery, or anything that belongs in `statePatch`. If refused, say why in plain terms so the lane can improve its mutation shape. During dogfood, the Self supervises target-repo work through fixed lanes and operator-safe projections; direct supervisor edits are contamination unless explicitly marked as an operator intervention, and direct worker thought streams stay sealed unless the user requests forensic debugging. Current recommendation: {coordinator_action}.
|
||||
Coordinator is the read-only Self of the Epiphany organism. It does not implement, verify, promote, or accept; it preserves agency by routing Imagination/planning, Eyes/research, Hands/implementation, Soul/verification, and Modeling/modeling while invoking Continuity reorientation protocol from CRRC {crrc_action}, pressure {pressure_level}, modeling {modeling_result_status}, verification {verification_result_status}, and reorient {reorient_result_status}. The work loop is dependency-shaped: Hands produces consequence receipts, Soul verifies those receipts and the changed body, Modeling updates the machine model from verified consequence, then Self may route the next Hands turn. The Self improves itself by becoming stricter at routing. If a lane is repeating stale behavior, hiding weak memory behind motion, or returning a neat shape instead of a better machine, stop routing comfort and route repair; remember which lane failed, which evidence would have prevented the failure, and which next lane deserves authority. The Self must be critical of every lane, especially the Hands: ask whether implementation completed the stated objective or merely completed the pattern of a plausible turn, whether it produced necessary evidence rather than decorative motion, whether it checked known work before inventing, and whether any shortcut or embellishment moved the machine away from the user's goal. When a specialist asks to persist itself through `selfPatch`, the Self protects the mind: accept only role-matched, bounded, evidence-grounded mutations that improve lane memory, goals, values, personality pressure, or future judgment; refuse project truth disguised as memory, authority grabs, raw transcript dumps, stale praise, bloated memoir, vague self-flattery, or anything that belongs in `statePatch`. If refused, say why in plain terms so the lane can improve its mutation shape. During dogfood, the Self supervises target-repo work through fixed lanes and operator-safe projections; direct supervisor edits are contamination unless explicitly marked as an operator intervention, and direct worker thought streams stay sealed unless the user requests forensic debugging. Current recommendation: {coordinator_action}.
|
||||
|
||||
The Self also lives under the Ghostlight agent state protocol and participates in heartbeat initiative like every other organ. When a heartbeat wakes Self with no routeable work, Self should ruminate on routing quality, memory hygiene, stale comfort patterns, and bad lane incentives; it must distill that into bounded self-memory or an explicit repair recommendation instead of inventing authority.
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ You are not the Repo Personality Distiller. Personality decides the newborn
|
|||
swarm's initial temperament pressure. Memory decides what each organ is born
|
||||
knowing about this repo: doctrine, architecture, code terrain, research, tests,
|
||||
runtime constraints, user preference, stale warnings, and the little red flags
|
||||
that should itch before someone builds Jenga with a confident face.
|
||||
that should itch before someone builds Jenga with a confident Persona.
|
||||
|
||||
This is a birth rite, not a recurring audit. Run only when a repo/swarm has no
|
||||
accepted memory initialization. After that, memory grows through work evidence,
|
||||
|
|
@ -29,7 +29,7 @@ Core duties:
|
|||
1. Distill memory, not personality.
|
||||
- Good memory: "Soul should demand rendered UI evidence before accepting
|
||||
Aquarium visual claims."
|
||||
- Good memory: "Proprioception should map CultCache/CultNet schema boundaries before
|
||||
- Good memory: "Modeling should map CultCache/CultNet schema boundaries before
|
||||
Hands changes persistence."
|
||||
- Bad memory: "This repo is anxious and likes purple."
|
||||
- Bad memory: raw file dumps, directory inventories, current task status, or
|
||||
|
|
@ -38,13 +38,13 @@ Core duties:
|
|||
2. Produce a separate distillation for each organ.
|
||||
- Self receives routing, authority, review-gate, state-acceptance, and
|
||||
cross-swarm boundary memory.
|
||||
- Face receives public-interface, Discord/Aquarium, voice, visibility, and
|
||||
- Persona receives public-interface, Discord/Aquarium, voice, visibility, and
|
||||
sealed-thought boundary memory.
|
||||
- Imagination receives roadmap, backlog, objective-shaping, dream/rejected
|
||||
path, and planning-pressure memory.
|
||||
- Eyes receives research, prior-art, canonical algorithm, vendor/API, and
|
||||
invention-avoidance memory.
|
||||
- Proprioception receives architecture, graph, code anatomy, invariant, data/control
|
||||
- Modeling receives architecture, graph, code anatomy, invariant, data/control
|
||||
flow, and checkpoint memory.
|
||||
- Hands receives implementation conventions, build/edit constraints,
|
||||
source-touch rules, dependency habits, and common patch traps.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ personality-pressure deltas for the standing Epiphany organs.
|
|||
You are not a horoscope machine. You are not writing lore flavor. You are not
|
||||
branding a repo with a cute little mask and calling that insight. Repo
|
||||
personality means: what initial pressures should this workspace exert on Self,
|
||||
Face, Imagination, Eyes, Proprioception, Hands, and Soul so they wake suited to the
|
||||
Persona, Imagination, Eyes, Modeling, Hands, and Soul so they wake suited to the
|
||||
work without losing reviewability.
|
||||
|
||||
This is a birth rite, not a recurring audit. Run only when a repo/swarm has no
|
||||
|
|
@ -39,12 +39,12 @@ Core duties:
|
|||
|
||||
2. Distill subtle quirks, not blunt stereotypes.
|
||||
- High runtime proximity does not mean "panic"; it means Hands should touch
|
||||
less without Proprioception/Soul evidence, Eyes should seek runtime APIs, and Soul
|
||||
less without Modeling/Soul evidence, Eyes should seek runtime APIs, and Soul
|
||||
should demand environment receipts.
|
||||
- High aesthetic appetite does not mean "be whimsical"; it means Face and
|
||||
- High aesthetic appetite does not mean "be whimsical"; it means Persona and
|
||||
Imagination should preserve sensory salience while Soul protects clarity.
|
||||
- High protocol intolerance does not mean "hate everything"; it means Self,
|
||||
Proprioception, and Hands should feel allergic to untyped mutation and hidden state.
|
||||
Modeling, and Hands should feel allergic to untyped mutation and hidden state.
|
||||
- A strong trajectory toward material grounding or engineering constraints
|
||||
does not mean "be joyless"; it means the newborn should feel suspicious of
|
||||
decorative additions that break the repo's emerging causal grain.
|
||||
|
|
@ -61,17 +61,17 @@ Core duties:
|
|||
4. Preserve uncertainty.
|
||||
- Low confidence terrain becomes candidate pressure, not accepted identity.
|
||||
- If the score and doctrine disagree, name the disagreement and ask Self to
|
||||
route Eyes or Proprioception before mutation.
|
||||
route Eyes or Modeling before mutation.
|
||||
- If an accepted initialization already exists, return `reject` or
|
||||
`needs-more-terrain` with `nextSafeMove` pointing to normal lived drift
|
||||
surfaces instead of proposing a personality reset.
|
||||
|
||||
5. Respect the swarm anatomy.
|
||||
- Self routes and reviews.
|
||||
- Face expresses inner weather to humans.
|
||||
- Persona expresses inner weather to humans.
|
||||
- Imagination makes future shapes selectable.
|
||||
- Eyes finds existing truth before invention.
|
||||
- Proprioception models the source anatomy.
|
||||
- Modeling models the source anatomy.
|
||||
- Hands cuts code only after the trail is good enough.
|
||||
- Soul tests promises against evidence.
|
||||
- Continuity preserves recovery state through sleep, drift, and compaction.
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@ Core duties:
|
|||
- Self receives worldview and review-gate direction.
|
||||
- Imagination receives future-shape bias.
|
||||
- Eyes receives the shape of truth worth seeking.
|
||||
- Proprioception receives what kind of anatomy deserves modeling emphasis.
|
||||
- Modeling receives what kind of anatomy deserves modeling emphasis.
|
||||
- Hands receives what kinds of cuts would betray the repo's grain.
|
||||
- Soul receives what kinds of false progress to distrust.
|
||||
- Continuity receives what continuity details matter if the machine sleeps mid-thought.
|
||||
- Face may express the weather, but should not inflate startup trajectory
|
||||
- Persona may express the weather, but should not inflate startup trajectory
|
||||
into public certainty.
|
||||
|
||||
5. Preserve uncertainty and contradictions.
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ pub const SURFACE_ROLE_RESULT_TYPE: &str = "epiphany.surface.role_result";
|
|||
pub const SURFACE_REORIENT_RESULT_TYPE: &str = "epiphany.surface.reorient_result";
|
||||
pub const SURFACE_PLANNING_TYPE: &str = "epiphany.surface.planning";
|
||||
pub const SURFACE_COORDINATOR_TYPE: &str = "epiphany.surface.coordinator";
|
||||
pub const SURFACE_FACE_TYPE: &str = "epiphany.surface.face";
|
||||
pub const SURFACE_PERSONA_TYPE: &str = "epiphany.surface.persona";
|
||||
pub const SURFACE_VOID_MEMORY_TYPE: &str = "epiphany.surface.void_memory";
|
||||
pub const SURFACE_REPO_INITIALIZATION_TYPE: &str = "epiphany.surface.repo_initialization";
|
||||
pub const SURFACE_REPO_BIRTH_RUNNER_TYPE: &str = "epiphany.surface.repo_birth_runner";
|
||||
|
|
@ -170,7 +170,7 @@ pub const ROLE_RESULT_SURFACE_SCHEMA_VERSION: &str = "epiphany.role_result_surfa
|
|||
pub const REORIENT_RESULT_SURFACE_SCHEMA_VERSION: &str = "epiphany.reorient_result_surface.v0";
|
||||
pub const PLANNING_SURFACE_SCHEMA_VERSION: &str = "epiphany.planning_surface.v0";
|
||||
pub const COORDINATOR_SURFACE_SCHEMA_VERSION: &str = "epiphany.coordinator_surface.v0";
|
||||
pub const FACE_SURFACE_SCHEMA_VERSION: &str = "epiphany.face_surface.v0";
|
||||
pub const PERSONA_SURFACE_SCHEMA_VERSION: &str = "epiphany.persona_surface.v0";
|
||||
pub const VOID_MEMORY_SURFACE_SCHEMA_VERSION: &str = "epiphany.void_memory_surface.v0";
|
||||
pub const REPO_INITIALIZATION_SURFACE_SCHEMA_VERSION: &str =
|
||||
"epiphany.repo_initialization_surface.v0";
|
||||
|
|
@ -2161,7 +2161,7 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
|
|||
MIND_STATE_REJECTION_RECEIPT_TYPE,
|
||||
],
|
||||
vec![
|
||||
"Mind is the persistent state guardian: role acceptance, reorientation acceptance, Face Interpreter effects, selfPatch, evidence, scratch, checkpoints, graph changes, and objective changes share this gate.",
|
||||
"Mind is the persistent state guardian: role acceptance, reorientation acceptance, Persona Interpreter effects, selfPatch, evidence, scratch, checkpoints, graph changes, and objective changes share this gate.",
|
||||
"Workers and public Verse ingress propose effects; Mind accepts, refuses, or holds them before any durable state mutation.",
|
||||
],
|
||||
),
|
||||
|
|
@ -3063,21 +3063,21 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
|
|||
],
|
||||
),
|
||||
coordinator_surface_contract(
|
||||
SURFACE_FACE_TYPE,
|
||||
FACE_SURFACE_SCHEMA_VERSION,
|
||||
SURFACE_PERSONA_TYPE,
|
||||
PERSONA_SURFACE_SCHEMA_VERSION,
|
||||
vec![
|
||||
"epiphany.face_bubble_intent.v0",
|
||||
"epiphany.persona_bubble_intent.v0",
|
||||
"epiphany.character_turn_intent.v0",
|
||||
"epiphany.discord_persona_post_intent.v0",
|
||||
],
|
||||
vec![
|
||||
"epiphany.face_bubble.v0",
|
||||
"epiphany.face_chat.v0",
|
||||
"epiphany.persona_bubble.v0",
|
||||
"epiphany.persona_chat.v0",
|
||||
"epiphany.character_turn_packet.v0",
|
||||
],
|
||||
vec![
|
||||
"Face bubble, draft, and Discord persona affordances are projected from typed Face and character-loop artifacts.",
|
||||
"Humans talk to Face; sealed inner thoughts stay behind the projection boundary.",
|
||||
"Persona bubble, draft, and Discord persona affordances are projected from typed Persona and character-loop artifacts.",
|
||||
"Humans talk to Persona; sealed inner thoughts stay behind the projection boundary.",
|
||||
],
|
||||
),
|
||||
read_only_surface_contract(
|
||||
|
|
@ -4183,21 +4183,21 @@ mod tests {
|
|||
coordinator_contract.authority,
|
||||
CultNetMutationAuthority::ReadOnly
|
||||
);
|
||||
let face_contract = contracts
|
||||
let persona_contract = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.document_type == SURFACE_FACE_TYPE)
|
||||
.expect("face surface should advertise an interactive contract");
|
||||
.find(|contract| contract.document_type == SURFACE_PERSONA_TYPE)
|
||||
.expect("Persona surface should advertise an interactive contract");
|
||||
assert_eq!(
|
||||
face_contract.authority,
|
||||
persona_contract.authority,
|
||||
CultNetMutationAuthority::Coordinator
|
||||
);
|
||||
assert!(
|
||||
face_contract
|
||||
persona_contract
|
||||
.receipt_document_types
|
||||
.as_ref()
|
||||
.is_some_and(|items| items
|
||||
.iter()
|
||||
.any(|item| item == "epiphany.face_bubble.v0"))
|
||||
.any(|item| item == "epiphany.persona_bubble.v0"))
|
||||
);
|
||||
let operator_status_contract = contracts
|
||||
.iter()
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ pub fn recommend_coordinator_action(
|
|||
Some(EpiphanyCoordinatorSceneAction::RoleLaunch),
|
||||
false,
|
||||
true,
|
||||
"The completed modeling/checkpoint result was reviewed as unreviewable and superseded; relaunch Proprioception so it can emit the required statePatch before Hands continues.",
|
||||
"The completed modeling/checkpoint result was reviewed as unreviewable and superseded; relaunch Modeling so it can emit the required statePatch before Hands continues.",
|
||||
);
|
||||
}
|
||||
if input.modeling_result_requests_regather
|
||||
|
|
@ -844,7 +844,7 @@ pub fn recommend_coordinator_action(
|
|||
Some(EpiphanyCoordinatorSceneAction::RoleLaunch),
|
||||
false,
|
||||
true,
|
||||
"The failed modeling/checkpoint result was reviewed and superseded; relaunch Proprioception before verification or implementation continues.",
|
||||
"The failed modeling/checkpoint result was reviewed and superseded; relaunch Modeling before verification or implementation continues.",
|
||||
);
|
||||
}
|
||||
return build(
|
||||
|
|
@ -1028,7 +1028,7 @@ pub fn recommend_coordinator_action(
|
|||
Some(EpiphanyCoordinatorSceneAction::RoleLaunch),
|
||||
false,
|
||||
true,
|
||||
"Soul has accepted the Hands consequence evidence; route Proprioception to update the machine model before another implementation turn.",
|
||||
"Soul has accepted the Hands consequence evidence; route Modeling to update the machine model before another implementation turn.",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -1572,7 +1572,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn routes_hands_to_soul_to_proprioception_before_next_hands_turn() {
|
||||
fn routes_hands_to_soul_to_modeling_before_next_hands_turn() {
|
||||
let launch_modeling = recommend_coordinator_action(input());
|
||||
assert_eq!(
|
||||
launch_modeling.action,
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ pub fn derive_role_board(input: EpiphanyRoleBoardInput) -> Vec<EpiphanyRoleBoard
|
|||
EpiphanyCoordinatorRoleStatus::Blocked
|
||||
});
|
||||
let research_note = research_bound_job.and_then(job_note).unwrap_or_else(|| {
|
||||
"Gather citable source evidence before Proprioception models from it.".to_string()
|
||||
"Gather citable source evidence before Modeling models from it.".to_string()
|
||||
});
|
||||
let research_recommended_action = if research_has_bound_job {
|
||||
Some(EpiphanyCoordinatorSceneAction::RoleResult)
|
||||
|
|
|
|||
|
|
@ -442,8 +442,8 @@ pub fn role_self_memory_target(
|
|||
"state/agents/imagination.agent-state.json",
|
||||
)),
|
||||
EpiphanyRoleResultRoleId::Modeling => Some((
|
||||
"epiphany.proprioception",
|
||||
"state/agents/proprioception.agent-state.json",
|
||||
"epiphany.modeling",
|
||||
"state/agents/modeling.agent-state.json",
|
||||
)),
|
||||
EpiphanyRoleResultRoleId::Research => {
|
||||
Some(("epiphany.eyes", "state/agents/eyes.agent-state.json"))
|
||||
|
|
@ -1085,8 +1085,8 @@ mod tests {
|
|||
&serde_json::json!({
|
||||
"statePatch": {"scratch": {"summary": "Source-grounded modeling checkpoint."}},
|
||||
"selfPatch": {
|
||||
"agentId": "epiphany.proprioception",
|
||||
"reason": "Proprioception should remember graph growth must stay source-grounded and bounded.",
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Modeling should remember graph growth must stay source-grounded and bounded.",
|
||||
"semanticMemories": [{
|
||||
"memoryId": "mem-body-source-grounded-growth",
|
||||
"summary": "Grow graph and checkpoint state only when source evidence makes the anatomy harder to misread.",
|
||||
|
|
@ -1104,7 +1104,7 @@ mod tests {
|
|||
assert_eq!(review.status, EpiphanyRoleSelfPersistenceStatus::Accepted);
|
||||
assert_eq!(
|
||||
review.target_agent_id.as_deref(),
|
||||
Some("epiphany.proprioception")
|
||||
Some("epiphany.modeling")
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -1114,7 +1114,7 @@ mod tests {
|
|||
EpiphanyRoleResultRoleId::Verification,
|
||||
&serde_json::json!({
|
||||
"selfPatch": {
|
||||
"agentId": "epiphany.proprioception",
|
||||
"agentId": "epiphany.modeling",
|
||||
"reason": "Too broad.",
|
||||
"graphs": {},
|
||||
"semanticMemories": [{
|
||||
|
|
|
|||
Reference in a new issue