symfonic.capabilities.memory.layers¶
layers ¶
The five memory layers, and the one place their order is decided.
The Pentad is the framework's existing vocabulary (symfonic.memory.types);
this module restates it as a StrEnum on the capability side so a port
signature never has to reach into the legacy package to name a layer. The
strings are identical, which is what makes the migration a re-import rather than
a data conversion.
The ladder exists for one reason: two memories that tie on score still need a defined relative position, and "whichever the backend yielded first" is not one. It is a rendering order, not a precedence claim โ nothing here says a semantic fact matters more than an episode.
MemoryLayer ¶
Bases: StrEnum
The five layers of the Pentad memory model.
EPISODIC
class-attribute
instance-attribute
¶
Narrative events, scenarios, and timestamps (When/Where).
PROCEDURAL
class-attribute
instance-attribute
¶
Skills, code snippets, and workflows (How).
PROSPECTIVE
class-attribute
instance-attribute
¶
Commitments, reminders, and pending tasks (Future).
SEMANTIC
class-attribute
instance-attribute
¶
Permanent facts and graph entities (What).
WORKING
class-attribute
instance-attribute
¶
Active conversation context, session-scoped (Now).
layer_index ¶
resolve_layer ¶
Turn a caller's layer string into a member, or refuse it in-hierarchy.
MemoryLayer('reflective') raises a bare :class:ValueError, which a
caller guarding on :class:~.errors.MemoryCapabilityError would miss. Every
way of naming a layer wrong reports the same way.