2.8 KiB
2.8 KiB
K-TV Parallel Execution Plan
Strategy
3 parallel worktree tracks (zero file overlap), then a sequential tail after merging.
Parallel Tracks
Track A: Schedule Engine (feat/schedule-engine)
Files: domain/src/services/schedule/, domain/src/value_objects/scheduling.rs
- #3 — Wire Alternating, Weighted, Marathon into schedule engine dispatch
- #4 — Interstitial insertion in schedule engine
- #8 — Gap filler logic
- #6 — Mid-roll break logic (blocked by #4 and #5, but #5 is Track C — merge C first or stub chapters)
Track B: Playout Service (feat/playout)
Files: crates/playout/ (entirely new crate — zero overlap)
- #9 — Core HLS streaming (single channel, FFmpeg, SegmentStore port)
- #11 — Multi-channel + shared broadcast loop
- #10 — SCTE-35 markers + overlay metadata (blocked by #6, so merge Track A first)
Track C: Library Sync (feat/library-sync)
Files: adapters/*/src/ (sync logic only)
- #5 — Chapter extraction during library sync (ffprobe)
- #7 — MediaRole auto-detection during library sync
Merge Order
┌─ Track A (schedule engine) ──────────┐
master ──────┤ Track B (playout) ──────────────────┤── merge A ── merge C ── merge B ── sequential tail
└─ Track C (library sync) ─────────────┘
- Merge Track C first (library sync — smallest, no downstream deps)
- Merge Track A second (schedule engine — #6 needs chapters from Track C)
- Merge Track B third (playout — #10 needs mid-roll from Track A)
Track B can merge whenever since it's a new crate, but #10 and #11 depend on other tracks, so practically it merges last.
Sequential Tail (after all tracks merge)
On master, in order:
- #14 — OpenAPI: wire utoipa in presentation
- #15 — iCalendar export
- #16 — iCalendar import (blocked by #15)
- #17 — MCP: expand tools for creative scheduling (blocked by #3, #4)
Conflict Prevention Rules
- Each track works on its own feature branch
- No two tracks edit the same file
domain/src/services/mod.rs— only Track A adds to it during parallel phase; iCal (#15) adds to it during the sequential tail after Track A is mergeddomain/src/lib.rs— re-exports may need updating at merge time; resolve in merge commit- Run
cargo check --workspaceafter each merge before starting the next
Worktree Setup
git worktree add .worktrees/schedule-engine -b feat/schedule-engine
git worktree add .worktrees/playout -b feat/playout
git worktree add .worktrees/library-sync -b feat/library-sync
Each worktree starts from the same master commit. Work independently. Merge back to master one at a time.