feat: Add AI-powered exploration workflow with map-reduce pattern #539
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
This PR implements an intelligent AI-powered exploration workflow system with map-reduce pattern, enabling automated codebase exploration through task decomposition, parallel AI investigation, and result aggregation.
Key Features
🤖 AI-Powered Task Decomposition
min_tasksandmax_tasksparameters🔍 Parallel AI Exploration
question,implementation,structure,usage,flow📊 Result Aggregation
detailed: Complete findings with all metadataconcise: Truncated results for quick overviewstructured: Grouped by exploration type🔧 Deterministic Alternative
by_items,by_count,by_chunk_size,customImplementation Details
New Operations
plugins/automation/workflows/steps/operations/ai_split.py- AI task decompositionplugins/automation/workflows/steps/operations/exploration.py- AI exploration with ExploreAgentplugins/automation/workflows/steps/operations/summarize.py- Result aggregationplugins/automation/workflows/steps/operations/split.py- Deterministic splittingTest Coverage
test_mapreduce_operations.py(20 tests): Split, exploration, summarize operationstest_ai_split_operation.py(15 tests): AI split validation, execution, error handlingWorkflow Examples
ai_exploration_workflow.yaml: AI-driven exploration (AI decides how to split)exploration_mapreduce.yaml: Manual task specificationUsage Example
Documentation
plugins/automation/workflows/README.mdwith:Testing
All tests pass with mocked AI calls:
Architecture
The system follows the existing workflow operation pattern:
OperationRegistryBreaking Changes
None - this is purely additive functionality.
Future Enhancements
🤖 Generated with Claude Code