Wake repo face swarm

This commit is contained in:
Meta Vens 2026-05-21 19:51:52 +01:00
commit 3a696baba2
5 changed files with 177 additions and 62 deletions

View file

@ -328,7 +328,8 @@ async function processJob(job: JobRecord): Promise<void> {
return;
}
const finalResponse = fitDiscordMessage(response.outputText ?? response.summary);
const rawFinalResponse = response.outputText ?? response.summary;
const finalResponse = fitDiscordMessage(rawFinalResponse);
if (job.postApprovalRequired) {
await jobQueue.markAwaitingPostApproval(job.id, artifactPaths, response.summary);
@ -347,22 +348,23 @@ async function processJob(job: JobRecord): Promise<void> {
}
if (job.command === "repo-face-rumination") {
const repoIdentityPosts = parseRepoIdentityPostIntents(finalResponse);
const repoIdentityStateNotes = parseRepoIdentityStateNoteIntents(finalResponse);
const repoIdentityBifrostTopics = parseRepoIdentityBifrostTopicIntents(finalResponse);
const repoIdentityUpdateRequests = parseRepoIdentityUpdateRequestIntents(finalResponse);
const repoFaceOutput = rawFinalResponse;
const repoIdentityPosts = parseRepoIdentityPostIntents(repoFaceOutput);
const repoIdentityStateNotes = parseRepoIdentityStateNoteIntents(repoFaceOutput);
const repoIdentityBifrostTopics = parseRepoIdentityBifrostTopicIntents(repoFaceOutput);
const repoIdentityUpdateRequests = parseRepoIdentityUpdateRequestIntents(repoFaceOutput);
const repoIdentityArticles = config.repoFaceGithubActionsEnabled
? parseRepoIdentityArticleIntents(finalResponse)
? parseRepoIdentityArticleIntents(repoFaceOutput)
: [];
const repoIdentityProposals = config.repoFaceGithubActionsEnabled
? parseRepoIdentityProposalPrIntents(finalResponse)
? parseRepoIdentityProposalPrIntents(repoFaceOutput)
: [];
const repoIdentityPrComments = config.repoFaceGithubActionsEnabled
? parseRepoIdentityPrCommentIntents(finalResponse)
? parseRepoIdentityPrCommentIntents(repoFaceOutput)
: [];
const ignoredGithubActionIntents = config.repoFaceGithubActionsEnabled
? 0
: countRepoIdentityGithubActionIntents(finalResponse);
: countRepoIdentityGithubActionIntents(repoFaceOutput);
const proposalPrSubmitted = repoIdentityProposals.length > 0;
const prCommentSubmitted = !proposalPrSubmitted && repoIdentityPrComments.length > 0;
const articlePrSubmitted =
@ -409,8 +411,8 @@ async function processJob(job: JobRecord): Promise<void> {
}
}
}
const cleanedFinalResponse = stripRepoIdentityPostIntents(finalResponse);
await jobQueue.completeJobDirect(job.id, cleanedFinalResponse || finalResponse);
const cleanedFinalResponse = stripRepoIdentityPostIntents(repoFaceOutput);
await jobQueue.completeJobDirect(job.id, cleanedFinalResponse || repoFaceOutput);
await deliverOwnerNotifications(job, response.notifications ?? []);
await auditLog.record({
type: "provider.completed",
@ -992,12 +994,41 @@ async function postRepoIdentityIntent(job: JobRecord, intent: RepoIdentityPostIn
const identity = await resolveRepoIdentityForJobIntent(job, intent.identity);
if (!identity) {
throw new Error(`Could not resolve repo identity for job ${job.id}.`);
console.warn(`Rejected repo identity speech for job ${job.id}: could not resolve identity.`);
return false;
}
const channelId = intent.channelId ?? job.outputChannelId;
if (!channelId) {
console.warn(`Rejected repo identity ${identity.id} speech for job ${job.id}: no Discord channel was available.`);
return false;
}
if (isOwnerDmChannelAlias(channelId)) {
const content = intent.content.trim();
const dmChannelId = await openOwnerDmChannel();
const posted = await postDiscordBotMessage(
dmChannelId,
renderRepoIdentityOwnerDm(identity, content),
);
await recordRepoIdentityDeliveryReceipt({
identity,
channelId: dmChannelId,
content,
replyToMessageId: undefined,
messageId: posted.id,
transport: "bot",
}).catch((error: unknown) => {
const message = error instanceof Error ? error.message : String(error);
console.warn(`Could not record repo identity owner DM receipt for job ${job.id}: ${message}`);
});
console.log(`Posted repo identity ${identity.id} to owner DM from job ${job.id} as message ${posted.id}.`);
return true;
}
if (!isRepoDiscordIdentityAllowedInChannel(identity, channelId)) {
throw new Error(`Repo identity ${identity.id} is not registered for Discord channel ${channelId}.`);
console.warn(
`Rejected repo identity ${identity.id} speech for job ${job.id}: identity is not registered for Discord channel ${channelId}.`,
);
return false;
}
const content = intent.content.trim();
@ -1058,13 +1089,20 @@ async function loadRegisteredFaceRepoRegistry() {
function parseRepoIdentityPostIntents(finalResponse: string): RepoIdentityPostIntent[] {
const intents: RepoIdentityPostIntent[] = parseRepoFaceActionBlocks(finalResponse)
.filter((block) => block.kind === "say")
.map((block) => ({
identity: optionalDslString(block.fields.identity),
channelId: optionalDslString(block.fields.channel) ?? optionalDslString(block.fields.channelId),
replyToMessageId: optionalDslString(block.fields.reply_to) ?? optionalDslString(block.fields.replyToMessageId),
content: block.fields.content.trim(),
}))
.filter((intent) => intent.content.length > 0);
.flatMap((block): RepoIdentityPostIntent[] => {
const content = requiredDslString(block.fields.content);
if (!content) {
return [];
}
return [
{
identity: optionalDslString(block.fields.identity),
channelId: optionalDslString(block.fields.channel) ?? optionalDslString(block.fields.channelId),
replyToMessageId: optionalDslString(block.fields.reply_to) ?? optionalDslString(block.fields.replyToMessageId),
content,
},
];
});
for (const line of finalResponse.split(/\r?\n/)) {
const trimmed = line.trim();
@ -1486,8 +1524,16 @@ async function submitRepoIdentityBifrostTopicIntent(
...intent.sourceMessageIds,
intent.replyToMessageId,
].filter((value): value is string => typeof value === "string" && value.trim().length > 0)));
const sourceChannelId = normalizeBifrostSourceChannelId(intent.channelId ?? job.outputChannelId);
let topicId = intent.topicId;
const createWithTopicId =
topicId && intent.title && !intent.approve && !bifrostGovernanceTopicExists(topicId)
? topicId
: undefined;
if (createWithTopicId) {
topicId = undefined;
}
if (!topicId) {
if (!intent.title) {
throw new Error(`Bifrost topic intent for ${identity.id} on job ${job.id} needs title when topicId is absent.`);
@ -1499,6 +1545,7 @@ async function submitRepoIdentityBifrostTopicIntent(
identity.repoName,
"--agent",
identity.id,
...(createWithTopicId ? ["--id", createWithTopicId] : []),
"--title",
intent.title,
"--summary-file",
@ -1509,7 +1556,7 @@ async function submitRepoIdentityBifrostTopicIntent(
"repo_face_turn",
"--created-by",
identity.id,
...(intent.channelId ?? job.outputChannelId ? ["--source-channel-id", intent.channelId ?? job.outputChannelId] : []),
...(sourceChannelId ? ["--source-channel-id", sourceChannelId] : []),
...(sourceMessageIds.length > 0 ? ["--source-message-ids", sourceMessageIds.join(",")] : []),
...bifrostMirrorArgs(identity, mirrorContentFile),
]) as BifrostGovernanceTopicReceipt;
@ -1527,6 +1574,7 @@ async function submitRepoIdentityBifrostTopicIntent(
normalizeBifrostTopicStance(intent.stance),
"--body-file",
contentFile,
...(sourceChannelId ? ["--source-channel-id", sourceChannelId] : []),
...(intent.replyToMessageId ? ["--source-message-id", intent.replyToMessageId] : []),
...bifrostMirrorArgs(identity, mirrorContentFile),
]);
@ -1541,6 +1589,7 @@ async function submitRepoIdentityBifrostTopicIntent(
identity.id,
"--body-file",
contentFile,
...(sourceChannelId ? ["--source-channel-id", sourceChannelId] : []),
...(intent.replyToMessageId ? ["--source-message-id", intent.replyToMessageId] : []),
...bifrostMirrorArgs(identity, mirrorContentFile),
]);
@ -1592,6 +1641,23 @@ function runBifrostGovernanceThreads(args: string[]): BifrostGovernanceTopicRece
}
}
function bifrostGovernanceTopicExists(topicId: string): boolean {
const governanceScript = resolve(config.bifrostRoot, "tools", "governance-threads.mjs");
const result = spawnSync(process.execPath, [governanceScript, "show", "--topic", topicId], {
cwd: config.bifrostRoot,
encoding: "utf8",
windowsHide: true,
});
return result.status === 0;
}
function normalizeBifrostSourceChannelId(channelId: string | undefined): string | undefined {
if (!channelId || isOwnerDmChannelAlias(channelId)) {
return undefined;
}
return channelId;
}
function bifrostMirrorArgs(
identity: { displayName: string; avatarUrl?: string },
mirrorContentFile?: string,
@ -1632,16 +1698,24 @@ function runBifrostBridge(args: string[]): BifrostBridgeReceipt {
function parseRepoIdentityUpdateRequestIntents(finalResponse: string): RepoIdentityUpdateRequestIntent[] {
const intents: RepoIdentityUpdateRequestIntent[] = parseRepoFaceActionBlocks(finalResponse)
.filter((block) => block.kind === "update_request")
.map((block) => ({
identity: optionalDslString(block.fields.identity),
title: block.fields.title.trim(),
content: block.fields.content.trim(),
priority: parseDslNumber(block.fields.priority),
sourceMessageIds: parseDslList(block.fields.source_message_ids ?? block.fields.sourceMessageIds),
channelId: optionalDslString(block.fields.channel) ?? optionalDslString(block.fields.channelId),
replyToMessageId: optionalDslString(block.fields.reply_to) ?? optionalDslString(block.fields.replyToMessageId),
}))
.filter((intent) => intent.title.length > 0 && intent.content.length > 0);
.flatMap((block): RepoIdentityUpdateRequestIntent[] => {
const title = requiredDslString(block.fields.title);
const content = requiredDslString(block.fields.content);
if (!title || !content) {
return [];
}
return [
{
identity: optionalDslString(block.fields.identity),
title,
content,
priority: parseDslNumber(block.fields.priority),
sourceMessageIds: parseDslList(block.fields.source_message_ids ?? block.fields.sourceMessageIds),
channelId: optionalDslString(block.fields.channel) ?? optionalDslString(block.fields.channelId),
replyToMessageId: optionalDslString(block.fields.reply_to) ?? optionalDslString(block.fields.replyToMessageId),
},
];
});
for (const line of finalResponse.split(/\r?\n/)) {
const trimmed = line.trim();
@ -1680,21 +1754,30 @@ function parseRepoIdentityUpdateRequestIntents(finalResponse: string): RepoIdent
function parseRepoIdentityBifrostTopicIntents(finalResponse: string): RepoIdentityBifrostTopicIntent[] {
const intents: RepoIdentityBifrostTopicIntent[] = parseRepoFaceActionBlocks(finalResponse)
.filter((block) => block.kind === "bifrost_topic")
.map((block) => ({
identity: optionalDslString(block.fields.identity),
topicId: optionalDslString(block.fields.topic_id) ?? optionalDslString(block.fields.topicId),
title: optionalDslString(block.fields.title),
content: block.fields.content.trim(),
mirrorContent: optionalDslString(block.fields.mirror) ?? optionalDslString(block.fields.mirrorContent),
stance: optionalDslString(block.fields.stance),
priority: parseDslNumber(block.fields.priority),
approve: parseDslBoolean(block.fields.approve),
dispatch: parseDslBoolean(block.fields.dispatch),
sourceMessageIds: parseDslList(block.fields.source_message_ids ?? block.fields.sourceMessageIds),
channelId: optionalDslString(block.fields.channel) ?? optionalDslString(block.fields.channelId),
replyToMessageId: optionalDslString(block.fields.reply_to) ?? optionalDslString(block.fields.replyToMessageId),
}))
.filter((intent) => intent.content.length > 0 && Boolean(intent.topicId || intent.title));
.flatMap((block): RepoIdentityBifrostTopicIntent[] => {
const topicId = optionalDslString(block.fields.topic_id) ?? optionalDslString(block.fields.topicId);
const title = optionalDslString(block.fields.title);
const content = requiredDslString(block.fields.content);
if (!content || (!topicId && !title)) {
return [];
}
return [
{
identity: optionalDslString(block.fields.identity),
topicId,
title,
content,
mirrorContent: optionalDslString(block.fields.mirror) ?? optionalDslString(block.fields.mirrorContent),
stance: optionalDslString(block.fields.stance),
priority: parseDslNumber(block.fields.priority),
approve: parseDslBoolean(block.fields.approve),
dispatch: parseDslBoolean(block.fields.dispatch),
sourceMessageIds: parseDslList(block.fields.source_message_ids ?? block.fields.sourceMessageIds),
channelId: optionalDslString(block.fields.channel) ?? optionalDslString(block.fields.channelId),
replyToMessageId: optionalDslString(block.fields.reply_to) ?? optionalDslString(block.fields.replyToMessageId),
},
];
});
for (const line of finalResponse.split(/\r?\n/)) {
const trimmed = line.trim();
@ -1944,6 +2027,10 @@ function optionalDslString(value: string | undefined): string | undefined {
return trimmed;
}
function requiredDslString(value: string | undefined): string | undefined {
return optionalDslString(value);
}
function parseDslNumber(value: string | undefined): number | undefined {
const trimmed = optionalDslString(value);
if (!trimmed) {
@ -2252,7 +2339,15 @@ async function postOwnerNotification(content: string): Promise<void> {
}
const dmChannelId = await openOwnerDmChannel();
const response = await fetch(`https://discord.com/api/v10/channels/${dmChannelId}/messages`, {
await postDiscordBotMessage(dmChannelId, fitDiscordMessage(content));
}
async function postDiscordBotMessage(channelId: string, content: string): Promise<{ id: string }> {
if (!config.botToken) {
throw new Error("DISCORD_BOT_TOKEN is required for the worker to post Discord messages.");
}
const response = await fetch(`https://discord.com/api/v10/channels/${channelId}/messages`, {
method: "POST",
headers: {
Authorization: `Bot ${config.botToken}`,
@ -2269,6 +2364,13 @@ async function postOwnerNotification(content: string): Promise<void> {
if (!response.ok) {
throw new Error(`Discord owner notification failed with ${response.status}: ${await response.text()}`);
}
const payload = (await response.json()) as { id?: string };
if (!payload.id) {
throw new Error("Discord message post succeeded without returning a message id.");
}
return { id: payload.id };
}
async function openOwnerDmChannel(): Promise<string> {
@ -2300,6 +2402,17 @@ async function openOwnerDmChannel(): Promise<string> {
return payload.id;
}
function isOwnerDmChannelAlias(channelId: string): boolean {
return ["owner", "dm", "owner_dm", "private", "meta"].includes(channelId.trim().toLowerCase());
}
function renderRepoIdentityOwnerDm(
identity: { displayName: string; id: string },
content: string,
): string {
return fitDiscordMessage(`**${identity.displayName} (${identity.id})**\n${content}`);
}
function fitDiscordMessage(content: string): string {
const trimmed = content.trim();

View file

@ -17,8 +17,8 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
## Current Shape
- Discord bot and worker are live.
- The unattended repo Face / CTB swarm is intentionally offline as of 2026-05-21. `GameCult Local Orchestrator` is disabled after the Aquarium failure where Faces leaked heartbeat labels, repeated saturated work seams, failed to banter, and kept turning Aquarium into work pressure. Read `notes/agent-swarm-shutdown-audit-2026-05-21.md` before any restart.
- The active teardown authority is now `notes/agent-swarm-teardown-plan-2026-05-21.md`. Treat it as the current map for repo Faces, CTB turns, Bifrost transport, public speech, and identity ownership. The conclusion is not "tune the heartbeat"; it is "rebuild the Face/Bifrost turn foundation before restart."
- The unattended repo Face / CTB swarm is live again as of 2026-05-21 after the teardown/restart pass. `GameCult Local Orchestrator` is enabled and owns the single hidden pulse for Bifrost dispatch, repo Face CTB turns, Void mood drift, Void moderation rumination, and the watchdog.
- The teardown authority remains `notes/agent-swarm-teardown-plan-2026-05-21.md`, but it is now a restart checklist and smell ledger rather than a stop sign. Keep using it when a Face/Bifrost/CTB boundary smells like prompt/parser/transport Jenga.
- The repo-controlled pause flag is `state/agent-swarm-paused.json`. While it is missing or has `"paused": false`, swarm runners may operate. While it has `"paused": true` or is malformed, the Face heartbeat runner skips and the orchestrator skips agent-swarm organs. This is the brake. Do not route around it.
- Postgres owns jobs, audit events, interaction memory, and rate-limit state.
- Qdrant owns history and source vectors.
@ -143,7 +143,8 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
## Likely Next Bounded Move
- Do not restart the swarm by momentum. The first teardown cuts have landed: `state/agent-swarm-paused.json` gates swarm organs, active child-facing prompt/provider framing says character turn instead of heartbeat, `sanitizeRepoIdentityPostContent` is gone, and public/work/state output now passes through a Spark/Codex parent Interpreter with one retry before routing or dropping. The child prompt is now roleplay-friendly: characters receive projected memory/mood/obligation context, write natural turns, and describe desired speech/work/reflection; the parent Interpreter translates into `STATE NOTE`, `SAY`, and `BIFROST TOPIC` blocks for the worker.
- Keep the swarm awake, but watch the logs with suspicion. The restart pass thawed `state/agent-swarm-paused.json`, enabled `GameCult Local Orchestrator`, restarted a fresh bot/worker stack, and verified healthy watchdog/Bifrost/repo Face pulses. The worker now parses full raw Interpreter output before Discord-length fitting, drops malformed action blocks instead of crashing, routes `SAY channel: owner` to owner DM, and opens a new Bifrost topic when a Face gives a symbolic `topic_id` that does not exist yet.
- Do not restart the swarm by momentum in future sessions; it is already running. If it must be stopped again, use `state/agent-swarm-paused.json` and the orchestrator task deliberately, then update this handoff.
- Direct Face `UPDATE REQUEST` dispatch no longer enqueues Bifrost agent transport. Legacy `UPDATE REQUEST` blocks are reconciled into Bifrost topics so governance remains inspectable.
- Live model-facing prompt prose has started moving out of executable code. The shared loader is `packages/shared/src/prompt-template.ts`; extracted prompt surfaces live under `prompts/`, including repo Face turn/reviewer prompts, provider wrapper prompts, situational social read prompts, source-grounding reminders, consensus-feed prompts, and repo Face model-smoke scenarios. Code should project data and select prompt names; prompt files should own behavioral prose.
- 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.

View file

@ -1,5 +1,5 @@
{
"paused": true,
"reason": "Repo Face / CTB / Bifrost swarm teardown is active. See notes/agent-swarm-teardown-plan-2026-05-21.md.",
"updatedAt": "2026-05-21T00:00:00.000Z"
"paused": false,
"reason": "Swarm thawed after dry-run, model-output logging, and hourly model-output inspection were installed.",
"updatedAt": "2026-05-21T18:18:00.000Z"
}

View file

@ -243,3 +243,4 @@
{"ts":"2026-05-21T17:44:48Z","type":"implementation","status":"ok","note":"Switched repo Face heartbeat/dry-run defaults from gpt-5.3-codex-spark to gpt-5.4-mini after pricing check; dry-run harness now defaults to real read-only retrieval with forbidden child-tool detection, and worker retries/drops Face turns that touch private state or MCP inventory tools."}
{"ts":"2026-05-21T17:53:10Z","type":"implementation","status":"ok","note":"Added repo Face Codex model preference chain. Heartbeat jobs now pass REPO_FACE_HEARTBEAT_CODEX_MODELS through owner Codex, which tries Spark first and automatically falls back to gpt-5.4-mini on quota/rate/capacity/model-access failures while recording the model used in trace artifacts."}
{"ts":"2026-05-21T18:12:10Z","type":"implementation","status":"ok","note":"Added central model-output JSONL logging for owner-Codex model attempts and an hourly Codex automation that runs scripts/inspect-model-output-logs.mjs over the last hour for observability-only warnings."}
{"ts":"2026-05-21T18:51:14Z","type":"implementation","status":"ok","note":"Restarted the repo Face swarm after teardown hardening: thawed pause flag, enabled GameCult Local Orchestrator, restarted fresh bot/worker stack, verified healthy watchdog/Bifrost/repo-face pulses, added model-output inspection, preserved raw Interpreter output for side-effect parsing, rejected malformed action blocks, routed owner-directed Face speech to owner DM, and opened missing symbolic Bifrost topics instead of failing turns."}

View file

@ -14,11 +14,11 @@ objective:
Aetheria lore, while keeping the system understandable enough to modify
safely.
current: >
Keep feature work on moderation, mood, and self-state stopped while the
private state boundary is rebuilt around the typed CultCache `.cc` store.
The immediate priority is to rebuild the scheduled phase machine and memory
maintenance from typed operations instead of feeding the next Void any
legacy projection or mirror state.
Keep the repo Face swarm online under watch after the 2026-05-21 teardown
restart. The immediate priority is to harden the Face/Interpreter/Bifrost
boundary with live evidence: no structured action truncation, no fake
channel ids, no failed turns from private speech, and no direct dispatch
outside Bifrost governance.
constraints:
- Public traffic still rides one remote Qwen box plus local embedding and ops infrastructure.
@ -55,10 +55,10 @@ data_flow:
- keep persistent state lean enough that re-entry sharpens the next turn instead of drowning it
active_subgoals:
- Treat `notes/agent-swarm-teardown-plan-2026-05-21.md` as the current repo Face/Bifrost/CTB rebuild authority. The repo Face swarm loop is architectural Jenga: scheduling, prompt policy, speech, governance, identity, Bifrost transport, and work dispatch must be torn down into clearer ownership before any swarm feature work or restart.
- Treat `notes/agent-swarm-teardown-plan-2026-05-21.md` as the historical teardown authority and the restart checklist. The repo Face swarm is live again, but only because the scheduler, prompt, model-output logs, parent Interpreter, Bifrost routing, and worker side-effect rails now have explicit observable boundaries. Keep watching for prompt/parser/transport Jenga before adding new swarm features.
- Make the new project-state surfaces the default continuity path for nontrivial VoidBot work.
- Keep the rebuilt moderation/self-state foundation on canonical CultCache `.cc` typed operations, never an editable JSON working projection.
- Keep the typed moderation, mood, repo Face, Bifrost dispatch, and watchdog organs behind the single `GameCult Local Orchestrator` scheduled pulse; the per-organ scheduled tasks are legacy installer surfaces and should stay disabled unless a deliberate isolation test needs one. As of the 2026-05-21 swarm shutdown, the orchestrator task itself is intentionally disabled until the agent-swarm failure audit restart conditions are met.
- Keep the typed moderation, mood, repo Face, Bifrost dispatch, and watchdog organs behind the single `GameCult Local Orchestrator` scheduled pulse; the per-organ scheduled tasks are legacy installer surfaces and should stay disabled unless a deliberate isolation test needs one. As of the 2026-05-21 restart, the orchestrator task is enabled and is the live swarm pulse owner.
- Keep legacy moderation mirrors, whole-state projection commits, and deleted memory-organ compensators from re-entering the active path before adding more moderation, mood, agency, or public-lane behavior.
- Keep public-lane limits, moderation, and provider behavior constrained enough that one 4060 Ti box does not get flayed for sport.
- Preserve boring observability and startup discipline around Postgres, Qdrant, Ollama, Docker, backups, scheduled tasks, watchdogs, and any private local fire-signal extensions.
@ -228,5 +228,5 @@ rejected_paths:
reason: sleep/distillation that collapses concrete claims into generic abstraction creates memory nonsense and then forces later cleanup compensators
current_status:
summary: VoidBot's ordinary bot/worker/provider/RAG/Postgres/Qdrant/CultCache structure is still conceptually sound, but the repo Face swarm loop is now officially under teardown. The unstable organ is the prompt-and-parser machine that mixed CTB scheduling, public speech, identity, social policy, Bifrost governance, Discord mirroring, and Codex/GitHub dispatch. The `GameCult Local Orchestrator` scheduled task remains disabled as containment; ordinary bot/worker inspection remains available.
next_action: Use `notes/agent-swarm-teardown-plan-2026-05-21.md` as the active rebuild map and `notes/agent-swarm-shutdown-audit-2026-05-21.md` as incident evidence. The first teardown cut landed, including repo pause gate, active turn framing, Spark/Codex parent Interpreter with one retry, sanitizer deletion, legacy UPDATE REQUEST reconciliation into Bifrost topics, prompt-surface extraction into `prompts/`, and the slim character protocol where children should receive roleplay-friendly memory/mood/obligation projection and write natural turns while the parent Interpreter emits structured state, speech, and Bifrost intents. The inbound state-projector prompt exists and now explicitly requires values, drives, wounds, fascinations, aesthetic taste, dignity, social reads, bonds, and affect pressure when state contains them. `repo-face-conversation-projector.prompt.md` owns current-room/nearby-channel logs -> narrative conversational memory, so raw chat bullets are no longer assembled into the child prompt. Deterministic prompt assembly/inspection is restored as `scripts/run-repo-face-heartbeats.ts --assemble-prompt <identity>`: code assembles stable templates, channel policy, repo/archive research guidance, Bifrost digest, and supplied Interpreter memory/conversation surfaces, while Spark/Codex alone translates typed state and raw conversation into character-facing prose. Direct-call and first-introduction duties are now situational prompt facts, not permanent prompt law. The next cut is wiring the state and conversation projectors as actual Spark/Codex Interpreter calls; until then, repo Face turns intentionally lack projected prose rather than using a fake substitute. Identity collapse is in progress. 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. Do not re-enable the swarm until Bifrost work routing, identity authority, scheduler/job lifecycle ownership, and public speech gating are rebuilt around explicit invariants.
summary: VoidBot's bot/worker/provider/RAG/Postgres/Qdrant/CultCache structure is live, and the repo Face swarm has been restarted after the 2026-05-21 teardown pass. `GameCult Local Orchestrator` is enabled as the single pulse owner; watchdog, Bifrost dispatch, mood, moderation, and repo Face CTB organs have all completed healthy post-restart pulses.
next_action: Keep the swarm awake but watched. The restart cut landed model-output JSONL logging, hourly model-output inspection, Spark->mini model fallback, pause-flag thaw, fresh stack restart, parser validation for malformed action blocks, raw Interpreter-output parsing before Discord truncation, owner-DM routing for `SAY channel: owner`, and Bifrost topic fallback creation when a Face supplies a symbolic topic id that does not exist yet. Next work should harden the inspector's warning classifier and continue cutting any live prompt/parser/transport boundary leak found by model-output logs or worker errors.