From ed241b5d004f126d9f6cd468a1e30f7256c265a1 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 19 May 2026 12:32:07 +0100 Subject: [PATCH] Always announce Face article PRs --- apps/worker/src/index.ts | 21 ++++++++++++--------- notes/fresh-workspace-handoff.md | 2 +- scripts/run-repo-face-heartbeats.ts | 2 +- state/evidence.jsonl | 1 + state/map.yaml | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/apps/worker/src/index.ts b/apps/worker/src/index.ts index 67ba9a7..65bc89e 100644 --- a/apps/worker/src/index.ts +++ b/apps/worker/src/index.ts @@ -642,15 +642,18 @@ async function writeRepoIdentityArticleIntent(job: JobRecord, intent: RepoIdenti title: intent.title, }); - if (intent.shareContent && intent.shareContent.trim().length > 0) { - const prLine = pr.url ? `\n\nPR: ${pr.url}` : `\n\nDraft branch: ${pr.branch}`; - await postRepoIdentityIntent(job, { - identity: identity.id, - channelId: intent.channelId ?? job.outputChannelId, - replyToMessageId: intent.replyToMessageId, - content: `${intent.shareContent}${prLine}`, - }); - } + const prLine = pr.url ? `\n\nPR: ${pr.url}` : `\n\nDraft branch: ${pr.branch}`; + const articleLine = `\nArticle path: ${relativePath}`; + const shareContent = + intent.shareContent && intent.shareContent.trim().length > 0 + ? intent.shareContent.trim() + : `${identity.displayName}: I drafted "${intent.title}" as a bylined article and submitted it for review.`; + await postRepoIdentityIntent(job, { + identity: identity.id, + channelId: intent.channelId ?? job.outputChannelId, + replyToMessageId: intent.replyToMessageId, + content: `${shareContent}${prLine}${articleLine}`, + }); } function submitArticlePullRequest(input: { diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 90e28de..7d0d570 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -106,7 +106,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou - Repo Face prompts now include an identity doctrine block. Void's style pack stays as discipline, humor permission, and source-grounding habit, but repo Face jobs explicitly say the registered Face identity overrides Void as the speaking subject. - Repo Face identity is now seeded into the typed `.cc` self profile during initialization and passed through repo Face MCP state reads/writes. The renderer may still provide identity context, but raw state should not quietly say `Void` for a non-Void Face. - Repo Face prompts now also grant advisory repo-change agency: Faces may build long-running maps of their repos and propose concrete changes, but Discord jobs stay read-only and must ask for human consensus before implementation changes canonical repo material. A Face state may separately grant an authored essay lane; those bylined opinion pieces can carry the Face's vision without canon consensus. -- Repo Face bylined article lanes now have a parent-owned PR path. A `repo-face-rumination` job may emit `VOIDBOT_REPO_IDENTITY_ARTICLE` with identity/title/path/content/shareContent; the worker writes the article under the registered identity repo on a new branch, opens a draft PR, and optionally posts the share through the registered webhook persona. Use this for explicit bylined perspective/worldbuilding articles, not stealth canon edits. +- Repo Face bylined article lanes now have a parent-owned PR path. A `repo-face-rumination` job may emit `VOIDBOT_REPO_IDENTITY_ARTICLE` with identity/title/path/content/shareContent; the worker writes the article under the registered identity repo on a new branch, opens a draft PR, and always posts the PR or branch through the registered webhook persona, using a generated announcement if the Face omits shareContent. Use this for explicit bylined perspective/worldbuilding articles, not stealth canon edits. - First role-addressed chat also initializes the target repo's local `.voidbot` home. `ensureRepoFaceInitialized` resolves `repoPath` from the registry, `SOURCE_REPO_ROOT`, or `E:/Projects/`, creates `voice/`, `state/`, `birth/`, and `logs/`, writes `voice/identity.json`, then starts `scripts/run-repo-face-birth.mjs` detached. That worker runs EpiphanyAgent's `epiphany-repo-personality scout` and `epiphany-repo-birth-runner` so newborn personality/memory/trajectory packets come from repo contents and git history. Status and logs live in the target repo under `.voidbot/birth/voidbot-face-birth.json` and `.voidbot/logs/voidbot-face-birth.log`. - Agent heartbeats now use one CTB/Final-Fantasy-X-style initiative queue. `scripts/run-repo-face-heartbeats.ts` still has its old filename, but it now reconciles built-in system agents plus registered repo Faces, stores the roster at `REPO_FACE_HEARTBEAT_STATE_PATH`, advances virtual initiative time independently of wall-clock due dates, and dispatches selected turns. Repo Faces queue normal `repo-face-rumination` jobs; built-in `void` starts the existing moderation rumination runner as its turn. Active jobs/locks freeze initiative: recovery starts only after the owner-Codex job or Void moderation lock clears, and completion cannot grant another turn in the same pulse. `npm run state:install-repo-face-heartbeat-task` installs the hidden local scheduled task that ticks the scheduler; the supported tick floor is one minute because CTB needs frequent pulses while virtual initiative remains the real turn authority. Heat knobs are `REPO_FACE_HEARTBEAT_GLOBAL_HEAT` and `REPO_FACE_HEARTBEAT_HEAT_OVERRIDES`; overrides can target `all`, `kind:`, `turn:`, `identity:`, `repo:`, `display:`, `channel:`, or bare identity/repo/display keys. Repo Face prompts now include a jurisdiction-dive cadence so unattended heartbeats periodically inspect repo/history terrain with source tools and convert real findings into state, proposals, essay seeds, agency pressure, or speech. - Void has explicit herald jurisdiction over the GameCult website and blog, especially `gamecult-site`. Routine rumination still cannot edit tracked files directly, but the prompt now tells Void to queue article-proposal candidates when a pressure wants to become a Void-authored site/blog piece rather than a Discord aside. diff --git a/scripts/run-repo-face-heartbeats.ts b/scripts/run-repo-face-heartbeats.ts index e31017f..1ade0f4 100644 --- a/scripts/run-repo-face-heartbeats.ts +++ b/scripts/run-repo-face-heartbeats.ts @@ -837,7 +837,7 @@ function buildHeartbeatPrompt(input: { "Use the heartbeat initiative snapshot as authoritative scheduler history: queuedCount greater than 0 means this Face has already had at least one bearing-taking heartbeat. If queuedCount is greater than 0 and the Face state shows no public speech receipt or clear memory that it already introduced itself, a brief in-channel introduction is warranted now.", "A new source-grounded opinion, concrete proposal, bylined essay/article plan, or agency pressure can earn persistence or speech even when the room has not asked a fresh direct question.", `Do not call post_repo_identity_message from this unattended heartbeat. If an in-channel note is warranted, output one final line beginning with VOIDBOT_REPO_IDENTITY_POST: followed by compact JSON like {"identity":"${input.identity.id}","channelId":"${input.channelId}","replyToMessageId":"...","content":"..."}; the worker owns delivery and receipt recording.`, - `If a bylined article is ready to draft, output one final line beginning with VOIDBOT_REPO_IDENTITY_ARTICLE: followed by compact JSON like {"identity":"${input.identity.id}","path":"Aetheria/Articles/${input.identity.displayName}/title-slug.md","title":"...","content":"---\\ntitle: ...\\nauthor: ${input.identity.displayName}\\n---\\n\\n...","channelId":"${input.channelId}","replyToMessageId":"...","shareContent":"I drafted ..."}; the worker writes the repo file on a new branch, opens a draft PR, and posts the share. Use this for bylined perspective/worldbuilding articles, not consensus-gated canon edits.`, + `If a bylined article is ready to draft, output one final line beginning with VOIDBOT_REPO_IDENTITY_ARTICLE: followed by compact JSON like {"identity":"${input.identity.id}","path":"Aetheria/Articles/${input.identity.displayName}/title-slug.md","title":"...","content":"---\\ntitle: ...\\nauthor: ${input.identity.displayName}\\n---\\n\\n...","channelId":"${input.channelId}","replyToMessageId":"...","shareContent":"I drafted ..."}; the worker writes the repo file on a new branch, opens a draft PR, and always posts the PR or branch through the registered identity. Provide shareContent if you want control of the announcement tone. Use this for bylined perspective/worldbuilding articles, not consensus-gated canon edits.`, "If nothing earns persistence or speech, return a short private summary.", ] .filter((line): line is string => typeof line === "string") diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 87c3026..5009174 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -163,3 +163,4 @@ {"ts":"2026-05-19T11:14:00Z","type":"implementation","status":"ok","note":"Mood drift now refreshes scheduledRuntime.speakingPressure from canonical speech receipts even when a moderation lock makes it skip deeper sleep/mood work; live state was repaired to lastSpokeAt=2026-05-19T10:47:05.937Z with recentSpeechDamping=0.888. The moderation runner now overwrites the advertised tracePath with current Codex stdout/stderr so stale legacy JSON-projection traces stop misleading inspection."} {"ts":"2026-05-19T11:22:26Z","type":"implementation","status":"ok","note":"Repo Face bylined article lanes now have a parent-owned worker rail: heartbeats may emit VOIDBOT_REPO_IDENTITY_ARTICLE with identity/title/path/content/shareContent, the worker writes the article inside the registered identity repo, and optional shareContent is posted through the registered persona. Nibu's prompt now frames Aetheria worldbuilding terms such as wavecrafters as consensus-gathering article seeds and allows shoot-first bylined drafts while keeping canon edits consensus-gated."} {"ts":"2026-05-19T11:25:23Z","type":"implementation","status":"ok","note":"Adjusted the repo Face article rail to submit draft PRs instead of silently writing articles into the target repo: VOIDBOT_REPO_IDENTITY_ARTICLE now writes on a new branch, commits, pushes, opens a draft PR with gh when available, and includes the PR/branch in the registered-identity share."} +{"ts":"2026-05-19T11:31:44Z","type":"implementation","status":"ok","note":"Repo Face article PR submission now always announces through the registered identity; shareContent only controls tone, and the worker generates a fallback post with PR/branch plus article path when omitted."} diff --git a/state/map.yaml b/state/map.yaml index 6159398..e6ebe50 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -94,7 +94,7 @@ accepted_design: - A Face is a typed `.cc` state file resolved from the identity registry. Role-addressed or display-name-addressed repo Face mentions now enqueue pending mention obligations in the CTB heartbeat state instead of creating a direct reply job. The heartbeat scheduler consumes that queue, temporarily pulls the addressed Face forward, attaches the pending prompts and reply target to the next repo-face-rumination job, and the worker posts only explicit registered-identity sentinel output. - Face prompts carry explicit Epiphany identity doctrine. The base Void style pack contributes discipline, humor permission, and source-grounding habits, but the registered Face state, Epiphany, repo-local `.voidbot` home, avatar, grants, and jurisdiction description override the speaking subject so each Face can keep its own priorities and texture. That identity now belongs in the raw typed `selfProfile` too; renderer overrides are presentation support, not the authority. - Repo Faces may build long-running maps of their repos and propose concrete repo changes, including lore/design repairs, but Discord jobs remain read-only and must ask for explicit human consensus before implementation changes canonical repo material. Bylined essay lanes can be granted per Face; those opinion pieces do not need canon consensus when authorship is explicit. - - Repo Face bylined article lanes have a parent-owned PR rail. A `repo-face-rumination` job may emit `VOIDBOT_REPO_IDENTITY_ARTICLE` with identity/title/path/content/shareContent; the worker validates the registered identity, writes the article inside that identity's repo on a new branch, opens a draft PR, and optionally posts the share through the registered persona. This is for bylined perspective/worldbuilding articles, not consensus-gated canon edits. + - Repo Face bylined article lanes have a parent-owned PR rail. A `repo-face-rumination` job may emit `VOIDBOT_REPO_IDENTITY_ARTICLE` with identity/title/path/content/shareContent; the worker validates the registered identity, writes the article inside that identity's repo on a new branch, opens a draft PR, and always posts the PR or branch through the registered persona, using a generated announcement if the Face omits shareContent. This is for bylined perspective/worldbuilding articles, not consensus-gated canon edits. - Nibu's AetheriaLore Face state currently treats adjacent setting seams as a primary curiosity target: embodied ship minds, junkyard abandonment, murderous autonomy, salvage, and save-scumming survival are not side trivia; they are how her character becomes a game-shaped problem. - Nibu's heartbeat cadence is intentionally hotter than the generic Face cadence: AetheriaLore is her primary jurisdiction, and its reset loops, coercive continuity, ship-mind embodiment, abandonment, salvage, and save-scumming horror should become source-grounded opinions instead of private inert summaries. - Nibu now stewards `Aetheria/Lore/Nibu.md` and may produce Nibu-authored Aetheria lore essays as opinionated perspective. Character-note/canon edits still need consensus; bylined essays do not.