mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8350] [Feature]: Built-in Long-Term Memory summary prompt: write names and plain sections instead of ids and field lines #8289
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8289
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8350
Originally assigned to: @Promansis on GitHub.
What problem does this solve?
The built-in "Long-Term Memory" summary prompt (
DEFAULT_LONG_TERM_MEMORY_CHAT_SUMMARY_PROMPTinpackages/shared/src/constants/agent-prompts.ts, the template the Chat Summary panel offers when the Long-Term Memory agent is on) asks the model for one field line per memory:[MAJOR] subject: char_aznable | section: facts | text: ... | caused_by: event_id, withlowercase_snake_caseids made up from names, event ids and link fields, importance tags, andKEY/coverage_auditmetadata.char_aznablehas to be turned back into a name, and that step loses people: the package readschar_aznableasaznableand misses Char Aznable. Names written out (Char Aznable) were fixed in Long-Term Memory 1.4.79. The id form was left alone on purpose, because the prompt asking for it should change instead.The package no longer needs the fields. Since Long-Term Memory 1.4.66 the extractor reads plain prose summaries as well as headed ones. On 15 real chat summaries, prose versions of the same summaries cost 16 facts against a run-to-run floor of 18, with Opus as the extraction model. Not one fact was attached to the wrong character.
Proposed solution
Replace the text of
DEFAULT_LONG_TERM_MEMORY_CHAT_SUMMARY_PROMPTwith the prompt below. It is a host-only change to one constant:long-term-memory), the JSON contract (name,summary), theNo durable memory updates.sentinel and the untrusted-data rule.scripts/regressions/prompt.regression.tscompares the constant by identity only.DEFAULT_CHAT_SUMMARY_COMBINE_PROMPTalready says "return the same summary format requested by the system prompt" and needs no change.What the reader sees (illustrative), before:
After:
Kept from today's prompt:
Dropped:
KEYandcoverage_audit: the package takes the message range from the Engine's summary entry and aliases from the character records.[IMPORTANCE]tags: the extractor sets importance itself.section:names and the ids themselves.Headings: the new headings avoid the section names the package parses as field lines (
timeline_event,character_fact,relationships,characters,events,world,threads,tone,anchorand a few variants). That keeps the report on the prose path that was measured, and it is why the last heading is "Overall tone" rather than "Tone".Proposed prompt text
Alternatives considered
Additional context
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: