[GH-ISSUE #1422] [Feature]: Optional review queue for Lorebook Keeper (approve/reject each proposed entry before commit) #702

Closed
opened 2026-10-20 17:32:04 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @GetBeholder on GitHub (May 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1422

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

The Lorebook Keeper automatically creates or updates lorebook entries based on
detected session information. In doing so it often creates duplicate lorebook
entries, far too many keywords, duplicate entry text items, and similar noise.
Keeping the lorebook concise, clean, and accurate currently requires a lot of
manual editing and maintenance.

Proposed behavior

Add an optional review queue where each proposed addition/update is individually
approved or rejected before being committed to the lorebook — working like the
Card Auditor (Card Evolution Auditor) and Consistency Editor approve/reject queue.

Expected owner or impact area

  • App shell, navigation, startup, or providers
  • Catalog resources: chats, characters, personas, lorebooks, presets, connections, agents, gallery, or knowledge
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Refactor branch considerations

From a quick scan (triage pointer, not from the reporter): the approve/reject
queue pattern already exists. The Card Evolution Auditor enqueues proposed edits to
pendingCardUpdates in src/shared/stores/agent.store.ts
(enqueuePendingCardUpdate / dismissPendingCardUpdate / clearPendingCardUpdates)
and surfaces them via CharacterCardUpdateModal for per-batch approve/reject.
Notably, that modal's own header documents the gap: "Unlike the Lorebook Keeper,
card edits require the user's explicit approval" — i.e. the Lorebook Keeper
currently commits automatically. This feature would add an analogous pending queue
plus review modal for Lorebook Keeper proposals (the lorebook-keeper agent;
prompt in src/engine/contracts/constants/agent-prompts.ts), gated behind an
optional setting. Keep the agent logic in the engine and the review UI in the
lorebooks catalog. A per-item review step would also let users prune the duplicate
entries / excess keywords the reporter describes before they are committed.

Alternatives considered

No change. The current behavior is automatic/batch-oriented: it identifies
information worth preserving and adds/updates entries without a per-item approval
step. It is usable, but it requires a lot of editing and maintenance to keep the
lorebook concise, clean, and accurate.

Additional context

Source: forum request by AgentX (3-Star), 4:49 PM, already structured in the
feature-request template. The codebase confirms the gap — the
CharacterCardUpdateModal header explicitly contrasts the Card Auditor's required
approval with the Lorebook Keeper's automatic commits.

Template check

Please uncheck 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 @GetBeholder on GitHub (May 27, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1422 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? The Lorebook Keeper automatically creates or updates lorebook entries based on detected session information. In doing so it often creates duplicate lorebook entries, far too many keywords, duplicate entry text items, and similar noise. Keeping the lorebook concise, clean, and accurate currently requires a lot of manual editing and maintenance. ## Proposed behavior Add an optional review queue where each proposed addition/update is individually approved or rejected before being committed to the lorebook — working like the Card Auditor (Card Evolution Auditor) and Consistency Editor approve/reject queue. ## Expected owner or impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources: chats, characters, personas, lorebooks, presets, connections, agents, gallery, or knowledge - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Refactor branch considerations From a quick scan (triage pointer, not from the reporter): the approve/reject queue pattern already exists. The Card Evolution Auditor enqueues proposed edits to `pendingCardUpdates` in `src/shared/stores/agent.store.ts` (`enqueuePendingCardUpdate` / `dismissPendingCardUpdate` / `clearPendingCardUpdates`) and surfaces them via `CharacterCardUpdateModal` for per-batch approve/reject. Notably, that modal's own header documents the gap: "Unlike the Lorebook Keeper, card edits require the user's explicit approval" — i.e. the Lorebook Keeper currently commits automatically. This feature would add an analogous pending queue plus review modal for Lorebook Keeper proposals (the `lorebook-keeper` agent; prompt in `src/engine/contracts/constants/agent-prompts.ts`), gated behind an optional setting. Keep the agent logic in the engine and the review UI in the lorebooks catalog. A per-item review step would also let users prune the duplicate entries / excess keywords the reporter describes before they are committed. ## Alternatives considered No change. The current behavior is automatic/batch-oriented: it identifies information worth preserving and adds/updates entries without a per-item approval step. It is usable, but it requires a lot of editing and maintenance to keep the lorebook concise, clean, and accurate. ## Additional context Source: forum request by AgentX (3-Star), 4:49 PM, already structured in the feature-request template. The codebase confirms the gap — the `CharacterCardUpdateModal` header explicitly contrasts the Card Auditor's required approval with the Lorebook Keeper's automatic commits. ## Template check Please uncheck 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:32:04 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (May 27, 2026):

I like the proposed behavior.

<!-- gh-comment-id:4557422752 --> @SpicyMarinara commented on GitHub (May 27, 2026): I like the proposed behavior.
Author
Owner

@SpicyMarinara commented on GitHub (May 27, 2026):

Implemented on refactor.

What changed:

  • Added a Lorebook Keeper review queue to the agent store.
  • Added an approve/reject modal for proposed lorebook creates, updates, and deletes.
  • Added a per-chat Review before saving setting; review is enabled by default and can be disabled for automatic commits.
  • Fed existing target lorebook entries into the Lorebook Keeper prompt so it can dedupe against current memory.

Verification:

  • git diff --check
  • pnpm typecheck
  • pnpm lint
  • pnpm check:architecture
  • pnpm build
  • graphify update .
<!-- gh-comment-id:4557653729 --> @SpicyMarinara commented on GitHub (May 27, 2026): Implemented on `refactor`. What changed: - Added a Lorebook Keeper review queue to the agent store. - Added an approve/reject modal for proposed lorebook creates, updates, and deletes. - Added a per-chat `Review before saving` setting; review is enabled by default and can be disabled for automatic commits. - Fed existing target lorebook entries into the Lorebook Keeper prompt so it can dedupe against current memory. Verification: - `git diff --check` - `pnpm typecheck` - `pnpm lint` - `pnpm check:architecture` - `pnpm build` - `graphify update .`
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#702
No description provided.