Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

docs(live): plan phase 5 feature extraction

David Nashashea349d83dceb
diff --git a/docs/superpowers/plans/2026-08-28-live-feature-extraction.md b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
new file mode 100644
index 00000000..847ae489
--- /dev/null
+++ b/docs/superpowers/plans/2026-08-28-live-feature-extraction.md
@@ -0,0 +1,1086 @@
+# Live Feature Module Extraction Implementation Plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** Extract Home Live TV, categories, EPG, and preview presentation into an independently compiled `:feature:live` module without changing behavior or creating a feature-to-feature dependency.
+
+**Architecture:** `:feature:live` owns its routes, screens, ViewModels, preview UI, resources, tests, and graph registration. `:app` remains the composition root and adapts app/Playback implementations through live-owned ports, builds player requests, and composes the Playback-owned MultiView planner.
+
+**Tech Stack:** Kotlin, Android library modules, Jetpack Compose/TV Material, Navigation Compose, Hilt/KSP, coroutines/Flow, JUnit/Truth/Mockito, Robolectric, AndroidX Compose UI tests, Gradle/Kover, ADB, Macrobenchmark/Baseline Profile, Graphify.
+
+**Spec:** `docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md`
+
+## Global Constraints
+
+- Preserve the current working tree and unrelated changes; never reset, clean, delete, or rewrite unrelated work.
+- Scope is only `:feature:live`: Home Live TV, categories/channels, EPG/guide, preview presentation, and their required composition seams.
+- Do not start Catalog or System extraction and do not reopen completed Settings extraction work without a demonstrated blocker.
+- `:feature:live` project dependencies must be exactly `:core:navigation`, `:core:ui`, `:domain`, temporary ledgered `:data`, and audited `:player`.
+- `:feature:live` must not import `com.streamvault.app`, `MainActivity`, `NavController`, `NavHostController`, or any `com.streamvault.feature.*` implementation package.
+- `:app` remains the owner of `AppNavHost`, `AppRouteCodec`, external intents, payload transport, platform adapters, player-request construction, launchers, and lifecycle.
+- Do not change preview preparation/reprime, handoff timeout/release, player recovery, timeshift, HLS fallback, focus, input, route, or callback behavior.
+- Move files with history where practical; keep contracts, mechanical moves, graph wiring, cleanup, profiles, and acceptance evidence independently revertible.
+- Add a failing focused test before each production behavior or boundary change, confirm the expected failure, implement the minimum change, and rerun focused plus neighboring tests.
+- Generated Baseline/Startup Profiles are regenerated by the existing producer and never hand-edited.
+- After modifying code files, run `graphify update .`.
+- Keep Playback, Provider, and Settings open gates in their existing reports; do not claim Phase 5 complete.
+
+---
+
+### Task 0: Freeze inventory, rollback point, baseline, and acceptance obligations
+
+**Files:**
+- Create: `validation/phase5_live/task0-inventory.md`
+- Create: `validation/phase5_live/performance-before.md`
+- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
+
+**Interfaces:**
+- Consumes: the current committed tree before any live extraction change.
+- Produces: an exact source/resource/dependency/test inventory, rollback SHA, baseline commands/results, and explicit open-gate list used by every later task.
+
+- [ ] **Step 1: Prove the worktree baseline and record the rollback SHA**
+
+Run:
+
+```powershell
+git status --short
+git rev-parse HEAD
+git log -5 --oneline --decorate
+```
+
+Expected: status contains no unexplained live-extraction changes. Record the complete output in `validation/phase5_live/task0-inventory.md`; do not alter or discard unrelated entries.
+
+- [ ] **Step 2: Record the exact move unit and source counts**
+
+Run:
+
+```powershell
+rg --files app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg app/src/test/java/com/streamvault/app/ui/screens/home app/src/test/java/com/streamvault/app/ui/screens/epg
+Get-ChildItem app/src/main/java/com/streamvault/app/ui/screens/home,app/src/main/java/com/streamvault/app/ui/screens/epg -Filter *.kt | ForEach-Object { "{0}`t{1}" -f $_.FullName,(Get-Content $_.FullName).Count }
+```
+
+Expected: five Home production files, eight EPG production files, and four focused unit-test files are listed with their current line counts.
+
+- [ ] **Step 3: Record imports, resources, routes, Hilt seams, and external consumers**
+
+Run:
+
+```powershell
+rg -n "^import com\.streamvault\.(app|feature|core|domain|data|player)" app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg
+rg -n "R\.(string|plurals|drawable|color|dimen|array)\.[A-Za-z0-9_]+" app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg
+rg -n "HomeScreen|HomeViewModel|FullEpgScreen|EpgViewModel|GuideDateTime|PlayerTransparentGuideOverlay" app/src/main app/src/test app/src/androidTest feature core
+rg -n "LIVE_TV_DESTINATION|EPG_DESTINATION|registerLiveGraph" app/src/main core/navigation/src/main
+```
+
+Expected: the inventory identifies every app import, the 196-key initial resource set, every external consumer, both route patterns, and preview/MultiView bindings.
+
+- [ ] **Step 4: Run fresh pre-extraction deterministic checks**
+
+Run:
+
+```powershell
+./gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.ui.screens.home.HomeViewModelTest" --tests "com.streamvault.app.ui.screens.epg.EpgViewModelTest" --tests "com.streamvault.app.ui.screens.epg.GuideDateTimeTest" --tests "com.streamvault.app.ui.screens.epg.ProgramReminderIssueMessageTest" :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: exit 0. Record exact test counts, duration, warnings, and any existing failure verbatim rather than attributing it to future extraction work.
+
+- [ ] **Step 5: Capture five pre-extraction edit and test-compile samples**
+
+Use an isolated committed snapshot of the rollback SHA. For each of five runs, touch only `HomeScreen.kt` for the source scenario and `HomeViewModelTest.kt` for the test scenario, then run:
+
+```powershell
+./gradlew.bat :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none --profile
+./gradlew.bat :app:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none --profile
+```
+
+Expected: `performance-before.md` contains five wall times, Gradle profile paths, executed task sets, median, average, and p95 for each scenario. Restore only the timestamp/content probe inside the isolated snapshot.
+
+- [ ] **Step 6: Record transitional dependencies and open neighboring gates**
+
+Add a `:feature:live` section to the ledger naming `PreferencesRepository` and `ProviderSyncStateSource`, their exact source sites, current responsibility, and Phase 7 replacement direction. Record that Playback, Provider, and Settings acceptance/performance gates remain governed by their existing reports.
+
+- [ ] **Step 7: Commit the inventory**
+
+```powershell
+git add validation/phase5_live/task0-inventory.md validation/phase5_live/performance-before.md docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md
+git commit -m "docs(live): record phase 5 extraction baseline"
+```
+
+---
+
+### Task 1: Create `:feature:live` and prove a fail-closed boundary
+
+**Files:**
+- Modify: `settings.gradle.kts`
+- Modify: `app/build.gradle.kts`
+- Create: `feature/live/build.gradle.kts`
+- Create: `feature/live/src/main/AndroidManifest.xml`
+- Create: `feature/live/src/main/res/values/strings.xml`
+- Create: `feature/live/src/test/resources/boundary-fixtures/AppPackageImport.kt`
+- Create: `feature/live/src/test/resources/boundary-fixtures/FullyQualifiedAppReference.kt`
+- Create: `feature/live/src/test/resources/boundary-fixtures/MainActivityReference.java`
+- Create: `feature/live/src/test/resources/boundary-fixtures/RootNavigation.kt`
+- Create: `feature/live/src/test/resources/boundary-fixtures/RootNavigation.java`
+- Create: `feature/live/src/test/resources/boundary-fixtures/PlaybackFeatureImport.kt`
+- Create: `feature/live/src/test/resources/boundary-fixtures/SettingsFeatureImport.java`
+- Create: `feature/live/src/test/resources/boundary-fixtures/ProviderFeatureImport.kt`
+- Modify: root Kover/coverage aggregation file used by current feature modules
+
+**Interfaces:**
+- Consumes: exact dependency policy from the spec.
+- Produces: `:feature:live` and `verifyFeatureLiveBoundary`, which rejects unapproved project dependencies and forbidden Kotlin/Java source references.
+
+- [ ] **Step 1: Add the module scaffold and app dependency**
+
+Add `include(":feature:live")`, `implementation(project(":feature:live"))`, namespace `com.streamvault.feature.live`, `compileSdk = 36`, `minSdk = 25`, Java/Kotlin 17, Compose, Hilt/KSP, Kover, and the same test libraries/configuration used by `:feature:settings`.
+
+The only project dependencies in `feature/live/build.gradle.kts` are:
+
+```kotlin
+implementation(project(":core:navigation"))
+implementation(project(":core:ui"))
+implementation(project(":domain"))
+implementation(project(":data"))
+implementation(project(":player"))
+```
+
+- [ ] **Step 2: Add a deliberate forbidden source probe**
+
+Create `feature/live/src/main/java/com/streamvault/feature/live/BoundaryProbe.kt`:
+
+```kotlin
+package com.streamvault.feature.live
+
+import com.streamvault.app.MainActivity
+
+internal typealias BoundaryProbe = MainActivity
+```
+
+- [ ] **Step 3: Implement the boundary verifier and run RED**
+
+Use the Settings boundary task structure with these tokens:
+
+```kotlin
+val forbiddenFeatureLiveSourceTokens = listOf(
+ "import com.streamvault.app",
+ "com.streamvault.app",
+ "import com.streamvault.feature.playback",
+ "import com.streamvault.feature.provider",
+ "import com.streamvault.feature.settings",
+ "MainActivity",
+ "NavHostController",
+ "NavController",
+)
+```
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: FAIL naming `BoundaryProbe.kt` and both the app import and `MainActivity` tokens.
+
+- [ ] **Step 4: Remove only the probe and run GREEN**
+
+Delete `BoundaryProbe.kt` with `apply_patch`, then run the same command.
+
+Expected: PASS; the report lists exactly the five approved project dependencies, no main-source violations, and detections for all Kotlin/Java fixtures.
+
+- [ ] **Step 5: Attach the verifier to module checks**
+
+Make `check` and all module `Test` tasks depend on `verifyFeatureLiveBoundary`. Add the feature to existing Kover aggregation without changing thresholds.
+
+- [ ] **Step 6: Verify the empty module and app dependency graph**
+
+```powershell
+./gradlew.bat :feature:live:check :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: exit 0 and no compilation of Playback, Provider, or Settings source caused by live source.
+
+- [ ] **Step 7: Commit the boundary**
+
+```powershell
+git add settings.gradle.kts app/build.gradle.kts feature/live
+git add build.gradle.kts
+git commit -m "build(live): add isolated feature module"
+```
+
+---
+
+### Task 2: Add live route and playback-request contracts test-first
+
+**Files:**
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/navigation/LiveRoutePatterns.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/navigation/LivePlaybackRequests.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/navigation/LiveRoutePatternsTest.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/navigation/LivePlaybackRequestsTest.kt`
+- Modify: `app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt`
+- Modify: `app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt`
+
+**Interfaces:**
+- Consumes: `AppDestination`, `Channel`, and `Program`.
+- Produces: exact route constants plus `LiveChannelPlaybackRequest` and `LiveArchivePlaybackRequest` for app-owned player mapping.
+
+- [ ] **Step 1: Write failing route compatibility tests**
+
+```kotlin
+class LiveRoutePatternsTest {
+ @Test fun `live route patterns remain compatibility stable`() {
+ assertThat(LiveRoutePatterns.LIVE_TV).isEqualTo("live_tv")
+ assertThat(LiveRoutePatterns.LIVE_TV_DESTINATION)
+ .isEqualTo("live_tv?categoryId={categoryId}")
+ assertThat(LiveRoutePatterns.EPG).isEqualTo("epg")
+ assertThat(LiveRoutePatterns.EPG_DESTINATION).isEqualTo(
+ "epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}"
+ )
+ }
+}
+```
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.navigation.LiveRoutePatternsTest" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: FAIL because `LiveRoutePatterns` does not exist.
+
+- [ ] **Step 2: Implement the exact route constants and run GREEN**
+
+Implement the four constants exactly as asserted. Rerun the focused test; expected PASS.
+
+- [ ] **Step 3: Write failing playback-request value tests**
+
+Define tests that construct a real `Channel`/`Program` fixture and assert every field survives construction:
+
+```kotlin
+val request = LiveArchivePlaybackRequest(
+ channel = channel,
+ program = program,
+ categoryId = 12L,
+ isVirtual = true,
+ combinedProfileId = 34L,
+ returnDestination = AppDestination.Guide(12L, 1_700_000_000_000L, true),
+)
+assertThat(request.channel).isSameInstanceAs(channel)
+assertThat(request.program).isSameInstanceAs(program)
+assertThat(request.returnDestination).isEqualTo(AppDestination.Guide(12L, 1_700_000_000_000L, true))
+```
+
+Run the test and expect a missing-type compilation failure.
+
+- [ ] **Step 4: Implement the immutable request values**
+
+```kotlin
+data class LiveChannelPlaybackRequest(
+ val channel: Channel,
+ val categoryId: Long?,
+ val providerId: Long?,
+ val isVirtual: Boolean,
+ val combinedProfileId: Long?,
+ val combinedSourceFilterProviderId: Long?,
+ val returnDestination: AppDestination,
+)
+
+data class LiveArchivePlaybackRequest(
+ val channel: Channel,
+ val program: Program,
+ val categoryId: Long,
+ val isVirtual: Boolean,
+ val combinedProfileId: Long?,
+ val returnDestination: AppDestination,
+)
+```
+
+Rerun both feature tests; expected PASS.
+
+- [ ] **Step 5: Make app compatibility constants delegate to the feature**
+
+Replace only the four duplicated app constants with `LiveRoutePatterns` references. Add assertions to `AppRouteCodecTest` for `AppDestination.LiveTv` and all Guide argument combinations.
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest :app:testDebugUnitTest --tests "com.streamvault.app.navigation.AppRouteCodecTest" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS with unchanged encoded routes.
+
+- [ ] **Step 6: Commit the contracts**
+
+```powershell
+git add feature/live/src/main/java/com/streamvault/feature/live/navigation feature/live/src/test/java/com/streamvault/feature/live/navigation app/src/main/java/com/streamvault/app/navigation/AppRouteCodec.kt app/src/test/java/com/streamvault/app/navigation/AppRouteCodecTest.kt
+git commit -m "feat(live): define route and playback request contracts"
+```
+
+---
+
+### Task 3: Define preview, surface, and MultiView ports
+
+**Files:**
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/api/LivePreviewPorts.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/api/LiveSurfaceRefreshPort.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/api/LiveMultiViewContracts.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/api/LivePortContractTest.kt`
+
+**Interfaces:**
+- Consumes: `Channel`, `StreamInfo`, domain `Result`, `PlayerEngine`, Compose, and `Flow`.
+- Produces: `LivePreviewOrigin`, `LivePreviewSession`, `LivePreviewHandoffPort`, `LivePreviewStreamPreparer`, `LiveSurfaceRefreshPort`, `LiveMultiViewStatus`, `LiveMultiViewStatusPort`, and `LiveMultiViewPlannerContent`.
+
+- [ ] **Step 1: Write a failing compile-contract test**
+
+The test provides fakes and verifies the desired APIs can be used without app or Playback imports:
+
+```kotlin
+private class FakeHandoffPort : LivePreviewHandoffPort {
+ override val reverseHandoffOrigin = MutableStateFlow<LivePreviewOrigin?>(null)
+ override fun registerPreviewSession(channel: Channel, streamInfo: StreamInfo, engine: PlayerEngine, origin: LivePreviewOrigin) = Unit
+ override fun beginFullscreenHandoff(channelId: Long, engine: PlayerEngine?) = true
+ override fun consumeReverseHandoff(origin: LivePreviewOrigin): LivePreviewSession? = null
+ override fun clear(engine: PlayerEngine?) = Unit
+}
+
+@Test fun `multiview defaults preserve four slot layout`() {
+ assertThat(LiveMultiViewStatus()).isEqualTo(LiveMultiViewStatus(channelCount = 0, slotCapacity = 4))
+}
+```
+
+Run the focused test; expected missing-contract compilation failure.
+
+- [ ] **Step 2: Implement the preview contracts exactly as specified**
+
+Use `Flow<LivePreviewOrigin?>` for reverse notifications so adapters do not create a new unmanaged coroutine scope. Use domain `Result<StreamInfo>` for preparation results. Do not include timeout, retry, release, or player-policy methods.
+
+- [ ] **Step 3: Implement surface and MultiView contracts**
+
+Use `Flow<LiveMultiViewStatus>` and the exact composable typealias from the spec. Keep `slotCapacity` defaulted to four, matching `MultiViewManager.MAX_SLOTS` without importing it.
+
+- [ ] **Step 4: Run GREEN and boundary verification**
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.api.LivePortContractTest" :feature:live:verifyFeatureLiveBoundary --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS and no feature/app imports.
+
+- [ ] **Step 5: Commit the ports**
+
+```powershell
+git add feature/live/src/main/java/com/streamvault/feature/live/api feature/live/src/test/java/com/streamvault/feature/live/api
+git commit -m "feat(live): add preview and platform ports"
+```
+
+---
+
+### Task 4: Implement app adapters and Hilt bindings with delegation tests
+
+**Files:**
+- Create: `app/src/main/java/com/streamvault/app/live/AppLivePreviewHandoffAdapter.kt`
+- Create: `app/src/main/java/com/streamvault/app/live/AppLivePreviewStreamPreparer.kt`
+- Create: `app/src/main/java/com/streamvault/app/live/AppLiveSurfaceRefreshAdapter.kt`
+- Create: `app/src/main/java/com/streamvault/app/live/AppLiveMultiViewStatusAdapter.kt`
+- Create: `app/src/main/java/com/streamvault/app/live/AppLiveModule.kt`
+- Create: `app/src/test/java/com/streamvault/app/live/AppLiveAdaptersTest.kt`
+
+**Interfaces:**
+- Consumes: Task 3 ports plus existing `LivePreviewHandoffManager`, `StreamVaultPluginManager`, `TvInputChannelSyncManager`, `MultiViewManager`, and `PreferencesRepository`.
+- Produces: singleton app bindings that delegate to current implementations without duplicating policy.
+
+- [ ] **Step 1: Write failing stream and surface delegation tests**
+
+Use constructor seams accepting function references so the tests exercise real adapter code without mocking final implementation classes:
+
+```kotlin
+@Test fun `preview preparer returns plugin result unchanged`() = runTest {
+ val expected = Result.Success(streamInfo)
+ val adapter = AppLivePreviewStreamPreparer { expected }
+ assertThat(adapter.prepare(streamInfo)).isSameInstanceAs(expected)
+}
+
+@Test fun `surface refresh delegates once`() = runTest {
+ var calls = 0
+ AppLiveSurfaceRefreshAdapter { calls++ }.refreshTvInputCatalog()
+ assertThat(calls).isEqualTo(1)
+}
+```
+
+Run and expect missing adapters.
+
+- [ ] **Step 2: Implement the two simple adapters and run GREEN**
+
+Production constructors inject the current app implementations; internal test constructors accept the narrow suspend functions. Preserve results/exceptions without translation.
+
+- [ ] **Step 3: Write failing handoff mapping tests**
+
+Cover all mappings:
+
+```kotlin
+assertThat(adapter.mapOrigin(PreviewHandoffSource.HOME)).isEqualTo(LivePreviewOrigin.HOME)
+assertThat(adapter.mapOrigin(PreviewHandoffSource.GUIDE)).isEqualTo(LivePreviewOrigin.GUIDE)
+assertThat(adapter.mapOrigin(LivePreviewOrigin.HOME)).isEqualTo(PreviewHandoffSource.HOME)
+assertThat(adapter.mapOrigin(LivePreviewOrigin.GUIDE)).isEqualTo(PreviewHandoffSource.GUIDE)
+```
+
+Also register, begin, clear, and consume through a fake delegate, asserting channel IDs, engine identity, stream identity, origin, and boolean return values are unchanged.
+
+- [ ] **Step 4: Implement the handoff adapter and run GREEN**
+
+The adapter must delegate to the injected singleton `LivePreviewHandoffManager`. It maps `reverseSessionFlow` to `Flow<LivePreviewOrigin?>` and maps a consumed session to `LivePreviewSession`; it must not create a second manager or reproduce release timers.
+
+- [ ] **Step 5: Write failing MultiView status tests**
+
+Use `MutableStateFlow<List<Channel?>>` and `MutableStateFlow<Boolean>`:
+
+```kotlin
+val statuses = adapter.status.take(3).toList(mutableListOf())
+assertThat(statuses[0]).isEqualTo(LiveMultiViewStatus(0, 4))
+assertThat(statuses[1]).isEqualTo(LiveMultiViewStatus(1, 4))
+assertThat(statuses[2]).isEqualTo(LiveMultiViewStatus(1, 2))
+```
+
+Expected: FAIL before `AppLiveMultiViewStatusAdapter` exists.
+
+- [ ] **Step 6: Implement MultiView mapping and Hilt bindings**
+
+Implement `status` as `combine(slots, centerTwoSlotLayout)` returning
+`LiveMultiViewStatus(slots.count { it != null }, if (centerTwoSlotLayout) 2 else 4)`.
+Bind all four ports in `AppLiveModule` with `@Binds`, `@Singleton`, and no business logic.
+
+- [ ] **Step 7: Verify adapters and existing Playback handoff tests**
+
+```powershell
+./gradlew.bat :app:testDebugUnitTest --tests "com.streamvault.app.live.AppLiveAdaptersTest" :feature:playback:testDebugUnitTest --tests "com.streamvault.feature.playback.preview.LivePreviewHandoffManagerTest" :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS; Playback manager timeout/release behavior remains covered by its existing suite.
+
+- [ ] **Step 8: Commit the adapters**
+
+```powershell
+git add app/src/main/java/com/streamvault/app/live app/src/test/java/com/streamvault/app/live
+git commit -m "feat(live): adapt app preview and multiview services"
+```
+
+---
+
+### Task 5: Establish app-independent Live presentation primitives
+
+**Files:**
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveSelectionChipRow.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveCategoryRow.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelCard.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelProgressTicker.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveSourceSwitcher.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveFocusedMarqueeText.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveReorderTopBar.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/components/LiveChannelRowSurface.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/dialogs/LiveCategoryDialogs.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/model/GuideLookupKey.kt`
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/presentation/remote/LiveRemoteShortcutPolicy.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/presentation/model/GuideLookupKeyTest.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/presentation/remote/LiveRemoteShortcutPolicyTest.kt`
+- Create: `feature/live/src/androidTest/java/com/streamvault/feature/live/LivePresentationGoldenTest.kt`
+- Create: `feature/live/src/androidTest/assets/goldens/` checked-in PNG baselines
+
+**Interfaces:**
+- Consumes: existing app component behavior plus app-independent Core UI primitives.
+- Produces: live-local presentation APIs with no app or Catalog dependency; app originals remain for their current non-live consumers.
+
+- [ ] **Step 1: Write failing pure model and remote-policy tests**
+
+Copy the current guide-key and remote-dispatch expectations before copying production code. Tests must cover provider/channel EPG lookup identity, red/green/yellow/blue key mapping, unmapped keys, and the existing shortcut profile behavior.
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.presentation.model.GuideLookupKeyTest" --tests "com.streamvault.feature.live.presentation.remote.LiveRemoteShortcutPolicyTest" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: FAIL because live-owned implementations do not exist.
+
+- [ ] **Step 2: Move live-only policies and run GREEN**
+
+Move `GuideLookupKey.kt` and the Live browse portion of `RemoteShortcutDispatch.kt` mechanically into the feature packages. Leave non-live remote helpers in `:app`. Preserve every key code and action result.
+
+- [ ] **Step 3: Add failing connected/golden coverage for shared visuals**
+
+Render representative selected/unselected selection chips, locked/unlocked category rows, channel card progress, source switcher, reorder bar, and category dialog. Use the repository golden helper that fails when the checked-in baseline is absent.
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.streamvault.feature.live.LivePresentationGoldenTest --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: FAIL on missing live presentation functions or missing checked-in goldens; never self-approve first-run images.
+
+- [ ] **Step 4: Implement distinct live-local presentation equivalents**
+
+Copy rendering/focus/key/callback behavior from the app components, rename the public functions with the `Live` prefix shown in the file list, replace app shell/time/device/image imports with existing Core UI APIs, and reference `com.streamvault.feature.live.R`.
+
+Keep app originals unchanged for Dashboard, Movies, Series, Favorites, Search, and VOD. Do not make those packages depend on `:feature:live`.
+
+- [ ] **Step 5: Review and check in golden baselines**
+
+Render at 1920x1080, compare against pre-move screenshots, inspect focus borders/text/spacing manually, then add the reviewed PNGs. Rerun the connected class; expected PASS with the repository missing-golden guard still active.
+
+- [ ] **Step 6: Verify source boundary and app consumers**
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest :feature:live:lintDebug :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS; Catalog/System app sources still compile against their existing app components.
+
+- [ ] **Step 7: Commit presentation seams**
+
+```powershell
+git add feature/live/src/main feature/live/src/test feature/live/src/androidTest
+git commit -m "feat(live): add app-independent presentation primitives"
+```
+
+---
+
+### Task 6: Move Home state, ViewModel, preview UI, tests, and screen
+
+**Files:**
+- Move: `app/src/main/java/com/streamvault/app/ui/screens/home/*.kt` to `feature/live/src/main/java/com/streamvault/feature/live/home/`
+- Move: `app/src/test/java/com/streamvault/app/ui/screens/home/HomeViewModelTest.kt` to `feature/live/src/test/java/com/streamvault/feature/live/home/HomeViewModelTest.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/home/HomePreviewPortTest.kt`
+- Create: `feature/live/src/androidTest/java/com/streamvault/feature/live/home/HomeScreenBehaviorTest.kt`
+- Modify: `feature/live/src/main/res/values/strings.xml`
+- Create/modify: matching `feature/live/src/main/res/values-*/strings.xml` locale files
+
+**Interfaces:**
+- Consumes: Tasks 3-5 ports/components and current Home constructor/state/method behavior.
+- Produces: feature-owned `HomeViewModel`, `HomeUiState`, `HomePreviewUiState`, `HomeScreen`, dialogs, sidebars, resources, and independent tests.
+
+- [ ] **Step 1: Move the Home tests first and verify RED**
+
+Change only package/imports needed for the feature test source set. Replace direct app/Playback implementation fixtures with fakes for the Task 3 ports while preserving every repository and state expectation.
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.home.HomeViewModelTest" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: FAIL because feature-owned `HomeViewModel` is absent.
+
+- [ ] **Step 2: Move Home state/ViewModel mechanically**
+
+Move `HomePreviewUiState.kt` and `HomeViewModel.kt`; change packages and resources only. Replace:
+
+```text
+StreamVaultPluginManager -> LivePreviewStreamPreparer
+TvInputChannelSyncManager -> LiveSurfaceRefreshPort
+LivePreviewHandoffManager -> LivePreviewHandoffPort
+PreviewHandoffSource.HOME -> LivePreviewOrigin.HOME
+MultiViewManager slots/capacity -> LiveMultiViewStatusPort.status
+```
+
+Keep constructor order otherwise stable. Preserve the separate `_uiState` and `_previewUiState`, session versioning, job cancellation, player configuration, adaptive reprime delay, error strings, and engine identity checks.
+
+- [ ] **Step 3: Add and run focused preview RED/GREEN tests**
+
+`HomePreviewPortTest` must assert:
+
+- successful preparation registers exactly one HOME session with the same channel, stream, and engine;
+- preparation error preserves its message and does not register;
+- `beginPreviewHandoff` delegates with the active channel/engine and clears local ownership only on success;
+- HOME reverse handoff resumes while GUIDE notification is ignored;
+- clearing preview delegates and releases exactly as before;
+- MultiView status maps count/capacity into `HomeUiState`.
+
+Run the focused test after each minimal adapter replacement. Expected: RED on the old direct implementation call, then PASS after the corresponding port call.
+
+- [ ] **Step 4: Run the complete moved Home suite**
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.home.*" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS with the same behavioral assertions as the pre-extraction app suite.
+
+- [ ] **Step 5: Write failing Home screen behavior tests**
+
+Cover route category initialization, source/category/channel focus, quick-filter visibility, search, Back/dialog ordering, PIN unlock, preview placeholder/loading/error/render states, stable channel semantics, and planner callbacks. The planner fake records `pendingChannel`, dismiss, and launch events without importing Playback.
+
+Run `HomeScreenBehaviorTest`; expected missing-screen failure.
+
+- [ ] **Step 6: Move Home UI and wire live-local/core components**
+
+Move `HomeScreen.kt`, `HomeScreenDialogs.kt`, and `HomeSidebarComponents.kt`. Replace app navigation strings with typed `AppDestination`, app shell with `CoreAppScreenScaffold`/`UiDestination`, device/time helpers with Core UI, and direct MultiView composables with `LiveMultiViewPlannerContent`.
+
+Preserve planner callback order:
+
+```text
+dismiss planner state -> dismiss channel dialog when present -> clear preview -> request AppDestination.MultiView
+```
+
+- [ ] **Step 7: Move Home resources locale by locale**
+
+Copy exact values for `home_*`, `live_*`, preview, quick-filter, category/group, and Home-only dialog keys. Duplicate shared keys only when app consumers remain. Run a script comparing each moved locale value before removing any app key.
+
+- [ ] **Step 8: Run Home feature and app integration checks**
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.home.*" :feature:live:compileDebugAndroidTestKotlin :app:compileDebugKotlin :app:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS; no app or Playback feature import exists under `feature/live/src/main`.
+
+- [ ] **Step 9: Commit Home ownership**
+
+```powershell
+git add app/src/main/java/com/streamvault/app/ui/screens/home app/src/test/java/com/streamvault/app/ui/screens/home feature/live
+git commit -m "feat(live): move Home presentation into feature"
+```
+
+---
+
+### Task 7: Move EPG state, ViewModel, preview, tests, and screen
+
+**Files:**
+- Move: `app/src/main/java/com/streamvault/app/ui/screens/epg/*.kt` to `feature/live/src/main/java/com/streamvault/feature/live/epg/`
+- Move: `app/src/test/java/com/streamvault/app/ui/screens/epg/*.kt` to `feature/live/src/test/java/com/streamvault/feature/live/epg/`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/epg/EpgPreviewPortTest.kt`
+- Create: `feature/live/src/androidTest/java/com/streamvault/feature/live/epg/EpgScreenBehaviorTest.kt`
+- Modify: `feature/live/src/main/res/values/strings.xml`
+- Create/modify: matching `feature/live/src/main/res/values-*/strings.xml` locale files
+
+**Interfaces:**
+- Consumes: Tasks 2-5 contracts/components and existing EPG repositories/managers/use cases.
+- Produces: feature-owned `EpgViewModel`, guide state/models, UI/grid/hero/controls/dialogs, preview UI, deferred overlay, resources, and independent tests.
+
+- [ ] **Step 1: Move EPG unit tests first and verify RED**
+
+Move `EpgViewModelTest`, `GuideDateTimeTest`, and `ProgramReminderIssueMessageTest`; update packages and replace app/Playback fixtures with live-port fakes.
+
+Run:
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.epg.*" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: FAIL because feature-owned EPG production types are absent.
+
+- [ ] **Step 2: Move pure EPG state/date/message behavior and run GREEN subsets**
+
+Move `GuideDateTime.kt` and the state/model declarations from `EpgViewModel.kt` without changing constants/defaults. Run `GuideDateTimeTest` and `ProgramReminderIssueMessageTest`; expected PASS.
+
+- [ ] **Step 3: Move `EpgViewModel` and replace implementation imports**
+
+Replace `StreamVaultPluginManager` with `LivePreviewStreamPreparer`,
+`LivePreviewHandoffManager` with `LivePreviewHandoffPort`, and GUIDE source
+values with `LivePreviewOrigin.GUIDE`. Preserve guide window constants, paging,
+prefetch jobs, search debounce, reminder/recording flow, override behavior,
+parental policy, preview engine configuration, and dispatchers.
+
+- [ ] **Step 4: Add and run EPG preview port RED/GREEN tests**
+
+Assert successful/error preparation, GUIDE register/begin/reverse/clear behavior,
+HOME reverse notification rejection, active-session guards, playback/error flow
+collection, and local state transitions. Each test must fail on the missing port
+call before the minimal implementation change makes it pass.
+
+- [ ] **Step 5: Run the complete EPG ViewModel suite**
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.epg.*" --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS with no reduction in assertion count.
+
+- [ ] **Step 6: Write failing EPG screen behavior tests**
+
+Cover route initialization, horizontal and vertical movement, stable channel/program semantics, category/mode/density/favorites/search controls, time/day/prime-time jumps, preview focus and handoff, program dialog, EPG override, PIN flow, reminder permission callback, recording conflict, live/archive callbacks, and Back/top-navigation restoration.
+
+Run `EpgScreenBehaviorTest`; expected missing-screen failure.
+
+- [ ] **Step 7: Move EPG presentation and deferred overlay**
+
+Move all eight files. Replace app shell/time/device/selection imports with Core UI or Task 5 live-local equivalents. Replace `Routes.epg(...)` with `AppDestination.Guide(...)` and pass that typed destination through `LiveArchivePlaybackRequest`/`LiveChannelPlaybackRequest`.
+
+Move `PlayerTransparentGuideOverlay` unchanged and keep it unreferenced; do not register it in Playback or the live graph.
+
+- [ ] **Step 8: Move EPG resources locale by locale**
+
+Copy exact `epg_*`, `guide_*`, archive, reminder, recording-conflict, notification-permission, and EPG-only shared values. Remove app entries only after `rg` proves no remaining consumer.
+
+- [ ] **Step 9: Run EPG feature and app integration checks**
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.epg.*" :feature:live:compileDebugAndroidTestKotlin :app:compileDebugKotlin :app:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS with no app/feature implementation imports under live main source.
+
+- [ ] **Step 10: Commit EPG ownership**
+
+```powershell
+git add app/src/main/java/com/streamvault/app/ui/screens/epg app/src/test/java/com/streamvault/app/ui/screens/epg feature/live
+git commit -m "feat(live): move EPG presentation into feature"
+```
+
+---
+
+### Task 8: Move graph registration and preserve app player/MultiView composition
+
+**Files:**
+- Create: `feature/live/src/main/java/com/streamvault/feature/live/navigation/LiveGraph.kt`
+- Create: `feature/live/src/test/java/com/streamvault/feature/live/navigation/LiveGraphContractTest.kt`
+- Create: `app/src/main/java/com/streamvault/app/live/AppLivePlaybackRequestMapper.kt`
+- Create: `app/src/main/java/com/streamvault/app/live/AppLiveMultiViewPlanner.kt`
+- Create: `app/src/test/java/com/streamvault/app/live/AppLivePlaybackRequestMapperTest.kt`
+- Modify: `app/src/main/java/com/streamvault/app/navigation/AppNavHost.kt`
+- Delete after GREEN: `app/src/main/java/com/streamvault/app/navigation/graph/LiveGraph.kt`
+
+**Interfaces:**
+- Consumes: live route/request contracts, feature screens, `UiDestination`, app navigation adapters, and existing Playback planner.
+- Produces: controller-free `registerLiveGraph` called by `AppNavHost`, with field-for-field player request mapping and app-composed MultiView planner.
+
+- [ ] **Step 1: Write failing graph contract tests**
+
+Use `TestNavHostController`/Navigation testing to assert:
+
+- `live_tv` defaults `categoryId` to null and a supplied value survives;
+- `epg` defaults category/anchor to null and favorites to false;
+- supplied EPG arguments survive exactly;
+- Home channel callbacks emit `LiveChannelPlaybackRequest` with a typed Live return destination;
+- EPG live/archive callbacks emit the correct typed Guide return destination;
+- destination callbacks and MultiView planner callbacks do not expose a controller.
+
+Run the focused test; expected missing `registerLiveGraph` failure.
+
+- [ ] **Step 2: Implement feature graph registration minimally**
+
+Use the exact signature from the spec. Construct both `composable` destinations with current `NavType` and defaults. Call `HomeScreen` and `FullEpgScreen` directly. Do not import app route codecs or construct `PlayerNavigationRequest` in the feature.
+
+- [ ] **Step 3: Write failing app player-mapping tests**
+
+For a channel request assert stream URL, title, EPG channel ID, internal ID,
+category fallback to `ChannelRepository.ALL_CHANNELS_ID`, provider, virtual,
+combined profile/source filter, `contentType = "LIVE"`, and return destination.
+
+For archive assert archive start/end/title, category/provider identity,
+`contentType = "LIVE"`, and Guide return destination. Include the existing
+`isArchivePlayable` rejection at the app callback boundary.
+
+- [ ] **Step 4: Implement app request mapping and run GREEN**
+
+Delegate to the existing `playerNavigationRequest`/`toLivePlayerRequest`
+helpers so payload behavior stays app-owned. Do not duplicate codec or payload
+storage.
+
+- [ ] **Step 5: Compose the existing MultiView planner in app**
+
+Implement `rememberAppLiveMultiViewPlannerContent()` as a composable provider
+that obtains the existing `MultiViewViewModel` in the destination composition
+and renders `MultiViewPlannerDialog(pendingChannel, onDismiss, onLaunch,
+viewModel)`. The feature supplies the state-clearing callbacks; the app content
+only renders Playback presentation.
+
+- [ ] **Step 6: Wire `AppNavHost` and verify RED-to-GREEN integration**
+
+Replace the app graph call with `com.streamvault.feature.live.navigation.registerLiveGraph`, pass `rememberAppDestinationItems(...)`, app player mapping callbacks, `onTopLevelDestinationRequested`, and planner content.
+
+First compile while the old app registration still exists and confirm the duplicate-route or duplicate-symbol problem is observable. Remove only the old `LiveGraph.kt`, then rerun.
+
+- [ ] **Step 7: Run route, mapping, app navigation, and feature checks**
+
+```powershell
+./gradlew.bat :feature:live:testDebugUnitTest --tests "com.streamvault.feature.live.navigation.*" :app:testDebugUnitTest --tests "com.streamvault.app.live.AppLivePlaybackRequestMapperTest" --tests "com.streamvault.app.navigation.*" :feature:live:verifyFeatureLiveBoundary :app:compileDebugKotlin --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: PASS with one production owner for each live destination.
+
+- [ ] **Step 8: Commit graph ownership**
+
+```powershell
+git add feature/live/src/main/java/com/streamvault/feature/live/navigation feature/live/src/test/java/com/streamvault/feature/live/navigation app/src/main/java/com/streamvault/app/live app/src/test/java/com/streamvault/app/live app/src/main/java/com/streamvault/app/navigation
+git commit -m "feat(live): register feature-owned navigation graph"
+```
+
+---
+
+### Task 9: Remove legacy ownership and run structural/resource gates
+
+**Files:**
+- Modify: app and feature locale resource files containing the 196-key inventory
+- Modify: `docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`
+- Create: `validation/phase5_live/task9-resource-cleanup.md`
+- Create: `validation/phase5_live/task9-structural-verification.md`
+- Modify: app unit/connected test imports that legitimately follow moved ownership
+
+**Interfaces:**
+- Consumes: fully wired feature graph and moved tests/resources.
+- Produces: one live production owner, exact resource/dependency audit, and fresh automated verification evidence.
+
+- [ ] **Step 1: Prove no legacy Home/EPG production remains**
+
+```powershell
+rg --files app/src/main/java/com/streamvault/app/ui/screens/home app/src/main/java/com/streamvault/app/ui/screens/epg
+rg -n "com\.streamvault\.app\.ui\.screens\.(home|epg)" app/src/main app/src/test app/src/androidTest feature core
+```
+
+Expected: the old directories are absent; any remaining string occurs only in generated profile output or recorded validation evidence and is handled in Task 11.
+
+- [ ] **Step 2: Audit feature dependencies and forbidden imports**
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:dependencies --configuration debugRuntimeClasspath --no-daemon --console=plain --warning-mode=none
+rg -n "com\.streamvault\.(app|feature\.)|MainActivity|NavController|NavHostController" feature/live/src/main
+```
+
+Expected: boundary PASS; no forbidden source match; project dependencies match the five approved modules.
+
+- [ ] **Step 3: Audit every temporary implementation import**
+
+```powershell
+rg -n "^import com\.streamvault\.data\." feature/live/src/main
+rg -n "^import com\.streamvault\.player\." feature/live/src/main
+```
+
+Update the ledger with exact type and source location. Remove only dependencies made obsolete by Tasks 3-8; retain `PreferencesRepository`, `ProviderSyncStateSource`, and player API imports with their recorded Phase 7 direction.
+
+- [ ] **Step 4: Compare resources locale by locale before deletion**
+
+For every moved key, compare app and feature values, plurals, and formatting placeholders. Use `rg` across app/feature/core/benchmark/manifest/test sources before removing an app entry. Record moved, duplicated, retained, and removed counts in `task9-resource-cleanup.md`.
+
+Expected: no missing resource at compile time and no changed format argument ordering.
+
+- [ ] **Step 5: Run the full focused structural bundle**
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:testDebugUnitTest :feature:live:lintDebug :feature:live:compileDebugAndroidTestKotlin :feature:live:assembleDebug :app:compileDebugKotlin :app:compileDebugUnitTestKotlin :app:testDebugUnitTest :app:assembleDebug --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: exit 0. If a neighboring existing gate fails, record the exact task, file, diagnostic, and evidence that it is pre-existing; do not label the full bundle successful.
+
+- [ ] **Step 6: Run neighboring feature checks separately**
+
+```powershell
+./gradlew.bat :feature:settings:check :feature:provider:check :feature:playback:check --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: record each result independently. The known Playback lint/open runtime gates remain Playback-owned unless the live diff demonstrably changes them.
+
+- [ ] **Step 7: Refresh Graphify and verify ownership paths**
+
+```powershell
+graphify update .
+graphify query "Where are Home Live TV EPG and preview presentation owned after the feature live extraction?" --budget 3000
+```
+
+Expected: Home/EPG production nodes resolve under `feature/live`; app nodes represent composition/adapters; Playback owns handoff/MultiView implementation.
+
+- [ ] **Step 8: Commit cleanup and structural evidence**
+
+```powershell
+git add app feature/live docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md validation/phase5_live graphify-out
+git commit -m "refactor(live): remove legacy app presentation ownership"
+```
+
+---
+
+### Task 10: Run connected Live/EPG and mandatory multi-channel playback acceptance
+
+**Files:**
+- Create: `validation/phase5_live/task10-connected-validation.md`
+- Create: `validation/phase5_live/task10-live-playback/`
+- Create: `validation/phase5_live/task10-screenshots/`
+- Modify: feature/app connected tests only when a test legitimately follows moved ownership
+
+**Interfaces:**
+- Consumes: installed debug app, API 36 TV emulator, at least two valid live HLS channels, and feature connected tests.
+- Produces: exact route/focus/EPG/preview/MultiView evidence plus two long-duration channel captures satisfying the repository protocol.
+
+- [ ] **Step 1: Verify ADB and emulator readiness without clearing data**
+
+```powershell
+$env:ANDROID_HOME='E:\androidSdk'
+& "$env:ANDROID_HOME\platform-tools\adb.exe" devices -l
+& "$env:ANDROID_HOME\platform-tools\adb.exe" shell getprop sys.boot_completed
+& "$env:ANDROID_HOME\platform-tools\adb.exe" shell cmd package list packages | Select-String streamvault
+```
+
+Expected: one authorized boot-complete TV emulator and available package service. Record device/AVD/API/ABI; do not uninstall or clear user data.
+
+- [ ] **Step 2: Run the complete feature connected suite**
+
+```powershell
+./gradlew.bat :feature:live:connectedDebugAndroidTest --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: all live feature connected tests pass. Record XML path, tests, failures, errors, skipped, and duration.
+
+- [ ] **Step 3: Run app navigation/player seam connected tests**
+
+Run the repository's focused navigation, platform compatibility, Playback overlay, and golden test classes rather than treating the complete app suite as one opaque result. Record each class result independently.
+
+Expected: Live TV and EPG destinations open with argument compatibility; player and MultiView callbacks reach the existing destinations; any unrelated baseline failure is listed exactly.
+
+- [ ] **Step 4: Perform manual Live TV and EPG journeys**
+
+Using D-pad first, then available touch/mouse paths, cover source/category switching, category/channel search, quick filters, hidden channels/categories, favorites, reorder, PIN, repeated focus, preview replacement, fullscreen/back handoff, MultiView planner, EPG horizontal/vertical movement, paging, search, density/mode/favorites, reminders, recording conflict where fixtures allow, archive launch, RTL, reduced motion, semantics, and Back restoration.
+
+Capture named 1920x1080 screenshots and sanitized logs. Record unavailable fixture-dependent actions as open.
+
+- [ ] **Step 5: Capture channel 1 at two-second cadence**
+
+Create an explicit directory such as `validation/phase5_live/task10-live-playback/channel-1/`. After selecting and naming the channel, run 61 captures:
+
+```powershell
+$adb='E:\androidSdk\platform-tools\adb.exe'
+0..60 | ForEach-Object {
+ $index='{0:D2}' -f $_
+ & $adb exec-out screencap -p > "validation/phase5_live/task10-live-playback/channel-1/frame_$index.png"
+ Start-Sleep -Seconds 2
+}
+```
+
+Expected: 61 nonempty PNGs spanning approximately two minutes.
+
+- [ ] **Step 6: Prove channel 1 progression and health**
+
+Compute SHA-256 hashes, unique-hash count, media session, and log scans:
+
+```powershell
+Get-FileHash validation/phase5_live/task10-live-playback/channel-1/frame_*.png -Algorithm SHA256 | Group-Object Hash | Measure-Object
+& $adb shell dumpsys media_session > validation/phase5_live/task10-live-playback/channel-1/media-session.txt
+& $adb logcat -d -v time > validation/phase5_live/task10-live-playback/channel-1/logcat.txt
+rg -n "fatal-error|live-recovery selected|live-recovery no-candidate|prepare resolvedStreamType=MPEG_TS_LIVE|source-malformed live-ts-fallback|Player stuck|state=ERROR" validation/phase5_live/task10-live-playback/channel-1/logcat.txt
+rg -n "retry category=|first-frame-success|prepare resolvedStreamType=HLS|read-progress streamType=HLS" validation/phase5_live/task10-live-playback/channel-1/logcat.txt
+```
+
+Expected: frames continue changing, media session is `PLAYING` with `error=null`, HLS evidence exists, and no fatal/stuck/unintended fallback match exists.
+
+- [ ] **Step 7: Repeat the full capture for a different live channel**
+
+Use `channel-2/`, clear logcat immediately before starting, and repeat Steps 5-6 without shortening the window. Prefer a different provider/source characteristic when available.
+
+- [ ] **Step 8: Record acceptance honestly**
+
+For both channels record name, provider, URL redaction policy, 61 screenshot count, two-second interval, unique hash count, first/last timestamps, media-session state/error, HLS prepare/read/first-frame lines, recovery lines, and every fatal/stuck/fallback match.
+
+Passing requires both channels to satisfy all criteria. A failed or externally expired stream is recorded as a failed/unavailable gate and replaced only if the report preserves the original attempt.
+
+- [ ] **Step 9: Commit runtime evidence separately**
+
+```powershell
+git add validation/phase5_live feature/live/src/androidTest app/src/androidTest
+git commit -m "test(live): record feature runtime acceptance"
+```
+
+---
+
+### Task 11: Capture build isolation, regenerate profiles, and write the live report
+
+**Files:**
+- Create: `validation/phase5_live/performance-after.md`
+- Create: `validation/phase5_live/profile-validation.md`
+- Create: `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md`
+- Modify: `docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md`
+- Modify: `docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md`
+- Modify: generated profile sources only through `:app:generateBaselineProfile`
+
+**Interfaces:**
+- Consumes: committed post-extraction ref and all Tasks 0-10 evidence.
+- Produces: five-pair build comparison, task-isolation proof, regenerated profile evidence, final ownership report, and explicit remaining gates without a Phase 5 completion claim.
+
+- [ ] **Step 1: Capture five post-extraction live source-edit samples**
+
+In an isolated snapshot of the committed post-extraction ref, touch only
+`feature/live/src/main/java/com/streamvault/feature/live/home/HomeScreen.kt`
+and run five times:
+
+```powershell
+./gradlew.bat :feature:live:compileDebugKotlin --no-daemon --console=plain --warning-mode=none --profile
+```
+
+Record wall time, profile path, task states, median, average, and p95. Prove no
+`:feature:playback`, `:feature:provider`, or `:feature:settings` Kotlin compile
+task executes.
+
+- [ ] **Step 2: Capture five post-extraction moved-test samples**
+
+Touch only `feature/live/src/test/java/com/streamvault/feature/live/home/HomeViewModelTest.kt` and run five times:
+
+```powershell
+./gradlew.bat :feature:live:compileDebugUnitTestKotlin --no-daemon --console=plain --warning-mode=none --profile
+```
+
+Compute the same statistics and compare against Task 0. Report outliers and cache/setup state; do not claim the 20% target from incomparable samples.
+
+- [ ] **Step 3: Capture clean and warm guardrails**
+
+In isolated pre/post snapshots with equivalent Gradle/SDK/temp storage, run clean debug and warm no-change `:app:assembleDebug`. Record executed/from-cache/up-to-date task counts, median where repeated, and comparability limitations.
+
+- [ ] **Step 4: Regenerate Baseline/Startup Profiles**
+
+```powershell
+./gradlew.bat :app:generateBaselineProfile --no-daemon --console=plain --warning-mode=none
+./gradlew.bat verifyBaselineProfileSources :app:assembleBeta :app:assembleRelease --no-daemon --console=plain --warning-mode=none
+```
+
+Expected: producer and packaging pass. Record test counts, durations, generated rule counts, APK/AAB packaging evidence, and any unavailable physical-device gate.
+
+- [ ] **Step 5: Scan profile descriptors**
+
+```powershell
+rg -n "com/streamvault/app/ui/screens/(home|epg)" app/src/main/generated/baselineProfiles
+rg -n "com/streamvault/feature/live" app/src/main/generated/baselineProfiles
+```
+
+Expected: zero stale app Home/EPG descriptors and nonzero feature/live descriptors. If stale descriptors remain, rerun generation from a clean installed target rather than editing text manually.
+
+- [ ] **Step 6: Write the live execution report**
+
+The report must include:
+
+- ownership, dependency, resource, source/test count, graph, and route evidence;
+- delivered commit list and rollback SHA;
+- exact automated, connected, manual, two-channel playback, performance, and profile commands/results;
+- channel names, screenshot count/interval/unique hashes, media-session results, and sanitized log findings;
+- every unavailable, failed, neighboring, physical-device, provider, archive, recording, or performance gate;
+- explicit statements that Catalog/System were not started and Playback,
+ Provider, and Settings reports remain authoritative for their open gates;
+- explicit statement that Phase 5 is not complete.
+
+- [ ] **Step 7: Update roadmap and architecture status**
+
+Link the live spec, plan, report, and validation artifacts. Mark only evidence-backed live items complete. Leave later slices and all unrelated open gates unchanged.
+
+- [ ] **Step 8: Run final fresh verification**
+
+```powershell
+./gradlew.bat :feature:live:verifyFeatureLiveBoundary :feature:live:check :feature:live:compileDebugAndroidTestKotlin :app:testDebugUnitTest :app:assembleDebug verifyBaselineProfileSources --no-daemon --console=plain --warning-mode=none
+graphify update .
+git status --short
+git diff --check
+```
+
+Expected: report actual exit codes and failures. A completion claim is permitted only if the full command passes and Tasks 10-11 evidence satisfies the spec; otherwise state the exact open live gates.
+
+- [ ] **Step 9: Commit report and generated evidence**
+
+```powershell
+git add docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md docs/COMPOSE_REDUCTION_PHASE5_ROADMAP.md docs/COMPOSE_REDUCTION_AND_UI_ARCHITECTURE_PLAN.md validation/phase5_live app/src/main/generated/baselineProfiles graphify-out
+git commit -m "docs(live): report phase 5 feature extraction"
+```
+
+## Exit Criteria
+
+- `:feature:live` owns Home Live TV and EPG presentation, ViewModels/state, dialogs, preview UI, resources, tests, and graph registration.
+- `:app` owns only live composition adapters, player-request mapping, MultiView planner composition, route compatibility, platform/lifecycle entry points, and root graph registration.
+- The feature has no app, root-controller, activity, or feature-implementation import and only the five approved project dependencies.
+- Preview handoff uses the same Playback singleton through the app adapter; no timeout/release/recovery policy is duplicated or changed.
+- Home and EPG unit/connected tests run from `:feature:live`; app navigation/player seam tests remain app-owned.
+- A live-only source/test edit does not compile unrelated feature source, with five-pair measurements recorded honestly.
+- At least two live channels satisfy the required long-duration screenshot/hash/media-session/log protocol, or the exact live acceptance gate remains explicitly open.
+- Generated profiles contain feature/live descriptors and no stale app Home/EPG descriptors.
+- `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md`, the transitional ledger, roadmap, architecture plan, validation artifacts, and Graphify output reflect actual evidence.
+- Catalog and System remain untouched, neighboring feature gates remain separate, and no Phase 5 completion claim is made.
diff --git a/docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md b/docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md
new file mode 100644
index 00000000..1b1710ed
--- /dev/null
+++ b/docs/superpowers/specs/2026-08-28-phase-5-live-feature-extraction-design.md
@@ -0,0 +1,487 @@
+# Phase 5 Live Feature Module Extraction Design
+
+Date: 2026-08-28
+Status: Approved for implementation planning
+
+## Context
+
+Phase 5 moves presentation out of `:app` into independently compiled feature
+modules without changing behavior. `:feature:playback` and `:feature:provider`
+are extracted. `:feature:settings` is codewise extracted and independently
+checked, with its remaining acceptance and performance gates recorded in
+`docs/COMPOSE_REDUCTION_PHASE5_SETTINGS_REPORT.md`. Those open gates remain
+separate and are not reopened or reinterpreted by this slice.
+
+The next roadmap item is `:feature:live`. Its current move unit contains Home
+Live TV browsing, category and channel presentation, EPG/guide presentation,
+preview rendering and state, remote-input policy, dialogs, Hilt ViewModels,
+resources, and tests. The production Home and EPG packages currently contain
+13 Kotlin files and approximately 10,700 lines. Graphify identifies
+`HomeViewModel` and `EpgViewModel` as god nodes with 69 and 71 connections.
+
+The extraction crosses three existing ownership seams:
+
+- Home and EPG directly use app implementations such as
+ `StreamVaultPluginManager` and `TvInputChannelSyncManager`.
+- Preview handoff and MultiView are implemented in `:feature:playback`, but
+ Phase 5 prohibits feature implementation dependencies.
+- Home and EPG still consume app-owned shell, card, selection, category,
+ remote-input, time-format, and dialog presentation.
+
+The extraction is therefore contract-first and staged. It is not a package
+rename, a Live TV redesign, a preview-policy rewrite, or a Catalog extraction.
+
+## Goal
+
+Create `:feature:live` as the sole owner of Home Live TV and EPG presentation,
+state, dialogs, preview UI, feature resources, tests, and graph registration,
+while `:app` remains the platform and navigation composition root.
+
+The feature must compile and test independently. A live-only source edit must
+not compile Settings, Provider, Playback, Catalog, or System presentation
+source. Route arguments, list ordering, stable identities, focus restoration,
+remote shortcuts, callback order, preview handoff, EPG navigation, recording
+and reminder actions, and visual output remain equivalent.
+
+## Non-goals
+
+- Do not convert Home Live TV or EPG away from Compose.
+- Do not redesign Home, EPG, their modes, dialogs, navigation chrome, or
+ preview layout.
+- Do not split or behaviorally refactor `HomeViewModel` or `EpgViewModel`
+ during the mechanical ownership transfer.
+- Do not change preview preparation, adaptive reprime, decoder/surface/buffer
+ setup, playback recovery, timeshift, HLS fallback, or player lifecycle.
+- Do not move `LivePreviewHandoffManager`, `MultiViewManager`,
+ `MultiViewViewModel`, or `MultiViewPlannerDialog` out of
+ `:feature:playback`.
+- Do not add `:feature:live -> :feature:playback` or any other feature-to-
+ feature implementation dependency.
+- Do not start Dashboard, Movies, Series, VOD, Favorites, Search, Downloads,
+ Plugins, Welcome, Catalog, or System extraction.
+- Do not close Playback, Provider, or Settings acceptance/performance gates.
+- Do not claim Phase 5 completion from completion of this slice.
+
+## Current ownership and coupling
+
+### Live presentation move unit
+
+```text
+app/src/main/java/com/streamvault/app/ui/screens/home/
+app/src/main/java/com/streamvault/app/ui/screens/epg/
+app/src/test/java/com/streamvault/app/ui/screens/home/
+app/src/test/java/com/streamvault/app/ui/screens/epg/
+```
+
+The production move unit includes:
+
+- `HomeScreen`, `HomeScreenDialogs`, `HomeSidebarComponents`,
+ `HomePreviewUiState`, and `HomeViewModel`.
+- `EpgScreen`, `EpgControlComponents`, `EpgGridComponents`,
+ `EpgHeroComponents`, `EpgScreenDialogs`, `GuideDateTime`,
+ `PlayerTransparentGuideOverlay`, and `EpgViewModel`.
+- `HomeViewModelTest`, `EpgViewModelTest`, `GuideDateTimeTest`, and
+ `ProgramReminderIssueMessageTest`.
+
+`PlayerTransparentGuideOverlay` is currently unreferenced. The accepted Phase
+5 design explicitly deferred it from Playback to this slice. It moves with EPG
+so there is one owner, but it remains unregistered and behaviorally unchanged.
+
+### Navigation
+
+`app/navigation/graph/LiveGraph.kt` currently owns `live_tv` and `epg`
+destination registration. `AppRouteCodec` owns compatibility encoding and
+decoding for:
+
+```text
+live_tv?categoryId={categoryId}
+epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}
+```
+
+The feature takes ownership of the stable patterns and graph registration.
+`AppRouteCodec` retains external compatibility, typed-destination encoding,
+payload transport, and player-request construction.
+
+### Preview and MultiView coupling
+
+Home and EPG use the `:player` API for auxiliary preview engines and directly
+use Playback implementation types for handoff and MultiView. The new feature
+must not import those types. `:app`, which already depends on both features,
+adapts the existing implementations to live-owned ports without adding policy.
+
+### Direct implementation dependencies
+
+The current packages directly use these non-domain implementations:
+
+| Implementation | Current responsibility | Phase 5 treatment |
+|---|---|---|
+| `PreferencesRepository` | live/guide preferences and preview engine configuration | temporary `:data` dependency; ledger every source site |
+| `ProviderSyncStateSource` | Home provider synchronization state | temporary `:data` dependency; ledger source site |
+| `StreamVaultPluginManager` | preview stream preparation | replace with `LivePreviewStreamPreparer` app adapter |
+| `TvInputChannelSyncManager` | refresh TV input after provider refresh | replace with `LiveSurfaceRefreshPort` app adapter |
+| `LivePreviewHandoffManager` | preview/fullscreen/reverse handoff | replace with `LivePreviewHandoffPort` app adapter |
+| `MultiViewManager` | slot count and capacity | replace with `LiveMultiViewStatusPort` app adapter |
+| `MultiViewViewModel` / `MultiViewPlannerDialog` | planner presentation and launch | inject app-composed `LiveMultiViewPlannerContent` |
+
+All remaining direct `:data` imports are recorded in
+`docs/COMPOSE_REDUCTION_PHASE5_TRANSITIONAL_DEPENDENCIES.md`. The direct
+`:player` dependency remains approved for `PlayerEngine`, render surfaces,
+engine qualifiers, and immutable player API types.
+
+## Target dependency direction
+
+```text
+:app
+ -> :feature:live
+ -> :feature:playback
+ -> :feature:provider
+ -> :feature:settings
+ -> :core:navigation / :core:ui / :domain / :data / :player
+
+:feature:live
+ -> :core:navigation
+ -> :core:ui
+ -> :domain
+ -> :data # temporary; every direct implementation import ledgered
+ -> :player # preview engine and render-surface API only
+```
+
+`:feature:live` must not depend on `:app`, `:feature:playback`,
+`:feature:provider`, `:feature:settings`, or a root navigation controller.
+
+## Target ownership
+
+### `:feature:live` owns
+
+- `LiveRoutePatterns` and `registerLiveGraph`.
+- Home Live TV screen, state, preview state, ViewModel, categories, channels,
+ sidebars, quick filters, reorder UI, dialogs, and remote-shortcut policy.
+- EPG screen, state, ViewModel, grid, hero, controls, dialogs, override UI,
+ reminder/recording presentation, date/time helpers, and the deferred
+ transparent-guide source.
+- Live-owned playback request value types passed to app callbacks.
+- `LivePreviewHandoffPort`, `LivePreviewStreamPreparer`,
+ `LiveSurfaceRefreshPort`, `LiveMultiViewStatusPort`, and immutable boundary
+ values.
+- Live-specific copies/adapters of presentation that currently lives in
+ `:app` but cannot move to `:core:ui` without coupling Core UI to domain
+ models or starting Catalog work.
+- Feature strings/plurals/drawables, locale translations, unit tests,
+ connected tests, golden fixtures, Compose diagnostics, and module-boundary
+ verification.
+
+### `:app` retains
+
+- `MainActivity`, root `NavHostController`, `AppNavHost`, external intents,
+ `AppRouteCodec`, navigation payload storage, and startup/top-level policy.
+- Construction of `PlayerNavigationRequest` from live-owned playback request
+ values and invocation of `NavigationActions.openPlayer`.
+- App adapters for plugin stream preparation, TV-input refresh, preview
+ handoff, and MultiView status.
+- Composition of Playback-owned `MultiViewPlannerDialog` and navigation to
+ `AppDestination.MultiView`.
+- App-owned shared component implementations still used by Catalog/System.
+ They are not deleted or moved merely because Live receives feature-local
+ equivalents.
+- Generated profile production and app-level compatibility tests.
+
+### Neutral shared ownership
+
+- Shell visuals, device classification, notification permission gating,
+ generic TV buttons/surfaces, PIN dialogs, image wrappers, and time-format
+ primitives use existing `:core:ui` APIs.
+- `GuideLookupKey` and live remote-shortcut dispatch are live-specific and move
+ into `:feature:live`.
+- Shared app components that accept domain entities remain in `:app` for
+ Catalog until that slice. Live-local equivalents use distinct names where
+ both implementations coexist; Catalog source is otherwise untouched.
+
+## Public feature boundary
+
+### Routes and graph registration
+
+The feature owns route strings exactly matching current compatibility:
+
+```kotlin
+object LiveRoutePatterns {
+ const val LIVE_TV = "live_tv"
+ const val LIVE_TV_DESTINATION = "live_tv?categoryId={categoryId}"
+ const val EPG = "epg"
+ const val EPG_DESTINATION =
+ "epg?categoryId={categoryId}&anchorTime={anchorTime}&favoritesOnly={favoritesOnly}"
+}
+```
+
+Graph registration is controller-free:
+
+```kotlin
+fun NavGraphBuilder.registerLiveGraph(
+ navigationDestinations: List<UiDestination>,
+ onDestinationRequested: (AppDestination) -> Unit,
+ onPlayChannel: (LiveChannelPlaybackRequest) -> Unit,
+ onPlayArchive: (LiveArchivePlaybackRequest) -> Unit,
+ multiViewPlannerContent: LiveMultiViewPlannerContent,
+)
+```
+
+The graph reads the existing argument defaults (`-1L`, `-1L`, and `false`),
+constructs Home and Guide return destinations with the same values, and passes
+controller-free callbacks to `HomeScreen` and `FullEpgScreen`. It never imports
+`AppRouteCodec`, `Routes`, `NavController`, `MainActivity`, app payloads, or a
+Playback implementation.
+
+The app maps `LiveChannelPlaybackRequest` and `LiveArchivePlaybackRequest`
+field-for-field into the existing `PlayerNavigationRequest` construction path.
+The feature request types preserve channel/provider/category identity,
+combined-profile/source filters, virtual-category state, archive bounds/title,
+and the typed return destination.
+
+### Preview ports
+
+The live feature defines:
+
+```kotlin
+enum class LivePreviewOrigin { HOME, GUIDE }
+
+data class LivePreviewSession(
+ val engine: PlayerEngine,
+ val channelId: Long,
+ val providerId: Long,
+ val streamInfo: StreamInfo,
+)
+
+interface LivePreviewHandoffPort {
+ val reverseHandoffOrigin: Flow<LivePreviewOrigin?>
+
+ fun registerPreviewSession(
+ channel: Channel,
+ streamInfo: StreamInfo,
+ engine: PlayerEngine,
+ origin: LivePreviewOrigin,
+ )
+
+ fun beginFullscreenHandoff(channelId: Long, engine: PlayerEngine?): Boolean
+ fun consumeReverseHandoff(origin: LivePreviewOrigin): LivePreviewSession?
+ fun clear(engine: PlayerEngine?)
+}
+
+interface LivePreviewStreamPreparer {
+ suspend fun prepare(streamInfo: StreamInfo): Result<StreamInfo>
+}
+```
+
+`AppLivePreviewHandoffAdapter` delegates to the existing singleton
+`LivePreviewHandoffManager`, maps only enum/session value types, and preserves
+the same manager instance consumed by Playback. It does not reproduce timeout,
+release, or handoff policy. `AppLivePreviewStreamPreparer` delegates to
+`StreamVaultPluginManager.preparePlaybackStreamInfo` and preserves the existing
+result and error message.
+
+Home and EPG retain their separate preview state and existing preview engine
+logic. The ports replace imports only; they do not move player policy into the
+live feature.
+
+### TV surface and MultiView ports
+
+```kotlin
+interface LiveSurfaceRefreshPort {
+ suspend fun refreshTvInputCatalog()
+}
+
+data class LiveMultiViewStatus(
+ val channelCount: Int = 0,
+ val slotCapacity: Int = 4,
+)
+
+interface LiveMultiViewStatusPort {
+ val status: Flow<LiveMultiViewStatus>
+}
+
+typealias LiveMultiViewPlannerContent = @Composable (
+ pendingChannel: Channel?,
+ onDismiss: () -> Unit,
+ onLaunch: () -> Unit,
+) -> Unit
+```
+
+The app surface adapter delegates to `TvInputChannelSyncManager`. The app
+MultiView adapter combines the existing `MultiViewManager.slots` and persisted
+two-slot layout preference into the same count/capacity values currently
+computed by `HomeViewModel`. The planner lambda renders the existing
+Playback-owned planner with its existing Hilt scope and invokes callbacks in
+the same order. Live never imports Playback implementation packages.
+
+## Screen and state boundary
+
+Phase 5 keeps current state topology and ViewModel method order. The target is:
+
+```text
+LiveGraph
+ HomeRoute
+ HomeScreen
+ live/category/channel presentation
+ isolated HomePreviewUiState consumer
+ HomeDialogsHost
+ app-composed MultiView planner content
+
+ EpgRoute
+ FullEpgScreen
+ guide grid/hero/controls
+ isolated preview fields and render surface
+ EpgScreenDialogs
+```
+
+`HomeUiState`, `HomePreviewUiState`, `EpgUiState`, `EpgOverrideUiState`, and
+`ProgramReminderUiState` retain their current fields and defaults during the
+move. Existing lazy keys/content types, focus requesters, saveable state,
+dialog ordering, lifecycle effects, permission gating, and Back behavior are
+preserved. Any missing stable key or `contentType` found by the inventory is
+recorded as a separate behavior/performance follow-up unless adding it is
+provably identity-preserving and covered by focused tests.
+
+The screens use `CoreAppScreenScaffold`, `UiDestination`, core time-format and
+device APIs, and feature-local presentation components. They remain renderable
+with explicitly supplied ViewModels/state and callbacks, without a root
+controller or app activity.
+
+## Resources
+
+The initial scan found 196 unique resource references in the Home/EPG move
+unit. The implementation inventory records exact default and locale ownership
+before moving any key.
+
+Feature-owned Home, Live TV, EPG, preview, reminder, recording-conflict, and
+dialog resources move locale by locale into `:feature:live`. A key is removed
+from `:app` only when no app source, test, manifest, benchmark, or other feature
+uses it. Shared keys may be duplicated temporarily with identical values; the
+duplication and future owner are recorded in the live report.
+
+The module namespace is `com.streamvault.feature.live`. Moved source uses
+`com.streamvault.feature.live.*` and `com.streamvault.feature.live.R`.
+
+## Migration sequence
+
+1. Record rollback SHA, exact sources/tests/resources/imports/routes, current
+ test state, source counts, baseline commands, and all existing open gates.
+2. Add `:feature:live`, coverage/Compose configuration, and a fail-closed
+ boundary task with Kotlin and Java violation fixtures.
+3. Add route patterns and live-owned playback request values with compatibility
+ tests before changing app graph wiring.
+4. Add preview, preparation, TV-surface, and MultiView contracts; implement
+ app adapters and Hilt bindings with delegation tests.
+5. Replace app shell/time/device/remote/shared-presentation imports with core
+ APIs or distinct live-local presentation equivalents.
+6. Move Home state, ViewModel, preview state, tests, UI, dialogs, and resources.
+7. Move EPG state, ViewModel, tests, UI, dialogs, deferred overlay, and
+ resources.
+8. Register the feature graph from `AppNavHost`; app callbacks construct player
+ requests and compose the existing MultiView planner.
+9. Remove legacy live ownership only after feature, app integration, connected,
+ and installed-route checks pass.
+10. Audit temporary dependencies/resources, capture build measurements,
+ regenerate profiles, run full live acceptance, refresh Graphify, and write
+ `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md`.
+
+## Error handling and rollback
+
+- Missing or invalid route arguments retain existing defaults.
+- No provider, empty category/channel, stale EPG, preview preparation failure,
+ permission denial, reminder delivery issue, recording conflict, and EPG
+ override errors keep current messages and callback ordering.
+- Preview cancellation, replacement, adaptive reprime, fullscreen handoff,
+ reverse handoff, clear, engine stop, and engine release ordering remain
+ unchanged.
+- MultiView planner dismissal and launch clear dialog/preview state in the same
+ order before app navigation.
+- App adapters delegate and map values only; they do not catch, translate, or
+ retry failures unless the existing call site already does so.
+- The app-owned live destinations remain wired until the feature graph compiles,
+ unit tests pass, and the installed app reaches both Live TV and EPG.
+- Contracts, mechanical moves, graph wiring, cleanup, profiles, and acceptance
+ evidence are separate rollback points.
+
+## Verification
+
+### Automated structural gates
+
+- `:feature:live:verifyFeatureLiveBoundary`
+- `:feature:live:testDebugUnitTest`
+- `:feature:live:lintDebug`
+- `:feature:live:compileDebugAndroidTestKotlin`
+- `:feature:live:check`
+- `:feature:live:assembleDebug`
+- route-pattern, playback-request mapping, app-adapter, and graph callback tests
+- `:app:testDebugUnitTest`
+- `:app:assembleDebug`
+- source scans for app/root-controller/feature-implementation imports
+- runtime dependency/ledger/resource ownership comparison
+- `graphify update .` after code changes
+
+### Connected and manual behavior gates
+
+- Live TV route with and without `categoryId`.
+- EPG route with category, anchor time, and favorites combinations.
+- Category/source switching, search, quick filters, hidden items, favorites,
+ custom groups, pin/unpin, reorder, parental PIN, and focus restoration.
+- Repeated channel focus, preview start/stop/replacement, fullscreen handoff,
+ reverse handoff, and MultiView planner/launch.
+- EPG horizontal time movement, vertical channel movement, paging, day/prime-
+ time jumps, density/mode/favorites filters, search, overrides, reminders,
+ recording conflicts, archive launch, and Back behavior.
+- TV remote, touch/mouse, RTL, reduced motion, accessibility semantics, and
+ notification permission behavior.
+
+Unavailable providers, archive windows, recording storage, notification
+permission, accounts, hardware, or physical devices are recorded as open gates,
+not passes.
+
+### Mandatory live playback protocol
+
+Because this slice changes preview composition, preview handoff, navigation,
+and render-surface ownership, validation must cover at least two live channels.
+For each channel:
+
+- Capture 61 screenshots at a two-second cadence where practical (never fewer
+ than 45 screenshots for approximately 90 seconds).
+- Confirm changing screenshot hashes through the full window.
+- Confirm the media session remains `PLAYING` with `error=null`.
+- Confirm sanitized HLS prepare/read/first-frame or intended recovery evidence.
+- Confirm no fatal player error, stuck-player timeout, or unintended MPEG-TS
+ fallback.
+- Record channel name, screenshot count, interval, unique hash count, media
+ session result, and log findings.
+
+A build, install, launch, single screenshot, or short visual check is not live
+acceptance.
+
+### Build and profile evidence
+
+- Five before/after live-only incremental source-edit runs.
+- Five before/after moved-test compilation runs.
+- Clean debug and warm no-change guardrails.
+- Executed-task proof that a live edit does not compile unrelated feature
+ source.
+- Profile regeneration after package/signature moves, followed by scans for
+ stale `com/streamvault/app/ui/screens/home` and `/epg` descriptors.
+- Runtime benchmark evidence for category switching, channel focus, preview
+ start/stop/replacement, and EPG horizontal/vertical navigation when the
+ environment supports reliable measurement.
+
+## Exit criteria
+
+- Home Live TV and EPG presentation, state, dialogs, resources, tests, preview
+ UI, and graph registration are owned by `:feature:live`.
+- `:app` registers the live graph and supplies player-navigation callbacks,
+ app adapters, and Playback-owned MultiView planner content only.
+- No live feature source imports `com.streamvault.app`, a root navigation
+ controller, `MainActivity`, or another feature implementation.
+- Preview handoff continues through the same Playback singleton via the app
+ adapter; no handoff/release policy is duplicated.
+- All temporary `:data` imports are complete in the transitional ledger.
+- Feature tests run independently and a live-only edit is isolated from
+ unrelated feature compilation.
+- Multi-channel long-duration validation and all available Live/EPG functional
+ gates are recorded with exact evidence.
+- Remaining unavailable or failed gates are stated in
+ `docs/COMPOSE_REDUCTION_PHASE5_LIVE_REPORT.md` without claiming Phase 5
+ completion or closing Settings, Provider, or Playback gates.