You are updating an implementation plan based on critique and evaluation. Project…
- User
You are updating an implementation plan based on critique and evaluation.
codeProject directory: /Users/user_c042661f/Documents/reigh-workspace/reigh-app User intent summary:The intent is to make the persisted Reigh video editor timeline (
TimelineConfigplusAssetRegistry) have one documented, reusable domain interpretation, so UI loading/editing, Remotion rendering, imports, and agent tools stop making their own conflicting decisions about shape, migration, serialization, validation, and duration. This is a foundation sprint: preserve current editor behavior, centralize the domain rules, add targeted tests, and clearly mark any paths that cannot yet be migrated without overreaching.Original idea: Video editor developer platform Sprint 1: canonical timeline domain model.
Context: The Reigh video editor under src/tools/video-editor has useful primitives, but it is not yet easy for developers or agents to build on top of. Current pain points include multiple timeline shapes (TimelineClip, ClipMeta, ResolvedTimelineClip, TimelineData rows/meta/clipOrder), inconsistent duration semantics across UI/render/agent paths, Reigh-specific dependencies mixed into editor provider/components, and mutation paths that require internal knowledge.
This sprint is the first two-week slice. It must preserve the current Reigh app behavior while establishing the domain foundation for later ports/adapters, headless core, clip-type plugins, command bus, render pipeline hooks, and UI slots.
Goal: Create a canonical timeline domain layer that all current editor paths can use without changing user-visible functionality.
Primary outcomes:
- Establish one documented canonical interpretation of persisted TimelineConfig + AssetRegistry.
- Centralize repair/migration/canonicalization, duration calculation, validation, serialization, and structured errors.
- Remove or reduce divergent duration/shape logic between UI, Remotion renderer, import, and ai-timeline-agent paths.
- Prepare for agent-safe editing by defining validation/dry-run-friendly primitives, even if the full command bus ships in a later sprint.
Important constraints:
- Do not rewrite the video editor.
- Do not change visible editor behavior except to fix clear inconsistencies.
- Keep the existing Reigh editor page and shell working.
- Keep current tests passing; add targeted tests for canonical domain behavior.
- Avoid broad UI refactors in this sprint unless required to route through the domain layer.
- Do not make plugin registries or UI slots yet; only shape the domain layer so those later sprints are easier.
- Assistant