[GH-ISSUE #1086] [Feature]: Remove broad existing-note context from the Long-Term Memory extraction prompt #553

Closed
opened 2026-10-20 17:28:33 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1086

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

The Long-Term Memory extraction prompt serializes a broad existingTypedNotes collection (via formatExistingNotes) and includes instructions that make the model authoritative for existing note identity and link targets. Prompt size grows with the vault's existing-note set, and identity decisions depend on model output instead of code.

Once bounded post-extraction reconciliation exists (issue #1085), the prompt no longer needs broad vault context: canonical identity is resolved in code after extraction.

Proposed package or change

Package: long-term-memory (server extraction prompt).

  • Stop serializing existingTypedNotes into the primary extraction prompt.
  • Remove the instructions that ask the model to select or preserve canonical existing note IDs and existing link targets (for example the "Do not intentionally target an existing note id unless that exact note appears in existingTypedNotes" rule).
  • Reframe subjectId and link targets as source-local hints.
  • Keep the evidence-unit output shape unless a focused failure proves a structural change is necessary.
  • Wire extraction to consume the reconciliation behavior delivered by issue #1085.

Keep unchanged: the retrieval/matching algorithms from #1085; compiler and lifecycle behavior; draft/review/apply; provider fallback and truncation recovery; deterministic game-mode extraction; generated bundles and catalogs.

Proof: the prompt contains source context but no broad existing-note serialization; extraction succeeds when the vault contains more notes than the prompt could hold; reconciliation still matches, creates, and flags ambiguity correctly; deduplication, scope, links/event closure, and draft/review/apply behavior are unchanged; game-mode extraction remains provider-free.

Why should this be optional?

This is a behavior change to the existing downloadable long-term-memory Agent package's server prompt, not the lightweight Engine core. It follows the catalog model: change source/builders, then rebuild generated bundles and the catalog lane separately.

Alternatives considered

  • Remove existing notes from the prompt without #1085: causes duplicate notes; rejected.
  • Keep a small prompt hint subset indefinitely: deferred; remove the dead context once reconciliation is proven.

Additional context

Depends on #1085 (bounded post-extraction reconciliation). Target branch: staging.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1086 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? The Long-Term Memory extraction prompt serializes a broad `existingTypedNotes` collection (via `formatExistingNotes`) and includes instructions that make the model authoritative for existing note identity and link targets. Prompt size grows with the vault's existing-note set, and identity decisions depend on model output instead of code. Once bounded post-extraction reconciliation exists (issue #1085), the prompt no longer needs broad vault context: canonical identity is resolved in code after extraction. ## Proposed package or change Package: `long-term-memory` (server extraction prompt). - Stop serializing `existingTypedNotes` into the primary extraction prompt. - Remove the instructions that ask the model to select or preserve canonical existing note IDs and existing link targets (for example the "Do not intentionally target an existing note id unless that exact note appears in existingTypedNotes" rule). - Reframe `subjectId` and link targets as source-local hints. - Keep the evidence-unit output shape unless a focused failure proves a structural change is necessary. - Wire extraction to consume the reconciliation behavior delivered by issue #1085. Keep unchanged: the retrieval/matching algorithms from #1085; compiler and lifecycle behavior; draft/review/apply; provider fallback and truncation recovery; deterministic game-mode extraction; generated bundles and catalogs. Proof: the prompt contains source context but no broad existing-note serialization; extraction succeeds when the vault contains more notes than the prompt could hold; reconciliation still matches, creates, and flags ambiguity correctly; deduplication, scope, links/event closure, and draft/review/apply behavior are unchanged; game-mode extraction remains provider-free. ## Why should this be optional? This is a behavior change to the existing downloadable `long-term-memory` Agent package's server prompt, not the lightweight Engine core. It follows the catalog model: change source/builders, then rebuild generated bundles and the catalog lane separately. ## Alternatives considered - Remove existing notes from the prompt without #1085: causes duplicate notes; rejected. - Keep a small prompt hint subset indefinitely: deferred; remove the dead context once reconciliation is proven. ## Additional context Depends on #1085 (bounded post-extraction reconciliation). Target branch: `staging`. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:33 +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#553
No description provided.