Context
decisions/memory-unification (aegis#457, 2026-04-11) made the wiki at cms.stackbilt.dev the canonical store for durable AEGIS knowledge, with memory-worker (stackbilt-memory) reduced to an index-only role. Phases 3 and 5 of that epic shipped: wiki_* MCP tools are live, aegis_memory/aegis_record_memory/aegis_forget_memory are removed, and PRISM's dreaming-cycle synthesis (synthesis.ts) now writes to wiki pages (scope: dreams) instead of memory fragments.
The April decision doc explicitly flagged one piece as unresolved: "Consolidation logic needs a new shape under the unified model — wiki pages don't consolidate the same way fragments do. This is where Phase 5 will spend design time." That design work never happened.
The gap
consolidateEpisodicToSemantic (src/kernel/memory/consolidation.ts) still calls memoryBinding.store() directly against memory-worker's fragment store on every run. It does an LLM pass over recent episodes and ADD/UPDATE/DELETE's fragments — completely independent of the wiki. These fragments:
- Get no
sources[] provenance, no lint, no contradiction detection
- Are invisible to
wiki_search/wiki_read/wiki_list
- Are NOT invisible to chat —
recall.ts Stage 3 still queries memory-worker directly and RRF-fuses the results into grounding context, so this isn't silent data loss, but it is permanent fragmentation outside the documented canonical model
Important wrinkle: this function is not invoked anywhere in the aegis-daemon repo's src/index.ts. It runs via @stackbilt/aegis-core's own scheduled-task registration (src/kernel/scheduled/consolidation.ts in this repo calls consolidateEpisodicToSemantic(env.db, ..., env.memoryBinding) directly). The daemon repo has its own local copy of consolidation.ts that is not executed — a dead shadow fork of this file, same pattern as the drift incidents that motivated the memory-adapter re-export pattern (aegis#436/#437).
This means the fix has to ship as a core change, published as a new @stackbilt/aegis-core version and bumped in the daemon's package.json — editing the daemon's local consolidation.ts is a no-op.
Ask
Design the wiki-shaped equivalent of episodic→semantic consolidation. Options worth considering:
- Have consolidation call
wiki_write against the relevant topic-scoped page (append/update body) instead of memoryBinding.store() — requires resolving how an LLM-driven append interacts with the wiki lint pass and sources[] requirements.
- Retarget consolidation through the same MindSpring-probe pattern PRISM's
synthesis.ts now uses, if the two pipelines should converge.
- Explicitly decide consolidation stays fragment-based as a deliberate "fast/cheap episodic signal" layer distinct from the wiki's "curated knowledge" layer — if so, document that as an intentional two-tier design rather than leaving it as an unmigrated leftover, and update
decisions/memory-unification + the aegis/memory-system wiki page to reflect the decision.
Either way, the current state (silently writing to a store the architecture says is index-only, via a file that isn't even the one actually running) should not persist undocumented.
References
decisions/memory-unification (wiki, cms.stackbilt.dev)
aegis/memory-system (wiki, cms.stackbilt.dev) — updated 2026-06-30 with this finding
- aegis#457 (memory unification epic)
aegis-daemon/wiki-drafts/_infra/memory-consumers-audit.md (Phase 1 audit — now stale, see related issue)
Context
decisions/memory-unification(aegis#457, 2026-04-11) made the wiki at cms.stackbilt.dev the canonical store for durable AEGIS knowledge, with memory-worker (stackbilt-memory) reduced to an index-only role. Phases 3 and 5 of that epic shipped:wiki_*MCP tools are live,aegis_memory/aegis_record_memory/aegis_forget_memoryare removed, and PRISM's dreaming-cycle synthesis (synthesis.ts) now writes to wiki pages (scope: dreams) instead of memory fragments.The April decision doc explicitly flagged one piece as unresolved: "Consolidation logic needs a new shape under the unified model — wiki pages don't consolidate the same way fragments do. This is where Phase 5 will spend design time." That design work never happened.
The gap
consolidateEpisodicToSemantic(src/kernel/memory/consolidation.ts) still callsmemoryBinding.store()directly against memory-worker's fragment store on every run. It does an LLM pass over recent episodes and ADD/UPDATE/DELETE's fragments — completely independent of the wiki. These fragments:sources[]provenance, no lint, no contradiction detectionwiki_search/wiki_read/wiki_listrecall.tsStage 3 still queries memory-worker directly and RRF-fuses the results into grounding context, so this isn't silent data loss, but it is permanent fragmentation outside the documented canonical modelImportant wrinkle: this function is not invoked anywhere in the
aegis-daemonrepo'ssrc/index.ts. It runs via@stackbilt/aegis-core's own scheduled-task registration (src/kernel/scheduled/consolidation.tsin this repo callsconsolidateEpisodicToSemantic(env.db, ..., env.memoryBinding)directly). The daemon repo has its own local copy ofconsolidation.tsthat is not executed — a dead shadow fork of this file, same pattern as the drift incidents that motivated the memory-adapter re-export pattern (aegis#436/#437).This means the fix has to ship as a core change, published as a new
@stackbilt/aegis-coreversion and bumped in the daemon'spackage.json— editing the daemon's localconsolidation.tsis a no-op.Ask
Design the wiki-shaped equivalent of episodic→semantic consolidation. Options worth considering:
wiki_writeagainst the relevant topic-scoped page (append/update body) instead ofmemoryBinding.store()— requires resolving how an LLM-driven append interacts with the wiki lint pass andsources[]requirements.synthesis.tsnow uses, if the two pipelines should converge.decisions/memory-unification+ theaegis/memory-systemwiki page to reflect the decision.Either way, the current state (silently writing to a store the architecture says is index-only, via a file that isn't even the one actually running) should not persist undocumented.
References
decisions/memory-unification(wiki, cms.stackbilt.dev)aegis/memory-system(wiki, cms.stackbilt.dev) — updated 2026-06-30 with this findingaegis-daemon/wiki-drafts/_infra/memory-consumers-audit.md(Phase 1 audit — now stale, see related issue)