-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
YAML workflows currently execute all defined steps unconditionally. Real workflows need branching logic based on step results or inputs.
Concrete example from foreman: The implementing stage should skip test running if no test files exist, or branch to different strategies based on codebase type.
Proposal
Add conditional execution support:
steps:
- id: check_tests
shell.run: "test -d tests && echo 'has_tests' || echo 'no_tests'"
- id: run_tests
if: "{{.steps.check_tests.stdout}} == 'has_tests'"
shell.run: "npm test"
- id: skip_message
if: "{{.steps.check_tests.stdout}} == 'no_tests'"
type: llm
prompt: "No tests to run, proceeding with implementation"General Utility
- Conditional workflows - Branch based on analysis results
- Error handling - Skip subsequent steps if earlier step fails
- Feature detection - Adapt workflow to environment capabilities
Acceptance Criteria
-
iffield on steps for conditional execution - Template expressions evaluate to boolean
- Falsy conditions skip step (not error)
- Skipped step outputs are empty/null
- Support comparison operators (==, !=, contains)
- Integration test for conditional branching
Priority
Medium - Improves workflow flexibility, not blocking for MVP.
Labels
enhancement, sdk, priority:medium
Metadata
Metadata
Assignees
Labels
No labels