"baseline_test_command": null,
"baseline_test_failures": null,
"baseline_test_note": "Test baseline not applicable in doc mode.",
"meta_commentary": "CRITICAL CONTEXT: This is a doc-mode run. The deliverable is a single markdown file at /Users/user_c042661f/Documents/reigh-workspace/docs/video-editor-extraction-design.md. Do NOT modify reigh-app source. The final git status should show only the new doc (and possibly the new docs/ directory).\n\nEXECUTION GOTCHAS:\n1. The previous brief phase was sandbox-blocked from reading reigh-workspace files. Step 1 (T1) MUST succeed in actually opening the files \u2014 every concrete claim later in the doc needs an inline path:line citation tied back to those reads. If Read/Grep are still blocked, halt and surface to the user before writing specifics.\n2. Several "settled decisions" from the gate are non-negotiable and must appear verbatim in shape:\n - Schema reconciliation: Option A \u2014 whitelist a single app: Record<string, unknown> key at top-level, clip, and track in lib/serialize.ts. NOT full serializer loosening.\n - pinnedShotGroups migrates to app['x-reigh'].pinnedShotGroups (namespaced, NOT a top-level reigh key).\n - DataProvider anchor: data/DataProvider.ts is the canonical interface; data/SupabaseDataProvider.ts is the reference adapter; contexts/VideoEditorProvider.tsx is the bootstrap example. Hooks (useTimelineQueries, useTimelineRealtime, useTimelinePersistence) are LAYERED HELPERS, not the adapter.\n - subscribe(timelineId) on the DataProvider port is LABELED A NEW DESIGN ADDITION (not an extraction). Cite hooks/useTimelineRealtime.ts showing the current realtimeEventProcessor + React Query cache-invalidation mechanism.\n - v1 engine stays Remotion-specific; renderer abstraction deferred to a later major.\n3. PINNED-SHOT-GROUPS COMPAT (FLAG-004 / correctness accepted-tradeoff): The Order of Operations Step 1 MUST describe a five-stage compatibility recipe, not just "land the migration":\n (a) Add getPinnedShotGroups(config) and setPinnedShotGroups(config, value) helpers that DUAL-READ from both legacy config.pinnedShotGroups and new config.app?.['x-reigh']?.pinnedShotGroups, preferring new when present.\n (b) Update all callers to use the helpers. Minimum named set: hooks/useTimelineCommit.ts, lib/pinned-group-projection.ts, hooks/useShotGroups.ts, components/TimelineEditor/TimelineEditor.tsx, hooks/useTimelineTrackManagement.ts, lib/serialize.ts.\n (c) Flip writers (serializer + runtime) to emit to the new location.\n (d) Add a one-shot migration in lib/serialize.ts / lib/config-utils.ts that rewrites legacy inputs on load.\n (e) Update tests. Minimum named set: serialize.test.ts, migrate.test.ts, timeline-save-utils.test.ts, useTimelineCommit.test.tsx, useClipEditing.test.ts, useClipDrag.test.tsx, useTimelineTrackManagement.test.ts.\n Then after a stable interval, remove the legacy pinnedShotGroups field. List all of these explicitly in Part B section 4.7.\n4. Open questions in plan metadata (output path, package name, GitHub org, Remotion version pin) should be surfaced as TODOs in the doc itself \u2014 do NOT block on them, but flag them visibly.\n5. The forbidden-in-core list is exhaustive and must appear in full: shot groups (incl. pinnedShotGroups), generation assets, AgentChat, task-based export, Supabase, auth, projectId, MediaLightbox, project selection, shots context, VideoGenerationModal, generation duplication, final-video availability, stale-variant handling, active-task tracking.\n6. Tone: engineering design doc. No emoji. Tables and TS interface signatures preferred over prose. Each section scannable with subheadings linked from the TOC.\n7. Audience separation: Part A = OSS contributors; Part B = reigh engineers; Part C = both. Keep them distinctly labeled.\n8. The migration table must cover EVERY top-level folder under video-editor/ (compositions, components, contexts, data, effects, hooks, lib, pages, settings, types) plus top-level registration.test.ts. Plus all the specific files named in the gate's success criteria #10.\n9. The host-touchpoint table must cover all 21 items named in success criterion #11 (Supabase persistence, auth, projectId, MediaLightbox, AgentChat, task-based export, shot groups, generation assets, project selection, shots context, VideoGenerationModal, generation duplication, final-video availability, stale-variant handling, active-task tracking, checkpoints, asset upload/register, resolveAssetUrl, waveform, profile, realtime subscription).\n10. Open minor flag (conventions): explicitly state whether the editor package exports a provider-plus-shell pair (current pattern via TimelineStoreProvider + <TimelineEditor /> with no props) or intentionally redesigns to a prop-driven shell. Recommendation should anchor on what hooks/timelineStore.ts actually exposes today.\n11. Open minor flag (verification): the test strategy section should explicitly call out the pinnedShotGroups compatibility test cluster (serialize.test.ts, migrate.test.ts, timeline-save-utils.test.ts, pinned-group-projection.test.ts, useTimelineCommit.test.tsx, useClipEditing.test.ts, useClipDrag.test.tsx, useTimelineTrackManagement.test.ts) as the named verification gate for the pre-extraction migration step.",
"watch_items": [
"READ-ACCESS RISK: brief phase was sandbox-blocked from reading reigh-workspace files. If Read/Grep are still blocked in execution, the executor MUST surface the blocker to the user rather than write speculative specifics \u2014 every claim about current code requires a real inline path:line citation.",
"OUTPUT PATH: default is /Users/user_c042661f/Documents/reigh-workspace/docs/video-editor-extraction-design.md. The docs/ directory may not exist yet and may need to be created. Confirm the path is empty before writing.",
"NO CODE CHANGES: doc-only mode. Final git status in reigh-workspace must show ONLY the new doc (and optionally the new docs/ directory). If anything else appears in the diff, revert it.",
"FORBIDDEN-IN-CORE LIST IS EXHAUSTIVE: include all 15+ items by name (shot groups incl. pinnedShotGroups, generation assets, AgentChat, task-based export, Supabase, auth, projectId, MediaLightbox, project selection, shots context, VideoGenerationModal, generation duplication, final-video availability, stale-variant handling, active-task tracking). Missing any one fails success criterion #8.",
"SCHEMA RECONCILIATION IS LOCKED: Option A (whitelist single app key at top-level/clip/track in lib/serialize.ts). Do NOT propose Option B (full serializer loosening). pinnedShotGroups lands at app['x-reigh'].pinnedShotGroups, NOT a top-level reigh key inside app.",
"PINNED-SHOT-GROUPS COMPAT (accepted-tradeoff for FLAG-004): Order of Operations step 1 must describe the FIVE-STAGE recipe (helpers \u2192 caller updates \u2192 flip writers \u2192 one-shot migration \u2192 test updates \u2192 eventual legacy field removal). Naming the destination alone is insufficient \u2014 the doc author must spell out the dual-read shim and enumerate the caller/test files by name.",
"DATAPROVIDER ANCHORING IS LOCKED: data/DataProvider.ts is the canonical interface. data/SupabaseDataProvider.ts is the reference adapter. contexts/VideoEditorProvider.tsx is the bootstrap example. Hooks are LAYERED HELPERS, not the adapter. Do NOT regress this anchoring.",
"SUBSCRIBE IS NEW DESIGN: subscribe(timelineId) on DataProvider must be labeled as a NEW design addition with an inline citation to hooks/useTimelineRealtime.ts showing the current realtimeEventProcessor mechanism. Do NOT present it as an extraction of current behavior.",
"REMOTION LICENSE IS A DEDICATED SUBSECTION: not a footnote. Must state what adopters must verify (team-size threshold, commercial use clause, README warning template).",
"MIGRATION TABLE COMPLETENESS: must cover EVERY top-level folder (compositions, components, contexts, data, effects, hooks, lib, pages, settings, types) PLUS registration.test.ts PLUS the explicit file list in success criterion #10 (VideoEditorProvider, VideoEditorShell, VideoEditorPage, PropertiesPanel/, CompactPreview, useClientRender, useRenderState, useTimelineState, timelineStore, useTimelineHistory, useAssetOperations, useTimelinePersistence, lib/serialize.ts).",
"HOST-TOUCHPOINT TABLE COMPLETENESS: must cover all 21 items in success criterion #11. Missing any one fails review.",
"INLINE CITATIONS REQUIRED: every concrete claim about current reigh-app code (port shapes, type fields, file contents, import lists) needs an inline path:line citation. Reviewer will sample 5 randomly.",
"OPEN QUESTIONS PLACEHOLDERS: package name (suggested @tbd/*), GitHub org, Remotion version pin, output path. Surface as visible TODOs in the doc \u2014 do NOT silently invent values.",
"TONE: engineering design doc. No emoji. Tables and TS interface signatures over prose. Scannable subheadings linked from TOC.",
"CONVENTIONS FLAG (open minor): explicitly state whether extracted editor exports a provider-plus-shell pair matching today's TimelineStoreProvider + propless <TimelineEditor /> pattern, or intentionally redesigns to a prop-driven shell. Anchor recommendation on what hooks/timelineStore.ts slices actually expose.",
"VERIFICATION FLAG (open minor): test strategy must explicitly name the pinnedShotGroups compatibility test cluster as the verification gate for the pre-extraction migration."
],
"sense_checks": [
{
"id": "SC1",
"task_id": "T1",
"question": "Did the executor actually read every file in the Step-1 read list and confirm it can cite path:line for the DataProvider interface, the TimelineConfig type with pinnedShotGroups, the lib/serialize.ts rejection behavior, and the realtimeEventProcessor mechanism in useTimelineRealtime.ts? If any read was blocked, was the user notified before writing continued?",
"verdict": "",
"executor_note": "Yes. I read the Step-1 file set and related tests, and I captured direct path:line anchors for the DataProvider interface (data/DataProvider.ts:53-71), TimelineConfig with pinnedShotGroups (types/index.ts:181-186), lib/serialize.ts rejection behavior (lib/serialize.ts:98-122), and the realtimeEventProcessor invalidation mechanism (hooks/useTimelineRealtime.ts:29-43). No reads were blocked, so there was no halt/escalation before continuing."
},
{
"id": "SC2",
"task_id": "T2",
"question": "Does the TOC enumerate all fourteen pass_to_pass sections from the brief, organized into Part A / Part B / Part C / Appendix with audience labels? Is the executive summary \u2264 1 page?",
"verdict": "",
"executor_note": "The drafted T2 content satisfies the content check: the executive summary is concise and the TOC enumerates 14 numbered sections under Part A, Part B, and Part C, with appendix links and audience labels. The batch remains blocked only on the final file write: after the user-corrected path was applied, directory creation succeeded at , but file creation at still failed with sandbox errors."
},
{
"id": "SC3",
"task_id": "T3",
"question": "Does the package-layout table specify name + responsibility + public exports + peer deps + out-of-scope for each of schema/engine/editor/cli, with a per-split rationale? Is the dependency arrow direction explicit (cli \u2192 engine \u2192 schema; editor \u2192 engine \u2192 schema)?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC4",
"task_id": "T4",
"question": "Are all five ports (DataProvider, AssetResolver, MediaPicker, Exporter, HostContext) shown as TS interface signatures with error semantics, optional-method flags, and an in-memory default description? Does DataProvider have a method-by-method gap table (current vs proposed vs UNCHANGED/RENAMED/ADDED/REMOVED) covering load/save/list/delete plus optional saveCheckpoint, loadCheckpoints, uploadAsset, registerAsset, resolveAssetUrl, waveform, profile? Is labeled as ADDED (new design) with a citation to ?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC5",
"task_id": "T5",
"question": "Does the timeline JSON spec include: version field, zod shape summary, JSON Schema export, migration function contract , core-vs-app extension namespace rule, and forward-compat rule (unknown fields preserved INSIDE the namespace only)? Does it explicitly state the Option-A reconciliation (whitelist single key at top-level/clip/track) AND the \u2192 migration?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC6",
"task_id": "T6",
"question": "Does Part A include: pnpm + Turborepo repo tree, three example apps, playground brief, CI outline, OSS polish checklist with REMOTION LICENSE as a dedicated subsection (not footnote) stating what adopters must verify, CLI spec with invocation + flags + exit codes + default AssetResolver behavior, and a test strategy mapping every existing pure-logic test (render-bounds, timeline-scale, duplicate-clip, config-utils, mediaMetadata, interaction-state, editor-utils, resolve-overlaps) to a destination package?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC7",
"task_id": "T7",
"question": "Does Part B section 4.1 list the full forbidden-in-core set (shot groups incl. pinnedShotGroups, generation assets, AgentChat, task-based export, Supabase, auth, projectId, MediaLightbox, project selection, shots context, VideoGenerationModal, generation duplication, final-video availability, stale-variant handling, active-task tracking)? Does the migration table in 4.2 cover every top-level folder under plus , AND every file named in success criterion #10 (VideoEditorProvider, VideoEditorShell, VideoEditorPage, PropertiesPanel/, CompactPreview, useClientRender, useRenderState, useTimelineState, timelineStore, useTimelineHistory, useAssetOperations, useTimelinePersistence, lib/serialize.ts)?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC8",
"task_id": "T8",
"question": "Does the host-touchpoint table cover all 21 items in success criterion #11? Does the reference Supabase adapter section anchor on data/SupabaseDataProvider.ts (named as the adapter), name contexts/VideoEditorProvider.tsx as the bootstrap example, and explicitly label useTimelineQueries.ts / useTimelineRealtime.ts / useTimelinePersistence.ts as LAYERED HELPERS (not the adapter)?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC9",
"task_id": "T9",
"question": "Is the Order of Operations a numbered sequence (not prose) with a per-step rollback plan, with the serializer + pinnedShotGroups migration as STEP 1 (pre-extraction)? Does Step 1 enumerate the FIVE-STAGE pinnedShotGroups compatibility recipe (helpers, caller updates with named files, flip writers, one-shot migration, test updates with named files)? Are the extension pattern (renderOverlay/panels/contextMenu slots), 4 before/after import shapes, and sync-strategy option analysis (subtree split / submodule / file-link / dual-commit) all present?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC10",
"task_id": "T10",
"question": "Does Part C cover all four required open questions: (a) Remotion company-license implications, (b) pre-1.0 schema stability commitment with deprecation policy, (c) repo-sync strategy during transition, (d) engine renderer abstraction tradeoff with v1 recommendation and revisit trigger? Are other risks (dependency drift, effect-registry ABI, post-move test coverage gaps, serializer regressions, DataProvider optional-method compat, example drift) named?",
"verdict": "",
"executor_note": ""
},
{
"id": "SC11",
"task_id": "T11",
"question": "Does the appendix include a glossary (TimelineConfig, port, adapter, extension, HostContext) and a file-reference list? Did the executor run the self-review checklist verifying each pass_to_pass section concretely covered, every reigh-app claim has an inline path:line citation, the forbidden-in-core list is named in full and routed, and the git diff shows only the new design doc?",
"verdict": "",
"executor_note": ""
}
],
"tasks": [
{
"id": "T1",
"description": "Verify the true current shape of reigh-app/src/tools/video-editor/. Run Glob to inventory the full tree. Read every file in the plan's Step 1 read list (data/DataProvider.ts, data/SupabaseDataProvider.ts, contexts/DataProviderContext.tsx, contexts/VideoEditorProvider.tsx, hooks/useTimelineQueries.ts, useTimelinesList.ts, useTimelinePersistence.ts, useTimelineRealtime.ts, useTimelineSync.ts, useTimelineHistory.ts, useAssetOperations.ts, timelineStore.ts, lib/timeline-data.ts, lib/external-drop-utils.ts, types/index.ts, types/timeline-canvas.ts, types/agent-session.ts, lib/serialize.ts, lib/config-utils.ts, lib/defaults.ts, compositions/*.tsx, effects/DynamicEffectRegistry.ts, components/TimelineEditor/TimelineEditor.tsx, TimelineCanvas.tsx, ShotGroupContextMenu.tsx, ShotGroupOverlay.tsx, components/PreviewPanel/RemotionPreview.tsx, components/PropertiesPanel/, components/CompactPreview.tsx, VideoEditorShell.tsx, VideoEditorLightboxOverlay.tsx, components/AgentChat/, pages/VideoEditorPage.tsx, hooks/useClientRender.ts, useRenderState.ts, useTimelineState.ts, useActiveTaskClips.ts, useFinalVideoAvailable.ts, useAgentSession.ts, useVideoEditorLightboxNavigation.ts, lib/render-bounds.ts, timeline-scale.ts, resolve-overlaps.ts, duplicate-clip.ts, mediaMetadata.ts, interaction-state.ts, snap-edges.ts, settings/videoEditorDefaults.ts, useEditorSettings.ts, registration.test.ts, plus pinnedShotGroups callers: lib/pinned-group-projection.ts, hooks/useTimelineCommit.ts, useShotGroups.ts, useTimelineTrackManagement.ts, plus the related test files). Grep for DataProvider callers across reigh-app to confirm the full method surface. Grep for external imports of TimelineEditor.tsx. Grep for pinnedShotGroups reads/writes to confirm the caller set for the compatibility recipe. Confirm output path reigh-workspace/docs/video-editor-extraction-design.md is empty/free; create docs/ if missing. If any read is blocked by sandbox, halt and surface to user before writing the doc. Build a per-section citation cheatsheet keyed by path:line for use in subsequent tasks.",
"depends_on": [],
"status": "done",
"executor_notes": "Verified access to /Users/user_c042661f/Documents/reigh-workspace; inventoried the full reigh-app/src/tools/video-editor/ tree; confirmed /Users/user_c042661f/Documents/reigh-workspace/docs/video-editor-extraction-design.md is free; and created a line-anchored citation cheatsheet at /Users/user_c042661f/Documents/megaplan/.megaplan/plans/design-plan-to-extract-the-20260419-1637/t1-citation-cheatsheet.md. Read the Step-1 file set plus related video-editor tests through a 120-file numbered dump and direct inspections of the key modules. Confirmed the canonical anchors required for later sections: data/DataProvider.ts:53-71, types/index.ts:181-186, lib/serialize.ts:98-122, and hooks/useTimelineRealtime.ts:29-43. Greps also confirmed the current DataProvider method caller surface, external TimelineEditor importers, and the broader pinnedShotGroups caller/test cluster. No sandbox read block occurred.",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": "",
"sections_written": []
},
{
"id": "T2",
"description": "Create /Users/user_c042661f/Documents/reigh-workspace/docs/video-editor-extraction-design.md. Write the front matter + executive summary (\u2264 1 page: problem, thesis, who benefits, explicit non-goals such as 'not a full NLE replacement') and a numbered table of contents that enumerates ALL fourteen pass_to_pass sections from the brief, organized into Part A (OSS contributors) / Part B (reigh engineers) / Part C (both) / Appendix with audience labels per part. Tone: engineering design doc, no emoji.",
"depends_on": [
"T1"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T3",
"description": "Append Part A \u2014 sections 1 (Package layout) and 2 (Per-split rationale). Write the package-layout table with columns: package, responsibility, public exports, peer deps, out-of-scope. Cover schema / engine / editor / cli. Include explicit dependency arrows (cli \u2192 engine \u2192 schema; editor \u2192 engine \u2192 schema). Document why engine is pure (SSR/CLI parity), why editor uses ports-and-adapters, why CLI is separate. Place the effect registry decision (recommend packages/engine for headless-CLI parity) here with rationale and a citation to effects/DynamicEffectRegistry.ts. Surface package-name as @tbd/* placeholder TODO.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T4",
"description": "Append Part A \u2014 port interfaces section. Write one subsection each for DataProvider, AssetResolver, MediaPicker, Exporter, HostContext. For each: TS interface signature, error semantics, optional-method flags (?:), in-memory default description (what it does/doesn't support \u2014 e.g., in-memory DataProvider loses data on reload). DataProvider MUST include a method-by-method gap table (columns: method, current signature in data/DataProvider.ts:LINE, proposed OSS signature, status [UNCHANGED / RENAMED / ADDED / REMOVED]) covering load/save/list/delete plus optional saveCheckpoint, loadCheckpoints, uploadAsset, registerAsset, resolveAssetUrl, waveform getters, profile getters. subscribe(timelineId) MUST be marked ADDED (new design) with an inline citation to hooks/useTimelineRealtime.ts:LINE showing the current realtimeEventProcessor + React Query cache-invalidation mechanism (note that the existing DataProvider interface has no subscribe method). Anchor MediaPicker on components/VideoEditorLightboxOverlay.tsx, Exporter on hooks/useClientRender.ts + useRenderState.ts + useTimelineState.ts + VideoEditorShell.tsx, HostContext on settings/videoEditorDefaults.ts + useEditorSettings.ts. Address the open conventions flag: explicitly state whether the package exposes a provider-plus-shell pair (matching today's propless <TimelineEditor /> reading from TimelineStoreProvider) or redesigns to a prop-driven shell, with rationale anchored on hooks/timelineStore.ts slice exposure.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T5",
"description": "Append Part A \u2014 timeline JSON format spec. Specify: version: 1 field, zod shape summary (top-level TimelineConfig + Track + Clip), JSON Schema export, migration function contract migrate(prev: unknown, fromVersion: number) => TimelineConfig with error semantics. State the core-vs-app-extension namespace rule: a single app: Record<string, unknown> key at top-level / clip / track is reserved for host extensions; unknown keys OUTSIDE app remain rejected. State the forward-compat rule explicitly. Then write the reconciliation subsection: cite lib/serialize.ts:LINE showing current rejection of unexpected keys, then specify Option A (chosen) \u2014 whitelist a single app key at top-level/clip/track in lib/serialize.ts. List Option B (full loosening) and explain why it was NOT chosen. Then write the pinnedShotGroups migration subsection: cite types/index.ts:LINE showing the field exists, state that v1 OSS schema removes it from core, and the v0\u2192v1 migration function relocates it to app['x-reigh'].pinnedShotGroups (namespaced convention, NOT a top-level reigh key). State the round-trip invariant for legacy configs.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T6",
"description": "Append Part A \u2014 sections 6 through 9 (OSS repo structure, OSS polish checklist, CLI spec, test strategy). Repo structure: pnpm workspaces + Turborepo tree as ASCII (packages/schema, packages/engine, packages/editor, packages/cli, examples/local-json, examples/custom-backend, examples/headless-render, apps/playground, apps/docs) with one-line rationale per entry. CI outline: lint, typecheck, test, build, changesets release. OSS polish checklist: MIT license + a DEDICATED 'Remotion Licensing' subsection (not a footnote) explaining Remotion's commercial-license terms, the team-size threshold, what adopters must verify, and a README warning template; pristine TS rules (no any, strict mode), tree-shakeable ESM-first with CJS fallback, sourcemaps, narrow package.json#exports example. Surface GitHub org + Remotion version pin as TODO placeholders. CLI spec: invocation npx <name> render <timeline.json> <out.mp4>, flags --fps, --width, --height, --codec, --concurrency, --asset-root, --quality, exit codes (0 success, 1 schema invalid, 2 asset missing, 3 render failure), default AssetResolver behavior (resolves relative paths against --asset-root, defaulting to CWD). Test strategy: map every existing pure-logic test (render-bounds, timeline-scale, duplicate-clip, config-utils, mediaMetadata, interaction-state, editor-utils, resolve-overlaps, snap-edges) to a destination package; identify which become integration tests in reigh-app (Supabase-backed DataProvider adapter); identify new port-contract tests using in-memory defaults. Address open verification flag: explicitly name the pinnedShotGroups compatibility test cluster (serialize.test.ts, migrate.test.ts, timeline-save-utils.test.ts, pinned-group-projection.test.ts, useTimelineCommit.test.tsx, useClipEditing.test.ts, useClipDrag.test.tsx, useTimelineTrackManagement.test.ts) as the verification gate for the pre-extraction migration step.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T7",
"description": "Append Part B \u2014 sections 1 and 2 (forbidden-in-core list + file/folder migration table). Write the forbidden-in-core list with one-line reason per item, covering all of: shot groups (incl. pinnedShotGroups), generation assets, AgentChat, task-based export, Supabase, auth, projectId, MediaLightbox, project selection, shots context, VideoGenerationModal, generation duplication, final-video availability, stale-variant handling, active-task tracking. Each item routes to either a port name or an app-level extension. Then write the migration table with columns: path | decision (MOVE/STAY/SPLIT) | destination | notes. Cover EVERY top-level folder under video-editor/ (compositions, components, contexts, data, effects, hooks, lib, pages, settings, types) plus top-level registration.test.ts. Mandatory rows include all entries from the plan's Step 4.2 \u2014 explicitly classify: data/DataProvider.ts (SPLIT \u2014 interface to packages/editor), data/SupabaseDataProvider.ts (STAY \u2014 rehome to reigh-app/src/tools/video-editor-host/), pages/VideoEditorPage.tsx (STAY), contexts/DataProviderContext.tsx (SPLIT), contexts/VideoEditorProvider.tsx (STAY \u2014 host bootstrap), components/VideoEditorShell.tsx (SPLIT), components/TimelineEditor/TimelineEditor.tsx (SPLIT \u2014 forbidden imports become extension slots), TimelineCanvas.tsx (MOVE \u2014 expose slots), ShotGroupContextMenu.tsx and ShotGroupOverlay.tsx (STAY), components/PreviewPanel/RemotionPreview.tsx (MOVE), components/PropertiesPanel/** (SPLIT per-file), components/CompactPreview.tsx (decide per-file), components/AgentChat/** (STAY), VideoEditorLightboxOverlay.tsx (STAY), all named hooks per the plan, lib/serialize.ts (MOVE to packages/schema with app whitelist), lib/config-utils.ts, lib/defaults.ts (MOVE), lib/render-bounds.ts, timeline-scale.ts, snap-edges.ts (MOVE), lib/resolve-overlaps.ts, duplicate-clip.ts, interaction-state.ts, mediaMetadata.ts, editor-utils.ts (MOVE to packages/editor), lib/timeline-data.ts, external-drop-utils.ts (STAY), settings/videoEditorDefaults.ts (SPLIT), useEditorSettings.ts (STAY), types/index.ts (SPLIT \u2014 with pinnedShotGroups migrated out), types/timeline-canvas.ts (MOVE), types/agent-session.ts (STAY), registration.test.ts (STAY).",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T8",
"description": "Append Part B \u2014 sections 3 and 4 (host-touchpoint mapping + reference Supabase adapter). Write the host-touchpoint mapping table with columns: touchpoint | current location (file:line) | new home (port name or app extension) | what extracted package exposes. MUST cover all 21 items: Supabase persistence, auth, projectId, MediaLightbox, AgentChat, task-based export, shot groups (incl. pinnedShotGroups), generation assets, project selection, shots context, VideoGenerationModal, generation duplication, final-video availability, stale-variant handling, active-task tracking, checkpoints, asset upload/register, resolveAssetUrl, waveform, profile, realtime subscription (flagged as new port capability). Then write the reference adapter section: anchor on data/SupabaseDataProvider.ts as the canonical adapter (cite path:line for class definition), name contexts/VideoEditorProvider.tsx as the bootstrap/host-wiring example, and EXPLICITLY label useTimelineQueries.ts / useTimelineRealtime.ts / useTimelinePersistence.ts as layered helpers (not the adapter). Sketch the post-migration layout in reigh-app/src/tools/video-editor-host/.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T9",
"description": "Append Part B \u2014 sections 5 through 8 (extension pattern + import shapes + Order of Operations + sync strategy). Extension pattern: extensions subscribe to the editor's public store and render via renderOverlay / panels / contextMenu slots; document the public store API surface needed (using hooks/timelineStore.ts slice list as anchor \u2014 data, ops, chrome, playback). Show before/after import shapes for 4 representative files: pages/VideoEditorPage.tsx, a host adapter file, an extension component (e.g., ShotGroupOverlay), and a pure-logic test. Order of Operations as a NUMBERED sequence (not prose) with rollback per step: STEP 1 (pre-extraction) is the serializer + pinnedShotGroups migration \u2014 and this step MUST spell out the FIVE-STAGE compatibility recipe: (a) add getPinnedShotGroups(config) and setPinnedShotGroups(config, value) helpers that DUAL-READ from both legacy config.pinnedShotGroups and new config.app?.['x-reigh']?.pinnedShotGroups (preferring new when present); (b) update all callers to use the helpers, naming the minimum set: hooks/useTimelineCommit.ts, lib/pinned-group-projection.ts, hooks/useShotGroups.ts, components/TimelineEditor/TimelineEditor.tsx, hooks/useTimelineTrackManagement.ts, lib/serialize.ts; (c) flip writers (serializer + runtime) to emit to the new location; (d) add a one-shot migration in lib/serialize.ts / lib/config-utils.ts that rewrites legacy inputs on load; (e) update tests, naming the minimum set: serialize.test.ts, migrate.test.ts, timeline-save-utils.test.ts, useTimelineCommit.test.tsx, useClipEditing.test.ts, useClipDrag.test.tsx, useTimelineTrackManagement.test.ts; then after a stable interval, remove the legacy pinnedShotGroups field. Rollback for STEP 1: revert via dual-read fallback (helpers still read legacy). Subsequent steps: STEP 2 extract schema package (tsconfig path alias; rollback: revert path alias, keep in-tree copy), STEP 3 extract engine (rollback: same), STEP 4 extract editor (rollback: same), STEP 5 flip reigh to workspace:* / file: linking + validate (rollback: revert link-flip, keep old in-tree copy), STEP 6 publish v0.1, STEP 7 flip reigh to npm (rollback: pin file: link). Sync strategy: option analysis table (subtree split / submodule / file: link / dual-commit) with tradeoffs and a recommendation.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T10",
"description": "Append Part C \u2014 Open Questions and Risks. Cover all four required: (a) Remotion company-license implications for downstream consumers (team-size threshold, what to surface in README, what adopters must verify); (b) pre-1.0 schema stability commitment (proposal: additive-only within a major; breaking changes ship with a migration fn; deprecation window); (c) repo-sync strategy during transition (linked back to Part B section 4.8); (d) engine renderer abstraction tradeoff \u2014 keep Remotion-specific in v1 with documented trigger for revisiting (second renderer need); recommendation with criteria. Plus other risks: dependency drift between extracted repo and reigh-app, effect-registry ABI stability, post-move test-coverage gaps, serializer regressions on legacy configs, DataProvider optional-method compatibility for downstream adopters, example drift.",
"depends_on": [
"T2"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
},
{
"id": "T11",
"description": "Append Appendix (glossary defining TimelineConfig, port, adapter, extension, HostContext; file-references list of every reigh-app file cited in the doc) and run a final self-review pass over the complete document. Self-review checklist: (1) every fourteen pass_to_pass sections is concretely covered; (2) every claim about current reigh-app code has an inline path:line citation \u2014 randomly sample 5 to verify each points to supporting content; (3) the forbidden-in-core list is named in full and each item is routed to a port or app-level extension; (4) the migration table covers every folder under video-editor/ AND every file named in success criteria #10; (5) the host-touchpoint table covers all 21 items; (6) DataProvider port spec covers every method on data/DataProvider.ts with a gap table; (7) subscribe(timelineId) is labeled as new design with citation to current realtime mechanism; (8) timeline JSON spec states both the serializer app-whitelist and the pinnedShotGroups \u2192 app['x-reigh'] migration; (9) Order of Operations Step 1 enumerates the FIVE-STAGE pinnedShotGroups compatibility recipe with the named caller and test files; (10) reference adapter section anchors on data/SupabaseDataProvider.ts and names contexts/VideoEditorProvider.tsx as bootstrap with hooks labeled as layered helpers; (11) Remotion licensing is a dedicated subsection; (12) tone is engineering design (no emoji, tables/signatures over prose); (13) audience-labeled parts are distinct; (14) TOC links to all sections. Then run git status and git diff --stat in /Users/user_c042661f/Documents/reigh-workspace to confirm only the new doc (and possibly the new docs/ directory) appears in the diff. If anything else changed, revert it. Fix any gaps surfaced by the self-review before declaring done.",
"depends_on": [
"T3",
"T4",
"T5",
"T6",
"T7",
"T8",
"T9",
"T10"
],
"status": "pending",
"executor_notes": "",
"files_changed": [],
"commands_run": [],
"evidence_files": [],
"reviewer_verdict": ""
}
],
"validation": {
"plan_steps_covered": [
{
"plan_step_summary": "Step 1: Verify the true current shape \u2014 inventory tree, read full file list, grep DataProvider callers + TimelineEditor importers + pinnedShotGroups callers, confirm output path",
"finalize_task_ids": [
"T1"
]
},
{
"plan_step_summary": "Step 2: Draft executive summary (\u2264 1 page) and numbered TOC covering all fourteen pass_to_pass sections",
"finalize_task_ids": [
"T2"
]
},
{
"plan_step_summary": "Step 3.1\u20133.2: Part A package layout table + per-split rationale + effect registry placement",
"finalize_task_ids": [
"T3"
]
},
{
"plan_step_summary": "Step 3.2 (ports) + 3.5 (effect registry placement noted in T3): Port interface subsections (DataProvider, AssetResolver, MediaPicker, Exporter, HostContext) with TS signatures, error semantics, optional flags, in-memory defaults, DataProvider gap table, subscribe-as-new-design labeling",
"finalize_task_ids": [
"T4"
]
},
{
"plan_step_summary": "Step 3.3: Timeline JSON format spec with version, zod shape, migration contract, app-namespace rule, forward-compat, serializer Option-A reconciliation, pinnedShotGroups \u2192 app['x-reigh'] migration",
"finalize_task_ids": [
"T5"
]
},
{
"plan_step_summary": "Step 3.5\u20133.9: OSS repo structure (pnpm + Turborepo tree, CI), OSS polish checklist with Remotion license subsection, CLI spec (flags + exit codes + default AssetResolver), test strategy mapping every existing pure-logic test plus the pinnedShotGroups verification cluster",
"finalize_task_ids": [
"T6"
]
},
{
"plan_step_summary": "Step 4.1\u20134.2: Part B forbidden-in-core list and full file/folder migration table covering every folder + the named files from success criterion #10",
"finalize_task_ids": [
"T7"
]
},
{
"plan_step_summary": "Step 4.3\u20134.4: Host-touchpoint mapping table (21 items) and reference Supabase adapter section anchored on data/SupabaseDataProvider.ts with VideoEditorProvider as bootstrap",
"finalize_task_ids": [
"T8"
]
},
{
"plan_step_summary": "Step 4.5\u20134.8: Extension pattern, before/after import shapes, numbered Order of Operations with FIVE-STAGE pinnedShotGroups compatibility recipe at Step 1 (per accepted-tradeoff), per-step rollback, sync-strategy option analysis",
"finalize_task_ids": [
"T9"
]
},
{
"plan_step_summary": "Step 5: Part C open questions and risks (Remotion license, pre-1.0 schema stability, repo-sync, engine renderer abstraction, plus other risks)",
"finalize_task_ids": [
"T10"
]
},
{
"plan_step_summary": "Step 6: Appendix (glossary, file references) plus final self-review against all pass_to_pass sections, citation sampling, repo-diff verification",
"finalize_task_ids": [
"T11"
]
}
],
"orphan_tasks": [],
"completeness_notes": "All 6 plan steps mapped. Plan Step 3 is large (sub-steps 3.1\u20133.9) and is split across T3 (layout), T4 (ports), T5 (schema), T6 (repo + polish + CLI + tests) for proportional task sizing. Plan Step 4 is similarly large (sub-steps 4.1\u20134.8) and split across T7, T8, T9. The accepted-tradeoff for FLAG-004/correctness (pinnedShotGroups compat recipe) is woven into T9's description at the Order of Operations Step 1 level, with the named caller/test files explicit. The two open minor flags (conventions re: provider-vs-prop-driven shell; verification re: pinnedShotGroups test cluster) are addressed inside T4 and T6 respectively. T1 is a single research task; T11 is a single appendix-plus-review task \u2014 both proportional. No orphan tasks.",
"coverage_complete": true
}
}