Clarify polymorphic CultCache state target

This commit is contained in:
Meta Vens 2026-05-16 08:50:18 +01:00
commit 65aa701594
5 changed files with 8 additions and 7 deletions

View file

@ -23,7 +23,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
- `owner_codex` and `local_llm` are the active reply lanes.
- The ordinary bot/worker/provider/RAG/Postgres/Qdrant foundation still deserves to survive.
- The moderation/mood/private-self-state foundation does not. Treat it as the top architectural risk until JSON projection mutation and legacy mirrors are gone.
- The smallest coherent target is typed CultCache documents plus typed mutation tools: agents propose small operations, and the state service validates/applies them. Whole-state JSON editing is rejected as a durable mutation path.
- The smallest coherent target is one polymorphic CultCache-backed state authority with typed document kinds plus typed mutation tools: agents propose small operations, and the state service validates/applies them. Whole-state JSON editing is rejected as a durable mutation path.
- 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`.
- The Discord bot lane is no longer one swollen entrypoint; gateway wiring remains in `apps/bot/src/discord-bot.ts` while command/prompt handlers and Discord-shape support helpers now live under `apps/bot/src/discord-bot-*.ts`.
@ -80,7 +80,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: define typed CultCache document ownership and mutation operations for cursor/open cases, delivery receipts, candidate interventions, sleep/speaking runtime, and distilled memory.
- First bounded move: define typed CultCache document ownership and mutation operations for cursor/open cases, delivery receipts, candidate interventions, sleep/speaking runtime, and distilled memory. CultCache is natively polymorphic; do not create separate stores just to make the type names feel architectural.
- Next cuts should delete unstable foundations early: move repo-activity cursor updates behind the typed store, replace whole-state agent JSON edits with operation output, remove `legacyJsonPath`/working-projection authority, then cut top-level mirror fields.
- Do not build adapters around the JSON projection. That is how the heap learned to stand upright and ask for snacks.

View file

@ -26,7 +26,7 @@ The next priority is to remove JSON from the mutation loop entirely. Agents and
- source archive manifest and repo shards
- provider artifacts/traces
- logs/status/backups
- CultCache owns private Void self-state, split by document type:
- One polymorphic CultCache-backed state authority owns private Void self-state through typed document kinds:
- `void.self_profile`: identity, stable values, voice/personality configuration
- `void.moderation_cursor`: reviewed Discord cursor, open room obligations
- `void.speech_receipts`: recent delivered replies and dedupe keys
@ -34,7 +34,7 @@ The next priority is to remove JSON from the mutation loop entirely. Agents and
- `void.scheduled_runtime`: sleep cycle, speaking pressure, last run summaries
- `void.candidate_interventions`: drafts or requests that may become speech
Each durable fact has one owner. No top-level mirrors. No editable shadow copy pretending to be a harmless view.
CultCache does not need a separate physical store per state type; it is already polymorphic. The intended split is ownership by typed document kind and mutation contract, not a herd of little stores in fake mustaches. Each durable fact still has one owner. No top-level mirrors. No editable shadow copy pretending to be a harmless view.
### Runtime State Model
@ -63,7 +63,7 @@ Runtime context dies at the end of the pass unless an explicit typed mutation pr
### Authoritative Boundaries
- Bot/worker/provider/RAG boundaries survive.
- CultCache self-state has one mutation authority: a typed state service.
- CultCache self-state has one mutation authority: a typed state service over one polymorphic cache.
- Agents do not edit state files. They call tools such as:
- `record_reviewed_messages`
- `upsert_open_case`

View file

@ -87,3 +87,4 @@
{"ts":"2026-05-16T06:25:00Z","type":"implementation","status":"ok","note":"Manual state surgery finally cut the live moderation file itself instead of only asking the organs to behave better later. The important discovery was that `.voidbot/private/moderation-agent-state.json` still carries legacy top-level mirrors like `repo_sweeps`, `repo_activity_memories`, `recent_novelty_checks`, `recent_activity`, and `thought_lanes` alongside `moderation_runtime`; cleaning only the nested runtime leaves the mirror teaching stale seams straight back into the machine. The current working/canonical state was hand-distilled to one concrete AquaSynth seam, one identity seam, minimal support trace, and almost no runtime scrapbook."}
{"ts":"2026-05-16T07:05:00Z","type":"implementation","status":"ok","note":"The follow-up script fix had to protect coherent memories from the normalizer itself. Semantic repo seams and coherent dream themes now survive normalization intact, repo identity is inferred from `RepoName: ...` labels when explicit `repoNames` are missing, archive-year hints are only taken from real archive excursions instead of any timestamped memory, and the legacy top-level mirrors are now rewritten from `moderation_runtime` instead of drifting as a second contradictory truth surface."}
{"ts":"2026-05-16T07:44:37Z","type":"research","status":"ok","note":"Architecture teardown found the moderation/mood/private-self-state foundation rotten: canonical MessagePack is undermined by editable JSON projection authority, broad passthrough schemas, legacy mirrors, helper scripts that write projection state, and a giant memory-organ cleanup pass. New top priority is typed CultCache mutation tools plus deletion of JSON projection authority and mirror fields before any new moderation or mood behavior."}
{"ts":"2026-05-16T07:50:00Z","type":"research","status":"ok","note":"Correction to the self-state rebuild target: CultCache is natively polymorphic, so the architecture should use one CultCache-backed state authority with typed document kinds and mutation operations, not separate physical stores per self-state type. The ownership split is by document contract, not storage cabinet."}

View file

@ -65,7 +65,7 @@ active_subgoals:
accepted_design:
- Bot, worker, providers, and RAG remain the main structural seams.
- State storage stays intentionally split: Postgres for operational state, Qdrant for vectors, `.voidbot/` for archives, artifacts, logs, and backup material.
- Private Void self-state should be split into typed CultCache document authorities: self profile, moderation cursor/open obligations, speech receipts, thought memory/incubation, scheduled runtime, and candidate interventions.
- Private Void self-state should live behind one polymorphic CultCache-backed authority with typed document kinds for self profile, moderation cursor/open obligations, speech receipts, thought memory/incubation, scheduled runtime, and candidate interventions. Do not mistake typed document ownership for separate physical stores.
- Agents and scheduled runners should cross the private-state boundary with small typed mutation operations such as cursor updates, open-case upserts, receipt records, memory appends, incubation merges, and candidate-intervention changes.
- JSON may be used for operation payloads or debug exports, but not as an editable working projection of canonical self-state.
- `owner_codex` and `local_llm` remain distinct lanes with different tool-execution and safety posture.

View file

@ -6,7 +6,7 @@ Design and execute the private self-state teardown: replace editable JSON projec
## Working Notes
- Smallest coherent target: private Void self-state is a set of typed CultCache documents, and agents cross the boundary through explicit operation payloads.
- Smallest coherent target: private Void self-state is one polymorphic CultCache-backed authority with typed document kinds, and agents cross the boundary through explicit operation payloads.
- First cut should be state-boundary design and typed mutation tools, not another behavior patch.
- JSON can remain a debug export or operation payload format, but not an editable whole-state working copy.
- Cut early: repo cursor JSON writes, commit-working-view authority, legacy top-level mirrors, and semantic cleanup code that only exists because invalid durable state was allowed through.