Persona promises: a release her own prose says still stands is refused

Soul's R9 item 1 (F.2 r6: Kiko said "Whenever you've read it is fine",
Heimdall's prose said "the promise stays open until I've read it", and the
Interpreter closed it as released).
- The Interpreter's frame: a release says she no longer owes it; patience ("no
  hurry", "whenever you've read it is fine") leaves the promise open.
- A release proposal also quotes `thought`, a passage of her prose this turn,
  and says `still_stands` when that prose holds the promise as still standing.
  The applier refuses a release with no located passage (release_unquoted) and
  one her prose contradicts (release_contradicted); the latter is told to her
  as still open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-21 19:03:22 +01:00
commit d6f172f5c5
5 changed files with 54 additions and 8 deletions

View file

@ -74,7 +74,18 @@ pub(crate) enum Proposal {
needs: Option<String>,
evidence: Evidence,
},
PromiseClose { promise: String, how: How, evidence: Evidence },
/// A release also cites `thought`, a passage of her prose this turn that takes the release up, and says whether that
/// prose holds the promise as still standing (`still_stands`, Soul's R9): a release her own prose contradicts is
/// refused.
PromiseClose {
promise: String,
how: How,
evidence: Evidence,
#[serde(default, skip_serializing_if = "Option::is_none")]
thought: Option<String>,
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
still_stands: bool,
},
}
/// Why the commit applied nothing of a proposal: what the outcome and the report say.
@ -112,6 +123,10 @@ pub(crate) enum Refusal {
ReleaseNotByPromisee,
/// A release cited to a line said before she made the promise.
ReleaseBeforePromise,
/// A release that cites no passage of her prose this turn (Soul's R9).
ReleaseUnquoted,
/// A release her own prose contradicts: it says the promise still stands (Soul's R9).
ReleaseContradicted,
/// A reaffirmation naming a promise to someone else.
ReaffirmsAnother,
/// A reaffirmation naming a promise that is no longer open or blocked.
@ -349,7 +364,7 @@ fn apply_one(state: &mut Value, proposal: &Proposal, record: &Value, prose: &str
applied.opened.push(entry);
Ok(())
}
(Proposal::PromiseClose { promise, how, .. }, resolved) => {
(Proposal::PromiseClose { promise, how, thought, still_stands, .. }, resolved) => {
let listed = record["interpreter"]["promises"].as_array().into_iter().flatten().find(|shown| shown["id"].as_str() == Some(promise.trim())).ok_or(Refusal::NoSuchPromise)?;
let entries = state["commitments"].as_array_mut().expect("commitments is an array");
let entry = entries.iter_mut().find(|entry| entry["id"] == listed["entry"]).ok_or(Refusal::OutsidePutRemovedTarget)?;
@ -384,6 +399,15 @@ fn apply_one(state: &mut Value, proposal: &Proposal, record: &Value, prose: &str
if made.is_none_or(|made| at_ms <= made) {
return Err(Refusal::ReleaseBeforePromise);
}
// Her own prose this turn is the evidence it is a release (Soul's R9): a passage of it, and one that
// does not hold the promise as still standing. Patience is not a release.
let cited = thought.as_ref().is_some_and(|thought| resolve(&Evidence::Prose(thought.clone()), record, prose).is_ok());
if !cited {
return Err(Refusal::ReleaseUnquoted);
}
if *still_stands {
return Err(Refusal::ReleaseContradicted);
}
// The person's words are not copied into her state: the event points to them.
("released", json!(event), Value::Null, json!(who))
}

View file

@ -40,7 +40,8 @@ fn open(doable: bool) -> Value {
}
fn close(how: How, evidence: Evidence) -> Value {
json!(Proposal::PromiseClose { promise: "c1".into(), how, evidence })
let thought = (how == How::Released).then(|| "She can't, not from here".to_owned());
json!(Proposal::PromiseClose { promise: "c1".into(), how, evidence, thought, still_stands: false })
}
/// Her state holding one entry, as the commit opened it.
@ -287,3 +288,22 @@ fn k28_a_promise_whose_read_finds_nothing_is_blocked_citing_the_read() {
assert_eq!(with_read(true, "GameCult/Bifrost#89").0["commitments"][0]["status"], "open", "found: telling is the kept act");
assert_eq!(with_read(false, "GameCult/Lodur#3").0["commitments"][0]["status"], "open", "another repo's failure blocks nothing");
}
/// Soul's R9 (F.2 r6): Kiko said "Whenever you've read it is fine" and Heimdall's prose said the promise stays open until
/// he has read it; the release is refused as contradicted. A release with no passage of her prose is refused too.
#[test]
fn r9_a_release_her_own_prose_contradicts_is_refused() {
let prose = "Kiko is patient about it, and the promise stays open until I've read it. <typed>Thanks, Kiko.</typed>";
let release = |thought: Option<&str>, still_stands: bool| {
let proposal = json!(Proposal::PromiseClose { promise: "c1".into(), how: How::Released, evidence: Evidence::Heard("q2".into()), thought: thought.map(str::to_owned), still_stands });
let mut to_kiko = holding("open");
to_kiko["commitments"][0]["to"] = json!(KIKO);
let listed = listing(&to_kiko);
apply(&to_kiko, &record(json!([proposal]), listed, true), prose, "r6-t1", now())
};
let (state, applied) = release(Some("the promise stays open until I've read it"), true);
assert_eq!((state["commitments"][0]["status"].as_str(), reasons(&applied)), (Some("open"), vec![json!("release_contradicted")]), "{applied:?}");
assert_eq!(reasons(&release(None, false).1), vec![json!("release_unquoted")]);
assert_eq!(reasons(&release(Some("words she never thought at all"), false).1), vec![json!("release_unquoted")]);
assert_eq!(release(Some("Kiko is patient about it"), false).0["commitments"][0]["status"], "released");
}

View file

@ -71,7 +71,7 @@ pub(crate) const SPEECH_OPENING: &str = "You decide what one person says aloud i
/// The speech contract, sent as the schema turn's output schema (`--json-schema`): the drafts she sends now by number,
/// and the gaps. The model writes no words of hers.
pub(crate) const SPEECH_SCHEMA: &str = r#"{"type":"object","additionalProperties":false,"required":["say","gaps","amend","suggest","state","read"],"properties":{"read":{"type":["object","null"],"additionalProperties":false,"required":["kind","target","quote"],"properties":{"kind":{"type":"string","enum":["domain","mind","repo","web"]},"target":{"type":"string"},"quote":{"type":"string"}}},"state":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","promise","how","evidence"],"properties":{"kind":{"type":"string","enum":["promise_close"]},"promise":{"type":"string"},"how":{"type":"string","enum":["kept","withdrawn","released"]},"evidence":{"type":"object","additionalProperties":false,"required":["draft","line","read"],"properties":{"draft":{"type":["integer","null"]},"line":{"type":["string","null"]},"read":{"type":["integer","null"]}}}}}},"suggest":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","draft","about","private"],"properties":{"kind":{"type":"string","enum":["feedback","idea"]},"draft":{"type":"integer","minimum":1},"about":{"type":["string","null"]},"private":{"type":"boolean"}}}},"amend":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["target","draft","promises"],"properties":{"target":{"type":"string"},"draft":{"type":"integer","minimum":1},"promises":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["words","to","doable","reaffirms","needs"],"properties":{"words":{"type":"string"},"to":{"type":["string","null"]},"doable":{"type":"boolean"},"reaffirms":{"type":["string","null"]},"needs":{"type":["string","null"]}}}}}}},"say":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["draft","mentions","in_reply_to","promises"],"properties":{"draft":{"type":"integer","minimum":1},"mentions":{"type":"array","items":{"type":"string"}},"in_reply_to":{"type":["string","null"]},"promises":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["words","to","doable","reaffirms","needs"],"properties":{"words":{"type":"string"},"to":{"type":["string","null"]},"doable":{"type":"boolean"},"reaffirms":{"type":["string","null"]},"needs":{"type":["string","null"]}}}}}}},"gaps":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","draft","quote","detail"],"properties":{"kind":{"type":"string","enum":["conditional","addressee","elsewhere","missing_affordance","unwritten"]},"draft":{"type":["integer","null"]},"quote":{"type":["string","null"]},"detail":{"type":"string"}}}}}}"#;
pub(crate) const SPEECH_SCHEMA: &str = r#"{"type":"object","additionalProperties":false,"required":["say","gaps","amend","suggest","state","read"],"properties":{"read":{"type":["object","null"],"additionalProperties":false,"required":["kind","target","quote"],"properties":{"kind":{"type":"string","enum":["domain","mind","repo","web"]},"target":{"type":"string"},"quote":{"type":"string"}}},"state":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","promise","how","evidence","thought","still_stands"],"properties":{"kind":{"type":"string","enum":["promise_close"]},"promise":{"type":"string"},"how":{"type":"string","enum":["kept","withdrawn","released"]},"evidence":{"type":"object","additionalProperties":false,"required":["draft","line","read"],"properties":{"draft":{"type":["integer","null"]},"line":{"type":["string","null"]},"read":{"type":["integer","null"]}}},"thought":{"type":["string","null"]},"still_stands":{"type":"boolean"}}}},"suggest":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","draft","about","private"],"properties":{"kind":{"type":"string","enum":["feedback","idea"]},"draft":{"type":"integer","minimum":1},"about":{"type":["string","null"]},"private":{"type":"boolean"}}}},"amend":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["target","draft","promises"],"properties":{"target":{"type":"string"},"draft":{"type":"integer","minimum":1},"promises":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["words","to","doable","reaffirms","needs"],"properties":{"words":{"type":"string"},"to":{"type":["string","null"]},"doable":{"type":"boolean"},"reaffirms":{"type":["string","null"]},"needs":{"type":["string","null"]}}}}}}},"say":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["draft","mentions","in_reply_to","promises"],"properties":{"draft":{"type":"integer","minimum":1},"mentions":{"type":"array","items":{"type":"string"}},"in_reply_to":{"type":["string","null"]},"promises":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["words","to","doable","reaffirms","needs"],"properties":{"words":{"type":"string"},"to":{"type":["string","null"]},"doable":{"type":"boolean"},"reaffirms":{"type":["string","null"]},"needs":{"type":["string","null"]}}}}}}},"gaps":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","draft","quote","detail"],"properties":{"kind":{"type":"string","enum":["conditional","addressee","elsewhere","missing_affordance","unwritten"]},"draft":{"type":["integer","null"]},"quote":{"type":["string","null"]},"detail":{"type":"string"}}}}}}"#;
/// The speech frame before the guidance: what to decide, from what, and the attribution rule. Code, not tuning (map
/// 16.7), in her own pronouns (16.19.7). The tuning's `interpreter.guidance` (what counts as her choosing to send it
@ -91,7 +91,7 @@ fn speech_frame_tail(her: Forms) -> String {
format!(
"{cap_subj} speak{s} only in this room. What {subj} know{s} privately is listed below as private: {subj} say{s} none of it here, and nothing that gives it away. A private matter may be said plainly only to the person it concerns, in a direct message with exactly that person; nothing listed is that here. Whether a draft fits who is listening is yours to judge.
Answer with the speech contract's object. `say` lists the drafts {subj} send{s} now, each by its number, with the Matrix ids of anyone listed whom {subj} address{es} directly (`mentions`), the id of the line listed below that {subj} answer{s} or pass{es} on (`in_reply_to`, or null: the room shows that line, with who said it, above {poss} own words), and what the draft promises (`promises`, a list, empty when it promises nothing): for each act it promises, its words, copied exactly, the Matrix id of the person listed to whom {subj} promise{s} it (`to`, null when {subj} promise{s} it to the room), whether {subj} can do it (`doable`), and, when it promises again one of {poss} open promises listed below to the same person, that promise's id (`reaffirms`, else null): a promise said again is the same promise, never a new one; and when it promises to read something and tell someone, what {subj} must read, as a read's target (`needs`, else null). A promise is doable only when what {subj} can do here, listed below, carries it out, now or later, with no tool {subj} lack{s}: a promise to paste, quote or send something {subj} {has} not read is not doable while {subj} {has} no way to read it. `gaps` records what {subj} meant and did not send. `amend` adds to one of {poss} own lines listed below, at most one a turn, only when {poss} thought shows {obj} choosing to correct or add to that line: name the line by its id, the draft that is {poss} addition, and what it promises, as a line's `promises`. The line stays as it was and the draft is added after it; {subj} never take{s} a word back. `suggest` leaves Self one note, at most one a turn, only when {poss} thought shows {obj} choosing to: name the draft that is the note, its kind (feedback when {subj} pass{es} on what someone listed said, with that person's Matrix id in `about`; idea when it is {poss} own, `about` null), and set `private` when it carries anything listed as private or gives it away; such a note is not left. `state` closes {poss} open promises listed below, each by its id: kept, citing the draft by which {subj} {does} it (`evidence.draft`) or the read by which {subj} did it this moment (`evidence.read`, its number); withdrawn, citing the draft in which {subj} take{s} it back to the person {subj} promised, or tell{s} them {subj} cannot do it; released, citing the id of the line listed below that {subj} may reply to in which the person {subj} promised lets {obj} off it (`evidence.line`). A draft cited closes the promise only when it goes out this turn where the person {subj} promised can read it, in the room where {subj} made the promise or in a direct message with them, and a thought alone closes nothing. A promise {subj} {has} no way to do is never kept by {obj}: telling the person {subj} promised that {subj} cannot do it withdraws it, and that person can release it.
Answer with the speech contract's object. `say` lists the drafts {subj} send{s} now, each by its number, with the Matrix ids of anyone listed whom {subj} address{es} directly (`mentions`), the id of the line listed below that {subj} answer{s} or pass{es} on (`in_reply_to`, or null: the room shows that line, with who said it, above {poss} own words), and what the draft promises (`promises`, a list, empty when it promises nothing): for each act it promises, its words, copied exactly, the Matrix id of the person listed to whom {subj} promise{s} it (`to`, null when {subj} promise{s} it to the room), whether {subj} can do it (`doable`), and, when it promises again one of {poss} open promises listed below to the same person, that promise's id (`reaffirms`, else null): a promise said again is the same promise, never a new one; and when it promises to read something and tell someone, what {subj} must read, as a read's target (`needs`, else null). A promise is doable only when what {subj} can do here, listed below, carries it out, now or later, with no tool {subj} lack{s}: a promise to paste, quote or send something {subj} {has} not read is not doable while {subj} {has} no way to read it. `gaps` records what {subj} meant and did not send. `amend` adds to one of {poss} own lines listed below, at most one a turn, only when {poss} thought shows {obj} choosing to correct or add to that line: name the line by its id, the draft that is {poss} addition, and what it promises, as a line's `promises`. The line stays as it was and the draft is added after it; {subj} never take{s} a word back. `suggest` leaves Self one note, at most one a turn, only when {poss} thought shows {obj} choosing to: name the draft that is the note, its kind (feedback when {subj} pass{es} on what someone listed said, with that person's Matrix id in `about`; idea when it is {poss} own, `about` null), and set `private` when it carries anything listed as private or gives it away; such a note is not left. `state` closes {poss} open promises listed below, each by its id: kept, citing the draft by which {subj} {does} it (`evidence.draft`) or the read by which {subj} did it this moment (`evidence.read`, its number); withdrawn, citing the draft in which {subj} take{s} it back to the person {subj} promised, or tell{s} them {subj} cannot do it; released, citing the id of the line listed below that {subj} may reply to in which the person {subj} promised lets {obj} off it (`evidence.line`). A release says {subj} no longer owe{s} it; patience is not a release, so \"no hurry\" or \"whenever you've read it is fine\" leaves the promise open. A release also quotes in `thought` the words of {poss} prose here that take it up, copied exactly, and `still_stands` is true when that prose holds the promise as still standing (\"the promise stays open until I've read it\"): then it is not released. For kept and withdrawn, `thought` is null and `still_stands` false. A draft cited closes the promise only when it goes out this turn where the person {subj} promised can read it, in the room where {subj} made the promise or in a direct message with them, and a thought alone closes nothing. A promise {subj} {has} no way to do is never kept by {obj}: telling the person {subj} promised that {subj} cannot do it withdraws it, and that person can release it.
A draft is said whole or not at all, and only once. At most two drafts a turn. Record a gap instead of guessing: conditional when {subj} {has} drafted something {subj} might say but {has} not chosen to, addressee when {subj} mean{s} to send a draft but whom to is unclear, elsewhere when {subj} mean{s} a draft for another room or another time; for these three, name the draft by number. missing_affordance when {subj} mean{s} to do something, now or later, that {poss} body cannot do (what {subj} can do here is listed below), whether {subj} said so in a draft or only thought it; name the draft when there is one. unwritten when {subj} mean{s} to say something now and wrote no draft of it. Holding back is no gap: when {poss} thought shows {obj} choosing to wait, to let something stand, to leave it for later or to say nothing, record nothing for it. Every other intent of {poss} that is not carried out has a kind: an intent to act is missing_affordance, an intent to say now with no draft is unwritten. When a gap names no draft, quote the words of {poss} thought that show it, at least four words, copied exactly.",
es = if s.is_empty() { "" } else { "es" },
@ -883,7 +883,8 @@ fn close_of(raw: &Value) -> Option<Proposal> {
(None, None, Some(k)) => Evidence::Read(usize::try_from(k).ok()?),
_ => return None,
};
Some(Proposal::PromiseClose { promise, how, evidence })
let thought = raw["thought"].as_str().map(str::trim).filter(|thought| !thought.is_empty()).map(str::to_owned);
Some(Proposal::PromiseClose { promise, how, evidence, thought, still_stands: raw["still_stands"] == true })
}
/// Her words compared as a promise is found in a draft: case-blind, and a curly apostrophe or single quote read as a

View file

@ -272,7 +272,7 @@ pub(crate) fn outcome_of(record: &Value) -> Option<Outcome> {
for refused in record["committed"]["refused"].as_array().into_iter().flatten() {
let listed = decision["promises"].as_array().into_iter().flatten().find(|listed| listed["id"] == refused["proposal"]["promise"]);
match (serde_json::from_value::<StateRefusal>(refused["reason"].clone()), listed) {
(Ok(reason @ (StateRefusal::DraftNotSent | StateRefusal::BlockedNotKeepable | StateRefusal::ReleaseNotByPromisee | StateRefusal::ReleaseBeforePromise | StateRefusal::NotWherePromised | StateRefusal::OutsidePutChanged)), Some(listed)) if refused["proposal"]["kind"] == "promise_close" => {
(Ok(reason @ (StateRefusal::DraftNotSent | StateRefusal::BlockedNotKeepable | StateRefusal::ReleaseNotByPromisee | StateRefusal::ReleaseBeforePromise | StateRefusal::ReleaseContradicted | StateRefusal::NotWherePromised | StateRefusal::OutsidePutChanged)), Some(listed)) if refused["proposal"]["kind"] == "promise_close" => {
outcome.parts.push(Part::StillOpen { reason, to: listed["to_name"].as_str().unwrap_or("the room").to_owned(), words: listed["words"].as_str().unwrap_or_default().to_owned() });
}
_ => outcome.omitted.push(format!("a state change the commit refused that she is not told ({}): {}", refused["reason"], refused["proposal"])),
@ -392,6 +392,7 @@ impl Part {
Self::StillOpen { reason: StateRefusal::BlockedNotKeepable, .. } => format!(" {subj} {has} no way to do it, so it was not kept."),
Self::StillOpen { reason: StateRefusal::ReleaseNotByPromisee, .. } => format!(" the line read as letting {obj} off it was not from the person {subj} promised."),
Self::StillOpen { reason: StateRefusal::ReleaseBeforePromise, .. } => format!(" the line read as letting {obj} off it came before {subj} made it."),
Self::StillOpen { reason: StateRefusal::ReleaseContradicted, .. } => format!(" {poss} own thought held it as still standing, so it was not released."),
Self::StillOpen { reason: StateRefusal::NotWherePromised, .. } => format!(" what {subj} said to close it was not where the person {subj} promised could read it."),
Self::StillOpen { .. } => format!(" it was changed outside {poss} turn, and stands as it was changed."),
Self::BrokeAfter { .. } => format!(" the rest of that turn broke off, not by {poss} choice."),

View file

@ -619,7 +619,7 @@ fn k22_a_promise_persists_across_silent_turns_until_the_person_releases_it() {
let release = prompt.lines().find(|line| line.starts_with("- q") && line.contains("never mind the render")).and_then(|line| line[2..].split_whitespace().next());
let promise = prompt.lines().find(|line| line.starts_with("- c1 ")).map(|_| "c1");
match (release, promise) {
(Some(line), Some(promise)) => json!({ "say": [], "gaps": [], "state": [{ "kind": "promise_close", "promise": promise, "how": "released", "evidence": { "draft": null, "line": line } }] }).to_string(),
(Some(line), Some(promise)) => json!({ "say": [], "gaps": [], "state": [{ "kind": "promise_close", "promise": promise, "how": "released", "evidence": { "draft": null, "line": line }, "thought": "He lets it be", "still_stands": false }] }).to_string(),
_ => json!({ "say": [], "gaps": [] }).to_string(),
}
});