Memory Types¶
shared.memory_types ¶
Typed memory — 14 categories with per-type retention/decay/boost policy.
14 types: instruction, fact, decision, goal, preference, commitment, relationship, observation, rule, todo, question, hypothesis, context, procedural (S17, ENGRAM: "how to do X" — the data foundation for Stage 2 behavior annotations).
Each type has its own: - default_importance (auto-fill on save) - decay_rate (0 = never decays) - never_archive flag - requires_expires_at flag - boost_on_keywords for retrieval
MemoryKind ¶
Bases: str, Enum
Source code in shared/memory_types.py
get_policy ¶
Get policy for a kind. Unknown kinds fall back to FACT.
Source code in shared/memory_types.py
kind_for_text ¶
Best-effort heuristic for auto-classification. Returns FACT if nothing matches.
Four gates apply. QUESTION is decided by _is_question, TODO by _is_task_request,
RULE by _is_prohibition — by the SHAPE of the text, not by one word appearing in
it — and harness framing is stripped before any of them runs, because the framing
carries a RULE keyword of its own.
ONE MATCHER PER LANGUAGE. Russian keywords match by substring, deliberately: a
boundary costs the Russian stems tens of live matches each, because the house writes
feminine and prefixed forms the key does not spell. English keywords match at a word
start with a hyphen treated as part of the word, deliberately: there the plain
substring only ever hit compounds, while a strict boundary would also kill the
inflections the suite requires. See _keyword_hits for the measurement.
Returning FACT is not a failure: it is the honest answer for text that matched no pattern, and it costs a coarser retrieval hint. Over-tagging is what this replaces.