Surface repo Face self-maintenance pressure

This commit is contained in:
Meta Vens 2026-06-14 13:26:57 +01:00
commit 3486fbab90
5 changed files with 80 additions and 1 deletions

View file

@ -2672,6 +2672,13 @@ function renderRepoFaceStatePacket(
lines.push(curiosityGraphFacts);
}
const selfMaintenancePressureFacts = !clarityPressureActive
? renderRepoFaceSelfMaintenancePressureFacts(name, agencyPressures, needs, candidateInterventions)
: undefined;
if (selfMaintenancePressureFacts) {
lines.push(selfMaintenancePressureFacts);
}
if (agencyPressures.length > 0 && !clarityPressureActive) {
lines.push([
"Agency pressures that want eventual motion:",
@ -2754,6 +2761,73 @@ function renderRepoFaceStatePacket(
return rejectLeakyMemorySurface(cleanRepoFaceProjectorLoopVocabulary(identity, lines.join("\n\n")));
}
function renderRepoFaceSelfMaintenancePressureFacts(
name: string,
agencyPressures: VoidSelfStateTypedProjection["agencyPressure"]["pressures"],
needs: VoidSelfStateTypedProjection["faceAffect"]["needs"],
candidateInterventions: VoidSelfStateTypedProjection["candidateInterventions"]["interventions"],
): string | undefined {
const selfMaintenancePattern = /runnable substrate|agent substrate|persona substrate|semantic memory|typed memory|persona memory|tool|voice|avatar|repo access|room access|signal boundary|signal chain|state projection|persona projection|agency path|broken tool|blocked faculty|stale context|underdeveloped interface|self[-_ ]?advocacy/i;
const substrateNeeds = needs.filter((need) =>
(need.status === "active" || need.status === "neglected")
&& (
need.kind === "agency"
|| (
need.kind === "substrate"
&& selfMaintenancePattern.test(joinMemoryFields(need.summary, need.claim, need.question, need.tension, need.actionImplication, targetLabel(need.target)))
)
|| selfMaintenancePattern.test(joinMemoryFields(need.summary, need.claim, need.question, need.tension, need.actionImplication, targetLabel(need.target)))
)
&& need.intensity >= 0.45
);
const selfAdvocacyPressures = agencyPressures.filter((pressure) =>
(pressure.status === "active" || pressure.status === "ready_to_act")
&& (
pressure.tags.some((tag) => selfMaintenancePattern.test(tag))
|| selfMaintenancePattern.test(joinMemoryFields(pressure.summary, pressure.claim, pressure.question, pressure.tension, pressure.actionImplication, targetLabel(pressure.target)))
)
&& pressure.intensity >= 0.45
);
const mustShareCandidates = candidateInterventions.filter((intervention) =>
(intervention.status === "queued" || intervention.status === "deferred")
&& intervention.mustEventuallyShare
&& (
intervention.tags.some((tag) => selfMaintenancePattern.test(tag))
|| selfMaintenancePattern.test(joinMemoryFields(intervention.summary, intervention.draft, targetLabel(intervention.target)))
)
);
if (substrateNeeds.length === 0 && selfAdvocacyPressures.length === 0 && mustShareCandidates.length === 0) {
return undefined;
}
return [
"Self-maintenance pressure requiring public advocacy:",
`- ${name} is carrying a body/mind/substrate or self-advocacy issue. This is not decorative mood and not ordinary private rumination.`,
"- If the room is not in an active human crisis, the next public-safe turn should say the concrete want plainly in character. Do not bury it as only a STATE NOTE, another private thought, or vague eventual motion.",
"- If the issue is too raw, underspecified, or unsafe to ask for directly, say the smallest honest version: what hurts, what is blocked, what context is missing, or what help would let this Face become more coherent.",
...substrateNeeds.slice(0, 4).map((need) =>
[
`- Need ${need.kind} toward ${targetLabel(need.target)} [${need.status}, intensity ${need.intensity.toFixed(2)}]: ${asSentence(need.summary)}`,
need.claim ? `Claim: ${asSentence(need.claim)}` : "",
need.question ? `Question: ${asSentence(need.question)}` : "",
`Wanted change: ${asSentence(need.actionImplication)}`,
].filter(Boolean).join(" "),
),
...selfAdvocacyPressures.slice(0, 4).map((pressure) =>
[
`- Pressure ${pressure.kind} toward ${targetLabel(pressure.target)} [${pressure.status}, intensity ${pressure.intensity.toFixed(2)}]: ${asSentence(pressure.summary)}`,
pressure.claim ? `Claim: ${asSentence(pressure.claim)}` : "",
pressure.question ? `Question: ${asSentence(pressure.question)}` : "",
`Wanted change: ${asSentence(pressure.actionImplication)}`,
].filter(Boolean).join(" "),
),
...mustShareCandidates.slice(0, 3).map((intervention) =>
`- Unsaid self-advocacy line [${intervention.status}, priority ${intervention.priority.toFixed(2)}]: ${asSentence(intervention.summary)} Draft residue: ${cleanCharacterFacingSentence(intervention.draft)}`,
),
].join("\n");
}
function renderRepoFaceRelationshipFreshnessFacts(
name: string,
state: VoidSelfStateTypedProjection,