Make sleep own durable memory promotion
This commit is contained in:
parent
868e242ce4
commit
5df282e6b4
13 changed files with 130 additions and 44 deletions
|
|
@ -34,10 +34,11 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
|
|||
- `scripts/simulate-void-mood.mjs` owns typed sleep/speaking-pressure over `.voidbot/private/void-self-state.cc`. During sleep, it invokes typed memory maintenance once per nap unless that nap already completed a pass; use `--skip-memory-maintenance` for smoke runs that must not call Codex.
|
||||
- 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.
|
||||
- `scripts/run-void-memory-maintenance.ps1` is the first replacement memory-maintenance organ. It builds a bounded context from typed memories/incubation/candidates/runtime, loads `prompts/void-memory-maintenance.md`, and applies only allowed memory/incubation/candidate typed operation proposals through `scripts/void-self-state.mjs`. In sleep mode, memory pressure sets `sleepDirective.forceDistillation`; a real model pass returning no operations under pressure fails visibly.
|
||||
- Rumination does not write durable memory. It can only emit `record_short_term_memory`; sleep maintenance must promote short-term records with `apply_memory_distillation`, merge them into incubation and prune them, or prune them outright. A real sleep pass that leaves short-term records behind fails.
|
||||
- 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.
|
||||
- The desired agency shape is typed state operations plus derived/model-owned policy, not a permanent sermon generator in maintenance code.
|
||||
- Sleep/distillation now has a runner boundary and prompt contract, but the substantive model behavior still needs live exercising. The invariant is fixed: 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.
|
||||
- Typed memory operations now enforce the first ingress wall for the next brain: rumination can only use `record_short_term_memory`, while sleep maintenance promotes with `apply_memory_distillation` or drops residue with `prune_short_term_memories`. Memory writes 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`.
|
||||
- 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`.
|
||||
|
|
|
|||
|
|
@ -119,9 +119,9 @@ This note is the source-grounded description of how the live VoidBot stack is sh
|
|||
- `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/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.
|
||||
- typed self-state operation CLI. It applies strict operation payloads such as cursor updates, open-case changes, delivery receipts, repo cursor updates, short-term memory records, sleep-owned distillations, 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/run-void-memory-maintenance.ps1`
|
||||
- typed memory-maintenance runner. It builds a bounded prompt-facing context from typed memories, incubation, candidates, receipts, and scheduled runtime; loads `prompts/void-memory-maintenance.md`; asks Codex for memory/incubation/candidate operation proposals; then applies only allowed typed operations through `scripts/void-self-state.mjs`. It accepts `-StateFilePath` so fixture passes can use a throwaway `.cc` store.
|
||||
- typed memory-maintenance runner. It builds a bounded prompt-facing context from typed short-term memories, durable memories, incubation, candidates, receipts, and scheduled runtime; loads `prompts/void-memory-maintenance.md`; asks Codex for memory/incubation/candidate operation proposals; then applies only allowed typed operations through `scripts/void-self-state.mjs`. It accepts `-StateFilePath` so fixture passes can use a throwaway `.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`
|
||||
|
|
@ -196,5 +196,5 @@ Within the Postgres path, the implementation is split on purpose now too:
|
|||
4. It loads `prompts/void-memory-maintenance.md` and asks Codex for operation proposals unless `-SkipModel` is set.
|
||||
5. The parent runner rejects any operation outside memory, incubation, or candidate-intervention maintenance.
|
||||
6. The parent runner applies allowed operations through `scripts/void-self-state.mjs`.
|
||||
7. In sleep mode, the context carries `sleepDirective.forceDistillation` when there is memory pressure. A real model pass that returns no operations under pressure fails visibly instead of letting yesterday's residue haunt the state.
|
||||
7. In sleep mode, the context carries `sleepDirective.forceDistillation` when there is short-term memory pressure. A real model pass that returns no operations under pressure fails visibly, and any real sleep pass that leaves short-term memory behind fails instead of letting yesterday's residue haunt the state.
|
||||
8. This is the replacement path for sleep/distillation and agency work: model-owned proposals crossing the typed operation boundary, not deterministic repair code editing state.
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Runtime context dies at the end of the pass unless an explicit typed mutation pr
|
|||
- `upsert_open_case`
|
||||
- `close_open_case`
|
||||
- `record_delivery_receipt`
|
||||
- `append_distilled_memory`
|
||||
- `record_short_term_memory`
|
||||
- `merge_incubation_support`
|
||||
- `queue_candidate_intervention`
|
||||
- `retire_candidate_intervention`
|
||||
|
|
@ -79,6 +79,7 @@ Runtime context dies at the end of the pass unless an explicit typed mutation pr
|
|||
- `update_speaking_pressure`
|
||||
- `propose_memory_distillation`
|
||||
- `apply_memory_distillation`
|
||||
- `prune_short_term_memories`
|
||||
- Model/agent output crosses the boundary as proposed operations, not as rewritten state.
|
||||
- The state service validates, normalizes, dedupes, and writes.
|
||||
|
||||
|
|
@ -96,7 +97,7 @@ The clean crossing surface is small JSON command payloads, not a whole JSON stat
|
|||
}
|
||||
```
|
||||
|
||||
Memory-bearing operations have a stricter contract than historical projections. A new distilled memory must carry:
|
||||
Memory-bearing operations have a stricter contract than historical projections. A new rumination memory is short-term and must carry:
|
||||
|
||||
- a concrete target
|
||||
- a summary
|
||||
|
|
@ -109,12 +110,29 @@ If those fields are missing, the operation is invalid. This is the wall that kee
|
|||
|
||||
```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"
|
||||
"operation": "record_short_term_memory",
|
||||
"memory": {
|
||||
"memoryId": "mem-aquarium-body-workflow",
|
||||
"kind": "project_seam",
|
||||
"target": {
|
||||
"kind": "repo",
|
||||
"id": "AquariumSynthCSharp",
|
||||
"label": "AquariumSynthCSharp"
|
||||
},
|
||||
"summary": "Workflow cannot own the body.",
|
||||
"claim": "The implementation boundary should own runtime state instead of leaving workflow scripts to compensate for it.",
|
||||
"tension": "Workflow scripts are good at orchestration and bad at being an organism.",
|
||||
"actionImplication": "Move authority into the runtime boundary before adding more maintenance scripts.",
|
||||
"evidenceRefs": [
|
||||
{
|
||||
"ref": "source:...",
|
||||
"kind": "source"
|
||||
}
|
||||
],
|
||||
"createdAt": "2026-05-16T00:00:00.000Z",
|
||||
"updatedAt": "2026-05-16T00:00:00.000Z",
|
||||
"tags": []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue