[GH-ISSUE #8251] [Issue]: The Illustrator never sees the current Maps location's path or description #8329

Closed
opened 2026-11-07 16:42:13 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @ylli-selmani on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8251

Originally assigned to: @ylli-selmani on GitHub.

Summary

In a Roleplay chat with Maps on, the narrator gets the current map location (its path and public description) in <spatial_context>. The Illustrator doesn't. It only gets the location's reference image, and the prompt writer never sees that image: it goes straight to the image model. So the writer guesses the background. On image models without reference support (NovelAI Diffusion V5 today) the image is also dropped, and the location is lost entirely:

[novelai] Dropping 1 reference image(s): precise reference requires a V4.5 model, got nai-diffusion-5-full

Expected behavior

The Illustrator's prompt writer should know where the scene is. When the Illustrator's "Tracker data" Context Source is on, it should get a short <current_location> block with the location's path and public description, and use it for the setting and background unless the scene clearly contradicts it.

Actual behavior

Neither Illustrator prompt path reads the Maps location:

  • automatic Illustrator runs (buildAgentExtras in agent-executor.ts);
  • [illustrate: ...] commands and the Gallery's Illustration button (the manual writer in illustrator-manual-prompt-generation.ts).

The location is already resolved in both routes (ownerSpatialProjection in generate.routes.ts, retryOwnerSpatialProjection in retry-agents-route.ts), but only its reference image and linked lorebook entries are used. The text never reaches the AgentContext.

Steps to reproduce

  1. In a Roleplay chat, turn on Maps, add a location with a public description, and move the story there.
  2. Add the Illustrator agent and let it illustrate a scene (automatically, via [illustrate: ...], or with the Gallery button).
  3. With agent debug logging on, read the Illustrator's prompt: it has no location path or description. The narrator's prompt on the same turn has them in <spatial_context>.

Environment

  • Marinara Engine version: 2.5.1 (staging at 9baddc708)
  • Install type: source
  • OS + version: Windows 11
  • Browser or app shell: n/a (server-side prompt assembly)

Logs, screenshots, or video

The NovelAI warning above, from an [illustrate: ...] command while standing in a mapped location with reference artwork.

Additional context

  • Proposed fix: carry the current Roleplay location (breadcrumb path + public description) on the AgentContext, and render it with one shared <current_location> helper in both Illustrator prompt paths, gated by the Illustrator's existing "Tracker data" Context Source. No new toggle.
  • Left out on purpose: location IDs, destinations and the known-locations list (travel data, ~1k tokens), and "Private model memory" (narrator-only secrets, not visual).
  • Game mode is unchanged: it carries location through its own game state.
  • Follows #8246 (the Illustrator's lorebook, summary and author notes).

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 @ylli-selmani on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8251 Originally assigned to: @ylli-selmani on GitHub. ## Summary In a Roleplay chat with Maps on, the narrator gets the current map location (its path and public description) in `<spatial_context>`. The Illustrator doesn't. It only gets the location's reference image, and the prompt writer never sees that image: it goes straight to the image model. So the writer guesses the background. On image models without reference support (NovelAI Diffusion V5 today) the image is also dropped, and the location is lost entirely: ``` [novelai] Dropping 1 reference image(s): precise reference requires a V4.5 model, got nai-diffusion-5-full ``` ## Expected behavior The Illustrator's prompt writer should know where the scene is. When the Illustrator's "Tracker data" Context Source is on, it should get a short `<current_location>` block with the location's path and public description, and use it for the setting and background unless the scene clearly contradicts it. ## Actual behavior Neither Illustrator prompt path reads the Maps location: - automatic Illustrator runs (`buildAgentExtras` in `agent-executor.ts`); - `[illustrate: ...]` commands and the Gallery's Illustration button (the manual writer in `illustrator-manual-prompt-generation.ts`). The location is already resolved in both routes (`ownerSpatialProjection` in `generate.routes.ts`, `retryOwnerSpatialProjection` in `retry-agents-route.ts`), but only its reference image and linked lorebook entries are used. The text never reaches the `AgentContext`. ## Steps to reproduce 1. In a Roleplay chat, turn on Maps, add a location with a public description, and move the story there. 2. Add the Illustrator agent and let it illustrate a scene (automatically, via `[illustrate: ...]`, or with the Gallery button). 3. With agent debug logging on, read the Illustrator's prompt: it has no location path or description. The narrator's prompt on the same turn has them in `<spatial_context>`. ## Environment - Marinara Engine version: 2.5.1 (`staging` at `9baddc708`) - Install type: source - OS + version: Windows 11 - Browser or app shell: n/a (server-side prompt assembly) ## Logs, screenshots, or video The NovelAI warning above, from an `[illustrate: ...]` command while standing in a mapped location with reference artwork. ## Additional context - Proposed fix: carry the current Roleplay location (breadcrumb path + public description) on the `AgentContext`, and render it with one shared `<current_location>` helper in both Illustrator prompt paths, gated by the Illustrator's existing "Tracker data" Context Source. No new toggle. - Left out on purpose: location IDs, destinations and the known-locations list (travel data, ~1k tokens), and "Private model memory" (narrator-only secrets, not visual). - Game mode is unchanged: it carries location through its own game state. - Follows #8246 (the Illustrator's lorebook, summary and author notes). ## 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-11-07 16:42:13 +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#8329
No description provided.