mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5080] [Feature]: Mari creates preset variables but never references them in a section, so they do nothing #2812
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2812
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5080
Originally assigned to: @kolacheee on GitHub.
What problem does this solve?
Professor Mari can create preset variables, but the prompt she builds never uses them, so they have no effect.
A preset variable is a "choice block" —
{ variableName, question, options[] }that the user picks a value for per chat. Its value only reaches the model where a prompt section's content references it with the{{variableName}}macro (packages/shared/src/types/prompt.ts: "A preset-level variable ... referenced via{{variableName}}in prompts"; the assembler resolves{{varName}}from the per-chat selection inpackages/server/src/services/prompt/assembler.ts). If no section references the variable, the choice block is inert: the user can pick "Warm" vs "Sharp" and nothing changes in the assembled prompt.Mari's workspace guidance in
packages/server/src/services/professor-mari/workspace-agent.service.tstells her to create preset variables asdata.choiceBlocks(variableName/question/options), but nothing tells her the variable only takes effect when a section references{{variableName}}. Her own worked example demonstrates the anti-pattern — it creates atonechoice block next to a section whose content is"You are {{char}}.", so{{tone}}never appears and the variable does nothing. Users then see a variable in the preset UI that has no visible effect, which reads as broken.Proposed solution
Add authoring guidance (and fix the worked example) so that whenever Mari defines a preset variable she also inserts its
{{variableName}}macro into at least one section's content:preset.create/addChoiceBlockguidance, state that a choice block only takes effect when a section references it via{{variableName}}, and that Mari must add that reference when she creates a variable. When she adds a variable to an existing preset, she should also update a section (updateSection) to reference it."You are {{char}}. Speak in a {{tone}} tone."for thetoneexample.This is guidance-only (prompt/example), no engine or schema change.
Alternatives considered
Additional context
packages/shared/src/types/prompt.ts(ChoiceBlock,{{variableName}}),packages/server/src/services/prompt/assembler.ts(chatChoices → variableValues →{{varName}}).toneworked example:packages/server/src/services/professor-mari/workspace-agent.service.ts(thepreset.createguidance line and the example command).Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: