Split memory organ concerns

This commit is contained in:
Meta Vens 2026-05-16 13:30:53 +01:00
commit 1cc31f1e0a
10 changed files with 2516 additions and 2348 deletions

View file

@ -31,8 +31,8 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
- `scripts/run-void-moderator-rumination.ps1` now records reviewed Discord cursors and speech delivery receipts through typed self-state operations. The old `set-cursor` and `record-delivery-receipt` commands were removed from `scripts/moderation-state-store.mjs`.
- The unattended moderation child no longer gets to commit whole-state JSON edits. It reads `.voidbot/private/moderation-agent-state.json` as a compatibility projection, writes proposed operation payloads to `.voidbot/status/moderation-rumination-operations.json`, and the parent runner applies them through `scripts/void-self-state.mjs apply-operation`.
- `scripts/simulate-void-mood.mjs` now sends sleep-cycle and speaking-pressure results through typed operations after its legacy save, so scheduled-runtime typed documents stay current. The memory organ itself still mutates the legacy monolith and remains the next major surgery.
- `scripts/void-memory-organ.mjs` has started being split by concern. Shared limits/text sets, generic utilities, vector/embedder code, memory-record intake, legacy mirror repair, and agency/intervention policy now live in `scripts/void-memory-organ-constants.mjs`, `scripts/void-memory-organ-utils.mjs`, `scripts/void-memory-organ-vector.mjs`, `scripts/void-memory-organ-records.mjs`, `scripts/void-memory-organ-legacy-mirrors.mjs`, and `scripts/void-memory-organ-agency.mjs`, with `scripts/void-memory-organ-shared.mjs` as a temporary re-export shim.
- Most of the deterministic cleanup in `scripts/void-memory-organ.mjs` 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 cleanup pile is unnecessary.
- `scripts/void-memory-organ.mjs` is now a thin orchestrator. Shared limits/text sets, generic utilities, vector/embedder code, memory-record intake, graph/cluster synthesis, historical cleanup/translation, incubation/bridge scoring, sleep/distillation, legacy mirror repair, and agency/intervention policy live in `scripts/void-memory-organ-constants.mjs`, `scripts/void-memory-organ-utils.mjs`, `scripts/void-memory-organ-vector.mjs`, `scripts/void-memory-organ-records.mjs`, `scripts/void-memory-organ-graph.mjs`, `scripts/void-memory-organ-cleanup.mjs`, `scripts/void-memory-organ-incubation.mjs`, `scripts/void-memory-organ-sleep.mjs`, `scripts/void-memory-organ-legacy-mirrors.mjs`, and `scripts/void-memory-organ-agency.mjs`, with `scripts/void-memory-organ-shared.mjs` as a temporary re-export shim.
- Most of the deterministic cleanup in `scripts/void-memory-organ-cleanup.mjs` 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 cleanup pile is unnecessary.
- 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.
- 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`.
- The local Ollama lane is no longer one swollen file; orchestration stays in `packages/providers/src/local-llm-provider.ts` while prompt/rendering, tool-loop helpers, and shared types/constants live under `packages/providers/src/local-llm-*.ts`.
@ -90,7 +90,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
## Likely Next Bounded Move
- Stop feature work on moderation, mood, agency, and public-lane behavior until the private-state boundary is rebuilt.
- First bounded move after the current commit: keep splitting `scripts/void-memory-organ.mjs` by ownership, starting with cleanup/translation versus graph/cluster synthesis, incubation/bridge, and sleep/distillation, then move memory-maintenance, incubation, and candidate-intervention outputs behind typed operations instead of direct canonical/working-projection writes.
- First bounded move after the current commit: move memory-maintenance, incubation, sleep, and candidate-intervention outputs behind typed operations instead of direct canonical/working-projection writes.
- Next cuts should delete unstable foundations early after concrete writers move: remove `legacyJsonPath`/working-projection authority, then cut top-level mirror fields and cleanup code that only compensated for those broken boundaries.
- Rebuild sleep/distillation before trusting it again. Fixture check: a memory like `AquariumSynthCSharp: Workflow cannot own the body` must survive sleep with its concrete subject, claim, evidence, tension, and implication intact.
- Do not build adapters around the JSON projection. That is how the heap learned to stand upright and ask for snacks.

View file

@ -121,7 +121,9 @@ This note is the source-grounded description of how the live VoidBot stack is sh
- `scripts/simulate-void-mood.mjs`
- plain Node mood-drift organ that nudges the shared personality-vector activations with Perlin-shaped noise, damps them back toward their means using plasticity, updates the speak/confession/novelty pressure meter in the shared self-state, maintains the nap-cycle clock plus sleep-state vector bias, and now also reconciles compact semantic-memory vectors plus incubation/dream state.
- `scripts/void-memory-organ.mjs`
- hybrid symbolic/vector memory helper used by mood drift to attach compact semantic vectors to persistent memories and runtime seeds, build resonance clusters, keep an incubation queue alive across turns, leave more meaningful dream residue during naps, and turn sustained value-backed pressure into explicit discomforts, tensions, and advocacy requests.
- 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, historical cleanup/translation, incubation/bridge scoring, sleep/distillation, legacy mirror repair, and agency/intervention policy.
- `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`