diff --git a/easy-media-track-gate/SKILL.md b/easy-media-track-gate/SKILL.md index 6a620e7..f80480d 100644 --- a/easy-media-track-gate/SKILL.md +++ b/easy-media-track-gate/SKILL.md @@ -1,25 +1,32 @@ --- name: easy-media-track-gate -description: Turn a video idea into a validated MultiTrack patch plan for ComfyUI-Easy-Media - (the `easy multiTrackEditor` / `easy multitrackProject` nodes). Use when the user wants to - plan task segments/shots on the multitrack timeline, write or extend a MultiTrack timeline, - arrange prompts, reference images, master audio or reference-video locks, regenerate one - task segment, or produce the patch plan JSON that `patch_workflow.py apply` consumes. The - scripts and references live next to this SKILL.md (the skill's install folder); run them - from the user's working folder, where all generated files are written. +description: Turn a video idea into a validated MultiTrack plan for ComfyUI-Easy-Media + (the `easy multiTrackEditor` node). Use when the user wants to plan task segments/shots + on the multitrack timeline, write or extend a MultiTrack timeline, arrange prompts, + reference images, master audio or reference-video locks, regenerate one task segment, + or produce the `prompt_override` paste payload for the multitrack editor node (plus the + optional patch plan JSON that `patch_workflow.py apply` consumes). The scripts and + references live next to this SKILL.md (the skill's install folder); run them from the + user's working folder, where all generated files are written. --- # Easy-Media Track Gate — agent procedure -Goal: produce `plan.json`, the patch plan applied to a ComfyUI workflow with the Easy-Media -node pack's own `patch_workflow.py`, in five moves: the user gives a video idea and a -segment count (or an existing workflow to edit) → you build a timeline guide (`outline.json`) -and show it for **approval** → with the approved guide you compose the task segments one at -a time (about 10 seconds each), each turn existing so that ONE segment gets a complete -prompt, the right references and the right continuity mode → the scripts verify schema, -timing and continuity across the whole chain → `build_track_plan.py` assembles the TRACK_DATA -and the patch plan at the end. Never deliver a plan that did not pass validation, and never -compose a segment from a guide the user has not approved. +Goal: produce a validated plan for the `easy multiTrackEditor` node in five moves: the user +gives a video idea and a segment count (or an existing workflow to edit) → you build a +timeline guide (`outline.json`) and show it for **approval** → with the approved guide you +compose the task segments one at a time (about 10 seconds each), each turn existing so that +ONE segment gets a complete prompt, the right references and the right continuity mode → +the scripts verify schema, timing and continuity across the whole chain → +`build_track_plan.py` assembles the deliverables at the end. The PRIMARY deliverable is +`prompt_override.json`, a `minimax_prompt_override` payload the user pastes into the +multitrack editor node's `prompt_override` input (format `MiniMax`) — the editor then +renders one clip per prompt, chained back-to-back. The patch plan (`plan.json` for the node +pack's `patch_workflow.py`) is the optional whole-workflow alternative. Never deliver a plan +that did not pass validation, and never compose a segment from a guide the user has not +approved. Never hand the user any other JSON as the paste: a non-`minimax_prompt_override` +value in `prompt_override` falls back to the editor's `|`-separated text parser and renders +the whole story as ONE clip over the entire timeline. ## Paths and Python (read first — these exact forms prevent most errors) @@ -38,14 +45,15 @@ compose a segment from a guide the user has not approved. SKILL_DIR is missing files, stop and tell the user the skill folder is incomplete. - **Never read `verify_track_rules.py`** — run it and work from its printed output. Cline's read_file is capped by hard-coded budgets that do NOT grow with the model's context - window: about 48,000 characters per read, 2,000 lines per read. The 66 KB validator + window: about 48,000 characters per read, 2,000 lines per read. The 81 KB validator arrives cut no matter how large the context window is. A truncation notice is Cline's read cap, not repo corruption — do not "fix" truncated files. `build_track_plan.py` - (~9 KB) and `references/track-schema.md` (~22 KB, 465 lines) are safe to read whole. -- **Never read back `plan.json` or `track_data.json` once real segments exist** — a - 10-segment plan passes the read caps today and exceeds them tomorrow. Validate with - `--check` and trust the one-line OK summary; the shipped `examples/plan.json` (6.8 KB) - is safe to read if you need to see the shape. + (~10 KB) and `references/track-schema.md` (~26 KB) are safe to read whole. +- **Never read back `plan.json`, `track_data.json` or `prompt_override.json` once real + segments exist** — a 10-segment plan passes the read caps today and exceeds them + tomorrow. Validate with `--check` / the `override` command and trust the one-line OK + summary; the shipped `examples/prompt_override.json` (2.5 KB) and `examples/plan.json` + (6.8 KB) are safe to read if you need to see the shape. - Cline's editor rejects writes over 6,000 characters ("Editor input too large"). A segment fragment with a rich prompt often does. NEVER write part 2 with write_to_file — it replaces the whole file and part 1 is lost. Split instead: write the first part ending @@ -61,10 +69,12 @@ compose a segment from a guide the user has not approved. ```sh py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\build_track_plan.py" --check "%USERPROFILE%\.agent\skills\easy-media-track-gate\examples\plan.json" +py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" override "%USERPROFILE%\.agent\skills\easy-media-track-gate\examples\prompt_override.json" --outline "%USERPROFILE%\.agent\skills\easy-media-track-gate\examples\outline.json" ``` -Expect the suite to print `SUITE PASS (25/25 cases)` and the second command to print -`PLAN OK` with `total_length 720 frames = 30.00s`. +Expect the suite to print `SUITE PASS (34/34 cases)` and the other two commands to print +`PLAN OK` with `total_length 720 frames = 30.00s` and `OVERRIDE OK: 3 prompts, duration 10, +total 30.00s`. ## Step 0 — Media paths come first (never invent one) @@ -128,7 +138,10 @@ Field rules the validator enforces: - `media_inventory` keys are UPPERCASE; every `file_path` is copied from Step 0 sources — this inventory is the **machine-checked verbatim source**: every segment's image items and every locked media track are diffed against it, so a retyped path fails on the spot. A - paraphrase in the inventory cannot be repaired later. + paraphrase in the inventory cannot be repaired later. Order matters too: the inventory's + image rows map to the editor's `image` input positions (``, ``, …), + audio rows to `audio` input positions, video rows to `video` input positions — the user + wires the media into those node inputs in inventory order. - `tracks.master_audio` / `tracks.reference_video` name the ONE locked audio and ONE locked video track (the schema allows at most one of each). Lock the master song for MV/lyric/ dance/beat projects, the narration track when narration drives the cut, and the reference @@ -264,23 +277,56 @@ Once every segment file passes, the merge is the continuity check: `build_track_ re-walks every fragment against the guide (ids, frames, modes, verbatim media paths, prompt rules, handoff chain), assembles the TRACK_DATA (task track from the fragments; the locked master-audio / reference-video tracks built straight from the outline), computes -`total_length`, and only then writes the deliverable. Never write the plan by hand and -never edit fragment prose during the merge. +`total_length`, builds the `minimax_prompt_override` paste payload from the same validated +fragments, and only then writes the deliverables. Never write the plan by hand and never +edit fragment prose during the merge. ```sh py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\build_track_plan.py" outline.json segment_01.json segment_02.json segment_03.json -o plan.json py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\build_track_plan.py" --check plan.json --outline outline.json +py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" override prompt_override.json --outline outline.json ``` -The merge writes `plan.json` (the patch plan) and `track_data.json` (pretty, for -inspection) and prints the delivered frames/seconds, the track list and the locked tracks. -Segment, track and image ids are stable UUIDv5 values derived from the project title, so a -re-merge keeps ids consistent. +The merge writes `prompt_override.json` (the paste payload, one line), `plan.json` (the +patch plan) and `track_data.json` (pretty, for inspection), and prints the delivered +durations/seconds, the track list and the locked tracks. Segment, track and image ids are +stable UUIDv5 values derived from the project title, so a re-merge keeps ids consistent. +The `override` command re-checks the paste payload against the guide: one prompt per +segment, durations inside the runtime's 2–15s window and equal to the approved rows, +per-segment generation/continuity modes, the exact `` / `