Description
Implement the semantic state memory component from MemCoT (arXiv:2604.08216, #3564).
Add a SemanticStateAccumulator to TurnContext in zeph-core that:
- Summarizes the conceptual state after each LLM turn
- Accumulates semantic deltas across the conversation
- Feeds into
ReasoningMemory retrieval as enriched query context
Config flag: memory.memcot.enabled (default: false). When disabled, accumulator is a no-op.
The accumulator must use a fast-tier provider (e.g., gpt-4o-mini) per the multi-model design rule — never a quality-tier provider. The distillation prompt must be short and cost-bounded.
Acceptance Criteria
memory.memcot.enabled config flag wires/no-ops the accumulator
- Integration test on a multi-turn fixture shows accumulator content in debug dump
- No regression on single-turn benchmark
- Feature is completely invisible when
enabled = false (no latency, no LLM calls)
References
Description
Implement the semantic state memory component from MemCoT (arXiv:2604.08216, #3564).
Add a
SemanticStateAccumulatortoTurnContextinzeph-corethat:ReasoningMemoryretrieval as enriched query contextConfig flag:
memory.memcot.enabled(default: false). When disabled, accumulator is a no-op.The accumulator must use a fast-tier provider (e.g.,
gpt-4o-mini) per the multi-model design rule — never a quality-tier provider. The distillation prompt must be short and cost-bounded.Acceptance Criteria
memory.memcot.enabledconfig flag wires/no-ops the accumulatorenabled = false(no latency, no LLM calls)References
/specs/004-memory/004-7-memory-apex-magma.md§14.1.local/testing/playbooks/memory-research-2026-04.md