[PR #1970] [MERGED] Use Prose Guardian output as retry avoidance guidance #5363

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1970
Author: @cha1latte
Created: 6/2/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-1952-prose-guardian-avoidance


📝 Commits (1)

  • 1063f71 Use Prose Guardian avoidance guidance

📊 Changes

3 files changed (+54 additions, -7 deletions)

View changed files

📝 src/engine/generation/start-generation.ts (+11 -5)
📝 src/engine/shared/text/generation-guide.ts (+41 -0)
📝 src/features/shell/discovery/discovery-entries.json (+2 -2)

📄 Description

Linked issue

Closes #1952

Why this change

  • Prose Guardian can identify banned or repeated phrasing, but the main generation path treated that text like ordinary agent context. During retry/regeneration, users need those findings to become stronger temporary avoid guidance for the next model call.

What changed

  • Added a Prose Guardian avoidance guide formatter that promotes only prose-guardian context injections into a high-priority temporary avoid block.
  • Threaded current pre-generation injections into the main generation guide message, so Prose Guardian findings ride alongside /guided, /amend, and replay guidance for the current response attempt.
  • Updated Discover metadata for Agents to mention Prose Guardian repetition avoidance.

Refactor impact

Primary owner:

engine generation / roleplay writer-agent guidance

Impact areas reviewed:

  • Roleplay Prose Guardian pre-generation injection path
  • Main generation guide assembly
  • Conversation and Game direct guide paths
  • Discover metadata

Boundary notes:

  • Product behavior stays in src/engine.
  • React UI was not changed.
  • No Rust, storage schema, shared API, dependency, or remote-runtime boundary changes.

Pressure points touched:

  • src/engine/generation/start-generation.ts
  • src/engine/shared/text/generation-guide.ts
  • src/features/shell/discovery/discovery-entries.json

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • node --experimental-strip-types scratch/prose-guardian-avoidance-proof.ts passed locally.
  • pnpm typecheck passed.
  • pnpm check passed.
  • Manual provider/chat generation not run; the machine proof verifies formatter behavior and TypeScript/build/architecture baseline, but not whether a specific model always obeys the avoid-list.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Updated the existing Agents discovery entry so Prose Guardian repetition avoidance is discoverable without adding a new surface.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A - no visible UI changes.


🔄 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/1970 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1952-prose-guardian-avoidance` --- ### 📝 Commits (1) - [`1063f71`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1063f7125d3303338616189d37558983cfa56144) Use Prose Guardian avoidance guidance ### 📊 Changes **3 files changed** (+54 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/generation/start-generation.ts` (+11 -5) 📝 `src/engine/shared/text/generation-guide.ts` (+41 -0) 📝 `src/features/shell/discovery/discovery-entries.json` (+2 -2) </details> ### 📄 Description ## Linked issue Closes #1952 ## Why this change - Prose Guardian can identify banned or repeated phrasing, but the main generation path treated that text like ordinary agent context. During retry/regeneration, users need those findings to become stronger temporary avoid guidance for the next model call. ## What changed - Added a Prose Guardian avoidance guide formatter that promotes only `prose-guardian` context injections into a high-priority temporary avoid block. - Threaded current pre-generation injections into the main generation guide message, so Prose Guardian findings ride alongside `/guided`, `/amend`, and replay guidance for the current response attempt. - Updated Discover metadata for Agents to mention Prose Guardian repetition avoidance. ## Refactor impact Primary owner: engine generation / roleplay writer-agent guidance Impact areas reviewed: - Roleplay Prose Guardian pre-generation injection path - Main generation guide assembly - Conversation and Game direct guide paths - Discover metadata Boundary notes: - Product behavior stays in `src/engine`. - React UI was not changed. - No Rust, storage schema, shared API, dependency, or remote-runtime boundary changes. Pressure points touched: - `src/engine/generation/start-generation.ts` - `src/engine/shared/text/generation-guide.ts` - `src/features/shell/discovery/discovery-entries.json` ## Validation - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `node --experimental-strip-types scratch/prose-guardian-avoidance-proof.ts` passed locally. - `pnpm typecheck` passed. - `pnpm check` passed. - Manual provider/chat generation not run; the machine proof verifies formatter behavior and TypeScript/build/architecture baseline, but not whether a specific model always obeys the avoid-list. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Updated the existing Agents discovery entry so Prose Guardian repetition avoidance is discoverable without adding a new surface. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A - no visible UI changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:37 +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#5363
No description provided.