1
0
Fork 0
polaris-task-force/src/app
Z8MB1E de27a53044 feat(npc-dialogue): make the AI prompt voice configurable
The system prompt was a single constant, so tuning how drafted dialogue
sounds meant editing code and redeploying. Split it into the half that is
copy and the half that is a contract.

VOICE and optional HOUSE RULES are now editable from a new
`npc-dialogue-settings` global, and per conversation through an
`voiceOverride` field on `npc-dialogues`. Precedence is dialogue, then
global, then the built-in default, resolved by the pure `resolveVoice`.
STRUCTURE, FIELDS, STATE, OUTPUT and the worked example stay in
`LOCKED_RULES`: the draft validator enforces the same rules, so an edit
there would make every draft fail for reasons an author cannot trace.

Both surfaces render the assembled prompt through the same pure
composer the server calls, so the preview cannot drift from what the
model receives. The global normalises dashes on save, bumps `revision`
only on a real text change, and keeps 20 versions for rollback.

Provenance gains `promptSource` and `promptRevision` so a stored draft
still names the voice that shaped it. A draft that fails twice while a
custom voice is active now says so, instead of looking like a model bug.

`composeDialogueSystemPrompt()` with no arguments reproduces the old
prompt byte for byte, pinned by a golden fixture.
2026-11-24 12:53:33 -05:00
..
(frontend) feat(npc-dialogue): make the AI prompt voice configurable 2026-11-24 12:53:33 -05:00
(payload) feat(npc-dialogue): make the AI prompt voice configurable 2026-11-24 12:53:33 -05:00
api feat(tech-tree): add note nodes with optional frontend visibility 2026-11-23 03:11:36 -05:00
login feat(analytics): add first-party analytics collector, SDK, rollups, and admin dashboard 2026-10-14 12:12:53 -04:00