[GH-ISSUE #7655] [Feature]: Make Narrative Director's Secret Plot prompt editable #4234

Closed
opened 2026-10-21 06:13:06 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @stonebystone on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7655

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Narrative Director's direction prompt can be edited in the Agent Editor, but the prompt that writes and maintains the Secret Plot arc can't. It's the hard-coded NARRATIVE_DIRECTOR_SECRET_PLOT_PROMPT (packages/shared/src/constants/agent-prompts.ts). buildDirectorSecretPlotAgent (director-secret-plot-runtime.ts) and the retry route (retry-agents-route.ts) always use it, whatever the agent's own prompt template says.

That prompt frames every arc as a mystery ("its mystery, resolution conditions"), and it creates a new arc whenever one completes. That suits adventure and intrigue. It works against character-driven roleplay, where the arc you want is something like "this arrangement turns into a relationship neither of them planned", not a plot to uncover. Today the only choices are taking that framing or turning Secret Plot off.

Proposed solution

Add an editable Secret Plot prompt to the Narrative Director's settings in the Agent Editor, next to the existing Secret Plot toggle and run interval:

  • Store it in the agent's settings, e.g. settings.secretPlotPromptTemplate.
  • When it's empty or missing, fall back to the current NARRATIVE_DIRECTOR_SECRET_PLOT_PROMPT, so existing setups behave exactly as now.
  • Use it in both places that build the Secret Plot agent: buildDirectorSecretPlotAgent and the retry route.
  • Keep the JSON output contract (overarchingArc with description, protagonistArc, characterArc, completed) fixed and documented next to the field, so a custom prompt can't break parsing.
  • Include a "reset to default" control, like other editable prompts.

Alternatives considered

  • Writing the arc by hand in the Secret Plot panel and setting a very long run interval so maintenance doesn't rewrite it. This works as a workaround, but the next maintenance pass can still turn it back into a mystery.
  • Removing "mystery" from the default prompt. That changes behavior for everyone who likes the current framing, and it still wouldn't let people tune it.
  • Moving the default text into the Director package in Pasta-Devs/Marinara-Agents. That could be a follow-up; the setting and the fallback are Engine-owned either way.

Additional context

This came up while tuning a character-drama roleplay preset. The model kept escalating background details into a conspiracy plot. A hand-written arc kept on track by Secret Plot would be a good anchor against that drift, if its maintenance prompt could be told what kind of story it is.

cc @SpicyMarinara

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @stonebystone on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7655 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Narrative Director's direction prompt can be edited in the Agent Editor, but the prompt that writes and maintains the Secret Plot arc can't. It's the hard-coded `NARRATIVE_DIRECTOR_SECRET_PLOT_PROMPT` (`packages/shared/src/constants/agent-prompts.ts`). `buildDirectorSecretPlotAgent` (`director-secret-plot-runtime.ts`) and the retry route (`retry-agents-route.ts`) always use it, whatever the agent's own prompt template says. That prompt frames every arc as a mystery ("its mystery, resolution conditions"), and it creates a new arc whenever one completes. That suits adventure and intrigue. It works against character-driven roleplay, where the arc you want is something like "this arrangement turns into a relationship neither of them planned", not a plot to uncover. Today the only choices are taking that framing or turning Secret Plot off. ## Proposed solution Add an editable **Secret Plot prompt** to the Narrative Director's settings in the Agent Editor, next to the existing Secret Plot toggle and run interval: - Store it in the agent's settings, e.g. `settings.secretPlotPromptTemplate`. - When it's empty or missing, fall back to the current `NARRATIVE_DIRECTOR_SECRET_PLOT_PROMPT`, so existing setups behave exactly as now. - Use it in both places that build the Secret Plot agent: `buildDirectorSecretPlotAgent` and the retry route. - Keep the JSON output contract (`overarchingArc` with `description`, `protagonistArc`, `characterArc`, `completed`) fixed and documented next to the field, so a custom prompt can't break parsing. - Include a "reset to default" control, like other editable prompts. ## Alternatives considered - **Writing the arc by hand in the Secret Plot panel and setting a very long run interval** so maintenance doesn't rewrite it. This works as a workaround, but the next maintenance pass can still turn it back into a mystery. - **Removing "mystery" from the default prompt.** That changes behavior for everyone who likes the current framing, and it still wouldn't let people tune it. - **Moving the default text into the Director package** in Pasta-Devs/Marinara-Agents. That could be a follow-up; the setting and the fallback are Engine-owned either way. ## Additional context This came up while tuning a character-drama roleplay preset. The model kept escalating background details into a conspiracy plot. A hand-written arc kept on track by Secret Plot would be a good anchor against that drift, if its maintenance prompt could be told what kind of story it is. cc @SpicyMarinara ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

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

Shipped on staging by #7657. Thank you, @stonebystone! Small polish (help text, an export regression, docs placement) follows in a maintainer follow-up.

<!-- gh-comment-id:6212002739 --> @SpicyMarinara commented on GitHub (Oct 16, 2026): Shipped on staging by #7657. Thank you, @stonebystone! Small polish (help text, an export regression, docs placement) follows in a maintainer follow-up.
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#4234
No description provided.