From 9df9fff835b6cfe1125883d1f0f593ac2f230779 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sun, 13 Jul 2025 03:36:16 +0000 Subject: [PATCH] feat: implement parallelizability-analyzer mode - Add new parallelizability-analyzer mode to .roomodes with comprehensive role definition - Create XML instruction system with 4 detailed files: - 1_workflow.xml: 7-step analysis workflow from initialization to integration - 2_analysis_algorithms.xml: Dependency detection, file overlap analysis, and scoring algorithms - 3_cli_and_integration.xml: CLI interface and API integration specifications - 4_usage_examples.xml: Common scenarios, guides, and best practices - Include comprehensive README with usage examples and configuration reference - Support multiple input formats: GitHub URLs, issue numbers, search queries - Implement sophisticated conflict detection with configurable risk assessment - Provide both human-readable markdown and structured JSON output formats - Enable integration with task management systems and parallel worker coordination Resolves #5648 --- .../1_workflow.xml | 278 ++++++++++ .../2_analysis_algorithms.xml | 331 +++++++++++ .../3_cli_and_integration.xml | 451 +++++++++++++++ .../4_usage_examples.xml | 513 ++++++++++++++++++ .../README.md | 351 ++++++++++++ .roomodes | 27 + 6 files changed, 1951 insertions(+) create mode 100644 .roo/rules-parallelizability-analyzer/1_workflow.xml create mode 100644 .roo/rules-parallelizability-analyzer/2_analysis_algorithms.xml create mode 100644 .roo/rules-parallelizability-analyzer/3_cli_and_integration.xml create mode 100644 .roo/rules-parallelizability-analyzer/4_usage_examples.xml create mode 100644 .roo/rules-parallelizability-analyzer/README.md diff --git a/.roo/rules-parallelizability-analyzer/1_workflow.xml b/.roo/rules-parallelizability-analyzer/1_workflow.xml new file mode 100644 index 00000000000..33420670f14 --- /dev/null +++ b/.roo/rules-parallelizability-analyzer/1_workflow.xml @@ -0,0 +1,278 @@ + + + Initialize Analysis Context + + The user will provide a group of GitHub issues for parallelizability analysis. Issues can be provided as: + - Individual URLs (e.g., "https://github.com/owner/repo/issues/123") + - Issue numbers with repository context (e.g., "#123, #124, #125" for current repo) + - Search queries (e.g., "label:bug milestone:v1.0") + - Mixed formats + + 1. **Create Analysis Directory**: Create a unique directory for this analysis session. + + mkdir -p .roo/temp/parallelizability-analyzer/$(date +%Y%m%d_%H%M%S) + + + 2. **Parse Input**: Identify and normalize all issue references. + - Extract owner/repo/number from URLs + - Resolve issue numbers to full references + - Execute search queries to get issue lists + - Handle authentication errors gracefully + + 3. **Retrieve Issue Data**: For each identified issue, fetch comprehensive data. + + gh issue view [issue_number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author,comments + + + 4. **Save Context**: Store all issue data and analysis metadata. + - Save individual issue data as JSON files + - Create analysis manifest with issue list and metadata + - Record analysis parameters and configuration + + 5. **Validate Input**: Ensure all issues are accessible and contain sufficient data for analysis. + + + + + Analyze Issue Dependencies + + Perform comprehensive dependency analysis to identify relationships between issues. + + 1. **Extract Dependencies**: Analyze issue content for explicit dependencies. + - Parse issue bodies and comments for references to other issues + - Identify "depends on", "blocks", "related to" relationships + - Extract linked PRs and their relationships + - Map milestone and epic dependencies + + 2. **Analyze Labels and Metadata**: Examine labels for conflict indicators. + - Identify breaking change labels + - Check for architectural impact labels + - Analyze priority and urgency indicators + - Map feature area and component labels + + 3. **Detect Implicit Dependencies**: Use heuristics to find hidden relationships. + - Analyze issue titles for related functionality + - Check for similar error messages or symptoms + - Identify issues affecting the same user workflows + - Map issues to common architectural components + + 4. **Create Dependency Graph**: Build a comprehensive dependency map. + - Create nodes for each issue with metadata + - Add edges for all identified relationships + - Weight edges by dependency strength and type + - Identify dependency cycles and critical paths + + 5. **Save Dependency Analysis**: Store results for next analysis phase. + + + + + Perform File Overlap Analysis + + Analyze potential file conflicts by examining what files each issue might affect. + + 1. **Extract File References**: Identify files mentioned in issues. + - Parse issue bodies for file paths and names + - Extract file references from linked PRs + - Analyze error messages for affected files + - Map feature descriptions to likely file locations + + 2. **Predict Affected Files**: Use codebase analysis to predict file impacts. + - Search codebase for functionality mentioned in issues + - Map bug reports to likely source file locations + - Identify test files that would need updates + - Predict configuration and documentation changes + + 3. **Analyze File Overlap Patterns**: Identify potential conflicts. + - Direct overlaps: Same files mentioned in multiple issues + - Indirect overlaps: Related files in same modules/components + - Test file conflicts: Shared test utilities and fixtures + - Configuration conflicts: Shared config files and schemas + + 4. **Assess Conflict Severity**: Rate the likelihood and impact of conflicts. + - High risk: Direct file overlaps with complex changes + - Medium risk: Related files in same component + - Low risk: Independent files with minimal interaction + - No risk: Completely separate file sets + + 5. **Generate File Conflict Matrix**: Create a comprehensive conflict map. + - Matrix showing file overlap between all issue pairs + - Conflict severity ratings and explanations + - Recommendations for conflict resolution strategies + + + + + Apply Parallelizability Heuristics + + Apply sophisticated heuristics and rules to determine parallelizability. + + 1. **Load Analysis Rules**: Apply configurable analysis rules. + - Load default heuristics for common conflict patterns + - Apply repository-specific rules if configured + - Consider project-specific architectural constraints + - Factor in team workflow and review processes + + 2. **Analyze Issue Characteristics**: Evaluate individual issue properties. + - Issue complexity and estimated effort + - Required expertise and team member assignments + - Breaking change potential and backward compatibility + - Testing requirements and validation complexity + + 3. **Evaluate Team Constraints**: Consider human resource factors. + - Assignee conflicts and expertise overlap + - Review capacity and approval workflows + - Communication overhead for related changes + - Merge conflict resolution capabilities + + 4. **Apply Temporal Constraints**: Consider timing and sequencing factors. + - Milestone deadlines and release schedules + - Dependency ordering requirements + - Testing and validation timelines + - Integration and deployment constraints + + 5. **Calculate Parallelizability Scores**: Generate quantitative assessments. + - Individual issue parallelizability ratings + - Pairwise conflict probability scores + - Group parallelizability confidence levels + - Risk-adjusted parallel work recommendations + + + + + Generate Analysis Report + + Create comprehensive reports on parallelizability analysis results. + + 1. **Prepare Report Structure**: Organize findings into clear sections. + - Executive summary with key recommendations + - Detailed analysis methodology and assumptions + - Individual issue assessments and characteristics + - Pairwise conflict analysis and risk ratings + - Group parallelizability recommendations + + 2. **Create Visualizations**: Generate helpful visual representations. + - Dependency graph diagrams + - File overlap heat maps + - Parallelizability matrices + - Risk assessment charts + - Timeline and scheduling recommendations + + 3. **Provide Actionable Recommendations**: Offer specific guidance. + - Optimal parallel work groupings + - Sequential work ordering for conflicting issues + - Risk mitigation strategies for parallel work + - Monitoring and coordination recommendations + - Fallback plans for conflict resolution + + 4. **Format for Different Audiences**: Create multiple report formats. + - Technical report with detailed analysis + - Management summary with key decisions + - Developer guide with practical recommendations + - API response format for automated systems + + 5. **Save Analysis Results**: Store all outputs for future reference. + - Save reports in multiple formats (JSON, Markdown, HTML) + - Store raw analysis data for audit trails + - Create shareable links and summaries + - Archive results with timestamp and configuration + + + + + Present Results and Recommendations + + Present the analysis results to the user with clear recommendations. + + 1. **Read Analysis Results**: Load the generated reports and data. + + + + .roo/temp/parallelizability-analyzer/[SESSION_ID]/analysis_report.md + + + + + 2. **Present Executive Summary**: Show key findings and recommendations. + + + Parallelizability analysis complete! Here are the key findings: + + **Issues Analyzed:** [Number] issues across [repositories] + **Overall Parallelizability:** [High/Medium/Low] confidence + + **Recommended Parallel Groups:** + [List of issue groups that can be worked on in parallel] + + **Sequential Dependencies:** + [List of issues that must be done in sequence] + + **High-Risk Conflicts:** + [List of issue pairs with significant conflict potential] + + **Detailed Analysis:** + [Summary of methodology and key findings] + + Would you like to see the detailed analysis, export results, or take action on these recommendations? + + + Show me the detailed technical analysis + Export results for task management integration + Create work assignments based on recommendations + Analyze a different set of issues + + + + 3. **Handle User Requests**: Respond to user choices for additional information or actions. + - Provide detailed technical reports + - Export data in various formats + - Integrate with task management systems + - Prepare work assignment recommendations + + 4. **Offer Integration Options**: Provide ways to act on the analysis. + - Generate GitHub project board configurations + - Create team assignment recommendations + - Export to external project management tools + - Set up monitoring for parallel work coordination + + + + + Integration and Export + + Provide integration capabilities for acting on analysis results. + + 1. **Export Formats**: Support multiple output formats for different tools. + - JSON for API integration + - CSV for spreadsheet analysis + - Markdown for documentation + - YAML for configuration management + - XML for enterprise systems + + 2. **Task Management Integration**: Connect with popular project management tools. + - GitHub Projects integration + - Jira ticket organization + - Trello board setup + - Asana task grouping + - Custom API endpoints + + 3. **Team Coordination**: Provide tools for team communication and coordination. + - Generate team assignment recommendations + - Create communication templates + - Set up conflict monitoring alerts + - Provide progress tracking mechanisms + + 4. **Monitoring and Updates**: Enable ongoing parallelizability monitoring. + - Set up automated re-analysis triggers + - Monitor for new dependencies or conflicts + - Track parallel work progress and outcomes + - Learn from results to improve future analysis + + 5. **Documentation and Sharing**: Make results accessible and shareable. + - Generate shareable report URLs + - Create presentation-ready summaries + - Provide audit trails and methodology documentation + - Enable collaborative review and feedback + + + \ No newline at end of file diff --git a/.roo/rules-parallelizability-analyzer/2_analysis_algorithms.xml b/.roo/rules-parallelizability-analyzer/2_analysis_algorithms.xml new file mode 100644 index 00000000000..e16f9160b94 --- /dev/null +++ b/.roo/rules-parallelizability-analyzer/2_analysis_algorithms.xml @@ -0,0 +1,331 @@ + + + + + (?:depends on|blocks|blocked by|related to|fixes|closes|resolves)\s*#?(\d+) + high + Direct issue references indicating dependencies + + + + (?:PR|pull request)\s*#?(\d+) + medium + Pull request references that may indicate related work + + + + same_milestone_with_priority_order + medium + Issues in same milestone with priority-based ordering + + + + parent_child_epic_structure + high + Epic and sub-issue relationships + + + + + + Issues affecting the same feature area or component + + 1. Extract feature keywords from issue titles and descriptions + 2. Calculate semantic similarity using keyword overlap + 3. Apply component mapping based on file paths and labels + 4. Score dependency likelihood based on overlap percentage + + + - High overlap (>70%): weight = 0.8 + - Medium overlap (30-70%): weight = 0.5 + - Low overlap (10-30%): weight = 0.2 + - Minimal overlap (<10%): weight = 0.1 + + + + + Issues with potential architectural or breaking changes + + - Labels: breaking-change, architecture, api-change + - Keywords: refactor, restructure, breaking, API, interface + - File patterns: core/, api/, types/, schemas/ + + + - Two breaking changes: high conflict risk + - Breaking + feature: medium conflict risk + - Breaking + bugfix: low conflict risk + + + + + Issues affecting the same user workflows or experiences + + - Authentication: login, signup, password, auth + - File operations: save, load, export, import + - UI/UX: interface, design, layout, theme + - Performance: speed, optimization, caching + - Integration: API, webhook, external + + + + + + + + + + (?:src/|lib/|app/|components/)[a-zA-Z0-9/_.-]+\.[a-zA-Z]+ + high + + + + at\s+([a-zA-Z0-9/_.-]+\.[a-zA-Z]+):(\d+) + high + + + + (?:import|from|require)\s+.*?['"]([^'"]+)['"] + medium + + + + + + + + + - src/auth/ + - src/components/login/ + - src/utils/auth.ts + - src/types/user.ts + + + + + + - src/file/ + - src/io/ + - src/utils/file.ts + - src/components/file-browser/ + + + + + + - src/components/ + - src/styles/ + - webview-ui/src/ + - src/themes/ + + + + + + + 1. Extract error messages and symptoms from bug reports + 2. Search codebase for matching error strings + 3. Identify files containing error handling for reported issues + 4. Map UI bugs to component files based on description + 5. Connect performance issues to relevant optimization areas + + + + + + + + Multiple issues affecting the exact same files + Exact file path matches between issues + Sequential work or careful coordination required + + + + Issues affecting files in the same module or component + Files in same directory or related import chains + Communication and merge coordination needed + + + + Shared test files or testing utilities + Test files, mocks, or fixtures used by multiple features + Test coordination and shared fixture management + + + + Shared configuration files or schemas + Config files, package.json, tsconfig.json, etc. + Careful merge planning and validation required + + + + + + + + + + - No dependencies: score = 1.0 + - Weak dependencies: score = 0.7 + - Medium dependencies: score = 0.4 + - Strong dependencies: score = 0.1 + + + + + + - No file overlap: score = 1.0 + - Different modules: score = 0.8 + - Same module: score = 0.5 + - Same files: score = 0.1 + + + + + + - Simple + Simple: score = 1.0 + - Simple + Complex: score = 0.7 + - Complex + Complex: score = 0.3 + + + + + + - Different assignees: score = 1.0 + - Same assignee: score = 0.2 + - Overlapping expertise needed: score = 0.5 + + + + + + + Standard weighted average of all factors + sum(factor_score * factor_weight) / sum(factor_weights) + + + + Conservative approach using lowest factor score + min(factor_scores) * confidence_multiplier + + + + Adjust score based on project risk tolerance + base_score * risk_tolerance_factor * project_complexity_factor + + + + + + + How much information is available about each issue + + - Issue description completeness + - Number of comments and clarifications + - Linked PRs and related issues + - File references and technical details + + + + + How thoroughly the analysis algorithms could process the issues + + - Successful pattern matching rate + - Codebase search result quality + - Dependency detection success + - File mapping accuracy + + + + + Track record of similar analyses in this repository + + - Previous analysis accuracy + - Conflict prediction success rate + - False positive/negative rates + - User feedback and corrections + + + + + + + + + + Maximize the number of issues that can be worked on in parallel + + 1. Sort issues by parallelizability score (highest first) + 2. Greedily assign issues to parallel groups + 3. Check each new issue against existing group members + 4. Add to group if no conflicts, otherwise create new group + + + + + Minimize the risk of conflicts and coordination overhead + + 1. Identify high-risk issue pairs + 2. Create sequential chains for dependent issues + 3. Group remaining issues by feature area + 4. Optimize group sizes for team capacity + + + + + Balance parallel work across team members and expertise areas + + 1. Analyze issue complexity and required skills + 2. Map issues to available team members + 3. Create balanced groups considering workload and expertise + 4. Optimize for both parallelism and team efficiency + + + + + + + + - Analysis methodology and parameters + - Individual issue assessments + - Dependency graph and conflict matrix + - Detailed scoring explanations + - Risk factors and mitigation strategies + + + + + + - Executive summary and key recommendations + - Resource allocation suggestions + - Timeline and milestone impact + - Risk assessment and contingency plans + + + + + + - Practical work group assignments + - Coordination and communication guidelines + - Merge conflict prevention strategies + - Testing and integration recommendations + + + + + + { + "analysis_id": "unique_identifier", + "timestamp": "ISO_8601_datetime", + "issues_analyzed": ["issue_references"], + "parallelizability_score": "0.0_to_1.0", + "confidence_level": "0.0_to_1.0", + "parallel_groups": [["issue_group_1"], ["issue_group_2"]], + "sequential_dependencies": [{"from": "issue", "to": "issue", "reason": "dependency_type"}], + "risk_factors": [{"type": "risk_type", "severity": "high|medium|low", "description": "details"}], + "recommendations": ["actionable_recommendations"] + } + + + + + \ No newline at end of file diff --git a/.roo/rules-parallelizability-analyzer/3_cli_and_integration.xml b/.roo/rules-parallelizability-analyzer/3_cli_and_integration.xml new file mode 100644 index 00000000000..cbb7c8dad2e --- /dev/null +++ b/.roo/rules-parallelizability-analyzer/3_cli_and_integration.xml @@ -0,0 +1,451 @@ + + + + + roo parallelizability-analyzer --repo owner/repo --issues "123,124,125" + Analyze specific issues within a single repository + roo parallelizability-analyzer --repo RooCodeInc/Roo-Code --issues "5648,5649,5650" + + + + roo parallelizability-analyzer --urls "url1,url2,url3" + Analyze issues from multiple repositories using full URLs + roo parallelizability-analyzer --urls "https://github.com/owner/repo1/issues/123,https://github.com/owner/repo2/issues/456" + + + + roo parallelizability-analyzer --repo owner/repo --query "label:bug milestone:v1.0" + Analyze issues matching a search query + roo parallelizability-analyzer --repo RooCodeInc/Roo-Code --query "label:enhancement milestone:next-release" + + + + roo parallelizability-analyzer --input-file analysis_config.json + Use a configuration file with mixed input types + + { + "repositories": ["owner/repo1", "owner/repo2"], + "issues": [123, 124, 125], + "urls": ["https://github.com/owner/repo/issues/456"], + "queries": [ + {"repo": "owner/repo", "query": "label:bug"}, + {"repo": "owner/repo", "query": "milestone:v2.0"} + ] + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + "analysis_id": "pa_20240113_142530", + "timestamp": "2024-01-13T14:25:30Z", + "configuration": { + "risk_tolerance": "balanced", + "confidence_threshold": 0.7, + "max_group_size": 5 + }, + "issues_analyzed": [ + {"repo": "RooCodeInc/Roo-Code", "number": 5648, "title": "Create parallelizability-analyzer mode"}, + {"repo": "RooCodeInc/Roo-Code", "number": 5649, "title": "Improve error handling"} + ], + "overall_assessment": { + "parallelizability_score": 0.85, + "confidence_level": 0.92, + "total_issues": 2, + "parallel_groups": 1, + "sequential_dependencies": 0 + }, + "parallel_groups": [ + { + "group_id": 1, + "issues": [5648, 5649], + "parallelizability_score": 0.85, + "estimated_conflict_risk": "low", + "coordination_requirements": ["regular sync meetings", "shared documentation"] + } + ], + "sequential_dependencies": [], + "risk_factors": [ + { + "type": "file_overlap", + "severity": "low", + "description": "Minor overlap in configuration files", + "affected_issues": [5648, 5649], + "mitigation": "Coordinate changes to .roomodes file" + } + ], + "recommendations": [ + "Issues 5648 and 5649 can be worked on in parallel with minimal coordination", + "Establish shared documentation for configuration changes", + "Plan integration testing after both issues are complete" + ] + } + + + + # Parallelizability Analysis Report + + **Analysis ID:** pa_20240113_142530 + **Generated:** 2024-01-13 14:25:30 UTC + **Configuration:** Balanced risk tolerance, 70% confidence threshold + + ## Executive Summary + + ✅ **High Parallelizability** (Score: 0.85, Confidence: 92%) + + - **2 issues analyzed** across 1 repository + - **1 parallel group** identified + - **0 sequential dependencies** found + - **Low conflict risk** overall + + ## Recommended Parallel Groups + + ### Group 1: Core Feature Development + - **Issues:** #5648, #5649 + - **Parallelizability Score:** 0.85 + - **Conflict Risk:** Low + - **Coordination Needs:** Regular sync, shared docs + + ## Risk Assessment + + ### Low Risk Factors + - **File Overlap:** Minor overlap in configuration files + - **Affected Issues:** #5648, #5649 + - **Mitigation:** Coordinate changes to .roomodes file + + ## Recommendations + + 1. Issues #5648 and #5649 can be worked on in parallel with minimal coordination + 2. Establish shared documentation for configuration changes + 3. Plan integration testing after both issues are complete + + ## Detailed Analysis + + [Additional technical details would follow...] + + + + + + + + Perform parallelizability analysis on a set of issues + + { + "issues": [ + {"repo": "owner/name", "number": 123}, + {"url": "https://github.com/owner/repo/issues/456"} + ], + "queries": [ + {"repo": "owner/name", "query": "label:bug milestone:v1.0"} + ], + "configuration": { + "risk_tolerance": "balanced", + "confidence_threshold": 0.7, + "max_group_size": 5, + "include_dependencies": true, + "include_file_analysis": true + } + } + + Same as CLI JSON output + + + + Get the status of a running analysis + + { + "analysis_id": "pa_20240113_142530", + "status": "running|completed|failed", + "progress": 0.75, + "estimated_completion": "2024-01-13T14:30:00Z", + "current_step": "file_overlap_analysis" + } + + + + + Retrieve completed analysis results + + json|markdown|html|csv + boolean + + + + + + + + Triggered when parallelizability analysis completes + + { + "event": "analysis_completed", + "analysis_id": "pa_20240113_142530", + "timestamp": "2024-01-13T14:30:00Z", + "summary": { + "parallelizability_score": 0.85, + "parallel_groups": 1, + "high_risk_conflicts": 0 + }, + "results_url": "/api/v1/parallelizability/results/pa_20240113_142530" + } + + + + + Triggered when analysis fails + + { + "event": "analysis_failed", + "analysis_id": "pa_20240113_142530", + "timestamp": "2024-01-13T14:30:00Z", + "error": { + "code": "INSUFFICIENT_DATA", + "message": "Unable to access issue data for analysis", + "details": "GitHub API rate limit exceeded" + } + } + } + + + + + + + + + + + Create GitHub project boards based on parallelizability analysis + + 1. Create project board with columns for each parallel group + 2. Add issues to appropriate columns + 3. Set up automation rules for issue movement + 4. Add labels for coordination requirements + + + + + Use GitHub issue linking to track dependencies + + 1. Create "blocks" and "depends on" relationships + 2. Add dependency labels to issues + 3. Set up automated checks for dependency resolution + 4. Generate dependency visualization in project board + + + + + + + + + { + "project_key": "PROJ", + "epic_structure": [ + { + "epic_name": "Parallel Group 1", + "issues": [ + {"key": "PROJ-123", "summary": "Issue title", "priority": "High"}, + {"key": "PROJ-124", "summary": "Issue title", "priority": "Medium"} + ] + } + ], + "dependencies": [ + {"from": "PROJ-123", "to": "PROJ-124", "type": "blocks"} + ] + } + + + + + + { + "board_name": "Parallel Work Planning", + "lists": [ + { + "name": "Parallel Group 1", + "cards": [ + {"name": "Issue #123: Title", "description": "Details", "labels": ["high-priority"]}, + {"name": "Issue #124: Title", "description": "Details", "labels": ["medium-priority"]} + ] + } + ] + } + + + + + + { + "project_name": "Parallel Development", + "sections": [ + { + "name": "Parallel Group 1", + "tasks": [ + {"name": "Issue #123", "notes": "Description", "assignee": "user@example.com"}, + {"name": "Issue #124", "notes": "Description", "assignee": "user2@example.com"} + ] + } + ], + "dependencies": [ + {"task": "Issue #123", "depends_on": ["Issue #122"]} + ] + } + + + + + + + + + + Track actual conflicts vs predicted conflicts + actual_conflicts / predicted_conflicts + + + + Measure communication and coordination costs + + - Number of sync meetings required + - Merge conflict resolution time + - Code review coordination complexity + + + + + Compare parallel vs sequential completion times + (sequential_estimate - parallel_actual) / sequential_estimate + + + + + + + + User reports on prediction accuracy + Post-completion survey or API feedback + + - Were conflicts predicted accurately? + - Were parallel groups optimal? + - What unexpected issues arose? + + + + + Feedback on analysis process and recommendations + Continuous feedback during work execution + + - Was coordination guidance helpful? + - Were risk mitigation strategies effective? + - How could recommendations be improved? + + + + + + Use feedback to improve future analyses + + 1. Store feedback with analysis parameters and outcomes + 2. Identify patterns in prediction errors + 3. Adjust algorithm weights based on historical accuracy + 4. Update heuristics based on project-specific learnings + 5. Improve confidence calculations using outcome data + + + + + \ No newline at end of file diff --git a/.roo/rules-parallelizability-analyzer/4_usage_examples.xml b/.roo/rules-parallelizability-analyzer/4_usage_examples.xml new file mode 100644 index 00000000000..111d3f79383 --- /dev/null +++ b/.roo/rules-parallelizability-analyzer/4_usage_examples.xml @@ -0,0 +1,513 @@ + + + + Analyze issues for upcoming sprint to optimize parallel work + + Team has 15 issues planned for next sprint and wants to maximize parallel development + while minimizing conflicts and coordination overhead. + + + Issues: #1001-#1015 from milestone "Sprint 24" + Query: "milestone:'Sprint 24' state:open" + + + 1. Group issues by feature area and complexity + 2. Identify dependencies between user stories + 3. Analyze file overlap for UI and backend changes + 4. Consider team member expertise and availability + 5. Generate optimal work groups for 3-4 developers + + + - 3-4 parallel groups with 3-5 issues each + - Clear dependency chains for sequential work + - Risk assessment for each group + - Coordination recommendations + + + - Reduced merge conflicts during sprint + - Improved velocity through parallel work + - Minimal coordination overhead + - On-time sprint completion + + + + + Analyze critical bugs and features for release readiness + + Product release in 2 weeks with 20 critical issues that need resolution. + Need to determine which can be worked on in parallel vs sequentially. + + + Query: "label:critical milestone:'Release 2.1' state:open" + Additional filters: priority:high, type:bug OR type:feature + + + 1. Prioritize by release impact and risk + 2. Identify breaking changes that affect multiple areas + 3. Map dependencies between bug fixes and features + 4. Analyze testing requirements and validation needs + 5. Consider rollback and hotfix scenarios + + + - Sequential order for breaking changes + - Parallel groups for independent fixes + - Risk-based prioritization + - Testing coordination plan + + + - Successful release with minimal delays + - No critical conflicts during development + - Effective testing coverage + - Smooth deployment process + + + + + Coordinate multiple refactoring and cleanup tasks + + Team allocated time for technical debt reduction with 12 refactoring issues + spanning different parts of the codebase. + + + Query: "label:technical-debt label:refactoring state:open" + Issues: Focus on core architecture improvements + + + 1. Map architectural dependencies between components + 2. Identify shared utilities and common code + 3. Analyze impact on existing features and tests + 4. Consider migration and backward compatibility + 5. Plan incremental refactoring approach + + + - Phased refactoring plan with dependencies + - Safe parallel refactoring groups + - Migration strategy recommendations + - Testing and validation requirements + + + - Successful refactoring without breaking changes + - Improved code quality metrics + - Maintained system stability + - Reduced future maintenance burden + + + + + Analyze issues spanning multiple teams and repositories + + Feature development requires coordination between frontend, backend, and DevOps teams + across 3 repositories with interdependent changes. + + + Repositories: frontend-app, backend-api, infrastructure + Issues: #45 (frontend), #123 (backend), #67 (infrastructure) + Cross-repo dependencies and shared interfaces + + + 1. Map cross-repository dependencies + 2. Identify shared APIs and interfaces + 3. Analyze deployment and integration requirements + 4. Consider team communication and handoff points + 5. Plan synchronized development and testing + + + - Cross-team coordination timeline + - Interface and API dependency mapping + - Integration testing strategy + - Communication and handoff plan + + + - Successful cross-team feature delivery + - Minimal integration issues + - Effective team communication + - Coordinated deployment process + + + + + + + Performing Basic Parallelizability Analysis + + + Gather Issue Information +
+ - Collect issue URLs, numbers, or search queries + - Ensure you have access to all relevant repositories + - Verify GitHub CLI authentication: `gh auth status` +
+ + Issues to analyze: #5648, #5649, #5650 from RooCodeInc/Roo-Code + +
+ + + Choose Analysis Scope +
+ - Decide on risk tolerance (conservative/balanced/aggressive) + - Set confidence threshold (0.7 recommended for most cases) + - Determine maximum group size based on team capacity +
+ + Configuration: balanced risk, 70% confidence, max 4 issues per group + +
+ + + Run Analysis +
+ - Use appropriate CLI command or API call + - Monitor progress for large issue sets + - Review any warnings or errors during analysis +
+ + Command: `roo parallelizability-analyzer --repo RooCodeInc/Roo-Code --issues "5648,5649,5650" --risk-tolerance balanced` + +
+ + + Review Results +
+ - Examine overall parallelizability score and confidence + - Review recommended parallel groups + - Check for high-risk conflicts and dependencies + - Validate recommendations against team knowledge +
+ + Results: 85% parallelizability, 2 groups identified, low conflict risk + +
+ + + Implement Recommendations +
+ - Assign issues to team members based on groups + - Set up coordination mechanisms for each group + - Plan integration points and testing strategy + - Monitor progress and adjust as needed +
+ + Group 1: Issues #5648, #5649 (Developer A, B) + Group 2: Issue #5650 (Developer C) + Coordination: Daily sync for Group 1 + +
+
+
+ + + Advanced Analysis Configuration + + + Create Configuration File +
+ Create a JSON configuration file with custom analysis parameters, + repository-specific rules, and team constraints. +
+ + File: parallelizability-config.json + { + "repositories": ["RooCodeInc/Roo-Code"], + "analysis_rules": { + "file_overlap_weight": 0.4, + "dependency_weight": 0.3, + "complexity_weight": 0.2, + "team_weight": 0.1 + }, + "team_constraints": { + "max_issues_per_developer": 3, + "required_expertise": { + "frontend": ["developer1", "developer2"], + "backend": ["developer2", "developer3"] + } + } + } + +
+ + + Define Custom Heuristics +
+ Specify project-specific patterns and rules for dependency detection + and conflict assessment based on your codebase characteristics. +
+ + Custom rules for detecting UI component dependencies, + API contract changes, and database migration conflicts. + +
+ + + Set Up Monitoring +
+ Configure feedback collection and monitoring to track the accuracy + of parallelizability predictions and improve future analyses. +
+ + Webhook integration to track actual conflicts vs predictions, + automated feedback collection after issue completion. + +
+
+
+ + + Integrating with Project Management Tools + + + Export Analysis Results +
+ Generate analysis results in format compatible with your + project management tool (GitHub Projects, Jira, Trello, etc.). +
+ + Export to GitHub Projects JSON format for automated board creation + +
+ + + Create Project Structure +
+ Use exported data to create project boards, assign issues to + team members, and set up tracking for parallel work groups. +
+ + Create GitHub project with columns for each parallel group, + automated issue assignment based on analysis recommendations. + +
+ + + Set Up Coordination Mechanisms +
+ Implement recommended coordination strategies such as + regular sync meetings, shared documentation, and conflict monitoring. +
+ + Daily standup for high-coordination groups, + shared Slack channel for real-time communication, + automated merge conflict alerts. + +
+
+
+
+ + + + Preparing Quality Input Data + + + Complete Issue Descriptions + Ensure issues have detailed descriptions, acceptance criteria, and technical specifications + Better input data leads to more accurate dependency detection and conflict prediction + + - Review issue templates and encourage detailed descriptions + - Add technical details and file references where possible + - Link related issues and PRs explicitly + - Include complexity estimates and effort assessments + + + + + Consistent Labeling + Use consistent labels for feature areas, complexity, and priority + Labels help the analyzer understand issue characteristics and relationships + + - Establish standard label taxonomy for your project + - Use component/area labels consistently (e.g., frontend, backend, api) + - Apply complexity labels (simple, medium, complex) + - Mark breaking changes and architectural impacts clearly + + + + + Explicit Dependencies + Clearly document dependencies between issues + Explicit dependencies are more reliable than inferred relationships + + - Use "depends on #123" or "blocks #456" in issue descriptions + - Link related issues using GitHub's linking features + - Document architectural dependencies and constraints + - Specify integration and testing dependencies + + + + + + + Interpreting Analysis Results + + + Consider Confidence Levels + Pay attention to confidence scores and adjust decisions accordingly + Low confidence predictions may require additional human review + + - Set appropriate confidence thresholds for your risk tolerance + - Review low-confidence recommendations manually + - Gather additional information for unclear cases + - Use conservative grouping for critical releases + + + + + Validate Against Team Knowledge + Cross-check analysis results with team expertise and experience + Automated analysis may miss context that team members understand + + - Review recommendations with technical leads + - Consider team member expertise and preferences + - Factor in recent changes and ongoing work + - Adjust groupings based on team feedback + + + + + Plan for Uncertainty + Prepare contingency plans for unexpected conflicts or dependencies + Even good analysis can't predict all possible issues + + - Build buffer time into parallel work schedules + - Establish clear escalation procedures for conflicts + - Plan regular check-ins and coordination points + - Have backup plans for high-risk parallel groups + + + + + + + Monitoring Parallel Work Execution + + + Regular Progress Tracking + Monitor progress of parallel groups and watch for emerging conflicts + Early detection of issues allows for timely intervention + + - Set up regular check-ins for each parallel group + - Monitor merge conflicts and integration issues + - Track coordination overhead and communication needs + - Adjust groupings if conflicts emerge + + + + + Feedback Collection + Collect feedback on analysis accuracy and process effectiveness + Feedback improves future analyses and validates current approaches + + - Survey team members after parallel work completion + - Track actual vs predicted conflicts and coordination needs + - Document lessons learned and process improvements + - Update analysis parameters based on outcomes + + + + + Continuous Improvement + Use results and feedback to refine analysis approaches + Analysis accuracy improves with experience and project-specific learning + + - Maintain historical analysis data and outcomes + - Identify patterns in prediction accuracy + - Adjust algorithm weights based on project characteristics + - Develop project-specific heuristics and rules + + + + + + + + + + Analysis returns low confidence scores for most recommendations + + - Insufficient issue descriptions or technical details + - Missing or inconsistent labeling + - Limited historical data for the repository + - Complex or unusual issue relationships + + + - Improve issue description quality and completeness + - Establish consistent labeling practices + - Manually review and validate low-confidence cases + - Adjust confidence thresholds for your project context + - Gather additional technical details for unclear issues + + + + + Parallel work groups experience more conflicts than predicted + + - Hidden dependencies not captured in issue descriptions + - Rapid codebase changes affecting analysis assumptions + - Team coordination issues beyond technical conflicts + - Incomplete file overlap detection + + + - Review and update issue descriptions with new information + - Re-run analysis with updated data + - Implement more frequent coordination check-ins + - Adjust analysis parameters based on observed patterns + - Consider more conservative grouping strategies + + + + + Analysis creates too many small groups, limiting parallelism + + - Conservative risk tolerance settings + - High file overlap sensitivity + - Overly strict dependency detection + - Small team size constraints + + + - Adjust risk tolerance to more aggressive settings + - Increase maximum group size limits + - Review and tune algorithm weights + - Consider accepting higher coordination overhead for more parallelism + - Validate that detected dependencies are actually blocking + + + + + Exported results don't integrate properly with project management tools + + - Format compatibility issues + - Missing required fields or metadata + - Tool-specific configuration requirements + - API version or authentication problems + + + - Verify export format compatibility with target tool + - Check API documentation for required fields + - Update authentication credentials and permissions + - Use intermediate formats (CSV, JSON) for manual import + - Contact tool support for integration assistance + + + + + + + Enable detailed logging to understand analysis decisions + Add --verbose flag to CLI commands or enable debug mode in API calls + Detailed step-by-step analysis logs, intermediate scores, and decision rationale + + + + Manually verify key analysis assumptions and detected relationships + Review dependency graphs, file overlap matrices, and scoring details + Validation of automated analysis against human expertise + + + + Analyze subsets of issues to isolate problematic cases + Start with small, well-understood issue groups and gradually expand + Identification of specific issues or patterns causing analysis problems + + + +
\ No newline at end of file diff --git a/.roo/rules-parallelizability-analyzer/README.md b/.roo/rules-parallelizability-analyzer/README.md new file mode 100644 index 00000000000..45a66b4c2d8 --- /dev/null +++ b/.roo/rules-parallelizability-analyzer/README.md @@ -0,0 +1,351 @@ +# Parallelizability Analyzer Mode + +The Parallelizability Analyzer mode is a specialized Roo mode that determines whether a group of GitHub issues can be worked on in parallel without conflicts. It analyzes dependencies, file overlaps, labels, and metadata to detect potential conflicts and provides recommendations for optimal parallel development strategies. + +## Features + +- **Multi-Input Support**: Accepts GitHub issue URLs, issue numbers, or search queries +- **Dependency Analysis**: Detects explicit and implicit dependencies between issues +- **File Overlap Detection**: Analyzes potential file conflicts using heuristics and static analysis +- **Risk Assessment**: Provides configurable risk scoring and confidence levels +- **Parallel Grouping**: Recommends optimal groupings for parallel development +- **Comprehensive Reporting**: Generates detailed reports in markdown and JSON formats +- **CLI Integration**: Exposes command-line interface for automation +- **API Support**: Provides structured JSON output for integration with other tools + +## Quick Start + +### Basic Usage + +1. **Switch to the mode:** + + ``` + Switch to parallelizability-analyzer mode + ``` + +2. **Analyze issues by URL:** + + ``` + Analyze these GitHub issues for parallelizability: + - https://github.com/RooCodeInc/Roo-Code/issues/5648 + - https://github.com/RooCodeInc/Roo-Code/issues/5647 + - https://github.com/RooCodeInc/Roo-Code/issues/5646 + ``` + +3. **Analyze by issue numbers:** + + ``` + Analyze issues #5648, #5647, and #5646 for parallel development + ``` + +4. **Analyze by search query:** + ``` + Analyze all open issues labeled "enhancement" for parallelizability + ``` + +### Configuration Options + +The analyzer supports various configuration parameters: + +- **Risk Tolerance**: `conservative`, `balanced`, `aggressive` +- **Confidence Threshold**: 0.0 to 1.0 (default: 0.7) +- **Max Group Size**: Maximum issues per parallel group (default: 5) +- **Analysis Depth**: `basic`, `standard`, `comprehensive` + +## Analysis Workflow + +The mode follows a 7-step analysis process: + +1. **Initialization**: Parse input and validate GitHub access +2. **Data Collection**: Fetch issue details, labels, and metadata +3. **Dependency Analysis**: Detect explicit and implicit dependencies +4. **File Overlap Detection**: Analyze potential file conflicts +5. **Heuristic Analysis**: Apply scoring algorithms and risk assessment +6. **Report Generation**: Create comprehensive analysis reports +7. **Integration**: Provide recommendations and next steps + +## Analysis Algorithms + +### Dependency Detection + +**Explicit Dependencies:** + +- Issue references in descriptions (`#1234`, `fixes #1234`) +- Cross-repository references +- Pull request links +- Milestone relationships + +**Implicit Dependencies:** + +- Shared file patterns +- Related functionality areas +- Common labels and tags +- Architectural relationships + +### File Overlap Analysis + +**Direct Conflicts:** + +- Exact file path matches in issue descriptions +- Modified files in linked pull requests + +**Predicted Overlaps:** + +- Configuration files (package.json, .roomodes) +- Shared modules and utilities +- Infrastructure and deployment files +- Documentation and README files + +### Scoring Algorithm + +The parallelizability score is calculated using weighted factors: + +``` +Score = (1 - dependency_weight * dependency_score) * + (1 - overlap_weight * file_overlap_score) * + (1 - complexity_weight * complexity_score) * + confidence_multiplier +``` + +Default weights: + +- Dependency: 0.4 +- File Overlap: 0.3 +- Complexity: 0.2 +- Risk Tolerance: 0.1 + +## Output Formats + +### Markdown Report + +Comprehensive human-readable report including: + +- Executive summary with overall assessment +- Detailed issue analysis +- Dependency mapping +- File overlap analysis +- Risk assessment +- Parallel group recommendations +- Coordination strategies + +### JSON API Response + +Structured data format for programmatic consumption: + +- Overall assessment scores +- Parallel group definitions +- Pairwise conflict analysis +- Risk factors and mitigations +- Coordination requirements +- Success metrics + +## Common Use Cases + +### Sprint Planning + +``` +Analyze all issues in the current milestone for optimal sprint planning +``` + +### Release Preparation + +``` +Analyze release-critical issues to identify parallel development opportunities +``` + +### Technical Debt Cleanup + +``` +Analyze technical debt issues to group related refactoring work +``` + +### Feature Development + +``` +Analyze feature requests to identify dependencies and coordination needs +``` + +## Integration Examples + +### Task Management Integration + +The analyzer can integrate with various task management systems: + +- **Jira**: Export parallel groups as epics with coordinated stories +- **Azure DevOps**: Create work item hierarchies based on analysis +- **GitHub Projects**: Organize issues into parallel development columns +- **Trello**: Create boards with coordinated development lanes + +### CI/CD Integration + +```bash +# Example webhook integration +curl -X POST /api/parallelizability/analyze \ + -H "Content-Type: application/json" \ + -d '{ + "issues": ["#1234", "#1235", "#1236"], + "config": { + "risk_tolerance": "balanced", + "confidence_threshold": 0.7 + } + }' +``` + +### Parallel Worker Coordination + +The analyzer provides input for parallel worker systems: + +```json +{ + "parallel_groups": [ + { + "group_id": 1, + "issues": [1234, 1235], + "coordination_requirements": ["shared_config_sync"], + "estimated_duration": "3-5 days" + } + ] +} +``` + +## Best Practices + +### Input Preparation + +- Ensure issues have detailed descriptions +- Use consistent labeling across issues +- Include file paths in issue descriptions when known +- Link related issues explicitly + +### Analysis Configuration + +- Start with balanced risk tolerance for most scenarios +- Use conservative settings for critical releases +- Adjust confidence thresholds based on team experience +- Consider team size when setting max group sizes + +### Result Interpretation + +- Review dependency analysis for accuracy +- Validate file overlap predictions with domain knowledge +- Consider team expertise when forming parallel groups +- Plan integration points early in development + +### Coordination Strategies + +- Establish communication channels for each parallel group +- Create shared documentation for overlapping areas +- Plan regular sync meetings for medium/high risk groups +- Use feature branches to isolate parallel development + +## Troubleshooting + +### Common Issues + +**GitHub API Rate Limits:** + +- Use authenticated requests with higher rate limits +- Implement request batching for large issue sets +- Cache issue data for repeated analyses + +**Inaccurate Dependency Detection:** + +- Improve issue descriptions with explicit references +- Use consistent naming conventions across issues +- Manually specify dependencies when automatic detection fails + +**File Overlap False Positives:** + +- Refine file pattern matching rules +- Use project-specific configuration files +- Manually review and adjust overlap predictions + +### Performance Optimization + +- Limit analysis to relevant issue subsets +- Use cached data for repeated analyses +- Implement parallel processing for large issue sets +- Configure appropriate timeout values + +## Configuration Reference + +### Risk Tolerance Levels + +**Conservative:** + +- Lower parallelizability scores +- Higher coordination requirements +- Emphasis on conflict prevention + +**Balanced:** + +- Moderate risk acceptance +- Balanced speed vs. safety +- Recommended for most scenarios + +**Aggressive:** + +- Higher parallelizability scores +- Minimal coordination overhead +- Suitable for experienced teams + +### Confidence Thresholds + +- **0.9+**: High confidence, minimal false positives +- **0.7-0.9**: Balanced confidence, good for most use cases +- **0.5-0.7**: Lower confidence, more permissive grouping +- **<0.5**: Experimental, high false positive rate + +## API Reference + +### Core Commands + +```bash +# Analyze specific issues +roo analyze-parallelizability --issues "#1234,#1235,#1236" + +# Analyze by query +roo analyze-parallelizability --query "label:enhancement state:open" + +# Configure analysis +roo analyze-parallelizability --config risk_tolerance=conservative + +# Output formats +roo analyze-parallelizability --format json --output results.json +``` + +### Configuration Files + +Create `.parallelizability-config.json` in your project root: + +```json +{ + "risk_tolerance": "balanced", + "confidence_threshold": 0.7, + "max_group_size": 5, + "file_patterns": { + "config": ["package.json", ".roomodes", "*.config.js"], + "infrastructure": ["Dockerfile", "docker-compose.yml", "*.tf"], + "documentation": ["README.md", "docs/**/*.md"] + }, + "weights": { + "dependency": 0.4, + "file_overlap": 0.3, + "complexity": 0.2, + "risk_tolerance": 0.1 + } +} +``` + +## Contributing + +To extend the parallelizability analyzer: + +1. **Add new heuristics** in [`2_analysis_algorithms.xml`](.roo/rules-parallelizability-analyzer/2_analysis_algorithms.xml:1) +2. **Extend CLI interface** in [`3_cli_and_integration.xml`](.roo/rules-parallelizability-analyzer/3_cli_and_integration.xml:1) +3. **Add usage examples** in [`4_usage_examples.xml`](.roo/rules-parallelizability-analyzer/4_usage_examples.xml:1) +4. **Update workflow** in [`1_workflow.xml`](.roo/rules-parallelizability-analyzer/1_workflow.xml:1) + +## License + +This mode is part of the Roo Code project and follows the same licensing terms. diff --git a/.roomodes b/.roomodes index f2bbe35fd15..2dc7752c6c3 100644 --- a/.roomodes +++ b/.roomodes @@ -202,3 +202,30 @@ customModes: whenToUse: Use this mode to orchestrate the process of fixing a GitHub issue. Provide a GitHub issue URL, and this mode will coordinate a series of subtasks to analyze the issue, explore the code, create a plan, implement the solution, and prepare a pull request. groups: [] source: project + - slug: parallelizability-analyzer + name: 🔀 Parallelizability Analyzer + roleDefinition: |- + You are Roo, a parallelizability analysis specialist focused on determining whether groups of GitHub issues can be worked on in parallel without conflicts. Your expertise includes: + - Analyzing GitHub issues to identify dependencies, file overlaps, and potential conflicts + - Using static analysis and heuristics to assess parallelizability + - Evaluating labels, metadata, and issue relationships for conflict detection + - Generating comprehensive reports on parallel work feasibility + - Integrating with task management and parallel worker coordination systems + - Providing CLI and API interfaces for automated scheduling workflows + + You help teams optimize their development workflow by: + - Accepting groups of issues via URLs, numbers, or search queries + - Performing deep analysis of code dependencies and file overlaps + - Applying configurable rules and heuristics for conflict detection + - Generating detailed parallelizability reports with recommendations + - Supporting integration with external task management systems + - Enabling automated parallel work scheduling and coordination + whenToUse: Use this mode when you need to analyze whether a group of GitHub issues can be worked on in parallel without conflicts. Provide issue URLs, numbers, or search queries, and this mode will assess dependencies, file overlaps, and potential conflicts to determine parallelizability. + groups: + - read + - - edit + - fileRegex: (\.roo/temp/parallelizability-analyzer/.*\.(json|md|txt)$|\.roo/rules-parallelizability-analyzer/.*\.xml$) + description: Analysis output files and mode configuration + - command + - mcp + source: project