Commit Graph

42 Commits

Author SHA1 Message Date
Z User
8a9c79f06e track-gate: workflow wiring reference (single-run loop + LLM slot options) 2026-11-01 03:30:10 +00:00
Z User
eb090f765d easy-media-track-gate: delivery must explain task_index / ForLoop multi-shot
The paste payload builds the full task timeline, but easy multiTrackTaskOutput
emits ONE task segment per pass, selected by its task_index int (default 0 =
first clip only). A single-segment workflow therefore renders only the first
scene no matter how many prompts the override carries. SKILL.md step 5A and the
builder's delivery print now say so, point to the pack's
MinimaxH3_ForLoop_MultiShot.json example (TASK_COUNT -> loop total, loop index
-> task_index, mergeVideosFromPaths after the loop) and offer the manual
task_index 0..N-1 queue fallback.
2026-11-01 03:20:43 +00:00
Z User
5ab7096cfc easy-media-track-gate: allow an empty media_inventory (pure t2v stories)
A story with no pictures/audio/video at all is valid: outline.media_inventory
may now be []. With zero media rows the override builder emits no media tokens
and the track validator enforces that none appear; the runtime parser then
demands no image/audio/video inputs, so nothing needs wiring into the editor.
Example suite regression-checked unchanged.
2026-11-01 02:42:30 +00:00
Z User
fd874adbd3 easy-media-track-gate: idempotent media-token prepending in prompt_override builder
The builder no longer prepends <Picture N>/<Audio N>/<Video N> tokens that the
fragment prompt already carries. The duplicated token still resolved to one
slot at runtime, but the model read it twice. Verified against the real
ComfyUI-Easy-Media utils/prompt_override.py parser: 3-segment payload builds,
image slot demand = {image}, durations 10/10/10.
2026-11-01 02:27:47 +00:00
Z User
8434bb4645 easy-media-track-gate: emit the minimax_prompt_override paste payload
The multitrack editor node consumes its prompt_override input as a
minimax_prompt_override JSON payload (type/version/prompts/duration/
generation_type/continuity_mode/system_prompt/track locks). Any other
JSON pasted there falls back to the '|'-separated text parser and
renders ONE clip over the whole timeline - the reported single-clip
failure - so the paste payload is now the primary deliverable.

- verify_track_rules.py: build_prompt_override() assembles the payload
  from validated fragments (one prompt per row, <Picture N>/<Audio N>/
  <Video N> tokens by inventory position, duration 2-15s, per-segment
  generation/continuity, tail reuse like the runtime); validate_prompt_
  override() checks type, field set, prompt count, duration/mode
  agreement with the outline, exact reference-token sets, pipe-free
  prompts, and track locks; new 'override' sub-command; suite 25->34.
- build_track_plan.py: merge now writes prompt_override.json (one line,
  ASCII) next to plan.json and validates it before reporting.
- references/track-schema.md: full prompt_override section with the
  single-clip fallback warning and slot-position convention.
- SKILL.md: delivery restructured (5A paste default, 5B patch script
  alternative), smoke test extended, read-cap sizes refreshed.
- examples/prompt_override.json: shipped example payload (runtime-checked
  against the cloned node pack parser: 3 task segments, 720 frames).
2026-11-01 02:17:23 +00:00
Z User
56b9d3b9e2 SKILL.md Step 5: the chain plan targets the standalone Context Loop pack only - ComfyUI-Easy-Media has no plan_json/shots consumer (diagnosed live: pasted plan ignored, default single task segment 0-240 frames renders the whole story as one 10s clip); point Easy-Media users at easy-media-track-gate 2026-11-01 02:01:54 +00:00
Z User
e02e338bef Mirror main 0723a2d: 'like' joins REF2VA_STOPWORDS in the h3-plan-gate validator (refmod isolation false positive on 'dresses like ...' refmods); keeps the branch's carried h3 copy identical to main 2026-11-01 01:41:16 +00:00
Z User
ea5c5a71b4 easy-media-track-gate: the h3-plan-gate methodology adapted to ComfyUI-Easy-Media multitrack nodes
Portable self-contained skill (%USERPROFILE%\.agent\skills\easy-media-track-gate\):
- references/track-schema.md: full English translation of the node pack's Chinese
  multitrack-schema.md (resolution DynamicCombo rules, time semantics, task segment
  content, context/context_drift joins, audio locks, shared media, project params,
  patch plan shape); field names cross-checked against patch_workflow.py source.
- verify_track_rules.py (66 KB, stdlib only): mirrors every check the node pack's
  patch_workflow.py performs at apply time (ids, sorting, overlap, frames, source_type
  field matching, <=9 images, continuity enums, one locked audio + one locked video,
  locked-media task coverage, shared_reference rules, resolution tokens, project
  fields) and adds the gates upstream leaves to discipline: outline pins (id/frames/
  modes/image set diffed per fragment AND at the merge), verbatim media contract
  (file_path character-for-character vs media_inventory, closest-match hint on
  rewrite), context prompt rules (self-contained in all modes, keep-then-change
  opener for joins, end-in-motion tail when another join follows), drift all-or-
  nothing + consecutive 10s split unless lengths_user_pinned. Subcommands: outline/
  segment/trackdata/plan/suite; no-outline runs stay schema-only. Embedded suite
  25 cases, prints ~0.7 KB (far under Cline's 8k cap).
- build_track_plan.py: merge re-walks every fragment against the guide, assembles
  TRACK_DATA (task track from fragments; locked master-audio/reference-video tracks
  built from the outline, never retyped), writes plan.json + track_data.json with
  stable UUIDv5 ids; --check mode re-validates.
- examples/: worked 3-segment rooftop example (outline, 3 fragments, plan.json,
  track_data.json) - merge is byte-deterministic and the generated plan dry-run-
  applies to the bundled v1.3.0 blank template with graph_preserved: true.
- SKILL.md: five-move procedure with Cline cap workarounds (never read the 66 KB
  validator, @@CONTINUE@@ split, never read back generated plans), Step 0 media
  paths (upload only on explicit request; never invent a path), approval pause,
  prompt craft rules, delivery through the node pack's own patch_workflow.py
  (dry-run -> --write to a NEW file -> inspect); queueing stays the node pack's
  own flow on explicit user request.
2026-11-01 01:09:26 +00:00
Z User
f6be7ffcc5 Refmod verbatim is now machine-checked: outline_refmods() extracts the story's identity/voice block from the outline's subjects strings and diffs every scene's subject_definitions line against it (fragment --outline + the merge); rewrites, form swaps and invented refmods fail with actionable errors; embedded suite gains the gate fixtures and stays under Cline's 8k output cap (7,712 B) 2026-10-31 01:19:46 +00:00
Z User
dc8d9fab81 Skill is install-location independent: SKILL_DIR concept (loaded-from folder) replaces project-root assumption; all command forms use %USERPROFILE%\.agent\skills\h3-plan-gate; generated files go to the working folder; README install section rewritten for global skills dirs (.clinerules/.cline kept as repo-workspace extras) 2026-10-31 00:49:45 +00:00
Z User
eb1b626648 Cline-native integration: .clinerules standing rules + /h3-plan workflow + .cline/skills stub; SKILL.md gains 6,000-char editor split pattern (@@CONTINUE@@) and 8,000-char command-output fallback (suite is 7.6KB, at the edge); py -3 fallback 2026-10-31 00:33:14 +00:00
Z User
39a38c7c64 Cline caps are hard-coded char budgets, not context-relative: read caps 48k chars / 2k lines / 2k chars-per-line documented exactly, one-line plan files marked never-read-back, README notes -c 131072 does not lift them 2026-10-31 00:24:44 +00:00
Z User
36c2dbf46e Cline-aware bounded reads: cite exact line ranges (PROMPT A 53-156, PROMPT B 157-568, single-pass fence 30-428), run-don't-read the 62KB validator, chunking fallback for truncated reads - Cline caps reads at ~50k chars and cuts sooner on small model contexts 2026-10-31 00:12:22 +00:00
Z User
c0d377b894 build_plan.py delivery print and docstring now route the paste to the internal plan_json widget (dynamicPrompts:False) - stops the LLM from steering the user back into a multiline/dynamic-prompt input 2026-10-30 23:19:56 +00:00
Z User
23d0def305 Field-verified: multiline text input strips braces, same input's single-line mode passes probe + full plan - the probe decides, not the label 2026-10-30 23:18:02 +00:00
Z User
dbb6c82e1f Ship the paste-surface probe and the one-line example plan as repo files (plan_oneline.json, brace_probe_oneline.json) - SKILL.md references the probe file 2026-10-30 22:51:26 +00:00
Z User
99c3e89beb Step 5 corrected: internal plan_json widget is the only safe paste surface - ComfyUI frontend dynamic-prompt serializer strips braces from dynamicPrompts:true widgets at queue time (Extra data fingerprint = quoted first key length; probe calibration included) 2026-10-30 22:40:34 +00:00
Z User
bb72baaa3a h3-plan-gate: Step 5 delivery rewritten from verified node pack source (socket vs widget, override rule, one-line plan file) 2026-10-30 22:03:46 +00:00
Z User
7df79bcf09 Restore the strict refmod-isolation validator: token-echo check catches scattered re-descriptions the n-gram check missed 2026-10-30 21:54:01 +00:00
Z User
fb271a8399 Six-section Ref2VA setup: three definition forms, refmod isolation, no length caps 2026-10-30 21:53:22 +00:00
Z User
5ae3aacb73 refmod text lives only in subject_definitions - bodies reference <Subject N> alone, echo checked 2026-10-30 21:07:31 +00:00
Z User
de19ecee44 no length caps and no lean doctrine in subject_definitions - node-author compactness rules removed (different H3 model) 2026-10-30 20:41:57 +00:00
Z User
962c667418 No length cap on the binds-to-image definition form 2026-10-30 20:35:58 +00:00
Z User
c2559f0572 subject_definitions takes exactly three forms: no-image traits, binds-to-image, verbatim refmod 2026-10-30 20:33:24 +00:00
Z User
28f9b80c83 subject_definitions is a lean identity anchor; the look is woven into detailed_description
Rule 6: subject_definitions never carries the full head-to-toe look or a
nude/bare skin state - it is a lean identity anchor (who the label is, tied
to its reference image). The full look is woven into the [Shot 1] body of
detailed_description according to what is going on in the scene: face, hair,
build as the body moves, each garment where the action touches it, footwear
where steps land, uncovered skin named "nude" where the scene exposes it,
and wardrobe/skin changes stated as part of the action that causes them.

- validator: defs lines reject nude/bare-family skin states and anything
  over 25 words (lean-anchor cap); body re-state message updated; two new
  suite FAIL cases (nude-in-defs, look-dump-in-defs); fixtures rewritten
  to lean defs with the look woven into both [Shot 1] bodies
- all three LLM prompts + SKILL.md: defs role flipped everywhere (template,
  SUBJECT ANCHOR, PROMPT CRAFT, REF2VA spec, worked examples, self-checks);
  outline 'subjects' array now documented as the cast inventory the look is
  spent from
2026-10-30 19:42:00 +00:00
Z User
30cbaeb8f6 Switch plan.json output to the native H3 ref2va prompt format
Each scene prompt is now the six native reference sections —
subject_definitions / summary [reference generation] / retention_analysis /
detailed_description (1-2 style sentences then [Shot 1]) /
overall_soundscape / non_diegetic_music — one line per element, headers on
their own line. The full head-to-toe look (nude-not-bare) lives in
subject_definitions and is restated compressed in the [Shot 1] body; both
cast members are defined per scene against the wired subject references.
verify_plan_rules.py auto-detects the format per shot and validates the
ref2va contract (canonical order, directive, definitions, retention,
style prefix, thin floor), so legacy t2va plans keep passing. Both system
prompts, the assembler prompt and SKILL.md carry the new skeleton,
worked examples and self-checks; example_output/README.md marks the old
run as the t2va craft reference.
2026-10-30 19:28:36 +00:00
Z User
e5778f8536 Common-action catalog: show the steps, never just mention the act
Everyday actions are where the LLM compresses hardest. Both prompts get
a worked not-X-but-Y catalog (unbuttoning a shirt, changing a diaper,
turning on a lamp, opening a door, buckling a strap, handing over an
object) under the rule that an action named without its steps is a
report, not a render; self-checks and SKILL.md carry the same catalog.
2026-10-30 06:31:02 +00:00
Z User
baaa533709 Leg-crossing as second canonical example; no motion too minor
'the woman crosses her legs' -> 'raises her left leg and places it
across her right leg' joins the ball example in both prompts, SKILL.md
and the self-checks, with an explicit clause: every movement and motion
of every character, large or small, is written out as its steps.
2026-10-30 06:24:56 +00:00
Z User
7a7321ec82 Spell out every change and movement step by step (H3 drift rule)
Extends the body-mechanics rule beyond the subject's actions: camera
moves, lighting changes, weather, background, wardrobe and any
transformation each get their own ordered sequence of visible stages —
never a summarized change ('the lights dim'). Added to both prompts'
PROMPT CRAFT + CAMERA element + self-checks and SKILL.md.
2026-10-30 06:12:23 +00:00
Z User
fa764ec933 Full look every scene; 'nude' for uncovered body parts, never 'bare'
H3 needs every aspect of the look restated per scene, and uncovered
skin is steered by the skin-state word 'nude' (tank-top with nude
arms), not 'bare'. Added to both prompts' subject anchor + craft
rules + self-checks and SKILL.md; the validator prints a non-blocking
note when a description line uses 'bare'.
2026-10-29 23:18:56 +00:00
Z User
405386a1af Decompose every action into body mechanics (H3 drift rule)
Compressed outcome verbs ('picks up the ball') leave H3 nothing to
animate between start and end poses, so it guesses and drifts off
intent. The craft rules in both prompts and SKILL.md now require the
ordered joint-level sequence with the hand/limb named per step.
2026-10-29 22:46:12 +00:00
Z User
bbce37f2a5 Add example_output: full 12-scene agent workflow reference run
PROMPT A outline + user-approved guide, 12 PROMPT B scene fragments
composed one at a time with chained _handoff validation, and the
merged plan.json (PLAN OK, 2674 delivered frames = 111.42s).
Also demonstrates 10+ scene scale on the same code path.
2026-10-29 21:05:27 +00:00
Z User
df8df95d39 User-approved scene guide is a mandatory workflow step
Encoded the intended user flow end to end: story + scene count ->
scene guide (outline.json) -> USER APPROVAL (hard stop, changes applied
to the guide first) -> scenes composed one at a time (~10s each) from
the approved guide -> continuity verified across the handoff chain ->
final plan.json.

SKILL.md: goal line states the five moves; new Step 2 'Present the
guide for approval (do not skip)' — plain-language presentation, STOP
and wait, approved guide is the contract; Step 3 works only from the
approved guide; Step 4 renamed 'Verify the continuity, put it all
together'; revising section split into guide-level vs single-scene.

README: workflow reframed as 4 stages with Stage 2 = approval (human in
the loop, never skipped); example gains a real guide-presentation +
'Approved — go' exchange between outline and scene writing; steps
renumbered.

Scene-agent prompt: stage table gains the Approval row and a 'Stage 2 is
a hard stop' note; assembler prompt re-labeled Stage 4. Suite + --check
green.
2026-10-29 19:28:18 +00:00
Z User
f5575fa678 Scene composition is the gate, not word counts
The skill exists so the LLM writes/rewrites each scene one at a time
with full attention on making it a complete scene composition — not so
it can hit a word target.

Prompts: the word-budget craft bullets are replaced by an 8-element
composition checklist (subject anchor, style anchor, continuity anchor,
blocking, camera, performance, physical texture, exit state) in both the
scene-writer PROMPT B (new SCENE COMPOSITION section) and the single-pass
prompt. Chase the elements, never a number; padding is as much a failure
as a thin one-liner.

Validator: hard word bands (<10s: 150-200, >=10s: 200-300) removed from
plan and fragment checks. Replaced by a thin-scene floor (100/120 words)
that only trips lazy output, plus a new continuity-anchor check — chained
fragments must open inside the previous end_state. No target band, no
upper limit; output lines say so.

SKILL.md/README: goal, Step 2, craft rules, table rows, and example
outputs updated to match. Suite, --check, chained fragment checks all
green.
2026-10-29 19:13:27 +00:00
Z User
83cc5145bf Realign: one plan JSON, written one scene at a time
The deliverable is the single merged plan.json — the same shape the
single-pass system prompt emits — and the multi-clip video is what the
node itself produces from it: each shot renders as its own clip, chained
through the H3 context loop into one continuous video. Removed the
--clips per-scene export (external stitching is NOT the design).

Workflow restated everywhere: outline turn -> the LLM writes each scene
one at a time (one focused turn per scene) -> build_plan.py puts it all
together at the end into plan.json -> paste once, queue once.

build_plan.py: --clips option and export block removed; docstring now
describes the node-side chaining. README: intro/example/validating/
wiring rewritten around the single deliverable. SKILL.md: goal, Step 3
(Put it all together at the end), Step 4 (the node makes the multi-clip
video), and the revising loop updated. Suite + --check green.
2026-10-29 19:00:11 +00:00
Z User
54a8271072 Multi-clip videos as the primary deliverable: per-scene clip export
build_plan.py --clips [DIR] (default clips/) now exports one validated
single-shot plan JSON per scene (clip_01.json, ...) alongside the merged
plan. Each clip renders through plan_json_input as its own video at FULL
duration (no chain overlap trim), then the clips are stitched in order;
the mid-motion open/close craft rules make the cuts read as one take.
plan.json stays as the optional single continuous-take render.

SKILL.md Step 3/4 rewritten (merge exports clips + plan; deliver =
render-per-clip then stitch), README intro/example/wiring/validating
updated to multi-clip-first with real clip output shown. Verified from a
simulated project root: export green, every clip re-checks PLAN OK.
2026-10-29 18:40:18 +00:00
Z User
a804088d72 README: end-to-end example from story idea to final output
Walks the shipped greenhouse example through all six steps: the Cline
request, smoke test, outline.json (full JSON), one-file-at-a-time scene
validation, build_plan.py merge with real output (1042 frames = 43.42s),
and rendering via plan_json_input incl. the revise-one-scene loop. All
command blocks aligned to the Windows venv form (.venv\\Scripts\\python.exe)
with one macOS/Linux note, matching SKILL.md.
2026-10-29 18:32:43 +00:00
Z User
b308dd77e1 SKILL.md: rewrite for project-root layout and Windows venv
The <skill_dir> placeholder and python3 commands confused the LLM and fail
on Windows. Now: all commands are concrete and relative to the project root
(the folder containing h3-plan-gate/), invoked as
.venv\\Scripts\\python.exe (Windows venv layout) with python/.venv/bin/python
as fallbacks; python3 removed entirely. Added a start-of-task smoke test,
explicit file-output locations, one-file-at-a-time scene loop with immediate
fragment validation, and a revise-one-scene loop. All command paths verified
from a simulated project root (suite, --check, merge, fragment --prev all
green).
2026-10-29 18:27:44 +00:00
Z User
b9b0e41469 Add SKILL.md: Agent Skills entry point for the h3-plan-gate folder
The h3-plan-gate directory is now a drop-in skill for Cline (.cline/skills/
or ~/.cline/skills/) and any Agent-Skills-compatible agent. SKILL.md carries
the full agent procedure (outline -> one fragment per turn with per-turn
validation -> build_plan.py merge -> delivery notes) plus the condensed
craft rules; the prompt .md files remain the deep reference and worked
examples stay bundled. README files table updated.
2026-10-29 17:55:52 +00:00
Z User
63a4469315 README: agent usage guide for the h3-plan-gate workflow
3-stage agent workflow (outline -> one scene per turn -> validated merge),
per-turn fragment gate, validation commands, smoke test with the shipped
examples, plan_json_input wiring notes, and requirements.
2026-10-29 17:31:19 +00:00
Z User
bd50b1ba51 Add H3 plan-JSON gate: agent workflow prompts, validator, assembler, examples
- h3_scene_agent_system_prompt.md: outline turn + one-scene-per-turn writer
  with a truthful _handoff chain (style_and_cast frozen at outline)
- h3_plan_assembler_system_prompt.md: verbatim-copy LLM merge step
  (deterministic alternative: build_plan.py)
- h3_plan_json_system_prompt.md: single-pass variant for short 2-4 scene
  stories; prompt_prefix fixed to [""], native H3 three-line shot template
- verify_plan_rules.py: node-replica validator (plan + fragment modes,
  handoff-chain checks, embedded pass/fail suite)
- build_plan.py: deterministic fragment merger with --check for existing plans
- h3_agent_workflow_examples/: worked 3-scene greenhouse courier run
  (outline -> 3 fragments -> validated plan.json, 1042 frames = 43.42s)
2026-10-29 17:18:28 +00:00
bc774c68cd Initial commit 2026-10-29 10:13:40 -07:00