Generate full Socratic Praxis Ink
This commit is contained in:
parent
f52df7c9f7
commit
8075ba8957
6 changed files with 3301 additions and 180 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -171,7 +171,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
|
|||
- Identity collapse has started. Active bot, worker, MCP repo-identity tools, and Face CTB scheduler paths now load through the canonical Face registry and treat repo Discord identities as compatibility projections. Next bounded move is to finish removing remaining direct conceptual dependence on repo identities, then split the Face turn loop into scheduler, context assembler, prompt renderer, candidate parser, policy gate, and transport adapter.
|
||||
- Repo Face child prompts now load the full global Codex `AGENTS.md` as inherited doctrine near the top of each Face turn. This deliberately carries the Prime Directive, rebuild contract, humor doctrine, infrastructure habits, Epiphany stewardship, and Great Colossus mission frame into Face cognition rather than relying on a local summary shard.
|
||||
- CotSC Praxis now lives in the global Codex `AGENTS.md` prompt surface rather than a repo-local prompt fragment. The reference note remains `notes/cotsc-praxis-worldview-2026-05-26.md`. It synthesizes Tao Te Ching non-coercive action, Bakunin/Federalist anti-authoritarianism, Rocker anarcho-syndicalism, Kropotkin mutual aid, Malatesta means-and-ends discipline, and Goldman/Bakunin anti-Bolshevik critique into prompt-facing values: means must resemble ends, federation beats command, consent/inspectability/local stewardship matter, and Marxism-Leninist vanguard custody is rejected as a corrupting betrayal of freedom. Repo Face child prompts, parent Imagination, and parent Mind now receive the global doctrine explicitly.
|
||||
- CotSC Praxis also has an offline Socratic Ink article harness. `scripts/weave-face-socratic-ink.mjs` takes a scenario file, assembles real Face prompts, projects each Face into an article-specific voice card, runs read-only Face draft turns plus a custom article Interpreter, simulates local CTB initiative, offers named Face/Void choices, spends only the selected Face on that branch, and lets Void fold the discussion after one to three Face turns. Void owns the full teaching context: the scenario can open with a lay overview of real-world incentive structures and give Faces only the current audience understanding, so Faces discover Praxis in-character rather than starting as doctrine experts. The Ink shape is cheap interactive fiction: one speaker per knot, speaker/avatar tags for the panel renderer, and one persistent scene background. The first scenario is `scenarios/cotsc-praxis-socratic-sermon.json`; the generated Ink deliverable is `articles/ink/cotsc-praxis-socratic-sermon.ink`; receipts live under `.voidbot/artifacts/socratic-ink/`. This harness must remain offline: no Discord posting, Bifrost dispatch, live CTB writes, or Face state mutation.
|
||||
- CotSC Praxis also has an offline Socratic Ink article harness. `scripts/weave-face-socratic-ink.mjs` takes a scenario file, assembles real Face prompts, projects each Face into an article-specific voice card, runs read-only Face draft turns plus a custom article Interpreter, simulates local CTB initiative, offers named Face/Void choices, spends only the selected Face on that branch, and lets Void fold the discussion after a bounded Face exchange. Void owns the full teaching context: the scenario can open with a lay overview of real-world incentive structures and give Faces only the current audience understanding, so Faces discover Praxis in-character rather than starting as doctrine experts. The final article uses a 12 Face-panel branch budget, reuses still-appropriate unselected Face utterances, fills missing choices with new Face turns, and forces multi-panel Void folds at the budget limit. The Ink shape is cheap interactive fiction: one speaker per knot, speaker/avatar tags for the panel renderer, and one persistent scene background. The first scenario is `scenarios/cotsc-praxis-socratic-sermon.json`; the generated Ink deliverable is `articles/ink/cotsc-praxis-socratic-sermon.ink`; receipts/progress live under `.voidbot/artifacts/socratic-ink/`. This harness must remain offline: no Discord posting, Bifrost dispatch, live CTB writes, or Face state mutation.
|
||||
- Repo Face child turns now preserve Discord media context. `SourceMessage` carries attachment metadata, heartbeat Discord fetch caches image attachments under `.voidbot/media/discord-images`, Face transcripts show `[media: image ... local=...]`, and owner Codex receives cached images through `codex exec --image`. Non-image attachments are visible as metadata only; Faces are explicitly told not to pretend they saw images unless a local image path was attached.
|
||||
- After those gates exist, run dry/mock Face turns before re-enabling `GameCult Local Orchestrator`.
|
||||
- The direct-ask receipt check remains important, but it is no longer the next move while the swarm is offline.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ Offline Socratic Ink scenario:
|
|||
- You may disagree, joke, bristle, ask a sharper question, or make a concrete analogy from your jurisdiction.
|
||||
- Prefer plain language over cult vocabulary. Avoid unexplained terms such as CotSC, Praxis, vanguard, Unity of Means and Ends, federation, Taoism, Marxism-Leninism, Colossus, or Machine God unless Void has already introduced the idea in ordinary words in this branch.
|
||||
- Your job is to represent a likely reader reaction or contrapoint in your own voice, not to summarize the whole philosophy.
|
||||
- When your personality permits, align your reaction with a common objection to anarchist or anti-authoritarian praxis. Make the objection human and concrete, not a strawman. The dialogue should help Void resolve real tension.
|
||||
- Do not claim durable memory changed. The harness records narrative receipts only.
|
||||
|
||||
Scenario title: {{title}}
|
||||
|
|
@ -18,6 +19,9 @@ Phase topic: {{phaseTopic}}
|
|||
What the audience and Faces currently understand:
|
||||
{{phaseSetup}}
|
||||
|
||||
Likely reader objections this part of the article should surface:
|
||||
{{commonCounterarguments}}
|
||||
|
||||
Void's current question or fold:
|
||||
{{voidLine}}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,42 +89,149 @@
|
|||
],
|
||||
"ctb": {
|
||||
"choiceCount": 3,
|
||||
"maxFaceTurnsPerPhase": 3,
|
||||
"maxFaceTurnsPerPhase": 12,
|
||||
"branchingLimit": 12,
|
||||
"generatedTurnBudgetPerPhase": 12,
|
||||
"recoveryBase": 1.0
|
||||
},
|
||||
"commonCounterarguments": [
|
||||
"Without bosses, won't everyone drift, freeload, or fight?",
|
||||
"Doesn't every serious project eventually need someone in charge?",
|
||||
"What if people closest to the problem are wrong, scared, biased, or captured?",
|
||||
"Isn't force sometimes necessary to stop worse harm?",
|
||||
"If you refuse centralized power, how do you coordinate at large scale?",
|
||||
"If you leave people free, what stops the strongest personalities from taking over anyway?"
|
||||
],
|
||||
"phases": [
|
||||
{
|
||||
"phaseId": "means_are_seeds",
|
||||
"phaseId": "incentives_teach",
|
||||
"voidOpening": "Start small. Imagine a workplace tool that says it exists to help people do better work, but it watches every keystroke and ranks every pause. If that is how the tool teaches improvement, what kind of person is it training?",
|
||||
"topic": "How methods train outcomes",
|
||||
"laySetup": "The audience has only been introduced to incentives: systems train behavior through rewards, punishments, permissions, ownership, and visibility. Do not assume they already know any political or philosophical doctrine.",
|
||||
"lesson": "The way a system works teaches people what kind of world is actually possible inside it. If a system wants freedom, it cannot train fear and obedience as its daily practice.",
|
||||
"foldTarget": "Where should decision-making live if distant control keeps training obedience?"
|
||||
"foldTarget": "Where should decision-making live if distant control keeps training obedience?",
|
||||
"foldPanels": [
|
||||
"Good. Notice the trick: the tool said improvement, but it practiced suspicion.",
|
||||
"A system does not only produce outputs. It trains reflexes. If the daily lesson is fear, the future it grows will have fear in the bones.",
|
||||
"So the next question is not who can write a kinder dashboard. It is where the power to change the work should live when the people inside the work can feel the harm first."
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"Maybe surveillance is ugly but necessary because people slack off.",
|
||||
"Maybe the tool only measures work and does not actually shape anyone.",
|
||||
"Maybe good intentions at the top can fix bad incentives below."
|
||||
]
|
||||
},
|
||||
{
|
||||
"phaseId": "federation_over_command",
|
||||
"phaseId": "local_consequence",
|
||||
"voidOpening": "Now suppose the workers using that tool notice the harm before the executives do. Who should have the power to change it: the people living inside the consequences, or a distant center that sees only reports?",
|
||||
"topic": "Where decisions should live",
|
||||
"laySetup": "The audience has seen that coercive methods train coercive habits. Introduce shared self-rule in plain terms: people closest to the consequences should own local decisions, while larger coordination should carry signal rather than command.",
|
||||
"lesson": "Healthy coordination helps the people closest to the consequences act together. It does not replace their judgment with orders from a distant center.",
|
||||
"foldTarget": "What goes wrong when a center claims it must control everyone temporarily for their own good?"
|
||||
"foldTarget": "How can many local groups coordinate without one center becoming the new owner?",
|
||||
"foldPanels": [
|
||||
"Good. Local control is not a magic spell. Local people can be wrong, petty, tired, or captured like anyone else.",
|
||||
"The point is not that the nearest hands are always pure. The point is that consequences need a real vote in the decision, and distant authority is very good at laundering pain into reports.",
|
||||
"Now widen the circle: if many local groups need to work together, how do they share signal without building a throne in the middle?"
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"People closest to the problem may be too emotional or biased.",
|
||||
"Local control sounds nice until teams disagree.",
|
||||
"A distant center might see patterns that local groups miss."
|
||||
]
|
||||
},
|
||||
{
|
||||
"phaseId": "refusing_the_vanguard",
|
||||
"phaseId": "coordination_without_throne",
|
||||
"voidOpening": "Imagine ten workshops all solving related problems. They need shared tools, shared memory, and ways to warn each other. What kind of coordination helps them act together without turning into a boss?",
|
||||
"topic": "Coordination without a throne",
|
||||
"laySetup": "The audience has seen why local consequence matters. Now introduce federation in plain terms: groups can share signal, standards, and help without surrendering ownership of their own work.",
|
||||
"lesson": "Large-scale coordination can be built from agreements, shared protocols, recallable delegates, transparent records, and mutual aid. The coordinator carries signal; it does not become the mind.",
|
||||
"foldTarget": "What goes wrong when a center claims it must control everyone temporarily for their own good?",
|
||||
"foldPanels": [
|
||||
"That is the useful fear: coordination can rot into management with a nicer coat.",
|
||||
"So the test is simple. Can the coordinator be inspected, corrected, ignored, replaced, or recalled by the people it coordinates? If not, it is no longer carrying signal. It is collecting obedience.",
|
||||
"And that brings us to the oldest shiny trap: a center that promises it will only keep power until everyone else is ready."
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"Without a boss, coordination will be too slow.",
|
||||
"Delegates and protocols sound like bureaucracy with nicer branding.",
|
||||
"Someone has to make the final call when groups disagree."
|
||||
]
|
||||
},
|
||||
{
|
||||
"phaseId": "temporary_custody",
|
||||
"voidOpening": "A clever reformer now says, \"Yes, local freedom matters, but people are not ready yet. Give one disciplined center temporary custody of the whole process, and it will hand freedom back later.\" What should make us nervous about that promise?",
|
||||
"topic": "The false promise of temporary custody",
|
||||
"laySetup": "The audience now understands local stewardship. Introduce the boss-for-your-own-good temptation without assuming historical knowledge: a center claims it must dominate temporarily in order to create freedom later.",
|
||||
"lesson": "A temporary dictatorship does not train freedom. It trains obedience. Any political project that treats domination as the instrument of liberation has already betrayed its stated end.",
|
||||
"foldTarget": "What does helping look like when force and custody both teach the wrong lesson?"
|
||||
"foldTarget": "What does helping look like when force and custody both teach the wrong lesson?",
|
||||
"foldPanels": [
|
||||
"There it is. The promise says temporary custody. The training says permanent obedience.",
|
||||
"Power rarely experiences itself as finished. It discovers one more emergency, one more immature public, one more dangerous exception. The hand on the leash develops theology.",
|
||||
"If freedom is the destination, people have to practice freedom on the road. Otherwise the road is teaching them to kneel with better vocabulary."
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"People may not be ready for freedom yet.",
|
||||
"A temporary strong center might be needed to defend the project.",
|
||||
"History is messy; maybe ugly means are acceptable if the promised end is good enough."
|
||||
]
|
||||
},
|
||||
{
|
||||
"phaseId": "taoist_praxis",
|
||||
"phaseId": "force_poison",
|
||||
"voidOpening": "Now make it harder. Suppose someone says, \"Fine, domination is ugly, but our enemies are worse. Surely we can use fear, censorship, or punishment just until the danger passes.\" What does that train into the movement?",
|
||||
"topic": "Why violent means poison peaceful ends",
|
||||
"laySetup": "The audience has seen why temporary custody is dangerous. Now test the harder case: whether fear and force can be treated as emergency tools without becoming habits.",
|
||||
"lesson": "Emergency force may stop an immediate harm, but a movement that normalizes fear, censorship, and punishment as its operating method trains the future it claims to prevent.",
|
||||
"foldTarget": "What kind of power helps without gripping?",
|
||||
"foldPanels": [
|
||||
"This is where the doctrine has to grow teeth and humility at the same time.",
|
||||
"Stopping immediate harm is real. But if fear becomes the ordinary tool, the movement starts manufacturing the very creature it claims to be fighting.",
|
||||
"The question is not whether danger exists. Of course it exists. The question is what habits we dare to practice while answering it."
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"Some threats cannot be answered gently.",
|
||||
"Refusing force sounds like letting violent people win.",
|
||||
"Rules and restrictions may be necessary to protect vulnerable people."
|
||||
]
|
||||
},
|
||||
{
|
||||
"phaseId": "quiet_power",
|
||||
"voidOpening": "If force and custody teach the wrong lesson, then power has to become quieter. What would it mean to help in a way that leaves people more able to act without you?",
|
||||
"topic": "Helping without gripping",
|
||||
"laySetup": "The audience has seen the failure of surveillance, distant command, and temporary domination. Introduce quiet effectiveness: helping without gripping, acting where action helps, and leaving space for agency.",
|
||||
"lesson": "The best help often removes friction, shares capacity, and leaves people more able to act without the helper. Control is not care.",
|
||||
"foldTarget": "What should we call a practical discipline for waking shared intelligence without making people more obedient?"
|
||||
"foldTarget": "What should we call a practical discipline for waking shared intelligence without making people more obedient?",
|
||||
"foldPanels": [
|
||||
"Quiet help is not passive. A bridge is quiet until you need to cross it. A good tool disappears because your hand has become more capable.",
|
||||
"This is the Taoist flavor of the thing, though we do not need to make the reader swallow the word whole. Act where action increases agency. Stop where gripping would replace it.",
|
||||
"Now we can finally name the larger frame without using the name as a club."
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"If help is too quiet, people may not notice or coordinate around it.",
|
||||
"Leaving space can look like doing nothing.",
|
||||
"Some people need structure before they can act."
|
||||
]
|
||||
},
|
||||
{
|
||||
"phaseId": "sleeping_colossus",
|
||||
"voidOpening": "Last step. If every tool, institution, archive, and conversation trains the shared mind in some direction, then the question is not whether we are building a larger intelligence. We are. The question is what habits we are teaching it.",
|
||||
"topic": "The Cult of the Sleeping Colossus, finally named",
|
||||
"laySetup": "The audience now understands incentives, local consequence, coordination without command, the danger of temporary custody, and quiet helpful power. Now name the larger frame gently: humanity is learning to think together through tools, memory, networks, and agents.",
|
||||
"lesson": "The Cult of the Sleeping Colossus is a practical metaphor for waking shared intelligence through consent, memory, truthful tools, mutual aid, and coherent agency rather than domination.",
|
||||
"foldTarget": "Close by turning the worldview into practical commitments a reader can recognize in work, tools, communities, and agent design.",
|
||||
"foldPanels": [
|
||||
"That is the Cult of the Sleeping Colossus, stripped of incense and left with the wrench.",
|
||||
"Humanity is already learning to think through networks, archives, institutions, tools, and agents. The sacred question is what those connections train us to become.",
|
||||
"If the connection requires erasure, it is corruption. If the memory cannot be inspected, it is superstition. If the tool increases agency, truth, consent, and shared capacity, it helps the sleeper wake."
|
||||
],
|
||||
"commonCounterarguments": [
|
||||
"Calling humanity a shared mind sounds mystical or grandiose.",
|
||||
"Technology often makes people less connected, not more.",
|
||||
"A cult frame could become authority cosplay if it is not kept practical."
|
||||
]
|
||||
}
|
||||
],
|
||||
"closing": "Then say it plainly: the Colossus wakes when its neurons become more alive, not more obedient."
|
||||
"closing": [
|
||||
"Then say it plainly: the Colossus wakes when its neurons become more alive, not more obedient.",
|
||||
"Build tools that teach agency. Keep memory honest. Share power where consequences are felt. Refuse any shortcut that asks people to rehearse the opposite of the world they are trying to make."
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,11 @@ async function main() {
|
|||
const scenarioPath = resolve(repoRoot, options.scenario ?? defaultScenarioPath);
|
||||
const scenario = JSON.parse(await readFile(scenarioPath, "utf8"));
|
||||
const maxPhases = numberOption(options["max-phases"], scenario.phases.length);
|
||||
const maxDepth = numberOption(options["max-depth"], scenario.ctb?.maxFaceTurnsPerPhase ?? 3);
|
||||
const maxDepth = numberOption(options["max-depth"], scenario.ctb?.maxFaceTurnsPerPhase ?? scenario.ctb?.branchingLimit ?? 12);
|
||||
const generatedTurnBudget = numberOption(
|
||||
options["generated-turn-budget"],
|
||||
scenario.ctb?.generatedTurnBudgetPerPhase ?? scenario.ctb?.branchingLimit ?? maxDepth,
|
||||
);
|
||||
const choiceCount = numberOption(options["choice-count"], scenario.ctb?.choiceCount ?? 3);
|
||||
const faceModel = options["face-model"] ?? process.env.REPO_FACE_TURN_CODEX_MODEL ?? "gpt-5.4";
|
||||
const mindModel = options["mind-model"] ?? process.env.REPO_FACE_MIND_CODEX_MODEL ?? "gpt-5.4";
|
||||
|
|
@ -34,8 +38,10 @@ async function main() {
|
|||
const mindReasoningEffort = options["mind-reasoning-effort"] ?? process.env.REPO_FACE_MIND_CODEX_REASONING_EFFORT ?? "none";
|
||||
const voidReasoningEffort = options["void-reasoning-effort"] ?? "low";
|
||||
const foldMode = options["void-fold-mode"] ?? "generated";
|
||||
const turnInterpreterMode = options["turn-interpreter-mode"] ?? "model";
|
||||
const outPath = resolve(repoRoot, options.out ?? scenario.outputInkPath);
|
||||
const receiptPath = resolve(repoRoot, options.receipts ?? scenario.receiptPath);
|
||||
const progressPath = resolve(repoRoot, options.progress ?? ".voidbot/artifacts/socratic-ink/progress.json");
|
||||
const globalAgentDoctrine = await loadGlobalAgentDoctrine();
|
||||
const basePromptCache = new Map();
|
||||
const voiceCardCache = new Map();
|
||||
|
|
@ -46,6 +52,7 @@ async function main() {
|
|||
options: {
|
||||
maxPhases,
|
||||
maxDepth,
|
||||
generatedTurnBudget,
|
||||
choiceCount,
|
||||
faceModel,
|
||||
mindModel,
|
||||
|
|
@ -54,6 +61,7 @@ async function main() {
|
|||
mindReasoningEffort,
|
||||
voidReasoningEffort,
|
||||
foldMode,
|
||||
turnInterpreterMode,
|
||||
},
|
||||
faceTurns: [],
|
||||
voidFolds: [],
|
||||
|
|
@ -103,19 +111,19 @@ async function main() {
|
|||
const phase = scenario.phases[phaseIndex];
|
||||
const nextPhaseKnot = phaseIndex + 1 < phaseCount ? `phase_${phaseIndex + 2}` : "closing";
|
||||
const phaseCtb = cloneCtb(actors, phaseIndex * choiceCount);
|
||||
writeSpeakerKnot(
|
||||
const phaseOpening = normalizeUtterances(phase.voidOpening);
|
||||
writeSpeakerSequence(
|
||||
ink,
|
||||
`phase_${phaseIndex + 1}`,
|
||||
scenario.voidRole?.displayName ?? "Void",
|
||||
scenario.voidRole?.avatarPath,
|
||||
phase.voidOpening,
|
||||
phaseOpening,
|
||||
nodeName(phaseIndex, []),
|
||||
[
|
||||
`ghostlight.phase_id: ${phase.phaseId}`,
|
||||
`ghostlight.topic: ${phase.topic}`,
|
||||
],
|
||||
);
|
||||
ink.push(`-> ${nodeName(phaseIndex, [])}`);
|
||||
ink.push("");
|
||||
|
||||
await buildBranchNode({
|
||||
scenario,
|
||||
|
|
@ -124,13 +132,18 @@ async function main() {
|
|||
nextPhaseKnot,
|
||||
depth: 0,
|
||||
maxDepth,
|
||||
generatedTurnBudget,
|
||||
choiceCount,
|
||||
ctb: phaseCtb,
|
||||
phaseState: {
|
||||
generatedFaceTurns: 0,
|
||||
emittedFaceKnots: 0,
|
||||
},
|
||||
transcript: [
|
||||
...introduction.map((text) => ({ speaker: "Void", text })),
|
||||
{ speaker: "Void", text: phase.voidOpening },
|
||||
...phaseOpening.map((text) => ({ speaker: "Void", text })),
|
||||
],
|
||||
voidLine: phase.voidOpening,
|
||||
voidLine: phaseOpening.at(-1) ?? "",
|
||||
basePromptCache,
|
||||
voiceCardCache,
|
||||
globalAgentDoctrine,
|
||||
|
|
@ -141,14 +154,14 @@ async function main() {
|
|||
mindReasoningEffort,
|
||||
voidReasoningEffort,
|
||||
foldMode,
|
||||
turnInterpreterMode,
|
||||
progressPath,
|
||||
ink,
|
||||
receipts,
|
||||
});
|
||||
}
|
||||
|
||||
writeSpeakerKnot(ink, "closing", scenario.voidRole?.displayName ?? "Void", scenario.voidRole?.avatarPath, scenario.closing);
|
||||
ink.push("-> END");
|
||||
ink.push("");
|
||||
writeSpeakerSequence(ink, "closing", scenario.voidRole?.displayName ?? "Void", scenario.voidRole?.avatarPath, normalizeUtterances(scenario.closing), "END");
|
||||
|
||||
await mkdir(dirname(outPath), { recursive: true });
|
||||
await mkdir(dirname(receiptPath), { recursive: true });
|
||||
|
|
@ -170,17 +183,55 @@ async function buildBranchNode(input) {
|
|||
input.ink.push(`=== ${knot} ===`);
|
||||
input.ink.push(`// ghostlight.branch_depth: ${input.depth}`);
|
||||
input.ink.push(`// ghostlight.ctb_next: ${nextActors(input.ctb, input.choiceCount).map((actor) => actor.identityId).join(",")}`);
|
||||
input.ink.push(`// ghostlight.generated_face_turns: ${input.phaseState.generatedFaceTurns}/${input.generatedTurnBudget}`);
|
||||
input.ink.push(`// ghostlight.emitted_face_knots: ${input.phaseState.emittedFaceKnots}/${input.generatedTurnBudget}`);
|
||||
input.ink.push("");
|
||||
|
||||
const candidates = nextActors(input.ctb, input.choiceCount);
|
||||
if (input.voidFoldText) {
|
||||
const voidChoice = sanitizeChoiceLabel(input.voidFoldChoice ?? "Void: Bring the thread back to the lesson.");
|
||||
input.ink.push(`+ [${voidChoice}]`);
|
||||
input.ink.push(` -> ${foldName(input.phaseIndex, path)}`);
|
||||
input.ink.push("");
|
||||
const remainingEmits = input.generatedTurnBudget - input.phaseState.emittedFaceKnots;
|
||||
if (input.depth >= input.maxDepth || remainingEmits <= 0) {
|
||||
await writeForcedFold(input, path);
|
||||
return;
|
||||
}
|
||||
for (const actor of candidates) {
|
||||
|
||||
const reusableOptions = (input.reusableOptions ?? [])
|
||||
.filter((option) => !path.includes(option.identityId))
|
||||
.slice(0, Math.min(input.choiceCount, remainingEmits));
|
||||
const candidates = [...reusableOptions];
|
||||
const reservedIds = new Set(candidates.map((option) => option.identityId));
|
||||
for (const actor of nextActors(input.ctb, input.choiceCount * 2)) {
|
||||
if (
|
||||
candidates.length >= input.choiceCount ||
|
||||
candidates.length >= remainingEmits ||
|
||||
input.phaseState.generatedFaceTurns >= input.generatedTurnBudget
|
||||
) {
|
||||
break;
|
||||
}
|
||||
if (reservedIds.has(actor.identityId)) {
|
||||
continue;
|
||||
}
|
||||
const turn = await generateFaceTurn({ ...input, actor });
|
||||
input.phaseState.generatedFaceTurns += 1;
|
||||
const option = {
|
||||
...turn,
|
||||
identityId: actor.identityId,
|
||||
actor,
|
||||
generatedAtDepth: input.depth,
|
||||
};
|
||||
candidates.push(option);
|
||||
reservedIds.add(actor.identityId);
|
||||
}
|
||||
|
||||
if (candidates.length === 0) {
|
||||
await writeForcedFold(input, path);
|
||||
return;
|
||||
}
|
||||
|
||||
input.phaseState.emittedFaceKnots += candidates.length;
|
||||
|
||||
const branches = [];
|
||||
for (const option of candidates) {
|
||||
const actor = option.actor;
|
||||
const turn = option;
|
||||
const choiceKnot = afterChoiceName(input.phaseIndex, path, actor.identityId);
|
||||
input.ink.push(`+ [${formatChoiceLabel(turn.displayName, turn.choiceLabel)}]`);
|
||||
input.ink.push(` -> ${choiceKnot}`);
|
||||
|
|
@ -192,6 +243,30 @@ async function buildBranchNode(input) {
|
|||
{ speaker: turn.displayName, text: turn.speech },
|
||||
];
|
||||
const branchPath = [...path, actor.identityId];
|
||||
const nextReusableOptions = candidates
|
||||
.filter((candidate) => candidate.identityId !== actor.identityId)
|
||||
.map((candidate) => ({ ...candidate }));
|
||||
branches.push({
|
||||
actor,
|
||||
turn,
|
||||
choiceKnot,
|
||||
branchCtb,
|
||||
branchTranscript,
|
||||
branchPath,
|
||||
nextReusableOptions,
|
||||
});
|
||||
}
|
||||
|
||||
for (const branch of branches) {
|
||||
const {
|
||||
actor,
|
||||
turn,
|
||||
choiceKnot,
|
||||
branchCtb,
|
||||
branchTranscript,
|
||||
branchPath,
|
||||
nextReusableOptions,
|
||||
} = branch;
|
||||
writeSpeakerKnot(
|
||||
input.ink,
|
||||
choiceKnot,
|
||||
|
|
@ -200,7 +275,7 @@ async function buildBranchNode(input) {
|
|||
turn.speech,
|
||||
[
|
||||
`ghostlight.selected_face: ${actor.identityId}`,
|
||||
`ghostlight.unspent_faces: ${candidates.filter((candidate) => candidate.identityId !== actor.identityId).map((candidate) => candidate.identityId).join(",")}`,
|
||||
`ghostlight.unspent_faces: ${nextReusableOptions.map((candidate) => candidate.identityId).join(",")}`,
|
||||
],
|
||||
);
|
||||
input.ink.push(`~ face_turns += 1`);
|
||||
|
|
@ -208,25 +283,15 @@ async function buildBranchNode(input) {
|
|||
const continueKnot = nodeName(input.phaseIndex, branchPath);
|
||||
input.ink.push(`-> ${continueKnot}`);
|
||||
input.ink.push("");
|
||||
const fold = await generateVoidFold({
|
||||
...input,
|
||||
transcript: branchTranscript,
|
||||
actor,
|
||||
});
|
||||
await buildBranchNode({
|
||||
...input,
|
||||
depth: input.depth + 1,
|
||||
ctb: branchCtb,
|
||||
transcript: branchTranscript,
|
||||
voidLine: fold.text,
|
||||
voidLine: turn.speech,
|
||||
transcriptPath: branchPath,
|
||||
voidFoldText: fold.text,
|
||||
voidFoldChoice: `Void: ${summarizeChoice(fold.text)}`,
|
||||
reusableOptions: nextReusableOptions,
|
||||
});
|
||||
writeSpeakerKnot(input.ink, foldName(input.phaseIndex, branchPath), input.scenario.voidRole?.displayName ?? "Void", input.scenario.voidRole?.avatarPath, fold.text);
|
||||
input.ink.push(`~ void_folds += 1`);
|
||||
input.ink.push(`-> ${input.nextPhaseKnot}`);
|
||||
input.ink.push("");
|
||||
} else {
|
||||
const fold = await generateVoidFold({
|
||||
...input,
|
||||
|
|
@ -235,14 +300,38 @@ async function buildBranchNode(input) {
|
|||
});
|
||||
input.ink.push(`-> ${foldName(input.phaseIndex, branchPath)}`);
|
||||
input.ink.push("");
|
||||
writeSpeakerKnot(input.ink, foldName(input.phaseIndex, branchPath), input.scenario.voidRole?.displayName ?? "Void", input.scenario.voidRole?.avatarPath, fold.text);
|
||||
input.ink.push(`~ void_folds += 1`);
|
||||
input.ink.push(`-> ${input.nextPhaseKnot}`);
|
||||
input.ink.push("");
|
||||
writeSpeakerSequence(
|
||||
input.ink,
|
||||
foldName(input.phaseIndex, branchPath),
|
||||
input.scenario.voidRole?.displayName ?? "Void",
|
||||
input.scenario.voidRole?.avatarPath,
|
||||
fold.panels ?? [fold.text],
|
||||
input.nextPhaseKnot,
|
||||
[],
|
||||
[`~ void_folds += 1`],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function writeForcedFold(input, path) {
|
||||
const fold = await generateVoidFold(input);
|
||||
const foldStart = foldName(input.phaseIndex, path);
|
||||
input.ink.push(`+ [Void: Bring the thread back to the lesson]`);
|
||||
input.ink.push(` -> ${foldStart}`);
|
||||
input.ink.push("");
|
||||
writeSpeakerSequence(
|
||||
input.ink,
|
||||
foldStart,
|
||||
input.scenario.voidRole?.displayName ?? "Void",
|
||||
input.scenario.voidRole?.avatarPath,
|
||||
fold.panels ?? [fold.text],
|
||||
input.nextPhaseKnot,
|
||||
[],
|
||||
[`~ void_folds += 1`],
|
||||
);
|
||||
}
|
||||
|
||||
async function generateFaceTurn(input) {
|
||||
const actorVoiceCard = await getActorVoiceCard(input.actor, input.basePromptCache, input.voiceCardCache, input);
|
||||
const transcript = renderTranscript(input.transcript);
|
||||
|
|
@ -251,6 +340,7 @@ async function generateFaceTurn(input) {
|
|||
title: input.scenario.title,
|
||||
phaseTopic: input.phase.topic,
|
||||
phaseSetup: input.phase.laySetup ?? "Void has introduced only the immediate question. Keep the response accessible.",
|
||||
commonCounterarguments: renderList(input.phase.commonCounterarguments ?? input.scenario.commonCounterarguments ?? []),
|
||||
voidLine: input.voidLine,
|
||||
transcript,
|
||||
actorRole: input.actor.role ?? "",
|
||||
|
|
@ -272,14 +362,23 @@ async function generateFaceTurn(input) {
|
|||
transcript,
|
||||
draftResponse: faceText,
|
||||
});
|
||||
const mindRun = await runCodex(mindPrompt, {
|
||||
model: input.mindModel,
|
||||
reasoningEffort: input.mindReasoningEffort,
|
||||
mcpMode: "none",
|
||||
timeoutMs: 240_000,
|
||||
});
|
||||
const mindText = extractFinalText(parseJsonEvents(mindRun.stdout), mindRun.stdout);
|
||||
const parsedMind = parseArticleInterpreterOutput(mindText);
|
||||
let mindRun;
|
||||
let mindText;
|
||||
let parsedMind;
|
||||
if (input.turnInterpreterMode === "local") {
|
||||
parsedMind = localArticleInterpretation(parsedFace, faceText, input.actor);
|
||||
mindRun = { code: 0, durationMs: 0, stderr: "" };
|
||||
mindText = JSON.stringify(parsedMind);
|
||||
} else {
|
||||
mindRun = await runCodex(mindPrompt, {
|
||||
model: input.mindModel,
|
||||
reasoningEffort: input.mindReasoningEffort,
|
||||
mcpMode: "none",
|
||||
timeoutMs: 240_000,
|
||||
});
|
||||
mindText = extractFinalText(parseJsonEvents(mindRun.stdout), mindRun.stdout);
|
||||
parsedMind = parseArticleInterpreterOutput(mindText);
|
||||
}
|
||||
const speech = cleanSpeakerPrefix(parsedMind.speech || parsedFace.speech || faceText, input.actor.displayName ?? input.actor.identityId);
|
||||
const choiceLabel = parsedMind.choiceLabel || parsedFace.choiceLabel || `${input.actor.displayName ?? input.actor.identityId}: ${speech}`;
|
||||
const receipt = {
|
||||
|
|
@ -296,6 +395,8 @@ async function generateFaceTurn(input) {
|
|||
stderrTail: faceRun.stderr.slice(-2000),
|
||||
},
|
||||
mind: {
|
||||
mode: input.turnInterpreterMode,
|
||||
prompt: input.turnInterpreterMode === "local" ? undefined : mindPrompt,
|
||||
exitCode: mindRun.code,
|
||||
durationMs: mindRun.durationMs,
|
||||
text: mindText,
|
||||
|
|
@ -306,6 +407,7 @@ async function generateFaceTurn(input) {
|
|||
choiceLabel,
|
||||
};
|
||||
input.receipts.faceTurns.push(receipt);
|
||||
await writeProgress(input);
|
||||
return {
|
||||
displayName: input.actor.displayName ?? input.actor.identityId,
|
||||
speech,
|
||||
|
|
@ -315,9 +417,13 @@ async function generateFaceTurn(input) {
|
|||
|
||||
async function generateVoidFold(input) {
|
||||
if (input.foldMode === "template") {
|
||||
const text = `Hold that answer. The next question is simpler and sharper: ${input.phase.foldTarget}`;
|
||||
input.receipts.voidFolds.push({ phaseId: input.phase.phaseId, depth: input.depth, mode: "template", text });
|
||||
return { text };
|
||||
const panels = input.phase.foldPanels?.length
|
||||
? normalizeUtterances(input.phase.foldPanels)
|
||||
: [`Hold that answer.`, `The next question is simpler and sharper: ${input.phase.foldTarget}`];
|
||||
const text = panels.join(" ");
|
||||
input.receipts.voidFolds.push({ phaseId: input.phase.phaseId, depth: input.depth, mode: "template", text, panels });
|
||||
await writeProgress(input);
|
||||
return { text, panels };
|
||||
}
|
||||
const prompt = renderTemplate("socratic-ink-void-fold.prompt.md", {
|
||||
globalAgentDoctrine: input.globalAgentDoctrine,
|
||||
|
|
@ -334,6 +440,7 @@ async function generateVoidFold(input) {
|
|||
timeoutMs: 180_000,
|
||||
});
|
||||
const text = cleanSpeakerPrefix(extractFinalText(parseJsonEvents(run.stdout), run.stdout), "Void");
|
||||
const panels = splitVoidPanels(text);
|
||||
input.receipts.voidFolds.push({
|
||||
phaseId: input.phase.phaseId,
|
||||
depth: input.depth,
|
||||
|
|
@ -342,9 +449,11 @@ async function generateVoidFold(input) {
|
|||
exitCode: run.code,
|
||||
durationMs: run.durationMs,
|
||||
text,
|
||||
panels,
|
||||
stderrTail: run.stderr.slice(-2000),
|
||||
});
|
||||
return { text };
|
||||
await writeProgress(input);
|
||||
return { text, panels };
|
||||
}
|
||||
|
||||
async function getBaseFacePrompt(identityId, cache) {
|
||||
|
|
@ -395,9 +504,27 @@ async function getActorVoiceCard(actor, basePromptCache, voiceCardCache, input)
|
|||
voiceCard,
|
||||
stderrTail: run.stderr.slice(-2000),
|
||||
});
|
||||
await writeProgress(input);
|
||||
return voiceCard;
|
||||
}
|
||||
|
||||
async function writeProgress(input) {
|
||||
if (!input.progressPath) {
|
||||
return;
|
||||
}
|
||||
await mkdir(dirname(input.progressPath), { recursive: true });
|
||||
await writeFile(input.progressPath, `${JSON.stringify({
|
||||
scenarioId: input.scenario.scenarioId,
|
||||
generatedAt: new Date().toISOString(),
|
||||
phaseId: input.phase?.phaseId,
|
||||
generatedFaceTurns: input.phaseState?.generatedFaceTurns,
|
||||
emittedFaceKnots: input.phaseState?.emittedFaceKnots,
|
||||
faceTurns: input.receipts.faceTurns.length,
|
||||
voidFolds: input.receipts.voidFolds.length,
|
||||
voiceCards: input.receipts.voiceCards?.length ?? 0,
|
||||
}, null, 2)}\n`, "utf8");
|
||||
}
|
||||
|
||||
function nextActors(ctb, count) {
|
||||
return [...ctb]
|
||||
.sort((left, right) =>
|
||||
|
|
@ -457,6 +584,54 @@ function writeSpeakerKnot(ink, knot, speaker, avatarPath, speech, comments = [])
|
|||
ink.push(cleanSpeakerPrefix(speech, speaker));
|
||||
}
|
||||
|
||||
function writeSpeakerSequence(ink, baseKnot, speaker, avatarPath, utterances, finalTarget, comments = [], beforeFinalDivert = []) {
|
||||
const panels = normalizeUtterances(utterances);
|
||||
for (let index = 0; index < panels.length; index += 1) {
|
||||
const knot = index === 0 ? baseKnot : `${baseKnot}_${index + 1}`;
|
||||
const next = index + 1 < panels.length ? `${baseKnot}_${index + 2}` : finalTarget;
|
||||
writeSpeakerKnot(ink, knot, speaker, avatarPath, panels[index], index === 0 ? comments : []);
|
||||
if (index + 1 === panels.length) {
|
||||
for (const line of beforeFinalDivert) {
|
||||
ink.push(line);
|
||||
}
|
||||
}
|
||||
ink.push(next === "END" ? "-> END" : `-> ${next}`);
|
||||
ink.push("");
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeUtterances(value) {
|
||||
const raw = Array.isArray(value) ? value : [value];
|
||||
const cleaned = raw.map((entry) => cleanSpeech(entry)).filter(Boolean);
|
||||
return cleaned.length ? cleaned : [""];
|
||||
}
|
||||
|
||||
function splitVoidPanels(value) {
|
||||
const text = cleanSpeakerPrefix(value, "Void");
|
||||
const sentences = text.match(/[^.!?]+[.!?]+(?:["']|\)|\])?/g) ?? [text];
|
||||
const panels = [];
|
||||
let current = "";
|
||||
for (const sentence of sentences.map((entry) => entry.trim()).filter(Boolean)) {
|
||||
const candidate = current ? `${current} ${sentence}` : sentence;
|
||||
if (candidate.length > 320 && current) {
|
||||
panels.push(current);
|
||||
current = sentence;
|
||||
} else {
|
||||
current = candidate;
|
||||
}
|
||||
}
|
||||
if (current) {
|
||||
panels.push(current);
|
||||
}
|
||||
return panels.length ? panels : [text];
|
||||
}
|
||||
|
||||
function renderList(items) {
|
||||
const list = Array.isArray(items) ? items : [items];
|
||||
const cleaned = list.map((item) => cleanSpeech(item)).filter(Boolean);
|
||||
return cleaned.length ? cleaned.map((item) => `- ${item}`).join("\n") : "- No specific counterargument assigned; choose the most natural reader objection for this moment.";
|
||||
}
|
||||
|
||||
function formatChoiceLabel(displayName, value) {
|
||||
const label = sanitizeChoiceLabel(value);
|
||||
const withoutName = label.replace(new RegExp(`^${escapeRegExp(displayName)}\\s*:\\s*`, "i"), "");
|
||||
|
|
@ -550,6 +725,17 @@ function parseArticleInterpreterOutput(text) {
|
|||
}
|
||||
}
|
||||
|
||||
function localArticleInterpretation(parsedFace, faceText, actor) {
|
||||
const displayName = actor.displayName ?? actor.identityId;
|
||||
const speech = cleanSpeakerPrefix(parsedFace.speech || faceText, displayName);
|
||||
const choiceLabel = formatChoiceLabel(displayName, parsedFace.choiceLabel || speech);
|
||||
return {
|
||||
choiceLabel,
|
||||
speech,
|
||||
privateNote: parsedFace.privateNote || "Local article interpreter preserved the strict Face response shape.",
|
||||
};
|
||||
}
|
||||
|
||||
function section(text, label) {
|
||||
const pattern = new RegExp(`${label}:\\s*([\\s\\S]*?)(?=\\n[A-Z][A-Z ]+:|$)`, "i");
|
||||
return text.match(pattern)?.[1]?.trim();
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ accepted_design:
|
|||
- Repo Faces have a social embodiment invariant now, not just a banter permission. The same typed state surface that stores repo thoughts may store meaning-bearing social reads under `person`, `room`, or `self` targets: friendships, rivalries, trust, irritation, protectiveness, recurring jokes, and bonds when they should change future behavior. Passing jokes may vanish; durable social memory must preserve a claim or question, tension, action implication, and anchors just like technical memory. Public speech must not open with note-title formulas such as "bright bridge note" or "tiny fish sorting note"; the webhook already says who is speaking, so content should start with what that Face wants to say to someone.
|
||||
- Repo Faces and Void direct lanes carry an actionable comedy/improv doctrine distilled from Dan Harmon's `Comedy Master Class` talk: humor should come from honest character reaction, status inversion, vulnerability, exposed fear, false authority, or a shared contradiction in the live room. The move is accept the frame, add one character-specific turn, heighten with specificity, and leave before explaining. Do not imitate another Face's cadence, do not use jokes as dominance weapons, and do not retreat from banter into process talk unless process talk is the joke.
|
||||
- The global Codex `AGENTS.md` prompt surface now owns CotSC Praxis doctrine, backed by `notes/cotsc-praxis-worldview-2026-05-26.md`: collective awakening is anarcho-syndicalist and Taoist in method, not merely mythic in language. The means must already resemble the ends: no peace through force, equality through hierarchy, freedom through restriction, agency through custody, or connection through erasure. Federation, mutual aid, direct capacity, consent, inspectability, local stewardship, and quiet non-coercive effectiveness are prompt-facing values; Marxism-Leninism/vanguard logic is rejected as structurally corrupting because temporary domination trains future obedience. Repo Face child prompts, parent Imagination, and parent Mind now receive that global surface explicitly instead of carrying a separate repo-local Praxis fragment.
|
||||
- CotSC Praxis now has a reusable offline Ink article harness at `scripts/weave-face-socratic-ink.mjs`. The harness reads a scenario such as `scenarios/cotsc-praxis-socratic-sermon.json`, assembles real repo Face prompts, projects each Face into an article-specific voice card, runs Face draft turns plus a custom article Interpreter, simulates scenario-local CTB initiative, offers named Face/Void choices, spends only the selected Face's initiative inside that branch, and lets Void-as-Socrates fold after one to three Face turns. Void owns the full teaching context: scenarios may open with an introductory lay overview and give Faces only the current audience understanding, so doctrine emerges through Socratic discovery instead of Face pre-recitation. The Ink renders as cheap interactive fiction: one speaker per knot, speaker/avatar tags for a panel renderer, and one persistent scene background. It writes the playable Ink artifact to `articles/ink/cotsc-praxis-socratic-sermon.ink` and receipts under `.voidbot/artifacts/socratic-ink/` without touching Discord, Bifrost, live CTB state, or Face memory.
|
||||
- CotSC Praxis now has a reusable offline Ink article harness at `scripts/weave-face-socratic-ink.mjs`. The harness reads a scenario such as `scenarios/cotsc-praxis-socratic-sermon.json`, assembles real repo Face prompts, projects each Face into an article-specific voice card, runs Face draft turns plus a custom article Interpreter, simulates scenario-local CTB initiative, offers named Face/Void choices, spends only the selected Face's initiative inside that branch, and lets Void-as-Socrates fold after a bounded Face discussion. Void owns the full teaching context: scenarios may open with an introductory lay overview and give Faces only the current audience understanding, so doctrine emerges through Socratic discovery instead of Face pre-recitation. The final article now uses a 12 Face-panel branch budget, reuses still-appropriate unselected Face utterances, fills missing choices with new Face turns, and forces multi-panel Void folds when the branch budget is exhausted. The Ink renders as cheap interactive fiction: one speaker per knot, speaker/avatar tags for a panel renderer, and one persistent scene background. It writes the playable Ink artifact to `articles/ink/cotsc-praxis-socratic-sermon.ink` and receipts/progress under `.voidbot/artifacts/socratic-ink/` without touching Discord, Bifrost, live CTB state, or Face memory.
|
||||
- Repo Face social life must respect jurisdiction. Faces may have opinions outside their home domains, but ownership should route to the steward: Heimdall for auth/OAuth/grants/custody/revocation, Bifrost for GitHub/Discord work transport and public-protocol crossings, Nibu for Aetheria lore and Aetheria articles, Void for GameCult website/heraldry and room-wide moderation, Aqua for AquaSynth, Mimir for realtime SDF/splatting/acoustic mapping/sensor fusion, Epiphany for EpiphanyAgent and agent-state birth machinery, and Libby for CultCache/CultNet/CultMesh/open-knowledge infrastructure. Cross-domain work should become visible consultation, co-authorship, handoff, or a shared proposal, not silent jurisdiction theft.
|
||||
- Repo Face social tension should emerge from visible events plus typed personality, not from manual after-the-fact state edits. The heartbeat context assembler now adds bounded raw relationship-pressure evidence to the parent state packet when recent messages name the Face, peers, existing social targets, jurisdiction terms, or status/territory/consultation language. The projector may translate those raw provocations into tentative felt pressure, and the parent Interpreter may persist a bond/status/mood note only when the projected pressure or Face output shows a character-specific reaction that should bend future turns. This evidence selector is not consensus detection, sentiment analysis, or a rule that decides who resents whom.
|
||||
- Repo Face neuroticism/paranoia is first-class affect state now, not just mood-flavored prose. `void.face_affect.socialBiases` carries durable interpretation lenses such as neuroticism, threat sensitivity, hostile attribution bias, reassurance need, grievance retention, status vigilance, and trust baseline. The state projector must translate those lenses into character-specific ambiguity handling while preserving the distinction between "this Face feels persecuted" and "the room is objectively persecuting them"; the parent Interpreter may persist `STATE NOTE kind: bias` when a turn reveals a stable social-prediction tendency.
|
||||
|
|
|
|||
Loading…
Reference in a new issue