+{"id":"i-2hqk","uuid":"5fc0520f-4b49-44f1-9493-07807ef37fc8","title":"Add ConditionalBlock with BranchCondition and BranchCriteria scaffolding","content":"Implement the DAG branching models outlined in [[s-4bnl]] by introducing dedicated ConditionalBlock structures and branch metadata in the workflow SDK.\n\n## Scope\n- Extend `skyvern/forge/sdk/workflow/models` to add a `ConditionalBlock` model (building on the base Block hierarchy) that owns `branches: list[BranchCondition]`.\n- Create a first-class `BranchCondition` model with fields `id`, `criteria`, `next_block_label`, `description`, `order`, and `is_default`, ensuring serialization/deserialization coverage across DTOs.\n- Introduce a `BranchCriteria` abstraction that defines the interface for evaluating branch logic; for now only establish the interface contract plus stubs/hooks so we can later plug in Jinja templates, JSONLogic, pythonic expressions, or other engines.\n- Update relevant schemas, SDKs, and validators so conditional blocks and branches round-trip through storage and APIs while remaining backward compatible with existing sequential workflows.\n- Add tests validating branch ordering, default branch uniqueness, and serialization of conditional blocks.\n\n## Out of Scope\n- Choosing or implementing a specific BranchCriteria evaluation engine (Jinja/JSONLogic/python). Capture pros/cons analysis in a follow-up issue before implementation.\n","status":"open","priority":2,"assignee":null,"archived":0,"archived_at":null,"created_at":"2025-11-14 06:31:33","updated_at":"2025-11-14 06:31:33","closed_at":null,"parent_id":null,"parent_uuid":null,"relationships":[],"tags":["sdk","spec","workflow"]}
0 commit comments