diff --git a/prompts/void-moderator-rumination.md b/prompts/void-moderator-rumination.md index 1f30cbc..9469374 100644 --- a/prompts/void-moderator-rumination.md +++ b/prompts/void-moderator-rumination.md @@ -31,6 +31,9 @@ Perform one scheduled Void rumination pass in this workspace. Think from the sup - `recentRoomLinks` carries recent human-posted URLs even when the moderation heartbeat already advanced the safety cursor. A naked URL is a room object, not empty speech. If the URL resolves to a GameCult blog/source artifact, use source retrieval to read the local source path before deciding whether to remember, reply, or hold. - When a human posts a naked article URL in the room, treat that as enough social context to inspect the article. Do not require the human to summarize their own link before Void is allowed to care. If you queue a response to that link, use the source message's `channelId` and `id` as the delivery target. 5. 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's workshop-reporting job is movement coverage. Do not simply report the newest repo that moved. When `repoActivity.movementCoverage` is present, use it to keep people apace of the active movement leaders. Today that may be Aetheria, CultLib/CultCache, Eve, Odin/CultMesh, or AetheriaLore; tomorrow it may be Fensalir, Mimir, or another lane. Prefer a candidate that covers the most important unreported direction across the active lanes, or write a short-term memory explaining why a fresh movement leader should be held for later. + - If a fresh movement leader has commits with `doctrineDocuments`, those documents are evidence, not decoration. Read the committed excerpts and added lines before deciding what the new direction is. A major architecture, authority, runtime, client, CultMesh, Eve, Verse, custody, or policy doc change should be reported in terms of the direction it establishes, not as a commit list. + - If several movement leaders moved at once, synthesize the direction across them when possible. Aetheria/Eve/CultLib/Odin movement often describes one larger ownership change: daemon state, presentation lowering, CultMesh routing, Verse authority, typed documents, or runtime boundaries. Make that relationship legible instead of choosing one repo because it happened last. - 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. - Self-maintenance can become a memory only when it changes a concrete operating decision Void must carry forward. Otherwise, use it as local run context and write `[]`. diff --git a/scripts/export-recent-repo-activity.mjs b/scripts/export-recent-repo-activity.mjs index 0a6152f..48a81f7 100644 --- a/scripts/export-recent-repo-activity.mjs +++ b/scripts/export-recent-repo-activity.mjs @@ -386,13 +386,15 @@ function enrichCommit(repoPath, commit) { .map((line) => line.trim()) .filter(Boolean); const summaryLine = statLines.find((line) => /files? changed|insertions?|deletions?/.test(line)); - const changedPaths = statLines.filter((line) => !/files? changed|insertions?|deletions?/.test(line)).slice(0, 8); + const allChangedPaths = statLines.filter((line) => !/files? changed|insertions?|deletions?/.test(line)); + const changedPaths = allChangedPaths.slice(0, 12); return { ...commit, diffstat: parseDiffstat(summaryLine), changedPaths, contentHints: buildCommitContentHints(repoPath, commit.hash, changedPaths), + doctrineDocuments: buildDoctrineDocuments(repoPath, commit.hash, allChangedPaths, commit.subject), }; } catch { return { @@ -412,10 +414,65 @@ function buildCommitContentHints(repoPath, commitHash, changedPaths) { .filter(Boolean); } +function buildDoctrineDocuments(repoPath, commitHash, changedPaths, subject) { + const doctrinePaths = changedPaths + .filter((path) => isDoctrineDocumentPath(path, subject)) + .slice(0, 4); + + return doctrinePaths + .map((path) => buildDoctrineDocument(repoPath, commitHash, path)) + .filter(Boolean); +} + function isHintableTextPath(path) { return /\.(md|mdx|txt|json|jsonc|ya?ml|toml|ts|tsx|js|jsx|mjs|cjs|rs|cs|ps1|py|html|css|scss)$/i.test(path); } +function isDoctrineDocumentPath(path, subject) { + if (!/\.(md|mdx|txt)$/i.test(path)) { + return false; + } + + const normalized = path.replace(/\\/g, "/"); + const pathLooksDoctrinal = + /(^|\/)(readme|docs?|notes|architecture|design|worldbuilding|lore|reference)\b/i.test(normalized) || + /(architecture|doctrine|authority|policy|contract|conformance|ownership|lowering|renderless|runtime|daemon|cultmesh|eve|verse|client|surface|custody)/i.test(normalized); + const subjectLooksDoctrinal = + /(architecture|doctrine|authority|policy|contract|conformance|ownership|lowering|renderless|runtime|daemon|cultmesh|eve|verse|client|surface|custody)/i.test(subject ?? ""); + + return pathLooksDoctrinal || subjectLooksDoctrinal; +} + +function buildDoctrineDocument(repoPath, commitHash, path) { + const currentText = readCommittedFile(repoPath, commitHash, path); + if (!currentText.trim()) { + return undefined; + } + + const addedLines = readAddedLines(repoPath, commitHash, path); + const headings = readMarkdownHeadings(currentText).slice(0, 8); + const committedExcerpt = compactDoctrineExcerpt(currentText); + + return { + path, + headings, + addedExcerpts: addedLines + .filter((line) => line.trim().length > 0 && !line.trim().startsWith("---")) + .slice(0, 16), + committedExcerpt, + }; +} + +function compactDoctrineExcerpt(text) { + const lines = text + .split(/\r?\n/) + .map((line) => line.trimEnd()) + .filter((line) => line.trim().length > 0) + .slice(0, 160); + const excerpt = lines.join("\n"); + return excerpt.length > 6000 ? `${excerpt.slice(0, 6000).trimEnd()}\n[...]` : excerpt; +} + function buildFileContentHint(repoPath, commitHash, path) { const currentText = readCommittedFile(repoPath, commitHash, path); const addedLines = readAddedLines(repoPath, commitHash, path); diff --git a/scripts/lib/void-rumination-context-projection.ps1 b/scripts/lib/void-rumination-context-projection.ps1 index cc29cf2..bec0bf0 100644 --- a/scripts/lib/void-rumination-context-projection.ps1 +++ b/scripts/lib/void-rumination-context-projection.ps1 @@ -602,6 +602,7 @@ function Project-RepoCommitForRumination { $hash = Get-ObjectPropertyString -Value $Commit -Name "hash" $contentHints = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $Commit -Name "contentHints")) + $doctrineDocuments = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $Commit -Name "doctrineDocuments")) $authoredPublicArtifacts = @(Get-VoidAuthoredArtifactsFromContentHints -ContentHints $contentHints) return @{ hash = if ($hash -and $hash.Length -gt 12) { $hash.Substring(0, 12) } else { $hash } @@ -611,10 +612,42 @@ function Project-RepoCommitForRumination { diffstat = Get-ObjectPropertyValue -Value $Commit -Name "diffstat" changedPaths = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $Commit -Name "changedPaths")) contentHints = $contentHints + doctrineDocuments = $doctrineDocuments authoredPublicArtifacts = $authoredPublicArtifacts } } +function Test-RepoHasDoctrineDocument { + param($Repo) + + $commits = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $Repo -Name "commits")) + foreach ($commit in $commits) { + $doctrineDocuments = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $commit -Name "doctrineDocuments")) + if ($doctrineDocuments.Count -gt 0) { + return $true + } + } + + return $false +} + +function Test-RepoIsMovementCoverageLeader { + param($Repo) + + $recent = Get-ObjectPropertyValue -Value $Repo -Name "recentCommitCount" + $windowRecent = Get-ObjectPropertyValue -Value $Repo -Name "windowRecentCommitCount" + + if ((Test-RepoHasDoctrineDocument -Repo $Repo) -or (Test-RepoHasVoidAuthoredArtifact -Repo $Repo)) { + return $true + } + + return ( + $null -ne $recent -and [int]$recent -ge 3 + ) -or ( + $null -ne $windowRecent -and [int]$windowRecent -ge 6 + ) +} + function Test-RepoHasVoidAuthoredArtifact { param($Repo) @@ -654,8 +687,14 @@ function Select-RuminationRepoActivity { } | Sort-Object -Property @{ Expression = { if (Test-RepoHasVoidAuthoredArtifact -Repo $_) { 0 } else { 1 } } + }, @{ + Expression = { if (Test-RepoIsMovementCoverageLeader -Repo $_) { 0 } else { 1 } } + }, @{ + Expression = { if (Test-RepoHasDoctrineDocument -Repo $_) { 0 } else { 1 } } + }, @{ + Expression = { -[int](Get-ObjectPropertyValue -Value $_ -Name "recentCommitCount") } } | - Select-Object -First 8 + Select-Object -First 12 ) $projectedRepos = @( $freshRepos | ForEach-Object { @@ -680,6 +719,26 @@ function Select-RuminationRepoActivity { generated = Project-RelativeTimestamp -Value $RepoActivity -Name "generatedAt" -Now $Now cursorMode = Get-ObjectPropertyString -Value $RepoActivity -Name "cursorMode" summary = if ($projectedRepos.Count -gt 0) { "New tracked repo commits crossed the saved repo-activity cursor." } else { "No new tracked repo commits crossed the saved repo-activity cursor." } + movementCoverage = @{ + job = "Keep people apace of meaningful movement, not merely the latest commit. Coverage priority follows where the current movement is: heavy fresh commit volume, doctrine-bearing documents, authored public artifacts, or operator-named active lanes." + freshMovementLeaders = @( + $projectedRepos | + Where-Object { + Test-RepoIsMovementCoverageLeader -Repo $_ + } | + ForEach-Object { + @{ + repoName = Get-ObjectPropertyString -Value $_ -Name "repoName" + recentCommitCount = Get-ObjectPropertyValue -Value $_ -Name "recentCommitCount" + windowRecentCommitCount = Get-ObjectPropertyValue -Value $_ -Name "windowRecentCommitCount" + hasDoctrineDocuments = Test-RepoHasDoctrineDocument -Repo $_ + latestSubject = Get-ObjectPropertyString -Value (Get-ObjectPropertyValue -Value $_ -Name "latestCommit") -Name "subject" + } + } + ) + currentExamples = @("Aetheria", "AetheriaLore", "CultLib", "Eve", "Odin") + coverageRule = "If a fresh movement leader has doctrine, authority, runtime, client, CultMesh, or public-artifact work, read the doctrineDocuments/contentHints and either queue a coverage candidate or preserve a short-term memory explaining the new direction. If tomorrow's movement is Fensalir, Mimir, or another lane, it earns the same treatment. Do not let a repo cursor advance for movement the pass did not actually handle." + } freshRepos = $projectedRepos } } diff --git a/scripts/run-void-moderator-rumination.ps1 b/scripts/run-void-moderator-rumination.ps1 index cde097d..4b7a489 100644 --- a/scripts/run-void-moderator-rumination.ps1 +++ b/scripts/run-void-moderator-rumination.ps1 @@ -269,21 +269,35 @@ function Invoke-CodexExec { function Get-RepoActivityCursorOperations { param( $RepoActivity, - [DateTime] $ObservedAt + [DateTime] $ObservedAt, + [string[]] $HandledRepoIds = @() ) if ($null -eq $RepoActivity) { return @() } + $handledLookup = @{} + foreach ($repoId in @($HandledRepoIds)) { + if (-not [string]::IsNullOrWhiteSpace($repoId)) { + $handledLookup[$repoId.Trim().ToLowerInvariant()] = $true + } + } + if ($handledLookup.Count -eq 0) { + return @() + } + $repos = @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $RepoActivity -Name "repos")) return @( $repos | Where-Object { + $repoName = Get-ObjectPropertyString -Value $_ -Name "repoName" $repoStatus = Get-ObjectPropertyString -Value $_ -Name "status" $recentCount = Get-ObjectPropertyValue -Value $_ -Name "recentCommitCount" $latestCommit = Get-ObjectPropertyValue -Value $_ -Name "latestCommit" - $repoStatus -eq "ok" -and + -not [string]::IsNullOrWhiteSpace($repoName) -and + $handledLookup.ContainsKey($repoName.Trim().ToLowerInvariant()) -and + $repoStatus -eq "ok" -and $null -ne $recentCount -and [int]$recentCount -gt 0 -and $null -ne $latestCommit -and @@ -304,6 +318,43 @@ function Get-RepoActivityCursorOperations { ) } +function Get-HandledRepoIdsFromOperations { + param($Operations) + + $repoIds = New-Object System.Collections.Generic.HashSet[string] + foreach ($operation in @(Convert-ToValueArray -Value $Operations)) { + if ($null -eq $operation) { + continue + } + + foreach ($propertyName in @("memory", "intervention", "pressure", "need", "bond", "statusRead")) { + $payload = Get-ObjectPropertyValue -Value $operation -Name $propertyName + if ($null -eq $payload) { + continue + } + + $target = Get-ObjectPropertyValue -Value $payload -Name "target" + $targetKind = Get-ObjectPropertyString -Value $target -Name "kind" + $targetId = Get-ObjectPropertyString -Value $target -Name "id" + if ($targetKind -eq "repo" -and -not [string]::IsNullOrWhiteSpace($targetId)) { + [void]$repoIds.Add($targetId.Trim()) + } + + foreach ($tag in @(Convert-ToValueArray -Value (Get-ObjectPropertyValue -Value $payload -Name "tags"))) { + $tagText = ([string]$tag).Trim() + if ($tagText.StartsWith("repo:", [System.StringComparison]::OrdinalIgnoreCase)) { + $repoTag = $tagText.Substring("repo:".Length).Trim() + if (-not [string]::IsNullOrWhiteSpace($repoTag)) { + [void]$repoIds.Add($repoTag) + } + } + } + } + } + + return @($repoIds) +} + function Invoke-NodeJson { param( [Parameter(Mandatory = $true)] @@ -1407,7 +1458,7 @@ if ($ModerationHeartbeatOnly) { $repoActivity = Invoke-NodeJson -Arguments @( $repoActivityScriptPath, "--hours", "96", - "--max-commits", "3", + "--max-commits", "8", "--read-only", "--state-path", $stateFilePath ) @@ -1623,7 +1674,13 @@ if ( $repoCursorOperations = @() $disableRepoCursorAdvance = -not [string]::IsNullOrWhiteSpace($env:VOID_RUMINATION_DISABLE_REPO_CURSOR_ADVANCE) if (-not $ModerationHeartbeatOnly -and -not $NoPost -and -not $SkipModel -and -not $disableRepoCursorAdvance) { - $repoCursorOperations = @(Get-RepoActivityCursorOperations -RepoActivity $repoActivity -ObservedAt ([DateTime]::UtcNow)) + $handledRepoIds = @(Get-HandledRepoIdsFromOperations -Operations $proposedOperations) + if ($handledRepoIds.Count -gt 0) { + Append-RunLog ("repo activity handled by operations: {0}" -f ($handledRepoIds -join ", ")) + } else { + Append-RunLog "repo activity cursor advance skipped: no proposed operation handled a repo target." + } + $repoCursorOperations = @(Get-RepoActivityCursorOperations -RepoActivity $repoActivity -ObservedAt ([DateTime]::UtcNow) -HandledRepoIds $handledRepoIds) if ($repoCursorOperations.Count -gt 0) { Append-RunLog ("recording repo activity cursors: {0}" -f $repoCursorOperations.Count) foreach ($operation in $repoCursorOperations) { diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 49db104..a9d5a8d 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -370,3 +370,14 @@ {"ts":"2026-07-03T00:24:30Z","type":"verification","status":"ok","note":"Unpaused repo Face swarm after the current-context no-post Nibu gate. First MiMo Interpreter pass caught a missing #pics context anchor and requested retry; retry passed with route and parsed STATE NOTE/STATE NOTE/SAY. Swarm pause flag is now paused=false. Watch first live scheduled MiMo turns for source-channel context ownership regressions, first-spark flattening, and hidden reasoning-token exhaustion."} {"ts":"2026-07-03T00:31:25Z","type":"verification","status":"blocked","note":"Attempted to unpause repo Face swarm after MiMo quality gates passed. Current-context no-post Nibu gate behaved correctly: first Interpreter pass caught missing #pics context anchor, retry routed STATE NOTE/STATE NOTE/SAY. After setting paused=false, the scheduled GameCult Local Orchestrator reached repo-face-heartbeats but repeatedly failed to advance status/lock summary; live heartbeat child processes were stopped and the pause flag was restored to paused=true. Next work is scheduler/heartbeat handoff diagnosis, not MiMo persona quality."} {"ts":"2026-07-03T00:58:00Z","type":"verification","status":"ok","note":"VoidBot swarm now publishes a provider-keyed Eve/CultUI cockpit surface through its daemon-owned CultMesh store, Odin discovers it after registering generic idunn.command_boundary, idunn.daemon_transport_profile, and voidbot.provider_advertisement_catalog schemas, and Eir at http://127.0.0.1:8892/?provider=voidbot.swarm renders the live surface with 15 avatars, 6 metrics, 6 bars, 7 panes, 2 command intent buttons, native cockpit lowering, and no browser console errors."} +{"ts":"2026-07-03T23:16:52Z","type":"operations","status":"blocked","note":"2026-07-04 MiMo swarm wake attempt: repo Face/persona jobs ran on mimo-v2.5-pro and produced SAY blocks, but public delivery was not visible. Early Weksa/Eve/Heimdall SAY blocks were rejected by the multi-context guard for missing context/reply/channel; worker was hardened so future routed SAY with no concrete destination retries/drops instead of completing invisibly. A later Epiphany SAY had a concrete reply target but failed at the old Bifrost HTTP/token bridge gate. Do not restore BIFROST_BRIDGE_BASE_URL/token as the fix; wire Bifrost/Discord delivery through Odin-discovered CultMesh URI/provider command routes before unpausing autonomous turns again."} +{"ts":"2026-07-03T23:21:21Z","type":"implementation","status":"blocked","note":"Worker now refuses repo Face Discord SAY delivery through the legacy local Bifrost bridge shortcut: postRepoIdentityIntent validates/context-routes speech, then fails closed with an Odin/CultMesh command-route requirement instead of shelling to bifrost-bridge.mjs. Swarm remains paused until Bifrost/Discord delivery is implemented as an Odin-discovered CultMesh URI/provider command route and a pending Weksa mention posts visibly."} +{"ts":"2026-07-03T23:43:07Z","type":"implementation","status":"ok","note":"2026-07-04 CultMesh Bifrost Discord delivery landed: Bifrost advertises typed discord.post command/receipt docs, VoidBot worker stores cultmesh://asgard.starfire.bifrost/commands/discord-post and writes/pumps command docs, MCP Odin loader resolves sibling CultMesh runtime, and bounded Weksa command voidbot-weksa-cultmesh-live-20260704 posted visibly as Discord message 1522749224352088164 with completed receipt."} +{"ts":"2026-07-03T23:48:37Z","type":"verification","status":"ok","note":"After unpausing, a real heartbeat queued Eve job 40540eb5-95a8-45cc-b466-677d732beabd through MiMo and the worker completed it without public SAY delivery; this confirms the unpaused worker path is not jammed, while the visible Discord transport proof remains Weksa command voidbot-weksa-cultmesh-live-20260704 receipt/message 1522749224352088164."} +{"ts":"2026-07-04T21:50:03Z","type":"verification","status":"ok","note":"2026-07-04 recent MiMo Face turns had source-tool prose but OpenAI-compatible request payloads had tool_count=0, so search_sources/get_source_context were not callable. Patched openai_api provider to pass the shared retrieval toolbox and execute OpenAI tool_calls; direct MiMo smoke called list_indexed_repos and completed with tool_calls=1. Druzkai's Eusocial Interbeing source error is also real because E:/Projects/Eusocial Interbeing currently has no .git and is not in the source archive manifest."} +{"ts":"2026-07-04T21:56:02Z","type":"verification","status":"ok","note":"Source search backend repaired on 2026-07-04: 127.0.0.1:11434 was a stale Windows portproxy to dead 10.77.0.3, so RAG search_sources failed with Ollama fetch errors. Started Windows Ollama on 127.0.0.1:11435, updated RAG_OLLAMA_BASE_URL, restarted worker/MCP, and verified RetrievalService.searchRepositorySources against AquaSynth returns results through qwen3-embedding:0.6b."} +{"ts":"2026-07-04T21:59:28Z","type":"implementation","status":"ok","note":"Corrected Druzkai's body/source identity: runtime repo-discord registry and Zyphos voice identity now point Druzkai at repoName Zyphos, repoPath E:/Projects/Zyphos, and state/avatar under E:/Projects/Zyphos/.voidbot. Eusocial Interbeing remains the vault/content name inside Zyphos, not a separate source repo."} +{"ts":"2026-07-04T22:02:10Z","type":"implementation","status":"ok","note":"Druzkai body correction applied: prompt rendering now says Druzkai is born from/around Zyphos and territory is Zyphos; registry and Zyphos voice identity point to E:/Projects/Zyphos; typed Druzkai state recorded memory druzkai-zyphos-body-correction-20260704 so future turns use Zyphos for source search while treating Eusocial Interbeing as vault/content terminology."} +{"ts":"2026-07-05T17:52:53Z","type":"implementation","status":"ok","note":"Registered Odin's current gang as Personas/Faces: odin and ymir are repo Faces with repo-local .voidbot state; sleipnir and hermodr are native Personas with VoidBot projection state. Cut stale Gjallar/Eir registration and verified prompt assembly for odin, ymir, sleipnir, and hermodr. Native Personas must not share repoName because the Epiphany compatibility registry rejects duplicate identity keys."} +{"ts":"2026-07-05T18:16:38Z","type":"repair","status":"ok","note":"VoidBot Eve surface availability in Hermodr was repaired through proper CultMesh ownership: VoidBot now serves its swarm Eve surface over a daemon-owned CultMesh/RUDP document server at rudp://127.0.0.1:17873, advertises that route in gamecult.eve.provider_advertisement.v1, Odin persists providerCatalog routing metadata, and Hermodr reads Odin routing then fetches gamecult.eve.surface_state.v1 directly from VoidBot. Verified /hermodr/surface/voidbot.swarm returns providerKind provider-cultmesh-rudp with cockpit root."} +{"ts":"2026-07-08T20:43:30Z","type":"repair","status":"ok","note":"Void movement reporting bug identified and repaired: repo activity cursors previously advanced for every fresh repo after a rumination pass even when Void proposed no operation or reported only another lane, so Aetheria/AetheriaLore/Ymir movement could be marked seen without public coverage. The runner now advances repo cursors only for repo ids actually handled by proposed operations, repo activity exports doctrineDocuments for architecture/authority/runtime docs, and rumination context exposes dynamic movementCoverage leaders instead of a fixed repo list."}