Add generic TransformStep with pluggable operation system #536
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements a flexible, generic data transformation primitive for the workflow system with a pluggable operation registry. This addresses the need for map-reduce workflows (multi-model consensus validation) while providing a extensible foundation for various data transformation use cases.
Features
Pluggable Operation System
Built-in Operations (8 total)
Comparison Operations:
compare_results- Compare multiple AI model outputs with similarity scoringverify_consensus- Validate if comparison meets threshold criteriaAggregation Operations:
aggregate- 7 functions: sum, avg, count, min, max, group_by, concatFiltering Operations:
filter- 8 conditions: equals, not_equals, contains, not_contains, greater_than, less_than, regex, customMapping Operations:
map- 4 functions: extract, project, compute, transformArchitecture
Testing
test_transform_operations.py- 30 operation-level teststest_transform_step.py- 18 integration testsFiles Changed
New Files:
plugins/automation/workflows/steps/transform_step.py(137 lines)plugins/automation/workflows/steps/operations/(6 files, ~720 lines)plugins/automation/tests/test_transform_operations.py(401 lines)plugins/automation/tests/test_transform_step.py(367 lines)plugins/automation/workflows/examples/model_comparison_mapreduce.yamlModified Files:
plugins/automation/workflows/README.md(consolidated, 58% reduction)plugins/automation/workflows/engine.py(TransformStep registration)plugins/automation/workflows/steps/__init__.py(exports)Stats: 13 files changed, 2103 insertions(+), 766 deletions(-)
Example Usage
Map-Reduce (Multi-Model Validation)
Data Pipeline
Breaking Changes
None - this is a new feature addition.
Checklist
🤖 Generated with Claude Code