Split memory into assisted and learned, and deny learned the precedence assisted has

This commit is contained in:
Gmer4Lfe
2026-08-10 21:50:35 -04:00
parent 775bdce6e1
commit 57f3bf2807
3 changed files with 155 additions and 15 deletions
+26 -2
View File
@@ -1735,8 +1735,32 @@
# The character cap is a context budget, not a style guide. At 16384 the retrieved passages,
# the model's reasoning and the conversation history are already competing; memory takes its
# share off the top of every single turn, so keep it short and factual.
AI_MEMORY_FILE="${AI_DATA_DIR}/ai_memory.md"
AI_MEMORY_MAX_CHARS=4000 # ~1000 tokens — truncated with a notice if exceeded
# Two slots, and which one a fact lands in decides how much authority it carries.
#
# assisted written by the operator. The prompt tells the model to prefer it over retrieved
# passages — a human asserting a fact about their own machine outranks a doc that
# may be stale. This is the file the AI tab edits.
# learned proposed by the assistant, accepted by the operator. A hint only: retrieval
# overrules it, and it is trimmed first when the budget bites. Deliberately the
# weaker seat, because memory the model writes AND the prompt ranks above the source
# code would let one wrong conclusion restate itself forever.
#
# AI_MEMORY_FILE is the pre-split name and is still honoured: while the assisted file does not
# exist, the legacy path is read instead, so an upgrade loses nothing.
AI_MEMORY_ASSISTED_FILE="${AI_DATA_DIR}/mem_assisted.md"
AI_MEMORY_LEARNED_FILE="${AI_DATA_DIR}/mem_learned.md"
AI_MEMORY_FILE="${AI_DATA_DIR}/ai_memory.md" # legacy — read only if the assisted file is absent
# Which profiles each slot is given. "*" is all of them. Narrowing is how a General Chat question
# about bash syntax stops carrying this machine's PCIe topology and disk serials.
AI_MEMORY_ASSISTED_PROFILES="*"
AI_MEMORY_LEARNED_PROFILES="*"
AI_MEMORY_MAX_CHARS=4000 # ~1000 tokens — the budget for both slots together
# A ceiling on the learned slot alone, well under the total. A store that grows on its own would
# otherwise end up occupying the whole budget, and the operator's own memory is what would get
# truncated away — the exact inversion of which one matters.
AI_MEMORY_LEARNED_MAX_CHARS=1200
# ━━━ AI Stored Conversations ━━━
# How many past conversations the AI tab and the Monitor tab's AI row keep. One JSON file per