Fix the video editor's OverlayEditor (preview drag/resize) system. Three issues: (1) Moving a clip on the preview changes its aspect ratio/shape when it should maintain dimensions — only corner resize should change size. (2) Need edge dragging for cropping (left/right/top/bottom edges crop the clip) vs corner dragging for resize. (3) Ghost/shadow artifact when dragging clips on the timeline — something visual lingers until drop. Investigate whether these are symptomatic of poor structure in OverlayEditor.tsx and related code, or just incremental fixes. Goal: make preview overlay interactions predictable and clean — move preserves shape, corners resize, edges crop, no visual artifacts.
The OverlayEditor (src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx) handles preview-canvas clip manipulation (move, resize). Three bugs need fixing, one of which is a critical string-matching error, one is a new feature (edge crop), and one is a DOM cleanup issue in timeline drag.
Key finding: The DragMode type is 'move' | 'resize-nw' | 'resize-ne' | 'resize-sw' | 'resize-se' and the drag handler uses state.mode.includes('e') etc. to detect resize directions. But 'move'.includes('e') is true because the string "move" contains the letter "e". This causes every move operation to also apply east-resize logic, changing the clip's width.
Secondary finding: Drag deltas are computed in screen pixels (event.clientX - startMouseX) but applied directly to composition-space coordinates. This means move/resize speed doesn't match cursor speed when the preview is scaled.
Crop feature: No crop data model exists yet. ClipMeta and TimelineClip have no crop fields. This requires type additions, new edge handles in the overlay, and Remotion composition support.
Step 1: Fix the string-matching bug (OverlayEditor.tsx:219-232)
Scope: Small — the root cause of issue #1.
Replace the / / / checks with exact suffix/prefix matching. The modes are , , , . Use , , , — or better, guard all resize branches with first, then use .
Assistant
User
Assistant
{"flags":[{"id":"crop-persistence-misses-serialization-path","concern":"Step 4 still understates the crop round-trip work. Adding crop fields to the types, ClipMeta, and TIMELINE_CLIP_FIELDS is not enough unless timeline-data.ts also copies those values in both directions.","category":"completeness","severity_hint":"likely-significant","evidence":" () explicitly copies persisted clip fields into editor meta, and explicitly copies meta fields back into serialized clips. The revised step names , but its substeps only mention the interface addition, not these two mapping sites. If they are missed, crop will not load back into editor state or save back out correctly."},{"id":"crop-reset-path-not-covered","concern":"The crop feature plan does not update the existing reset path, so will leave crop behind and the editor state will remain visually altered after a reset.","category":"completeness","severity_hint":"likely-minor","evidence":"The current reset action only clears , , , and in , and the Position tab still exposes that action in . Once crop becomes part of overlay geometry, this path needs to clear too."},{"id":"plan-step-file-references-incomplete","concern":"Structural formatting: the validator warning is still valid because not every step section includes a file reference, and several steps are still prose rather than numbered substeps.","category":"completeness","severity_hint":"likely-minor","evidence":"The plan now has the required H1, Overview, phases, and execution order, but has no file reference, and steps such as 1, 3, 6, and 7 are not written as numbered substeps. That is still below the requested step format even though the plan is otherwise actionable."}],"verified_flag_ids":["crop-approach-understates-structure","over-engineering-ghost-cleanup-root-cause"],"disputed_flag_ids":[]}
state.mode.includes('e')
's'
'w'
'n'
'resize-nw'
'resize-ne'
'resize-sw'
'resize-se'
state.mode.endsWith('e')
state.mode.endsWith('w')
state.mode.startsWith('resize-n')
state.mode.startsWith('resize-s')
state.mode !== 'move'
includes
typescript
// Before (buggy):
if (state.mode.includes('e')) { ... }
// After (option A — clearest):
if (state.mode !== 'move') {
if (state.mode.includes('e')) { ... }
if (state.mode.includes('s')) { ... }
if (state.mode.includes('w')) { ... }
if (state.mode.includes('n')) { ... }
}
Validate by moving a clip and confirming width/height remain unchanged in the committed patch.
Scope: Small — secondary bug causing move/resize to feel sluggish or fast depending on zoom.
Convert screen-space deltas to composition-space before applying to bounds. The conversion factor is compositionWidth / layout.width for X and compositionHeight / layout.height for Y.
Challenge:layout is React state, but the mousemove handler is set up in a useEffect. Need to either capture layout in a ref or compute the scale at drag start and store it in dragState. Storing scaleX/scaleY in the dragState ref (computed at startDrag time from current layout) is cleanest — avoids stale closures.
Update startDrag (OverlayEditor.tsx:249-262) to capture scaleX/scaleY in the dragState ref. Update the dragState type to include these fields.
Step 3: Validate move and resize behavior
Scope: Small
Test manually: Move a clip — should translate 1:1 with cursor, width/height unchanged.
Test manually: Corner-resize — should scale width/height, position anchored at opposite corner.
Regression check: Text clip move/resize, text editing double-click still works.
Phase 2: Add Edge Crop Handles
Step 4: Add crop fields to data model (types/index.ts, lib/timeline-data.ts)
Scope: Small
Add optional crop fields to TimelineClip (types/index.ts:61-83) and ClipMeta (lib/timeline-data.ts:26-46):
typescript
cropTop?: number; // 0-1, fraction of original to remove
cropBottom?: number;
cropLeft?: number;
cropRight?: number;
Update the ClipMeta ↔ TimelineClip mapping in timeline-data.ts to pass crop fields through.
Step 5: Add edge drag modes and handles (OverlayEditor.tsx)
Scope: Medium
Extend DragMode to include 'crop-n' | 'crop-s' | 'crop-e' | 'crop-w'.
Add edge handle elements — 4 invisible hit areas along each edge (e.g., 6px wide strips), with a visible line indicator on hover. Render these alongside the existing corner handles inside the overlay button.
Add crop drag logic in the onMouseMove handler. Edge drags modify cropTop/cropBottom/cropLeft/cropRight rather than position/size. The visual bounds should shrink from the dragged edge inward.
Commit crop values via onOverlayChange in commitDragChange, same as move/resize.
Step 6: Wire crop into Remotion rendering
Scope: Medium
Find the Remotion composition component that renders clips (likely in compositions/).
Apply crop values as CSS clip-path: inset(...) or by adjusting the clip's container/overflow: hidden with offset positioning. clip-path: inset(top right bottom left) is the simplest approach.
Ensure crop values are respected in both preview and final render.
Step 7: Validate crop interactions
Scope: Small
Test: Drag left edge inward — clip should visually shrink from left, revealing background.
Test: Crop + move combination — crop is relative to clip, not canvas.
Test: Crop persists across save/load (check serialization round-trip).
useTimelineEditing.ts: onTimelineDragLeave (line 650), onTimelineDrop (line 657). Both call clearDropIndicator.
Identify the gap: If a drag starts but the dragover event sequence is interrupted (e.g., dropping outside the timeline, pressing Escape, or the component unmounting mid-drag), indicators may orphan because:
HTML5 dragleave fires on the element boundary but may not fire if the drop happens on a child element or outside the window.
useClipDrag appends elements to document.body — if the effect cleanup runs (line 431) it calls clearSession(dragSessionRef.current) which should clean up, BUT if dragSessionRef.current is already null (because handlePointerUp cleared it), the orphaned DOM nodes from a previous session won't be found.
Specific suspects:
The deferDeactivate path (line 157-162) delays cleanup by one RAF — if a new drag starts in that window, the old ghost could linger.
clearDropIndicators (line 121) removes indicator elements but only nulls session.indicator — if the session ref is already cleared, the DOM nodes are leaked.
Step 9: Harden cleanup (useClipDrag.ts)
Scope: Small
Add a safety sweep — before creating new indicators, query and remove any stale drop-indicator-* and cross-track-ghost elements from document.body. This is a defensive pattern for DOM elements appended outside React's tree.
typescript
// At the start of ensureIndicator or handlePointerDown:
document.querySelectorAll('.cross-track-ghost, .drop-indicator-row, .drop-indicator-line, .drop-indicator-ghost, .drop-indicator-label')
.forEach(el => el.remove());
Also clean up in useTimelineEditing.tsensureDropIndicator — before creating a new indicator root, remove any stale [data-drop-indicator] elements.
Add effect cleanup in useTimelineEditing.ts — the clearDropIndicator call should also run on unmount if it isn't already.
Step 10: Validate ghost cleanup
Scope: Small
Test: Drag a clip on the timeline, drop it — no visual remnants.
Test: Start dragging, press Escape or blur window — no lingering ghost.
Test: Rapid drag-and-drop sequences — no accumulation of stale elements.
Execution Order
Phase 1 first (Steps 1-3) — fixes the most impactful user-facing bug with minimal risk.
Phase 3 next (Steps 8-10) — ghost fix is small and independent.
Phase 2 last (Steps 4-7) — crop is a new feature with the largest surface area.
Validation Order
Steps 1-2: manual test of move (shape preserved, 1:1 cursor tracking).
Step 9: manual test of timeline drag (no ghost artifacts).
Steps 5-7: manual test of edge crop (visual + serialization).
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-03-25T17:36:27Z",
"hash": "sha256:2131157d34ae31f210a3798154f419c5aa3850d90b13a51fb0f9a3f7f2271107",
"questions": [
"For edge-crop (issue #2): Should crop be destructive (permanently remove pixels from the clip bounds) or non-destructive (store crop offsets separately so the original can be restored)? The plan assumes non-destructive with separate cropTop/cropBottom/cropLeft/cropRight fields.",
"For edge-crop rendering: Should the cropped area be fully hidden, or should it show a dimmed/semi-transparent preview of the cropped region while dragging (like Premiere Pro's crop effect)?",
"For the ghost artifact (issue #3): Can you describe when exactly it happens \u2014 is it on internal clip drag (reordering within timeline), external drag-drop (dragging a file/asset onto timeline), or both? This affects which cleanup code path to focus on."
],
"success_criteria": [
"Moving a clip on the preview canvas translates it without changing its width or height",
"Cursor movement maps 1:1 to clip movement regardless of preview zoom level",
"Corner resize handles change clip dimensions as expected",
"Edge handles crop the clip from the corresponding side (if crop feature is implemented)",
"No ghost/shadow DOM elements linger after any drag operation on the timeline",
"Rapid drag sequences and edge cases (blur, Escape, drop-outside) leave no orphaned DOM nodes",
"Existing overlay interactions (text editing, double-click, selection) remain functional"
],
"assumptions": [
"Crop will be non-destructive \u2014 stored as separate fields (cropTop/Right/Bottom/Left as 0-1 fractions), not by mutating x/y/width/height",
"Crop will be rendered via CSS clip-path: inset() in both preview and Remotion final render",
"The ghost artifact is caused by DOM element leaks in useClipDrag.ts cleanup paths, not a CSS/rendering issue \u2014 will verify during audit",
"The coordinate-space mismatch (screen pixels applied to composition coordinates) is a real bug causing incorrect drag speed, not just a theoretical concern",
"Edge crop handles are for media clips only \u2014 text clips don't need crop handles"
],
"structure_warnings": [
"Each step section should reference at least one file in backticks."
]
}
code
Plan structure warnings from validator:
[
"Each step section should reference at least one file in backticks."
]
code
Existing flags:
[]
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered step sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`.
- Missing required sections or step coverage (for example: no H1, no `## Overview`, or no step sections at all) should be flagged as category `completeness` with severity_hint `likely-significant`.
- Structural formatting within steps (for example: prose instead of numbered substeps, or a missing file reference inside an otherwise actionable step) should usually be category `completeness` with severity_hint `likely-minor` because the executor can still follow the instructions.
- Ask whether the plan is the simplest approach that solves the stated problem, whether it could use fewer steps or less machinery, and whether it introduces unnecessary complexity.
- Over-engineering concerns should use category `maintainability`, should usually prefix the concern with "Over-engineering:", and should scale severity_hint to the practical impact.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.
{"flags":[{"id":"crop-approach-understates-structure","concern":"Step 5/6 treats edge cropping as a handle-and-renderer tweak, but the current preview/render path only models a single rectangle per clip. Non-destructive crop needs a separate visible crop box and underlying media frame/offset, so this is a structural change, not just incremental drag logic.","category":"correctness","severity_hint":"likely-significant","evidence":"src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx:24-25 defines one OverlayBounds shape, :46-55 stores only that shape in drag state, and :188-197 commits it straight to onOverlayChange. src/tools/video-editor/compositions/VisualClip.tsx:15-46 then renders that same box directly as the media element style. There is no existing representation for 'cropped viewport inside original media'."},{"id":"crop-persistence-misses-serialization-path","concern":"Step 4 does not cover the actual persistence whitelist, so adding crop fields only to TimelineClip and ClipMeta would not survive the repository’s config round-trip.","category":"completeness","severity_hint":"likely-significant","evidence":"src/tools/video-editor/lib/serialize.ts:8-30 defines TIMELINE_CLIP_FIELDS, and :94-106 rejects any clip keys outside that list. src/tools/video-editor/lib/timeline-data.ts:234-291 also serializes clips by iterating that same whitelist. Without updating those paths, crop fields will be dropped or fail validation."},{"id":"over-engineering-ghost-cleanup-root-cause","concern":"Over-engineering: the ghost-artifact phase assumes leaked DOM nodes and proposes document-wide cleanup sweeps before proving a missing cleanup path. The repository already centralizes indicator teardown, so the plan should first verify whether the artifact is actually stale DOM, duplicate indicator systems, or base timeline styling.","category":"maintainability","severity_hint":"likely-significant","evidence":"Internal drag teardown already runs through clearDropIndicators/clearSession in src/tools/video-editor/hooks/useClipDrag.ts:121-166 and on pointerup, pointercancel, blur, and effect cleanup in :353-432. External drag indicator teardown already exists in src/tools/video-editor/hooks/useTimelineEditing.ts:196-204, :234-238, and :650-662. At the same time, the repo has two separate indicator implementations plus .timeline-editor-action:active styling in src/tools/video-editor/components/TimelineEditor/timeline-overrides.css:20-23 and :25-83, which could also explain the lingering visual."},{"id":"plan-step-file-references-incomplete","concern":"Structural formatting: the validator warning is still valid because not every step section includes a file reference.","category":"completeness","severity_hint":"likely-minor","evidence":"The plan has file references in most implementation steps, but the validation-only sections for Step 3, Step 7, and Step 10 are written without backticked file references, so it still misses the requested per-step format."}],"verified_flag_ids":[],"disputed_flag_ids":[]}
You are an independent reviewer. Critique the plan against the actual repository.
Fix the video editor's OverlayEditor (preview drag/resize) system. Three issues: (1) Moving a clip on the preview changes its aspect ratio/shape when it should maintain dimensions — only corner resize should change size. (2) Need edge dragging for cropping (left/right/top/bottom edges crop the clip) vs corner dragging for resize. (3) Ghost/shadow artifact when dragging clips on the timeline — something visual lingers until drop. Investigate whether these are symptomatic of poor structure in OverlayEditor.tsx and related code, or just incremental fixes. Goal: make preview overlay interactions predictable and clean — move preserves shape, corners resize, edges crop, no visual artifacts.
User notes and answers:
T3/T4 were completely misdirected at timeline drag code. Refocus entirely on OverlayEditor.tsx preview interactions. The ghost is likely related to the drag preview rendering in OverlayEditor itself — possibly the live drag overlay (lines 327-359) or how bounds are rendered during drag. For crop UX: selected clip shows full uncropped bounds as a dimmed ghost behind the visible cropped area.
The OverlayEditor (src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx) handles preview-canvas clip manipulation (move, resize). Three issues need fixing, plus a new crop feature. All issues are within the preview overlay system, NOT the timeline.
Root cause of issue #1 (shape changes during move): Lines 215-232 use state.mode.includes('e') etc. to detect resize directions, but the checks run unconditionally after the move branch — and 'move'.includes('e') is true. So every move also triggers east-resize, changing width.
Root cause of issue #2 (ghost/shadow during drag): Lines 297-313 explicitly render a dragOriginStyle div at the start position while dragging. This dashed-border ghost shows the original bounds. Removing or rethinking this removes the lingering shadow.
Coordinate-space mismatch: Lines 211-212 compute deltas in screen pixels (event.clientX - startMouseX) but apply them directly to composition-space coordinates. Move/resize speed doesn't match cursor when preview is scaled.
New feature (edge crop): No crop data model exists. Need edge handles that crop from sides, with dimmed ghost of full uncropped area shown when clip is selected.
Phase 1: Fix Move & Resize Bugs
Step 1: Fix the string-matching bug (OverlayEditor.tsx:215-232)
Scope: Small — root cause of issue #1.
File:src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx
Guard all resize branches with state.mode !== 'move' so that the .includes() checks only run for resize modes:
typescript
// Before (buggy — 'move'.includes('e') is true):
if (state.mode === 'move') { ... }
if (state.mode.includes('e')) { ... } // fires during move!
// After:
if (state.mode === 'move') {
nextBounds.x += deltaX;
nextBounds.y += deltaY;
} else {
if (state.mode.includes('e')) { nextBounds.width = ... }
if (state.mode.includes('s')) { nextBounds.height = ... }
if (state.mode.includes('w')) { nextBounds.x = ...; nextBounds.width = ... }
if (state.mode.includes('n')) { nextBounds.y = ...; nextBounds.height = ... }
}
This ensures 1:1 cursor tracking at any preview zoom level.
Step 3: Remove/fix the drag origin ghost (OverlayEditor.tsx:297-313)
Scope: Small — root cause of issue #3 (shadow lingering during drag).
File:src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx
Lines 297-313 render a dashed-border div at the clip's original position during drag. This is the "shadow" the user sees. For basic move/resize, remove this ghost entirely — it adds visual noise without value. Later (Phase 2), repurpose this concept for crop: show the full uncropped bounds as a dimmed ghost only when a cropped clip is selected.
Remove dragOriginStyle computation (lines 297-302) and the {dragOriginStyle && ...} JSX (lines 309-313).
Phase 2: Add Edge Crop
Step 4: Add crop fields to data model
Scope: Small
Files:src/tools/video-editor/types/index.ts, src/tools/video-editor/lib/timeline-data.ts, src/tools/video-editor/lib/serialize.ts
Add to TimelineClip type (types/index.ts:61-83):
typescript
cropTop?: number; // 0-1, fraction of clip to crop from top
cropBottom?: number;
cropLeft?: number;
cropRight?: number;
Add same fields to ClipMeta interface (timeline-data.ts:26-46).
CRITICAL: Add 'cropTop', 'cropBottom', 'cropLeft', 'cropRight' to TIMELINE_CLIP_FIELDS whitelist (serialize.ts:8-30). Without this, crop values are silently dropped on save and may throw on validation.
Step 5: Add edge crop handles and drag logic (OverlayEditor.tsx)
Scope: Medium
File:src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx
Add 4 edge handle elements — invisible ~6px hit strips along each edge with visible line on hover. Only on non-text clips. Cursor: cursor-ns-resize for top/bottom, cursor-ew-resize for left/right.
Add crop drag logic in onMouseMove. Edge drags modify cropTop/cropBottom/cropLeft/cropRight as 0-1 fractions rather than position/size. Track crop values separately in dragState (not in OverlayBounds).
Commit crop values via onOverlayChange(actionId, { cropTop, cropLeft, ... }) in commitDragChange.
Update OverlayBounds/visual overlay rendering to reflect crop: when a clip has crop values, the visible overlay rectangle should be the cropped sub-region.
Step 6: Show full bounds ghost when cropped clip is selected
Scope: Small
File:src/tools/video-editor/components/PreviewPanel/OverlayEditor.tsx
When a clip with crop values is selected (not necessarily being dragged), render a dimmed ghost showing the full uncropped bounds behind the visible cropped area. This replaces the old dragOriginStyle concept with a more useful purpose. The ghost should:
Show the full original clip area with reduced opacity / dashed border
Only appear when the clip is selected AND has non-zero crop values
Disappear when the clip is deselected
Step 7: Wire crop into Remotion rendering
Scope: Small
File:src/tools/video-editor/compositions/VisualClip.tsx
Apply crop values in getClipBoxStyle (line 15-46) as CSS clip-path: inset():
This works for both preview and final Remotion render since clip-path is standard CSS.
Step 8: Validate all changes end-to-end
Scope: Small
Move a clip on preview — width/height unchanged, cursor tracks 1:1 regardless of zoom.
Corner resize — scales width/height, anchored at opposite corner.
No shadow/ghost at original position during move or resize.
Edge crop — dragging an edge inward visually crops from that side.
Selected cropped clip shows dimmed ghost of full uncropped bounds.
Deselected cropped clip shows only the cropped visible area.
Crop persists after save/load (verify serialize round-trip).
Regression: text clip move/resize, double-click to edit text, clip selection all still work.
Execution Order
T1 → T2 → T3 (sequential, same file, each builds on prior)
T4 → T5 → T6 → T7 (sequential crop feature chain)
T8 validates everything
Key Judgment Calls
T1 is highest-confidence — 'move'.includes('e') === true is definitively the bug.
T3 removes the origin ghost entirely rather than trying to fix it. The ghost concept is repurposed in T6 for crop preview, which is actually useful.
Crop uses clip-path: inset() — simplest approach, avoids restructuring the rendering pipeline. Works in both preview and final render.
Crop tracked separately from position/size — don't conflate crop fields with OverlayBounds. The overlay visual bounds shrink when cropped, but the underlying position/size remain the full clip area.
Edge handles only on non-text clips — text clips have their own editing interaction.
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-03-25T17:36:27Z",
"hash": "sha256:2131157d34ae31f210a3798154f419c5aa3850d90b13a51fb0f9a3f7f2271107",
"questions": [
"For edge-crop (issue #2): Should crop be destructive (permanently remove pixels from the clip bounds) or non-destructive (store crop offsets separately so the original can be restored)? The plan assumes non-destructive with separate cropTop/cropBottom/cropLeft/cropRight fields.",
"For edge-crop rendering: Should the cropped area be fully hidden, or should it show a dimmed/semi-transparent preview of the cropped region while dragging (like Premiere Pro's crop effect)?",
"For the ghost artifact (issue #3): Can you describe when exactly it happens \u2014 is it on internal clip drag (reordering within timeline), external drag-drop (dragging a file/asset onto timeline), or both? This affects which cleanup code path to focus on."
],
"success_criteria": [
"Moving a clip on the preview canvas translates it without changing its width or height",
"Cursor movement maps 1:1 to clip movement regardless of preview zoom level",
"Corner resize handles change clip dimensions as expected",
"Edge handles crop the clip from the corresponding side (if crop feature is implemented)",
"No ghost/shadow DOM elements linger after any drag operation on the timeline",
"Rapid drag sequences and edge cases (blur, Escape, drop-outside) leave no orphaned DOM nodes",
"Existing overlay interactions (text editing, double-click, selection) remain functional"
],
"assumptions": [
"Crop will be non-destructive \u2014 stored as separate fields (cropTop/Right/Bottom/Left as 0-1 fractions), not by mutating x/y/width/height",
"Crop will be rendered via CSS clip-path: inset() in both preview and Remotion final render",
"The ghost artifact is caused by DOM element leaks in useClipDrag.ts cleanup paths, not a CSS/rendering issue \u2014 will verify during audit",
"The coordinate-space mismatch (screen pixels applied to composition coordinates) is a real bug causing incorrect drag speed, not just a theoretical concern",
"Edge crop handles are for media clips only \u2014 text clips don't need crop handles"
],
"structure_warnings": [
"Each step section should reference at least one file in backticks."
]
}
code
Plan structure warnings from validator:
[
"Each step section should reference at least one file in backticks."
]
code
Existing flags:
[
{
"id": "crop-approach-understates-structure",
"concern": "Step 5/6 treats edge cropping as a handle-and-renderer tweak, but the current preview/render path only models a single rectangle per clip. Non-destructive crop needs a separate visible crop box and underlying media frame/offset, so this is a structural change, not just incremental drag logic.",
"status": "open",
"severity": "significant"
},
{
"id": "crop-persistence-misses-serialization-path",
"concern": "Step 4 does not cover the actual persistence whitelist, so adding crop fields only to TimelineClip and ClipMeta would not survive the repository\u2019s config round-trip.",
"status": "open",
"severity": "significant"
},
{
"id": "over-engineering-ghost-cleanup-root-cause",
"concern": "Over-engineering: the ghost-artifact phase assumes leaked DOM nodes and proposes document-wide cleanup sweeps before proving a missing cleanup path. The repository already centralizes indicator teardown, so the plan should first verify whether the artifact is actually stale DOM, duplicate indicator systems, or base timeline styling.",
"status": "open",
"severity": "significant"
},
{
"id": "plan-step-file-references-incomplete",
"concern": "Structural formatting: the validator warning is still valid because not every step section includes a file reference.",
"status": "open",
"severity": "minor"
}
]
code
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered step sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`.
- Missing required sections or step coverage (for example: no H1, no `## Overview`, or no step sections at all) should be flagged as category `completeness` with severity_hint `likely-significant`.
- Structural formatting within steps (for example: prose instead of numbered substeps, or a missing file reference inside an otherwise actionable step) should usually be category `completeness` with severity_hint `likely-minor` because the executor can still follow the instructions.
- Ask whether the plan is the simplest approach that solves the stated problem, whether it could use fewer steps or less machinery, and whether it introduces unnecessary complexity.
- Over-engineering concerns should use category `maintainability`, should usually prefix the concern with "Over-engineering:", and should scale severity_hint to the practical impact.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.