diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 0050843..338c90f 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -21,6 +21,9 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou - Qdrant owns history and source vectors. - `.voidbot/` owns archives, artifacts, logs, status files, and backups. - `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 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`. @@ -35,7 +38,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou - Source repo discovery now reconciles automatically during `npm run stack:start` and through the watchdog path, so new repos under `SOURCE_REPO_ROOT` stop waiting for manual hook folklore before they get indexed. - 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. -- There is now a 15-minute local scheduled moderation loop named `Void Moderator Rumination`. It runs `scripts/run-void-moderator-rumination.ps1`, launches `codex exec` from the VoidBot workspace with the usual MCP/tool surface, treats `config/discord-server-rules.md`, `config/moderation-review-agent.md`, and `styles/void-default.md` as doctrine/personality surfaces, uses `node scripts/export-recent-discord-history.mjs` for chronological polling, uses `node scripts/export-random-discord-history.mjs` for quiet-room novelty dives, uses `node scripts/export-recent-repo-activity.mjs --hours 96 --max-commits 3 --cursor-file .voidbot/private/moderation-agent-state.json` to watch cross-repo motion without re-injecting old commits as fresh weather, novelty-checks candidate thoughts against `search_history`, and now keeps canonical moderation state in `.voidbot/private/moderation-agent-state.msgpack` while exposing only the editable working projection at `.voidbot/private/moderation-agent-state.json` to the unattended Codex child. +- There is now a 15-minute local scheduled moderation loop named `Void Moderator Rumination`. It runs `scripts/run-void-moderator-rumination.ps1`, launches `codex exec` from the VoidBot workspace with the usual MCP/tool surface, treats `config/discord-server-rules.md`, `config/moderation-review-agent.md`, and `styles/void-default.md` as doctrine/personality surfaces, uses `node scripts/export-recent-discord-history.mjs` for chronological polling, uses `node scripts/export-random-discord-history.mjs` for quiet-room novelty dives, uses `node scripts/export-recent-repo-activity.mjs --hours 96 --max-commits 3 --cursor-file .voidbot/private/moderation-agent-state.json` to watch cross-repo motion without re-injecting old commits as fresh weather, novelty-checks candidate thoughts against `search_history`, and now keeps canonical moderation state in `.voidbot/private/moderation-agent-state.msgpack` while exposing an editable working projection at `.voidbot/private/moderation-agent-state.json` to the unattended Codex child. This projection is now considered a rejected foundation, not a design to extend. - 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. - Repo-weather sweeps are now incremental rather than a rolling four-day scrapbook. `scripts/export-recent-repo-activity.mjs` advances `moderation_runtime.repo_activity_cursor` inside `.voidbot/private/moderation-agent-state.json`, so already-injected commits stop coming back as “news” on every heartbeat unless someone explicitly opts into `--stateless`. @@ -76,9 +79,10 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou ## Likely Next Bounded Move -- The obvious refactor queue is basically cleared. -- The next good bounded move is still public-lane hardening, especially around how the new discomfort/advocacy organs actually surface into room behavior, instead of another ceremonial anatomy lesson. -- If you do another structural cut, make the file earn it. Do not keep refactoring just because stale notes sound lonely. +- 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. +- 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. ## Important Paths diff --git a/notes/voidbot-implementation-plan.md b/notes/voidbot-implementation-plan.md index 6afc7e9..1f89473 100644 --- a/notes/voidbot-implementation-plan.md +++ b/notes/voidbot-implementation-plan.md @@ -4,39 +4,223 @@ This is the current forward plan for the next larger organs. It is not a changel ## Current Aim -Use the persistent project-state surfaces to keep future work source-grounded and rehydratable while returning from the cleanup pass to higher-priority hardening work. +Stop feature work on moderation, mood, and self-state until the state boundary is rebuilt. The live product goal still stands: Void should answer Discord, remember useful social/project context, retrieve GameCult history/source/lore, and run an unattended moderation/participation loop. The current implementation reaches that goal through JSON projection edits, legacy mirrors, and a swollen memory organ. That is architectural debt wearing a little paper crown. -## Near-Term Organs +The next priority is to remove JSON from the mutation loop entirely. Agents and scheduled workers should mutate typed CultCache-backed state through explicit tools/APIs, not by editing a whole-state JSON working copy. -### 1. Public-Lane Hardening +## Smallest Coherent Architecture -- tighten moderation and abuse handling for non-owner traffic -- make budgets and rate-limit policy easier to inspect/administer -- preserve the current owner/public provider boundaries instead of letting them blur +### Durable State Model -### 2. Recovery That Is More Adult Than Hope +- Postgres owns operational bot state: + - jobs + - audit events + - interaction memory + - provider runs + - public usage/rate limits +- Qdrant owns semantic vectors: + - Discord history vectors + - source/lore vectors +- `.voidbot/` owns operational files: + - raw Discord archive + - source archive manifest and repo shards + - provider artifacts/traces + - logs/status/backups +- CultCache owns private Void self-state, split by document type: + - `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 + - `void.thought_memory`: distilled memories, incubation threads, resonance summaries + - `void.scheduled_runtime`: sleep cycle, speaking pressure, last run summaries + - `void.candidate_interventions`: drafts or requests that may become speech -- add a real restore-drill cadence instead of stopping at backup verification -- reduce dependence on interactive workstation logon where practical -- keep the stack startup task installed and visible so reboots do not quietly leave runtime dead -- keep watchdog signals and dashboard diagnostics honest when dependencies are degraded -- keep adjacent-service checks behind private local extensions so VoidBot does not quietly mutate into a generic infra panic funnel +Each durable fact has one owner. No top-level mirrors. No editable shadow copy pretending to be a harmless view. -### 3. Admin And Forensics Surfaces +### Runtime State Model -- richer inspection around jobs, provider runs, tool usage, interaction memory, and rate-limit denials -- better "what happened?" answers without spelunking raw artifacts by candlelight +- Discord request runtime is an immutable request context: + - prompt/message + - actor/guild/channel + - recent room transcript + - interaction profile + - optional situational read + - retrieval hints/results + - self-state summary projection +- Scheduled moderation runtime is a bounded pass context: + - current cursor window + - outstanding obligations + - selected memory/thought summaries + - selected repo/archive evidence + - proposed state mutations + - optional speech request +- Mood drift runtime is deterministic maintenance: + - read stable self profile + - update scheduled runtime pressure/sleep fields + - request memory maintenance through typed operations -### 4. Legibility Hardening +Runtime context dies at the end of the pass unless an explicit typed mutation preserves a durable fact. -- the obvious runtime-file monarchies have already been cut into cleaner seams -- keep behavior stable and only do more structural surgery when a specific file clearly earns it -- do not keep petting the line-count graph once the actual design risk has dropped +### Authoritative Boundaries -### 5. The Still-Scaffolded Paths +- Bot/worker/provider/RAG boundaries survive. +- CultCache self-state has one mutation authority: a typed state service. +- Agents do not edit state files. They call tools such as: + - `record_reviewed_messages` + - `upsert_open_case` + - `close_open_case` + - `record_delivery_receipt` + - `append_distilled_memory` + - `merge_incubation_support` + - `queue_candidate_intervention` + - `retire_candidate_intervention` + - `update_sleep_cycle` + - `update_speaking_pressure` +- Model/agent output crosses the boundary as proposed operations, not as rewritten state. +- The state service validates, normalizes, dedupes, and writes. -- replace the remaining scaffolded provider paths with funded or production-grade implementations -- move sandbox execution from policy theater to real constrained runners when the policy story is ready +### Boundary Messages + +The clean crossing surface is small JSON command payloads, not a whole JSON state document: + +```json +{ + "operation": "upsert_open_case", + "sourceMessageId": "discord-message-id", + "status": "pending", + "summary": "What Void owes the room", + "lastTouchedAt": "2026-05-16T00:00:00.000Z" +} +``` + +```json +{ + "operation": "append_distilled_memory", + "kind": "project_seam", + "subject": "AquariumSynthCSharp", + "summary": "Workflow cannot own the body.", + "evidenceRefs": ["source:..."], + "observedAt": "2026-05-16T00:00:00.000Z" +} +``` + +The runner can hand these to a CLI/MCP tool. The store decides what survives. + +### Derived, Not Stored + +- Self-state prompt summaries are derived from typed documents. +- Recent room context is derived from Discord archive and the current poll. +- Topic saturation is derived from incubation/memory support, not separately stored as another truth. +- Source coverage is derived from recent evidence refs and repo/archive metadata. +- Need-to-speak can keep a small pressure field, but its inputs remain receipts, candidates, and time since last speech. +- Legacy top-level mirrors are deleted. If a consumer needs a projection, render it on demand. + +### Delete Because It Compensates For Bad Ownership + +- `.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`. +- 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. + +### Impossible By Construction + +- An unattended agent cannot corrupt the entire self-state by rewriting one JSON file. +- Two fields cannot both claim to be the cursor. +- Repo activity cannot advance by bypassing the state service. +- Delivery receipts cannot exist only in a status file while state forgets the bot spoke. +- A projection cannot become authoritative. +- Unknown fields cannot silently become doctrine just because `.passthrough()` let them in. + +## Current VoidBot Compared To The Ideal + +- The bot/worker/provider/RAG/Postgres/Qdrant shape is basically sound. +- Source archive sharding is sound. +- Interaction memory being Postgres-backed is sound. +- The private moderation/self-state foundation is not sound: + - canonical MessagePack exists, but JSON is still a mutation surface + - schema validation is too permissive to protect invariants + - helpers mutate projection files and then commit whole-state changes + - legacy mirrors keep reintroducing stale truth surfaces + - `scripts/void-memory-organ.mjs` owns storage cleanup, semantic interpretation, vectors, incubation, sleep consolidation, identity crystallization, agency, and speech candidates in one file + - the scheduled moderation runner owns lifecycle through a huge prompt instead of a typed runner contract + +Verdict: stop feature work and rebuild this foundation. The rest of the machine can keep running, but moderation/mood/self-state work should cut toward typed state tools before adding new behavior. + +## Migration Plan + +### Commit 1: Name The Boundary + +- Add typed self-state domain interfaces in core. +- Define document types and operation payload types. +- Keep current storage untouched. +- Verification: typecheck only. + +### Commit 2: Add Read-Only Typed Projections + +- Build a self-state service that reads current canonical state and renders the same summaries used by direct replies. +- Keep JSON projection for the old runner. +- Verification: compare rendered summary against current loader output on a fixture. + +### 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. + +### Commit 4: Move Repo Activity Cursor Behind The Store + +- Change `scripts/export-recent-repo-activity.mjs` so it never writes `.voidbot/private/moderation-agent-state.json`. +- It should emit observed activity and call/store a typed `update_repo_activity_cursor` operation. +- Verification: run with a temp fixture store; cursor advances without JSON projection writes. + +### Commit 5: Replace Agent Whole-State Editing With Operation Output + +- Scheduled moderation child may propose operations and speech, not edit state. +- Runner applies operations through the typed store. +- Keep old JSON runner behind a fallback flag for one commit only. +- Verification: dry run with `-NoPost` applies only allowed operations. + +### Commit 6: Delete JSON Projection Authority + +- Remove routine materialization/commit of `.voidbot/private/moderation-agent-state.json`. +- Keep an explicit debug export command if humans need to inspect state. +- Remove `legacyJsonPath` from normal paths. +- Verification: mood drift and moderation dry runs pass without touching JSON. + +### Commit 7: Cut Legacy Mirrors + +- Remove top-level mirror reconciliation. +- Migrate any consumer to typed projections. +- Delete mirror fields from canonical state. +- Verification: projection summaries still contain required information; no code references mirror keys. + +### Commit 8: Split The Memory Organ + +- Split deterministic cleanup from semantic interpretation. +- Keep vector/resonance/incubation maintenance behind typed state operations. +- Move speech-candidate queuing into a candidate intervention service. +- Verification: existing fixture state produces bounded, typed operations and no whole-state rewrite. + +### Commit 9: Rebuild Scheduled Runner As A Phase Machine + +- Replace prompt-owned lifecycle with explicit phases: + - poll chronology + - read typed state summary + - collect evidence + - ask model for decisions/operations + - validate/apply operations + - optionally send speech + - record receipts/cursor +- Verification: durable logs show each phase and mutation count. + +### Commit 10: Resume Product Hardening + +- Only after JSON mutation and legacy mirrors are gone: + - public-lane moderation policy + - admin/forensics surfaces + - restore drills + - provider/sandbox scaffolding cleanup ## Rules For Editing This Plan diff --git a/state/evidence.jsonl b/state/evidence.jsonl index f7f80a4..ec1580c 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -86,3 +86,4 @@ {"ts":"2026-05-16T05:46:00Z","type":"implementation","status":"ok","note":"A second cleanup pass showed the memory organ was still preserving generic `system/question` fossils and runtime drafts with phrases like `looks like a live seam`, including junk such as `Metacrat still looks like a live seam.` The organ now treats that boilerplate as template smell, drops `recent-preoccupation` and `quiet-room-status` semantic memories, rejects person-singleton labels as doctrine, and rewrites stale runtime drafts/opinions during manual or sleep-driven reconciliation so naps stop regenerating the same nonsense."} {"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."} diff --git a/state/map.yaml b/state/map.yaml index 7dfa1a5..d52a7e8 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -14,9 +14,11 @@ objective: Aetheria lore, while keeping the system understandable enough to modify safely. current: > - Keep the persistent state spine honest while shifting back toward - higher-priority public-lane and ops hardening now that the obvious - runtime-file monarchies have been cut into clearer seams. + Stop feature work on moderation, mood, and self-state until the private + state boundary is rebuilt around typed CultCache mutations. The immediate + priority is to remove JSON projection authority, cut legacy mirrors, and + make unattended agents mutate state through explicit tools instead of + rewriting whole state files. constraints: - Public traffic still rides one remote Qwen box plus local embedding and ops infrastructure. @@ -54,6 +56,8 @@ data_flow: active_subgoals: - Make the new project-state surfaces the default continuity path for nontrivial VoidBot work. + - Rebuild the moderation/self-state foundation so canonical CultCache documents are mutated only through typed operations, never through an editable JSON working projection. + - Cut legacy moderation mirrors and whole-state projection commits before adding more moderation, mood, agency, or public-lane behavior. - Keep public-lane limits, moderation, and provider behavior constrained enough that one 4060 Ti box does not get flayed for sport. - Preserve boring observability and startup discipline around Postgres, Qdrant, Ollama, Docker, backups, scheduled tasks, watchdogs, and any private local fire-signal extensions. - Keep the runtime organs legible and only spend more refactor budget when a file clearly earns it. @@ -61,6 +65,9 @@ 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. + - 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. - Ephemeral room-reading should come from an explicit local-LLM sidecar inference pass plus raw recent-message evidence, not from a rules bucket pretending to understand natural language. - The VoidBot MCP server is the preferred search plane for archived Discord, indexed GameCult repos, Aetheria lore, and owner notifications. @@ -71,7 +78,7 @@ accepted_design: - Unattended moderation speech should use a local bot-token script instead of approval-gated side-effecting MCP tools, otherwise the loop keeps stopping to ask permission before it can talk. - Quiet moderation runs should not force novelty theater. If incubation already holds a live, grounded, low-saturation thought, the loop may deepen it directly; random archive excursions and repo sweeps are for hungry, stale, or oversaturated queues, not mandatory throat-clearing before every private thought. - The moderation loop is also Void's only standing cross-project perch. Quiet runs should sweep recent tracked-repo commit activity, record repo-activity passes in state, and treat the broader experiment zoo as fair game for grounded commentary when that wider view would help the room. - - The moderation self-state now lives behind a typed cache seam: canonical state in MessagePack, editable unattended working view in JSON, consumer code talking to the persistence layer instead of pawing raw files directly. + - The current moderation self-state cache seam is only a half-measure: canonical MessagePack is good, but the editable JSON working projection is now rejected as a mutation authority and must be replaced with typed CultCache operations. - The repo-weather lane should not be pathologically timid: a fresh, grounded convergence across active repos should bias the bridge toward a concise herald note or at least a stronger draft instead of being buried as private diary sludge by default. - Quiet-room thought sharing should also stop treating "no live hook" as a sacred veto. When a world-facing seam is concrete, ripe, and still reasonably novel, the default question should become how to say it cleanly, and the memory organ should queue a durable candidate share instead of relying on prompt bravery alone. - The moderation loop cannot trust archive polling alone to remember that it already spoke. Recent delivered replies belong in canonical moderation state as `moderation_runtime.recent_delivery_receipts`, and direct-question dedupe should consult those receipts instead of assuming Discord history will reliably echo the bot's own sends back into view. @@ -132,7 +139,11 @@ rejected_paths: reason: giant shared files for unrelated state hide costs and rot the next rehydrate - name: source_answers_without_retrieval reason: vibes produce plausible slop that sounds smart and lies with a straight face + - name: json_projection_as_state + reason: editable whole-state JSON lets unattended agents, helpers, and legacy mirrors bypass typed ownership while pretending the projection is not authoritative + - name: semantic_cleanup_as_ownership + reason: a giant cleanup organ that repairs bad labels, mirrors, and stale runtime residue is proof the state boundary admitted sludge in the first place current_status: - summary: VoidBot now has a real project-memory spine plus six legibility-hardening passes on major runtime organs. The owner Codex lane, local Ollama lane, Discord bot lane, worker MCP surface, interaction-memory logic, and state-storage persistence layer were all split into smaller seams, and the ops spine includes both ignored local watchdog extensions for adjacent fire signals and a dedicated logon startup task path for stack resurrection after reboot. The stack is still dense, but it no longer depends purely on transcript memory or one-file monarchies to stay coherent. Recent moderation cuts taught the heartbeat to remember what it actually said via delivery receipts, to stop forcing repo weather into one grand law when the concrete diffs do not earn it, to let values and activations harden into real discomforts/tensions/advocacy requests, and to stop preserving stale memory residue just because it already lived in the file. - next_action: Keep using the canonical state files for re-entry, then watch whether the new discomfort/advocacy organs produce useful outward opinions and self-directed objections without turning into performative angst. Also watch the cleaned moderation state surface: if labels slide back into slogan-slop or the file starts hoarding stale repo/archive/runtime residue again, cut the retention or labeler path instead of adding another compensator. + summary: VoidBot's ordinary bot/worker/provider/RAG/Postgres/Qdrant structure is still conceptually sound, but the moderation/mood/private-self-state foundation has become architectural Jenga. It currently depends on canonical MessagePack plus an editable JSON projection, broad passthrough schemas, legacy mirror fields, a giant memory-organ cleanup pass, and a prompt-owned scheduled runner. That is not a stable foundation for more behavior. + next_action: Make the typed CultCache state boundary the top priority. First define the smallest coherent self-state document model and mutation operations, then move repo cursor/open-case/receipt/candidate/memory updates behind those tools. Delete JSON projection authority and legacy mirrors early instead of adding adapters around them. diff --git a/state/scratch.md b/state/scratch.md index 41a4288..798d782 100644 --- a/state/scratch.md +++ b/state/scratch.md @@ -2,9 +2,11 @@ ## Current Subgoal -No active scratch subgoal. +Design and execute the private self-state teardown: replace editable JSON projection authority with typed CultCache mutation tools, then delete legacy mirrors and compensating cleanup paths. ## Working Notes -- Replace this file freely while working one bounded move. -- Distill any lasting lesson into `state/map.yaml`, `state/evidence.jsonl`, or `notes/fresh-workspace-handoff.md` before clearing it. +- Smallest coherent target: private Void self-state is a set of typed CultCache documents, 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.