# Component correlation

Every major repo component tagged with a **primary pillar** and optional
**secondary** touchpoints. Primary = owner of the user-facing job.

Legend: **W** Watch · **D** Download · **N** Net · **X** cross-cutting

## Applications

| Component | Path | Primary | Secondary |
|-----------|------|---------|-----------|
| TVAnarchy (macOS) | `Sources/TVAnarchy/` | W | D (Search/Downloads tabs) |
| TVAnarchyCore | `Sources/TVAnarchyCore/` | W | D, N (split per module below) |
| TVAnarchyiOS | `Sources/TVAnarchyiOS/` | W | D (Downloads tab) |

## TVAnarchyCore modules

| Module | Primary | Secondary |
|--------|---------|-----------|
| `LibraryController`, `LibraryScanner`, `LibraryIndex`, `LibraryStore` | Library | W (consumed by Player/continue rail) |
| `ShowGrouping`, `ContentID`, `FranchiseStore`, `LocalLLMGrouper` | Library | N (grouping observations) |
| `DownloadsIndex` | Library | W (for local playback) |
| `WatchHistory`, `BlackWatchlog`, `WatchState` | W | N (signal source) |
| `PlayerController`, `PlayerTarget`, `VLCTarget`, `MpvTarget`, `QuickTimeTarget`, `RokuTarget` | W | N (intro observations) |
| `PlaylistController`, `NowPlayingController`, `TrackPreferenceStore` | W | |
| `MetadataController`, `EnrichService`, `MetaWriter`, `ArtworkService`, `FilenameParser` | Library | |
| `LocalLLMTitleRefiner` | W | |
| `OfflineCacheController`, `OfflinePolicyActuator`, `MediaPaths` | Library | W (glue to playback) |
| `PornCollectionService` | Library | |
| `SearchController` | D | W (UI host) |
| (future) `Net/*` (ObservationStore, IntroMarkersMerge, NetController) | N | W (Player hooks) |
| `TorrentService`, `DownloadsController` | D | |
| `BandwidthPolicy` | D | |
| `DeviceConfig`, `DevicesConfig` | Devices (primary; product: "install" group + Devices tab/registry; see pillars/devices.md + glossary) | W D (services flags) |
| `MeshJoin`, `FleetState`, `MeshEnrollController`, `MeshClientStore` | Devices (mesh/install pairing surface; internal fleet names kept per plan) | X (cross for now) |
| `AppLocalAPI` | W | X (bridge) |
| `VPNController`, `VPNConfigStore`, `VPNCredentialStore` | X | W |
| `SettingsStore` | W | |
| `AppTheme`, `WinampSkinLoader`, `WinampSkinSprites` | W | |
| `DisplayService`, `DisplayInfo` | W | |
| `HelperDeployment`, `SSHTransport`, `CommandTemplate` | X | W |
| `LogController`, `NotificationsService` | X | |
| `RepoPaths`, `AppVersion`, `BuildStamp` | X | |

## macOS views

| View | Primary | Secondary |
|------|---------|-----------|
| `HomeView`, `LibraryView`, `PlayerView` | W | |
| `MetadataView`, `AdultView` | W | |
| `DeviceView`, `DevicesView`, `DeviceEditView` | W | X |
| `SearchView` | D | |
| `DownloadsView` | D | |
| `SetupView`, `VPNSettingsView` | W | X |
| `ThemePalette`, `ThemeEnvironment`, `WinampComponents` | W | |
| `WinampSkinStore`, `WinampSkinViews` | W | |
| `MeshJoinView`, `IntroView`, `QRScannerView` | X | |
| `OfflineDownloadPanel`, `OfflineCullPanel`, `OfflinePolicySection` | W | |
| `PlaylistPopover`, `PlayerQueueRail`, `PlayerUpNextCard` | W | |
| `RootView` | X | W D |

## iOS views

| View | Primary | Secondary |
|------|---------|-----------|
| `LibraryView`, `PlayerScreen`, `VLCPlayerModel` | W | |
| `RemoteView` | W | |
| `DownloadsView`, `DownloadManager`, `FlightPack` | D | W |
| `BridgeClient`, `BridgeSettings`, `BridgeModels` | X | W D |
| `JoinFleetView`, `FleetGate`, `QRScanView` | X | |
| `SettingsView` | X | |

## Governor (`portable-net-tv`)

| Module | Primary | Secondary |
|--------|---------|-----------|
| `watch.ts`, `watchlog.ts` | W | D (seed TTL input) |
| `keeper.ts`, `rsync.ts`, `buffer` config | D | W (prefetch for playback) |
| `fleet/registry.ts` | X | |
| `fleet/duties.ts` | D | |
| `fleet/custody.ts`, `fleet/actuate.ts` | D | |
| `fleet/reaper.ts` | D | N (signal priority future) |
| `fleet/peers.ts`, `fleet/serve.ts` | D | N (hints future) |
| `fleet/transmission.ts`, `fleet/probe.ts`, `fleet/daemon.ts` | D | |
| `governor.ts`, `bandwidth.ts`, `jobs.ts` | D | |
| `vlc.ts` | W | D |

## MCP (`tv-anarchy-mcp`)

| Domain | Primary | Secondary |
|--------|---------|-----------|
| `vlc/` | W | |
| `display/` | W | |
| `blacktv/` | W | |
| `transmission/`, `transmission/search.ts` | D | |
| `media/library.ts`, `media/watchlog.ts` | W | |
| `media/devices.ts`, `media/settings.ts` | X | |
| `bridge/library.ts`, `bridge/watch.ts`, `bridge/stream.ts` | W | |
| `bridge/remote.ts` | W | |
| `bridge/torrents.ts` | D | |
| `bridge/fleet.ts` | D | X |
| `bridge/scan-worker.ts`, `bridge/artwork.ts` | W | |
| `app-bridge/client.ts` | X | |
| `security/guards.ts` (PathGuard) | X | (cross; implemented + wired for blacktv sh+TS dispatch; model for future Swift/MCP/Net surfaces cf. bridge/library.ts resolveStreamId) |

## Other packages

| Package | Primary | Secondary |
|---------|---------|-----------|
| `recommender/` | W | |
| `search/` | D | |
| `fleet/` (docs) | D | N (design) |
| `governor/tools/porn-rotation.py` | W | |
| `tools/build-install.sh`, `release.sh`, `update.sh`, `platform.sh` | X | |
| `tools/stamp-build.sh`, `make-icon.swift`, `deploy-phone.sh` | X | |
| `deploy.sh`, `mcp/deploy/` | X | |
| (future) Roku channel builder, RPi/ARM optimized cross-builds, web/PWA bundler | X | (see devices pillar for optimized device pkgs) |
| `site/` | X | marketing |
| `packages/types`, `packages/config`, `packages/media`, `packages/net` | X | (DRY shared models/config/media/net for governor/mcp/host-daemon; models SSOT, scanner+watchlog+load moved in, dups removed) |

## Tests

| Test file | Primary |
|-----------|---------|
| `ContinueWatchingTests`, `LibraryScannerTests`, `ShowGroupingTests` | W |
| `WatchHistorySyncTests`, `WatchStateTests`, `PlaylistTests` | W |
| `PlayerDisplayTests`, `NowPlayingTests`, `SleepTimerTests` | W |
| `WinampSkinLoaderTests`, `SettingsStoreTests` (appTheme, winampSkin) | W |
| `OfflineCacheTests`, `OfflinePolicyActuatorTests` | W |
| `TorrentDecoderTests`, `TransferHealthTests` | D |
| `MeshJoinTests`, `FleetJoinTests`, `DeviceConfigDecodeTests` | X |
| `AppLocalAPITests` | W |
| `TVAnarchyiOSUITests/PlaybackUITests` | W |

## Planned (Net) — not in repo yet

| Component | Primary |
|-----------|---------|
| `NetController` / edition publisher | N |
| `net/parts/intro-markers` merge | N |
| Fleet `net.subscriptions[]` ingest | N |
| Net edition torrent actuation | N | D (transport)