[PR #1520] [MERGED] fix(long-term-memory): keep each narrated beat when extracting a prose summary (1.4.66) #1527

Closed
opened 2026-10-22 04:03:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1520
Author: @Promansis
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/prose-summary-extraction-rules


📝 Commits (3)

  • e90cc34 fix(long-term-memory): keep each narrated beat when extracting a prose summary
  • 4b0cf10 chore(long-term-memory): release 1.4.60 (#1513)
  • 3d930ef Merge upstream/staging into fix(long-term-memory)/prose-summary-extraction-rules; release long-term-memory 1.4.66

📊 Changes

13 files changed (+60 additions, -53 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.66.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/client.js (+1 -1)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+1 -1)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts (+6 -3)
📝 scripts/build-feature-packages.mjs (+1 -1)

📄 Description

Pull request

Linked issue

Closes #1513

Why this change

  • Extraction from a prose summary kept about a third fewer timeline events than extraction from the same summary written under the memory-stream headings, and dropped the quoted lines. The prompt told the model to omit incidental actions and to prefer a few substantial units for prose.
  • Prose summaries come from custom summary templates, other apps and transcript recaps, so the extractor has to handle them as well as the built-in format.

What changed

  • long-term-memory, DEFAULT_LTM_EXTRACTION_PROMPT (roleplay mode) in shared/.../long-term-memory/constants.ts:
    • The prose_summary rules ask for one timeline event per narrated beat, keep memorable quoted lines with their event, omit only what the summary itself treats as incidental, and extract stated motifs and register.
    • The output-discipline line that preferred fewer units now applies to reference sources only.
  • Structured-summary, character_reference, world_reference and stream rules, and the conversation-mode and game-mode prompts, are unchanged.
  • Release: long-term-memory 1.4.66 on staging f40a5a851, with the CHANGELOG entry, version, manifest, rebuilt server.mjs and client.js, artifact and catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none. Prompt text only: no permission, archive, install, network or Engine-snapshot change. The prompt still treats the source as untrusted data, and the server still validates every unit.
  • Restart, storage, update, or uninstall impact: no stored format change. Prose sources now write about twice as many timeline notes per chat, each shorter; retention and the review cap bound the growth.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • No unit regression: the change is prompt text, and the regression suites mock the model. The proof is a measurement with the real extractor.
  • Measured on 15 real chat summaries, each in prose and in the headed format, two runs per form, Opus extractor, with an Opus fact judge against a same-text noise floor:
    • Facts lost from prose against the headed form fell from 39 to 16 (noise floor 18). No fact landed on the wrong character in any pairing.
    • The headed form with the new rules against today's: 6 lost and 25 gained, under the floor, so the headed path is unchanged.
    • Sonnet: 41 to 28 (floor 20). Haiku: 88 to 39 (floor 28).
    • Prose wrote 121 timeline notes per 15 chats against 61 headed, median 159 characters against 229. Characters, relationships and threads are level.
  • On Haiku, 9 of 15 prose answers reach the 8,192-token default output cap (3 before). The output cap is a separate follow-up.
  • Typecheck, lint, the package build and every Long-Term Memory regression suite pass.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

  • None (extraction prompt only).

🤖 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-Agents/pull/1520 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/prose-summary-extraction-rules` --- ### 📝 Commits (3) - [`e90cc34`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e90cc34e272893d02c3ae3f8f6cf26a5bc9dcaab) fix(long-term-memory): keep each narrated beat when extracting a prose summary - [`4b0cf10`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4b0cf105aea9d0177da4478a70867b95236cd56e) chore(long-term-memory): release 1.4.60 (#1513) - [`3d930ef`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3d930efd98c41f3aed7a81f4d52bf78c4e52f9bd) Merge upstream/staging into fix(long-term-memory)/prose-summary-extraction-rules; release long-term-memory 1.4.66 ### 📊 Changes **13 files changed** (+60 additions, -53 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.66.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/client.js` (+1 -1) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts` (+6 -3) 📝 `scripts/build-feature-packages.mjs` (+1 -1) </details> ### 📄 Description # Pull request ## Linked issue Closes #1513 ## Why this change - Extraction from a prose summary kept about a third fewer timeline events than extraction from the same summary written under the memory-stream headings, and dropped the quoted lines. The prompt told the model to omit incidental actions and to prefer a few substantial units for prose. - Prose summaries come from custom summary templates, other apps and transcript recaps, so the extractor has to handle them as well as the built-in format. ## What changed - `long-term-memory`, `DEFAULT_LTM_EXTRACTION_PROMPT` (roleplay mode) in `shared/.../long-term-memory/constants.ts`: - The `prose_summary` rules ask for one timeline event per narrated beat, keep memorable quoted lines with their event, omit only what the summary itself treats as incidental, and extract stated motifs and register. - The output-discipline line that preferred fewer units now applies to reference sources only. - Structured-summary, `character_reference`, `world_reference` and stream rules, and the conversation-mode and game-mode prompts, are unchanged. - **Release:** `long-term-memory` 1.4.66 on staging f40a5a851, with the CHANGELOG entry, version, manifest, rebuilt `server.mjs` and `client.js`, artifact and catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none - New or changed permissions/entrypoints: none. Prompt text only: no permission, archive, install, network or Engine-snapshot change. The prompt still treats the source as untrusted data, and the server still validates every unit. - Restart, storage, update, or uninstall impact: no stored format change. Prose sources now write about twice as many timeline notes per chat, each shorter; retention and the review cap bound the growth. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - No unit regression: the change is prompt text, and the regression suites mock the model. The proof is a measurement with the real extractor. - Measured on 15 real chat summaries, each in prose and in the headed format, two runs per form, Opus extractor, with an Opus fact judge against a same-text noise floor: - Facts lost from prose against the headed form fell from 39 to 16 (noise floor 18). No fact landed on the wrong character in any pairing. - The headed form with the new rules against today's: 6 lost and 25 gained, under the floor, so the headed path is unchanged. - Sonnet: 41 to 28 (floor 20). Haiku: 88 to 39 (floor 28). - Prose wrote 121 timeline notes per 15 chats against 61 headed, median 159 characters against 229. Characters, relationships and threads are level. - On Haiku, 9 of 15 prose answers reach the 8,192-token default output cap (3 before). The output cap is a separate follow-up. - Typecheck, lint, the package build and every Long-Term Memory regression suite pass. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - None (extraction prompt only). 🤖 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-22 04:03:07 +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-Agents#1527
No description provided.