1
0
Fork 0
polaris-task-force/docs
Z8MB1E 4264431e4d feat(npc-dialogue): AI-assisted conversation drafting behind the review gate
Add a Generate button to the flow editor that drafts a whole conversation
from a form brief, and per-line Rewrite/Shorten/Sharpen controls in the node
dialog. Both land in unsaved field state, so a draft only reaches players when
an author saves the document: neither server action writes to npc-dialogues.

- src/lib/ai/generate.ts: extract the Unsloth client out of payload.config so
  Compose and dialogue drafting share one path; add generateStructured and
  resolveModel, with an optional UNSLOTH_MODEL_STRUCTURED override
- generationSchema.ts (pure): strict-safe JSON schema, normalizer with
  breadth layout, validator that rejects unknown flag keys, unauthorised
  effects, dangling hops and missing keys
- generation.ts: context loading, one validate-and-retry, then give up rather
  than hand back a broken graph; dash normalization keeps shipped copy clean
- effect vocabulary limited to notify and flag; emit, reward and discord stay
  author-only
- provenance group on npc-dialogues (migration 20261112_171955) records model,
  prompt version, attempts and the brief the draft was accepted from
- tests: 21 cases covering the normalizer, validator, retry paths and the
  rewrite parser, with the model call injected
- docs/npc-dialogue-ai.md and src/lib/npc-dialogue/AGENTS.md
2026-11-12 12:26:35 -05:00
..
.logs docs(deployment): update deployment diagram for clarity and add subtask log 2026-08-14 21:21:16 -04:00
arma-bridge feat(arma-bridge): handle garage deposit, withdraw, and sync events 2026-10-13 16:02:58 -04:00
backups/pre-agents-split-20261009 docs(agents): split domain guidance into nested AGENTS.md files 2026-10-09 15:46:36 -04:00
bot feat(evaluations): gate leadership ratings by rank instead of squad assignments 2026-10-25 02:53:49 -04:00
case-studies docs: add AGENTS.md subdirectories and login case study 2026-08-19 19:48:35 -04:00
economy feat(economy): add economy tick with demand simulation and price modifiers 2026-09-06 17:22:30 -04:00
operations chore(operations): rollout controls, reconciliation, and bridge recovery 2026-09-20 02:45:00 -04:00
map-system.md feat(map-objectives): superuser-authored strategic objectives on mission maps 2026-10-27 02:12:31 -04:00
npc-dialogue-ai.md feat(npc-dialogue): AI-assisted conversation drafting behind the review gate 2026-11-12 12:26:35 -05:00
wiki-demo-article.md docs(wiki): reword demo article examples 2026-09-06 17:23:03 -04:00
wiki-infobox-template.md feat(wiki): add scoped template CSS and developer HTML templates 2026-09-06 05:32:48 -04:00