You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are creating an implementation plan for the following idea.
code
Idea:
Build and battle-test a generalized VibeComfy workflow lifecycle process that works for all ways developers and agents actually work with workflows: importing raw Comfy JSON, fixing an existing ready template, forking an existing ready template into a variant, and authoring a workflow from scratch. This must solve the systematic process gap we just hit: converted workflows can look locally valid but still carry unresolved positional widget_* inputs, missing live Comfy schema bindings, missing required node inputs, missing model asset declarations, weak output artifact contracts, or missing worker/app parity evidence until a costly RunPod run fails.
Context and current state:
VibeComfy repo is /tmp/vibecomfy, branch megaplan/production-parity-templates.
Worker repo is /tmp/reigh-worker, branch megaplan/vibecomfy-sprint-09-control-rail-travel-matrix.
Use PYENV_VERSION=3.11.11 in both repos.
Worker uv run is blocked on macOS ARM by locked decord==0.6.0; worker tests/harness usually need PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 ....
Existing VibeComfy tools already include vibecomfy port check, vibecomfy port convert, vibecomfy port widgets, vibecomfy validate, vibecomfy doctor, schema providers with runtime /object_info cache support, ready-template index refresh, node-pack catalog, model registry, and RunPod corpus tooling.
Existing docs already include /tmp/vibecomfy/AGENTS.md, , , , and . These mention the commands but are more reference-like than a hard agent operating checklist.
Assistant
{"plan":"I’ll inspect the relevant VibeComfy docs, CLI validation/doctor/port code, tests, and current git state just far enough to identify concrete implementation touch points for the lifecycle plan. I’ll avoid the planning harness artifacts and keep this to planning evidence only.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
{"plan":"The first pass shows relevant uncommitted work already in doctor, widget alias/schema code, the failing LTX template, and tests/test_ready_templates.py. I’m narrowing now to those insertion points plus the worker parity boundary so the plan preserves existing changes and doesn’t invent a parallel checker.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
{"plan":"I have enough VibeComfy context for the local gates. I’m doing one focused worker read now to place the contract/preflight hooks correctly; after that I’ll write the plan with assumptions and questions instead of continuing broad exploration.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
{"plan":"One cheap battle-test already exposed a planning-relevant gap: validate and the focused LTX test pass, doctor now reports missing declared models, but port widgets crashes on the ready template because source loading hits a Python parsing path not tolerant of the current template constants. I’ll include that as a concrete fix before making strict widget checks a gate.","questions":[],"success_criteria":[],"assumptions":[]}
Assistant
User
Assistant
/tmp/vibecomfy/README.md
/tmp/vibecomfy/docs/adding_templates_models.md
/tmp/vibecomfy/docs/template_porting_workbench.md
/tmp/vibecomfy/ready_templates/README.md
The right direction is not a brand-new parallel doctor. It is to tighten and connect existing tools: strict ready-template gates, schema-required modes, unresolved-widget checks, model/output requirements, app parity contracts, and documentation that tells agents when/how to use each path.
Recent concrete failure that motivates this:
A RunPod live test for travel_segment_ltx2_control_video_first_last using VibeComfy failed because ltx2_3_runexx_first_last_raw_video_guide.py compiled with schema-invalid positional widgets for nodes such as LTXVChunkFeedForward, LTX2AttentionTunerPatch, LTX2SamplingPreviewOverride, LTX2_NAG, ResizeImageMaskNode, LTXVAddGuide, and VHS_VideoCombine, plus missing Kijai LTX model assets.
Local tests had passed because schema resolution/gating was too weak or incomplete for production ready templates.
Current uncommitted VibeComfy work already starts fixing this by adding widget-schema aliases and LTX model assets/defaults. Preserve and integrate existing uncommitted user/agent work; do not revert unrelated changes.
Non-negotiable goals:
A minimal but strong workflow lifecycle/checklist should exist in agent-facing docs. It must cover four entry points: raw JSON import, existing ready template fix, fork of an existing template, and from-scratch Python workflow.
The checklist must clearly separate programmatic gates from agentic responsibilities:
Programmatic: port preflight, schema validation, unresolved widgets, required inputs/connections, unknown classes, node-pack suggestions, model asset declarations, output artifacts, index freshness, tests, worker contract validation, live RunPod evidence.
Agentic: source quality, choosing official/Kijai/community workflows, interpreting model provenance, deciding smoke adaptations, deciding whether missing nodes are legitimate custom nodes or helper/UI junk, comparing behavior to Wan2GP/app semantics, and documenting intentional differences.
The existing CLI/tooling should make that process harder to miss. Prefer thin wrappers or strict modes over a new parallel system. If already adequate, document and wire it. If inadequate, implement the smallest robust improvement.
Ready templates intended for production/app parity must not silently pass with unresolved positional widget_* fields where live Comfy requires named inputs. Add checks/tests for this class of issue.
Validate the process by running it on current workflows, especially the failing LTX raw video guide template and any nearby LTX Runexx templates. Use the process to fix real friction as you find it.
After local validation, run the relevant worker/VibeComfy checks and, where credentials/environment permit, rerun the focused RunPod live test from /tmp/reigh-worker:
PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 python -m scripts.live_test.main --variant fresh --backend vibecomfy --case travel_segment_ltx2_control_video_first_last --ref megaplan/vibecomfy-sprint-09-control-rail-travel-matrix --vibecomfy-ref megaplan/production-parity-templates --terminate
Do not leave stale pods. The worker has a terminate_guard.py janitor and --terminate; verify no reigh-live-test-fresh-* pods remain after any live run.
Do not claim 100% parity unless the contracts and actual RunPod runs prove it. If full 100% is blocked by time, GPU, credentials, model availability, or still-open unsupported workflow types, produce exact evidence and blockers.
RunPod/live tests are final end-to-end proof, not the first place obvious graph-shape errors appear.
Worker-side code should patch semantic fields, not know arbitrary widget_3 meanings. If you find ad hoc widget mapping in worker code that should live in VibeComfy, propose or implement a safe migration step.
The developer experience should be: “I want to onboard/fork/fix/build this workflow” -> run a small set of commands -> get a clear report -> fix what it says -> promote only after local checks and focused live evidence.
Concrete work to consider during prep and plan:
Inspect /tmp/vibecomfy/AGENTS.md, README, docs/adding_templates_models.md, docs/template_porting_workbench.md, docs/errors_and_doctor.md, CLI command implementations, schema validation, porting/widget alias code, ready-template tests, and the current uncommitted LTX changes.
Inspect /tmp/reigh-worker/scripts/capability_contracts, /tmp/reigh-worker/source/models/comfy/vibecomfy_adapter.py, worker live-test preflight, and docs/parity tracker to understand where VibeComfy checks should be invoked from the worker side.
Determine if a strict doctor/validate flag, a workflow readiness command, or better tests/docs are the right scope. Avoid overbuilding.
Add a concise lifecycle checklist to the skill/AGENTS docs and README/docs as appropriate. It should be memorable and usable, not a giant wall of prose.
Add tests that would have caught the latest failure before RunPod, such as ready-template compiled API should not contain unresolved widget_* for classes with known schema aliases, or strict mode requiring a schema for production ready templates.
Run local validation against all ready templates or a focused subset first, then broaden.
Apply any needed fixes to LTX raw guide and related templates.
Commit/push if appropriate only after green checks; otherwise leave exact status.
Current known commands useful for validation:
VibeComfy:
uv run python -m tools.refresh_template_index --check may work; if pyenv causes trouble, use PYENV_VERSION=3.11.11 python -m tools.refresh_template_index --check.
Remember: the deliverable is not just code or docs. It is a working, documented, repeatable workflow lifecycle process that we immediately use to continue moving toward VibeComfy/Wan2GP parity, with the LTX raw guide live failure as the first battle test.
code
Project directory:
/private/tmp/vibecomfy
No prior clarification artifact exists. Identify ambiguities, ask clarifying questions, and state your assumptions inside the plan output.
Requirements:
- If the engineering brief suggests an approach, use it as your starting hypothesis — but before committing, consider if there's a simpler or more fundamental fix. The brief is well-researched input, not a final answer.
- If the brief is absent, incomplete, or says "skip", inspect the repository yourself before planning.
- Stay focused on the requested idea. If repo exploration surfaces unrelated issues or docs, ignore them and return to the task.
- Prefer source code, tests, and directly relevant config files. Avoid `.megaplan/`, prior plan artifacts, and unrelated `docs/` or ops/deployment material unless the task explicitly depends on them.
- Stop exploring once you have enough evidence to name the concrete touch points and validation path. Do not keep browsing after you can write the plan.
- Produce a concrete implementation plan in markdown.
- Define observable success criteria as objects with `criterion` (string) and `priority` (`must`, `should`, or `info`):
- `must` — hard gate. The reviewer will block on failure. Use for correctness, functional requirements, and verifiable outcomes (e.g., "all existing tests pass", "API returns 200 for valid input"). Every `must` criterion must have a clear yes/no answer.
- `should` — quality target. The reviewer flags but does not block. Use for subjective goals, numeric guidelines, and best-effort improvements (e.g., "file under ~300 lines", "no deeply nested conditionals", "each function has a single responsibility").
- `info` — documented for humans, reviewer skips. Use for criteria that cannot be verified in this pipeline (e.g., "13 manual smoke tests pass", "stakeholder sign-off obtained").
- Each success criterion should include a `requires` field listing the capabilities needed for verification. Valid capability strings: `run_shell`, `read_files`, `run_tests`, `parse_diff`, `read_build_output`, `run_linter` (container), `drive_browser`, `inspect_runtime_ui`, `observe_runtime_logs`, `subjective_judgment`, `verify_physical_device` (human). `must` criteria MUST have non-empty `requires`. Example: `{"criterion": "All tests pass", "priority": "must", "requires": ["run_tests"]}`.
- Use the `questions` field for ambiguities that would materially change implementation.
- Use the `assumptions` field for defaults you are making so planning can proceed now.
- Prefer cheap validation steps early.
- Keep the plan proportional to the task. A 1-line fix needs a 2-step plan (apply fix + run tests), not a 5-step investigation.
- If user notes answer earlier questions, incorporate them into the draft plan instead of re-asking them.
- Fix the problem fully. Do not limit scope just to avoid breaking existing tests — update the tests too if needed.
- Prefer the simplest, most direct fix. No fallbacks, type conversions, or defensive wrappers without concrete evidence they are needed.
- If the task or issue hints suggest a specific approach, follow it. Only deviate with concrete counter-evidence.
Plan template — simple format (adapt to the actual repo and scope):
md
# Implementation Plan: [Title]
## Overview
Summarize the goal, current repository shape, and the constraints that matter.
## Main Phase
### Step 1: Audit the current behavior (`megaplan/prompts.py`)
**Scope:** Small
1. **Inspect** the current implementation and call out the exact insertion points (`megaplan/prompts.py:29`).
### Step 2: Add the first change (`megaplan/evaluation.py`)
**Scope:** Medium
1. **Implement** the smallest viable change with exact file references (`megaplan/evaluation.py:1`).
2. **Capture** any tricky behavior with a short example.
```python
issues = validate_plan_structure(plan_text)
```
### Step 3: Wire downstream behavior (`megaplan/handlers.py`, `megaplan/workers.py`)
**Scope:** Medium
1. **Update** the runtime flow in the touched files (`megaplan/handlers.py:400`, `megaplan/workers.py:199`).
### Step 4: Prove the change (`tests/test_evaluation.py`, `tests/test_megaplan.py`)
**Scope:** Small
1. **Run** the cheapest targeted checks first (`tests/test_evaluation.py:1`).
2. **Finish** with broader verification once the wiring is in place (`tests/test_megaplan.py:1`).
## Execution Order
1. Update prompts and mocks before enforcing stricter validation.
2. Land higher-risk wiring after the validator and tests are ready.
## Validation Order
1. Start with focused unit tests.
2. Run the broader suite after the flow changes are in place.
For complex plans, use multiple phases:
md
## Phase 1: Foundation — Dependencies, DB, Types
### Step 1: Install dependencies (`package.json`)
...
### Step 2: Create database migration (`supabase/migrations/`)
...
## Phase 2: Core Integration
### Step 3: Port the main component (`src/components/`)
...
Template guidance:
Simple plans: use ## Main Phase with ### Step N: sections underneath.
Complex plans: use multiple ## Phase N: sections, each containing ### Step N: steps. Step numbers are global (not per-phase).
The flat ## Step N: format (without phases) also works for backwards compatibility.
Key invariants: one H1 title, one ## Overview, numbered step sections (### Step N: or ## Step N:), and at least one ordering section.
{"plan":"# Implementation Plan: Generalized VibeComfy Workflow Lifecycle\n\n## Overview\nBuild a repeatable lifecycle that turns the current reference commands into enforceable gates for four entry points: raw JSON import, existing ready-template fix, ready-template fork, and from-scratch Python workflow. The smallest strong architecture is to tighten existing port check, validate, doctor, ready-template tests, and worker capability contracts rather than adding a new doctor.\n\nCurrent evidence: validate ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py passes, the focused LTX ready-template test passes, doctor --json now catches missing Kijai LTX model assets, but port check/port widgets on the ready-template path currently crashes when AST-parsing READY_REQUIREMENTS = {\"models\": LTX_RUNEXX_MODEL_ASSETS, ...}. That crash must be fixed before the lifecycle can be a hard checklist.\n\n## Phase 1: Repair The Existing Preflight Surface\n\n### Step 1: Fix Python ready-template asset parsing (vibecomfy/porting/assets.py, vibecomfy/model_assets.py)\nScope: Small\n1. Update Python metadata/requirements extraction so module-level literal constants referenced from READY_METADATA or READY_REQUIREMENTS do not crash port check and port widgets.\n2. Prefer a narrow AST constant resolver for top-level literal assignments over importing arbitrary modules in the parser.\n3. Add tests with a fixture using MODEL_ASSETS = [...], READY_METADATA = {\"model_assets\": MODEL_ASSETS}, and READY_REQUIREMENTS = {\"models\": MODEL_ASSETS}.\n\n### Step 2: Make unresolved positional widgets an explicit ready-template gate (vibecomfy/porting/workbench.py, vibecomfy/commands/validate.py, vibecomfy/commands/doctor.py)\nScope: Medium\n1. Keep port check as the canonical workbench, but add a strict readiness mode or shared helper that promotes unresolved widget_* diagnostics to hard errors for production ready templates.\n2. Gate on compiled API output, not just source widgets: any remaining widget_* for a class with known schema aliases or live schema-required named inputs should fail.\n3. Include missing required inputs, unknown classes, invalid link shapes, helper diagnostics, model asset declarations, and save/output artifact mapping in the same readiness result.\n4. Do not fail every legacy exploratory template solely for unknown custom-node schemas unless it is marked production/app-parity relevant.\n\n### Step 3: Add focused regression tests (tests/test_ready_templates.py, tests/test_porting_workbench.py, tests/test_schema_validate.py, tests/test_cli.py)\nScope: Medium\n1. Add a test that the failing LTX raw guide compiled API has no unresolved widget_* inputs for LTXVChunkFeedForward, LTX2AttentionTunerPatch, LTX2SamplingPreviewOverride, LTX2_NAG, ResizeImageMaskNode, LTXVAddGuide, and VHS_VideoCombine.\n2. Add a generic ready-template strict test over production/app-parity template ids to catch unresolved positional widgets before RunPod.\n3. Add a CLI regression proving port check ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json returns a structured report, not an AST traceback.\n\n## Phase 2: Battle-Test And Fix The LTX Target\n\n### Step 4: Preserve and finish current uncommitted LTX fixes (ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py, vibecomfy/porting/widget_schema.py, vibecomfy/porting/widget_aliases.py)\nScope: Medium\n1. Preserve the current uncommitted alias additions and Kijai model asset declarations.\n2. Verify the runtime schema defaults for VHS_VideoCombine, ResizeImageMaskNode, and LTX2 nodes match object-info or committed node-index expectations.\n3. Apply the same alias/model-asset pattern to nearby Runexx LTX templates only when local reports show the same failure class.\n\n### Step 5: Run local lifecycle on the target and nearby templates\nScope: Medium\n1. Run cheap checks first:\n bash\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli port check ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli validate ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli doctor ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json\n \n2. Run the same strict/local gate on nearby ready_templates/video/ltx2_3_runexx_*.py templates and fix only repeated lifecycle blockers.\n3. Treat missing local model files as expected local evidence if declarations are present and fetch --dry-run can see URL-bearing assets.\n\n## Phase 3: Document The Lifecycle As An Agent Checklist\n\n### Step 6: Add the memorable checklist (AGENTS.md, README.md, docs/adding_templates_models.md, docs/template_porting_workbench.md, ready_templates/README.md)\nScope: Medium\n1. Add a concise “Workflow Lifecycle Gates” section with four paths:\n - raw Comfy JSON import;\n - existing ready-template fix;\n - fork existing ready-template into a variant;\n - from-scratch Python workflow.\n2. Split each path into programmatic gates and agentic responsibilities.\n3. Programmatic gates must name exact commands: port check, port widgets, validate, doctor, nodes install-plan, fetch --dry-run, index refresh, ready-template tests, worker contract validation, and focused RunPod/live evidence.\n4. Agentic responsibilities must cover source quality, official vs Kijai/community choice, model provenance, helper/UI junk vs real custom nodes, smoke adaptations, Wan2GP/app semantic comparison, and intentional-difference docs.\n5. Keep the docs short enough to be used during agent work; reference longer docs instead of duplicating all details.\n\n## Phase 4: Connect Worker Parity Without Moving Graph Validation Into Worker\n\n### Step 7: Strengthen worker contract validation hints (/tmp/reigh-worker/scripts/capability_contracts, /tmp/reigh-worker/source/runtime/worker/preflight.py)\nScope: Medium\n1. Confirm scripts/capability_contracts.report continues to own product parity evidence only: route/task mapping, variant axes, artifact contracts, app inventory, and live evidence.\n2. If needed, add a worker-side static check that invokes VibeComfy CLI for referenced template ids instead of reimplementing graph validation.\n3. Avoid worker-side arbitrary widget_N semantics. Any discovered widget mapping in worker helpers should be migrated into VibeComfy schema aliases or template code, with worker patches restricted to semantic fields.\n4. Regenerate/check docs/vibecomfy-app-parity-tracker.md after contract edits.\n\n## Phase 5: Validation And Live Evidence\n\n### Step 8: Run focused VibeComfy tests\nScope: Medium\n1. Run:\n bash\n PYENV_VERSION=3.11.11 python -m pytest tests/test_ready_templates.py tests/test_workflow_core.py tests/test_nodes_install.py -q\n PYENV_VERSION=3.11.11 python -m pytest tests/test_porting_convert.py tests/test_porting_report.py tests/test_schema_validate.py tests/test_doctor_models.py tests/test_doctor_lockfile.py -q\n PYENV_VERSION=3.11.11 python -m tools.refresh_template_index --check\n \n2. Broaden only after the strict LTX and workbench regressions are green.\n\n### Step 9: Run worker static checks\nScope: Medium\n1. Run worker checks with the known environment workaround:\n bash\n cd /tmp/reigh-worker\n PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 python -m pytest scripts/live_test/tests/test_primitives.py -q\n PYENV_VERSION=3.11.11 python -m scripts.capability_contracts.report --vibecomfy-path /tmp/vibecomfy render --check docs/vibecomfy-app-parity-tracker.md\n \n2. If contract docs drift, update source JSON files and regenerate the tracker rather than hand-editing generated markdown.\n\n### Step 10: Rerun focused RunPod live test when credentials permit\nScope: Large\n1. From /tmp/reigh-worker, run the requested focused live case:\n bash\n PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 python -m scripts.live_test.main --variant fresh --backend vibecomfy --case travel_segment_ltx2_control_video_first_last --ref megaplan/vibecomfy-sprint-09-control-rail-travel-matrix --vibecomfy-ref megaplan/production-parity-templates --terminate\n \n2. Inspect the generated live report and VibeComfy run metadata for selected artifact path, prompt id, model staging, and video contract evidence.\n3. Verify no reigh-live-test-fresh-* pods remain using the live-test terminate guard/janitor.\n4. Promote parity status only if static contracts and actual live output prove it; otherwise document exact blocker and evidence paths.\n\n## Execution Order\n1. Fix the AST/parser crash first so all lifecycle commands can run on current ready templates.\n2. Add strict widget/readiness checks and tests before broadening docs, so the checklist points at real gates.\n3. Finish the LTX template fixes and run local lifecycle checks.\n4. Update docs and worker contract hooks after the VibeComfy-owned gates are stable.\n5. Run worker static checks, then RunPod only after cheap local checks are clean.\n\n## Validation Order\n1. Focused unit tests for asset parsing and widget/readiness diagnostics.\n2. Focused LTX ready-template test and CLI port check/validate/doctor commands.\n3. Broader VibeComfy test groups and template index check.\n4. Worker contract/report checks.\n5. Focused RunPod live test and pod cleanup verification.","questions":["Should the strict ready-template gate apply to every checked-in ready template immediately, or only templates marked coverage_tier: required / app-parity referenced until legacy exploratory templates are cleaned up?","If RunPod credentials are present but model downloads are slow or gated, should the implementation stop at static/local evidence or spend the time to resolve staging and rerun until the focused live case completes?","Should worker startup preflight block on VibeComfy static readiness for all supported contract templates, or should that remain a CI/contract-report gate to avoid slowing worker boot?"],"success_criteria":[{"criterion":"port check and port widgets on ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py return structured reports and do not crash on module-level model asset constants.","priority":"must","requires":["run_shell","read_build_output"]},{"criterion":"Production/app-parity ready templates fail a local strict gate when compiled API contains unresolved widget_* inputs for classes with committed widget aliases or schema-required named inputs.","priority":"must","requires":["run_tests","run_shell","parse_diff"]},{"criterion":"The LTX raw video guide compiled API uses named inputs for the previously failing LTX/KJ/VHS nodes and declares URL-bearing Kijai LTX model assets.","priority":"must","requires":["run_tests","read_files","parse_diff"]},{"criterion":"Agent-facing docs describe the four workflow lifecycle entry points and separate programmatic gates from agentic responsibilities.","priority":"must","requires":["read_files","parse_diff"]},{"criterion":"Existing VibeComfy validation/doctor/port tooling remains the enforcement surface; no parallel replacement doctor is introduced.","priority":"must","requires":["parse_diff","read_files"]},{"criterion":"Focused VibeComfy tests for ready templates, porting, schema validation, doctor model checks, node install checks, and template index freshness pass.","priority":"must","requires":["run_tests","run_shell","read_build_output"]},{"criterion":"Worker capability contract checks render cleanly against the updated VibeComfy checkout, or exact contract drift is documented with source files to update.","priority":"must","requires":["run_shell","read_build_output","read_files"]},{"criterion":"The focused RunPod live test is rerun when credentials/environment permit, and no stale reigh-live-test-fresh-* pods remain afterward.","priority":"must","requires":["run_shell","observe_runtime_logs","read_build_output"]},{"criterion":"Any claim of parity is backed by both worker contract evidence and actual live RunPod output; otherwise blockers are recorded with concrete command output or report paths.","priority":"must","requires":["read_files","observe_runtime_logs","subjective_judgment"]},{"criterion":"The lifecycle checklist stays concise and points to detailed docs instead of duplicating long reference prose.","priority":"should","requires":["read_files","subjective_judgment"]},{"criterion":"Worker-side changes avoid hard-coding arbitrary widget_N meanings and patch only semantic fields exposed by VibeComfy templates.","priority":"should","requires":["parse_diff","read_files","subjective_judgment"]},{"criterion":"Nearby LTX Runexx templates are checked for the same failure class, with fixes limited to templates that actually report lifecycle blockers.","priority":"should","requires":["run_shell","read_build_output","parse_diff"]},{"criterion":"RunPod model download latency, account limits, and gated Hugging Face assets may affect live validation timing.","priority":"info","requires":["observe_runtime_logs"]}],"assumptions":["The implementation should preserve current uncommitted changes in the LTX template, widget aliases/schema, doctor, and ready-template tests unless a real conflict is found.","/private/tmp/vibecomfy is the active VibeComfy checkout corresponding to /tmp/vibecomfy in the brief, and /tmp/reigh-worker is available for worker checks.","PYENV_VERSION=3.11.11 is the intended Python environment for both repositories.","Network and RunPod credentials may be unavailable in the execution environment; local/static gates still need to be completed and any live blocker documented exactly.","Strict readiness should initially target production/app-parity templates rather than breaking every legacy exploratory ready template at once, unless the user confirms all ready templates must be hard-gated immediately."]}
You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are revising an implementation plan after critique and gate feedback.
code
Project directory:
/private/tmp/vibecomfy
Idea:
Build and battle-test a generalized VibeComfy workflow lifecycle process that works for all ways developers and agents actually work with workflows: importing raw Comfy JSON, fixing an existing ready template, forking an existing ready template into a variant, and authoring a workflow from scratch. This must solve the systematic process gap we just hit: converted workflows can look locally valid but still carry unresolved positional widget_* inputs, missing live Comfy schema bindings, missing required node inputs, missing model asset declarations, weak output artifact contracts, or missing worker/app parity evidence until a costly RunPod run fails.
Context and current state:
VibeComfy repo is /tmp/vibecomfy, branch megaplan/production-parity-templates.
Worker repo is /tmp/reigh-worker, branch megaplan/vibecomfy-sprint-09-control-rail-travel-matrix.
Use PYENV_VERSION=3.11.11 in both repos.
Worker uv run is blocked on macOS ARM by locked decord==0.6.0; worker tests/harness usually need PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 ....
Existing VibeComfy tools already include vibecomfy port check, vibecomfy port convert, vibecomfy port widgets, vibecomfy validate, vibecomfy doctor, schema providers with runtime /object_info cache support, ready-template index refresh, node-pack catalog, model registry, and RunPod corpus tooling.
Existing docs already include /tmp/vibecomfy/AGENTS.md, /tmp/vibecomfy/README.md, /tmp/vibecomfy/docs/adding_templates_models.md, /tmp/vibecomfy/docs/template_porting_workbench.md, and /tmp/vibecomfy/ready_templates/README.md. These mention the commands but are more reference-like than a hard agent operating checklist.
The right direction is not a brand-new parallel doctor. It is to tighten and connect existing tools: strict ready-template gates, schema-required modes, unresolved-widget checks, model/output requirements, app parity contracts, and documentation that tells agents when/how to use each path.
Recent concrete failure that motivates this:
A RunPod live test for travel_segment_ltx2_control_video_first_last using VibeComfy failed because ltx2_3_runexx_first_last_raw_video_guide.py compiled with schema-invalid positional widgets for nodes such as LTXVChunkFeedForward, LTX2AttentionTunerPatch, LTX2SamplingPreviewOverride, LTX2_NAG, ResizeImageMaskNode, LTXVAddGuide, and VHS_VideoCombine, plus missing Kijai LTX model assets.
Local tests had passed because schema resolution/gating was too weak or incomplete for production ready templates.
Current uncommitted VibeComfy work already starts fixing this by adding widget-schema aliases and LTX model assets/defaults. Preserve and integrate existing uncommitted user/agent work; do not revert unrelated changes.
Non-negotiable goals:
A minimal but strong workflow lifecycle/checklist should exist in agent-facing docs. It must cover four entry points: raw JSON import, existing ready template fix, fork of an existing template, and from-scratch Python workflow.
The checklist must clearly separate programmatic gates from agentic responsibilities:
Programmatic: port preflight, schema validation, unresolved widgets, required inputs/connections, unknown classes, node-pack suggestions, model asset declarations, output artifacts, index freshness, tests, worker contract validation, live RunPod evidence.
Agentic: source quality, choosing official/Kijai/community workflows, interpreting model provenance, deciding smoke adaptations, deciding whether missing nodes are legitimate custom nodes or helper/UI junk, comparing behavior to Wan2GP/app semantics, and documenting intentional differences.
The existing CLI/tooling should make that process harder to miss. Prefer thin wrappers or strict modes over a new parallel system. If already adequate, document and wire it. If inadequate, implement the smallest robust improvement.
Ready templates intended for production/app parity must not silently pass with unresolved positional widget_* fields where live Comfy requires named inputs. Add checks/tests for this class of issue.
Validate the process by running it on current workflows, especially the failing LTX raw video guide template and any nearby LTX Runexx templates. Use the process to fix real friction as you find it.
After local validation, run the relevant worker/VibeComfy checks and, where credentials/environment permit, rerun the focused RunPod live test from /tmp/reigh-worker:
PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 python -m scripts.live_test.main --variant fresh --backend vibecomfy --case travel_segment_ltx2_control_video_first_last --ref megaplan/vibecomfy-sprint-09-control-rail-travel-matrix --vibecomfy-ref megaplan/production-parity-templates --terminate
Do not leave stale pods. The worker has a terminate_guard.py janitor and --terminate; verify no reigh-live-test-fresh-* pods remain after any live run.
Do not claim 100% parity unless the contracts and actual RunPod runs prove it. If full 100% is blocked by time, GPU, credentials, model availability, or still-open unsupported workflow types, produce exact evidence and blockers.
RunPod/live tests are final end-to-end proof, not the first place obvious graph-shape errors appear.
Worker-side code should patch semantic fields, not know arbitrary widget_3 meanings. If you find ad hoc widget mapping in worker code that should live in VibeComfy, propose or implement a safe migration step.
The developer experience should be: “I want to onboard/fork/fix/build this workflow” -> run a small set of commands -> get a clear report -> fix what it says -> promote only after local checks and focused live evidence.
Concrete work to consider during prep and plan:
Inspect /tmp/vibecomfy/AGENTS.md, README, docs/adding_templates_models.md, docs/template_porting_workbench.md, docs/errors_and_doctor.md, CLI command implementations, schema validation, porting/widget alias code, ready-template tests, and the current uncommitted LTX changes.
Inspect /tmp/reigh-worker/scripts/capability_contracts, /tmp/reigh-worker/source/models/comfy/vibecomfy_adapter.py, worker live-test preflight, and docs/parity tracker to understand where VibeComfy checks should be invoked from the worker side.
Determine if a strict doctor/validate flag, a workflow readiness command, or better tests/docs are the right scope. Avoid overbuilding.
Add a concise lifecycle checklist to the skill/AGENTS docs and README/docs as appropriate. It should be memorable and usable, not a giant wall of prose.
Add tests that would have caught the latest failure before RunPod, such as ready-template compiled API should not contain unresolved widget_* for classes with known schema aliases, or strict mode requiring a schema for production ready templates.
Run local validation against all ready templates or a focused subset first, then broaden.
Apply any needed fixes to LTX raw guide and related templates.
Commit/push if appropriate only after green checks; otherwise leave exact status.
Current known commands useful for validation:
VibeComfy:
uv run python -m tools.refresh_template_index --check may work; if pyenv causes trouble, use PYENV_VERSION=3.11.11 python -m tools.refresh_template_index --check.
Remember: the deliverable is not just code or docs. It is a working, documented, repeatable workflow lifecycle process that we immediately use to continue moving toward VibeComfy/Wan2GP parity, with the LTX raw guide live failure as the first battle test.
code
Current plan (markdown):
# Implementation Plan: Generalized VibeComfy Workflow Lifecycle
Overview
Build a repeatable lifecycle that turns the current reference commands into enforceable gates for four entry points: raw JSON import, existing ready-template fix, ready-template fork, and from-scratch Python workflow. The smallest strong architecture is to tighten existing port check, validate, doctor, ready-template tests, and worker capability contracts rather than adding a new doctor.
Current evidence: validate ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py passes, the focused LTX ready-template test passes, doctor --json now catches missing Kijai LTX model assets, but port check/port widgets on the ready-template path currently crashes when AST-parsing READY_REQUIREMENTS = {"models": LTX_RUNEXX_MODEL_ASSETS, ...}. That crash must be fixed before the lifecycle can be a hard checklist.
Update Python metadata/requirements extraction so module-level literal constants referenced from READY_METADATA or READY_REQUIREMENTS do not crash port check and port widgets.
Prefer a narrow AST constant resolver for top-level literal assignments over importing arbitrary modules in the parser.
Add tests with a fixture using MODEL_ASSETS = [...], READY_METADATA = {"model_assets": MODEL_ASSETS}, and READY_REQUIREMENTS = {"models": MODEL_ASSETS}.
Step 2: Make unresolved positional widgets an explicit ready-template gate (vibecomfy/porting/workbench.py, vibecomfy/commands/validate.py, vibecomfy/commands/doctor.py)
Scope: Medium
Keep port check as the canonical workbench, but add a strict readiness mode or shared helper that promotes unresolved widget_* diagnostics to hard errors for production ready templates.
Gate on compiled API output, not just source widgets: any remaining widget_* for a class with known schema aliases or live schema-required named inputs should fail.
Include missing required inputs, unknown classes, invalid link shapes, helper diagnostics, model asset declarations, and save/output artifact mapping in the same readiness result.
Do not fail every legacy exploratory template solely for unknown custom-node schemas unless it is marked production/app-parity relevant.
Add a test that the failing LTX raw guide compiled API has no unresolved widget_* inputs for LTXVChunkFeedForward, LTX2AttentionTunerPatch, LTX2SamplingPreviewOverride, LTX2_NAG, ResizeImageMaskNode, LTXVAddGuide, and VHS_VideoCombine.
Add a generic ready-template strict test over production/app-parity template ids to catch unresolved positional widgets before RunPod.
Add a CLI regression proving port check ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json returns a structured report, not an AST traceback.
Phase 2: Battle-Test And Fix The LTX Target
Step 4: Preserve and finish current uncommitted LTX fixes (ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py, vibecomfy/porting/widget_schema.py, vibecomfy/porting/widget_aliases.py)
Scope: Medium
Preserve the current uncommitted alias additions and Kijai model asset declarations.
Verify the runtime schema defaults for VHS_VideoCombine, ResizeImageMaskNode, and LTX2 nodes match object-info or committed node-index expectations.
Apply the same alias/model-asset pattern to nearby Runexx LTX templates only when local reports show the same failure class.
Step 5: Run local lifecycle on the target and nearby templates
Add a concise “Workflow Lifecycle Gates” section with four paths:
raw Comfy JSON import;
existing ready-template fix;
fork existing ready-template into a variant;
from-scratch Python workflow.
Split each path into programmatic gates and agentic responsibilities.
Programmatic gates must name exact commands: port check, port widgets, validate, doctor, nodes install-plan, fetch --dry-run, index refresh, ready-template tests, worker contract validation, and focused RunPod/live evidence.
Agentic responsibilities must cover source quality, official vs Kijai/community choice, model provenance, helper/UI junk vs real custom nodes, smoke adaptations, Wan2GP/app semantic comparison, and intentional-difference docs.
Keep the docs short enough to be used during agent work; reference longer docs instead of duplicating all details.
Phase 4: Connect Worker Parity Without Moving Graph Validation Into Worker
Confirm scripts/capability_contracts.report continues to own product parity evidence only: route/task mapping, variant axes, artifact contracts, app inventory, and live evidence.
If needed, add a worker-side static check that invokes VibeComfy CLI for referenced template ids instead of reimplementing graph validation.
Avoid worker-side arbitrary widget_N semantics. Any discovered widget mapping in worker helpers should be migrated into VibeComfy schema aliases or template code, with worker patches restricted to semantic fields.
Regenerate/check docs/vibecomfy-app-parity-tracker.md after contract edits.
Inspect the generated live report and VibeComfy run metadata for selected artifact path, prompt id, model staging, and video contract evidence.
Verify no reigh-live-test-fresh-* pods remain using the live-test terminate guard/janitor.
Promote parity status only if static contracts and actual live output prove it; otherwise document exact blocker and evidence paths.
Execution Order
Fix the AST/parser crash first so all lifecycle commands can run on current ready templates.
Add strict widget/readiness checks and tests before broadening docs, so the checklist points at real gates.
Finish the LTX template fixes and run local lifecycle checks.
Update docs and worker contract hooks after the VibeComfy-owned gates are stable.
Run worker static checks, then RunPod only after cheap local checks are clean.
Validation Order
Focused unit tests for asset parsing and widget/readiness diagnostics.
Focused LTX ready-template test and CLI port check/validate/doctor commands.
Broader VibeComfy test groups and template index check.
Worker contract/report checks.
Focused RunPod live test and pod cleanup verification.
code
Current plan metadata:
{
"version": 1,
"timestamp": "2026-05-09T17:52:20Z",
"hash": "sha256:27d9c88ced8091409f15673c6c0803cf65a30552bd358002b9b4a3d129aa0402",
"questions": [
"Should the strict ready-template gate apply to every checked-in ready template immediately, or only templates marked coverage_tier: required / app-parity referenced until legacy exploratory templates are cleaned up?",
"If RunPod credentials are present but model downloads are slow or gated, should the implementation stop at static/local evidence or spend the time to resolve staging and rerun until the focused live case completes?",
"Should worker startup preflight block on VibeComfy static readiness for all supported contract templates, or should that remain a CI/contract-report gate to avoid slowing worker boot?"
],
"success_criteria": [
{
"criterion": "port check and port widgets on ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py return structured reports and do not crash on module-level model asset constants.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output"
]
},
{
"criterion": "Production/app-parity ready templates fail a local strict gate when compiled API contains unresolved widget_* inputs for classes with committed widget aliases or schema-required named inputs.",
"priority": "must",
"requires": [
"run_tests",
"run_shell",
"parse_diff"
]
},
{
"criterion": "The LTX raw video guide compiled API uses named inputs for the previously failing LTX/KJ/VHS nodes and declares URL-bearing Kijai LTX model assets.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": "Agent-facing docs describe the four workflow lifecycle entry points and separate programmatic gates from agentic responsibilities.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "Existing VibeComfy validation/doctor/port tooling remains the enforcement surface; no parallel replacement doctor is introduced.",
"priority": "must",
"requires": [
"parse_diff",
"read_files"
]
},
{
"criterion": "Focused VibeComfy tests for ready templates, porting, schema validation, doctor model checks, node install checks, and template index freshness pass.",
"priority": "must",
"requires": [
"run_tests",
"run_shell",
"read_build_output"
]
},
{
"criterion": "Worker capability contract checks render cleanly against the updated VibeComfy checkout, or exact contract drift is documented with source files to update.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"read_files"
]
},
{
"criterion": "The focused RunPod live test is rerun when credentials/environment permit, and no stale reigh-live-test-fresh-* pods remain afterward.",
"priority": "must",
"requires": [
"run_shell",
"observe_runtime_logs",
"read_build_output"
]
},
{
"criterion": "Any claim of parity is backed by both worker contract evidence and actual live RunPod output; otherwise blockers are recorded with concrete command output or report paths.",
"priority": "must",
"requires": [
"read_files",
"observe_runtime_logs",
"subjective_judgment"
]
},
{
"criterion": "The lifecycle checklist stays concise and points to detailed docs instead of duplicating long reference prose.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Worker-side changes avoid hard-coding arbitrary meanings and patch only semantic fields exposed by VibeComfy templates.",
"priority": "should",
"requires": [
"parse_diff",
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Nearby LTX Runexx templates are checked for the same failure class, with fixes limited to templates that actually report lifecycle blockers.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "RunPod model download latency, account limits, and gated Hugging Face assets may affect live validation timing.",
"priority": "info",
"requires": [
"observe_runtime_logs"
]
}
],
"assumptions": [
"The implementation should preserve current uncommitted changes in the LTX template, widget aliases/schema, doctor, and ready-template tests unless a real conflict is found.",
" is the active VibeComfy checkout corresponding to in the brief, and is available for worker checks.",
" is the intended Python environment for both repositories.",
"Network and RunPod credentials may be unavailable in the execution environment; local/static gates still need to be completed and any live blocker documented exactly.",
"Strict readiness should initially target production/app-parity templates rather than breaking every legacy exploratory ready template at once, unless the user confirms all ready templates must be hard-gated immediately."
],
"structure_warnings": []
}
code
Gate summary:
{
"passed": false,
"criteria_check": {
"count": 13,
"items": [
{
"criterion": "port check and port widgets on ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py return structured reports and do not crash on module-level model asset constants.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output"
]
},
{
"criterion": "Production/app-parity ready templates fail a local strict gate when compiled API contains unresolved widget_* inputs for classes with committed widget aliases or schema-required named inputs.",
"priority": "must",
"requires": [
"run_tests",
"run_shell",
"parse_diff"
]
},
{
"criterion": "The LTX raw video guide compiled API uses named inputs for the previously failing LTX/KJ/VHS nodes and declares URL-bearing Kijai LTX model assets.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": "Agent-facing docs describe the four workflow lifecycle entry points and separate programmatic gates from agentic responsibilities.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "Existing VibeComfy validation/doctor/port tooling remains the enforcement surface; no parallel replacement doctor is introduced.",
"priority": "must",
"requires": [
"parse_diff",
"read_files"
]
},
{
"criterion": "Focused VibeComfy tests for ready templates, porting, schema validation, doctor model checks, node install checks, and template index freshness pass.",
"priority": "must",
"requires": [
"run_tests",
"run_shell",
"read_build_output"
]
},
{
"criterion": "Worker capability contract checks render cleanly against the updated VibeComfy checkout, or exact contract drift is documented with source files to update.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"read_files"
]
},
{
"criterion": "The focused RunPod live test is rerun when credentials/environment permit, and no stale reigh-live-test-fresh-* pods remain afterward.",
"priority": "must",
"requires": [
"run_shell",
"observe_runtime_logs",
"read_build_output"
]
},
{
"criterion": "Any claim of parity is backed by both worker contract evidence and actual live RunPod output; otherwise blockers are recorded with concrete command output or report paths.",
"priority": "must",
"requires": [
"read_files",
"observe_runtime_logs",
"subjective_judgment"
]
},
{
"criterion": "The lifecycle checklist stays concise and points to detailed docs instead of duplicating long reference prose.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Worker-side changes avoid hard-coding arbitrary widget_N meanings and patch only semantic fields exposed by VibeComfy templates.",
"priority": "should",
"requires": [
"parse_diff",
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Nearby LTX Runexx templates are checked for the same failure class, with fixes limited to templates that actually report lifecycle blockers.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "RunPod model download latency, account limits, and gated Hugging Face assets may affect live validation timing.",
"priority": "info",
"requires": [
"observe_runtime_logs"
]
}
]
},
"preflight_results": {
"project_dir_exists": true,
"project_dir_writable": true,
"success_criteria_present": true,
"claude_available": true,
"codex_available": true
},
"unresolved_flags": [
{
"id": "VIBECOMFY-001",
"concern": "Workflow readiness: strict widget checks will fail the current LTX target unless compile/template code removes raw inputs after adding named aliases.",
"category": "correctness",
"severity_hint": "likely-significant",
"evidence": "Compiled and observed nodes such as , , , , , and still contain inputs alongside named inputs.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "WORKER-001",
"concern": "Worker parity boundary: worker adapter still embeds many arbitrary meanings, so the lifecycle/process work should include an explicit audit or deferral rather than leaving Step 7 conditional.",
"category": "maintainability",
"severity_hint": "uncertain",
"evidence": " maps numerous fields from , , etc. in and writes positional widget slots in LoRA helper functions.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "issue_hints",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Output artifact contracts are listed in the plan as a programmatic gate, but the concrete implementation/test steps mostly focus on widget aliases, schema validation, model assets, and path mapping warnings. The existing only warns when save paths escape a configured output directory, so the plan should add a specific readiness assertion that production templates expose expected and save-node artifact semantics, not just mention output artifacts in the checklist.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "Output artifact contracts are listed in the plan as a programmatic gate, but the concrete implementation/test steps mostly focus on widget aliases, schema validation, model assets, and path mapping warnings. The existing only warns when save paths escape a configured output directory, so the plan should add a specific readiness assertion that production templates expose expected and save-node artifact semantics, not just mention output artifacts in the checklist.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "correctness",
"concern": "Are the proposed changes technically correct?: Verified the reported LTX failure class against the current template by compiling : the named aliases now exist for nodes such as , , , , and , but most of those nodes still retain raw inputs in the compiled API alongside the named inputs. The plan's strict compiled-API gate is correct, but it must be paired with a compile/template change that removes or rewrites those raw positional keys; otherwise the new strict test will correctly fail the current target template.",
"category": "correctness",
"severity_hint": "likely-significant",
"evidence": "Verified the reported LTX failure class against the current template by compiling : the named aliases now exist for nodes such as , , , , and , but most of those nodes still retain raw inputs in the compiled API alongside the named inputs. The plan's strict compiled-API gate is correct, but it must be paired with a compile/template change that removes or rewrites those raw positional keys; otherwise the new strict test will correctly fail the current target template.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "scope",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Searched the worker adapter and found substantial widget-position knowledge in , including mapping many fields to semantic names and dynamic LoRA helpers writing , , and related slots. The plan mentions avoiding worker-side arbitrary widget mappings only as a conditional Step 7 activity; given the actual codebase, this needs a concrete audit/migration decision or an explicit documented deferral so the same lifecycle gap does not remain on the worker side.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "Searched the worker adapter and found substantial widget-position knowledge in , including mapping many fields to semantic names and dynamic LoRA helpers writing , , and related slots. The plan mentions avoiding worker-side arbitrary widget mappings only as a conditional Step 7 activity; given the actual codebase, this needs a concrete audit/migration decision or an explicit documented deferral so the same lifecycle gap does not remain on the worker side.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "all_locations",
"concern": "Does the change touch all locations AND supporting infrastructure?: Found two AST metadata extraction paths: , used by and , and , a legacy/public extractor covered by . The plan names both implementation files, but its test wording only describes a generic fixture; it should explicitly require the constant-reference fixture to exercise both extractors because the current still raises on .",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "Found two AST metadata extraction paths: , used by and , and , a legacy/public extractor covered by . The plan names both implementation files, but its test wording only describes a generic fixture; it should explicitly require the constant-reference fixture to exercise both extractors because the current still raises on .",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "callers",
"concern": "Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?: Checked model asset callers and found and usually load ready templates through and read , while is still a public helper and test target. That means fixing only the porting extractor may make pass while leaving a related scratchpad asset path broken; the plan should keep the fix in scope even if current CLI smoke tests do not hit it.",
"category": "correctness",
"severity_hint": "likely-significant",
"evidence": "Checked model asset callers and found and usually load ready templates through and read , while is still a public helper and test target. That means fixing only the porting extractor may make pass while leaving a related scratchpad asset path broken; the plan should keep the fix in scope even if current CLI smoke tests do not hit it.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
}
],
"recommendation": "ITERATE",
"rationale": "Revise the plan once before execution. The current direction is strong, but the critiques identify concrete gaps that would cause the implementation to either fail its own new gates or leave key lifecycle gaps unresolved. In particular, the plan must explicitly pair strict unresolved-widget checks with a compile/template cleanup that removes raw keys, cover both model asset extraction paths, add an output artifact readiness assertion, and make the worker-side widget mapping audit/deferral concrete.",
"signals_assessment": "Weighted score is high at 9.25 and preflight is healthy, so the plan is close. However, there are seven unresolved significant flags from the first iteration, with specific evidence against current files and behavior. These are not philosophical tradeoffs or recurring churn, and no tiebreaker threshold is met; they are actionable plan-quality issues that should be incorporated before proceeding.",
"warnings": [
"Do not run the implementation until the strict widget gate includes the corresponding rewrite/removal path for compiled inputs.",
"Keep strict readiness initially scoped to production/app-parity templates unless the user explicitly wants all legacy ready templates hard-gated immediately.",
"RunPod/live validation should remain conditional on credentials and model availability, with exact blockers recorded if it cannot complete."
],
"settled_decisions": [
{
"id": "tooling-surface",
"decision": "Use existing , , , , ready-template tests, worker contract reports, and RunPod live tests as the lifecycle enforcement surface.",
"rationale": "The brief explicitly rejects a new parallel doctor, and the plan\u2019s architecture correctly keeps VibeComfy graph correctness in existing VibeComfy tooling."
},
{
"id": "strict-scope",
"decision": "Apply strict readiness first to production/app-parity ready templates rather than every checked-in exploratory template.",
"rationale": "This avoids breaking legacy exploratory templates while closing the production parity gap that caused the LTX RunPod failure."
},
{
"id": "ownership-boundary",
"decision": "VibeComfy owns graph/widget/schema/model/output readiness; Reigh worker owns app capability parity and live evidence.",
"rationale": "This boundary prevents worker code from becoming the place where arbitrary Comfy meanings are patched."
}
],
"override_forced": false,
"orchestrator_guidance": "First iteration; follow gate recommendation: ITERATE. Verify unresolved flags against the plan and project code before accepting.",
"robustness": "standard",
"signals": {
"iteration": 1,
"idea": "Build and battle-test a generalized VibeComfy workflow lifecycle process that works for all ways developers and agents actually work with workflows: importing raw Comfy JSON, fixing an existing ready template, forking an existing ready template into a variant, and authoring a workflow from scratch. This must solve the systematic process gap we just hit: converted workflows can look locally valid but still carry unresolved positional inputs, missing live Comfy schema bindings, missing required node inputs, missing model asset declarations, weak output artifact contracts, or missing worker/app parity evidence until a costly RunPod run fails.\n\nContext and current state:\n- VibeComfy repo is , branch .\n- Worker repo is , branch .\n- Use in both repos.\n- Worker is blocked on macOS ARM by locked ; worker tests/harness usually need .\n- Existing VibeComfy tools already include , , , , , schema providers with runtime cache support, ready-template index refresh, node-pack catalog, model registry, and RunPod corpus tooling.\n- Existing docs already include , , , , and . These mention the commands but are more reference-like than a hard agent operating checklist.\n- The right direction is not a brand-new parallel doctor. It is to tighten and connect existing tools: strict ready-template gates, schema-required modes, unresolved-widget checks, model/output requirements, app parity contracts, and documentation that tells agents when/how to use each path.\n\nRecent concrete failure that motivates this:\n- A RunPod live test for using VibeComfy failed because compiled with schema-invalid positional widgets for nodes such as , , , , , , and , plus missing Kijai LTX model assets.\n- Local tests had passed because schema resolution/gating was too weak or incomplete for production ready templates.\n- Current uncommitted VibeComfy work already starts fixing this by adding widget-schema aliases and LTX model assets/defaults. Preserve and integrate existing uncommitted user/agent work; do not revert unrelated changes.\n\nNon-negotiable goals:\n1. A minimal but strong workflow lifecycle/checklist should exist in agent-facing docs. It must cover four entry points: raw JSON import, existing ready template fix, fork of an existing template, and from-scratch Python workflow.\n2. The checklist must clearly separate programmatic gates from agentic responsibilities:\n - Programmatic: port preflight, schema validation, unresolved widgets, required inputs/connections, unknown classes, node-pack suggestions, model asset declarations, output artifacts, index freshness, tests, worker contract validation, live RunPod evidence.\n - Agentic: source quality, choosing official/Kijai/community workflows, interpreting model provenance, deciding smoke adaptations, deciding whether missing nodes are legitimate custom nodes or helper/UI junk, comparing behavior to Wan2GP/app semantics, and documenting intentional differences.\n3. The existing CLI/tooling should make that process harder to miss. Prefer thin wrappers or strict modes over a new parallel system. If already adequate, document and wire it. If inadequate, implement the smallest robust improvement.\n4. Ready templates intended for production/app parity must not silently pass with unresolved positional fields where live Comfy requires named inputs. Add checks/tests for this class of issue.\n5. Validate the process by running it on current workflows, especially the failing LTX raw video guide template and any nearby LTX Runexx templates. Use the process to fix real friction as you find it.\n6. After local validation, run the relevant worker/VibeComfy checks and, where credentials/environment permit, rerun the focused RunPod live test from :\n \n Do not leave stale pods. The worker has a janitor and ; verify no pods remain after any live run.\n7. Do not claim 100% parity unless the contracts and actual RunPod runs prove it. If full 100% is blocked by time, GPU, credentials, model availability, or still-open unsupported workflow types, produce exact evidence and blockers.\n\nWhat good looks like architecturally:\n- VibeComfy owns workflow correctness: import, widget alias resolution, schema validation, model/node requirements, output artifact declarations, ready-template metadata.\n- Reigh worker owns app capability parity: route/task mapping, semantic runtime patching, LoRA/control/video/image variable behavior, product artifact contract, live evidence.\n- RunPod/live tests are final end-to-end proof, not the first place obvious graph-shape errors appear.\n- Worker-side code should patch semantic fields, not know arbitrary meanings. If you find ad hoc widget mapping in worker code that should live in VibeComfy, propose or implement a safe migration step.\n- The developer experience should be: \u201cI want to onboard/fork/fix/build this workflow\u201d -> run a small set of commands -> get a clear report -> fix what it says -> promote only after local checks and focused live evidence.\n\nConcrete work to consider during prep and plan:\n- Inspect , README, , , , CLI command implementations, schema validation, porting/widget alias code, ready-template tests, and the current uncommitted LTX changes.\n- Inspect , , worker live-test preflight, and docs/parity tracker to understand where VibeComfy checks should be invoked from the worker side.\n- Determine if a strict / flag, a command, or better tests/docs are the right scope. Avoid overbuilding.\n- Add a concise lifecycle checklist to the skill/AGENTS docs and README/docs as appropriate. It should be memorable and usable, not a giant wall of prose.\n- Add tests that would have caught the latest failure before RunPod, such as ready-template compiled API should not contain unresolved for classes with known schema aliases, or strict mode requiring a schema for production ready templates.\n- Run local validation against all ready templates or a focused subset first, then broaden.\n- Apply any needed fixes to LTX raw guide and related templates.\n- Commit/push if appropriate only after green checks; otherwise leave exact status.\n\nCurrent known commands useful for validation:\nVibeComfy:\n- \n- \n- may work; if pyenv causes trouble, use .\n- \n- \nWorker:\n- \n- \n- \n\nRemember: the deliverable is not just code or docs. It is a working, documented, repeatable workflow lifecycle process that we immediately use to continue moving toward VibeComfy/Wan2GP parity, with the LTX raw guide live failure as the first battle test.",
"significant_flags": 7,
"unresolved_flags": [
{
"id": "VIBECOMFY-001",
"concern": "Workflow readiness: strict widget checks will fail the current LTX target unless compile/template code removes raw inputs after adding named aliases.",
"category": "correctness",
"severity": "significant",
"status": "open"
},
{
"id": "WORKER-001",
"concern": "Worker parity boundary: worker adapter still embeds many arbitrary meanings, so the lifecycle/process work should include an explicit audit or deferral rather than leaving Step 7 conditional.",
"category": "maintainability",
"severity": "significant",
"status": "open"
},
{
"id": "issue_hints",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Output artifact contracts are listed in the plan as a programmatic gate, but the concrete implementation/test steps mostly focus on widget aliases, schema validation, model assets, and path mapping warnings. The existing only warns when save paths escape a configured output directory, so the plan should add a specific readiness assertion that production templates expose expected and save-node artifact semantics, not just mention output artifacts in the checklist.",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "correctness",
"concern": "Are the proposed changes technically correct?: Verified the reported LTX failure class against the current template by compiling : the named aliases now exist for nodes such as , , , , and , but most of those nodes still retain raw inputs in the compiled API alongside the named inputs. The plan's strict compiled-API gate is correct, but it must be paired with a compile/template change that removes or rewrites those raw positional keys; otherwise the new strict test will correctly fail the current target template.",
"category": "correctness",
"severity": "significant",
"status": "open"
},
{
"id": "scope",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Searched the worker adapter and found substantial widget-position knowledge in , including mapping many fields to semantic names and dynamic LoRA helpers writing , , and related slots. The plan mentions avoiding worker-side arbitrary widget mappings only as a conditional Step 7 activity; given the actual codebase, this needs a concrete audit/migration decision or an explicit documented deferral so the same lifecycle gap does not remain on the worker side.",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "all_locations",
"concern": "Does the change touch all locations AND supporting infrastructure?: Found two AST metadata extraction paths: , used by and , and , a legacy/public extractor covered by . The plan names both implementation files, but its test wording only describes a generic fixture; it should explicitly require the constant-reference fixture to exercise both extractors because the current still raises on .",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "callers",
"concern": "Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?: Checked model asset callers and found and usually load ready templates through and read , while is still a public helper and test target. That means fixing only the porting extractor may make pass while leaving a related scratchpad asset path broken; the plan should keep the fix in scope even if current CLI smoke tests do not hit it.",
"category": "correctness",
"severity": "significant",
"status": "open"
}
],
"resolved_flags": [],
"weighted_score": 9.25,
"weighted_history": [],
"plan_delta_from_previous": null,
"recurring_critiques": [],
"scope_creep_flags": [],
"loop_summary": "Iteration 1. Weighted score trajectory: 9.25. Plan deltas: n/a. Recurring critiques: 0. Resolved flags: 0. Open significant flags: 7.",
"debt_overlaps": [],
"escalated_debt_subsystems": []
},
"flag_resolutions": [],
"resolved_flag_ids": [],
"resolution_summary": "",
"reprompted": false
}
code
Open significant flags:
[
{
"id": "VIBECOMFY-001",
"severity": "significant",
"status": "open",
"concern": "Workflow readiness: strict widget checks will fail the current LTX target unless compile/template code removes raw widget_* inputs after adding named aliases.",
"evidence": "Compiled video/ltx2_3_runexx_first_last_raw_video_guide and observed nodes such as 197 LTX2_NAG, 198 LTX2SamplingPreviewOverride, 228 LTXVChunkFeedForward, 229 LTX2AttentionTunerPatch, 2152 LTXVAddGuide, and 6101 ResizeImageMaskNode still contain widget_* inputs alongside named inputs."
},
{
"id": "WORKER-001",
"severity": "significant",
"status": "open",
"concern": "Worker parity boundary: worker adapter still embeds many arbitrary widget_N meanings, so the lifecycle/process work should include an explicit audit or deferral rather than leaving Step 7 conditional.",
"evidence": "/tmp/reigh-worker/source/models/comfy/vibecomfy_adapter.py maps numerous fields from widget_0, widget_1, etc. in _patch_wanvideo_defaults and writes positional widget slots in LoRA helper functions."
},
{
"id": "issue_hints",
"severity": "significant",
"status": "open",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Output artifact contracts are listed in the plan as a programmatic gate, but the concrete implementation/test steps mostly focus on widget aliases, schema validation, model assets, and path mapping warnings. The existing analyze_source only warns when save paths escape a configured output directory, so the plan should add a specific readiness assertion that production templates expose expected workflow.outputs and save-node artifact semantics, not just mention output artifacts in the checklist.",
"evidence": "Output artifact contracts are listed in the plan as a programmatic gate, but the concrete implementation/test steps mostly focus on widget aliases, schema validation, model assets, and path mapping warnings. The existing analyze_source only warns when save paths escape a configured output directory, so the plan should add a specific readiness assertion that production templates expose expected workflow.outputs and save-node artifact semantics, not just mention output artifacts in the checklist."
},
{
"id": "correctness",
"severity": "significant",
"status": "open",
"concern": "Are the proposed changes technically correct?: Verified the reported LTX failure class against the current template by compiling video/ltx2_3_runexx_first_last_raw_video_guide: the named aliases now exist for nodes such as LTXVChunkFeedForward, LTX2_NAG, LTXVAddGuide, ResizeImageMaskNode, and , but most of those nodes still retain raw inputs in the compiled API alongside the named inputs. The plan's strict compiled-API gate is correct, but it must be paired with a compile/template change that removes or rewrites those raw positional keys; otherwise the new strict test will correctly fail the current target template.",
"evidence": "Verified the reported LTX failure class against the current template by compiling : the named aliases now exist for nodes such as , , , , and , but most of those nodes still retain raw inputs in the compiled API alongside the named inputs. The plan's strict compiled-API gate is correct, but it must be paired with a compile/template change that removes or rewrites those raw positional keys; otherwise the new strict test will correctly fail the current target template."
},
{
"id": "scope",
"severity": "significant",
"status": "open",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Searched the worker adapter and found substantial widget-position knowledge in , including mapping many fields to semantic names and dynamic LoRA helpers writing , , and related slots. The plan mentions avoiding worker-side arbitrary widget mappings only as a conditional Step 7 activity; given the actual codebase, this needs a concrete audit/migration decision or an explicit documented deferral so the same lifecycle gap does not remain on the worker side.",
"evidence": "Searched the worker adapter and found substantial widget-position knowledge in , including mapping many fields to semantic names and dynamic LoRA helpers writing , , and related slots. The plan mentions avoiding worker-side arbitrary widget mappings only as a conditional Step 7 activity; given the actual codebase, this needs a concrete audit/migration decision or an explicit documented deferral so the same lifecycle gap does not remain on the worker side."
},
{
"id": "all_locations",
"severity": "significant",
"status": "open",
"concern": "Does the change touch all locations AND supporting infrastructure?: Found two AST metadata extraction paths: , used by and , and , a legacy/public extractor covered by . The plan names both implementation files, but its test wording only describes a generic fixture; it should explicitly require the constant-reference fixture to exercise both extractors because the current still raises on .",
"evidence": "Found two AST metadata extraction paths: , used by and , and , a legacy/public extractor covered by . The plan names both implementation files, but its test wording only describes a generic fixture; it should explicitly require the constant-reference fixture to exercise both extractors because the current still raises on ."
},
{
"id": "callers",
"severity": "significant",
"status": "open",
"concern": "Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?: Checked model asset callers and found and usually load ready templates through and read , while is still a public helper and test target. That means fixing only the porting extractor may make pass while leaving a related scratchpad asset path broken; the plan should keep the fix in scope even if current CLI smoke tests do not hit it.",
"evidence": "Checked model asset callers and found and usually load ready templates through and read , while is still a public helper and test target. That means fixing only the porting extractor may make pass while leaving a related scratchpad asset path broken; the plan should keep the fix in scope even if current CLI smoke tests do not hit it."
}
]
code
Requirements:
- Before addressing individual flags, check: does any flag suggest the plan is targeting the wrong code or the wrong root cause? If so, consider whether the plan needs a new approach rather than adjustments. Explain your reasoning.
- Update the plan to address the significant issues.
- Keep the plan readable and executable.
- Return flags_addressed with the exact flag IDs you addressed.
- Include `changes_summary` as a short plain-English summary of what changed in the revision. If there were no concrete flags, say that explicitly (for example: `No critique flags were raised; refined wording and kept the plan aligned for execution.`).
- Preserve or improve success criteria quality. Each criterion must have a `priority` of `must`, `should`, or `info`. Promote or demote priorities if critique feedback reveals a criterion was over- or under-weighted.
- Each success criterion should include a `requires` field listing the capabilities needed for verification. Valid capability strings: `run_shell`, `read_files`, `run_tests`, `parse_diff`, `read_build_output`, `run_linter` (container), `drive_browser`, `inspect_runtime_ui`, `observe_runtime_logs`, `subjective_judgment`, `verify_physical_device` (human). `must` criteria MUST have non-empty `requires`. Example: `{"criterion": "All tests pass", "priority": "must", "requires": ["run_tests"]}`.
- Verify that the plan remains aligned with the user's original intent, not just internal plan quality.
- Remove unjustified scope growth. If critique raised scope creep, narrow the plan back to the original idea unless the broader work is strictly required.
- Maintain the structural template: H1 title, ## Overview, phase sections with numbered step sections, ## Execution Order or ## Validation Order.
- CRITICAL: Your entire revised plan markdown (all sections) must be output as the `plan` field in the structured output. The prose response must not contain the plan text.
- CRITICAL: Return only the structured JSON object for the schema fields `plan`, `changes_summary`, `flags_addressed`, `assumptions`, `success_criteria`, and `questions`. Do not add commentary before or after the JSON object.
Plan template — simple format (adapt to the actual repo and scope):
md
# Implementation Plan: [Title]
## Overview
Summarize the goal, current repository shape, and the constraints that matter.
## Main Phase
### Step 1: Audit the current behavior (`megaplan/prompts.py`)
**Scope:** Small
1. **Inspect** the current implementation and call out the exact insertion points (`megaplan/prompts.py:29`).
### Step 2: Add the first change (`megaplan/evaluation.py`)
**Scope:** Medium
1. **Implement** the smallest viable change with exact file references (`megaplan/evaluation.py:1`).
2. **Capture** any tricky behavior with a short example.
```python
issues = validate_plan_structure(plan_text)
```
### Step 3: Wire downstream behavior (`megaplan/handlers.py`, `megaplan/workers.py`)
**Scope:** Medium
1. **Update** the runtime flow in the touched files (`megaplan/handlers.py:400`, `megaplan/workers.py:199`).
### Step 4: Prove the change (`tests/test_evaluation.py`, `tests/test_megaplan.py`)
**Scope:** Small
1. **Run** the cheapest targeted checks first (`tests/test_evaluation.py:1`).
2. **Finish** with broader verification once the wiring is in place (`tests/test_megaplan.py:1`).
## Execution Order
1. Update prompts and mocks before enforcing stricter validation.
2. Land higher-risk wiring after the validator and tests are ready.
## Validation Order
1. Start with focused unit tests.
2. Run the broader suite after the flow changes are in place.
For complex plans, use multiple phases:
md
## Phase 1: Foundation — Dependencies, DB, Types
### Step 1: Install dependencies (`package.json`)
...
### Step 2: Create database migration (`supabase/migrations/`)
...
## Phase 2: Core Integration
### Step 3: Port the main component (`src/components/`)
...
Template guidance:
Simple plans: use ## Main Phase with ### Step N: sections underneath.
Complex plans: use multiple ## Phase N: sections, each containing ### Step N: steps. Step numbers are global (not per-phase).
The flat ## Step N: format (without phases) also works for backwards compatibility.
Key invariants: one H1 title, one ## Overview, numbered step sections (### Step N: or ## Step N:), and at least one ordering section.
{
"plan": "# Implementation Plan: Generalized VibeComfy Workflow Lifecycle\n\n## Overview\nBuild a repeatable lifecycle that turns existing VibeComfy commands into enforceable gates for four developer paths: raw Comfy JSON import, existing ready-template fix, ready-template fork, and from-scratch Python workflow. The root cause is not a missing standalone doctor; the failure happened because existing port/schema/model/output checks were not wired into a strict production-readiness path, and compiled API output could retain positional widget_* keys even after named aliases were added.\n\nThe revised approach stays on the original ownership boundary: VibeComfy owns graph correctness, widget alias resolution, schema validation, model/node requirements, output artifact declarations, and ready-template metadata; Reigh worker owns product route parity, semantic runtime patching, artifact contracts, and live evidence. The implementation should tighten existing port check, port widgets, validate, doctor, ready-template tests, worker contract reports, and RunPod/live checks. It must not add a parallel doctor.\n\nCurrent evidence to preserve: uncommitted work already adds LTX widget aliases, LTX model assets/defaults, doctor helper filtering, and focused ready-template assertions. Critique feedback adds four concrete corrections: remove raw positional widget keys from compiled API after aliasing, fix both AST model-asset extractors, add explicit output artifact readiness assertions, and make the worker-side widget_N audit a concrete deliverable rather than a conditional aside.\n\n## Phase 1: Repair The Existing Preflight Surface\n\n### Step 1: Fix Python ready-template asset parsing (vibecomfy/porting/assets.py, vibecomfy/model_assets.py)\nScope: Small\n1. Add a narrow AST literal resolver for top-level constant assignments so READY_METADATA and READY_REQUIREMENTS may reference module constants such as LTX_RUNEXX_MODEL_ASSETS without raising ValueError.\n2. Apply the resolver to both extraction paths: metadata_from_python_module() in vibecomfy/porting/assets.py and entries_from_scratchpad_path() in vibecomfy/model_assets.py.\n3. Do not import ready-template modules for this extraction; keep parsing side-effect-free.\n4. Add tests in both tests/test_porting_assets.py or tests/test_porting_workbench.py and tests/test_model_assets.py using a fixture with:\n python\n MODEL_ASSETS = [{\"name\": \"model.safetensors\", \"url\": \"https://example.test/model.safetensors\", \"subdir\": \"diffusion_models\"}]\n READY_METADATA = {\"model_assets\": MODEL_ASSETS}\n READY_REQUIREMENTS = {\"models\": MODEL_ASSETS}\n \n\n### Step 2: Rewrite compiled positional widgets after aliasing (vibecomfy/porting/widget_aliases.py, vibecomfy/workflow.py)\nScope: Medium\n1. Change compile-time widget aliasing so when widget_N maps to a named input, the compiled API contains only the named input unless the widget is explicitly marked unused/retained.\n2. Keep behavior conservative: do not remove unresolved widget_N keys when no alias is known; those should remain visible for diagnostics.\n3. Add a small helper such as rewrite_positional_widget_aliases(inputs, class_type) that returns a cleaned input dict, then use it from _compile_node_inputs().\n4. Add regression coverage proving the LTX target no longer emits both widget_N and named aliases for LTXVChunkFeedForward, LTX2AttentionTunerPatch, LTX2SamplingPreviewOverride, LTX2_NAG, ResizeImageMaskNode, LTXVAddGuide, and VHS_VideoCombine.\n\n### Step 3: Add strict production readiness checks to existing tooling (vibecomfy/porting/workbench.py, vibecomfy/commands/validate.py, vibecomfy/commands/doctor.py)\nScope: Medium\n1. Keep port check as the canonical workbench, but add a strict readiness mode or shared helper used by CLI/tests for production/app-parity ready templates.\n2. Gate on compiled API output after alias cleanup: remaining widget_* inputs fail when the class has committed widget aliases or schema-required named inputs.\n3. Gate on schema validation issues that are already available: missing required inputs, unknown runtime classes, invalid link shapes, unresolved helper diagnostics, and hard compile failures.\n4. Keep strict readiness initially scoped to production/app-parity templates, such as manifest coverage_tier: required and/or templates referenced by worker contracts. Do not hard-fail all legacy exploratory ready templates in this batch.\n5. Preserve non-strict validate behavior for ordinary scratchpads unless a strict flag or production-readiness command is requested.\n\n### Step 4: Add explicit output artifact readiness assertions (vibecomfy/porting/workbench.py, vibecomfy/metadata.py, tests/test_porting_workbench.py, tests/test_ready_templates.py)\nScope: Medium\n1. Extend strict readiness to require at least one declared workflow.outputs entry for production ready templates.\n2. Require output nodes to compile with save/artifact semantics that downstream tools can map: save node class present, expected filename/output fields named after alias cleanup, and no configured save path escaping output_directory.\n3. For video templates, assert the compiled output node exposes the relevant video save fields, including filename_prefix, format, and save_output when the node schema/alias table supports them.\n4. Keep existing save-path escape diagnostics as warnings outside strict production readiness.\n\n## Phase 2: Battle-Test And Fix The LTX Target\n\n### Step 5: Preserve and finish current LTX fixes (ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py, vibecomfy/porting/widget_schema.py, vibecomfy/porting/widget_aliases.py)\nScope: Medium\n1. Preserve current uncommitted aliases, runtime defaults, and Kijai model asset declarations unless they conflict with live schema evidence.\n2. Verify the runtime defaults for VHS_VideoCombine, ResizeImageMaskNode, and LTX2 nodes match committed schema aliases or object-info/node-index evidence.\n3. After compile cleanup, assert the target API has named inputs and no raw widget_* inputs for the previously failing classes.\n4. Run the same strict/local report on nearby ready_templates/video/ltx2_3_runexx_*.py templates. Apply alias/model/output fixes only to templates that report the same production-readiness blockers.\n\n### Step 6: Add focused regression tests (tests/test_ready_templates.py, tests/test_porting_workbench.py, tests/test_schema_validate.py, tests/test_cli.py)\nScope: Medium\n1. Add a focused LTX raw-guide test for named compiled inputs, absent raw widget_* keys on aliased classes, declared URL-bearing Kijai assets, and output artifact fields.\n2. Add a generic strict-readiness test over production/app-parity ready template ids.\n3. Add a CLI regression proving port check ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json and port widgets ... --json return structured reports, not AST tracebacks.\n4. Add a negative fixture proving a production ready template with a compiled unresolved widget_0 on a known schema class fails strict readiness.\n\n### Step 7: Run local lifecycle on the target and nearby templates\nScope: Medium\n1. Run cheap target checks first:\n bash\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli port check ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli port widgets ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli validate ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py\n PYENV_VERSION=3.11.11 python -m vibecomfy.cli doctor ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py --json\n \n2. Treat missing local model files as expected local evidence only when URL-bearing declarations are present and fetch --dry-run can report the assets.\n3. Record exact local blockers before any RunPod attempt.\n\n## Phase 3: Document The Lifecycle As An Agent Checklist\n\n### Step 8: Add the concise checklist (AGENTS.md, README.md, docs/adding_templates_models.md, docs/template_porting_workbench.md, ready_templates/README.md)\nScope: Medium\n1. Add a short “Workflow Lifecycle Gates” section covering four paths: raw JSON import, existing ready-template fix, fork existing ready template, and from-scratch Python workflow.\n2. Split each path into programmatic gates and agentic responsibilities.\n3. Programmatic gates must name exact commands: port check, port widgets, strict readiness/validate, doctor, nodes install-plan, fetch --dry-run, index refresh, ready-template tests, worker contract validation, and focused RunPod/live evidence.\n4. Agentic responsibilities must cover source quality, official vs Kijai/community choice, model provenance, helper/UI junk vs real custom nodes, smoke adaptations, Wan2GP/app semantic comparison, output artifact expectations, and intentional-difference docs.\n5. Keep this as an operating checklist, not a long reference rewrite. Link to existing detailed docs for full command explanations.\n\n## Phase 4: Connect Worker Parity Without Moving Graph Validation Into Worker\n\n### Step 9: Audit worker-side positional widget knowledge (/tmp/reigh-worker/source/models/comfy/vibecomfy_adapter.py, /tmp/reigh-worker/scripts/capability_contracts)\nScope: Medium\n1. Make a concrete inventory of worker code that reads or writes arbitrary widget_N fields, including _patch_wanvideo_defaults and dynamic LoRA helpers.\n2. Classify each occurrence as one of:\n - migrate now into VibeComfy aliases/template semantic fields;\n - acceptable temporary compatibility shim because VibeComfy does not yet expose the semantic field;\n - unrelated generated scratchpad code.\n3. For migrate-now cases, update VibeComfy alias/template code and worker calls to use named semantic fields.\n4. For deferred cases, add an explicit contract note or TODO with owner and condition for removal. Do not leave the issue implicit.\n\n### Step 10: Strengthen worker contract validation at the boundary (/tmp/reigh-worker/scripts/capability_contracts, /tmp/reigh-worker/source/runtime/worker/preflight.py)\nScope: Medium\n1. Keep scripts.capability_contracts.report responsible for product parity evidence: route/task mapping, variant axes, artifact contracts, app inventory, and live evidence.\n2. If worker-side static validation is added, invoke VibeComfy CLI/readiness for referenced template ids; do not reimplement graph validation in worker code.\n3. Ensure worker artifact contracts remain product-level contracts, while VibeComfy strict readiness verifies graph-level output declarations.\n4. Regenerate or check docs/vibecomfy-app-parity-tracker.md after contract source edits.\n\n## Phase 5: Validation And Live Evidence\n\n### Step 11: Run focused VibeComfy tests\nScope: Medium\n1. Run focused tests for the changed surfaces first:\n bash\n PYENV_VERSION=3.11.11 python -m pytest tests/test_model_assets.py tests/test_porting_assets.py tests/test_porting_workbench.py tests/test_ready_templates.py::test_ltx_first_last_raw_video_guide_exposes_worker_patch_points -q\n \n2. Then run broader VibeComfy checks:\n bash\n PYENV_VERSION=3.11.11 python -m pytest tests/test_ready_templates.py tests/test_workflow_core.py tests/test_nodes_install.py -q\n PYENV_VERSION=3.11.11 python -m pytest tests/test_porting_convert.py tests/test_porting_report.py tests/test_schema_validate.py tests/test_doctor_models.py tests/test_doctor_lockfile.py -q\n PYENV_VERSION=3.11.11 python -m tools.refresh_template_index --check\n \n\n### Step 12: Run worker static checks\nScope: Medium\n1. Run worker checks with the known macOS ARM workaround:\n bash\n cd /tmp/reigh-worker\n PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 python -m pytest scripts/live_test/tests/test_primitives.py -q\n PYENV_VERSION=3.11.11 python -m scripts.capability_contracts.report --vibecomfy-path /tmp/vibecomfy render --check docs/vibecomfy-app-parity-tracker.md\n \n2. If generated tracker output drifts, update contract source files and regenerate the tracker rather than hand-editing generated markdown.\n\n### Step 13: Rerun focused RunPod live test when credentials permit\nScope: Large\n1. From /tmp/reigh-worker, run the requested focused live case only after local VibeComfy and worker static checks are clean:\n bash\n PYTHONPATH=/tmp/reigh-worker/.live_test_deps PYENV_VERSION=3.11.11 python -m scripts.live_test.main --variant fresh --backend vibecomfy --case travel_segment_ltx2_control_video_first_last --ref megaplan/vibecomfy-sprint-09-control-rail-travel-matrix --vibecomfy-ref megaplan/production-parity-templates --terminate\n \n2. Inspect generated live report, VibeComfy run metadata, model staging report, selected artifact path, prompt id, and video contract evidence.\n3. Verify no reigh-live-test-fresh-* pods remain using the live-test terminate guard/janitor.\n4. Promote parity status only if static contracts and live output prove it. Otherwise document exact blocker, command output, and report paths.\n\n## Execution Order\n1. Fix both AST asset extractors first so lifecycle commands can run on current ready templates.\n2. Implement compiled API alias cleanup before enforcing strict unresolved-widget checks.\n3. Add strict readiness checks for widgets, schema, models, and output artifact declarations.\n4. Finish and battle-test the LTX raw-guide template, then inspect nearby Runexx templates for the same blockers.\n5. Update docs after the CLI gates are real and tested.\n6. Audit worker widget-position knowledge and either migrate or explicitly defer each occurrence.\n7. Run worker static checks, then RunPod only after cheap local checks are clean.\n\n## Validation Order\n1. Unit tests for AST asset extraction and widget alias cleanup.\n2. Focused LTX ready-template and CLI port check/port widgets/validate/doctor commands.\n3. Strict readiness tests for production/app-parity templates, including output artifact declarations.\n4. Broader VibeComfy test groups and template index check.\n5. Worker contract/report checks and widget mapping audit evidence.\n6. Focused RunPod live test and pod cleanup verification.",
"changes_summary": "Revised the plan to address the critique directly: strict widget checks are now paired with compiled API cleanup, both AST model-asset extractors are explicitly in scope and tested, production readiness includes output artifact declarations, and worker-side widget_N mappings require a concrete audit/migrate/defer outcome.",
"flags_addressed": [
"VIBECOMFY-001",
"WORKER-001",
"issue_hints",
"correctness",
"scope",
"all_locations",
"callers"
],
"assumptions": [
"The implementation should preserve current uncommitted changes in the LTX template, widget aliases/schema, doctor, and ready-template tests unless a real conflict is found.",
"/private/tmp/vibecomfy is the active VibeComfy checkout corresponding to /tmp/vibecomfy in the brief, and /tmp/reigh-worker is available for worker checks.",
"PYENV_VERSION=3.11.11 is the intended Python environment for both repositories.",
"Network and RunPod credentials may be unavailable in the execution environment; local/static gates still need to be completed and any live blocker documented exactly.",
"Strict readiness should initially target production/app-parity templates rather than breaking every legacy exploratory ready template at once.",
"Worker-side positional widget mappings are not all necessarily removable in this batch, but each occurrence must be classified as migrated or explicitly deferred."
],
"success_criteria": [
{
"criterion": "port check and port widgets on ready_templates/video/ltx2_3_runexx_first_last_raw_video_guide.py return structured reports and do not crash on module-level model asset constants.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output"
]
},
{
"criterion": "Both AST model-asset extraction paths support top-level literal constants referenced from READY_METADATA and READY_REQUIREMENTS.",
"priority": "must",
"requires": [
"run_tests",
"parse_diff",
"read_files"
]
},
{
"criterion": "Compiled API output removes raw widget_* keys when they are successfully rewritten to named inputs by committed widget aliases.",
"priority": "must",
"requires": [
"run_tests",
"parse_diff"
]
},
{
"criterion": "Production/app-parity ready templates fail a local strict gate when compiled API contains unresolved widget_* inputs for classes with committed widget aliases or schema-required named inputs.",
"priority": "must",
"requires": [
"run_tests",
"run_shell",
"parse_diff"
]
},
{
"criterion": "The LTX raw video guide compiled API uses named inputs and no raw positional widget inputs for the previously failing LTX/KJ/VHS nodes, and declares URL-bearing Kijai LTX model assets.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": "Production/app-parity readiness checks assert graph-level output artifact declarations, including at least one workflow.outputs entry and mappable save-node semantics.",
"priority": "must",
"requires": [
"run_tests",
"parse_diff",
"read_files"
]
},
{
"criterion": "Agent-facing docs describe the four workflow lifecycle entry points and separate programmatic gates from agentic responsibilities.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "Existing VibeComfy validation/doctor/port tooling remains the enforcement surface; no parallel replacement doctor is introduced.",
"priority": "must",
"requires": [
"parse_diff",
"read_files"
]
},
{
"criterion": "Worker-side arbitrary widget_N mappings in vibecomfy_adapter.py are inventoried and each occurrence is migrated to VibeComfy semantic fields or explicitly documented as a deferred compatibility shim.",
"priority": "must",
"requires": [
"read_files",
"parse_diff",
"subjective_judgment"
]
},
{
"criterion": "Focused VibeComfy tests for ready templates, porting, model assets, schema validation, doctor model checks, node install checks, and template index freshness pass.",
"priority": "must",
"requires": [
"run_tests",
"run_shell",
"read_build_output"
]
},
{
"criterion": "Worker capability contract checks render cleanly against the updated VibeComfy checkout, or exact contract drift is documented with source files to update.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"read_files"
]
},
{
"criterion": "The focused RunPod live test is rerun when credentials/environment permit, and no stale reigh-live-test-fresh-* pods remain afterward.",
"priority": "must",
"requires": [
"run_shell",
"observe_runtime_logs",
"read_build_output"
]
},
{
"criterion": "Any claim of parity is backed by both worker contract evidence and actual live RunPod output; otherwise blockers are recorded with concrete command output or report paths.",
"priority": "must",
"requires": [
"read_files",
"observe_runtime_logs",
"subjective_judgment"
]
},
{
"criterion": "The lifecycle checklist stays concise and points to detailed docs instead of duplicating long reference prose.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Nearby LTX Runexx templates are checked for the same failure class, with fixes limited to templates that actually report lifecycle blockers.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "RunPod model download latency, account limits, and gated Hugging Face assets may affect live validation timing.",
"priority": "info",
"requires": [
"observe_runtime_logs"
]
}
],
"questions": [
"If a worker widget_N mapping is a temporary compatibility shim with no current VibeComfy semantic field, where should the deferral note live: worker contract JSON, adapter code comments, or a dedicated parity tracker section?",
"Should strict readiness include all templates referenced by worker contracts even if their VibeComfy manifest coverage tier is supplemental?"
]
}
“You are already running inside the megaplan harness for this step. Do the requested….” Conversation with gpt-5.5, from the Peter O’Mallet DataClaw Conversations dataset. The Chat Archive, 2026. https://thechatarchive.com/c/01m80eqm7ks5tj3mgek1dkj36z