[PR #2235] [MERGED] Fix inline GM background guidance #5496

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-2155-inline-gm-bg-guidance


📝 Commits (2)

  • c37d17b Fix inline GM background guidance
  • 5ec5f6a Record issue 2155 draft PR

📊 Changes

3 files changed (+83 additions, -57 deletions)

View changed files

📝 scratch/bugfix-verification.json (+56 -57)
📝 src/engine/generation/prompt-assembly.ts (+6 -0)
📝 src/engine/modes/game/prompts/gm-prompts.ts (+21 -0)

📄 Description

Linked issue

Closes #2155

Why this change

  • Inline-GM game prompts lost the generated background tag guidance and art-style steering when no separate scene model is configured.
  • This restores the legacy prompt contract so the GM can request a generated background for new visually important locations when background generation is enabled.

What changed

  • Restored canGenerateBackgrounds and artStylePrompt to GmPromptContext / buildGmFormatReminder.
  • Passed the generation capability and setup art-style prompt from game prompt assembly into the reminder.
  • Added the generated background and sanitized art-style lines only inside the inline-GM !hasSceneModel branch.

Refactor impact

Primary owner:

  • game mode / engine generation

Impact areas reviewed:

  • src/engine/modes/game/prompts/gm-prompts.ts
  • src/engine/generation/prompt-assembly.ts
  • Separate scene-analyzer ownership remains unchanged.

Boundary notes:

  • Engine-only prompt behavior; no React, shared API, Rust, storage, schema, dependency, or release metadata changes.

Pressure points touched:

  • Game prompt assembly for GM turns.

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

  • pnpm exec vitest run --config scratch/vitest.issue2155.config.ts --reporter=verbose passed: 1 file, 3 tests. Covered inline GM with generated backgrounds, inline GM without generation, and separate scene model negative control.
  • pnpm typecheck passed.
  • pnpm check passed line endings, architecture, frontend/typecheck, Rust cargo check, docs, discovery, and launcher safety, then failed at pnpm check:unused on an untouched pre-existing issue: VisualReferenceImageSource interface src/engine/capabilities/visual-assets.ts:32:18.
  • Repo proof gate was unavailable locally: C:/Users/celia/.codex/tools/marinara-proof-gate.mjs was not present.
  • Bunny: pass for draft only. Keep draft until the unrelated check:unused baseline blocker is resolved or accepted.

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:

  • Bugfix to existing game prompt behavior; no new discoverable feature.

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. This is React-free prompt text behavior. Focused proof is recorded in scratch/bugfix-verification.json and the scratch Vitest output above.

🔄 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/2235 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2155-inline-gm-bg-guidance` --- ### 📝 Commits (2) - [`c37d17b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c37d17b811408eabedf8cabd8a00cb4078cf0e35) Fix inline GM background guidance - [`5ec5f6a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5ec5f6aacf8f4e445d729bafd8138da342dcb589) Record issue 2155 draft PR ### 📊 Changes **3 files changed** (+83 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `scratch/bugfix-verification.json` (+56 -57) 📝 `src/engine/generation/prompt-assembly.ts` (+6 -0) 📝 `src/engine/modes/game/prompts/gm-prompts.ts` (+21 -0) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2155 ## Why this change - Inline-GM game prompts lost the generated background tag guidance and art-style steering when no separate scene model is configured. - This restores the legacy prompt contract so the GM can request a generated background for new visually important locations when background generation is enabled. ## What changed - Restored `canGenerateBackgrounds` and `artStylePrompt` to `GmPromptContext` / `buildGmFormatReminder`. - Passed the generation capability and setup art-style prompt from game prompt assembly into the reminder. - Added the generated background and sanitized art-style lines only inside the inline-GM `!hasSceneModel` branch. ## Refactor impact Primary owner: - game mode / engine generation Impact areas reviewed: - `src/engine/modes/game/prompts/gm-prompts.ts` - `src/engine/generation/prompt-assembly.ts` - Separate scene-analyzer ownership remains unchanged. Boundary notes: - Engine-only prompt behavior; no React, shared API, Rust, storage, schema, dependency, or release metadata changes. Pressure points touched: - Game prompt assembly for GM turns. ## 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 - `pnpm exec vitest run --config scratch/vitest.issue2155.config.ts --reporter=verbose` passed: 1 file, 3 tests. Covered inline GM with generated backgrounds, inline GM without generation, and separate scene model negative control. - `pnpm typecheck` passed. - `pnpm check` passed line endings, architecture, frontend/typecheck, Rust cargo check, docs, discovery, and launcher safety, then failed at `pnpm check:unused` on an untouched pre-existing issue: `VisualReferenceImageSource interface src/engine/capabilities/visual-assets.ts:32:18`. - Repo proof gate was unavailable locally: `C:/Users/celia/.codex/tools/marinara-proof-gate.mjs` was not present. - Bunny: pass for draft only. Keep draft until the unrelated `check:unused` baseline blocker is resolved or accepted. ## 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: - Bugfix to existing game prompt behavior; no new discoverable feature. ## 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. This is React-free prompt text behavior. Focused proof is recorded in `scratch/bugfix-verification.json` and the scratch Vitest output above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:50 +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#5496
No description provided.