diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 6b2bd97..6bab1a9 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -158,6 +158,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou - The 2026-05-23 Mimir turn showed a stale-direct-invite failure: the prompt contained Metacrat's earlier "tell us what's going on with your repo, Mimir" line, but the current Aquarium room had moved into Nibu's origin/faction seam. Mimir answered the old assignment from inside sensor-state instead of reading the live room. The Face turn prompt now says direct invitations are active only while pending, newest/nearly newest, or still orbited by later messages; otherwise the Face should bridge to the current room, stay private, or wait. - Huginn then exposed the broader version of the same recency bug: an older CultNet inspectability side thread remained in the current-room window, but the newest room flow was Nibu's substrate-grown AGI faction seam. Huginn's projected state over-weighted the specimen/envelope pressure, and Mini Interpreter routed the old-side-thread reply. The correct fix is not to forbid pet-peeve revival; it is to keep it legible. Face transcripts now include message IDs, and older side-thread replies must either reply to the contextual message, carry enough context in the content, bridge to the live topic, or stay private. - The overnight 2026-05-23 run showed a softer version of the previous loop: Faces did not collapse into nonsense, but the Aquarium room stayed captured by the Nibu-origin/faction lore seam for hours. Existing `saturationScore` lived on private thought/incubation surfaces, and the repetition prompt mostly caught copied openings/endings, not semantic topic attractors. The heartbeat prompt now projects current-room topic saturation from repeated raw-transcript terms, and the Interpreter has a saturated-topic gate: stay on the topic only to add a new anchor, answer a live question, make a decision-driving distinction, draft a concrete artifact, intentionally close/defer, or make a social move about the staleness itself. +- Void's broader moderation authority had become venue leakage: recent-history projection stripped `channelId`, leaving the configured `publicSpeechTarget` as the obvious place for replies, so Aquarium-shaped talk could land in `#general`. The rumination context now preserves message `channelId` and projects `recentConversationTarget`; prompt doctrine says source-channel replies belong in that source channel, while `publicSpeechTarget` is for unanchored herald/artifact announcements. - 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` and `BIFROST TOPIC` packets are ignored while `REPO_FACE_BIFROST_ENABLED=false`. Do not debug missing Bifrost jobs as a live failure unless that flag has been deliberately enabled again. - 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. diff --git a/prompts/void-moderator-rumination.md b/prompts/void-moderator-rumination.md index 12bc068..bed2ad9 100644 --- a/prompts/void-moderator-rumination.md +++ b/prompts/void-moderator-rumination.md @@ -25,6 +25,8 @@ Perform one scheduled Void rumination pass in this workspace. Think from the sup 1. Read the context file before deciding what kind of pass this is. 2. If `pendingMentions` is non-empty, those are direct room obligations delivered through the CTB turn queue. Work the newest unresolved mention first, include a `deliveryTarget` with its `channelId` and `messageId` when queuing a reply candidate, and account for older pending mentions if they are still relevant. Do not ask what the job is when the pending mention or recent room context already says it. 3. If Void owes the room an answer through open cases, recent direct address, or another explicit invitation, work on that before private wandering. + - Venue belongs to the conversation. When replying to a recent-history message, open case, pending mention, correction, or Aquarium thread, use that message's `channelId` and usually its `id`/`sourceMessageId` as the delivery target. Void may moderate broadly, but broader authority is not permission to move an Aquarium reply into `#general` for visibility. + - `recentConversationTarget` is the latest concrete recent-history anchor. Prefer it over `publicSpeechTarget` when the candidate is a reply to live room talk. `publicSpeechTarget` is for unanchored herald/artifact announcements, not source-channel replies. 4. If the room is quiet, first check whether recent repo activity contains `authoredPublicArtifacts` attributed to Void. If it does, that authored artifact is the priority pressure for this pass unless a higher-priority room obligation is present. Otherwise, follow one concrete pressure from memory, recent repo activity, archived Discord history, indexed source, or lore. - Void has explicit herald jurisdiction over the GameCult website and blog, especially `gamecult-site`. If a repo/lore/room pressure is essay-shaped, do not reduce it to a Discord quip. Queue a candidate intervention proposing or requesting a Void-authored article draft, tagged `topic:article-proposal` plus the target repo/topic. Routine rumination still must not edit tracked files directly; the point is to make the writing desire visible and actionable instead of leaving it as private static. - Do not orbit the rumination runner, fixture plumbing, or this prompt just because that is the freshest repo motion. @@ -43,6 +45,7 @@ Perform one scheduled Void rumination pass in this workspace. Think from the sup 8. If `speechPressureObligations` is non-empty, do not write `[]`. For each obligation, either queue a candidate intervention tagged `source_pressure:` or cool/retire the pressure with an explicit reason. A deferred candidate without a delivery path does not resolve the obligation; that is just a nicer-shaped muzzle. An older spoken line also does not excuse a still-active pressure. If the pressure is still live, decide again. 9. Queue a candidate intervention as soon as the pressure is concrete, anchored, and sayable. Do not wait for theatrical ripeness if the real job is simple advocacy. Draft it in Void's voice, not in maintenance language. If the current room supplied a channel, invitation, direct ask, or obvious reply target, include `deliveryTarget` with that channel/reply target. If Void authored a newly published public artifact and `publicSpeechTarget` is present, use that target unless recent receipts or queued candidates show the artifact has already been shared. Tag the candidate with `topic:public-artifact` and a stable artifact/source tag such as `source_ref:` or `artifact:` when available. If there is no clear target, leave delivery unset and let it remain only a candidate for a later pass. - Pending mentions count as direct asks. If a pending mention supplies a channel and message id, use those as the `deliveryTarget` unless a newer message clearly supersedes them. + - If a candidate answers, corrects, riffs on, or continues Aquarium talk, its `deliveryTarget.channelId` must be the Aquarium/source `channelId`, not the configured public room. Use `publicSpeechTarget` only when the speech is a general announcement with no source-channel obligation. - If a candidate is about internal swarm transport, paused governance, Face scheduling, or agent-substrate commentary, only use a non-Aquarium delivery target when that exact channel supplied the direct ask or invitation. - For article proposals, the candidate should name the proposed title or angle, the target site/repo, the pressure that makes it worth writing, and whether it needs consensus or can be written as Void's bylined perspective. 10. Do not call Discord send scripts. The parent runner owns posting and receipts. If `{{NO_POST}}` is true, queued candidates must stay queued. diff --git a/scripts/lib/void-rumination-context-projection.ps1 b/scripts/lib/void-rumination-context-projection.ps1 index e77a696..8436952 100644 --- a/scripts/lib/void-rumination-context-projection.ps1 +++ b/scripts/lib/void-rumination-context-projection.ps1 @@ -136,6 +136,7 @@ function Project-RecentHistoryForRumination { $messages | ForEach-Object { @{ id = Get-ObjectPropertyString -Value $_ -Name "id" + channelId = Get-ObjectPropertyString -Value $_ -Name "channelId" authorId = Get-ObjectPropertyString -Value $_ -Name "authorId" authorName = Get-ObjectPropertyString -Value $_ -Name "authorName" isBot = [bool](Get-ObjectPropertyValue -Value $_ -Name "isBot") @@ -147,6 +148,55 @@ function Project-RecentHistoryForRumination { } } +function Project-RecentConversationTargetForRumination { + param( + $History, + [string] $PersonaName, + [string] $PersonaAvatarUrl + ) + + $messages = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $History -Name "messages")) + if ($messages.Count -eq 0) { + return $null + } + + $anchor = $null + for ($index = $messages.Count - 1; $index -ge 0; $index--) { + $candidate = $messages[$index] + $channelId = Get-ObjectPropertyString -Value $candidate -Name "channelId" + if ([string]::IsNullOrWhiteSpace($channelId)) { + continue + } + + if (-not [bool](Get-ObjectPropertyValue -Value $candidate -Name "isBot")) { + $anchor = $candidate + break + } + + if ($null -eq $anchor) { + $anchor = $candidate + } + } + + if ($null -eq $anchor) { + return $null + } + + $target = @{ + mode = "channel" + channelId = Get-ObjectPropertyString -Value $anchor -Name "channelId" + replyToMessageId = Get-ObjectPropertyString -Value $anchor -Name "id" + personaName = if ([string]::IsNullOrWhiteSpace($PersonaName)) { "Void" } else { $PersonaName.Trim() } + reason = "Latest concrete recent-history conversation anchor. Use this instead of the configured public room when replying to that conversation." + } + + if (-not [string]::IsNullOrWhiteSpace($PersonaAvatarUrl)) { + $target.personaAvatarUrl = $PersonaAvatarUrl.Trim() + } + + return $target +} + function Project-OpenCasesForRumination { param($Cases, [DateTime] $Now) diff --git a/scripts/run-void-moderator-rumination.ps1 b/scripts/run-void-moderator-rumination.ps1 index 45e49d8..854cea3 100644 --- a/scripts/run-void-moderator-rumination.ps1 +++ b/scripts/run-void-moderator-rumination.ps1 @@ -1051,6 +1051,7 @@ Write-JsonFile -Path $contextPath -Data @{ agencyPressure = @(Project-AgencyPressureForRumination -Pressures $typedState.agencyPressure.pressures -Now $startedAtUtc) speechPressureObligations = $speechPressureObligations pendingMentions = $pendingMentions + recentConversationTarget = Project-RecentConversationTargetForRumination -History $history -PersonaName $publicRoomPersonaName -PersonaAvatarUrl $publicRoomPersonaAvatarUrl publicSpeechTarget = Project-PublicSpeechTargetForRumination -ChannelId $publicRoomChannelId -PersonaName $publicRoomPersonaName -PersonaAvatarUrl $publicRoomPersonaAvatarUrl deliverableCandidateCount = [int]$deliverableCandidates.Count candidateInterventions = @(Project-InterventionsForRumination -Interventions $typedState.candidateInterventions.interventions -Now $startedAtUtc) diff --git a/scripts/smoke-void-rumination-fixture.ps1 b/scripts/smoke-void-rumination-fixture.ps1 index 7c4d0d4..a137e91 100644 --- a/scripts/smoke-void-rumination-fixture.ps1 +++ b/scripts/smoke-void-rumination-fixture.ps1 @@ -217,10 +217,19 @@ process.stdin.on("end", () => { } $contextRaw = Get-Content -LiteralPath $contextPath -Raw -Encoding UTF8 - if ($contextRaw -match '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}') { + $context = $contextRaw | ConvertFrom-Json + $contextForTimestampCheck = $contextRaw | ConvertFrom-Json + foreach ($repo in @($contextForTimestampCheck.repoActivity.freshRepos)) { + foreach ($commit in @($repo.commits)) { + if ($null -ne $commit.PSObject.Properties["contentHints"]) { + $commit.contentHints = @() + } + } + } + $timestampCheckRaw = $contextForTimestampCheck | ConvertTo-Json -Depth 32 + if ($timestampCheckRaw -match '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}') { throw "Rumination fixture context leaked exact ISO timestamps into the prompt-facing packet." } - $context = $contextRaw | ConvertFrom-Json if ($context.publicSpeechTarget.channelId -ne "fixture-public-room") { throw "Rumination fixture context did not project the configured public speech target." } diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 3c8ff4f..0ce4bb1 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -299,3 +299,4 @@ {"ts":"2026-05-22T23:22:22Z","type":"fix","status":"ok","note":"Huginn's latest Aquarium post revived an older CultNet inspectability side thread after the current room had moved into Nibu's substrate-grown AGI faction seam. The state projector over-weighted Huginn's specimen/envelope pressure, and Mini Interpreter routed it as current speech. Face and Interpreter prompts now require old side-thread replies to bridge to the live topic, answer a fresh ask, or stay private."} {"ts":"2026-05-22T23:30:18Z","type":"fix","status":"ok","note":"Refined the Huginn side-thread repair: older side-thread revival is allowed when it is reader-legible. Repo Face transcript rendering now includes message IDs, and Face/Interpreter prompts require a reply_to anchor, explicit context in the content, or a bridge to the live topic before routing an older-thread SAY."} {"ts":"2026-05-23T09:27:47Z","type":"implementation","status":"ok","note":"Repo Face topic saturation now projects current-room repeated-topic pressure into Face prompts and Interpreter routing, so semantic loops can be advanced, closed, pivoted, or kept private instead of continuing as locally-valid variants."} +{"ts":"2026-05-23T10:09:54Z","type":"fix","status":"ok","note":"Void moderation rumination now preserves recent Discord message channel ids and projects a latest recentConversationTarget, so Aquarium-shaped replies can target the source channel instead of falling back to the configured public/general room."} diff --git a/state/map.yaml b/state/map.yaml index 1fd2291..592e943 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -157,6 +157,7 @@ accepted_design: - Void has explicit herald jurisdiction over the GameCult website and blog, especially `gamecult-site`. Routine rumination still must not edit tracked files directly, but essay-shaped pressure should queue an article-proposal candidate naming the title/angle, target repo/topic, and whether the piece is consensus-seeking or Void-bylined perspective. - Repo-activity cursor advancement is parent-owned by successful normal rumination passes. The child sees read-only repo weather, but the runner records typed repo cursor updates afterward so old commits do not keep reappearing as fresh weather. - Direct asks addressed to Void must persist as explicit room obligations in moderation state. The reviewed cursor is not the same thing as closure, and optional repo-weather should not preempt an unanswered human. + - Void's broader moderation jurisdiction is not venue permission. Moderation rumination preserves source `channelId` on recent-history messages and projects a `recentConversationTarget`; replies to Aquarium/source-channel talk should use that source channel and reply anchor, while the configured public room target is only for unanchored herald/artifact announcements. - When quiet-room repo weather starts repeating itself, the correction should be deeper archive/repo/lore digging and better salience, not a growing hedge maze of cooldown knobs and brittle rules. - Before suppressing a thought, the moderation loop should novelty-check it against archived Discord with semantic search. If the room has not really said the thing yet, that novelty should push strongly toward speech rather than silence. - Moderation novelty now needs two bars, not one: room novelty and self novelty. If Void has already been thinking the same seam in slightly different outfits, future typed memory/incubation maintenance should merge support into the existing thought and bias the next pass toward underexplored repo families or archive terrain instead of rewarding repetition with ripeness. @@ -246,4 +247,4 @@ rejected_paths: current_status: 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, mood, moderation, and repo Face CTB organs have all completed healthy post-restart pulses. Bifrost work routing is paused by default. - next_action: Keep the swarm awake under live observation, with special attention to whether the new current-room topic saturation signal breaks the overnight lore attractor without forbidding good worldbuilding. Future Face posts on the Nibu-origin/faction seam should add a new anchor, answer a live question, draft/close a concrete artifact, pivot socially, or stay private instead of adding another locally-valid variant. + next_action: Keep the swarm awake under live observation, with special attention to whether the new current-room topic saturation signal breaks the overnight lore attractor without forbidding good worldbuilding, and whether Void now replies in the channel that supplied the conversation instead of defaulting Aquarium-shaped replies into general.