From 3587e676fae0e70134151a15114a8dd7d6728de4 Mon Sep 17 00:00:00 2001 From: Z User Date: Mon, 2 Nov 2026 22:26:53 +0000 Subject: [PATCH] track-gate: plain text IS the deliverable - the skill told the agent to write JSON (goal line said 'PRIMARY deliverable is prompt_override.json'; smoke test, file lists, Step 4 and Step 5A all JSON-centric), so it kept writing the old format; now the paste is plain text end to end: verify_track_rules gains validate_prompt_override_text (mirror of the pack's parse_override_segments: split on |, strip, drop empties, trailing [s-e(,type)] marker lifted, @imageN/@audioN/@videoN refs vs inventory, and stray @ rejected, marker frames/types pinned to the approved rows, markerless form requires equal row lengths, markers all-or-nothing) + build_plain_text_override (fragment text VERBATIM - newlines survive, six-section structure intact - not the JSON's collapsed prompts; bare-| join, byte-identical to the user's proven node186 paste) and the override command takes .txt or .json; build_track_plan writes prompt_override.txt for EVERY zero-media story (markers auto-added for uneven lengths / non-t2v types), media stories keep JSON-only with an explicit note; SKILL.md/README/schema/wiring docs flipped: plain text default, JSON demoted to the /continuity/locks option; suite 46/46; merge output proven byte-identical to prompt_override_r2v_refmod.txt --- easy-media-track-gate/README.md | 27 +- easy-media-track-gate/SKILL.md | 168 ++++++---- easy-media-track-gate/build_track_plan.py | 54 ++-- .../examples/outline_sam_park.json | 63 ++++ .../references/track-schema.md | 12 +- .../references/workflow_wiring.md | 19 +- easy-media-track-gate/verify_track_rules.py | 301 +++++++++++++++++- 7 files changed, 535 insertions(+), 109 deletions(-) create mode 100644 easy-media-track-gate/examples/outline_sam_park.json diff --git a/easy-media-track-gate/README.md b/easy-media-track-gate/README.md index 8c61180..c3e6035 100644 --- a/easy-media-track-gate/README.md +++ b/easy-media-track-gate/README.md @@ -5,9 +5,15 @@ patch plan** for the ComfyUI-Easy-Media nodes (`easy multiTrackEditor` + `easy multitrackProject`), built with the same outline → approval → one-segment-per-turn → merge → gate flow as `h3-plan-gate`, adapted to the Easy-Media multitrack schema. -The deliverable is a `plan.json` patch plan that the node pack's own -`skills/easy-media-multitrack-workflow/scripts/patch_workflow.py apply` consumes — it is -not pasted into a widget. +The PRIMARY deliverable is a **plain-text `prompt_override` paste** (`prompt_override.txt`: +the scene prompts joined with `|` on one line, `[start-end(,type)]` markers where scene +lengths differ or a scene is not t2v) for the `easy multiTrackEditor` node's +`prompt_override` input (format `MiniMax`) — the editor splits on pipes and renders one +clip per scene, no JSON needed. `prompt_override.json` (a `minimax_prompt_override` +payload) is the option for what plain text cannot carry (`` media tokens, +continuity modes, track locks), and `plan.json` is the whole-workflow alternative applied +by the node pack's own `skills/easy-media-multitrack-workflow/scripts/patch_workflow.py +apply`. ## What the gate enforces @@ -18,6 +24,7 @@ not pasted into a widget. | Verbatim media contract | Every `file_path` in fragments and locked tracks must be a character-for-character copy of the outline's `media_inventory` entry (the same discipline `h3-plan-gate` applies to refmods; a retyped path fails with a closest-match hint) | | Context prompt rules | Self-contained prompts in every mode (no "same as before"); context/context_drift joins must open by keeping the delivered tail and must not open with a new composition; a join followed by another join must not end at rest | | Drift discipline | `context_drift` is all-or-nothing across the task range (first segment included), with the consecutive 10-second split unless the user pinned lengths | +| Paste payload | `prompt_override` re-checked against the guide in BOTH forms: plain text (scene count/order, `[s-e,type]` markers vs the approved row frames and task types, `@imageN/@audioN/@videoN` refs vs the inventory, `` and stray `@` rejected) and JSON payload (durations, generation/continuity modes, exact `` sets, track locks) | ## Folder @@ -25,12 +32,14 @@ not pasted into a widget. easy-media-track-gate/ ├── SKILL.md agent procedure (the entry point) ├── README.md this file -├── verify_track_rules.py the gate: outline / segment / trackdata / plan / suite -├── build_track_plan.py merge fragments → TRACK_DATA + patch plan.json +├── verify_track_rules.py the gate: outline / segment / trackdata / plan / override / suite +├── build_track_plan.py merge fragments → prompt_override.txt/.json + TRACK_DATA + patch plan.json ├── references/ │ └── track-schema.md English translation of the node pack's Chinese │ multitrack-schema.md (all field names preserved) -└── examples/ worked 3-segment example: outline, segments, plan, track_data +└── examples/ worked 3-segment example: outline, segments, plan, track_data, + paste payloads (prompt_override.json + the plain-text + prompt_override_r2v_refmod.txt with its outline_sam_park.json) ``` Standard library only; Windows-first (`py -3`), runs anywhere Python 3.8+ lives. @@ -59,9 +68,13 @@ py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" segment segment_01.json --index 1 --outline outline.json py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" segment segment_02.json --index 2 --prev segment_01.json --outline outline.json -:: merge everything (writes plan.json + track_data.json) +:: merge everything (writes prompt_override.txt + prompt_override.json + plan.json + track_data.json) 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 +:: validate the paste payloads (plain text is the default form; JSON the option) +py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" override prompt_override.txt --outline outline.json +py -3 "%USERPROFILE%\.agent\skills\easy-media-track-gate\verify_track_rules.py" override prompt_override.json --outline outline.json + :: apply with the node pack's own script (dry-run, then write) py -3 \custom_nodes\ComfyUI-Easy-Media\skills\easy-media-multitrack-workflow\scripts\patch_workflow.py apply WORKFLOW.json --plan plan.json py -3 \custom_nodes\ComfyUI-Easy-Media\skills\easy-media-multitrack-workflow\scripts\patch_workflow.py apply WORKFLOW.json --plan plan.json --output RESULT.json --write diff --git a/easy-media-track-gate/SKILL.md b/easy-media-track-gate/SKILL.md index addd5be..4523c83 100755 --- a/easy-media-track-gate/SKILL.md +++ b/easy-media-track-gate/SKILL.md @@ -4,8 +4,9 @@ description: Turn a video idea into a validated MultiTrack plan for ComfyUI-Easy (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 + or produce the `prompt_override` paste for the multitrack editor node — plain text + `scene1|scene2|...` by default — 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. --- @@ -19,14 +20,20 @@ compose the task segments one at a time (about 10 seconds each), each turn exist 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. +`prompt_override.txt` — PLAIN TEXT, the scene prompts joined with `|` on one line (the +editor splits on pipes; no JSON), which the user pastes into the multitrack editor node's +`prompt_override` input (format `MiniMax`) — the editor then renders one clip per scene, +chained back-to-back. The merge adds `[start-end]` / `[start-end,type]` markers per scene +when the story needs them (unequal lengths, or a scene that is not the plain-text default +t2v — e.g. r2v). `prompt_override.json` (a `minimax_prompt_override` payload) is the +OPTION for what plain text cannot carry: ``/`