[GH-ISSUE #1657] feat(gacha-forge): automatically remember chapters and recall relevant history #1627

Closed
opened 2026-10-25 04:02:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1657

Originally assigned to: @SpicyMarinara on GitHub.

Implementation owner: @SpicyMarinara / Codex.

Requested behavior:

  • Automatically summarize a chapter when it ends, rather than requiring the player to compress chapters manually.
  • Keep a persistent general summary of canon up to the current point, included in future story context. Keep the always-included summary within 10% of the consuming model's maximum allowed context, recompressing it as needed without deleting detailed memories.
  • Retain deeper summaries of individual chapters and recall the relevant ones according to the context of the next story/chapter, following the two-level memory approach of Roleplay Advanced Memory Recall.

Trace and reuse Gacha Forge's existing Continuity/storage/generation mechanisms first. Package-owned behavior belongs here; reuse the Engine's public capabilities rather than importing private Roleplay services.

Scope and invariants:

  • Cover the main story, completed Character Story parts, and all saved memories from character chats and other canonical interactions within their world/chronology.
  • Context order: constant overview (through completed canon), up to three relevant detailed summaries of additional main-story chapters, separate relevant character memories, the entire previous canonical chapter, then the current chapter so far.
  • Character Story and character-chat details do not consume the three-chapter recall quota. The full previous chapter does not consume it either. Every stored memory contributes to the overview. Fit optional details within the actual generation request's remaining context; keep the entire previous chapter and current played content intact.
  • Derive context budgets from the actual configured connection/model, never a guessed fixed model capacity; include summary wrappers in token estimates. If a model's context is unknown, make that limitation visible rather than claiming the budget is enforced.
  • Summarize the first canonical playthrough and selected branches, including locked major decisions. Replaying alternate small choices must not rewrite canon or introduce unselected branches.
  • Preserve existing worlds, manual continuity edits, cached generated chapters and stored detailed history. Avoid importing future chapters into earlier story context.
  • Keep summary work and failures visible/retryable without blocking ordinary gameplay; use the existing configured text connection.
  • Do not introduce import/export size limits or arbitrary caps on stored chapter history.

Expected proof: chapter-completion triggers, selected-branch summaries, overview updates, context-based recall, world isolation, concurrent completion/retry/restart behavior, old-world compatibility, and package install/update/offline lifecycle. Publish through a focused staging PR after local checks, review and required GitHub gates.

Originally created by @SpicyMarinara on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1657 Originally assigned to: @SpicyMarinara on GitHub. Implementation owner: @SpicyMarinara / Codex. Requested behavior: - Automatically summarize a chapter when it ends, rather than requiring the player to compress chapters manually. - Keep a persistent general summary of canon up to the current point, included in future story context. Keep the always-included summary within 10% of the consuming model's maximum allowed context, recompressing it as needed without deleting detailed memories. - Retain deeper summaries of individual chapters and recall the relevant ones according to the context of the next story/chapter, following the two-level memory approach of Roleplay Advanced Memory Recall. Trace and reuse Gacha Forge's existing Continuity/storage/generation mechanisms first. Package-owned behavior belongs here; reuse the Engine's public capabilities rather than importing private Roleplay services. Scope and invariants: - Cover the main story, completed Character Story parts, and all saved memories from character chats and other canonical interactions within their world/chronology. - Context order: constant overview (through completed canon), up to three relevant detailed summaries of additional main-story chapters, separate relevant character memories, the entire previous canonical chapter, then the current chapter so far. - Character Story and character-chat details do not consume the three-chapter recall quota. The full previous chapter does not consume it either. Every stored memory contributes to the overview. Fit optional details within the actual generation request's remaining context; keep the entire previous chapter and current played content intact. - Derive context budgets from the actual configured connection/model, never a guessed fixed model capacity; include summary wrappers in token estimates. If a model's context is unknown, make that limitation visible rather than claiming the budget is enforced. - Summarize the first canonical playthrough and selected branches, including locked major decisions. Replaying alternate small choices must not rewrite canon or introduce unselected branches. - Preserve existing worlds, manual continuity edits, cached generated chapters and stored detailed history. Avoid importing future chapters into earlier story context. - Keep summary work and failures visible/retryable without blocking ordinary gameplay; use the existing configured text connection. - Do not introduce import/export size limits or arbitrary caps on stored chapter history. Expected proof: chapter-completion triggers, selected-branch summaries, overview updates, context-based recall, world isolation, concurrent completion/retry/restart behavior, old-world compatibility, and package install/update/offline lifecycle. Publish through a focused staging PR after local checks, review and required GitHub gates.
bsakaguchi 2026-11-07 16:36:04 +07:00
  • closed this issue
  • removed the
    in-pr
    label
Author
Owner

@SpicyMarinara commented on GitHub (Oct 24, 2026):

Implemented in #1658 and published on staging as Gacha Forge 1.14.0 (merge bb4e92aca336e3fd823b957757a1b6c93e3ebb6a). Update the installed Gacha Forge package from the staging catalog.

Context now follows: overview (up to 10% of known context) → up to three additional chapter recalls → separate character memories → the entire previous canonical chapter → the current chapter so far. Completed canon is summarized automatically, with recompression and preserved original records/first-play choices.

Validation passed: 17 Gacha regression suites, 67 focused logic/route cases, 24 desktop/mobile browser executions, exact package update/offline fresh-process restart/uninstall, all seven PR gates, and a viable final-head Dottore review. The live staging and immutable merge archives, all 247 payloads, catalogs and release notes match the reviewed bytes. Post-merge CodeQL also passed. Browser APIs were fixtures; physical-phone and real-provider checks remain manual.

<!-- gh-comment-id:6386666713 --> @SpicyMarinara commented on GitHub (Oct 24, 2026): Implemented in #1658 and published on `staging` as **Gacha Forge 1.14.0** (merge `bb4e92aca336e3fd823b957757a1b6c93e3ebb6a`). Update the installed Gacha Forge package from the staging catalog. Context now follows: overview (up to 10% of known context) → up to three additional chapter recalls → separate character memories → the entire previous canonical chapter → the current chapter so far. Completed canon is summarized automatically, with recompression and preserved original records/first-play choices. Validation passed: 17 Gacha regression suites, 67 focused logic/route cases, 24 desktop/mobile browser executions, exact package update/offline fresh-process restart/uninstall, all seven PR gates, and a viable final-head Dottore review. The live staging and immutable merge archives, all 247 payloads, catalogs and release notes match the reviewed bytes. [Post-merge CodeQL](https://github.com/Pasta-Devs/Marinara-Agents/actions/runs/40111325541) also passed. Browser APIs were fixtures; physical-phone and real-provider checks remain manual.
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#1627
No description provided.