Skip to content

feat(op-png): add clotho_adapter — OM scene_plan → Clotho flow.yaml#22

Open
jonata97 wants to merge 3 commits intocalesthio:mainfrom
jonata97:main
Open

feat(op-png): add clotho_adapter — OM scene_plan → Clotho flow.yaml#22
jonata97 wants to merge 3 commits intocalesthio:mainfrom
jonata97:main

Conversation

@jonata97
Copy link
Copy Markdown

Summary

  • Adds lib/clotho_adapter.py: converts OpenMontage scene_plan JSON/YAML to Clotho flow.yaml DAG
  • Adds build_motion_prompt to lib/shot_prompt_builder.py (spec-preferred approach over duplicating _MOVEMENT_PHRASES)
  • Adds 25 unit tests in tests/lib/test_clotho_adapter.py covering all 12 spec-required cases + 13 edge cases

Validation

  • New tests: 25 passed, 0 failed
  • Regression suite: 285 passed, 6 skipped, 0 failed
  • Clotho lint: clean
  • Code review: APPROVED (see pipeline/reviews/op-png-review.md)

Bead

op-png — merged and validated by openmontage/integrator

🤖 Generated with Claude Code

jonata97 and others added 3 commits April 12, 2026 17:12
- lib/clotho_adapter.py: pure-Python adapter converting OM scene_plan
  dicts into Clotho-valid flow.yaml. No Clotho package import.
  Handles generated/broll (still→i2v), local passthrough (video.trim),
  skip types (text_card, animation, diagram, transition).
  Applies model selection rules (kling-3.0-pro for wide+multichar,
  kling-2.5-turbo-pro for human/refs, None for non-human scenes).
  Uses image_size for Flux (B1 gotcha), string duration enum (B4),
  omits references/model keys when empty (v1.2 contract).

- lib/shot_prompt_builder.py: add build_motion_prompt() alongside
  build_shot_prompt() — builds the movement/action prompt for
  video.image_to_video nodes.

- tests/lib/test_clotho_adapter.py: 25 unit tests, all passing.
  Covers model selection, references, duration clamping, aspect ratio,
  skip types, cost estimation, output write, and error paths.

Fixes: video.trim params use 'from'/'to' (not 'start'/'end') per
Clotho registry KindSpec, as identified during analysis.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jonata97 jonata97 requested a review from calesthio as a code owner April 12, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant