From c4906b531cbba87d90cab3b364dcf5579bafca00 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 17 Aug 2026 23:51:39 +0200 Subject: [PATCH] Preserve dormant member action agency --- .../bin/ghostlight-gestalt-dynamics-smoke.rs | 3 +- .../src/bin/ghostlight-gestalt-scale-smoke.rs | 2 +- .../src/bin/ghostlight-strategic-smoke.rs | 1 + crates/ghostlight-dungeon/src/domain.rs | 20 +++ crates/ghostlight-dungeon/src/kernel.rs | 102 +++++++++++ crates/ghostlight-dungeon/src/persona.rs | 98 ++++++++++- crates/ghostlight-dungeon/src/resolution.rs | 105 +++++++++++- crates/ghostlight-dungeon/src/scheduler.rs | 160 ++++++++++-------- .../ghostlight-multiresolution-agency.md | 18 +- notes/fresh-workspace-handoff.md | 7 + notes/ghostlight-current-system-map.md | 7 + notes/ghostlight-dungeon.md | 6 +- state/map.yaml | 1 + tools/summarize_ghostlight_live_fire.ps1 | 2 +- 14 files changed, 454 insertions(+), 78 deletions(-) diff --git a/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-dynamics-smoke.rs b/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-dynamics-smoke.rs index d45489a..c8816c9 100644 --- a/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-dynamics-smoke.rs +++ b/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-dynamics-smoke.rs @@ -211,7 +211,8 @@ async fn main() -> anyhow::Result<()> { let background_action_count = plan.institution_actions.len() + plan.gestalt_actions.len() + plan.gestalt_activities.len() - + plan.actor_moves.len(); + + plan.actor_moves.len() + + plan.member_activities.len(); for stage in &output.stages { store.insert( "persona_stage_receipt.v1", diff --git a/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-scale-smoke.rs b/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-scale-smoke.rs index 565d02a..a0342ea 100644 --- a/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-scale-smoke.rs +++ b/crates/ghostlight-dungeon/src/bin/ghostlight-gestalt-scale-smoke.rs @@ -152,7 +152,7 @@ async fn main() -> anyhow::Result<()> { "cover":cover, "appraisals":output.wave.appraisals, "plan":plan, - "material_action_count":plan.institution_actions.len() + plan.gestalt_actions.len() + plan.gestalt_activities.len() + plan.actor_moves.len() + plan.member_migrations.len(), + "material_action_count":plan.institution_actions.len() + plan.gestalt_actions.len() + plan.gestalt_activities.len() + plan.actor_moves.len() + plan.member_activities.len() + plan.member_migrations.len(), "explicit_inaction_count":explicit_inaction_count, "model_stage_receipts":output.stages.iter().map(|stage|&stage.receipt).collect::>(), "commit":committed, diff --git a/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs b/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs index 6817cf4..cce18fe 100644 --- a/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs +++ b/crates/ghostlight-dungeon/src/bin/ghostlight-strategic-smoke.rs @@ -70,6 +70,7 @@ async fn main() -> anyhow::Result<()> { && plan.gestalt_actions.is_empty() && plan.gestalt_activities.is_empty() && plan.actor_moves.is_empty() + && plan.member_activities.is_empty() { anyhow::bail!( "strategic model proposed no material offscreen change: {}", diff --git a/crates/ghostlight-dungeon/src/domain.rs b/crates/ghostlight-dungeon/src/domain.rs index c61998d..04e08ed 100644 --- a/crates/ghostlight-dungeon/src/domain.rs +++ b/crates/ghostlight-dungeon/src/domain.rs @@ -444,6 +444,14 @@ pub enum StrategicCellEffect { actor_id: String, destination_id: String, }, + MemberActivity { + member_id: String, + activity: StrategicActivityKind, + #[serde(default)] + target_subject_ids: Vec, + #[serde(default)] + location_ids: Vec, + }, MemberMigration { destination_gestalt_id: String, }, @@ -604,6 +612,8 @@ pub struct StrategicTickPlan { pub actor_moves: Vec, #[serde(default)] pub member_migrations: Vec, + #[serde(default)] + pub member_activities: Vec, } #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] @@ -647,6 +657,16 @@ pub struct StrategicMemberMigration { pub public_channels: Vec, } +#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] +pub struct StrategicMemberActivity { + pub member_id: String, + pub source_gestalt_id: String, + pub activity: StrategicActivityKind, + pub target_subject_ids: Vec, + pub location_ids: Vec, + pub public_channels: Vec, +} + #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] pub struct StrategicTickReceipt { pub schema: String, diff --git a/crates/ghostlight-dungeon/src/kernel.rs b/crates/ghostlight-dungeon/src/kernel.rs index 9f407dc..dad3652 100644 --- a/crates/ghostlight-dungeon/src/kernel.rs +++ b/crates/ghostlight-dungeon/src/kernel.rs @@ -1503,6 +1503,78 @@ fn apply_strategic_tick_plan( } let mut seen_members = BTreeSet::new(); + for action in plan.member_activities { + if !seen_members.insert(action.member_id.clone()) { + return Err(KernelError::Invalid( + "gestalt member acts twice in one strategic tick".into(), + )); + } + validate_public_channels(&action.public_channels)?; + let member = campaign + .gestalt_members + .get(&action.member_id) + .filter(|member| { + member.materialized_actor_id.is_none() + && member.gestalt_id == action.source_gestalt_id + }) + .ok_or_else(|| { + KernelError::Invalid("strategic member activity has stale identity scope".into()) + })?; + let allowed_targets = + crate::resolution::member_activity_targets(campaign, &action.member_id) + .map_err(|error| KernelError::Invalid(error.to_string()))?; + let exact_location = + crate::resolution::dormant_member_location(campaign, &action.member_id) + .map_err(|error| KernelError::Invalid(error.to_string()))?; + let unique_targets = action.target_subject_ids.iter().collect::>(); + let needs_target = !matches!(action.activity, StrategicActivityKind::Prepare); + if action.target_subject_ids.len() > 4 + || unique_targets.len() != action.target_subject_ids.len() + || action + .target_subject_ids + .iter() + .any(|target| !allowed_targets.contains(target)) + || (needs_target && action.target_subject_ids.is_empty()) + || action.location_ids.len() != 1 + || action.location_ids[0] != exact_location + { + return Err(KernelError::Invalid( + "strategic member activity exceeds exact graph or location scope".into(), + )); + } + let target_names = action + .target_subject_ids + .iter() + .map(|target| agency_subject_name(campaign, target)) + .collect::, _>>()?; + let institution_ids = action + .target_subject_ids + .iter() + .filter(|target| campaign.institutions.contains_key(*target)) + .cloned() + .collect(); + let mut gestalt_ids = vec![action.source_gestalt_id.clone()]; + gestalt_ids.extend( + action + .target_subject_ids + .iter() + .filter(|target| campaign.gestalts.contains_key(*target)) + .cloned(), + ); + gestalt_ids.sort(); + gestalt_ids.dedup(); + events.push(Event { + id: format!("strategic:{revision}:member-activity:{}", action.member_id), + at, + kind: "gestalt_member_activity".into(), + summary: strategic_activity_summary(&member.name, &action.activity, &target_names), + actor_ids: vec![format!("member:{}", action.member_id)], + institution_ids, + gestalt_ids, + location_ids: action.location_ids, + public_channels: action.public_channels, + }); + } for action in plan.member_migrations { if !seen_members.insert(action.member_id.clone()) { return Err(KernelError::Invalid( @@ -2325,6 +2397,36 @@ mod tests { assert_eq!(value, before); } + #[test] + fn dormant_member_activity_preserves_identity_and_population_state() { + let mut value = hierarchical_refugee_campaign(); + let before = value.clone(); + let events = apply_strategic_tick_plan( + &mut value, + StrategicTickPlan { + member_activities: vec![StrategicMemberActivity { + member_id: "mira".into(), + source_gestalt_id: "refugees-east".into(), + activity: StrategicActivityKind::Communicate, + target_subject_ids: vec!["refugees-east".into()], + location_ids: vec!["camp".into()], + public_channels: vec![], + }], + ..Default::default() + }, + ) + .unwrap(); + assert_eq!(value, before); + assert_eq!(events.len(), 1); + assert_eq!(events[0].kind, "gestalt_member_activity"); + assert_eq!( + events[0].summary, + "Mira Venn sends a communication to Eastern transit refugees." + ); + assert_eq!(events[0].actor_ids, vec!["member:mira"]); + assert_eq!(events[0].gestalt_ids, vec!["refugees-east"]); + } + #[tokio::test] async fn stale_command_cannot_mutate_campaign() { let dir = tempfile::tempdir().unwrap(); diff --git a/crates/ghostlight-dungeon/src/persona.rs b/crates/ghostlight-dungeon/src/persona.rs index 6ebef2a..d5704bd 100644 --- a/crates/ghostlight-dungeon/src/persona.rs +++ b/crates/ghostlight-dungeon/src/persona.rs @@ -83,6 +83,7 @@ pub struct CellMemberSlice { pub information_channels: BTreeSet, pub permitted_state_references: BTreeSet, pub migration_destinations: BTreeMap, + pub activity_target_ids: BTreeSet, pub goals: Vec, pub pressures: Vec, pub relationships: BTreeMap, @@ -149,6 +150,7 @@ const CELL_APPRAISAL_OUTPUT_CONTRACT: &str = r#"{ {"type":"object","required":["type","gestalt_id","pressure_additions","pressure_resolutions"],"properties":{"type":{"const":"gestalt"},"gestalt_id":{"type":"string"},"pressure_additions":{"type":"array","maxItems":4,"items":{"type":"string"}},"pressure_resolutions":{"type":"array","maxItems":4,"items":{"type":"string"}}}}, {"type":"object","required":["type","gestalt_id","activity","target_subject_ids","location_ids"],"properties":{"type":{"const":"gestalt_activity"},"gestalt_id":{"type":"string"},"activity":{"enum":["prepare","coordinate","investigate","recruit","obstruct","trade","communicate"]},"target_subject_ids":{"type":"array","maxItems":4,"items":{"type":"string"}},"location_ids":{"type":"array","maxItems":4,"items":{"type":"string"}}}}, {"type":"object","required":["type","actor_id","destination_id"],"properties":{"type":{"const":"actor_move"},"actor_id":{"type":"string"},"destination_id":{"type":"string"}}}, + {"type":"object","required":["type","member_id","activity","target_subject_ids","location_ids"],"properties":{"type":{"const":"member_activity"},"member_id":{"type":"string"},"activity":{"enum":["prepare","coordinate","investigate","recruit","obstruct","trade","communicate"]},"target_subject_ids":{"type":"array","maxItems":4,"items":{"type":"string"}},"location_ids":{"type":"array","maxItems":1,"items":{"type":"string"}}}}, {"type":"object","required":["type","destination_gestalt_id"],"properties":{"type":{"const":"member_migration"},"destination_gestalt_id":{"type":"string"}}} ]} }}}, @@ -352,6 +354,7 @@ fn cell_projector_context(slice: &PermittedCellSlice) -> serde_json::Value { "capabilities": member.capabilities, "resources": member.resources, "migration_destinations": member.migration_destinations, + "activity_target_ids": member.activity_target_ids, "goals": member.goals, "pressures": member.pressures, "relationships": member.relationships, @@ -389,12 +392,13 @@ fn cell_interpreter_context(slice: &PermittedCellSlice) -> serde_json::Value { "member_permissions": slice.member_exceptions.iter().map(|member| serde_json::json!({ "subject_id": member.subject_id, "member_id": member.member_id, - "allowed_effect_type": "member_migration", + "allowed_effect_type": "member_migration_or_member_activity", "source_gestalt_id": member.source_gestalt_id, "source_location_id": member.source_location_id, "allowed_public_channels": member.information_channels, "permitted_state_references": member.permitted_state_references, "migration_destinations": member.migration_destinations, + "activity_target_ids": member.activity_target_ids, })).collect::>(), }) } @@ -500,7 +504,7 @@ impl CellProjectionEngine { constrain_cell_proposal_schema(&mut schema, &slice)?; let interpreter_context = serde_json::to_string(&cell_interpreter_context(&slice))?; let permission_guidance = format!( - "Emit at most {} exact constituent- or named-member-attributed attempts. Priority is an urgency score from 0 to 100 where higher numbers resolve first; never use ordinal list rank where 1 means first. Copy each subject's allowed_effect_type: institution -> institution, gestalt -> either gestalt pressure transition or gestalt_activity, actor -> actor_move, named member -> member_migration. Use gestalt_activity for a concrete preparation, coordination, investigation, recruitment, obstruction, trade, or communication attempt that does not itself change pressure; target_subject_ids must come from that gestalt's activity_target_ids and location_ids from its exact location_ids. Internal work by the subject alone is prepare with an empty target_subject_ids list. Coordinate, communicate, trade, recruit, investigate, or obstruct a target only when the Persona explicitly attempts to engage that exact target; adjacency is permission, not evidence that contact occurred. An activity records only the attempt, never success or a target's response. Institution posture must be a specific new commitment or withholding, never the current posture or a generic label. Gestalt pressure_resolutions must copy exact current_pressures that the attempted action resolves; pressure_additions are only new unresolved constraints, threats, obligations, or conditions, never completed actions. A pressure transition requires one to four total changes. Use only that subject's permitted_state_references and allowed_public_channels; facet labels are not public channels. A named member uses one supplied migration destination; a population or arena cannot migrate a person. The runtime binds cell identity, revisions, membership, and effective state. The cell id is not an actor id. Use an empty actions array plus a concrete inaction_reason when nobody acts.", + "Emit at most {} exact constituent- or named-member-attributed attempts. Priority is an urgency score from 0 to 100 where higher numbers resolve first; never use ordinal list rank where 1 means first. Copy each subject's allowed_effect_type: institution -> institution, gestalt -> either gestalt pressure transition or gestalt_activity, actor -> actor_move, named member -> either member_migration or member_activity. Use gestalt_activity or member_activity for a concrete preparation, coordination, investigation, recruitment, obstruction, trade, or communication attempt that does not itself change pressure; target_subject_ids must come from that exact subject's activity_target_ids and location_ids from its exact location scope. A member_activity must copy the raw member_id and use exactly the member's source_location_id. Internal work by the subject alone is prepare with an empty target_subject_ids list. Coordinate, communicate, trade, recruit, investigate, or obstruct a target only when the Persona explicitly attempts to engage that exact target; adjacency is permission, not evidence that contact occurred. Both intended_effect and the typed activity record only the attempt, never success or a target's response. Institution posture must be a specific new commitment or withholding, never the current posture or a generic label. Gestalt pressure_resolutions must copy exact current_pressures that the attempted action resolves; pressure_additions are only new unresolved constraints, threats, obligations, or conditions, never completed actions. A pressure transition requires one to four total changes. Use only that subject's permitted_state_references and allowed_public_channels; facet labels are not public channels. A named member migration uses one supplied destination; a population or arena cannot migrate a person. The runtime binds cell identity, revisions, membership, and effective state. The cell id is not an actor id. Use an empty actions array plus a concrete inaction_reason when nobody acts.", slice.max_actions ); let mut request = ModelStageRequest { @@ -565,7 +569,7 @@ impl CellProjectionEngine { model: self.interpreter_model.clone(), snapshot_binding: verifier_binding, lived_stream: format!( - "You are the private semantic verifier between an Interpreter and the world kernel. Decide whether every candidate typed effect faithfully represents the exact attributed subject's own attempted consequence in the Persona turn. Structural permissions were already checked. A member_migration means that named member personally chooses to travel to the destination; giving away a berth, sending somebody else, waiting, or merely considering travel does not entail it. An institution posture must express its stated commitment or withholding. A gestalt pressure resolution must be causally supported by its stated attempt, and an added pressure must be a resulting unresolved condition rather than completed-action prose. A gestalt_activity records only the exact attempt—never successful preparation, coordination, discovery, recruitment, obstruction, exchange, delivery, persuasion, or target response. Reject omissions, reversals, subject swaps, wishful outcomes, and effects that the Persona did not choose. Be concise. Return exactly one JSON object with this shape and no other fields: {{\"supported\":true or false,\"rejected_action_indices\":[zero-based integer indices],\"rationale\":\"one concise reason\"}}. When supported is true, rejected_action_indices must be empty. When false, list every rejected action index.\n\nCONTEXT:\n{}", + "You are the private semantic verifier between an Interpreter and the world kernel. Decide whether every candidate typed effect and its intended_effect faithfully represent the exact attributed subject's own attempted consequence in the Persona turn. Structural permissions were already checked. A member_migration means that named member personally chooses to travel to the destination; giving away a berth, sending somebody else, waiting, or merely considering travel does not entail it. A member_activity belongs only to that exact named person's stated attempt; it cannot be reassigned to their population. An institution posture must express its stated commitment or withholding. A gestalt pressure resolution must be causally supported by its stated attempt, and an added pressure must be a resulting unresolved condition rather than completed-action prose. An activity records only the exact attempt—never successful preparation, coordination, discovery, recruitment, obstruction, exchange, delivery, persuasion, acceptance, or target response. Reject omissions, reversals, subject swaps, wishful outcomes, and effects that the Persona did not choose. Be concise. Return exactly one JSON object with this shape and no other fields: {{\"supported\":true or false,\"rejected_action_indices\":[zero-based integer indices],\"rationale\":\"one concise reason\"}}. When supported is true, rejected_action_indices must be empty. When false, list every rejected action index.\n\nCONTEXT:\n{}", serde_json::to_string(&verifier_context)? ), output_schema: Some(serde_json::to_value(schema_for!( @@ -787,6 +791,36 @@ fn validate_cell_appraisal( &member.information_channels, )?; match &action.effect { + crate::domain::StrategicCellEffect::MemberActivity { + member_id, + activity, + target_subject_ids, + location_ids, + } => { + let unique_targets = target_subject_ids.iter().collect::>(); + let needs_target = + !matches!(activity, crate::domain::StrategicActivityKind::Prepare); + if member_id != &member.member_id + || target_subject_ids.len() > 4 + || unique_targets.len() != target_subject_ids.len() + || target_subject_ids + .iter() + .any(|target| !member.activity_target_ids.contains(target)) + || (needs_target && target_subject_ids.is_empty()) + || location_ids.len() != 1 + || location_ids[0] != member.source_location_id + { + return Err(anyhow!( + "named member {} proposed {:?} toward {:?} at {:?}; exact allowed targets are {:?} and location is {:?}", + member.member_id, + activity, + target_subject_ids, + location_ids, + member.activity_target_ids, + member.source_location_id + )); + } + } crate::domain::StrategicCellEffect::MemberMigration { destination_gestalt_id, } if member @@ -938,6 +972,12 @@ fn validate_constituent_effect( subject.subject_id )); } + crate::domain::StrategicCellEffect::MemberActivity { .. } => { + return Err(anyhow!( + "constituent {} is not a named member and may not emit member_activity", + subject.subject_id + )); + } } Ok(()) } @@ -1401,6 +1441,58 @@ mod tests { validate_constituent_effect(subject, &internal_preparation).unwrap(); } + #[test] + fn named_member_activity_stays_attributed_to_the_person() { + let mut slice = fixture_cell_slice(); + slice.member_exceptions.push(CellMemberSlice { + subject_id: "member:mira".into(), + member_id: "mira".into(), + name: "Mira".into(), + source_gestalt_id: "refugees".into(), + source_location_id: "forum".into(), + knowledge: BTreeSet::new(), + capabilities: BTreeSet::new(), + resources: BTreeSet::new(), + information_channels: BTreeSet::new(), + permitted_state_references: BTreeSet::from(["member:mira".into()]), + migration_destinations: BTreeMap::new(), + activity_target_ids: BTreeSet::from(["refugees".into()]), + goals: vec![], + pressures: vec![], + relationships: BTreeMap::new(), + memories: vec![], + }); + let appraisal = bind_cell_appraisal( + &slice, + CellAppraisalProposal { + actions: vec![crate::domain::CellActionProposal { + subject_id: "member:mira".into(), + intent: "offer to help repair the shelter".into(), + intended_effect: "make the offer to the refugees".into(), + priority: 70, + state_references: vec!["member:mira".into()], + public_channels: vec![], + effect: StrategicCellEffect::MemberActivity { + member_id: "mira".into(), + activity: crate::domain::StrategicActivityKind::Communicate, + target_subject_ids: vec!["refugees".into()], + location_ids: vec!["forum".into()], + }, + }], + inaction_reason: None, + }, + ); + validate_cell_appraisal(&slice, &appraisal).unwrap(); + + let mut stolen = appraisal; + let StrategicCellEffect::MemberActivity { member_id, .. } = &mut stolen.actions[0].effect + else { + unreachable!() + }; + *member_id = "somebody-else".into(); + assert!(validate_cell_appraisal(&slice, &stolen).is_err()); + } + #[test] fn repeated_institution_posture_reports_the_exact_missing_change() { let slice = fixture_cell_slice(); diff --git a/crates/ghostlight-dungeon/src/resolution.rs b/crates/ghostlight-dungeon/src/resolution.rs index a1cb0dc..7336ab8 100644 --- a/crates/ghostlight-dungeon/src/resolution.rs +++ b/crates/ghostlight-dungeon/src/resolution.rs @@ -1664,6 +1664,22 @@ pub fn validate_and_resolve_wave( destination_id, public_channels: proposal.public_channels, }), + StrategicCellEffect::MemberActivity { + member_id, + activity, + target_subject_ids, + location_ids, + } => { + let source_gestalt_id = campaign.gestalt_members[&member_id].gestalt_id.clone(); + plan.member_activities.push(StrategicMemberActivity { + member_id, + source_gestalt_id, + activity, + target_subject_ids, + location_ids, + public_channels: proposal.public_channels, + }); + } StrategicCellEffect::MemberMigration { destination_gestalt_id, } => { @@ -1689,6 +1705,7 @@ pub fn validate_and_resolve_wave( + plan.gestalt_actions.len() + plan.gestalt_activities.len() + plan.actor_moves.len() + + plan.member_activities.len() + plan.member_migrations.len() >= consequence_limit { @@ -1828,6 +1845,11 @@ fn validate_cell_proposal( "a population, institution, actor, or arena cannot migrate a named member" )); } + StrategicCellEffect::MemberActivity { .. } => { + return Err(anyhow!( + "a population, institution, actor, or arena cannot act as a named member" + )); + } } Ok(()) } @@ -1911,6 +1933,32 @@ fn validate_member_cell_proposal( )); } match &proposal.effect { + StrategicCellEffect::MemberActivity { + member_id: effect_member_id, + activity, + target_subject_ids, + location_ids, + } => { + let allowed_targets = member_activity_targets(campaign, member_id)?; + let unique_targets = target_subject_ids.iter().collect::>(); + let exact_location = dormant_member_location(campaign, member_id)?; + let needs_target = !matches!(activity, StrategicActivityKind::Prepare); + if effect_member_id != member_id + || target_subject_ids.len() > 4 + || unique_targets.len() != target_subject_ids.len() + || target_subject_ids + .iter() + .any(|target| !allowed_targets.contains(target)) + || (needs_target && target_subject_ids.is_empty()) + || location_ids.len() != 1 + || location_ids[0] != exact_location + { + return Err(anyhow!( + "named member activity exceeds exact personal, graph, or location scope" + )); + } + Ok(()) + } StrategicCellEffect::MemberMigration { destination_gestalt_id, } => { @@ -1928,7 +1976,7 @@ fn validate_member_cell_proposal( ) } _ => Err(anyhow!( - "named member exception may propose only its own validated migration" + "named member exception may propose only its own validated activity or migration" )), } } @@ -2214,6 +2262,18 @@ pub fn strategic_activity_targets(campaign: &Campaign, subject_id: &str) -> BTre .collect() } +pub fn member_activity_targets(campaign: &Campaign, member_id: &str) -> Result> { + let member = campaign + .gestalt_members + .get(member_id) + .filter(|member| member.materialized_actor_id.is_none()) + .ok_or_else(|| anyhow!("gestalt member is not dormant"))?; + dormant_member_location(campaign, member_id)?; + let mut targets = strategic_activity_targets(campaign, &member.gestalt_id); + targets.insert(member.gestalt_id.clone()); + Ok(targets) +} + pub fn validate_active_gestalt_presence_location( campaign: &Campaign, gestalt_id: &str, @@ -2266,6 +2326,9 @@ fn proposal_target_key(proposal: &CellActionProposal) -> String { format!("gestalt:{gestalt_id}") } StrategicCellEffect::ActorMove { actor_id, .. } => format!("actor:{actor_id}"), + StrategicCellEffect::MemberActivity { member_id, .. } => { + format!("member:{member_id}") + } StrategicCellEffect::MemberMigration { .. } => proposal.subject_id.clone(), } } @@ -2931,6 +2994,46 @@ pub(crate) mod tests { let plan = validate_and_resolve_wave(&value, &make_wave(proposal.clone())).unwrap(); assert_eq!(plan.member_migrations.len(), 1); + let member_activity = CellActionProposal { + subject_id: "member:mira".into(), + intent: "offer help to the refugee organizers".into(), + intended_effect: "make the offer without deciding their response".into(), + priority: 90, + state_references: vec!["member:mira".into()], + public_channels: vec!["camp-bulletin".into()], + effect: StrategicCellEffect::MemberActivity { + member_id: "mira".into(), + activity: StrategicActivityKind::Communicate, + target_subject_ids: vec!["refugees".into()], + location_ids: vec!["center".into()], + }, + }; + let activity_plan = + validate_and_resolve_wave(&value, &make_wave(member_activity.clone())).unwrap(); + assert_eq!(activity_plan.member_activities.len(), 1); + assert!(activity_plan.member_migrations.is_empty()); + + let same_member_wave = ResolutionWaveCommit { + schema: "ghostlight.resolution_wave_commit.v1".into(), + world_revision: value.revision, + resolution_epoch: value.resolution_policy.resolution_epoch, + plan_receipt: plan_receipt(&value, &cover), + appraisals: vec![CellAppraisal { + schema: "ghostlight.cell_appraisal.v1".into(), + cell_id: cover.cells[0].id.clone(), + world_revision: value.revision, + resolution_epoch: value.resolution_policy.resolution_epoch, + considered_subject_ids: cover.cells[0].subject_ids.clone(), + actions: vec![member_activity.clone(), proposal.clone()], + inaction_reason: None, + }], + cover: cover.clone(), + model_receipt_hashes: vec![], + }; + let same_member_plan = validate_and_resolve_wave(&value, &same_member_wave).unwrap(); + assert_eq!(same_member_plan.member_activities.len(), 1); + assert!(same_member_plan.member_migrations.is_empty()); + let mut announced = proposal.clone(); announced.public_channels = vec!["camp-bulletin".into()]; assert!(validate_and_resolve_wave(&value, &make_wave(announced)).is_ok()); diff --git a/crates/ghostlight-dungeon/src/scheduler.rs b/crates/ghostlight-dungeon/src/scheduler.rs index b63821a..7002676 100644 --- a/crates/ghostlight-dungeon/src/scheduler.rs +++ b/crates/ghostlight-dungeon/src/scheduler.rs @@ -509,7 +509,9 @@ fn member_exceptions(campaign: &Campaign, cell: &SimulationCell) -> Result Result>(); @@ -537,71 +540,74 @@ fn member_exceptions(campaign: &Campaign, cell: &SimulationCell) -> Result` and the current +leaf; the member's delta, the source Gestalt, and any target remain unchanged. +An arena cannot translate the person's attempt into a collective action, and +the destination population cannot claim the person's voice. `member_activity` +and `member_migration` resolve under one exact member key, so only the +higher-priority compatible choice can commit in a wave. + Semantic correction feedback names the exact failed boundary and current value. A repeated institution posture receives its present posture; an invalid population transition receives its exact current pressure set and the failed diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 23e5176..301b0e6 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -74,6 +74,13 @@ WorldKernel rejects inactive-leaf or teleported promotions. The refugee-return live-fire harness requires the presence planner, rather than a direct materialization command, to surface the same migrated member. +Live pressure then exposed that dormant named members could migrate but could +not take ordinary local action. The candidate now has `member_activity`, using +the same bounded activity vocabulary with exact member, location, target, +knowledge, and channel scope. It shares the person's resolution key with +migration and emits an attempt event without mutating the member delta or +letting a containing arena or destination Gestalt steal the choice. + The multiresolution body is deployed on Starfire. Typed health matched the immutable release, DeepSeek was ready, and the disposable live strategic-cell smoke committed three offscreen events plus three accessible news items without diff --git a/notes/ghostlight-current-system-map.md b/notes/ghostlight-current-system-map.md index c151abf..ce1daea 100644 --- a/notes/ghostlight-current-system-map.md +++ b/notes/ghostlight-current-system-map.md @@ -75,6 +75,13 @@ communication attempt against graph-adjacent subjects without claiming the outcome. The kernel derives the event text and exact gestalt participant IDs; the arena and model prose own neither. +Salient dormant members have their own `member_activity` path for ordinary +local attempts. It uses the same bounded verbs, the member's exact location, +their current leaf plus graph-adjacent targets, and their own state/channel +permissions. Migration and activity conflict on one member key. A destination +population cannot inherit the person's offer, speech, or decision merely +because the cover placed them in the same arena. + Population scale uses reversible individuation: ```text diff --git a/notes/ghostlight-dungeon.md b/notes/ghostlight-dungeon.md index 22de96b..13425e2 100644 --- a/notes/ghostlight-dungeon.md +++ b/notes/ghostlight-dungeon.md @@ -170,8 +170,10 @@ stake prose alone never impersonates world mutation. investigation, recruitment, obstruction, trade, or communication attempts against exact graph-adjacent subjects. These commit only an attributed attempted-activity event; success and target response require later admitted - effects. Invalid, stale, timed-out, or malformed waves leave world state - unchanged. + effects. Durable dematerialized members use the same bounded activity + vocabulary with exact personal attribution; ordinary action and migration + share one per-person slot. Invalid, stale, timed-out, or malformed waves + leave world state unchanged. - The scheduler and return-time catch-up invoke the same `AdvanceStrategicTick` command. Catch-up processes missed ticks before accepting the next player action. - Live play has inference priority; background work stops launching new calls while a player turn is active. - Offscreen events generate information-channel-aware news leads. On return, the player may receive newspapers, reports, messages, or rumors only when the character has access to them; the news layer cannot reveal omniscient state. diff --git a/state/map.yaml b/state/map.yaml index 4251bec..7bcd5bf 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -72,6 +72,7 @@ live_architecture: - The multiresolution agency graph derives a connected cohesive/arena cell cover from canonical actors, institutions, and gestalt leaves under a player-selected 1–32 budget. - Model-driven strategic cell waves can change remote actors, institutions, gestalts, clocks, and exact-channel news while the absent player remains outside their write authority; the entire wave validates and commits atomically. - Population activity effects represent exact attributed attempts to prepare, coordinate, investigate, recruit, obstruct, trade, or communicate; graph scope, locations, channels, and semantics validate before the kernel derives an event, and the effect never claims its own success. + - Salient dormant members may emit the same bounded activity vocabulary from their exact location toward their current leaf or adjacent subjects; member activity and migration share one action key, so arena aggregation cannot duplicate or transfer personal agency. - Resolution-demand focal IDs are salience hints only; model output cannot force singleton cells or override the player-selected Persona-cell budget. - Projectors receive decision-relevant situation state, Personas receive only lived narrative, and Interpreters receive exact action permissions; runtime-owned cell membership and revisions are bound locally rather than copied by a model. - Local world compilation sees direct-seed evidence only. A separate Flash lane may establish coarse remote institutions from one short witnessed mandate each; deterministic binding omits unsupported entries into non-canonical approval gaps. diff --git a/tools/summarize_ghostlight_live_fire.ps1 b/tools/summarize_ghostlight_live_fire.ps1 index 3dcfcc8..8e18766 100644 --- a/tools/summarize_ghostlight_live_fire.ps1 +++ b/tools/summarize_ghostlight_live_fire.ps1 @@ -29,7 +29,7 @@ function Get-ScenarioKind([string]$ScenarioId) { function Get-PlanActionCount($Plan) { if (-not $Plan) { return 0 } $count = 0 - foreach ($property in @('institution_actions', 'gestalt_actions', 'gestalt_activities', 'actor_moves', 'member_migrations')) { + foreach ($property in @('institution_actions', 'gestalt_actions', 'gestalt_activities', 'actor_moves', 'member_activities', 'member_migrations')) { if ($Plan.PSObject.Properties.Name -contains $property) { $count += @($Plan.$property).Count }