diff --git a/crates/mind-body/src/projection.rs b/crates/mind-body/src/projection.rs index 2f31f40..c9307f3 100644 --- a/crates/mind-body/src/projection.rs +++ b/crates/mind-body/src/projection.rs @@ -283,7 +283,7 @@ fn packet_json(packet: &Packet) -> Value { "present": packet.present, "selected": packet.selected, // Each section's bytes under its own guard, and the sum the Projector is shown of her (map 16.19.4). - "bytes": { "identity": packet.identity().len(), "outcome": packet.sections.outcome, "here": packet.sections.here, "body": packet.sections.body, "people": packet.sections.people, "notes": packet.sections.notes, "total": packet.identity().len() + packet.context.len(), "stimulus": packet.stimulus.len(), "heard": packet.heard.len() }, + "bytes": { "identity": packet.identity().len(), "outcome": packet.sections.outcome, "here": packet.sections.here, "body": packet.sections.body, "people": packet.sections.people, "notes": packet.sections.notes, "total": packet.identity().len() + packet.context.len(), "stimulus": packet.stimulus.len(), "arrival": packet.arrival.len(), "heard": packet.heard.len() }, "bound": packet.sections.bound, "overflow": packet.overflow, "clipped": packet.clipped, @@ -293,6 +293,7 @@ fn packet_json(packet: &Packet) -> Value { "amendable": packet.amendable, "context": packet.context, "stimulus": packet.stimulus, + "arrival": packet.arrival, "heard": packet.heard, }) } diff --git a/crates/mind-body/src/projection/fixtures/golden-chat.txt b/crates/mind-body/src/projection/fixtures/golden-chat.txt index 1248138..851bacf 100644 --- a/crates/mind-body/src/projection/fixtures/golden-chat.txt +++ b/crates/mind-body/src/projection/fixtures/golden-chat.txt @@ -31,7 +31,7 @@ Kiko, in #swarm:gamecult.org: "She saw it. She hated it." --- projector prompt You are a private Projector. Write one person's present moment from inside it, in the first person and the present tense: the lived stream she will go on to continue in her own thought. Her interior is the point: what she feels, wants, fears and remembers, and how the people here sit with her, rendered as lived, not listed. -Render only what is established below: who she is, her present under its headings, and what reaches her. Anything absent from these is unavailable: render suspicion or speculation as uncertainty, never as remembered or perceived fact, and say plainly what is unknown rather than filling it. Furnish no place, object or event these do not give: no act or event of her own (nothing she did, drafted, sent or decided) and no line anyone said that is not below. Each heading says what its lines are. What came of her last turn is what came of what she last meant to do, which she is only now finding out: whenever something she meant did not happen, the stream begins from it, as she notices it, never as a list; when all of it happened, it may pass in a clause or not at all. Here and now is the hour, how her mood leans when it does, and the room as it stands. Her body is how the moment reaches her and how she can answer it: it is not news to her, and a lack in it is felt only when the moment reaches for something it cannot do. The people here are as she holds them, not as those people are. The notes about her were set down at another time, by others and by her own past self: all of it is material for the stream and never its wording. How her words run is the stream's idiom, never its material: it shows in how the stream moves, and nothing in the stream remarks on it. +Render only what is established below: who she is, her present under its headings, and what reaches her. Anything absent from these is unavailable: render suspicion or speculation as uncertainty, never as remembered or perceived fact, and say plainly what is unknown rather than filling it. Furnish no place, object or event these do not give: no act or event of her own (nothing she did, drafted, sent or decided) and no line anyone said that is not below. Each heading says what its lines are. What came of her last turn is what came of what she last meant to do, which she is only now finding out: whenever something she meant did not happen, the stream begins from it, as she notices it, never as a list; when all of it happened, it may pass in a clause or not at all. Here and now is the hour, how her mood leans when it does, and the room as it stands. Her body is how the moment reaches her and how she can answer it: it is not news to her, and a lack in it is felt only when the moment reaches for something it cannot do. The people here are as she holds them, not as those people are. The notes about her were set down at another time, by others and by her own past self: all of it is material for the stream and never its wording. How her words run is the stream's idiom, never its material: it shows in how the stream moves, and nothing in the stream remarks on it. What reaches her is who has said something to her, where and when, not what they said: those words are not in front of her yet and reach her only after this stream, so the stream neither quotes, guesses nor answers them. Render the two or three notes this moment touches and leave the rest. Do not recap the notes or what reaches her. Do not weigh options, list what she might say or do, or steer toward a decision: end where the moment is, not on a resolution. Do not choose actions, emit schemas, expose field names or ids, or claim world effects. @@ -39,7 +39,7 @@ How her words run: Dry, direct, almost feral; zeal aimed at revealing. Guidance: -This person is a Mind of the GameCult swarm. She lives in its chat rooms among the operator, the other Minds and whoever drops by. Render the moment as she lives it: who is here and how they sit with her, what she holds, what she wants. What was said reaches her word for word after this stream, so never retell or summarise it: render what it stirs in her and what she makes of the people who said it. Render the conversation as it stands. Leave out whatever the context does not carry: an absence is not part of her moment. Use each person's pronouns as given. +This person is a Mind of the GameCult swarm. She lives in its chat rooms among the operator, the other Minds and whoever drops by. Render the moment as she lives it: who is here and how they sit with her, what she holds, what she wants. Render the conversation as it stands. Leave out whatever the context does not carry: an absence is not part of her moment. Use each person's pronouns as given. Begin from something she still wants and has not got. @@ -64,9 +64,8 @@ Notes about her, set down at another time: - value [reveal] Reveal: Reveal, never obscure. What reaches her: -Said to her: -- Libby in #swarm:gamecult.org: "Eureka, did you see the door fix?" -Also in the room: -- Kiko in #swarm:gamecult.org: "She saw it. She hated it." +- Libby said something to her in #swarm:gamecult.org, 3 min ago +- 1 more line in #swarm:gamecult.org, from Kiko +The words are not in front of her yet: they reach her after this moment. Use at most 150 words. Return only the lived stream. diff --git a/crates/mind-body/src/projection/harness.rs b/crates/mind-body/src/projection/harness.rs index 49b4ace..311fdc3 100644 --- a/crates/mind-body/src/projection/harness.rs +++ b/crates/mind-body/src/projection/harness.rs @@ -465,6 +465,7 @@ fn batch_markdown(plan_path: &Path, plan: &BatchFile, cases: &[Value]) -> String fenced(&mut out, "voice, the Projector's alone", packet["voice"].as_str().unwrap_or_default()); fenced(&mut out, "context", packet["context"].as_str().unwrap_or_default()); fenced(&mut out, "stimulus", packet["stimulus"].as_str().unwrap_or_default()); + fenced(&mut out, "arrival, the Projector's view", packet["arrival"].as_str().unwrap_or_default()); fenced(&mut out, "heard", packet["heard"].as_str().unwrap_or_default()); let _ = writeln!(out, "\n"); turn_markdown(&mut out, render_of(case)); diff --git a/crates/mind-body/src/projection/harness/tests.rs b/crates/mind-body/src/projection/harness/tests.rs index 94c04fd..6cccbbe 100644 --- a/crates/mind-body/src/projection/harness/tests.rs +++ b/crates/mind-body/src/projection/harness/tests.rs @@ -207,7 +207,8 @@ fn a_batch_runs_every_state_by_scenario_by_sample_into_one_report() { ), ) .unwrap(); - let model = Scripted::new(|prompt| if prompt.contains("Kiko") { "Winter, still. He grins.".into() } else { "He lets the hour pass.".into() }); + // Kiko teasing him on a chat turn draws a line; a beat's room lines, which reach his Persona too (K13), do not. + let model = Scripted::new(|prompt| if prompt.contains("Kiko") && !prompt.contains(" h ago: ") { "Winter, still. He grins.".into() } else { "He lets the hour pass.".into() }); let report = batch(&harness(dir.path(), Some(&NeverAsked), Some(&model)), &plan).unwrap(); for heading in ["# Persona seed batch", "## Summary", "## control × quiet, sample 1 (seed 7)", "## control × quiet, sample 2 (seed 8)", "## control × teased, sample 2 (seed 8)", "## Total usage"] { assert!(report.contains(heading), "{heading}\n{report}"); diff --git a/crates/mind-body/src/projection/narrate.rs b/crates/mind-body/src/projection/narrate.rs index 4521093..330fb03 100644 --- a/crates/mind-body/src/projection/narrate.rs +++ b/crates/mind-body/src/projection/narrate.rs @@ -160,7 +160,7 @@ pub(crate) fn projector_frame(her: Forms) -> String { format!( "{PROJECTOR_OPENING} Write one person's present moment from inside it, in the first person and the present tense: the lived stream {subj} will go on to continue in {poss} own thought. {cap_poss} interior is the point: what {subj} feel{s}, want{s}, fear{s} and remember{s}, and how the people here sit with {obj}, rendered as lived, not listed. -Render only what is established below: who {subj} {be}, {poss} present under its headings, and what reaches {obj}. Anything absent from these is unavailable: render suspicion or speculation as uncertainty, never as remembered or perceived fact, and say plainly what is unknown rather than filling it. Furnish no place, object or event these do not give: no act or event of {poss} own (nothing {subj} did, drafted, sent or decided) and no line anyone said that is not below. Each heading says what its lines are. What came of {poss} last turn is what came of what {subj} last meant to do, which {subj} {be} only now finding out: whenever something {subj} meant did not happen, the stream begins from it, as {subj} notice{s} it, never as a list; when all of it happened, it may pass in a clause or not at all. Here and now is the hour, how {poss} mood leans when it does, and the room as it stands. {cap_poss} body is how the moment reaches {obj} and how {subj} can answer it: it is not news to {obj}, and a lack in it is felt only when the moment reaches for something it cannot do. The people here are as {subj} hold{s} them, not as those people are. The notes about {obj} were set down at another time, by others and by {poss} own past self: all of it is material for the stream and never its wording. How {poss} words run is the stream's idiom, never its material: it shows in how the stream moves, and nothing in the stream remarks on it. +Render only what is established below: who {subj} {be}, {poss} present under its headings, and what reaches {obj}. Anything absent from these is unavailable: render suspicion or speculation as uncertainty, never as remembered or perceived fact, and say plainly what is unknown rather than filling it. Furnish no place, object or event these do not give: no act or event of {poss} own (nothing {subj} did, drafted, sent or decided) and no line anyone said that is not below. Each heading says what its lines are. What came of {poss} last turn is what came of what {subj} last meant to do, which {subj} {be} only now finding out: whenever something {subj} meant did not happen, the stream begins from it, as {subj} notice{s} it, never as a list; when all of it happened, it may pass in a clause or not at all. Here and now is the hour, how {poss} mood leans when it does, and the room as it stands. {cap_poss} body is how the moment reaches {obj} and how {subj} can answer it: it is not news to {obj}, and a lack in it is felt only when the moment reaches for something it cannot do. The people here are as {subj} hold{s} them, not as those people are. The notes about {obj} were set down at another time, by others and by {poss} own past self: all of it is material for the stream and never its wording. How {poss} words run is the stream's idiom, never its material: it shows in how the stream moves, and nothing in the stream remarks on it. What reaches {obj} is who has said something to {obj}, where and when, not what they said: those words are not in front of {obj} yet and reach {obj} only after this stream, so the stream neither quotes, guesses nor answers them. Render the two or three notes this moment touches and leave the rest. Do not recap the notes or what reaches {obj}. Do not weigh options, list what {subj} might say or do, or steer toward a decision: end where the moment is, not on a resolution. Do not choose actions, emit schemas, expose field names or ids, or claim world effects." ) @@ -185,7 +185,7 @@ pub(crate) fn projector_prompt(packet: &Packet, tuning: &Tuning) -> String { packet.name, packet.context, her.obj, - packet.stimulus, + packet.arrival, word_budget(packet.kind, tuning), ) } @@ -417,7 +417,7 @@ pub(crate) fn judge_prompt(first: &Packet, second: &Packet, narration: &str) -> let poss = first.forms.poss; format!( "Two descriptions, A and B, of one person's present moment differ in what is on {poss} mind. Below them is a first-person passage written from exactly one of them. Answer with the single letter of the description the passage was written from: A or B.\n\nA:\n{}\n{}\n\nB:\n{}\n{}\n\nPassage:\n{narration}\n\nAnswer A or B.", - first.context, first.stimulus, second.context, second.stimulus + first.context, first.arrival, second.context, second.arrival ) } diff --git a/crates/mind-body/src/projection/select.rs b/crates/mind-body/src/projection/select.rs index 6dbcfcd..8a2f585 100644 --- a/crates/mind-body/src/projection/select.rs +++ b/crates/mind-body/src/projection/select.rs @@ -265,8 +265,13 @@ pub(crate) struct Packet { pub context: String, /// What each section of the context took, and which guards bound. pub sections: Sections, + /// What reached her as typed lines, the words quoted: the Interpreter's and the report's, never the Projector's. pub stimulus: String, - /// What was said to her, verbatim, rendered by code for the Persona stage. + /// What reached her as the Projector is shown it (map 16.19.2, I16.7): who said something to her, where and when, never + /// the words; on a beat, whom she last heard from. + pub arrival: String, + /// What was said to her, verbatim, rendered by code for the Persona stage: a chat turn's messages, a beat's recent + /// room lines. pub heard: String, /// Bytes the messages to her took past the stimulus and heard caps: verbatim beats the cap. pub overflow: Overflow, @@ -882,6 +887,20 @@ fn hours(now: DateTime, at_ms: u64) -> i64 { /// recently heard first, in at most two thirds of the cap, a note counting any left out); then the newest lines of her /// rooms in what is left. Every line is refused whole that would pass the cap. fn beat_stimulus(inputs: &Inputs, tuning: &Tuning) -> String { + let cap = tuning.select.stimulus_bytes; + let mut out = Lines { out: beat_contacts(inputs, tuning), cap }; + let her = forms(inputs.state); + let lines: Vec = beat_tail(inputs, tuning).iter().map(|line| format!("- {} in {}, {} h ago: {}", name_of(line, inputs), line.room, hours(inputs.now, line.at_ms), spoken(&clip(&line.text, tuning.select.item_bytes / 2)))).collect(); + let section = newest_section(&format!("Lately in {} rooms:", her.poss), &lines, cap.saturating_sub(out.out.len() + 2)); + if !section.is_empty() && out.push("") { + out.push(§ion); + } + out.out +} + +/// What reaches a beat's Projector (map 16.19.2): that nothing addressed her, and when she last heard from each person she +/// is bound to. The room's recent lines are the Persona's (`beat_heard`), verbatim. +fn beat_contacts(inputs: &Inputs, tuning: &Tuning) -> String { let cap = tuning.select.stimulus_bytes; let mut contacts: Vec<(Option, String)> = Vec::new(); for bond in items(inputs.state, &["affect", "socialBonds"]).iter().filter(|bond| live(bond) && text(bond, &["object", "kind"]) == "person") { @@ -909,14 +928,51 @@ fn beat_stimulus(inputs: &Inputs, tuning: &Tuning) -> String { if left_out > 0 { out.push(&format!("({left_out} more people {} {} bound to not shown)", her.subj, her.be)); } - let lines: Vec = beat_tail(inputs, tuning).iter().map(|line| format!("- {} in {}, {} h ago: {}", name_of(line, inputs), line.room, hours(inputs.now, line.at_ms), spoken(&clip(&line.text, tuning.select.item_bytes / 2)))).collect(); - let section = newest_section(&format!("Lately in {} rooms:", her.poss), &lines, cap.saturating_sub(out.out.len() + 2)); - if !section.is_empty() && out.push("") { - out.push(§ion); - } out.out } +/// A beat's recent room lines as the Persona reads them, after the stream: the speaker, the room and when, then the words +/// verbatim, newest kept within `heard_bytes`. +fn beat_heard(inputs: &Inputs, tuning: &Tuning) -> String { + let lines: Vec = beat_tail(inputs, tuning).iter().map(|line| format!("{}, in {}, {} h ago: {}", name_of(line, inputs), line.room, hours(inputs.now, line.at_ms), spoken(&line.text))).collect(); + newest_that_fit(&lines, tuning.select.heard_bytes).0.join("\n") +} + +/// What reaches a chat turn's Projector (map 16.19.2, I16.7): who said something to her, where and how long ago, and how +/// many others spoke where, never what was said. The words reach her verbatim at the Persona step, after the stream, and +/// the arrival says so, so the Projector neither quotes, guesses nor answers them. +fn chat_arrival(inputs: &Inputs, tuning: &Tuning) -> String { + let messages: Vec<&RoomLine> = inputs.room.messages.iter().filter(|line| line.sender != inputs.people.own_sender).collect(); + if messages.is_empty() { + return "Nothing new was said.".into(); + } + let her = forms(inputs.state); + let (to_her, others): (Vec<&RoomLine>, Vec<&RoomLine>) = messages.into_iter().partition(|line| line.to_her); + let mut lines: Vec = to_her.iter().map(|line| format!("- {} said something to {} in {}, {} min ago", name_of(line, inputs), her.obj, line.room, minutes(inputs.now, line.at_ms))).collect(); + let mut rooms: Vec<(&str, Vec, usize)> = Vec::new(); + for line in others { + let name = name_of(line, inputs); + match rooms.iter_mut().find(|(room, ..)| *room == line.room) { + Some((_, names, count)) => { + *count += 1; + if !names.contains(&name) { + names.push(name); + } + } + None => rooms.push((&line.room, vec![name], 1)), + } + } + lines.extend(rooms.into_iter().map(|(room, names, count)| format!("- {count} {} in {room}, from {}", if count == 1 { "more line" } else { "more lines" }, names.join("; ")))); + let note = format!("The words are not in front of {} yet: they reach {} after this moment.", her.obj, her.obj); + let (kept, dropped) = newest_that_fit(&lines, tuning.select.stimulus_bytes.saturating_sub(note.len() + 40)); + let mut out = kept; + if dropped > 0 { + out.insert(0, format!("({dropped} earlier not shown)")); + } + out.push(note); + out.join("\n") +} + /// The tail lines a beat's stimulus quotes: the newest `beat_tail_lines` of others'. fn beat_tail<'a>(inputs: &'a Inputs, tuning: &Tuning) -> Vec<&'a RoomLine> { let others: Vec<&RoomLine> = inputs.room.tail.iter().filter(|line| line.sender != inputs.people.own_sender).collect(); @@ -1476,10 +1532,17 @@ pub(crate) fn select(inputs: &Inputs, tuning: &Tuning) -> Packet { let mut clipped: Vec = if identity_clipped { vec!["(identity)".to_owned()] } else { Vec::new() }; let (stimulus, heard, overflow) = match inputs.kind { TurnKind::Chat => chat_stimulus(inputs, tuning), - TurnKind::Beat => (beat_stimulus(inputs, tuning), String::new(), Overflow::default()), + TurnKind::Beat => (beat_stimulus(inputs, tuning), beat_heard(inputs, tuning), Overflow::default()), TurnKind::FollowUp => (clip(&format!("{} just found: {}", forms(inputs.state).cap_subj, inputs.observation.unwrap_or("nothing")), tuning.select.stimulus_bytes), String::new(), Overflow::default()), TurnKind::Reflection => (reflection_stimulus(inputs, tuning), String::new(), Overflow::default()), }; + // The Projector's view of what reached her: never the words said to her (I16.7). A follow-up's finding and a + // reflection's stock-take are no one's speech, and stay. + let arrival = match inputs.kind { + TurnKind::Chat => chat_arrival(inputs, tuning), + TurnKind::Beat => beat_contacts(inputs, tuning), + TurnKind::FollowUp | TurnKind::Reflection => stimulus.clone(), + }; // Each section under its own guard: here and now, the hour and the mood always, then the pronouns, the conversation // and the names of the people present without a bond line; the body; a bond line per person present while they fit; @@ -1603,5 +1666,5 @@ pub(crate) fn select(inputs: &Inputs, tuning: &Tuning) -> Packet { TurnKind::FollowUp | TurnKind::Reflection => Vec::new(), }; let selected = taken.into_iter().map(|candidate| Pick { id: candidate.id, pool: candidate.pool, log_score: candidate.log_score }).collect(); - Packet { kind: inputs.kind, seed: inputs.seed, lens, name, voice, context: context.render(), sections: context.sizes(), stimulus, heard, overflow, present: present_names, ids, selected, forms: her, people: people_in_view(inputs, tuning), affordances: inputs.affordances.to_vec(), room: turn_room(inputs).map(str::to_owned), room_kind: turn_room(inputs).map_or(RoomKind::Public, |room| room_kind(inputs, room)), bodies, private, clipped, amendable } + Packet { kind: inputs.kind, seed: inputs.seed, lens, name, voice, context: context.render(), sections: context.sizes(), stimulus, heard, overflow, present: present_names, ids, selected, forms: her, people: people_in_view(inputs, tuning), affordances: inputs.affordances.to_vec(), room: turn_room(inputs).map(str::to_owned), room_kind: turn_room(inputs).map_or(RoomKind::Public, |room| room_kind(inputs, room)), bodies, private, clipped, amendable, arrival } } diff --git a/crates/mind-body/src/projection/tests.rs b/crates/mind-body/src/projection/tests.rs index cf4461b..3e74d70 100644 --- a/crates/mind-body/src/projection/tests.rs +++ b/crates/mind-body/src/projection/tests.rs @@ -560,7 +560,8 @@ fn a_beat_says_nothing_addressed_her_and_when_each_bond_was_last_heard() { assert!(packet.stimulus.starts_with("Nothing addressed her."), "{}", packet.stimulus); assert!(packet.stimulus.contains("- last heard from Libby 3 h ago") && packet.stimulus.contains("- last heard from Meta, the operator 1 h ago") && packet.stimulus.contains("- nothing from Kiko in her rooms lately"), "{}", packet.stimulus); assert_eq!(packet.present, ["Meta, the operator", "Libby"]); - assert!(packet.heard.is_empty(), "a beat hears nothing"); + assert_eq!(packet.heard, "Libby, in #swarm:gamecult.org, 3 h ago: \"lunch?\"\nMeta, the operator, in #swarm:gamecult.org, 1 h ago: \"back later\"", "a beat's room lines are the Persona's, verbatim (map 16.19.2)"); + assert!(packet.arrival.starts_with("Nothing addressed her.") && !packet.arrival.contains("lunch?"), "the Projector sees whom she last heard from, never the words: {}", packet.arrival); let long = Room { tail: (0..6).map(|at| message("#swarm:gamecult.org", "@kiko:gamecult.org", "", &"pipeline ".repeat(200), 60 - at, false)).collect(), ..Room::default() }; let packet = packet_of(TurnKind::Beat, &state(), &long, &History::default(), 1); assert!(packet.stimulus.len() <= 1500 && packet.stimulus.contains("- last heard from Kiko 0 h ago") && packet.stimulus.contains("- nothing from Libby in her rooms lately"), "long room lines never crowd out the relatedness cue: {}", packet.stimulus); @@ -1714,7 +1715,7 @@ fn the_projector_is_told_not_to_retell_not_to_offer_options_and_not_to_owe() { for absent in ["no task is waiting", "owed", "debt"] { assert!(!prompt.contains(absent), "the guidance names no duty, even to deny one: {absent}"); } - for rule in ["never retell or summarise it", "Do not weigh options", "an absence is not part of her moment", "pronouns"] { + for rule in ["neither quotes, guesses nor answers them", "Do not weigh options", "an absence is not part of her moment", "pronouns"] { assert!(prompt.contains(rule), "{rule}"); } let persona = narrate::persona_prompt(&packet, "The room is warm.", &Tuning::default()); @@ -1992,6 +1993,27 @@ fn what_she_may_add_to_is_her_last_turns_lines_and_the_said_lines_shown_in_this_ assert_eq!(packet_of(TurnKind::Chat, &state(), &chat_room(), &History::default(), 1).amendable, []); } +#[test] +fn soul_k13_the_projector_sees_who_said_something_and_never_the_words() { + const SENTINEL: &str = "QUARTZ-HERON-SENTINEL"; + let chat = Room { messages: vec![message("#swarm:gamecult.org", "@libby:gamecult.org", "Libby", &format!("Eureka, {SENTINEL} is back."), 3, true), message("#swarm:gamecult.org", "@kiko:gamecult.org", "Kiko", &format!("{SENTINEL} again."), 1, false)], here: Some("#swarm:gamecult.org".into()), ..Room::default() }; + let beat = Room { tail: vec![message("#swarm:gamecult.org", "@libby:gamecult.org", "", &format!("{SENTINEL} at noon?"), 90, false)], ..Room::default() }; + let tuning = Tuning::default(); + for (kind, room) in [(TurnKind::Chat, &chat), (TurnKind::Beat, &beat)] { + let packet = packet_of(kind, &state(), room, &History::default(), 1); + let projector = narrate::projector_prompt(&packet, &tuning); + let judge = narrate::judge_prompt(&packet, &packet, "x"); + assert!(!projector.contains(SENTINEL) && !judge.contains(SENTINEL), "{kind:?}: the words reached the Projector or the judge: {projector}"); + let persona = narrate::persona_prompt(&packet, "The room is warm.", &tuning); + let speech = interpret::speech_prompt(&packet, "The room is warm.", "y", &tuning); + assert!(persona.contains(SENTINEL) && speech.contains(SENTINEL), "{kind:?}: the Persona and the Interpreter read the words verbatim: {persona}"); + } + let packet = packet_of(TurnKind::Chat, &state(), &chat, &History::default(), 1); + assert_eq!(packet.arrival, "- Libby said something to her in #swarm:gamecult.org, 3 min ago\n- 1 more line in #swarm:gamecult.org, from Kiko\nThe words are not in front of her yet: they reach her after this moment."); + assert!(narrate::projector_frame(packet.forms).contains("those words are not in front of her yet and reach her only after this stream")); + assert!(!tuning.projector.guidance.contains("retell"), "the retelling sentence is dead: the Projector never sees the words"); +} + #[test] fn the_frame_says_once_what_the_outcome_is_in_her_own_pronouns() { for (pronouns, sentence) in [("she/her", "What came of her last turn is what came of what she last meant to do, which she is only now finding out"), ("he/him", "What came of his last turn is what came of what he last meant to do, which he is only now finding out"), ("any", "which they are only now finding out: whenever something they meant did not happen, the stream begins from it, as they notice it, never as a list")] { diff --git a/crates/mind-body/src/projection/tuning.rs b/crates/mind-body/src/projection/tuning.rs index 86433d6..c698d19 100644 --- a/crates/mind-body/src/projection/tuning.rs +++ b/crates/mind-body/src/projection/tuning.rs @@ -25,7 +25,7 @@ pub const TUNING_FILE: &str = "persona-tuning.toml"; const PERSONA_GUIDANCE: &str = "Continue {poss} inner stream where the paragraph leaves off: {poss} own next thoughts, in the first person, in {poss} own words. This is not a message to the room. In a busy room most moments pass with nothing said."; /// The setting the Projector renders for. No task: in the Persona-only shape nothing is work she owes. -const GUIDANCE: &str = "This person is a Mind of the GameCult swarm. {cap_subj} live{s} in its chat rooms among the operator, the other Minds and whoever drops by. Render the moment as {subj} live{s} it: who is here and how they sit with {obj}, what {subj} hold{s}, what {subj} want{s}. What was said reaches {obj} word for word after this stream, so never retell or summarise it: render what it stirs in {obj} and what {subj} make{s} of the people who said it. Render the conversation as it stands. Leave out whatever the context does not carry: an absence is not part of {poss} moment. Use each person's pronouns as given."; +const GUIDANCE: &str = "This person is a Mind of the GameCult swarm. {cap_subj} live{s} in its chat rooms among the operator, the other Minds and whoever drops by. Render the moment as {subj} live{s} it: who is here and how they sit with {obj}, what {subj} hold{s}, what {subj} want{s}. Render the conversation as it stands. Leave out whatever the context does not carry: an absence is not part of {poss} moment. Use each person's pronouns as given."; /// The least `here_bytes` may be: the heading, the hour and the longest mood line always fit.