You are not alone in the codebase; do not revert edits made by others, and adjust your…
- User
You are not alone in the codebase; do not revert edits made by others, and adjust your work to coexist with parallel changes. Work in /Users/user_c042661f/Documents/reigh-workspace/vibecomfy.
Task T6: land the template refactor. Scope: ready template generation and ready_templates organization only. Inspect existing ready_templates, scripts/materialize_ready_templates.py, vibecomfy/registry/ready.py, tests/test_ready_templates.py, and related docs. Implement the focused refactor needed to make ready templates reusable/consistent without taking on recipe docs/polish. Add or update focused tests. Avoid editing CLI router/runtime files unless strictly necessary; if needed, note it instead of broad changes.
Please edit files directly in your forked workspace and final-answer with: changed files, behavior added/changed, tests run, and any integration notes.
- Assistant
I’ll inspect the ready template flow and tests first, then keep edits confined to the template generation/organization path unless the code forces otherwise.
- Assistant
The worktree already has an unrelated parent
.gitignoremodification, so I’ll leave that alone. I found generated__pycache__underready_templates; I’ll avoid touching them unless tests reveal they matter. - Assistant
The current templates all duplicate the same policy/build wrapper and store bare template ids in metadata, while the registry exposes category-qualified ids. I’m going to centralize that wrapper in
ready_templatesand make the generator emit the same reusable shape, then update tests around id stability and generated source shape. - Assistant
I’ve got the shape now: add a small packaged helper so generated ready templates only own data plus metadata, make materialization produce category-qualified ids and explicit requirements, and make registry discovery skip private support files. Then I’ll regenerate the ready templates and run the focused tests.
- Assistant
I added the helper and generator changes. One registry detail is worth fixing before regeneration: loading by a legacy bare id should still produce the canonical category-qualified metadata, so I’m tightening that now.
- Assistant
Next I’m regenerating the ready templates from the updated materializer so the checked-in templates match the new reusable wrapper format instead of keeping the old duplicated policy function.
- Assistant
The materializer currently only works when the package is already installed or
PYTHONPATHis set, because direct script execution putsscripts/onsys.path. I’m making it self-contained for repo-local execution, then I’ll rerun it. - Assistant
The default
python/python3here is 3.8, but the project requires 3.11 and pyenv has3.11.11available. I’ll run generation and tests withPYENV_VERSION=3.11.11so we’re exercising the supported interpreter. - Assistant
The first regenerated pass exposed a real bug in my generator change: policy selection was comparing against the new category-qualified id, so LTX/GGUF runtime adaptations were skipped. I’m switching policy dispatch back to the manifest id while keeping emitted metadata canonical.
- Assistant
The LTX/GGUF adaptations are back in the generated files now. I’m going to preserve the old seed values by deriving them from the manifest id, not the category-qualified id, so this refactor doesn’t unexpectedly change generated output seeds.
- Assistant
The generated templates are now in the new format with the old seed policy preserved. I’m running the focused ready-template tests next, then I’ll run the broader suite if the local environment has the dev dependencies.
- Assistant
The focused ready-template tests pass. I’m doing one full pytest pass now to catch any import or registry side effects from moving the helper into the packaged code.
- Assistant
Full tests pass. I’m adding a small ready-template README note so the on-disk organization matches the refactor: templates are data plus a shared packaged build policy, and regeneration stays focused on those files.
- Assistant
I’m adding one compact regression test that loads every discovered ready template. The individual tests cover the specific refactor behavior; this one catches malformed regenerated files across categories.
- Assistant
The expanded ready-template test passes. I’m rerunning the full suite once more after that test update.
- Assistant
Implemented T6 focused on ready template generation/organization.
Changed Files
- vibecomfy/registry/ready_template.py added shared ready-template build/policy helper.
- scripts/materialize_ready_templates.py now emits category-qualified metadata, explicit requirements, and templates using the shared helper.