Skip to content

Wire combat narration through the pipeline #516

Description

@dkirby-ms

Summary

Combat narration is deterministic static strings built in combat/actions.ts:18-46 and never uses the LLM. Route combat_action/combat_round narration through NarrationService.narrate() while keeping mechanical combat-log text intact (the LLM must not invent or resolve mechanics — GDD §4.4, enforced by validateLLMOutput).

Scope / Tasks

  • Decide layering: keep the authoritative mechanical line (damage/HP) from combat/actions.ts and add an LLM flavor line, OR replace flavor only — do not let the LLM emit numbers (forbidden by llm-client.ts validation).
  • Add a narration call for combat_action (per strike/dodge/flee) and/or combat_round from the CombatSystem tick, passing combat context (attacker/defender state, hp_pct) via the Issue 5 context.
  • Provide the existing static string as fallbackText.
  • Add tests asserting combat_action/combat_round reach narrate() and that mechanical numbers remain accurate and unaltered.

Acceptance Criteria

  • Combat output includes LLM flavor when configured, falls back to the current strings otherwise.
  • Mechanical values (damage, HP) are never produced or mutated by the LLM path.
  • Tests verify both the wiring and the numbers-integrity guarantee.

Dependencies

#513; Milestone A.

Size

M

Derived from the LLM narration gap analysis (Volo) and decomposition (Elminster).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    combatllmLLM narration integrationnarrativesquad:jarlaxleAssigned to Jarlaxle (Systems Dev)wiringConnecting existing code into runtime paths

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions