[PR #8352] [MERGED] feat(chat-summary): ask the Long-Term Memory summary prompt for names and plain sections #8311

Closed
opened 2026-10-27 06:07:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8352
Author: @Promansis
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @Promansis

Base: staging ← Head: feature(chat-summary)/ltm-plain-summary-prompt


📝 Commits (2)

  • cc3fac2 feat(chat-summary): ask the Long-Term Memory summary prompt for names and plain sections (#8350)
  • a065671 Merge upstream/staging into feature(chat-summary)/ltm-plain-summary-prompt

📊 Changes

2 files changed (+65 additions, -70 deletions)

View changed files

📝 packages/shared/src/constants/agent-prompts.ts (+33 -70)
📝 scripts/regressions/prompt.regression.ts (+32 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #8350

Why this change

  • The built-in Long-Term Memory chat-summary prompt asked the model for one field line per memory, with made-up lowercase_snake_case ids, importance tags and KEY / coverage_audit metadata. Long-Term Memory works out who is who from names, so an id such as char_aznable gets read back as aznable and the character is missed. The field lines are also hard for users to read in the Chat Summary panel, and the package no longer needs them (it has read plain prose summaries since Long-Term Memory 1.4.66).

What changed

  • packages/shared/src/constants/agent-prompts.ts: replaced the text of DEFAULT_LONG_TERM_MEMORY_CHAT_SUMMARY_PROMPT with the prompt proposed in the issue. It asks for one full name per person, spelled the same way each time, and seven plain headed sections (What happened, People, Between people, The world, Still open, Recurring, Overall tone) instead of ids, tags and field lines.
  • Unchanged: the template id long-term-memory, the name / summary JSON contract, the No durable memory updates. sentinel, the untrusted-data rule, DEFAULT_CHAT_SUMMARY_COMBINE_PROMPT, existing summaries and users' duplicated templates. No code reads the old format.
  • scripts/regressions/prompt.regression.ts: one new case asserting the new headings, the untrusted-data rule, the sentinel and the JSON keys, and that the old field-line markers are gone. It fails on the previous prompt.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Written by an AI agent; the boxes above are intentionally left unticked for a human to verify. Commands the agent ran on the merged head: pnpm regression:prompt (exit 0, includes the new case) and pnpm check (exit 0). The new case was also run against the old prompt and failed with missing heading ### What happened. The prompt has not been tried against a live model in the app.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8352 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(chat-summary)/ltm-plain-summary-prompt` --- ### 📝 Commits (2) - [`cc3fac2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cc3fac2dc94856e630ee4e2ea2522f508548ef66) feat(chat-summary): ask the Long-Term Memory summary prompt for names and plain sections (#8350) - [`a065671`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a06567113c2d16cd7c477770c6953d8c9b19ffd5) Merge upstream/staging into feature(chat-summary)/ltm-plain-summary-prompt ### 📊 Changes **2 files changed** (+65 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `packages/shared/src/constants/agent-prompts.ts` (+33 -70) 📝 `scripts/regressions/prompt.regression.ts` (+32 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #8350 ## Why this change - The built-in Long-Term Memory chat-summary prompt asked the model for one field line per memory, with made-up `lowercase_snake_case` ids, importance tags and `KEY` / `coverage_audit` metadata. Long-Term Memory works out who is who from names, so an id such as `char_aznable` gets read back as `aznable` and the character is missed. The field lines are also hard for users to read in the Chat Summary panel, and the package no longer needs them (it has read plain prose summaries since Long-Term Memory 1.4.66). ## What changed - `packages/shared/src/constants/agent-prompts.ts`: replaced the text of `DEFAULT_LONG_TERM_MEMORY_CHAT_SUMMARY_PROMPT` with the prompt proposed in the issue. It asks for one full name per person, spelled the same way each time, and seven plain headed sections (What happened, People, Between people, The world, Still open, Recurring, Overall tone) instead of ids, tags and field lines. - Unchanged: the template id `long-term-memory`, the `name` / `summary` JSON contract, the `No durable memory updates.` sentinel, the untrusted-data rule, `DEFAULT_CHAT_SUMMARY_COMBINE_PROMPT`, existing summaries and users' duplicated templates. No code reads the old format. - `scripts/regressions/prompt.regression.ts`: one new case asserting the new headings, the untrusted-data rule, the sentinel and the JSON keys, and that the old field-line markers are gone. It fails on the previous prompt. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Written by an AI agent; the boxes above are intentionally left unticked for a human to verify. Commands the agent ran on the merged head: `pnpm regression:prompt` (exit 0, includes the new case) and `pnpm check` (exit 0). The new case was also run against the old prompt and failed with `missing heading ### What happened`. The prompt has not been tried against a live model in the app. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 06:07:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8311
No description provided.