Delete legacy memory compensator stack

This commit is contained in:
Meta Vens 2026-05-17 09:02:08 +01:00
commit 79485cd832
30 changed files with 125 additions and 6567 deletions

View file

@ -31,10 +31,10 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
- `scripts/export-recent-repo-activity.mjs` reads repo cursors from the typed `.cc` store. Legacy `.json` cursor arguments are only mapped to a sibling `.cc` path when needed by old invocation surfaces.
- `scripts/run-void-moderator-rumination.ps1` has been rebuilt as a typed rumination runner. It builds a typed context packet, loads `prompts/void-moderator-rumination.md`, runs Codex rumination, and applies only the JSON operation payloads that come back through `scripts/void-self-state.mjs`. Cursor and receipt bookkeeping remain parent-owned.
- Prompt-facing rumination chronology is projected by `scripts/lib/void-rumination-context-projection.ps1`. Exact timestamps stay in typed state/status/cursors; the child context gets relative phrases like `5 minutes ago`, including recent Discord messages, repo activity, receipts, memory timestamps, and sleep/speech timing.
- `scripts/simulate-void-mood.mjs` has been rebuilt as a typed-only sleep/speaking-pressure pass over `.voidbot/private/void-self-state.cc`. The old memory organ, vector incubation, cleanup, dream residue, and legacy mirror writes are offline until rebuilt on typed operations.
- `scripts/void-memory-organ.mjs` and its split helper modules are old machinery now. They may still be useful as forensic evidence, but the next design should not preserve their cleanup/agency compensators just because they exist.
- `scripts/simulate-void-mood.mjs` has been rebuilt as a typed-only sleep/speaking-pressure pass over `.voidbot/private/void-self-state.cc`.
- The old memory-organ script family, legacy moderation-state template, and legacy moderation context exporter have been deleted. Do not revive their cleanup, agency, dream, vector-incubation, or mirror-repair behavior as compatibility scaffolding.
- Most of the deterministic legacy translation and retention code is recent compensator cruft from failed attempts to manually clean an exploded state file. Do not preserve it as an earned organ. Architect the state boundary so that bad state cannot enter, and keep only narrow historical migrations for old debris.
- Agency is now split into identity crystallization, candidate interventions, and value-pressure inference. That split names the current hard-wired behavior; it does not make the behavior sacred. The desired shape is typed state operations plus derived/model-owned policy, not a permanent sermon generator in maintenance code.
- The desired agency shape is typed state operations plus derived/model-owned policy, not a permanent sermon generator in maintenance code.
- Sleep/distillation must be rewritten with a meaning-preservation contract: concrete subject, claim/question, evidence refs, live tension, and future-action implication survive compression. Bulk can die. Meaning does not get put through the office shredder and called a dream.
- Typed memory operations now enforce the first ingress wall for the next brain: `append_distilled_memory`, `propose_memory_distillation`, and `apply_memory_distillation` require a concrete target, claim or question, tension, action implication, and evidence refs unless the operation explicitly tags `evidence:missing`. This does not fix old state. It prevents new summary-only mush from being accepted as memory.
- The owner Codex lane is no longer one swollen file; orchestration, runtime/parsing, rendering, and shared helpers are split under `packages/providers/src/owner-codex-*.ts`.
@ -52,37 +52,35 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
- Bot-directed prompts now stay in the raw Discord archive but are excluded from default semantic history indexing and lexical fallback, so repeated summons stop teaching the bot its own call-and-response loops.
- Source-grounding hints are advisory now; the owner and local lanes can decide when repo or lore tool use is actually warranted instead of obeying a lexical front-door veto.
- The old 15-minute local scheduled task `Void Moderator Rumination` is disabled. Its replacement script restores rumination against `.voidbot/private/void-self-state.cc` without reviving the legacy projection path. The prompt lives in `prompts/void-moderator-rumination.md`; treat that file as a sensitive behavior surface, not incidental script text.
- That moderation state file is now Ghostlight-shaped: identity, canonical state, goals, memories, perceived overlays, and a `moderation_runtime` block. Inside that runtime block, the loop now keeps parallel analytic and associative thought lanes plus a bridge for syntheses, saturation warnings, and unresolved tensions, so one good seam does not get to annex the entire mind.
- The moderation loop now records `moderation_runtime.recent_archive_excursions` plus `moderation_runtime.recent_repo_activity_sweeps` and is explicitly told to avoid laundering the same musing through fresh wording. Quiet runs should follow at least one fresh archive seam or concrete hook before they settle into theory, should also sweep recent tracked-repo commit motion for experiment clusters or converging themes, and should not let any single theme dominate more than a couple of recent bridge syntheses without fresh evidence.
- The moderation loop now uses the typed context packet from `scripts/run-void-moderator-rumination.ps1`; legacy Ghostlight-shaped JSON runtime fields are not the active memory surface.
- Repo-weather sweeps are now incremental rather than a rolling four-day scrapbook. `scripts/export-recent-repo-activity.mjs` advances repo activity through the typed `update_repo_activity_cursor` operation, so already-injected commits stop coming back as "news" on every heartbeat unless someone explicitly opts into `--stateless`.
- Novelty now needs two bars, not one: a thought can be new to the room while still being stale to Void. The memory organ should score both room novelty and self novelty, merge repeated seams into existing clusters instead of minting new thought shards, and cool/refract themes that keep winning just because they already won.
- Novelty still needs two bars, not one: a thought can be new to the room while still being stale to Void. The replacement design should derive that judgment from typed memory/incubation state and model reasoning, not from the deleted compensator stack.
- Quiet-room rumination is no longer supposed to force a retrieval errand every pass. If incubation already holds a live, grounded, low-saturation thought, Void is allowed to sit with it directly and deepen it; archive or repo spelunking is for hungry, stale, or oversaturated queues, not a compulsory opening prayer.
- The loop is now less shy about that repo weather: if a fresh convergence across active repos survives a pass or two and still feels room-native, it should bias toward a concise herald note or at least a medium-priority candidate intervention instead of filing the thought under private wallpaper.
- The sharing gate is now less precious more broadly too. `scripts/void-memory-organ.mjs` treats a world-facing ripe thought as something that should usually produce a `ripe_thought_share` candidate intervention instead of waiting forever for a ceremonial live hook, and the holding-line text now frames speech as the normal next question for a concrete ripe seam rather than a guilty exception.
- That same moderation loop no longer gets to assume Discord history will faithfully show it its own mouth. Canonical moderation state now carries `moderation_runtime.recent_delivery_receipts`, and direct-question dedupe is supposed to consult those receipts before it re-answers a still-visible message like a senile uncle retelling the same war story.
- The sharing gate should stay less precious, but future ripe-thought sharing must be expressed as typed `queue_candidate_intervention` operations or direct speech with parent-owned receipts.
- The moderation loop no longer gets to assume Discord history will faithfully show it its own mouth. Canonical typed state carries `void.speech_receipts`, and direct-question dedupe should consult those receipts before it re-answers a still-visible message.
- Chronological moderation polling is now supposed to be exact once a reviewed cursor exists. The runner hands the unattended child one concrete `export-recent-discord-history.mjs --after <saved timestamp>` command for the pass and explicitly forbids widening that back into a bootstrap `--hours 6` nostalgia crawl unless there is genuinely no cursor yet.
- The repo-weather sermon machine got a leash too. The prompt now tells Void to lead with particulars from each repo before declaring a shared law; if the convergence only exists at slogan altitude, it should keep the reports split and spare the room the faux-cosmic glue.
- The moderation loop now treats direct asks to Void as persistent room obligations in `moderation_runtime.open_cases`. A reviewed message is not automatically a handled message: if someone hands Void the floor, that obligation should survive cursor advancement and block optional repo-weather until Void actually answers or explicitly retires it.
- The moderation loop now treats direct asks to Void as persistent room obligations in typed `void.moderation_cursor.openCases`. A reviewed message is not automatically a handled message: if someone hands Void the floor, that obligation should survive cursor advancement and block optional repo-weather until Void actually answers or explicitly retires it.
- If quiet-room repo weather starts repeating itself, the intended correction is not a pile of extra cooldown law. The loop should treat that as a cue to go deeper into archive history, repo docs, diffs, or lore until it finds a better branch or honestly has nothing new to say.
- The old 5-minute scheduled task `Void Mood Drift` is disabled. Its replacement script updates only typed scheduled-runtime sleep cycle and speaking pressure in `.voidbot/private/void-self-state.cc`.
- That same mood organ now also runs a hybrid symbolic/vector memory pass through `scripts/void-memory-organ.mjs`: persistent memories and recent runtime seeds get compact semantic vectors, `moderation_runtime.memory_resonance` tracks the strongest cross-memory clusters, and `moderation_runtime.incubation` keeps multi-run thoughts alive long enough to deepen before they either speak or cool off.
- CultCache files use `.cc`. Do not document or create new self-state paths with `.msgpack`; that extension was an implementation-shaped lie.
- The memory organ now treats repeated empty-room bookkeeping as low-signal. Refrains like `no new messages / no smoke / no post` should be merged or cooled off instead of becoming the dominant incubating seam and teaching Void that silence is the only virtue.
- Repeated empty-room bookkeeping is low-signal. Refrains like `no new messages / no smoke / no post` should not become durable memory.
- Quiet-room exploration should now prefer underworked terrain when the usual seam is saturated. `bridge.source_coverage` and `bridge.refractory_topics` exist to push the next pass toward less-chewed repo families, archive years, or channels instead of rewarding repetition with another supposedly ripe synthesis.
- During naps, the moderation loop is supposed to turn inward: distill/prune memories against the active goals, record dream residue in `memories.dreams`, refresh `moderation_runtime.sleep_cycle`, and only break the nap for real smoke or an unusually novel thought worth muttering into the room.
- Sleep is meant to be lossy about bulk, not about meaning. The current nap pass in `scripts/void-memory-organ.mjs` cuts raw residue, but the next architecture pass must rewrite sleep/distillation so concrete repo-bound or room-bound meanings do not collapse into abstraction sludge.
- During naps, the moderation loop is supposed to turn inward: distill/prune memories against active goals through typed memory operations, refresh typed scheduled runtime, and only break the nap for real smoke or an unusually novel thought worth muttering into the room.
- Sleep is meant to be lossy about bulk, not about meaning. The next architecture pass must rebuild sleep/distillation so concrete repo-bound or room-bound meanings do not collapse into abstraction sludge.
- Awake rumination is now supposed to do the actual philosophy from those surviving seams. The moderation doctrine tells quiet runs to begin with seam-thinking when incubation is live: ask what principle the seam is circling, what tension keeps it honest, and what embodiment consequence would cash it out before reaching for more retrieval.
- There is now an identity crystallization path for over-chewed private seams. If a thought survives enough passes to stop being meaningfully novel, the memory organ can retire it from `incubation.active_thoughts`, promote it into `identity.private_notes`, add a matching canonical value, and keep one `identity_seam` semantic memory instead of letting the same thought pace forever in the active queue.
- Crystallization is not meant to be mute. The memory organ can now queue an `identity_crystallization` candidate intervention with a first-person draft, and the moderation doctrine treats that kind of draft as warmer than ordinary private wallpaper: if the room has not already heard the opinion in roughly that shape, Void should usually share it.
- Identity crystallization is still desired, but the old hard-wired path is gone. Rebuild it as model-owned judgment crossing typed self-profile, thought-memory, and candidate-intervention operations.
- Crystallization is not meant to be mute. When rebuilt, it should queue typed candidate interventions when a first-person share is warranted.
- Those crystallized-thought drafts can now be marked `mustEventuallyShare`, and ordinary candidate-intervention pruning is supposed to preserve them. The loop may defer for timing if the room is busy, but not just quietly forget what became doctrine.
- That awake rumination is now explicitly biased toward concrete project fascination. If a thought stays too abstract for too long, the loop is supposed to tie it to a concrete system: Aetheria-Economy gameplay systems, lore-vault structure, Aquarium frontend work, Epiphany swarm organs, VoidBot's own architecture, or some other specific repo/subsystem instead of another polished sermon about engineering virtue.
- The memory organ's thought labels and curiosity budget have been cut away from keyword compost. Resonance clusters and incubating thoughts are now supposed to name actual claims, questions, or fascination targets, and curiosity should favor concrete map-changing terrain over whichever seam already feels warm.
- Thought labels and curiosity budget must stay cut away from keyword compost. Incubating thoughts should name actual claims, questions, or fascination targets, and curiosity should favor concrete map-changing terrain over whichever seam already feels warm.
- The live moderation state has now had one real translation pass too, not just new code draped over old fossils. Legacy slash-label seam memories and dream themes are rewritten through the new thought synthesizer, obvious duplicates get merged or pruned, and the active queue is rebuilt from the cleaned substrate instead of the old keyword graveyard.
- That cleanup is now harsher and less sentimental. Sleep-side consolidation trims semantic memory harder, cuts dream memory down, throws away excess repo/archive/runtime residue, and explicitly keeps the freshest surviving records after sort instead of accidentally preserving the oldest fossils in the file.
- The semantic purge also learned to distrust generic doctrine sludge. `recent-preoccupation` and `quiet-room-status` are not durable thought kinds, person-singleton labels do not get to crystallize into doctrine, and boilerplate like `looks like a live seam` is now treated as template smell across both semantic memory and runtime drafts/opinions.
- `recent-preoccupation` and `quiet-room-status` are not durable thought kinds, person-singleton labels do not get to crystallize into doctrine, and boilerplate like `looks like a live seam` is template smell.
- The old moderation-agent state and its top-level mirrors are not source material for the next brain. Treat them as failed-boundary evidence only.
- The memory organ also has to stop "helping" already-good seam memories into abstraction sludge. Semantic or dream entries that are already coherent, especially repo-bound seams with a real `RepoName: ...` label, should survive normalization intact. Otherwise the normalizer sands `AquariumSynthCSharp: Workflow cannot own the body` back into porridge like `Body and workflow`, and the clusterer starts hallucinating archive thoughts out of repo work again.
- Values and personality activations now have a real autonomy path. `scripts/void-memory-organ.mjs` can turn sustained value-backed pressure into `moderation_runtime.discomforts`, `active_tensions`, `self_advocacy_requests`, and `world_advocacy_requests`, and it can spend those through existing `candidate_interventions` instead of leaving the vectors as decorative weather.
- The replacement sleep/distillation path must stop "helping" already-good memories into abstraction sludge. A repo-bound memory like `AquariumSynthCSharp: Workflow cannot own the body` must survive with subject, claim, evidence, tension, and implication intact.
- Values and personality activations still need an autonomy path, but it must be rebuilt through typed operations and model-owned judgment rather than legacy runtime buckets.
- The important distinction is outward too, not just inward. Self-directed tensions can ask for prompt/memory/runtime surgery, while world-directed tensions can turn repo/lore/room opinions into real requests or first-person interventions when the same objection survives more than one pass.
- The intended shape now is: quiet runs can follow one seam for several passes, connect repo motion to lore or philosophy if the evidence supports it, and only surface with the juiciest version once the incubation queue says the thought has actually grown teeth.
- Directly invoked Discord replies now load that same private moderation state as distilled private self-state context, so the ruminating scheduled loop and the summoned Void share one evolving personality/state spine. The prompt-facing self-state summary no longer dumps recent repo sweeps, novelty checks, or musing sludge back into working memory by default; it stays closer to seam memory, incubation, and room obligations. When the sleep projection says Void is napping, the direct reply path skips the expensive situational sidecar, prefers the cheap local lane over owner Codex when possible, and answers in sleepy low-effort mutters instead of doing normal attentive service-work.

View file

@ -118,18 +118,12 @@ This note is the source-grounded description of how the live VoidBot stack is sh
- typed rumination runner. It builds a bounded context packet from `.voidbot/private/void-self-state.cc`, recent Discord chronology, and read-only repo activity; loads `prompts/void-moderator-rumination.md`; runs Codex rumination; applies returned typed operations through `scripts/void-self-state.mjs`; then records parent-owned cursor and speech receipts.
- `scripts/lib/void-rumination-context-projection.ps1`
- rumination context projector. It turns typed timestamps and helper payloads into prompt-facing relative phrases while leaving exact chronology in parent-owned typed state, status, and cursor bookkeeping.
- `scripts/moderation-state-store.mjs`
- legacy moderation-state wrapper. It is not part of the active typed self-state path.
- `scripts/void-self-state.mjs`
- typed self-state operation CLI. It applies strict operation payloads such as cursor updates, open-case changes, delivery receipts, repo cursor updates, memory appends, incubation merges, candidate interventions, sleep-cycle updates, and speaking-pressure updates through `packages/core/src/void-self-state-service.ts` against the CultCache `.cc` store.
- `scripts/install-moderation-rumination-task.ps1`
- installs the local 15-minute scheduled task that runs the moderation/participation loop through the hidden PowerShell launcher shim.
- `scripts/simulate-void-mood.mjs`
- typed-only mood maintenance script that updates scheduled-runtime sleep cycle and speaking pressure in `.voidbot/private/void-self-state.cc`. The old personality-vector drift, memory organ, incubation, dream residue, cleanup, and legacy mirror behavior are offline pending a typed rebuild.
- `scripts/void-memory-organ.mjs`
- thin orchestrator for the hybrid symbolic/vector memory helper used by mood drift.
- `scripts/void-memory-organ-*.mjs`
- split memory-organ modules for shared limits/utilities, vector/embedder substrate, memory-record intake, graph/cluster synthesis, legacy translation, retention/compaction, incubation/bridge scoring, sleep/distillation, identity crystallization, candidate interventions, value-pressure inference, and legacy mirror repair.
- `scripts/run-void-mood-drift.ps1`
- hidden-task wrapper for the mood-drift organ; writes status/log pulse files and respects the moderation lock so the two state writers do not stomp each other for sport.
- `scripts/install-void-mood-drift-task.ps1`
@ -189,4 +183,4 @@ Within the Postgres path, the implementation is split on purpose now too:
2. `scripts/simulate-void-mood.mjs` reads typed documents from `.voidbot/private/void-self-state.cc`.
3. It updates `void.scheduled_runtime.sleepCycle` and `void.scheduled_runtime.speakingPressure` through `update_sleep_cycle` and `update_speaking_pressure` operations.
4. It writes `.voidbot/status/void-mood-drift.json`.
5. It intentionally does not run the old memory organ, vector incubation, dream cleanup, legacy mirror repair, or JSON projection refresh. That work must be rebuilt as typed operations with meaning-preserving contracts.
5. The old memory-organ script family, legacy state template, and legacy context exporter have been deleted. Memory maintenance, incubation, dream residue, and agency must be rebuilt as typed operation proposals with meaning-preserving contracts rather than revived from the compensator stack.

View file

@ -134,7 +134,7 @@ The runner can hand these to a CLI/MCP tool. The store decides what survives.
- `.voidbot/private/moderation-agent-state.json` as an editable working projection.
- `legacyJsonPath`/working-path duality for canonical self-state.
- Top-level mirror fields beside `moderation_runtime`.
- Top-level mirror fields beside the old legacy runtime object.
- Any helper that mutates the JSON projection and commits it back.
- Prompt doctrine that tells the child agent how to manually preserve state shape.
- Regex/template police that try to repair semantic sludge after the store allowed sludge to become durable.
@ -157,11 +157,12 @@ The runner can hand these to a CLI/MCP tool. The store decides what survives.
- The private moderation/self-state foundation is not sound:
- the active `.cc` store is typed, but the real phase machine is not rebuilt yet
- the old scheduled tasks are disabled instead of replaced with full typed behavior
- legacy projection/mirror state still exists on disk as failed-boundary residue and must not become source material for the rebuild
- the old memory organ is split by concern, but its legacy translation, retention/compaction, identity crystallization, candidate interventions, and value-pressure inference are offline scaffolding, not earned architecture
- legacy projection/mirror state may still exist on disk as failed-boundary residue and must not become source material for the rebuild
- the old memory organ and legacy moderation-state wrapper have been removed from the codebase; their translation, retention/compaction, identity crystallization, candidate intervention, and value-pressure behavior must not be revived as compatibility scaffolding
- the scheduled moderation runner has a typed rumination contract again: bounded context in, reviewed prompt template, typed operation payloads out, parent-owned cursor/receipt recording
- recent event timing in that bounded context now crosses a projection boundary first, so the child sees "5 minutes ago" language while the parent keeps exact timestamps for bookkeeping
- deterministic cleanup is mostly recent scar tissue from failed manual cleanup passes; it should be deleted rather than ported unless it protects a real invariant in the new model
- the old memory-organ script family, legacy moderation state template, and legacy context exporter have now been deleted instead of preserved as forensic bait
- deterministic cleanup is mostly recent scar tissue from failed manual cleanup passes; it should stay deleted rather than be ported unless a future typed operation protects a real invariant in the new model
- hard-wired agency policy is mostly current scaffolding, not the final authority; identity, advocacy, and speech candidates should emerge from typed memory/state operations plus model-owned judgment under validation
- sleep/distillation currently lacks a hard meaning-preservation implementation in the active runner, so it remains offline until rebuilt
@ -185,9 +186,10 @@ Verdict: stop feature work and rebuild this foundation. The rest of the machine
### Commit 3: Add Typed Mutation CLI
- Extend `scripts/moderation-state-store.mjs` or replace it with a typed command surface for cursor, open cases, receipts, candidates, sleep, speaking pressure, and distilled memories.
- The CLI writes CultCache directly.
- Verification: fixture tests for each operation.
- Landed path: `scripts/void-self-state.mjs apply-operation` is the typed command surface for cursor, open cases, receipts, repo cursors, candidates, sleep, speaking pressure, incubation, and distilled memories.
- The CLI writes CultCache directly through `packages/core/src/void-self-state-service.ts`.
- The legacy `scripts/moderation-state-store.mjs` wrapper has been deleted.
- Verification: fixture tests and runner smokes should exercise operation application.
### Commit 4: Move Repo Activity Cursor Behind The Store