# RC.1 director cut-profile integration

Date: 2026-07-21
Status: implementation boundary for RC.1

## Decision

The two attention profiles belong in `@uzume/broadcast`, immediately above its
existing physical switcher, replay, and broadcast-audio engines. The profile
engine is content-neutral. V4, V5, Veritas, and V3 Stage remain responsible for
producing truthful camera/replay candidates; the profile engine only chooses
among candidates it receives and executes that choice through the existing
device adapters.

This is one director pipeline with two data records, not an ambient director and
a highlight director. Profile selection changes cadence, scoring weights, replay
eligibility, transitions, and commentary target; it does not replace or
reimplement a tenant's gameplay, rights, provenance, consent, or trust logic.

## Real upstream pipelines read

### V4 replay and commentary

The real V4 cut-like operation is
`UV4AIGeneratedCommentaryPipeline::BuildAutoCutHighlightReel` in
`V4/ue/Plugins/V4Mode_Replay/Source/V4Mode_Replay/Private/V4ReplayModeSystems.cpp`.
It is a replay-moment ranker rather than a live camera selector.

| Boundary | Exact V4 shape                                                                                                                                                                                                     |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Input    | `ReplayId`, `TArray<FV4ReplayMomentMarker>`, and frames per second. Each non-empty marker supplies timestamp/frame, tag, and note inputs to `V4MomentScore`.                                                       |
| Decision | Sanitize markers, rank descending by `V4MomentScore`, break ties by earlier timestamp, and take at most five.                                                                                                      |
| Output   | `TArray<FV4HighlightReelSegment>` with marker identity/tag, start/end seconds and frames, and moment score. Windows start four seconds before the marker and end six seconds after it, with a four-second minimum. |

`GenerateEndOfMatchCommentary` consumes those segments and produces
deterministic commentary segments plus a Psyche voice request. Player opt-out,
required replay/match/cell identity, a resolvable Calliope persona, and at least
one scored moment all fail closed. Its output is initially non-shareable and the
voice request requires consent checking and watermarking.

For live V4, `UV4LiveAICommentaryBroadcastService` in the Spectator plugin
accepts broadcast/match/cell/locale/event-marker identities and player opt-out.
Generated lines begin with `bReadyForBroadcast = false`. A line becomes ready
only after the configured bias review succeeds and a provenance-bound watermark
receipt is applied. RC.1 accepts only already-ready commentary candidates; it
does not expose a path around these gates.

V4 currently has no autonomous live camera selector equivalent to V5's broadcast
director. Calling `UV4AIDirectorSubsystem` a broadcast director would be
incorrect: it controls gameplay difficulty. A future V4 match adapter must map
its real observer-camera signals into the neutral candidate contract while
retaining the commentary gates above.

### V5 live director and highlight ranker

The real live selector is `UV5_SciFiPvP_BroadcastDirector::SelectDirectorCamera`
in `V5/ue/Source/V5SciFiPvP/Private/V5SciFiPvPSystems.cpp`.

| Boundary | Exact V5 shape                                                                                                                                                           |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Input    | Authored `FV5SFBroadcastCameraRule` records plus target actor, target distance, missile-in-flight, objective-contested, and impact-replay signals.                       |
| Decision | Impact replay, then missile track, then objective, then pursuit below 4,000 m, otherwise establishing; fall back to the establishing rule when a desired rule is absent. |
| Output   | `FV5SFBroadcastDirectorState`: active shot enum, camera rig id, target actor id, blend seconds, and replay eligibility.                                                  |

The real replay ranker is
`UV5_Online_ReplaysService::RankTop10HighlightClipsFromEvents` in
`V5/ue/Source/V5OnlineServices/Private/V5OnlineServicesSystems.cpp`.

| Boundary | Exact V5 shape                                                                                                                                                                             |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Input    | Source replay id and authoritative candidate windows containing kill multiplicity, objective impact, clutch context, and teamplay chain.                                                   |
| Decision | Thresholded weighted score (40/30/20/10), then score, objective impact, and earlier-time ordering; zero-score events are omitted.                                                          |
| Output   | At most ten provenance-marked clips bound to the source replay, with rank, score, six-to-eighteen-second window, primary signal, source-hash requirement, and synthetic-content indicator. |

A V5 adapter maps establishing to `wide`, pursuit to `tracking`, missile track
to `tight`, objective to `detail`, and impact replay to `replay`. It preserves
the selected camera rig as `sourceId`; ranked clip identity/replay-system
binding is required before a replay candidate may execute.

## Owning execution pipeline

`libs/uzume/broadcast` already owns the concrete seams RC.1 needs:

- `BroadcastSwitcherIntegrationEngine.switchProgramSource` emits acknowledged
  ATEM, Ross Carbonite, vMix, or TriCaster transitions.
- `ReplaySystemIntegrationEngine.playClip` emits real EVS/vMix Replay/ HyperDeck
  playback commands for clips already registered on that system.
- `BroadcastAudioSplitManagementEngine.setBroadcastMixLevel` controls the
  independent broadcast mix, including broadcast-only commentary channels; its
  EBU R128 / ATSC A/85 compliance path remains downstream.

The RC.1 engine therefore accepts a timestamped content cue containing neutral
shot candidates (`sourceId`, shot class, motion, relevance, and optional replay
binding). It emits an explicit `hold` or `cut` decision. A cut is sent through
the registered switcher; a replay cut first asks the registered replay system to
play the exact pre-existing clip. Missing replay identity never manufactures a
replay.

## Profile and Rail policy inputs

The shipped profile table is data, validated at construction:

- `ambient`: twelve-second minimum cadence, wide/low-motion scoring bias,
  dissolves, no replay eligibility, commentary target at murmur level.
- `highlight`: three-second minimum cadence, action/replay scoring bias, hard
  cuts, replay insertion above the profile importance threshold, full commentary
  target.

The engine structurally consumes R0.3 `DaypartTransitionEvent` records through
`DaypartEngine.onTransition`. Morning brief and deep work select ambient;
breaks, lunch, wind-down, and configured private time select highlight. A user
may explicitly select either profile, with an action id recorded as authority.
The next daypart transition remains authoritative, matching the existing Rail
lane handoff model.

Commentary never derives permission from the cut profile. The execution pipeline
requires the current audio-lane playback state, effective loudness, and user
volume. Paused playback, loudness zero, or user volume zero mutes it. Otherwise
the applied gain is the quietest of the profile target and the Rail loudness
ceiling, with user-volume attenuation added. Thus a user-selected highlight
profile during deep work may change pictures, but cannot promote commentary
above the audio lane's level-one murmur ceiling.

## Phase-B exercise

The browser exercise uses the checked-in, encoded V3 Stage progressive WebM
fixture already covered by `apps/v10/web/e2e/stage-video.spec.ts`. It does not
claim a catalog release or live rights. The same timestamped Stage candidate
timeline is evaluated first as ambient and then, after a visible user action, as
highlight while exact media bytes remain mounted. Playwright asserts the real
video decodes, the selected profile/shot/cadence/commentary readout changes,
controls meet tap-target and accessibility requirements, reduced motion is
respected, and screenshots capture both states for visual inspection.

Veritas production remains behind its existing human gate; its rehearsal program
can supply the same neutral cue shape, but RC.1 does not relabel a synthetic
slate as a live Veritas broadcast.

## Non-goals and fail-closed boundaries

- RC.1 does not create a V4 observer-camera feed, a V5 replay artifact, or a
  Phase-B publication.
- It does not score gameplay events, infer highlight provenance, or accept an
  unregistered replay clip.
- It does not generate or approve V4 commentary and cannot change V4 consent,
  bias-review, localization, provenance, or watermark readiness.
- It does not bypass Rail video-holder, daypart, autoplay, or audio-loudness
  authority.
