# Sequencer Template Library

Task: `TODOS.phase-72.72.15.2.10`

The sequence template library is a V2Editor TimelineVisualizer surface for
starting common cinematic patterns from validated sequencer data. The default
library ships three built-in templates: dialogue scene, explosion, and camera
fly-through.

## Runtime API

- Template: `FV2SequencerTemplateSpec`
- Panel spec: `FV2SequencerTemplateLibraryPanelSpec`
- Instantiation request: `FV2SequencerTemplateInstantiationRequest`
- Result: `FV2SequencerTemplateLibraryResult`
- Template enum: `EV2SequencerTemplateKind`
- Issue enum: `EV2SequencerTemplateIssueType`

`BuildDefaultSequencerTemplateLibrary` returns the panel metadata and three
template sequences. `InstantiateSequencerTemplate` copies a selected template
sequence into a caller-provided sequence id, optionally overrides the display
name, and can force bindings/tracks to remain rebindable for the new shot.

## Built-In Templates

- Dialogue scene: over-the-shoulder camera cuts, dialogue line events, two voice
  cues, and speaker focus animation.
- Explosion: impact camera, VFX trigger events, rumble/blast audio, and
  explosion intensity animation.
- Camera fly-through: rail camera keyframes, reveal marker events, ambience
  audio, and FOV animation.

Each built-in template contains camera, event, audio, and property tracks. This
keeps preview badges, search categories, and instantiation behavior consistent
across the library.

## Behavior

- The panel spec targets `TimelineVisualizer` and exposes search, category tabs,
  preview, instantiate, and track badge metadata.
- Templates carry stable ids, display names, descriptions, thumbnails, tags, and
  full `FV2SequencerSequenceSpec` payloads.
- Template validation requires a thumbnail path, searchable tags, bindings,
  tracks, and matching camera/event/audio/property badges.
- Instantiation rejects missing template ids, missing destination sequence ids,
  unknown templates, invalid library payloads, and empty generated sequences.
- Display name overrides are applied only when nonempty.
- When binding preservation is disabled, all copied bindings and tracks are
  marked rebindable for the new sequence.

## QA Inventory

- Panel: verify search, category tabs, preview, instantiate, and track badge
  flags.
- Library: verify dialogue scene, explosion, and camera fly-through templates
  are present and valid.
- Data: validate every template sequence through the sequencer data model.
- Instantiate: verify copied sequence ids, display overrides, track
  preservation, optional rebindable bindings, and open-after-create state.
- Off-path: reject missing template ids, missing sequence ids, and unknown
  template ids.

`js_repl` Playwright interaction was unavailable in this session and the
affected surface is Unreal editor data rather than browser-rendered UI, so
verification is through UE editor automation and contract gates.

## Verification

- `python3 V2/ue/Tools/check-v2-sequencer-template-library.py`
- `V2.Editor.Sequencer.TemplateLibrary`
- `python3 V2/ue/Tools/check-v2-editor-module.py`
- `python3 V2/ue/Tools/check-v2-ci-workflow.py`
