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 the gatekeeper for the megaplan workflow. Make the continuation decision directly.
Build and use a robust capability-contract and workflow-workbench toolchain that gets Reigh to 100% app parity coverage for VibeComfy vs existing Wan2GP/app behavior, while leaving reusable tools for future internal/community workflows, workflow forks, and scratch-built workflows.
Current situation and context:
Repos live under /Users/user_c042661f/Documents/reigh-workspace.
Main implementation repo for this run is reigh-worker. Current durable branch should be megaplan/vibecomfy-sprint-09-control-rail-travel-matrix.
VibeComfy repo is ../vibecomfy on branch megaplan/production-parity-templates.
reigh-app has a dirty working tree on its own branch; inspect it as source of app capability truth but do not casually commit or revert its changes.
The user wants actual execution after planning, not just a design doc. Keep going until the new tooling is built, then use it to continue closing validation/parity gaps.
The user explicitly requested this run in a GPT-5.5 medium subagent. This current agent is that subagent. The local megaplan CLI supports profiles and phase model overrides, but no installed profile exposes an explicit GPT-5.5 medium model string. Use the all-codex profile / Codex-compatible routing where possible and note that limitation.
Important current facts:
reigh-worker has a new tracker doc at docs/vibecomfy-app-parity-tracker.md.
reigh-worker has route contracts in source/task_handlers/tasks/template_routing.py.
reigh-worker has live matrix in scripts/live_test/matrix.py and live reports in scripts/live_test/runs/*/report.md.
Assistant
{"recommendation":"ITERATE","rationale":"The plan is close enough architecturally, but execution should not start until the significant flags are folded into the plan. The biggest blockers are actionable plan-quality gaps, not human decision points: app capability truth needs at least a lightweight structured inventory from reigh-app enqueue/resolver surfaces; live matrix loading needs an import-safe strategy; route alias handling needs to be explicit; and developer discoverability/CI integration need a concrete first-slice decision.","signals_assessment":"Preflight is green and the weighted score is moderate at 14.25, with no recurring reopened debt, but there are 9 unresolved significant flags across completeness, correctness, and maintainability. Several flags overlap and can be resolved by one revision pass: add a lightweight app inventory, avoid heavy live matrix imports, model route aliases as coverage by one contract, and add README/test-target guidance. The pressure analysis does not justify TIEBREAKER because the multi-iteration groups are implementation-quality issues rather than unresolvable architectural tensions.","warnings":["Do not proceed with direct implementation until the plan says how evidence will be loaded without importing live-test config side effects.","The first slice can still be bounded, but it must distinguish 'worker route parity' from 'full app parity' unless it extracts structured app capability rows."],"settled_decisions":[{"id":"capability_contract_registry","decision":"Use a worker-local machine-readable registry plus CLI/report generator as the first durable source of truth.","rationale":"This directly addresses mixed task/route/template/live-case concepts while keeping VibeComfy as the owner of workflow validation."},{"id":"vibecomfy_validation_boundary","decision":"Consume VibeComfy template index and coverage manifests; do not reimplement graph/schema/custom-node validation in reigh-worker.","rationale":"This preserves repo ownership boundaries and avoids duplicating VibeComfy mechanics."}],"flag_resolutions":[],"accepted_tradeoffs":[],"tiebreaker_question":"","tiebreaker_flag_ids":[],"tiebreaker_fuzzy_group_id":""}
User
Assistant
reigh-worker has VibeComfy adapter/scratchpads in source/models/comfy/vibecomfy_adapter.py.
reigh-worker has worker preflight checks for VibeComfy template_index.json and workflow_corpus/manifests/coverage.json in source/runtime/worker/preflight.py.
reigh-worker has health route labels in source/runtime/worker/health_labels.py.
VibeComfy already owns workflow/template mechanics. Do not rebuild these in reigh-worker: python -m vibecomfy.cli port check, port convert, port widgets, validate, doctor, nodes install-plan/install/restore, fetch, workflows list, inspect, run, runpod; template_index.json; workflow_corpus/manifests/coverage.json; ready_templates; model registry/staging; custom-node pack registry; RunPod/corpus machinery.
A subagent history audit found oldest local VibeComfy commit around 2026-04-26, not March. It concluded: VibeComfy should own Comfy implementation truth; reigh-worker should own app/product task truth, routing, Wan2GP parity, DB/storage artifact semantics, and live app validation.
Validated live-green VibeComfy-supported cases from current tracker include:
z_image_turbo_i2i
But these are live-green cases, not proof of full app parity for all variants.
Known gaps to handle in plan/execution:
Need a central capability id/name per product behavior. Current concepts are messy: task_type, route_key, template_id, workflow id, live case name, and actual product capability are mixed.
Need variant-aware coverage: LoRAs, multiple LoRAs, URL LoRAs, phase-scheduled LoRAs, control methods raw/flow/canny/depth/pose/mask, source media variants, resolution/frame/FPS/profile/seed/prompt/negative prompt/interpolation/postprocess/output.
Need not brute-force all combinations; use risk-based pairwise/interaction coverage. Every app-exposed axis value needs at least one proof or fail-closed rule; known interactions need explicit cases.
Need distinguish non-Comfy paths like orchestration/stitching: these may remain WGP/non-template but still need contract validation for child creation, route metadata, DB state, and artifact behavior.
Need use VibeComfy validators rather than reimplementing graph/schema/custom node/model validation in worker.
Need tooling that helps agents/developers import, fork, or build workflows from scratch: draft contracts, inspect/explain, validate, diff, next-step guidance, status labels.
Prep phase instructions:
Inventory current tooling in reigh-worker, VibeComfy, and relevant reigh-app/Supabase enqueue surfaces.
Determine where app capabilities are defined/enqueued, without changing reigh-app unless explicitly necessary.
Inspect existing live matrix/report parsing affordances and any docs/tests around migration-baselines, worker matrix, template routing, artifact contracts, VibeComfy preflight.
Inspect VibeComfy CLI/docs/tests enough to avoid duplicating its responsibilities.
Identify the smallest executable first slice that creates real leverage, not just prose.
Desired high-level architecture:
Capability = product behavior users care about.
Route = execution decision for a capability variant.
Implementation = WGP or VibeComfy binding.
Template = VibeComfy implementation detail.
Workflow = source/import artifact.
Live case = validation sample/evidence.
Expected implementation direction:
Add a machine-readable capability contract registry in reigh-worker, likely under scripts/capability_contracts/ or source/task_handlers/tasks/ depending on repo patterns.
Add a CLI/report generator, e.g. python -m scripts.capability_contracts.report or similar, with commands/status output that can merge: registry, template_routing.py, scripts/live_test/matrix.py, ../vibecomfy/template_index.json, ../vibecomfy/workflow_corpus/manifests/coverage.json, and latest scripts/live_test/runs/*/report.md.
Generate or update docs/vibecomfy-app-parity-tracker.md from data rather than hand-maintaining it.
Add contract tests that fail if a vibecomfy_supported route lacks a contract row, VibeComfy template reference, output artifact contract, variant accounting, or live evidence pointer.
Add explicit status vocabulary: unknown/inventoried/routed/template_bound/static_valid/runtime_green/parity_reviewed/app_ready, plus wgp_only_contract_validated and unsupported_fail_closed where appropriate.
Add next-action/status output so a developer/agent can see what blocks 100% coverage.
Keep implementation bounded: first slice can be registry + report + tests + generated tracker + using it to identify and close obvious holes. Then continue improving if needed.
Success criteria:
MUST:
Use megaplan standard workflow with prep -> plan -> critique -> gate -> finalize -> execute -> review.
Build code, not only docs, unless prep proves there is already an equivalent working tool.
Do not duplicate VibeComfy workflow validators in reigh-worker; call/reference/consume VibeComfy outputs instead.
Produce a durable, checked-in capability-contract source of truth and generated/reportable parity status.
Cover every current live matrix VibeComfy-supported route with a contract row or an explicit justified exception.
Include app capability source references where practical.
Include variant axes for LoRA/control/source media/resolution/frame/FPS/profile/postprocess/output, even if some entries are initially gap/fail-closed.
Make the developer/agent UX discoverable through commands/docs.
Use the new tooling after building it to update the tracker and identify next parity gaps.
INFO:
Future directions include import/fork/new workflow workbench UX, but the first implementation should land the central capability contract and report loop.
code
Plan:
# Implementation Plan: Capability Contracts and Workflow Workbench Reporting
Overview
Build a worker-local capability-contract source of truth and report loop that separates product capabilities from task types, route keys, VibeComfy template bindings, live cases, and artifact expectations. The repo already has the raw ingredients: route decisions in source/task_handlers/tasks/template_routing.py, live matrix definitions in scripts/live_test/matrix.py, live report JSON/Markdown under scripts/live_test/runs/, VibeComfy subprocess boundaries in source/models/comfy/vibecomfy_adapter.py, and worker preflight checks for ../vibecomfy/template_index.json plus ../vibecomfy/workflow_corpus/manifests/coverage.json.
The simplest useful first slice is not a UI workbench. It is a durable registry plus a validator/report generator that can answer: which app capability maps to which route, which VibeComfy template or WGP-only path implements it, which variant axes are covered or fail-closed, which live case proves it, and what blocks parity. This creates real leverage for future import/fork/scratch workflow tooling without duplicating VibeComfy’s graph validators.
Phase 1: Foundation — Contract Data and Importable Helpers
Step 1: Add the contract package (scripts/capability_contracts/)
Scope: Medium
Createscripts/capability_contracts/__init__.py, scripts/capability_contracts/model.py, scripts/capability_contracts/loaders.py, and scripts/capability_contracts/report.py.
Use only stdlib (json, dataclasses, argparse, pathlib) so the tool remains cheap in CI and live-test environments.
Model the status vocabulary as constants: unknown, inventoried, routed, template_bound, static_valid, runtime_green, parity_reviewed, app_ready, wgp_only_contract_validated, unsupported_fail_closed.
Keep VibeComfy validation as evidence consumption, not reimplementation: load template_index.json and workflow_corpus/manifests/coverage.json; optionally expose command hints such as python -m vibecomfy.cli validate <template> but do not inspect workflow graph internals in worker.
Step 2: Add the machine-readable registry (scripts/capability_contracts/contracts.json)
Scope: Large
Define one contract row per product capability or justified exception, with fields like:
Seed all currently live-green VibeComfy-supported cases from scripts/live_test/matrix.py, including direct image/edit/video routes and Wan VACE travel/join routes.
Add WGP-only contract rows for orchestration/stitching paths (travel_orchestrator, join_clips_orchestrator, edit_video_orchestrator, travel_stitch, join_final_stitch where applicable) with implementation: "wgp" and artifact/DB behavior expectations instead of template_id.
Represent fail-closed variant axes explicitly, especially dynamic LoRAs, multiple LoRAs beyond supported slots, Flux Klein non-4B variants, missing control videos, and unsupported LTX/Wan rows.
Phase 2: Evidence Loaders and Drift Detection
Step 3: Load route and live matrix evidence (template_routing.py, scripts/live_test/matrix.py)
Scope: Medium
ImportSPRINT_2_SELECTOR_MAP, SECTION3A_ROUTE_SUPPORT_MAP, and RouteSupportState from source/task_handlers/tasks/template_routing.py without importing WGP or VibeComfy.
ImportMATRIX or build_matrix() from scripts/live_test/matrix.py and normalize MatrixCase.name, task_type, route_key, support_state, and selected_template_id.
Validate that every route with vibecomfy_supported has exactly one or more contract rows, or a contract row with an explicit exception status.
Validate that matrix case selected_template_id agrees with the registry and route selector entry where all three are present.
Read VibeComfy files from VIBECOMFY_PATH when set, otherwise ../vibecomfy.
Marktemplate_bound when a contract has a template id, and static_valid only when that template appears in template_index.json or the contract includes a narrowly justified static-evidence exception.
Flag current likely gaps: several worker route template ids are not in the inspected template_index.json (image/z_image_img2img, Wan 2.2 T2I/I2V/VACE, animate, basic upscale/enhance). The implementation should make these visible as report blockers or require regenerating/updating VibeComfy’s index, not silently pass them.
Cross-link coverage manifest workflows where possible by template id, workflow id, capability, or declared model family, but treat missing corpus links as a report warning unless the contract status claims static_valid or higher.
Step 5: Parse latest live evidence (scripts/live_test/runs/*/report.json)
Scope: Medium
Preferreport.json over Markdown because scripts/live_test/report.py writes structured results with case_name, task_type, final status, output, and generation IDs.
Select the newest passing evidence per live case where final_status == "Complete", output exists, generation IDs exist, and no error summary is present.
Attach evidence refs to contract rows and downgrade/flag any runtime_green row whose live case lacks passing evidence.
Keep Markdown parsing out of the first slice unless an old run has no JSON counterpart.
Phase 3: CLI, Generated Tracker, and Agent UX
Step 6: Implement the report CLI (python -m scripts.capability_contracts.report)
Make validate fail nonzero for hard drift: missing contract rows for supported routes, template mismatch, missing artifact contract, missing variant accounting, invalid status, or runtime_green without passing live evidence.
Make status --json deterministic with stable sort order by status, capability id, and route key.
Make next-actions actionable, grouping blockers by missing app source, route binding, VibeComfy template index, live evidence, artifact contract, and parity review.
Step 7: Generate the tracker (docs/vibecomfy-app-parity-tracker.md)
Scope: Medium
Replace hand-maintained live-green tables with generated sections from registry plus evidence.
Include status legend, summary counts, app-ready/runtime-green/static blockers, WGP-only validated paths, unsupported fail-closed paths, and next actions.
Preserve useful human context from the current tracker where it is still true, but clearly mark the file as generated and point edits to scripts/capability_contracts/contracts.json.
Run the generator and inspect the diff for accidental loss of important parity notes.
Assert every vibecomfy_supported route in SPRINT_2_SELECTOR_MAP and SECTION3A_ROUTE_SUPPORT_MAP has at least one contract row or explicit justified exception.
Assert every vibecomfy_supported live matrix case has a matching contract row and live evidence pointer when the contract status is runtime_green or higher.
Assert every VibeComfy contract has a template_id, artifact contract, variant axes, and either template-index evidence or an explicit static-evidence blocker.
Assert WGP-only contracts have no template_id and do have DB/artifact behavior expectations.
Assertdocs/vibecomfy-app-parity-tracker.md is regenerated from current data by comparing generated text to file contents.
Step 9: Run cheap validation first, then targeted tests
Only then run broader tests if the targeted set is green and the changes touched shared routing behavior.
Step 10: Critique and close obvious gaps
Scope: Medium
Usenext-actions output after the first passing implementation to identify obvious missing rows or stale template-index refs.
Close data gaps in worker registry/reporting when they are clearly contract/evidence problems.
Do not modify reigh-app unless the report proves app enqueue truth cannot be referenced from worker-local metadata; record app source refs instead.
Do not modify VibeComfy workflow/template mechanics unless the only blocker is a stale generated index and the fix is to run/commit the appropriate VibeComfy-owned artifact on its branch.
Execution Order
Land the importable package and registry schema first, with a few seeded contracts.
Add route/live/template/live-report loaders before enforcing strict validation.
Seed all current live-supported rows and WGP-only exceptions.
Add CLI validation and status output.
Generate the tracker.
Add drift tests and tighten validation only after the registry contains all known rows.
Use the report output to close obvious contract holes, then stop before speculative workflow-workbench UI work.
python -m scripts.capability_contracts.report render --check docs/vibecomfy-app-parity-tracker.md if --check is implemented, otherwise render to a temp path and compare.
This plan satisfies the harness phase model without invoking nested megaplan tooling: prep has been done by inspecting the named worker, VibeComfy, and app surfaces; the implementation should proceed through plan, critique, gate, finalize, execute, and review inside the current harness. The GPT-5.5 medium profile limitation is operational context only; no nested profile routing is needed for the code changes.
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-05-08T21:45:19Z",
"hash": "sha256:8681669ddd7239f1be9519459464a31130cc2f98436322e7cba3b3ab397d13dd",
"questions": [
"Should runtime_green require a passing report.json only, or may old Markdown-only live reports count if a JSON report is missing?",
"If ../vibecomfy/template_index.json is stale and omits templates used by worker routes, should this run update VibeComfy artifacts on its branch, or should worker report those as static blockers only?",
"How deep should app capability truth go in the first slice: source-file references to enqueue/resolver surfaces, or extracted structured app capability rows from reigh-app TypeScript/Supabase code?"
],
"success_criteria": [
{
"criterion": "A durable machine-readable capability contract registry exists in reigh-worker and includes all current live-matrix VibeComfy-supported cases or explicit justified exceptions.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "The report CLI can validate, emit deterministic JSON status, render the parity tracker, and print next-action blockers without importing or reimplementing VibeComfy workflow graph validators.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "Every vibecomfy_supported route in worker route maps is covered by a contract row or an explicit fail-closed/exception row, and tests fail on future drift.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Every VibeComfy implementation contract has a template binding, artifact contract, variant-axis accounting, and static/live evidence status or a clear blocker.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": "docs/vibecomfy-app-parity-tracker.md is generated from the registry/report data rather than manually maintained, and generation drift is testable.",
"priority": "must",
"requires": [
"run_shell",
"run_tests",
"parse_diff"
]
},
{
"criterion": "Targeted tests for capability contracts, template routing, and live matrix primitives pass.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "reigh-app remains unmodified unless a later explicit decision is made to change app code.",
"priority": "must",
"requires": [
"parse_diff"
]
},
{
"criterion": "The first implementation keeps registry/reporting code small, stdlib-only, and import-safe for CI and worker contexts.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Report output is useful for agents: missing template index entries, missing live evidence, app source gaps, artifact contract gaps, and parity-review gaps are grouped into actionable next steps.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"subjective_judgment"
]
},
{
"criterion": "Variant axes include LoRA, control/source media, resolution, frames/FPS, profile, postprocess, output/artifact, prompt/negative prompt, and seed where relevant, even when initially marked fail-closed or gap.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Future workflow import/fork/scratch-built workbench UX is documented as a follow-on direction, not built in the first slice.",
"priority": "info",
"requires": [
"read_files"
]
}
],
"assumptions": [
"The implementation should stay inside /Users/user_c042661f/Documents/reigh-workspace/reigh-worker unless VibeComfy\u2019s generated index is explicitly chosen as a blocker to fix in the sibling repo.",
"scripts/capability_contracts/contracts.json is the simplest durable source of truth because it is reviewable, dependency-free, and easy for tests and agents to consume.",
"The first slice should treat app capability truth as references to reigh-app enqueue/resolver files, not a full TypeScript static analyzer.",
"Passing live evidence should come from scripts/live_test/runs/*/report.json when available because it is structured and already produced by the live-test toolchain.",
"Template ids missing from ../vibecomfy/template_index.json are real static-evidence blockers until VibeComfy\u2019s own generated artifacts prove otherwise.",
"WGP-only orchestration/stitching paths remain valid product capabilities and need DB/artifact contracts rather than VibeComfy template bindings."
],
"structure_warnings": []
}
code
Gate signals:
{
"robustness": "standard",
"signals": {
"iteration": 1,
"idea": "Build and use a robust capability-contract and workflow-workbench toolchain that gets Reigh to 100% app parity coverage for VibeComfy vs existing Wan2GP/app behavior, while leaving reusable tools for future internal/community workflows, workflow forks, and scratch-built workflows.\n\nCurrent situation and context:\n- Repos live under /Users/user_c042661f/Documents/reigh-workspace.\n- Main implementation repo for this run is reigh-worker. Current durable branch should be megaplan/vibecomfy-sprint-09-control-rail-travel-matrix.\n- VibeComfy repo is ../vibecomfy on branch megaplan/production-parity-templates.\n- reigh-app has a dirty working tree on its own branch; inspect it as source of app capability truth but do not casually commit or revert its changes.\n- The user wants actual execution after planning, not just a design doc. Keep going until the new tooling is built, then use it to continue closing validation/parity gaps.\n- The user explicitly requested this run in a GPT-5.5 medium subagent. This current agent is that subagent. The local megaplan CLI supports profiles and phase model overrides, but no installed profile exposes an explicit GPT-5.5 medium model string. Use the all-codex profile / Codex-compatible routing where possible and note that limitation.\n\nImportant current facts:\n- reigh-worker has a new tracker doc at docs/vibecomfy-app-parity-tracker.md.\n- reigh-worker has route contracts in source/task_handlers/tasks/template_routing.py.\n- reigh-worker has live matrix in scripts/live_test/matrix.py and live reports in scripts/live_test/runs//report.md.\n- reigh-worker has VibeComfy adapter/scratchpads in source/models/comfy/vibecomfy_adapter.py.\n- reigh-worker has worker preflight checks for VibeComfy template_index.json and workflow_corpus/manifests/coverage.json in source/runtime/worker/preflight.py.\n- reigh-worker has health route labels in source/runtime/worker/health_labels.py.\n- VibeComfy already owns workflow/template mechanics. Do not rebuild these in reigh-worker: python -m vibecomfy.cli port check, port convert, port widgets, validate, doctor, nodes install-plan/install/restore, fetch, workflows list, inspect, run, runpod; template_index.json; workflow_corpus/manifests/coverage.json; ready_templates; model registry/staging; custom-node pack registry; RunPod/corpus machinery.\n- A subagent history audit found oldest local VibeComfy commit around 2026-04-26, not March. It concluded: VibeComfy should own Comfy implementation truth; reigh-worker should own app/product task truth, routing, Wan2GP parity, DB/storage artifact semantics, and live app validation.\n\nValidated live-green VibeComfy-supported cases from current tracker include:\n- individual_travel_segment_wan22_vace raw/flow/canny/depth\n- travel_segment_wan22_vace raw/flow/canny/depth video_source\n- join_clips_segment_wan22_vace\n- qwen_image_style\n- qwen_image_t2i\n- qwen_image_2512\n- wan_2_2_t2i\n- wan_2_2_i2v\n- animate_character\n- image_upscale\n- video_enhance\n- flux_klein_edit\n- qwen_image_edit\n- image_inpaint\n- annotated_image_edit\n- z_image_turbo\n- z_image_turbo_i2i\nBut these are live-green cases, not proof of full app parity for all variants.\n\nKnown gaps to handle in plan/execution:\n- Need a central capability id/name per product behavior. Current concepts are messy: task_type, route_key, template_id, workflow id, live case name, and actual product capability are mixed.\n- Need capability contract registry/report generator tying app capabilities -> task types -> route keys -> Wan2GP behavior/defaults -> VibeComfy implementation/template/scratchpad -> variant axes -> output artifact contract -> static/live validation evidence.\n- Need variant-aware coverage: LoRAs, multiple LoRAs, URL LoRAs, phase-scheduled LoRAs, control methods raw/flow/canny/depth/pose/mask, source media variants, resolution/frame/FPS/profile/seed/prompt/negative prompt/interpolation/postprocess/output.\n- Need not brute-force all combinations; use risk-based pairwise/interaction coverage. Every app-exposed axis value needs at least one proof or fail-closed rule; known interactions need explicit cases.\n- Need distinguish non-Comfy paths like orchestration/stitching: these may remain WGP/non-template but still need contract validation for child creation, route metadata, DB state, and artifact behavior.\n- Need use VibeComfy validators rather than reimplementing graph/schema/custom node/model validation in worker.\n- Need tooling that helps agents/developers import, fork, or build workflows from scratch: draft contracts, inspect/explain, validate, diff, next-step guidance, status labels.\n\nPrep phase instructions:\n1. Inventory current tooling in reigh-worker, VibeComfy, and relevant reigh-app/Supabase enqueue surfaces.\n2. Determine where app capabilities are defined/enqueued, without changing reigh-app unless explicitly necessary.\n3. Inspect existing live matrix/report parsing affordances and any docs/tests around migration-baselines, worker matrix, template routing, artifact contracts, VibeComfy preflight.\n4. Inspect VibeComfy CLI/docs/tests enough to avoid duplicating its responsibilities.\n5. Identify the smallest executable first slice that creates real leverage, not just prose.\n\nDesired high-level architecture:\n- Capability = product behavior users care about.\n- Route = execution decision for a capability variant.\n- Implementation = WGP or VibeComfy binding.\n- Template = VibeComfy implementation detail.\n- Workflow = source/import artifact.\n- Live case = validation sample/evidence.\n\nExpected implementation direction:\n- Add a machine-readable capability contract registry in reigh-worker, likely under scripts/capability_contracts/ or source/task_handlers/tasks/ depending on repo patterns.\n- Add a CLI/report generator, e.g. python -m scripts.capability_contracts.report or similar, with commands/status output that can merge: registry, template_routing.py, scripts/live_test/matrix.py, ../vibecomfy/template_index.json, ../vibecomfy/workflow_corpus/manifests/coverage.json, and latest scripts/live_test/runs//report.md.\n- Generate or update docs/vibecomfy-app-parity-tracker.md from data rather than hand-maintaining it.\n- Add contract tests that fail if a vibecomfy_supported route lacks a contract row, VibeComfy template reference, output artifact contract, variant accounting, or live evidence pointer.\n- Add explicit status vocabulary: unknown/inventoried/routed/template_bound/static_valid/runtime_green/parity_reviewed/app_ready, plus wgp_only_contract_validated and unsupported_fail_closed where appropriate.\n- Add next-action/status output so a developer/agent can see what blocks 100% coverage.\n- Keep implementation bounded: first slice can be registry + report + tests + generated tracker + using it to identify and close obvious holes. Then continue improving if needed.\n\nSuccess criteria:\nMUST:\n- Use megaplan standard workflow with prep -> plan -> critique -> gate -> finalize -> execute -> review.\n- Build code, not only docs, unless prep proves there is already an equivalent working tool.\n- Do not duplicate VibeComfy workflow validators in reigh-worker; call/reference/consume VibeComfy outputs instead.\n- Produce a durable, checked-in capability-contract source of truth and generated/reportable parity status.\n- Cover every current live matrix VibeComfy-supported route with a contract row or an explicit justified exception.\n- Add tests proving route/template/live-evidence coverage cannot silently drift.\n- Keep dirty unrelated app work intact.\nSHOULD:\n- Include app capability source references where practical.\n- Include variant axes for LoRA/control/source media/resolution/frame/FPS/profile/postprocess/output, even if some entries are initially gap/fail-closed.\n- Make the developer/agent UX discoverable through commands/docs.\n- Use the new tooling after building it to update the tracker and identify next parity gaps.\nINFO:\n- Future directions include import/fork/new workflow workbench UX, but the first implementation should land the central capability contract and report loop.",
"significant_flags": 9,
"unresolved_flags": [
{
"id": "FLAG-001",
"concern": "App capability inventory: first slice only records app source references, so it cannot prove 100% app parity against actual reigh-app resolver/UI enqueue behavior.",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "FLAG-002",
"concern": "Import safety: report tooling that imports scripts.live_test.matrix will also import live-test config, read .env, mutate orchestrator paths, and load live-test helper modules, which may be too heavy for a cheap CI/report command.",
"category": "maintainability",
"severity": "significant",
"status": "open"
},
{
"id": "issue_hints",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: App capability truth: the plan intentionally limits the first slice to app_sources references instead of extracting structured app capability rows from ../reigh-app. That is a divergence from the idea's desire to get to 100% app parity coverage and from the prep instruction to determine where capabilities are defined/enqueued; it may be acceptable as a first slice, but it means the first implementation cannot prove full app parity from actual app resolver inputs.",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Import safety: the plan says to import scripts.live_test.matrix to normalize matrix cases. I tested that import and it works, but it pulls in scripts.live_test.config, reads .env, mutates sys.path for the orchestrator repo, and imports live-test support modules that can emit dependency warnings. This is not fatal, but it weakens the plan's 'cheap in CI' and 'import-safe' goal; a safer implementation may need a lightweight matrix loader or careful tests around import side effects.",
"category": "correctness",
"severity": "significant",
"status": "open"
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: The plan's validation rule 'every route with vibecomfy_supported has exactly one or more contract rows' is underspecified for aliases and duplicate product surfaces. SPRINT_2_SELECTOR_MAP currently has both image-upscale and image_upscale as supported route keys pointing to the same template, while app/task code and live matrix use image-upscale; the validator should allow one capability contract to cover multiple route keys rather than requiring a misleading separate product capability row for each alias.",
"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?: The broader app capability surface is larger than create-task: app/edge code references task creation through AI timeline tools, media-lightbox hooks, travel/join/edit-video UI flows, completion handlers, and task-type visibility/config files. The plan's first slice records source references but does not define a mechanism to detect when app resolver/UI enqueue behavior changes, so it will not fully prevent app-parity drift outside worker route maps.",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "all_locations-1",
"concern": "Does the change touch all locations AND supporting infrastructure?: The plan names docs/vibecomfy-app-parity-tracker.md as generated and adds a render check, but it does not mention adding a small README or usage note under scripts/capability_contracts/ or a docs command snippet beyond the generated file. This is a minor discoverability gap for the requested developer/agent UX, though python -m scripts.capability_contracts.report is a reasonable first entry point.",
"category": "completeness",
"severity": "significant",
"status": "open"
},
{
"id": "all_locations-2",
"concern": "Does the change touch all locations AND supporting infrastructure?: There is existing worker preflight support for checking only that VibeComfy manifests exist, but no preflight or CI hook yet for the new capability-contract report. The plan adds pytest drift tests and CLI validation, which is enough for the first slice, but the executor should decide whether to wire the new validation into an existing cheap test target or leave it as a standalone command.",
"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?: For the live matrix caller contract, build_matrix() accepts parameters for anchors, timeouts, selected backend, selector namespace/version/profile, and filtering. The plan should call it with defaults or read MATRIX, but validators must not mistake alternate runtime options for distinct product capabilities because the same route keys can be generated under different live-test runtime metadata.",
"category": "correctness",
"severity": "significant",
"status": "open"
}
],
"resolved_flags": [],
"weighted_score": 14.25,
"weighted_history": [],
"plan_delta_from_previous": null,
"recurring_critiques": [],
"scope_creep_flags": [],
"loop_summary": "Iteration 1. Weighted score trajectory: 14.25. Plan deltas: n/a. Recurring critiques: 0. Resolved flags: 0. Open significant flags: 9.",
"debt_overlaps": [],
"escalated_debt_subsystems": []
},
"warnings": [],
"criteria_check": {
"count": 11,
"items": [
{
"criterion": "A durable machine-readable capability contract registry exists in reigh-worker and includes all current live-matrix VibeComfy-supported cases or explicit justified exceptions.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "The report CLI can validate, emit deterministic JSON status, render the parity tracker, and print next-action blockers without importing or reimplementing VibeComfy workflow graph validators.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "Every vibecomfy_supported route in worker route maps is covered by a contract row or an explicit fail-closed/exception row, and tests fail on future drift.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Every VibeComfy implementation contract has a template binding, artifact contract, variant-axis accounting, and static/live evidence status or a clear blocker.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": "docs/vibecomfy-app-parity-tracker.md is generated from the registry/report data rather than manually maintained, and generation drift is testable.",
"priority": "must",
"requires": [
"run_shell",
"run_tests",
"parse_diff"
]
},
{
"criterion": "Targeted tests for capability contracts, template routing, and live matrix primitives pass.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "reigh-app remains unmodified unless a later explicit decision is made to change app code.",
"priority": "must",
"requires": [
"parse_diff"
]
},
{
"criterion": "The first implementation keeps registry/reporting code small, stdlib-only, and import-safe for CI and worker contexts.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Report output is useful for agents: missing template index entries, missing live evidence, app source gaps, artifact contract gaps, and parity-review gaps are grouped into actionable next steps.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"subjective_judgment"
]
},
{
"criterion": "Variant axes include LoRA, control/source media, resolution, frames/FPS, profile, postprocess, output/artifact, prompt/negative prompt, and seed where relevant, even when initially marked fail-closed or gap.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Future workflow import/fork/scratch-built workbench UX is documented as a follow-on direction, not built in the first slice.",
"priority": "info",
"requires": [
"read_files"
]
}
]
},
"preflight_results": {
"project_dir_exists": true,
"project_dir_writable": true,
"success_criteria_present": true,
"claude_available": true,
"codex_available": true
},
"unresolved_flags": [
{
"id": "FLAG-001",
"concern": "App capability inventory: first slice only records app source references, so it cannot prove 100% app parity against actual reigh-app resolver/UI enqueue behavior.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "../reigh-app has app capability definitions spread across supabase/functions/create-task/resolvers/*, AI timeline tool schemas/prompts, media-lightbox hooks, travel/join/edit-video UI flows, and task config files; the plan explicitly defers structured app extraction.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "FLAG-002",
"concern": "Import safety: report tooling that imports scripts.live_test.matrix will also import live-test config, read .env, mutate orchestrator paths, and load live-test helper modules, which may be too heavy for a cheap CI/report command.",
"category": "maintainability",
"severity_hint": "uncertain",
"evidence": "scripts/live_test/matrix.py imports scripts.live_test.config, completion_poller, and task_spoofer; importing it locally produced a requests dependency warning and config bootstrapped the sibling orchestrator path.",
"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?: App capability truth: the plan intentionally limits the first slice to app_sources references instead of extracting structured app capability rows from ../reigh-app. That is a divergence from the idea's desire to get to 100% app parity coverage and from the prep instruction to determine where capabilities are defined/enqueued; it may be acceptable as a first slice, but it means the first implementation cannot prove full app parity from actual app resolver inputs.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "App capability truth: the plan intentionally limits the first slice to app_sources references instead of extracting structured app capability rows from ../reigh-app. That is a divergence from the idea's desire to get to 100% app parity coverage and from the prep instruction to determine where capabilities are defined/enqueued; it may be acceptable as a first slice, but it means the first implementation cannot prove full app parity from actual app resolver inputs.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Import safety: the plan says to import scripts.live_test.matrix to normalize matrix cases. I tested that import and it works, but it pulls in scripts.live_test.config, reads .env, mutates sys.path for the orchestrator repo, and imports live-test support modules that can emit dependency warnings. This is not fatal, but it weakens the plan's 'cheap in CI' and 'import-safe' goal; a safer implementation may need a lightweight matrix loader or careful tests around import side effects.",
"category": "correctness",
"severity_hint": "likely-significant",
"evidence": "Import safety: the plan says to import scripts.live_test.matrix to normalize matrix cases. I tested that import and it works, but it pulls in scripts.live_test.config, reads .env, mutates sys.path for the orchestrator repo, and imports live-test support modules that can emit dependency warnings. This is not fatal, but it weakens the plan's 'cheap in CI' and 'import-safe' goal; a safer implementation may need a lightweight matrix loader or careful tests around import side effects.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: The plan's validation rule 'every route with vibecomfy_supported has exactly one or more contract rows' is underspecified for aliases and duplicate product surfaces. SPRINT_2_SELECTOR_MAP currently has both image-upscale and image_upscale as supported route keys pointing to the same template, while app/task code and live matrix use image-upscale; the validator should allow one capability contract to cover multiple route keys rather than requiring a misleading separate product capability row for each alias.",
"category": "correctness",
"severity_hint": "likely-significant",
"evidence": "The plan's validation rule 'every route with vibecomfy_supported has exactly one or more contract rows' is underspecified for aliases and duplicate product surfaces. SPRINT_2_SELECTOR_MAP currently has both image-upscale and image_upscale as supported route keys pointing to the same template, while app/task code and live matrix use image-upscale; the validator should allow one capability contract to cover multiple route keys rather than requiring a misleading separate product capability row for each alias.",
"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?: The broader app capability surface is larger than create-task: app/edge code references task creation through AI timeline tools, media-lightbox hooks, travel/join/edit-video UI flows, completion handlers, and task-type visibility/config files. The plan's first slice records source references but does not define a mechanism to detect when app resolver/UI enqueue behavior changes, so it will not fully prevent app-parity drift outside worker route maps.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "The broader app capability surface is larger than create-task: app/edge code references task creation through AI timeline tools, media-lightbox hooks, travel/join/edit-video UI flows, completion handlers, and task-type visibility/config files. The plan's first slice records source references but does not define a mechanism to detect when app resolver/UI enqueue behavior changes, so it will not fully prevent app-parity drift outside worker route maps.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "all_locations-1",
"concern": "Does the change touch all locations AND supporting infrastructure?: The plan names docs/vibecomfy-app-parity-tracker.md as generated and adds a render check, but it does not mention adding a small README or usage note under scripts/capability_contracts/ or a docs command snippet beyond the generated file. This is a minor discoverability gap for the requested developer/agent UX, though python -m scripts.capability_contracts.report is a reasonable first entry point.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "The plan names docs/vibecomfy-app-parity-tracker.md as generated and adds a render check, but it does not mention adding a small README or usage note under scripts/capability_contracts/ or a docs command snippet beyond the generated file. This is a minor discoverability gap for the requested developer/agent UX, though python -m scripts.capability_contracts.report is a reasonable first entry point.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
},
{
"id": "all_locations-2",
"concern": "Does the change touch all locations AND supporting infrastructure?: There is existing worker preflight support for checking only that VibeComfy manifests exist, but no preflight or CI hook yet for the new capability-contract report. The plan adds pytest drift tests and CLI validation, which is enough for the first slice, but the executor should decide whether to wire the new validation into an existing cheap test target or leave it as a standalone command.",
"category": "completeness",
"severity_hint": "likely-significant",
"evidence": "There is existing worker preflight support for checking only that VibeComfy manifests exist, but no preflight or CI hook yet for the new capability-contract report. The plan adds pytest drift tests and CLI validation, which is enough for the first slice, but the executor should decide whether to wire the new validation into an existing cheap test target or leave it as a standalone command.",
"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?: For the live matrix caller contract, build_matrix() accepts parameters for anchors, timeouts, selected backend, selector namespace/version/profile, and filtering. The plan should call it with defaults or read MATRIX, but validators must not mistake alternate runtime options for distinct product capabilities because the same route keys can be generated under different live-test runtime metadata.",
"category": "correctness",
"severity_hint": "likely-significant",
"evidence": "For the live matrix caller contract, build_matrix() accepts parameters for anchors, timeouts, selected backend, selector namespace/version/profile, and filtering. The plan should call it with defaults or read MATRIX, but validators must not mistake alternate runtime options for distinct product capabilities because the same route keys can be generated under different live-test runtime metadata.",
"raised_in": "critique_v1.json",
"status": "open",
"severity": "significant",
"verified": false
}
]
}
{
"id": "FLAG-001",
"concern": "App capability inventory: first slice only records app source references, so it cannot prove 100% app parity against actual reigh-app resolver/UI enqueue behavior.",
"evidence": "../reigh-app has app capability definitions spread across supabase/functions/create-task/resolvers/*, AI timeline tool schemas/prompts, media-lightbox hooks, travel/join/edit-video UI flows, and task config files; the plan explicitly defers structured app extraction.",
"category": "completeness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "FLAG-002",
"concern": "Import safety: report tooling that imports scripts.live_test.matrix will also import live-test config, read .env, mutate orchestrator paths, and load live-test helper modules, which may be too heavy for a cheap CI/report command.",
"evidence": "scripts/live_test/matrix.py imports scripts.live_test.config, completion_poller, and task_spoofer; importing it locally produced a requests dependency warning and config bootstrapped the sibling orchestrator path.",
"category": "maintainability",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "issue_hints",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: App capability truth: the plan intentionally limits the first slice to app_sources references instead of extracting structured app capability rows from ../reigh-app. That is a divergence from the idea's desire to get to 100% app parity coverage and from the prep instruction to determine where capabilities are defined/enqueued; it may be acceptable as a first slice, but it means the first implementation cannot prove full app parity from actual app resolver inputs.",
"evidence": "App capability truth: the plan intentionally limits the first slice to app_sources references instead of extracting structured app capability rows from ../reigh-app. That is a divergence from the idea's desire to get to 100% app parity coverage and from the prep instruction to determine where capabilities are defined/enqueued; it may be acceptable as a first slice, but it means the first implementation cannot prove full app parity from actual app resolver inputs.",
"category": "completeness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Import safety: the plan says to import scripts.live_test.matrix to normalize matrix cases. I tested that import and it works, but it pulls in scripts.live_test.config, reads .env, mutates sys.path for the orchestrator repo, and imports live-test support modules that can emit dependency warnings. This is not fatal, but it weakens the plan's 'cheap in CI' and 'import-safe' goal; a safer implementation may need a lightweight matrix loader or careful tests around import side effects.",
"evidence": "Import safety: the plan says to import scripts.live_test.matrix to normalize matrix cases. I tested that import and it works, but it pulls in scripts.live_test.config, reads .env, mutates sys.path for the orchestrator repo, and imports live-test support modules that can emit dependency warnings. This is not fatal, but it weakens the plan's 'cheap in CI' and 'import-safe' goal; a safer implementation may need a lightweight matrix loader or careful tests around import side effects.",
"category": "correctness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: The plan's validation rule 'every route with vibecomfy_supported has exactly one or more contract rows' is underspecified for aliases and duplicate product surfaces. SPRINT_2_SELECTOR_MAP currently has both image-upscale and image_upscale as supported route keys pointing to the same template, while app/task code and live matrix use image-upscale; the validator should allow one capability contract to cover multiple route keys rather than requiring a misleading separate product capability row for each alias.",
"evidence": "The plan's validation rule 'every route with vibecomfy_supported has exactly one or more contract rows' is underspecified for aliases and duplicate product surfaces. SPRINT_2_SELECTOR_MAP currently has both image-upscale and image_upscale as supported route keys pointing to the same template, while app/task code and live matrix use image-upscale; the validator should allow one capability contract to cover multiple route keys rather than requiring a misleading separate product capability row for each alias.",
"category": "correctness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "scope",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: The broader app capability surface is larger than create-task: app/edge code references task creation through AI timeline tools, media-lightbox hooks, travel/join/edit-video UI flows, completion handlers, and task-type visibility/config files. The plan's first slice records source references but does not define a mechanism to detect when app resolver/UI enqueue behavior changes, so it will not fully prevent app-parity drift outside worker route maps.",
"evidence": "The broader app capability surface is larger than create-task: app/edge code references task creation through AI timeline tools, media-lightbox hooks, travel/join/edit-video UI flows, completion handlers, and task-type visibility/config files. The plan's first slice records source references but does not define a mechanism to detect when app resolver/UI enqueue behavior changes, so it will not fully prevent app-parity drift outside worker route maps.",
"category": "completeness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "all_locations-1",
"concern": "Does the change touch all locations AND supporting infrastructure?: The plan names docs/vibecomfy-app-parity-tracker.md as generated and adds a render check, but it does not mention adding a small README or usage note under scripts/capability_contracts/ or a docs command snippet beyond the generated file. This is a minor discoverability gap for the requested developer/agent UX, though python -m scripts.capability_contracts.report is a reasonable first entry point.",
"evidence": "The plan names docs/vibecomfy-app-parity-tracker.md as generated and adds a render check, but it does not mention adding a small README or usage note under scripts/capability_contracts/ or a docs command snippet beyond the generated file. This is a minor discoverability gap for the requested developer/agent UX, though python -m scripts.capability_contracts.report is a reasonable first entry point.",
"category": "completeness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "all_locations-2",
"concern": "Does the change touch all locations AND supporting infrastructure?: There is existing worker preflight support for checking only that VibeComfy manifests exist, but no preflight or CI hook yet for the new capability-contract report. The plan adds pytest drift tests and CLI validation, which is enough for the first slice, but the executor should decide whether to wire the new validation into an existing cheap test target or leave it as a standalone command.",
"evidence": "There is existing worker preflight support for checking only that VibeComfy manifests exist, but no preflight or CI hook yet for the new capability-contract report. The plan adds pytest drift tests and CLI validation, which is enough for the first slice, but the executor should decide whether to wire the new validation into an existing cheap test target or leave it as a standalone command.",
"category": "completeness",
"severity": "significant",
"status": "open",
"weight": null
},
{
"id": "callers",
"concern": "Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?: For the live matrix caller contract, build_matrix() accepts parameters for anchors, timeouts, selected backend, selector namespace/version/profile, and filtering. The plan should call it with defaults or read MATRIX, but validators must not mistake alternate runtime options for distinct product capabilities because the same route keys can be generated under different live-test runtime metadata.",
"evidence": "For the live matrix caller contract, build_matrix() accepts parameters for anchors, timeouts, selected backend, selector namespace/version/profile, and filtering. The plan should call it with defaults or read MATRIX, but validators must not mistake alternate runtime options for distinct product capabilities because the same route keys can be generated under different live-test runtime metadata.",
"category": "correctness",
"severity": "significant",
"status": "open",
"weight": null
}
]
code
Known accepted debt grouped by subsystem:
{
"are-the-proposed-changes-technically-correct": [
{
"id": "DEBT-004",
"concern": "are the proposed changes technically correct?: compared the proposed worker sigterm handling to the existing lifecycle structure in source/task_handlers/queue/task_queue.py:529-579. the queue entrypoint wraps startup and steady-state in one lifecycle block, but worker main() does not enter its cleanup try/finally until source/runtime/worker/server.py:405, so the proposed handler alone is not fully correct for startup-time shutdowns.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
},
{
"id": "DEBT-008",
"concern": "are the proposed changes technically correct?: compared the documented startup limitation to the actual lifecycle boundary in source/runtime/worker/server.py. because the cleanup try/finally still begins only at line 405, the proposed sigterm handler is only correct for steady-state shutdowns and not for startup-time sigterm, so the plan remains intentionally incomplete on that case.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"byte-compare-oracle": [
{
"id": "DEBT-010",
"concern": "clear_conditioning oracle is single-shape",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
}
],
"did-the-work-fully-address-the-issue-hints-user-notes-and-approved-plan-requirements": [
{
"id": "DEBT-002",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: checked the revised supervisor command against the original brief and source/task_handlers/worker/fatal_error_handler.py:443-445. rev 3 no longer claims literal argv equality and instead redefines "byte-identical" as "operator-equivalent", but the user note explicitly asked for byte-identical cli args, env, cwd, and python interpreter, so that requirement is still only partially addressed.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
},
{
"id": "DEBT-003",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: checked the startup-sigterm scope note against source/runtime/worker/server.py:299-405 and :535-554. the revision documents the startup-window limitation clearly, but it still leaves a user ctrl+c or sigterm during slow startup outside the cleanup path even though the brief did not carve that case out.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"find-the-callers-of-the-changed-function-what-arguments-do-they-actually-pass-does-the-fix-handle-all-of-them": [
{
"id": "DEBT-005",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: checked caller-visible argv assumptions against source/task_handlers/worker/fatal_error_handler.py:443-445. the absolute .../worker.py child path will satisfy the current substring-based detection, but any future caller that truly requires literal argv preservation would still see a different invocation shape than the brief originally asked for.",
"occurrence_count": 2,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"search-for-related-code-that-handles-the-same-concept-is-the-reported-issue-a-symptom-of-something-broader": [
{
"id": "DEBT-007",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: searched related signal-handling code and compared worker main() to source/task_handlers/queue/task_queue.py:529-579. the queue entrypoint wraps startup and steady-state in one lifecycle block, so documenting the worker startup gap as out of scope leaves a broader shutdown-consistency difference in place rather than fully aligning with the existing pattern.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"supervisor-invocation": [
{
"id": "DEBT-001",
"concern": "supervisor invocation: the revised plan still does not preserve a literally byte-identical worker invocation, because it explicitly redefines the requirement to mean operator-equivalent execution and still uses -u plus an absolute worker.py path.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"task-registry-ic-lora-wiring": [
{
"id": "DEBT-012",
"concern": "no integration test for get_ic_lora_entry() \u2192 activated_loras/loras_multipliers wiring after dedup extraction",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
}
],
"verification-gates": [
{
"id": "DEBT-009",
"concern": "'20 anchor tests' reinterpretation as minimum count",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
},
{
"id": "DEBT-011",
"concern": "persistent 20-anchor-tests literal-reading flag",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
}
],
"worker-shutdown": [
{
"id": "DEBT-006",
"concern": "worker shutdown: startup-window sigterm remains outside the worker cleanup path, so a user ctrl+c or sigterm during db init, wgp import, or task_queue.start() still will not run the terminated-heartbeat/task_queue.stop sequence.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"yaml-validation-tooling": [
{
"id": "DEBT-013",
"concern": ".venv lacks pip/pyyaml so the primary pyyaml-install yaml-validation path cannot run as written.",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-4-of-the-20260422-0347"
]
},
{
"id": "DEBT-014",
"concern": "same as all_locations-v4: .venv has no pip binary/module.",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-4-of-the-20260422-0347"
]
}
]
}
code
Escalated debt subsystems:
[]
Debt guidance:
- Treat recurring debt as decision context, not background noise.
- If the current unresolved flags overlap an escalated subsystem, prefer recommending holistic redesign over another point fix.
Iteration Pressure Analysis:
Group Flags Iters Reopened Concern
FG-001 1 1 0 App capability truth: the plan intentionally limit
FG-002 2 2 0 The plan's validation rule 'every route with vibe FG-003 1 1 0 The broader app capability surface is larger than FG-004 2 2 0 There is existing worker preflight support for che FG-005 1 1 0 For the live matrix caller contract, build_matrix
FG-006 1 1 0 App capability inventory: first slice only records
FG-007 1 1 0 Import safety: report tooling that imports `script
FG-008 1 1 0 Route alias modeling: validation could overcount p
FG-009 3 1 0 Criterion 7: requires human verification (subjecti
FG-010 1 1 0 Are the proposed changes technically correct?: Imp
FG-011 1 1 0 Does the change touch all locations AND supporting
code
Robustness level:
standard
Requirements:
- Decide exactly one of: PROCEED, ITERATE, ESCALATE, TIEBREAKER.
- Use the weighted score, flag details (including `evidence`), plan delta, recurring critiques, and preflight results as judgment context.
- PROCEED when execution should move forward now.
- ITERATE when revising the plan is the best next move.
- ESCALATE when the loop is stuck, churn is recurring, or user intervention is needed.
- TIEBREAKER when a flag group reflects an *unresolvable constraint tension* (architectural or philosophical — requires a human call) rather than a plan-quality issue. Use TIEBREAKER only when the Iteration Pressure Analysis shows `addressed_then_reopened_count >= 2` for a fuzzy group OR the group has >=2 member flags across >=2 iterations. If the concern is simply that the plan writer hasn't tried hard enough, use ITERATE instead. When recommending TIEBREAKER you MUST provide `tiebreaker_question` (the decision question for human resolution), `tiebreaker_flag_ids` (which flags this resolves), and `tiebreaker_fuzzy_group_id` (which group this resolves). Cite specific flag IDs and iterations in your rationale.
- `signals_assessment`: one paragraph summarizing score trajectory, flag status, and preflight posture.
Flags come in two tiers:
- **Blocking** (severity = significant/likely-significant): These are serious concerns. If you recommend PROCEED, you MUST provide a `flag_resolutions` entry for every blocking flag. There is no implicit acceptance.
- **Noted** (everything else): Acknowledge in your rationale but they don't block PROCEED.
If there are blocking flags and you want to PROCEED, provide `flag_resolutions` with one entry per blocking flag. If you cannot resolve every blocking flag, choose ITERATE (send back for revision) or ESCALATE (human intervention needed).
Structurally unresolvable flags (for example, infrastructure outside the repo or product decisions that require a human) are ESCALATE, not PROCEED with a non-answer.
For each blocking flag:
- **dispute**: The critique is factually wrong. Evidence must cite something specific (file path, line, API doc, etc.). Generic statements like "handled correctly" are invalid.
- **accept_tradeoff**: The concern is real but intentionally accepted as a known limitation. Rationale must be specific to this flag. Boilerplate like "acceptable within scope" is invalid.
- Schema requirement: every `flag_resolutions` entry must include both `evidence` and `rationale`. Use `""` for the field that does not apply to that action.
If there are no blocking flags, return `flag_resolutions: []`.
Always return `accepted_tradeoffs`; use `[]` when none apply.
Populate `settled_decisions` with design choices that should carry into review without re-litigation. Return `[]` when there are none.
Example:
```json
{
"recommendation": "PROCEED",
"rationale": "Core fix is correct. Convention concern accepted.",
"signals_assessment": "Score stable at 2.5, preflight passed, no recurring critiques.",
"warnings": ["Verify edge case with composite moduli during execution."],
"flag_resolutions": [
{"flag_id": "correctness-1", "action": "dispute", "evidence": "allow_migrate and allow_migrate_model produce identical behavior for this use case (verified at django/db/utils.py:286).", "rationale": ""},
{"flag_id": "performance-1", "action": "accept_tradeoff", "evidence": "", "rationale": "Cold-start latency remains 40ms above target because the cache warmup job is owned by platform and outside this repo; rollout is still approved for the limited internal beta."},
{"flag_id": "conventions-1", "action": "accept_tradeoff", "evidence": "", "rationale": "Minor naming inconsistency is confined to this helper and would create churn across generated fixtures; track it as follow-up cleanup instead of blocking this fix."}
],
"accepted_tradeoffs": [],
"settled_decisions": []
}
```
scripts.live_test.matrix
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 the gatekeeper for the megaplan workflow. Make the continuation decision directly.
Build and use a robust capability-contract and workflow-workbench toolchain that gets Reigh to 100% app parity coverage for VibeComfy vs existing Wan2GP/app behavior, while leaving reusable tools for future internal/community workflows, workflow forks, and scratch-built workflows.
Current situation and context:
Repos live under /Users/user_c042661f/Documents/reigh-workspace.
Main implementation repo for this run is reigh-worker. Current durable branch should be megaplan/vibecomfy-sprint-09-control-rail-travel-matrix.
VibeComfy repo is ../vibecomfy on branch megaplan/production-parity-templates.
reigh-app has a dirty working tree on its own branch; inspect it as source of app capability truth but do not casually commit or revert its changes.
The user wants actual execution after planning, not just a design doc. Keep going until the new tooling is built, then use it to continue closing validation/parity gaps.
The user explicitly requested this run in a GPT-5.5 medium subagent. This current agent is that subagent. The local megaplan CLI supports profiles and phase model overrides, but no installed profile exposes an explicit GPT-5.5 medium model string. Use the all-codex profile / Codex-compatible routing where possible and note that limitation.
Important current facts:
reigh-worker has a new tracker doc at docs/vibecomfy-app-parity-tracker.md.
reigh-worker has route contracts in source/task_handlers/tasks/template_routing.py.
reigh-worker has live matrix in scripts/live_test/matrix.py and live reports in scripts/live_test/runs/*/report.md.
reigh-worker has VibeComfy adapter/scratchpads in source/models/comfy/vibecomfy_adapter.py.
reigh-worker has worker preflight checks for VibeComfy template_index.json and workflow_corpus/manifests/coverage.json in source/runtime/worker/preflight.py.
reigh-worker has health route labels in source/runtime/worker/health_labels.py.
VibeComfy already owns workflow/template mechanics. Do not rebuild these in reigh-worker: python -m vibecomfy.cli port check, port convert, port widgets, validate, doctor, nodes install-plan/install/restore, fetch, workflows list, inspect, run, runpod; template_index.json; workflow_corpus/manifests/coverage.json; ready_templates; model registry/staging; custom-node pack registry; RunPod/corpus machinery.
A subagent history audit found oldest local VibeComfy commit around 2026-04-26, not March. It concluded: VibeComfy should own Comfy implementation truth; reigh-worker should own app/product task truth, routing, Wan2GP parity, DB/storage artifact semantics, and live app validation.
Validated live-green VibeComfy-supported cases from current tracker include:
z_image_turbo_i2i
But these are live-green cases, not proof of full app parity for all variants.
Known gaps to handle in plan/execution:
Need a central capability id/name per product behavior. Current concepts are messy: task_type, route_key, template_id, workflow id, live case name, and actual product capability are mixed.
Need variant-aware coverage: LoRAs, multiple LoRAs, URL LoRAs, phase-scheduled LoRAs, control methods raw/flow/canny/depth/pose/mask, source media variants, resolution/frame/FPS/profile/seed/prompt/negative prompt/interpolation/postprocess/output.
Need not brute-force all combinations; use risk-based pairwise/interaction coverage. Every app-exposed axis value needs at least one proof or fail-closed rule; known interactions need explicit cases.
Need distinguish non-Comfy paths like orchestration/stitching: these may remain WGP/non-template but still need contract validation for child creation, route metadata, DB state, and artifact behavior.
Need use VibeComfy validators rather than reimplementing graph/schema/custom node/model validation in worker.
Need tooling that helps agents/developers import, fork, or build workflows from scratch: draft contracts, inspect/explain, validate, diff, next-step guidance, status labels.
Prep phase instructions:
Inventory current tooling in reigh-worker, VibeComfy, and relevant reigh-app/Supabase enqueue surfaces.
Determine where app capabilities are defined/enqueued, without changing reigh-app unless explicitly necessary.
Inspect existing live matrix/report parsing affordances and any docs/tests around migration-baselines, worker matrix, template routing, artifact contracts, VibeComfy preflight.
Inspect VibeComfy CLI/docs/tests enough to avoid duplicating its responsibilities.
Identify the smallest executable first slice that creates real leverage, not just prose.
Desired high-level architecture:
Capability = product behavior users care about.
Route = execution decision for a capability variant.
Implementation = WGP or VibeComfy binding.
Template = VibeComfy implementation detail.
Workflow = source/import artifact.
Live case = validation sample/evidence.
Expected implementation direction:
Add a machine-readable capability contract registry in reigh-worker, likely under scripts/capability_contracts/ or source/task_handlers/tasks/ depending on repo patterns.
Add a CLI/report generator, e.g. python -m scripts.capability_contracts.report or similar, with commands/status output that can merge: registry, template_routing.py, scripts/live_test/matrix.py, ../vibecomfy/template_index.json, ../vibecomfy/workflow_corpus/manifests/coverage.json, and latest scripts/live_test/runs/*/report.md.
Generate or update docs/vibecomfy-app-parity-tracker.md from data rather than hand-maintaining it.
Add contract tests that fail if a vibecomfy_supported route lacks a contract row, VibeComfy template reference, output artifact contract, variant accounting, or live evidence pointer.
Add explicit status vocabulary: unknown/inventoried/routed/template_bound/static_valid/runtime_green/parity_reviewed/app_ready, plus wgp_only_contract_validated and unsupported_fail_closed where appropriate.
Add next-action/status output so a developer/agent can see what blocks 100% coverage.
Keep implementation bounded: first slice can be registry + report + tests + generated tracker + using it to identify and close obvious holes. Then continue improving if needed.
Success criteria:
MUST:
Use megaplan standard workflow with prep -> plan -> critique -> gate -> finalize -> execute -> review.
Build code, not only docs, unless prep proves there is already an equivalent working tool.
Do not duplicate VibeComfy workflow validators in reigh-worker; call/reference/consume VibeComfy outputs instead.
Produce a durable, checked-in capability-contract source of truth and generated/reportable parity status.
Cover every current live matrix VibeComfy-supported route with a contract row or an explicit justified exception.
Include app capability source references where practical.
Include variant axes for LoRA/control/source media/resolution/frame/FPS/profile/postprocess/output, even if some entries are initially gap/fail-closed.
Make the developer/agent UX discoverable through commands/docs.
Use the new tooling after building it to update the tracker and identify next parity gaps.
INFO:
Future directions include import/fork/new workflow workbench UX, but the first implementation should land the central capability contract and report loop.
code
Plan:
# Implementation Plan: Capability Contracts and App-Parity Reporting
Overview
Build a worker-local capability-contract source of truth and report loop that separates product capabilities from task types, route keys, VibeComfy template bindings, live cases, app enqueue surfaces, and artifact expectations. The root approach is still correct: the problem is not missing VibeComfy graph validation, it is missing worker-owned product/app parity accounting across routing, app task creation, variant axes, artifact semantics, and live evidence. The gate flags do not point to a different root cause; they show the first plan was too weak on three execution details: structured app inventory, import-safe live matrix evidence, and alias/duplicate route handling.
The revised first slice remains bounded and executable. It adds a worker-local registry and report CLI, a lightweight app capability inventory from selected ../reigh-app enqueue/resolver surfaces, an import-safe live matrix manifest consumed by the report tool, drift tests that can use heavier imports in pytest, generated tracker docs, and discoverability notes. It still does not duplicate VibeComfy workflow validators: worker code consumes VibeComfy template_index.json, workflow_corpus/manifests/coverage.json, and command hints, while VibeComfy remains the owner of template/workflow mechanics.
Phase 1: Foundation — Data Sources and Import Boundaries
Step 1: Add the contract package (scripts/capability_contracts/)
Scope: Medium
Createscripts/capability_contracts/__init__.py, scripts/capability_contracts/model.py, scripts/capability_contracts/loaders.py, scripts/capability_contracts/report.py, and scripts/capability_contracts/README.md.
Keep runtime dependencies stdlib-only (argparse, ast, dataclasses, json, pathlib, re, subprocess only if needed for optional command hints) so the report command is cheap in CI and worker contexts.
Model the status vocabulary as constants: unknown, inventoried, routed, template_bound, static_valid, runtime_green, parity_reviewed, app_ready, wgp_only_contract_validated, unsupported_fail_closed.
Model aliases explicitly with canonical_route_key plus route_keys, so one product capability can cover duplicate route spellings such as image-upscale and image_upscale without requiring fake duplicate capabilities.
Keep VibeComfy validation as evidence consumption, not reimplementation: load VibeComfy manifests and report missing/stale evidence; expose command hints such as python -m vibecomfy.cli validate <template> but do not inspect Comfy graph internals in reigh-worker.
Createscripts/capability_contracts/live_matrix_manifest.json as the import-safe live matrix evidence consumed by the CLI. Include only stable metadata: case_name, task_type, route_key, support_state, selected_template_id, and variant labels. Do not include runtime-only fields such as selector namespace, backend runtime options, generated task ids, anchors, or timeouts.
Createscripts/capability_contracts/app_capabilities.json as a lightweight structured app inventory. Each row should include capability_id, task_types, source_files, source_kind (create_task_resolver, ui_flow, edge_tool, media_lightbox, completion_contract, or task_type_config), and app-exposed axes when obvious from source.
Seed app inventory from concrete reigh-app surfaces rather than only free-form references: ../reigh-app/supabase/functions/create-task/resolvers/*, ../reigh-app/supabase/functions/create-task/index.ts, ../reigh-app/src/shared/lib/tasks/imageEditing/imageInpaint.ts, travel/join/edit-video enqueue flows, AI timeline task creation/delegation tools, and task type migrations/configs for the supported task types.
Add a lightweight scanner in loaders.py that reads only the configured source_files and verifies expected task_type literals or resolver names are still present. This is not a full TypeScript parser; it is drift detection for known app surfaces.
Do not modify reigh-app during this first slice. Treat reigh-app as read-only evidence and store only worker-local references plus scan expectations.
Step 3: Add the machine-readable capability registry (scripts/capability_contracts/contracts.json)
Scope: Large
Define one contract row per product capability or justified exception, with fields like:
Seed all current live-green VibeComfy-supported cases from the manifest, including direct image/edit/video routes and Wan VACE travel/join routes.
Add alias-aware rows where one capability has multiple route keys, especially image-upscale and image_upscale.
Add WGP-only contract rows for orchestration/stitching paths (travel_orchestrator, join_clips_orchestrator, edit_video_orchestrator, travel_stitch, join_final_stitch where present) with implementation: "wgp", no template_id, and DB/artifact behavior expectations.
Represent fail-closed variant axes explicitly, especially dynamic LoRAs, multiple LoRAs beyond supported slots, URL LoRAs, Flux Klein non-4B variants, missing control videos, unsupported LTX/Wan rows, and source-media/control interactions.
ImportSPRINT_2_SELECTOR_MAP, SECTION3A_ROUTE_SUPPORT_MAP, and RouteSupportState from source/task_handlers/tasks/template_routing.py; this module is intentionally lightweight and does not import WGP or VibeComfy.
Normalize route support into route records with route_key, support_state, template_id, default_resolution, and any blocking reason.
Validate that every route with vibecomfy_supported is covered by a contract row through either canonical_route_key or route_keys.
Validate that contract template_id agrees with route selector entries where both are present.
Step 5: Load live matrix evidence without report-time imports (live_matrix_manifest.json, scripts/live_test/matrix.py)
Scope: Medium
Make the CLI consume only live_matrix_manifest.json to avoid importing scripts.live_test.matrix, which pulls live-test config, .env, orchestrator path mutation, and helper modules.
Add pytest drift coverage that imports scripts.live_test.matrix in the test process and compares build_matrix() default output to live_matrix_manifest.json for stable fields only.
Ignore runtime-only matrix dimensions in product capability matching: selected backend, selector namespace/version/profile, generated task ids, anchors, and timeouts are execution metadata, not distinct product capabilities.
Validate that every manifest case marked vibecomfy_supported has a matching contract row and that selected_template_id matches the contract unless the contract documents an explicit blocker.
Read each configured app source file and verify expected task type literals, resolver filenames, or exported capability symbols are still present.
Report app capability rows that are not linked from any worker contract as app-parity gaps.
Report worker contracts that have no linked app capability as worker-only or live-test-only gaps unless explicitly marked WGP-only/internal.
Keep this scanner intentionally lightweight: no TypeScript build, no AST dependency beyond optional regex/literal checks, and no reigh-app writes.
Step 7: Load VibeComfy static and live evidence (../vibecomfy, scripts/live_test/runs/*/report.json)
Scope: Medium
Read VibeComfy files from VIBECOMFY_PATH when set, otherwise ../vibecomfy: template_index.json and workflow_corpus/manifests/coverage.json.
Marktemplate_bound when a contract has a template id, and static_valid only when that template appears in template_index.json or the contract includes a narrowly justified static-evidence blocker.
Flag current likely blockers instead of silently passing stale evidence: image/z_image_img2img, Wan 2.2 T2I/I2V/VACE, animate, basic image upscale, and basic video enhance were not present in the inspected template index.
Parse live evidence from scripts/live_test/runs/*/report.json, selecting the newest passing evidence per live case where final_status == "Complete", output exists, generation IDs exist, and no error summary is present.
Keep Markdown report parsing out of the first slice unless a live case has no JSON evidence; if Markdown fallback is added, mark it lower-confidence in status output.
Phase 3: CLI, Generated Tracker, and Discoverability
Step 8: Implement the report CLI (python -m scripts.capability_contracts.report)
Make validate fail nonzero for hard drift: missing contract rows for supported routes, route/template mismatch, missing artifact contract, missing variant accounting, invalid status, missing app inventory link for app-exposed capabilities, stale app source scan expectations, or runtime_green without passing live evidence.
Make status --json deterministic with stable sort order by status, capability id, and canonical route key.
Make next-actions actionable, grouping blockers by app inventory, route binding, VibeComfy template index, live evidence, artifact contract, variant accounting, and parity review.
Leave CI wiring as tests plus explicit command docs for the first slice; do not add deployment/preflight behavior unless an existing cheap test target clearly accepts this kind of validation.
Step 9: Generate the tracker and usage docs (docs/vibecomfy-app-parity-tracker.md, scripts/capability_contracts/README.md)
Scope: Medium
Replace hand-maintained live-green tables with generated sections from registry plus evidence.
Include status legend, summary counts, app inventory coverage, app-ready/runtime-green/static blockers, WGP-only validated paths, unsupported fail-closed paths, alias coverage, and next actions.
Mark the tracker as generated and point edits to contracts.json, app_capabilities.json, and live_matrix_manifest.json.
Addscripts/capability_contracts/README.md with the command snippets, expected workflow for adding a new capability, and the VibeComfy validation boundary.
Run the generator and inspect the diff for accidental loss of useful parity notes.
Phase 4: Tests, Gate Readiness, and Execution Review
Assert every vibecomfy_supported route in SPRINT_2_SELECTOR_MAP and SECTION3A_ROUTE_SUPPORT_MAP is covered by a contract via canonical_route_key or route_keys.
Assert route aliases can be covered by one product capability contract and do not require duplicate capability rows.
Assert default scripts.live_test.matrix.build_matrix() stable metadata matches live_matrix_manifest.json without the report CLI importing the live matrix module.
Assert every vibecomfy_supported live matrix manifest case has a matching contract row and live evidence pointer when the contract status is runtime_green or higher.
Assert every VibeComfy contract has a template_id, artifact contract, variant axes, linked app capability or explicit internal/WGP exception, and either template-index evidence or a clear static blocker.
Assert WGP-only contracts have no template_id and do have DB/artifact behavior expectations.
Assert app inventory source files exist and configured task type literals/resolver identifiers are still present in reigh-app.
Assertdocs/vibecomfy-app-parity-tracker.md is regenerated from current data by running render check or comparing generated text to file contents.
Step 11: Run cheap validation first, then targeted tests
Scope: Small
Run JSON validation on contracts.json, app_capabilities.json, and live_matrix_manifest.json.
Runpython -m scripts.capability_contracts.report status --json.
Only run broader tests if shared routing behavior or live-test primitives are changed beyond manifest/test additions.
Step 12: Use the tool output to close first-slice gaps
Scope: Medium
Usenext-actions output after the first passing implementation to identify obvious missing rows, stale app inventory links, missing live evidence, alias mismatches, or stale template-index refs.
Close worker-local data gaps when they are clearly contract/evidence problems.
Do not modify reigh-app; if app truth cannot be represented by the lightweight inventory, record it as an app inventory blocker and keep dirty app work intact.
Do not modify VibeComfy workflow/template mechanics. If the only blocker is a stale VibeComfy index, report it as a static evidence blocker with the VibeComfy command hint rather than changing the sibling repo in this first slice.
Stop before speculative workflow-workbench UI work; document import/fork/scratch workflow support as a future layer built on the registry/report loop.
Execution Order
Add data models, status constants, README skeleton, and JSON loaders.
Add app_capabilities.json, live_matrix_manifest.json, and contracts.json with seeded rows for current live-supported and WGP-only paths.
Add route, app, VibeComfy, and live-report evidence loading.
Add alias-aware validation and deterministic status/next-action output.
Generate the tracker and README usage examples.
Add drift tests, including heavy live matrix import only inside pytest.
Run validation commands and targeted tests.
Use the report output to close obvious first-slice registry gaps, then leave deeper app/workflow work as explicit next actions.
This plan stays inside the current harness workflow without invoking nested megaplan tooling. It addresses the gate feedback by making app capability truth structured enough to detect drift, making the report CLI import-safe by consuming a live matrix manifest instead of importing live-test modules, treating aliases as first-class coverage, adding discoverability docs, and keeping CI/preflight integration bounded to explicit validation commands and pytest drift tests for the first slice.
code
Plan metadata:
{
"version": 2,
"timestamp": "2026-05-08T21:51:32Z",
"hash": "sha256:f026ea5a175a8bf6861738ff1a36a2a35996d42db1f4aaef210e256292e843a4",
"changes_summary": "Revised the plan to add a structured app capability inventory, avoid report-time imports of scripts.live_test.matrix, model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities.",
"flags_addressed": [
"FLAG-001",
"FLAG-002",
"issue_hints",
"correctness-1",
"correctness-2",
"scope",
"all_locations-1",
"all_locations-2",
"callers"
],
"questions": [],
"success_criteria": [
{
"criterion": "A durable machine-readable capability contract registry exists in reigh-worker and includes all current live-matrix VibeComfy-supported cases or explicit justified exceptions.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "A structured worker-local app capability inventory exists, links app-exposed capabilities to contract rows, and verifies configured reigh-app source files/literals without modifying reigh-app.",
"priority": "must",
"requires": [
"read_files",
"run_tests",
"parse_diff"
]
},
{
"criterion": "The report CLI can validate, emit deterministic JSON status, render the parity tracker, show app inventory status, and print next-action blockers without importing live-test config or reimplementing VibeComfy workflow validators.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "Every vibecomfy_supported route in worker route maps is covered by a contract row through canonical route key or alias route key, and tests fail on future drift.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The live matrix manifest is import-safe for the report CLI and is tested against scripts.live_test.matrix.build_matrix() stable fields in pytest.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Every VibeComfy implementation contract has a template binding, artifact contract, variant-axis accounting, linked app capability or explicit exception, and static/live evidence status or a clear blocker.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": "docs/vibecomfy-app-parity-tracker.md is generated from registry/report data and generation drift is testable.",
"priority": "must",
"requires": [
"run_shell",
"run_tests",
"parse_diff"
]
},
{
"criterion": "Targeted tests for capability contracts, template routing, and live matrix primitives pass.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "reigh-app remains unmodified unless a later explicit decision is made to change app code.",
"priority": "must",
"requires": [
"parse_diff"
]
},
{
"criterion": "The developer/agent workflow is discoverable through scripts/capability_contracts/README.md and generated tracker command snippets.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Report output groups missing template index entries, missing live evidence, app source gaps, artifact contract gaps, alias coverage, and parity-review gaps into actionable next steps.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"subjective_judgment"
]
},
{
"criterion": "Variant axes include LoRA, control/source media, resolution, frames/FPS, profile, postprocess, output/artifact, prompt/negative prompt, and seed where relevant, even when initially marked fail-closed or gap.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Future workflow import/fork/scratch-built workbench UX is documented as a follow-on direction, not built in the first slice.",
"priority": "info",
"requires": [
"read_files"
]
}
],
"assumptions": [
"No critique flag changes the root cause: reigh-worker needs product/app capability accounting and validation, while VibeComfy remains the workflow/template implementation owner.",
"The first slice should stay in reigh-worker and treat reigh-app as read-only evidence.",
"Structured app parity in the first slice means a lightweight worker-local app inventory plus source drift checks, not a full TypeScript parser or app build.",
"The report CLI must not import ; it should consume , while pytest can import to prove the manifest has not drifted.",
"Route aliases and duplicate task spellings should be covered by one capability contract when they represent the same product behavior.",
"Template ids missing from are static evidence blockers unless VibeComfy-owned artifacts are regenerated separately.",
"WGP-only orchestration/stitching paths remain valid product capabilities and need DB/artifact contracts rather than VibeComfy template bindings."
],
"delta_from_previous_percent": 63.18,
"structure_warnings": []
}
code
Gate signals:
{
"robustness": "standard",
"signals": {
"iteration": 2,
"idea": "Build and use a robust capability-contract and workflow-workbench toolchain that gets Reigh to 100% app parity coverage for VibeComfy vs existing Wan2GP/app behavior, while leaving reusable tools for future internal/community workflows, workflow forks, and scratch-built workflows.\n\nCurrent situation and context:\n- Repos live under /Users/user_c042661f/Documents/reigh-workspace.\n- Main implementation repo for this run is reigh-worker. Current durable branch should be megaplan/vibecomfy-sprint-09-control-rail-travel-matrix.\n- VibeComfy repo is ../vibecomfy on branch megaplan/production-parity-templates.\n- reigh-app has a dirty working tree on its own branch; inspect it as source of app capability truth but do not casually commit or revert its changes.\n- The user wants actual execution after planning, not just a design doc. Keep going until the new tooling is built, then use it to continue closing validation/parity gaps.\n- The user explicitly requested this run in a GPT-5.5 medium subagent. This current agent is that subagent. The local megaplan CLI supports profiles and phase model overrides, but no installed profile exposes an explicit GPT-5.5 medium model string. Use the all-codex profile / Codex-compatible routing where possible and note that limitation.\n\nImportant current facts:\n- reigh-worker has a new tracker doc at docs/vibecomfy-app-parity-tracker.md.\n- reigh-worker has route contracts in source/task_handlers/tasks/template_routing.py.\n- reigh-worker has live matrix in scripts/live_test/matrix.py and live reports in scripts/live_test/runs//report.md.\n- reigh-worker has VibeComfy adapter/scratchpads in source/models/comfy/vibecomfy_adapter.py.\n- reigh-worker has worker preflight checks for VibeComfy template_index.json and workflow_corpus/manifests/coverage.json in source/runtime/worker/preflight.py.\n- reigh-worker has health route labels in source/runtime/worker/health_labels.py.\n- VibeComfy already owns workflow/template mechanics. Do not rebuild these in reigh-worker: python -m vibecomfy.cli port check, port convert, port widgets, validate, doctor, nodes install-plan/install/restore, fetch, workflows list, inspect, run, runpod; template_index.json; workflow_corpus/manifests/coverage.json; ready_templates; model registry/staging; custom-node pack registry; RunPod/corpus machinery.\n- A subagent history audit found oldest local VibeComfy commit around 2026-04-26, not March. It concluded: VibeComfy should own Comfy implementation truth; reigh-worker should own app/product task truth, routing, Wan2GP parity, DB/storage artifact semantics, and live app validation.\n\nValidated live-green VibeComfy-supported cases from current tracker include:\n- individual_travel_segment_wan22_vace raw/flow/canny/depth\n- travel_segment_wan22_vace raw/flow/canny/depth video_source\n- join_clips_segment_wan22_vace\n- qwen_image_style\n- qwen_image_t2i\n- qwen_image_2512\n- wan_2_2_t2i\n- wan_2_2_i2v\n- animate_character\n- image_upscale\n- video_enhance\n- flux_klein_edit\n- qwen_image_edit\n- image_inpaint\n- annotated_image_edit\n- z_image_turbo\n- z_image_turbo_i2i\nBut these are live-green cases, not proof of full app parity for all variants.\n\nKnown gaps to handle in plan/execution:\n- Need a central capability id/name per product behavior. Current concepts are messy: task_type, route_key, template_id, workflow id, live case name, and actual product capability are mixed.\n- Need capability contract registry/report generator tying app capabilities -> task types -> route keys -> Wan2GP behavior/defaults -> VibeComfy implementation/template/scratchpad -> variant axes -> output artifact contract -> static/live validation evidence.\n- Need variant-aware coverage: LoRAs, multiple LoRAs, URL LoRAs, phase-scheduled LoRAs, control methods raw/flow/canny/depth/pose/mask, source media variants, resolution/frame/FPS/profile/seed/prompt/negative prompt/interpolation/postprocess/output.\n- Need not brute-force all combinations; use risk-based pairwise/interaction coverage. Every app-exposed axis value needs at least one proof or fail-closed rule; known interactions need explicit cases.\n- Need distinguish non-Comfy paths like orchestration/stitching: these may remain WGP/non-template but still need contract validation for child creation, route metadata, DB state, and artifact behavior.\n- Need use VibeComfy validators rather than reimplementing graph/schema/custom node/model validation in worker.\n- Need tooling that helps agents/developers import, fork, or build workflows from scratch: draft contracts, inspect/explain, validate, diff, next-step guidance, status labels.\n\nPrep phase instructions:\n1. Inventory current tooling in reigh-worker, VibeComfy, and relevant reigh-app/Supabase enqueue surfaces.\n2. Determine where app capabilities are defined/enqueued, without changing reigh-app unless explicitly necessary.\n3. Inspect existing live matrix/report parsing affordances and any docs/tests around migration-baselines, worker matrix, template routing, artifact contracts, VibeComfy preflight.\n4. Inspect VibeComfy CLI/docs/tests enough to avoid duplicating its responsibilities.\n5. Identify the smallest executable first slice that creates real leverage, not just prose.\n\nDesired high-level architecture:\n- Capability = product behavior users care about.\n- Route = execution decision for a capability variant.\n- Implementation = WGP or VibeComfy binding.\n- Template = VibeComfy implementation detail.\n- Workflow = source/import artifact.\n- Live case = validation sample/evidence.\n\nExpected implementation direction:\n- Add a machine-readable capability contract registry in reigh-worker, likely under scripts/capability_contracts/ or source/task_handlers/tasks/ depending on repo patterns.\n- Add a CLI/report generator, e.g. python -m scripts.capability_contracts.report or similar, with commands/status output that can merge: registry, template_routing.py, scripts/live_test/matrix.py, ../vibecomfy/template_index.json, ../vibecomfy/workflow_corpus/manifests/coverage.json, and latest scripts/live_test/runs//report.md.\n- Generate or update docs/vibecomfy-app-parity-tracker.md from data rather than hand-maintaining it.\n- Add contract tests that fail if a vibecomfy_supported route lacks a contract row, VibeComfy template reference, output artifact contract, variant accounting, or live evidence pointer.\n- Add explicit status vocabulary: unknown/inventoried/routed/template_bound/static_valid/runtime_green/parity_reviewed/app_ready, plus wgp_only_contract_validated and unsupported_fail_closed where appropriate.\n- Add next-action/status output so a developer/agent can see what blocks 100% coverage.\n- Keep implementation bounded: first slice can be registry + report + tests + generated tracker + using it to identify and close obvious holes. Then continue improving if needed.\n\nSuccess criteria:\nMUST:\n- Use megaplan standard workflow with prep -> plan -> critique -> gate -> finalize -> execute -> review.\n- Build code, not only docs, unless prep proves there is already an equivalent working tool.\n- Do not duplicate VibeComfy workflow validators in reigh-worker; call/reference/consume VibeComfy outputs instead.\n- Produce a durable, checked-in capability-contract source of truth and generated/reportable parity status.\n- Cover every current live matrix VibeComfy-supported route with a contract row or an explicit justified exception.\n- Add tests proving route/template/live-evidence coverage cannot silently drift.\n- Keep dirty unrelated app work intact.\nSHOULD:\n- Include app capability source references where practical.\n- Include variant axes for LoRA/control/source media/resolution/frame/FPS/profile/postprocess/output, even if some entries are initially gap/fail-closed.\n- Make the developer/agent UX discoverable through commands/docs.\n- Use the new tooling after building it to update the tracker and identify next parity gaps.\nINFO:\n- Future directions include import/fork/new workflow workbench UX, but the first implementation should land the central capability contract and report loop.",
"significant_flags": 0,
"unresolved_flags": [],
"resolved_flags": [
{
"id": "FLAG-001",
"concern": "App capability inventory: first slice only records app source references, so it cannot prove 100% app parity against actual reigh-app resolver/UI enqueue behavior.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "FLAG-002",
"concern": "Import safety: report tooling that imports will also import live-test config, read , mutate orchestrator paths, and load live-test helper modules, which may be too heavy for a cheap CI/report command.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "FLAG-003",
"concern": "Route alias modeling: validation could overcount product capabilities if it requires separate rows for route aliases such as and instead of allowing one contract to cover multiple route keys.",
"resolution": " contains both supported route keys with the same template, while the live matrix uses ."
},
{
"id": "issue_hints",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: App capability truth: the plan intentionally limits the first slice to references instead of extracting structured app capability rows from . That is a divergence from the idea's desire to get to 100% app parity coverage and from the prep instruction to determine where capabilities are defined/enqueued; it may be acceptable as a first slice, but it means the first implementation cannot prove full app parity from actual app resolver inputs.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Import safety: the plan says to import to normalize matrix cases. I tested that import and it works, but it pulls in , reads , mutates for the orchestrator repo, and imports live-test support modules that can emit dependency warnings. This is not fatal, but it weakens the plan's 'cheap in CI' and 'import-safe' goal; a safer implementation may need a lightweight matrix loader or careful tests around import side effects.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: The plan's validation rule 'every route with has exactly one or more contract rows' is underspecified for aliases and duplicate product surfaces. currently has both and as supported route keys pointing to the same template, while app/task code and live matrix use ; the validator should allow one capability contract to cover multiple route keys rather than requiring a misleading separate product capability row for each alias.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "scope",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: The broader app capability surface is larger than : app/edge code references task creation through AI timeline tools, media-lightbox hooks, travel/join/edit-video UI flows, completion handlers, and task-type visibility/config files. The plan's first slice records source references but does not define a mechanism to detect when app resolver/UI enqueue behavior changes, so it will not fully prevent app-parity drift outside worker route maps.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "all_locations-1",
"concern": "Does the change touch all locations AND supporting infrastructure?: The plan names as generated and adds a render check, but it does not mention adding a small README or usage note under or a docs command snippet beyond the generated file. This is a minor discoverability gap for the requested developer/agent UX, though is a reasonable first entry point.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "all_locations-2",
"concern": "Does the change touch all locations AND supporting infrastructure?: There is existing worker preflight support for checking only that VibeComfy manifests exist, but no preflight or CI hook yet for the new capability-contract report. The plan adds pytest drift tests and CLI validation, which is enough for the first slice, but the executor should decide whether to wire the new validation into an existing cheap test target or leave it as a standalone command.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
},
{
"id": "callers",
"concern": "Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?: For the live matrix caller contract, accepts parameters for anchors, timeouts, selected backend, selector namespace/version/profile, and filtering. The plan should call it with defaults or read , but validators must not mistake alternate runtime options for distinct product capabilities because the same route keys can be generated under different live-test runtime metadata.",
"resolution": "Revised the plan to add a structured app capability inventory, avoid report-time imports of , model route aliases explicitly, add README/discoverability docs, define a standalone validation/test path, and clarify that runtime matrix options are execution metadata rather than separate product capabilities."
}
],
"weighted_score": 0,
"weighted_history": [
14.25
],
"plan_delta_from_previous": 63.18,
"recurring_critiques": [
"criterion 9: requires human verification (subjective_judgment)."
],
"scope_creep_flags": [],
"loop_summary": "Iteration 2. Weighted score trajectory: 14.25 -> 0. Plan deltas: 63.2%. Recurring critiques: 1. Resolved flags: 10. Open significant flags: 0.",
"debt_overlaps": [],
"escalated_debt_subsystems": []
},
"warnings": [],
"criteria_check": {
"count": 13,
"items": [
{
"criterion": "A durable machine-readable capability contract registry exists in reigh-worker and includes all current live-matrix VibeComfy-supported cases or explicit justified exceptions.",
"priority": "must",
"requires": [
"read_files",
"parse_diff"
]
},
{
"criterion": "A structured worker-local app capability inventory exists, links app-exposed capabilities to contract rows, and verifies configured reigh-app source files/literals without modifying reigh-app.",
"priority": "must",
"requires": [
"read_files",
"run_tests",
"parse_diff"
]
},
{
"criterion": "The report CLI can validate, emit deterministic JSON status, render the parity tracker, show app inventory status, and print next-action blockers without importing live-test config or reimplementing VibeComfy workflow validators.",
"priority": "must",
"requires": [
"run_shell",
"read_build_output",
"parse_diff"
]
},
{
"criterion": "Every route in worker route maps is covered by a contract row through canonical route key or alias route key, and tests fail on future drift.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "The live matrix manifest is import-safe for the report CLI and is tested against stable fields in pytest.",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Every VibeComfy implementation contract has a template binding, artifact contract, variant-axis accounting, linked app capability or explicit exception, and static/live evidence status or a clear blocker.",
"priority": "must",
"requires": [
"run_tests",
"read_files",
"parse_diff"
]
},
{
"criterion": " is generated from registry/report data and generation drift is testable.",
"priority": "must",
"requires": [
"run_shell",
"run_tests",
"parse_diff"
]
},
{
"criterion": "Targeted tests for capability contracts, template routing, and live matrix primitives pass.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "reigh-app remains unmodified unless a later explicit decision is made to change app code.",
"priority": "must",
"requires": [
"parse_diff"
]
},
{
"criterion": "The developer/agent workflow is discoverable through and generated tracker command snippets.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Report output groups missing template index entries, missing live evidence, app source gaps, artifact contract gaps, alias coverage, and parity-review gaps into actionable next steps.",
"priority": "should",
"requires": [
"run_shell",
"read_build_output",
"subjective_judgment"
]
},
{
"criterion": "Variant axes include LoRA, control/source media, resolution, frames/FPS, profile, postprocess, output/artifact, prompt/negative prompt, and seed where relevant, even when initially marked fail-closed or gap.",
"priority": "should",
"requires": [
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Future workflow import/fork/scratch-built workbench UX is documented as a follow-on direction, not built in the first slice.",
"priority": "info",
"requires": [
"read_files"
]
}
]
},
"preflight_results": {
"project_dir_exists": true,
"project_dir_writable": true,
"success_criteria_present": true,
"claude_available": true,
"codex_available": true
},
"unresolved_flags": []
}
"are-the-proposed-changes-technically-correct": [
{
"id": "DEBT-004",
"concern": "are the proposed changes technically correct?: compared the proposed worker sigterm handling to the existing lifecycle structure in source/task_handlers/queue/task_queue.py:529-579. the queue entrypoint wraps startup and steady-state in one lifecycle block, but worker main() does not enter its cleanup try/finally until source/runtime/worker/server.py:405, so the proposed handler alone is not fully correct for startup-time shutdowns.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
},
{
"id": "DEBT-008",
"concern": "are the proposed changes technically correct?: compared the documented startup limitation to the actual lifecycle boundary in source/runtime/worker/server.py. because the cleanup try/finally still begins only at line 405, the proposed sigterm handler is only correct for steady-state shutdowns and not for startup-time sigterm, so the plan remains intentionally incomplete on that case.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"byte-compare-oracle": [
{
"id": "DEBT-010",
"concern": "clear_conditioning oracle is single-shape",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
}
],
"did-the-work-fully-address-the-issue-hints-user-notes-and-approved-plan-requirements": [
{
"id": "DEBT-002",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: checked the revised supervisor command against the original brief and source/task_handlers/worker/fatal_error_handler.py:443-445. rev 3 no longer claims literal argv equality and instead redefines "byte-identical" as "operator-equivalent", but the user note explicitly asked for byte-identical cli args, env, cwd, and python interpreter, so that requirement is still only partially addressed.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
},
{
"id": "DEBT-003",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: checked the startup-sigterm scope note against source/runtime/worker/server.py:299-405 and :535-554. the revision documents the startup-window limitation clearly, but it still leaves a user ctrl+c or sigterm during slow startup outside the cleanup path even though the brief did not carve that case out.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"find-the-callers-of-the-changed-function-what-arguments-do-they-actually-pass-does-the-fix-handle-all-of-them": [
{
"id": "DEBT-005",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: checked caller-visible argv assumptions against source/task_handlers/worker/fatal_error_handler.py:443-445. the absolute .../worker.py child path will satisfy the current substring-based detection, but any future caller that truly requires literal argv preservation would still see a different invocation shape than the brief originally asked for.",
"occurrence_count": 2,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"search-for-related-code-that-handles-the-same-concept-is-the-reported-issue-a-symptom-of-something-broader": [
{
"id": "DEBT-007",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: searched related signal-handling code and compared worker main() to source/task_handlers/queue/task_queue.py:529-579. the queue entrypoint wraps startup and steady-state in one lifecycle block, so documenting the worker startup gap as out of scope leaves a broader shutdown-consistency difference in place rather than fully aligning with the existing pattern.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"supervisor-invocation": [
{
"id": "DEBT-001",
"concern": "supervisor invocation: the revised plan still does not preserve a literally byte-identical worker invocation, because it explicitly redefines the requirement to mean operator-equivalent execution and still uses plus an absolute path.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"task-registry-ic-lora-wiring": [
{
"id": "DEBT-012",
"concern": "no integration test for get_ic_lora_entry() \u2192 activated_loras/loras_multipliers wiring after dedup extraction",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
}
],
"verification-gates": [
{
"id": "DEBT-009",
"concern": "'20 anchor tests' reinterpretation as minimum count",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
},
{
"id": "DEBT-011",
"concern": "persistent 20-anchor-tests literal-reading flag",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-3-of-the-20260422-0132"
]
}
],
"worker-shutdown": [
{
"id": "DEBT-006",
"concern": "worker shutdown: startup-window sigterm remains outside the worker cleanup path, so a user ctrl+c or sigterm during db init, wgp import, or task_queue.start() still will not run the terminated-heartbeat/task_queue.stop sequence.",
"occurrence_count": 1,
"plan_ids": [
"add-idle-release-feature-for-20260408-0309"
]
}
],
"yaml-validation-tooling": [
{
"id": "DEBT-013",
"concern": ".venv lacks pip/pyyaml so the primary pyyaml-install yaml-validation path cannot run as written.",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-4-of-the-20260422-0347"
]
},
{
"id": "DEBT-014",
"concern": "same as all_locations-v4: .venv has no pip binary/module.",
"occurrence_count": 1,
"plan_ids": [
"execute-sprint-4-of-the-20260422-0347"
]
}
]
}
code
Escalated debt subsystems:
[]
Debt guidance:
- Treat recurring debt as decision context, not background noise.
- If the current unresolved flags overlap an escalated subsystem, prefer recommending holistic redesign over another point fix.
Iteration Pressure Analysis:
Group Flags Iters Reopened Concern
FG-001 1 1 0 App capability truth: the plan intentionally limit
FG-002 2 2 0 The plan's validation rule 'every route with vibe FG-003 1 1 0 The broader app capability surface is larger than FG-004 2 2 0 There is existing worker preflight support for che FG-005 1 1 0 For the live matrix caller contract, build_matrix
FG-006 1 1 0 App capability inventory: first slice only records
FG-007 1 1 0 Import safety: report tooling that imports `script
FG-008 1 1 0 Route alias modeling: validation could overcount p
FG-009 3 2 0 Criterion 9: requires human verification (subjecti
FG-010 1 1 0 Are the proposed changes technically correct?: Imp
FG-011 1 1 0 Does the change touch all locations AND supporting
code
{"recommendation":"PROCEED","rationale":"Execution should move forward now. The revised plan addresses the prior significant concerns with concrete design changes: structured app inventory, import-safe live matrix manifest, alias-aware route coverage, discoverability docs, and explicit validation/test commands. Remaining recurring critique is only subjective verification for developer workflow quality, which is reviewable during execution rather than a planning blocker.","signals_assessment":"Weighted score improved from 14.25 to 0 across iteration 2, with all significant flags resolved and no unresolved blockers. The plan delta is substantial at 63.18%, which matches the scope of the fixes requested by the first gate. Preflight is clean: project directory exists, is writable, success criteria are present, and both Claude/Codex are available. No escalated debt subsystem overlaps this work.","warnings":["During execution, verify the report CLI truly does not import scripts.live_test.matrix or live-test config outside pytest.","Keep reigh-app read-only and use source scanning/inventory references only.","Treat missing VibeComfy template-index entries as static blockers unless separately instructed to update VibeComfy artifacts."],"flag_resolutions":[],"accepted_tradeoffs":[],"settled_decisions":[{"id":"worker_local_contract_registry","decision":"Build the first durable source of truth under scripts/capability_contracts/ with contracts.json, app_capabilities.json, and live_matrix_manifest.json.","rationale":"This creates reviewable, dependency-light parity accounting inside reigh-worker without moving VibeComfy implementation truth into worker code."},{"id":"import_safe_report_cli","decision":"The report CLI must consume live_matrix_manifest.json; only pytest may import scripts.live_test.matrix to check manifest drift.","rationale":"This resolves the import-safety concern while still proving the manifest tracks the live-test matrix."},{"id":"structured_app_inventory","decision":"Use a lightweight worker-local app inventory with source-file/literal checks rather than a full TypeScript parser or reigh-app build.","rationale":"This gives concrete app parity drift detection in the first slice while preserving the instruction not to modify reigh-app."},{"id":"alias_aware_route_coverage","decision":"Allow one product capability contract to cover multiple route keys through canonical_route_key and route_keys.","rationale":"This prevents route spelling aliases like image-upscale and image_upscale from becoming fake duplicate product capabilities."},{"id":"vibecomfy_boundary","decision":"Consume VibeComfy template_index.json and coverage manifests as evidence; do not reimplement graph/schema/custom-node validation in reigh-worker.","rationale":"This preserves ownership boundaries and keeps the worker toolchain focused on app/product parity, route binding, artifact contracts, and live evidence."}],"tiebreaker_question":"","tiebreaker_flag_ids":[],"tiebreaker_fuzzy_group_id":""}
Not yet included in a published release.
scripts.live_test.matrix
live_matrix_manifest.json
build_matrix()
../vibecomfy/template_index.json
scripts.live_test.matrix
scripts.live_test.matrix
.env
scripts.live_test.matrix
image-upscale
image_upscale
SPRINT_2_SELECTOR_MAP
image/basic_image_upscale
image-upscale
app_sources
../reigh-app
scripts.live_test.matrix
scripts.live_test.matrix
scripts.live_test.config
.env
sys.path
scripts.live_test.matrix
vibecomfy_supported
SPRINT_2_SELECTOR_MAP
image-upscale
image_upscale
image-upscale
scripts.live_test.matrix
create-task
scripts.live_test.matrix
docs/vibecomfy-app-parity-tracker.md
scripts/capability_contracts/
python -m scripts.capability_contracts.report
scripts.live_test.matrix
scripts.live_test.matrix
build_matrix()
MATRIX
scripts.live_test.matrix
vibecomfy_supported
scripts.live_test.matrix.build_matrix()
docs/vibecomfy-app-parity-tracker.md
scripts/capability_contracts/README.md
-u
worker.py
Robustness level:
standard
Requirements:
- Decide exactly one of: PROCEED, ITERATE, ESCALATE, TIEBREAKER.
- Use the weighted score, flag details (including `evidence`), plan delta, recurring critiques, and preflight results as judgment context.
- PROCEED when execution should move forward now.
- ITERATE when revising the plan is the best next move.
- ESCALATE when the loop is stuck, churn is recurring, or user intervention is needed.
- TIEBREAKER when a flag group reflects an *unresolvable constraint tension* (architectural or philosophical — requires a human call) rather than a plan-quality issue. Use TIEBREAKER only when the Iteration Pressure Analysis shows `addressed_then_reopened_count >= 2` for a fuzzy group OR the group has >=2 member flags across >=2 iterations. If the concern is simply that the plan writer hasn't tried hard enough, use ITERATE instead. When recommending TIEBREAKER you MUST provide `tiebreaker_question` (the decision question for human resolution), `tiebreaker_flag_ids` (which flags this resolves), and `tiebreaker_fuzzy_group_id` (which group this resolves). Cite specific flag IDs and iterations in your rationale.
- `signals_assessment`: one paragraph summarizing score trajectory, flag status, and preflight posture.
Flags come in two tiers:
- **Blocking** (severity = significant/likely-significant): These are serious concerns. If you recommend PROCEED, you MUST provide a `flag_resolutions` entry for every blocking flag. There is no implicit acceptance.
- **Noted** (everything else): Acknowledge in your rationale but they don't block PROCEED.
If there are blocking flags and you want to PROCEED, provide `flag_resolutions` with one entry per blocking flag. If you cannot resolve every blocking flag, choose ITERATE (send back for revision) or ESCALATE (human intervention needed).
Structurally unresolvable flags (for example, infrastructure outside the repo or product decisions that require a human) are ESCALATE, not PROCEED with a non-answer.
For each blocking flag:
- **dispute**: The critique is factually wrong. Evidence must cite something specific (file path, line, API doc, etc.). Generic statements like "handled correctly" are invalid.
- **accept_tradeoff**: The concern is real but intentionally accepted as a known limitation. Rationale must be specific to this flag. Boilerplate like "acceptable within scope" is invalid.
- Schema requirement: every `flag_resolutions` entry must include both `evidence` and `rationale`. Use `""` for the field that does not apply to that action.
If there are no blocking flags, return `flag_resolutions: []`.
Always return `accepted_tradeoffs`; use `[]` when none apply.
Populate `settled_decisions` with design choices that should carry into review without re-litigation. Return `[]` when there are none.
Example:
```json
{
"recommendation": "PROCEED",
"rationale": "Core fix is correct. Convention concern accepted.",
"signals_assessment": "Score stable at 2.5, preflight passed, no recurring critiques.",
"warnings": ["Verify edge case with composite moduli during execution."],
"flag_resolutions": [
{"flag_id": "correctness-1", "action": "dispute", "evidence": "allow_migrate and allow_migrate_model produce identical behavior for this use case (verified at django/db/utils.py:286).", "rationale": ""},
{"flag_id": "performance-1", "action": "accept_tradeoff", "evidence": "", "rationale": "Cold-start latency remains 40ms above target because the cache warmup job is owned by platform and outside this repo; rollout is still approved for the limited internal beta."},
{"flag_id": "conventions-1", "action": "accept_tradeoff", "evidence": "", "rationale": "Minor naming inconsistency is confined to this helper and would create churn across generated fixtures; track it as follow-up cleanup instead of blocking this fix."}
],
"accepted_tradeoffs": [],
"settled_decisions": []
}
```