Let the seed author meaning: persona material, commitment statements, presence

Plan step 12. PersonaMaterial is the ontology's thirteenth row, built:
values, voice, memories, and reads keyed by subject, set whole by
set_persona_material, refused for padded text or a doubled read, no-op when
identical, outside every scope digest. A commitment carries a statement of
what is promised, required at authoring; an affordance-made promise states
the action it came through. The Projector context carries material by label,
each promise's statement, and who else stands in the same place; the
Persona's identity is label, voice, and values. Schemas move to consumer.v3.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-11 02:12:13 +02:00
commit c31f25415a
11 changed files with 484 additions and 27 deletions

View file

@ -866,6 +866,11 @@ fn lower(
due: now.checked_add(*horizon).ok_or_else(malformed)?,
period: *period,
checks: Vec::new(),
// The world named the action; that name is what was promised.
// A proposer cannot supply the text, so it cannot promise more
// than the affordance carries.
statement: patch::Statement::new(format!("a promise made through {}", entry.kind.0))
.ok_or_else(malformed)?,
},
ComponentOpKind::AdvancePressure { by } => patch::ComponentOp::AdvancePressure {
source: patch::PressureSourceRef::Subject(patch::Ref::Existing(actor)),

View file

@ -555,6 +555,7 @@ mod tests {
due: FictionalMinutes(600),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
// A second unlitigable promise, this one held by an ordinary
// Ghostlight subject: the foreign boundary a consumer may not
@ -566,6 +567,7 @@ mod tests {
due: FictionalMinutes(600),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
],
evidence: vec![EvidenceRef::new(MIRROR_EVIDENCE)],
@ -2228,7 +2230,7 @@ mod tests {
assert!(super::super::journal::verify_state_shape(&previous).is_err());
assert_eq!(
super::super::STATE_SCHEMA,
"ghostlight.world_state.consumer.v2"
"ghostlight.world_state.consumer.v3"
);
}

View file

@ -2716,7 +2716,7 @@ impl ControllerRunner {
ControllerWorkLookup::Missing => {}
}
let selected = self.select(opportunity).await?;
let identity = selected.subject.label.clone();
let identity = selected.persona_identity();
let typed_view = selected.typed_view()?;
let projector_context = selected.projector_context()?;
let visible_stimulus = selected.visible_stimulus()?;
@ -4047,6 +4047,8 @@ impl SelectedDecision {
},
"now": self.snapshot.now,
"permission": catalog_permissions(&self.granted),
"present": self.present_labels(),
"material": self.projector_material(),
"routes": self.projector_routes(),
"holdings": self.projector_holdings(),
"dependencies": self.projector_dependencies(),
@ -4060,6 +4062,57 @@ impl SelectedDecision {
.map_err(|error| ControllerError::Serialization(error.to_string()))
}
/// Who else stands in this subject's own place, by label. The same reach
/// a speech audience is derived from, so a person sees the people in the
/// room it speaks into. Position elsewhere stays out: that is another
/// subject's state.
fn present_labels(&self) -> Vec<Value> {
let Some(here) = self.subject.position else {
return Vec::new();
};
self.snapshot
.subjects
.iter()
.filter(|other| other.id != self.subject.id && other.position == Some(here))
.map(|other| Value::String(other.label.clone()))
.collect()
}
/// The subject's own lived meaning, with reads resolved to labels: a read
/// is this subject's own component, so the party it names is bound to it.
fn projector_material(&self) -> Value {
match &self.subject.material {
None => Value::Null,
Some(material) => json!({
"values": material.values.iter().map(Statement::as_str).collect::<Vec<_>>(),
"voice": material.voice.as_str(),
"memories": material.memories.iter().map(Statement::as_str).collect::<Vec<_>>(),
"reads": material
.reads
.iter()
.map(|(other, read)| json!({"of": self.subject_label(*other), "read": read.as_str()}))
.collect::<Vec<_>>(),
}),
}
}
/// "Who you are", for the Persona: the label, then the voice and values
/// the seed authored, as prose. With no material it is the label alone,
/// and the prompt says to invent nothing beyond it.
fn persona_identity(&self) -> String {
let mut identity = self.subject.label.clone();
if let Some(material) = &self.subject.material {
identity.push_str(&format!("\nHow you speak: {}", material.voice.as_str()));
if !material.values.is_empty() {
identity.push_str("\nWhat you hold to:");
for value in &material.values {
identity.push_str(&format!("\n- {}", value.as_str()));
}
}
}
identity
}
fn place_label(&self, place: Option<EntityId>) -> Value {
place
.and_then(|id| self.snapshot.places.iter().find(|candidate| candidate.id == id))
@ -4189,6 +4242,7 @@ impl SelectedDecision {
// money on the road, and 20160 as "fourteen days" only by luck.
json!({
"kind": commitment.kind,
"promise": commitment.statement.as_str(),
"counterparty": commitment.counterparty.map_or(Value::Null, |id| self.subject_label(id)),
"due_in_minutes": commitment.due.0.saturating_sub(self.snapshot.now.0),
"period_minutes": commitment.period,
@ -4274,6 +4328,7 @@ impl SelectedDecision {
"now": self.snapshot.now,
"commitments": self.typed_commitments(),
"pressures": self.typed_pressures(),
"material": self.subject.material,
}))
.map_err(|error| ControllerError::Serialization(error.to_string()))
}
@ -4288,6 +4343,7 @@ impl SelectedDecision {
json!({
"key": commitment.key,
"kind": commitment.kind,
"statement": commitment.statement.as_str(),
"counterparty": commitment.counterparty,
"due": commitment.due,
"period": commitment.period,
@ -6431,6 +6487,7 @@ mod tests {
commitments: Vec::new(),
pressures: Vec::new(),
qualified: false,
material: None,
};
let speaker = SubjectSnapshot {
id: speaker_id,
@ -6456,6 +6513,7 @@ mod tests {
commitments: Vec::new(),
pressures: Vec::new(),
qualified: false,
material: None,
};
let snapshot = WorldSnapshot {
world_id: opportunity.world_id,
@ -6668,6 +6726,7 @@ mod tests {
commitments: Vec::new(),
pressures: Vec::new(),
qualified: false,
material: None,
};
let other = SubjectSnapshot {
id: other_id,
@ -6689,6 +6748,7 @@ mod tests {
commitments: Vec::new(),
pressures: Vec::new(),
qualified: false,
material: None,
};
let named_place = |id, label: &str| PlaceSnapshot {
id,
@ -7129,6 +7189,7 @@ mod tests {
commitments,
pressures,
qualified: true,
material: None,
};
let actor = subject(
actor_id,
@ -7145,6 +7206,7 @@ mod tests {
counterparty: Some(creditor_id),
due: FictionalMinutes(120),
period: None,
statement: Statement::new("Water for the gate road, carried by hand.").unwrap(),
past_due: false,
}],
vec![PressureSnapshot {
@ -7155,10 +7217,21 @@ mod tests {
magnitude: PressureMagnitude(3),
}],
);
let mut actor = actor;
actor.material = Some(crate::world::PersonaMaterial {
values: vec![Statement::new("A debt paid late is paid twice.").unwrap()],
voice: Statement::new("Short sentences, never a wasted one.").unwrap(),
memories: vec![Statement::new("The gate froze the winter the ferry sank.").unwrap()],
reads: BTreeMap::from([(
creditor_id,
Statement::new("Counts every jar twice.").unwrap(),
)]),
});
// The creditor stands in the same place; the bystander does not.
let creditor = subject(
creditor_id,
"Old Hesk the gatekeeper",
Some(gate_road),
Some(cistern),
fixture_components(),
Vec::new(),
Vec::new(),
@ -7243,15 +7316,26 @@ mod tests {
"\"quantity\": 12",
"\"kind\": \"obligation\"",
"Old Hesk the gatekeeper",
"\"promise\": \"Water for the gate road, carried by hand.\"",
"\"due_in_minutes\": 60",
"own promise past due",
"\"magnitude\": 3",
"\"voice\": \"Short sentences, never a wasted one.\"",
"A debt paid late is paid twice.",
"The gate froze the winter the ferry sank.",
"\"read\": \"Counts every jar twice.\"",
] {
assert!(
context.contains(expected),
"the Projector was not shown {expected}\n{context}"
);
}
let present = serde_json::from_str::<Value>(&context).unwrap()["present"].clone();
assert_eq!(present, json!(["Old Hesk the gatekeeper"]), "{context}");
let identity = selected.persona_identity();
assert!(identity.starts_with("Tamsin Oru\nHow you speak: Short sentences"));
assert!(identity.contains("- A debt paid late is paid twice."));
assert!(!identity.contains("Counts every jar twice."), "reads are not identity");
for forbidden in [
encoded_id(&actor_id).unwrap(),
encoded_id(&creditor_id).unwrap(),
@ -10498,6 +10582,7 @@ mod tests {
"due": 600,
"period": null,
"checks": [],
"statement": "Keep the cistern gate turning through the dry season.",
}),
));
// Everyone after the first owes the first something. That is what
@ -10515,6 +10600,7 @@ mod tests {
"due": 900,
"period": null,
"checks": [],
"statement": "Two jars of cistern water, carried up before the gate closes.",
}),
));
}
@ -11437,6 +11523,7 @@ mod tests {
"due": 600,
"period": null,
"checks": [],
"statement": "Keep the cistern gate turning through the dry season.",
}),
),
("submit", json!({})),
@ -11526,6 +11613,7 @@ mod tests {
due: crate::world::FictionalMinutes(600),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}],
evidence: Vec::new(),
},
@ -12011,6 +12099,7 @@ mod tests {
"due": 600,
"period": null,
"checks": [],
"statement": "Keep the cistern gate turning through the dry season.",
}),
));
}
@ -12186,6 +12275,7 @@ mod tests {
due: crate::world::FictionalMinutes(600),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
],
evidence: Vec::new(),
@ -13452,6 +13542,7 @@ mod tests {
due: crate::world::FictionalMinutes(900),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}]),
)
.await;

View file

@ -1279,7 +1279,7 @@ const SEED_NAMESPACE: &str = "ghostlight.command.seed.v1";
/// seeded out of goals alone therefore activates with nothing for the Active
/// elaborator to answer, so this instruction requires an obligation, not a
/// goal alone, from every subject it authors.
const SEED_INSTRUCTIONS: &str = "Use only the supplied tools to author living structure inside your jurisdiction. A subject counts only when it has a controller, at least one affordance grant, and holds a goal commitment. A goal alone is not enough structure: every person and institution you author must also hold at least one obligation commitment with a counterparty, because a goal carries no counterparty and derives no boundary for the world's Active elaborator to answer. Author the shortfall you were given in as few responses as you can, making several tool calls per response, and finish with submit_patch as your last call; a session that ends without it keeps only what was authored. Recording a gap changes nothing.";
const SEED_INSTRUCTIONS: &str = "Use only the supplied tools to author living structure inside your jurisdiction. A subject counts only when it has a controller, at least one affordance grant, and holds a goal commitment. A goal alone is not enough structure: every person and institution you author must also hold at least one obligation commitment with a counterparty, because a goal carries no counterparty and derives no boundary for the world's Active elaborator to answer. Author the shortfall you were given in as few responses as you can, making several tool calls per response, and finish with submit_patch as your last call; a session that ends without it keeps only what was authored. Recording a gap changes nothing. Every promise carries a statement of what is promised; both parties will read it. Give every person material with set_persona_material: how they speak, what they hold to, what they remember, and how they read each subject they are bound to. A person with no material has no rendered inner life and will say nothing.";
/// The row a session answers, plus the ancestry it was built against. There is
/// no `PatchAnswer` here: a seed answers nothing, and giving this session an
@ -1896,7 +1896,7 @@ fn build_seed_prompt(
}
prompt.push_str(&render_clock(snapshot));
prompt.push_str(
"\nA subject qualifies only when it has a controller, at least one affordance grant, and holds a goal commitment. Declare people, institutions, and populations who want something; give each a controller, grants, a position, and a goal. Give them the rest of a life: routines and obligations that recur, counterparties, channels they speak on and who controls them, authority and the offices that lend it, holdings and the dependencies those holdings serve, routes between the places they move through. A subject with no counterparty who can command or litigate its goal leaves a boundary for the elaborator; that is allowed and expected, not an error.\nYou may not declare a human-controlled subject: only the world's first person is human, and that was genesis.\n\n",
"\nA subject qualifies only when it has a controller, at least one affordance grant, and holds a goal commitment. Declare people, institutions, and populations who want something; give each a controller, grants, a position, and a goal. Give them the rest of a life: routines and obligations that recur, counterparties, channels they speak on and who controls them, authority and the offices that lend it, holdings and the dependencies those holdings serve, routes between the places they move through. A subject with no counterparty who can command or litigate its goal leaves a boundary for the elaborator; that is allowed and expected, not an error.\nEvery promise states what is promised, in the promisor's own words. Every person carries material (set_persona_material): a voice, two or three values, a few memories, and a read of each counterparty, all distinct from every other person's; without it the person has no inner life to speak from.\nYou may not declare a human-controlled subject: only the world's first person is human, and that was genesis.\n\n",
);
prompt.push_str(&render_world_structure(snapshot));
prompt.push('\n');

View file

@ -2371,6 +2371,7 @@ mod custody_tests {
due: FictionalMinutes(10),
period: Some(TickMinutes::new(10).unwrap()),
checks: Vec::new(),
statement: crate::world::Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
ComponentOp::CreateCommitment {
subject: Ref::Existing(subject),
@ -2379,6 +2380,7 @@ mod custody_tests {
due: FictionalMinutes(20),
period: None,
checks: Vec::new(),
statement: crate::world::Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
]),
),

View file

@ -41,6 +41,7 @@ pub(crate) use mailbox::{
pub(crate) use patch::{
AccessKind, Affordance, AffordanceKindName, Audience, AuthoredSource, AuthorityGrant,
AuthorityKindName, AuthorityTarget, BoundPrecondition, Bounds, ChannelRecord, Commitment,
PersonaMaterial,
CommitmentKey, CommitmentKind, ComponentOpKind, Confidence, Cost, Declaration,
DependencyTarget, DraftHandle, EffectSlot, EntityDeclaration, EntityKind, EvidenceRef,
FactRecord, FactStanding, Forum, GrievanceKindName, JurisdictionKey, Knowledge,
@ -80,8 +81,8 @@ use std::path::Path;
use thiserror::Error;
use uuid::Uuid;
pub(crate) const STATE_SCHEMA: &str = "ghostlight.world_state.consumer.v2";
pub(crate) const COMMIT_SCHEMA: &str = "ghostlight.world_commit.consumer.v2";
pub(crate) const STATE_SCHEMA: &str = "ghostlight.world_state.consumer.v3";
pub(crate) const COMMIT_SCHEMA: &str = "ghostlight.world_commit.consumer.v3";
/// Compatibility tag derived from [`STATE_SCHEMA`]: the trailing
/// `<family>-<version>` pair (e.g. `foundation-v1`). Callers that publish a
@ -743,6 +744,9 @@ struct WorldState {
redress: BTreeMap<GrievanceKindName, Forum>,
/// What each subject has promised. Never empty for a present key.
commitments: BTreeMap<SubjectId, BTreeMap<CommitmentKey, Commitment>>,
/// Lived meaning per subject. Read by projection and by nothing that
/// decides, so it enters `state_digest` and no `ScopePreimage`.
persona_material: BTreeMap<SubjectId, PersonaMaterial>,
/// Pressure *on* each subject, keyed target-major then source. Never empty
/// for a present key; no stored zero magnitude.
pressures: BTreeMap<SubjectId, BTreeMap<PressureSource, PressureMagnitude>>,
@ -892,6 +896,8 @@ pub(crate) struct SubjectSnapshot {
/// subject's state, and the actor already sees the commitment that produced
/// it.
pub(crate) pressures: Vec<PressureSnapshot>,
/// What the subject carries as lived meaning, if anything was authored.
pub(crate) material: Option<PersonaMaterial>,
/// A projection of `qualifies`, not a stored flag and not a second count:
/// whether this subject already reduces its jurisdiction's scale deficit.
/// The seed brief needs to say which subjects count; recomputing the
@ -906,6 +912,7 @@ pub(crate) struct CommitmentSnapshot {
pub(crate) counterparty: Option<SubjectId>,
pub(crate) due: FictionalMinutes,
pub(crate) period: Option<TickMinutes>,
pub(crate) statement: Statement,
/// Derived in `snapshot` so a controller does not recompute it against a
/// clock it must be handed anyway.
pub(crate) past_due: bool,
@ -1664,6 +1671,7 @@ impl WorldState {
selection: BTreeMap::new(),
redress: BTreeMap::new(),
commitments: BTreeMap::new(),
persona_material: BTreeMap::new(),
pressures: BTreeMap::new(),
last_opportunity_at: BTreeMap::new(),
now: FictionalMinutes::default(),
@ -2593,6 +2601,22 @@ fn apply_operation(
);
}
}
ResolvedOp::SetPersonaMaterial { subject, material } => {
if !state.subjects.contains_key(subject)
|| material
.reads
.keys()
.any(|other| !state.subjects.contains_key(other))
{
return Err(unknown());
}
if state.persona_material.get(subject) == Some(material) {
return Err(KernelError::Invariant(
"persona material changes nothing".into(),
));
}
state.persona_material.insert(*subject, material.clone());
}
ResolvedOp::SetReach { channel, reach } => {
let current = state
.channels
@ -3480,10 +3504,12 @@ fn snapshot(state: &WorldState) -> Result<WorldSnapshot, KernelError> {
counterparty: commitment.counterparty,
due: commitment.due,
period: commitment.period,
statement: commitment.statement.clone(),
past_due: commitment.due <= state.now,
})
.collect(),
components,
material: state.persona_material.get(subject_id).cloned(),
pressures: state
.pressures
.get(subject_id)
@ -4434,6 +4460,13 @@ fn operation_ground(
// recipients here would be a second statement of the same rule,
// computed from state this function does not read.
ResolvedOp::Witness { place, .. } => (Vec::new(), places(vec![*place]), Vec::new()),
ResolvedOp::SetPersonaMaterial { subject, material } => (
std::iter::once(*subject)
.chain(material.reads.keys().copied())
.collect(),
Vec::new(),
Vec::new(),
),
ResolvedOp::SetReach { channel, reach } => {
let mut subjects = Vec::new();
let mut named = Vec::new();
@ -11688,6 +11721,119 @@ mod witness_tests {
);
}
/// Persona material is set whole, refused when any text is non-canonical
/// or a read names a subject twice, refused when identical to what the
/// subject holds, and outside the scope digest: setting it moves no
/// opportunity's binding.
#[test]
fn soul_persona_material_is_set_whole_and_outside_the_scope_digest() {
use crate::world::patch::PersonaReadRef;
let directory = tempfile::tempdir().unwrap();
let (mut kernel, world, active) = nesting_kernel(directory.path(), "Material");
let text = |value: &str| Statement::new(value).unwrap();
let material = |voice: Statement, reads: Vec<PersonaReadRef>| ComponentOp::SetPersonaMaterial {
subject: Ref::Existing(world.villager),
values: vec![text("Water is owed upward.")],
voice,
memories: vec![text("The gate froze the winter the ferry sank.")],
reads,
};
let read = |subject: SubjectId| PersonaReadRef {
subject: Ref::Existing(subject),
statement: text("Counts every jar twice."),
};
let digest_of = |snapshot: &WorldSnapshot| {
snapshot
.opportunities
.iter()
.find(|opportunity| opportunity.scope.subject_id == world.villager)
.map(|opportunity| opportunity.scope_digest.clone())
};
let before = digest_of(&active);
// Padded text is refused at resolve, as is a subject read twice.
let padded: Statement = serde_json::from_value(serde_json::json!(" padded ")).unwrap();
assert_eq!(
reject_owner(
&mut kernel,
&active,
operations(vec![material(padded, vec![read(world.neighbour)])]),
),
vec![Mismatch::NoncanonicalText { operation: 0 }]
);
assert_eq!(
reject_owner(
&mut kernel,
&active,
operations(vec![material(
text("Dry and exact."),
vec![read(world.neighbour), read(world.neighbour)],
)]),
),
vec![Mismatch::NoncanonicalText { operation: 0 }]
);
// A read of a subject the world does not hold is refused.
assert!(
!reject_owner(
&mut kernel,
&active,
operations(vec![material(
text("Dry and exact."),
vec![read(SubjectId::issue())],
)]),
)
.is_empty()
);
let receipt = submit_owner(
&mut kernel,
&active,
operations(vec![material(text("Dry and exact."), vec![read(world.neighbour)])]),
);
assert!(matches!(receipt, SubmitReceipt::Applied(_)), "{receipt:?}");
let held = kernel.snapshot().unwrap();
let villager = held
.subjects
.iter()
.find(|subject| subject.id == world.villager)
.unwrap();
let carried = villager.material.as_ref().expect("material was set");
assert_eq!(carried.voice.as_str(), "Dry and exact.");
assert_eq!(
carried.reads.get(&world.neighbour).map(Statement::as_str),
Some("Counts every jar twice.")
);
assert_eq!(digest_of(&held), before, "material moved a scope digest");
// Identical material changes nothing; different material replaces all.
assert_eq!(
reject_owner(
&mut kernel,
&held,
operations(vec![material(text("Dry and exact."), vec![read(world.neighbour)])]),
),
vec![Mismatch::NoOperationEffect { operation: 0 }]
);
let held = kernel.snapshot().unwrap();
submit_owner(
&mut kernel,
&held,
operations(vec![material(text("Slow and courteous."), Vec::new())]),
);
let replaced = kernel.snapshot().unwrap();
let carried = replaced
.subjects
.iter()
.find(|subject| subject.id == world.villager)
.unwrap()
.material
.clone()
.unwrap();
assert_eq!(carried.voice.as_str(), "Slow and courteous.");
assert!(carried.reads.is_empty(), "a whole-value set kept an old read");
}
/// What a witness hands the narrative lane's interruption renderer. The
/// renderer takes a subject's own `ScopeComponents` and its own knowledge
/// rows and nothing else, so both of its inputs are pinned here rather than
@ -11934,6 +12080,7 @@ mod clock_tests {
checks: vec![PreconditionRef::Present {
at: Ref::Draft(DraftHandle::new("yard")),
}],
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
ComponentOp::CreateCommitment {
subject: subject("farmer"),
@ -11942,6 +12089,7 @@ mod clock_tests {
due: FictionalMinutes(LATE_DUE),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
ComponentOp::CreateCommitment {
subject: subject("reeve"),
@ -11950,6 +12098,7 @@ mod clock_tests {
due: FictionalMinutes(LATE_DUE),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
},
ComponentOp::Bind {
subject: subject("reeve"),
@ -13027,6 +13176,7 @@ mod clock_tests {
due: FictionalMinutes(500),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}]),
);
let goal = *kernel.state.commitments[&counted]
@ -13101,6 +13251,7 @@ mod clock_tests {
due: FictionalMinutes(500),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
};
let subject_ids: Vec<SubjectId> =
active.subjects.iter().map(|subject| subject.id).collect();
@ -13232,6 +13383,7 @@ mod clock_tests {
due: FictionalMinutes(due),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
};
// One of the two goals is born past due.
@ -13274,6 +13426,7 @@ mod clock_tests {
due: FictionalMinutes(due),
period,
checks,
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}
};
@ -13508,6 +13661,7 @@ mod clock_tests {
due: FictionalMinutes(500),
period: Some(minutes(60)),
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}]),
);
let before = digests(&kernel);
@ -13820,6 +13974,7 @@ mod clock_tests {
due: FictionalMinutes(500),
period: None,
checks: Vec::new(),
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}]);
// The Active resolver is handed no intent, so the resolved patch cannot
// carry one.
@ -13922,6 +14077,7 @@ mod clock_tests {
checks: vec![PreconditionRef::Present {
at: Ref::Existing(clockwork.yard),
}],
statement: Statement::new("What was promised, as the promisor would say it.").unwrap(),
}]),
),
vec![Mismatch::ChecksOnNonRoutine { operation: 0 }]

View file

@ -350,6 +350,29 @@ pub(crate) struct ChannelRecord {
pub(crate) controller: Option<SubjectId>,
}
/// Lived meaning a subject carries: values, a voice, memories, and reads of
/// other subjects. It constrains no precondition, so it is outside every scope
/// digest and cannot interrupt a bound turn; it enriches projection and never
/// substitutes for authority, custody, topology, or knowledge. Set whole, so a
/// subject holds one value at one revision.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)]
pub(crate) struct PersonaMaterial {
pub(crate) values: Vec<Statement>,
pub(crate) voice: Statement,
pub(crate) memories: Vec<Statement>,
/// One read per subject, in canonical order.
pub(crate) reads: BTreeMap<SubjectId, Statement>,
}
/// The proposal-time twin of a read: the subject by reference.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)]
pub(crate) struct PersonaReadRef {
pub(crate) subject: Ref<SubjectId>,
pub(crate) statement: Statement,
}
/// A small closed ordinal. Ordered ascending by declaration order, so derived
/// `Ord` *is* the semantics and `Knows { at_least }` is one `>=`. Three levels:
/// two cannot express "I heard it but I doubt it", which is the state deception
@ -469,6 +492,9 @@ pub(crate) struct Commitment {
/// What must hold for a `Routine` to auto-fulfil. Role-free canonical
/// checks. Empty for `Obligation` and `Goal`.
pub(crate) checks: Vec<BoundPrecondition>,
/// What is promised, as the promisor would state it. Without it a promise
/// is a clock and a name, and on the road both parties invented the rest.
pub(crate) statement: Statement,
}
/// Nonzero by construction; saturating in both directions. A separate newtype
@ -1112,6 +1138,15 @@ pub(crate) enum ComponentOp {
channel: Ref<EntityId>,
controller: Option<Ref<SubjectId>>,
},
/// Sets, whole, what a subject carries as lived meaning. Identical material
/// is `NoOperationEffect`; any non-canonical text is `NoncanonicalText`.
SetPersonaMaterial {
subject: Ref<SubjectId>,
values: Vec<Statement>,
voice: Statement,
memories: Vec<Statement>,
reads: Vec<PersonaReadRef>,
},
/// Two identical creations are two commitments, not `NoOperationEffect`:
/// the key is command-derived so they cannot collide, and two promises of
/// the same thing to the same counterparty are two promises. This is where
@ -1124,6 +1159,7 @@ pub(crate) enum ComponentOp {
due: FictionalMinutes,
period: Option<TickMinutes>,
checks: Vec<PreconditionRef>,
statement: Statement,
},
/// Removes the commitment and every pressure row sourced by it. Fulfilment,
/// default, and release are one write: the kernel never learns who invoked
@ -1455,6 +1491,11 @@ pub(crate) enum Mismatch {
EmptyStatement {
handle: DraftHandle,
},
/// A commitment statement or a piece of persona material that is empty,
/// padded, or spans lines.
NoncanonicalText {
operation: usize,
},
/// `AcquireKnowledge { source: Evidenced }` over a `Claimed` fact.
EvidencedKnowledgeOfClaim {
operation: usize,
@ -1753,6 +1794,10 @@ pub(crate) enum ResolvedOp {
channel: EntityId,
controller: Option<SubjectId>,
},
SetPersonaMaterial {
subject: SubjectId,
material: PersonaMaterial,
},
/// Kernel-only: no [`ComponentOp`] twin, because no proposer may author one.
/// Synthesized by `action::exercise` for a speech-carrying invocation and by
/// nothing else. Inserts the entity row and the `facts` row; it writes no
@ -3385,7 +3430,13 @@ pub(super) fn resolve_patch(
due,
period,
checks,
statement,
} => {
if !is_canonical_text(statement.as_str()) {
mismatches.push(Mismatch::NoncanonicalText {
operation: position,
});
}
let subject_key = resolve_subject(
site.clone(),
subject,
@ -4351,6 +4402,67 @@ pub(super) fn resolve_patch(
}
}
}
ComponentOp::SetPersonaMaterial {
subject,
values,
voice,
memories,
reads,
} => {
let site = Site::Operation(position);
let subject_key =
resolve_subject(site.clone(), subject, &index, &state.subjects, &mut mismatches);
let mut read_keys = Vec::with_capacity(reads.len());
for read in reads {
read_keys.push(resolve_subject(
site.clone(),
&read.subject,
&index,
&state.subjects,
&mut mismatches,
));
}
let texts = values
.iter()
.chain(memories.iter())
.chain(std::iter::once(voice))
.chain(reads.iter().map(|read| &read.statement));
let mut read_subjects: BTreeSet<&Ref<SubjectId>> = BTreeSet::new();
let duplicate_read = reads.iter().any(|read| !read_subjects.insert(&read.subject));
if texts.clone().any(|text| !is_canonical_text(text.as_str())) || duplicate_read {
mismatches.push(Mismatch::NoncanonicalText {
operation: position,
});
}
let (Some(Key::Existing(subject_id)), true) =
(subject_key, read_keys.iter().all(Option::is_some))
else {
continue;
};
// Identical material on an existing subject changes nothing. A
// draft read can never equal a held one, so it is skipped here.
let held: Option<BTreeMap<SubjectId, Statement>> = read_keys
.iter()
.zip(reads)
.map(|(key, read)| match key {
Some(Key::Existing(id)) => Some((*id, read.statement.clone())),
_ => None,
})
.collect();
if let Some(held) = held
&& state.persona_material.get(&subject_id)
== Some(&PersonaMaterial {
values: values.clone(),
voice: voice.clone(),
memories: memories.clone(),
reads: held,
})
{
mismatches.push(Mismatch::NoOperationEffect {
operation: position,
});
}
}
ComponentOp::SetReach { channel, reach } => {
let channel_key = resolve_entity(
Site::Operation(position),
@ -4906,6 +5018,7 @@ pub(super) fn resolve_patch(
due,
period,
checks,
statement,
} => ResolvedOp::CreateCommitment {
subject: subject_id_of(&key_of(subject)),
key: CommitmentKey {
@ -4920,6 +5033,7 @@ pub(super) fn resolve_patch(
due: *due,
period: *period,
checks: checks.iter().map(precondition_of).collect(),
statement: statement.clone(),
},
},
ComponentOp::DischargeCommitment { subject, key } => ResolvedOp::DischargeCommitment {
@ -5089,6 +5203,24 @@ pub(super) fn resolve_patch(
channel: entity_id_of(&key_of(channel)),
reach: reach_of(reach),
},
ComponentOp::SetPersonaMaterial {
subject,
values,
voice,
memories,
reads,
} => ResolvedOp::SetPersonaMaterial {
subject: subject_id_of(&key_of(subject)),
material: PersonaMaterial {
values: values.clone(),
voice: voice.clone(),
memories: memories.clone(),
reads: reads
.iter()
.map(|read| (subject_id_of(&key_of(&read.subject)), read.statement.clone()))
.collect(),
},
},
ComponentOp::SetController {
channel,
controller,
@ -5376,6 +5508,7 @@ pub(crate) enum PatchFieldKind {
Evidence,
Flag,
Text(&'static str),
TextList(&'static str),
Name(&'static str),
NameSet(&'static str),
Choice(&'static [&'static str]),
@ -5388,6 +5521,7 @@ pub(crate) enum PatchFieldKind {
/// in two places rather than shipping a schema with no decoder.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(crate) enum CompositeShape {
PersonaRead,
NewController,
AccessKind,
DependencyRef,
@ -5820,6 +5954,32 @@ pub(crate) const PATCH_TOOLS: &[PatchTool] = &[
variant: "set_reach",
},
},
PatchTool {
name: "set_persona_material",
description: "Set, whole, what a subject carries as lived meaning: the values it holds, the voice it speaks in, the memories it keeps, and how it reads each subject it is bound to. This is what the subject's Persona is projected from; a subject with none has no rendered inner life. Setting replaces everything the subject held.",
fields: &[
field("subject", PatchFieldKind::Reference("subject")),
field(
"values",
PatchFieldKind::TextList("one value the subject holds, as a sentence"),
),
field(
"voice",
PatchFieldKind::Text("how this subject speaks, in one sentence"),
),
field(
"memories",
PatchFieldKind::TextList("one thing this subject remembers, as a sentence"),
),
field(
"reads",
PatchFieldKind::CompositeList(CompositeShape::PersonaRead),
),
],
shape: PatchToolShape::Operate {
variant: "set_persona_material",
},
},
PatchTool {
name: "set_controller",
description: "Set, or clear, the subject that may speak on a channel from outside its reach.",
@ -5833,7 +5993,7 @@ pub(crate) const PATCH_TOOLS: &[PatchTool] = &[
},
PatchTool {
name: "create_commitment",
description: "Author a promise. Exactly one of the three shapes: kind routine carries a period and no counterparty; kind obligation names a counterparty and carries no period; kind goal names no counterparty and carries no period. A period on an obligation or goal, or a routine without one, is refused.",
description: "Author a promise. Exactly one of the three shapes: kind routine carries a period and no counterparty; kind obligation names a counterparty and carries no period; kind goal names no counterparty and carries no period. A period on an obligation or goal, or a routine without one, is refused. The statement says what is promised; both parties will read it.",
fields: &[
field("subject", PatchFieldKind::Reference("subject")),
field("counterparty", PatchFieldKind::OptionalReference("subject")),
@ -5844,6 +6004,10 @@ pub(crate) const PATCH_TOOLS: &[PatchTool] = &[
"checks",
PatchFieldKind::CompositeList(CompositeShape::PreconditionRef),
),
field(
"statement",
PatchFieldKind::Text("what is promised, as the promisor would say it in one sentence"),
),
],
shape: PatchToolShape::Operate {
variant: "create_commitment",
@ -5991,6 +6155,9 @@ fn field_schema(kind: PatchFieldKind) -> Value {
PatchFieldKind::Text(description) | PatchFieldKind::Name(description) => {
tool_schema::canonical_string(description)
}
PatchFieldKind::TextList(description) => {
tool_schema::list(tool_schema::canonical_string(description))
}
PatchFieldKind::NameSet(description) => {
tool_schema::list(tool_schema::canonical_string(description))
}
@ -6112,6 +6279,15 @@ fn composite_schema(shape: CompositeShape) -> Value {
),
]),
CompositeShape::PreconditionRef => precondition_ref_schema(),
CompositeShape::PersonaRead => tool_schema::object(vec![
("subject".to_owned(), tool_schema::reference("subject")),
(
"statement".to_owned(),
tool_schema::canonical_string(
"how this subject reads that one, in one sentence",
),
),
]),
CompositeShape::RoleSpec => tool_schema::object(vec![
(
"role".to_owned(),
@ -6424,6 +6600,7 @@ pub(super) fn field_example(kind: PatchFieldKind) -> Value {
PatchFieldKind::Flag => json!(false),
PatchFieldKind::Text(_) | PatchFieldKind::Name(_) => json!("example_name"),
PatchFieldKind::NameSet(_) => json!(["example_name"]),
PatchFieldKind::TextList(_) => json!(["An example sentence."]),
PatchFieldKind::Choice(values) => json!(values[0]),
PatchFieldKind::Composite(shape) => composite_example(shape),
PatchFieldKind::CompositeList(shape) => json!([composite_example(shape)]),
@ -6620,7 +6797,7 @@ mod catalog_tests {
// Seven declaration shapes over six `Declaration` variants — `Entity`
// splits by kind, because a `kind` field would be a door slammed for
// half its values — plus twenty-nine operations and two session tools.
// half its values — plus thirty operations and two session tools.
// `assert_exhaustive` below breaks the build when a variant is added;
// these counts are where the addition is restated.
let declarations = PATCH_TOOLS
@ -6631,7 +6808,7 @@ mod catalog_tests {
.iter()
.filter(|entry| matches!(entry.shape, PatchToolShape::Operate { .. }))
.count();
assert_eq!((declarations, operations, PATCH_TOOLS.len()), (7, 29, 38));
assert_eq!((declarations, operations, PATCH_TOOLS.len()), (7, 30, 39));
// Every declaration variant the vocabulary owns is reachable, and the
// two payload-carrying entity kinds are not exposed as an `Entity`
@ -6719,6 +6896,7 @@ mod catalog_tests {
ComponentOp::Forget { .. } => "forget",
ComponentOp::SetReach { .. } => "set_reach",
ComponentOp::SetController { .. } => "set_controller",
ComponentOp::SetPersonaMaterial { .. } => "set_persona_material",
ComponentOp::CreateCommitment { .. } => "create_commitment",
ComponentOp::DischargeCommitment { .. } => "discharge_commitment",
ComponentOp::AdvancePressure { .. } => "advance_pressure",
@ -6775,7 +6953,7 @@ mod catalog_tests {
.count();
assert_eq!(
(declare_tools, operate_tools, PATCH_TOOLS.len()),
(7, 29, 38)
(7, 30, 39)
);
let declarations = every_declaration();

View file

@ -179,8 +179,8 @@ enters a log, a receipt, or the journal.
The consumer capability's tag is part of the commit digest and the
externally controlled assignment is part of the state shape, so both bump the
schema: state schema `ghostlight.world_state.consumer.v2` (state-schema
generation `world-v3`), commit schema `ghostlight.world_commit.consumer.v2`.
schema: state schema `ghostlight.world_state.consumer.v3` (state-schema
generation `world-v3`), commit schema `ghostlight.world_commit.consumer.v3`.
A store written under an earlier schema is refused, not migrated.
## Not in this pass

View file

@ -154,7 +154,8 @@ owns `derive_motion`, pure over state and tick: routines re-arm by exactly one
`period`, past-due obligations and goals write `Pressure` on their subject by
the `step` table, and an unavailable dependency does the same. A
`Commitment` is `(kind: Routine | Obligation | Goal, counterparty, due,
period, checks)`, created and discharged by two operations; `Pressure` is a
period, checks, statement)`, created and discharged by two operations, the
statement being what is promised in the promisor's words; `Pressure` is a
magnitude per source and target with `set_pressure` as its one writer, zero
spelled by key removal, and three operations (`advance`, `reduce`,
`resolve`). `order_opportunities` is total: pressure, then time since last
@ -285,13 +286,21 @@ is the typed component diff against the fresh components plus the
knowledge row, and never another subject's snapshot. The re-lowering's
provider request is a distinct round (`interpreter_round`) with its own
content-addressed request id, so it cannot collide with the first lowering's
request. State schema is `ghostlight.world_state.consumer.v2`, commit schema
`ghostlight.world_commit.consumer.v2`, controller work `controller_work.v12`,
request. State schema is `ghostlight.world_state.consumer.v3`, commit schema
`ghostlight.world_commit.consumer.v3`, controller work `controller_work.v12`,
Persona turn receipt `ghostlight.persona_turn_receipt.v3`; earlier stores and
earlier rows are refused. Ghostlight owns a conserved narrative ledger;
Delvehold owns the economy (`delvehold-forced-ontology-integration.md`).
Step 6 of the plan is complete. The next seam is the seeded live run against a
real Vault and a real connector, then the outbound consumer response.
Step 6 of the plan is complete; the seeded live run is the runbook's business.
Plan step 12 landed the thirteenth row: `PersonaMaterial` (`values`, `voice`,
`memories`, `reads` keyed by subject) in its own `persona_material` partition,
set whole by `SetPersonaMaterial` with `NoncanonicalText` for any padded text
or doubled read and `NoOperationEffect` for identical material; it is read by
projection and by no precondition, so it enters `state_digest` and no
`ScopePreimage`. A `Commitment` carries `statement`, what is promised in the
promisor's words, required at authoring and derived as "a promise made
through <kind>" when an affordance effect creates one. State and commit
schemas are `.consumer.v3`. The next seam is the outbound consumer response.
Rules the road imposed, carried in the tree: the provider request identity is
content-addressed over command, purpose, round, instructions, and input, so a
@ -403,7 +412,7 @@ which noun a component is; it cares what it constrains.
| `Redress` | grievance kind → forum, standing | where conflict goes when it cannot be fought |
| `Knowledge` | subject → fact: confidence, source | what a subject may act on at all |
| `Channel` | channel: reach set, controller (latency arrives with the clock, pass 7) | how facts travel; who can be silenced |
| `Commitment` | subject → counterparty: kind (`Routine`, `Obligation`, `Goal`), due, period | obligation with a clock; autonomous motion |
| `Commitment` | subject → counterparty: kind (`Routine`, `Obligation`, `Goal`), due, period, statement | obligation with a clock; autonomous motion |
| `Pressure` | source → target: magnitude | the causal boundary trigger |
| `PersonaMaterial` | subject: values, voice, memories, reads | lived meaning; never authority |
@ -437,9 +446,9 @@ Redress open_forum(kind, forum, standing), close_forum
Knowledge acquire(subject, fact, source, confidence), communicate(speaker, fact,
channel), witness(fact, place, confidence), forget
Channel set_reach, set_controller
Commitment create(subject, counterparty, kind, due, period, checks), discharge
Commitment create(subject, counterparty, kind, due, period, checks, statement), discharge
Pressure advance, reduce, resolve
PersonaMaterial set(subject, material)
PersonaMaterial set(subject, values, voice, memories, reads)
Retirement retire(referent, reason)
Time advance(minutes)
```
@ -499,7 +508,7 @@ counts do not appear here and may not be added.
The kernel owns component operations. A **world** owns its affordance catalog.
This is the generality lever: a setting with spellcraft, insurance claims,
oath-rhythms, or memetic sovereignty authors affordances from the same
twenty-nine operations, and the kernel never learns a genre.
thirty operations, and the kernel never learns a genre.
```text
Affordance

View file

@ -644,10 +644,20 @@ Persona prompts render only what the context establishes and treat the word
budget as a ceiling; the smoke's `GHOSTLIGHT_SMOKE_TRACE` writes every
request and output. Silence is a legitimate outcome, not a harness failure.
### Proposed step 12: the seed authors meaning
### 12. The seed authors meaning — landed
Not adopted; mapped 2026-09-11 from run 5's trace, awaiting the operator's
decision on two points below. Objective: a seeded person speaks from authored
Landed 2026-09-11 as mapped, with both recommendations taken: the small typed
material record, and a required commitment statement. `PersonaMaterial` is
`world/patch.rs`'s thirteenth-row component (`values`, `voice`, `memories`,
`reads` keyed by subject), set whole by `set_persona_material` (thirty
operations, thirty-nine tools); a commitment carries `statement`; state and
commit schemas are `.consumer.v3`; an affordance-made promise's statement is
"a promise made through <kind>". The Projector context carries the material
by label, each promise's statement, and `present`, the labels of the subjects
standing in the same place; the Persona's "Who you are" is the label, the
voice, and the values; the typed view carries material and statements by id.
Material is not in `ScopeComponents`, pinned by a test that sets it and
watches the scope digest stay. The map that led here follows. Objective: a seeded person speaks from authored
meaning rather than the model's default voice, which is the hard boundary
"character intelligence is modeled state, not a default model capability".

File diff suppressed because one or more lines are too long