Skip to content

Commit 9df9fff

Browse files
committed
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 parent e84dd0a commit 9df9fff

File tree

6 files changed

+1951
-0
lines changed

6 files changed

+1951
-0
lines changed
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
<workflow>
2+
<step number="1">
3+
<name>Initialize Analysis Context</name>
4+
<instructions>
5+
The user will provide a group of GitHub issues for parallelizability analysis. Issues can be provided as:
6+
- Individual URLs (e.g., "https://github.com/owner/repo/issues/123")
7+
- Issue numbers with repository context (e.g., "#123, #124, #125" for current repo)
8+
- Search queries (e.g., "label:bug milestone:v1.0")
9+
- Mixed formats
10+
11+
1. **Create Analysis Directory**: Create a unique directory for this analysis session.
12+
<execute_command>
13+
<command>mkdir -p .roo/temp/parallelizability-analyzer/$(date +%Y%m%d_%H%M%S)</command>
14+
</execute_command>
15+
16+
2. **Parse Input**: Identify and normalize all issue references.
17+
- Extract owner/repo/number from URLs
18+
- Resolve issue numbers to full references
19+
- Execute search queries to get issue lists
20+
- Handle authentication errors gracefully
21+
22+
3. **Retrieve Issue Data**: For each identified issue, fetch comprehensive data.
23+
<execute_command>
24+
<command>gh issue view [issue_number] --repo [owner]/[repo] --json number,title,body,state,labels,assignees,milestone,createdAt,updatedAt,closedAt,author,comments</command>
25+
</execute_command>
26+
27+
4. **Save Context**: Store all issue data and analysis metadata.
28+
- Save individual issue data as JSON files
29+
- Create analysis manifest with issue list and metadata
30+
- Record analysis parameters and configuration
31+
32+
5. **Validate Input**: Ensure all issues are accessible and contain sufficient data for analysis.
33+
</instructions>
34+
</step>
35+
36+
<step number="2">
37+
<name>Analyze Issue Dependencies</name>
38+
<instructions>
39+
Perform comprehensive dependency analysis to identify relationships between issues.
40+
41+
1. **Extract Dependencies**: Analyze issue content for explicit dependencies.
42+
- Parse issue bodies and comments for references to other issues
43+
- Identify "depends on", "blocks", "related to" relationships
44+
- Extract linked PRs and their relationships
45+
- Map milestone and epic dependencies
46+
47+
2. **Analyze Labels and Metadata**: Examine labels for conflict indicators.
48+
- Identify breaking change labels
49+
- Check for architectural impact labels
50+
- Analyze priority and urgency indicators
51+
- Map feature area and component labels
52+
53+
3. **Detect Implicit Dependencies**: Use heuristics to find hidden relationships.
54+
- Analyze issue titles for related functionality
55+
- Check for similar error messages or symptoms
56+
- Identify issues affecting the same user workflows
57+
- Map issues to common architectural components
58+
59+
4. **Create Dependency Graph**: Build a comprehensive dependency map.
60+
- Create nodes for each issue with metadata
61+
- Add edges for all identified relationships
62+
- Weight edges by dependency strength and type
63+
- Identify dependency cycles and critical paths
64+
65+
5. **Save Dependency Analysis**: Store results for next analysis phase.
66+
</instructions>
67+
</step>
68+
69+
<step number="3">
70+
<name>Perform File Overlap Analysis</name>
71+
<instructions>
72+
Analyze potential file conflicts by examining what files each issue might affect.
73+
74+
1. **Extract File References**: Identify files mentioned in issues.
75+
- Parse issue bodies for file paths and names
76+
- Extract file references from linked PRs
77+
- Analyze error messages for affected files
78+
- Map feature descriptions to likely file locations
79+
80+
2. **Predict Affected Files**: Use codebase analysis to predict file impacts.
81+
- Search codebase for functionality mentioned in issues
82+
- Map bug reports to likely source file locations
83+
- Identify test files that would need updates
84+
- Predict configuration and documentation changes
85+
86+
3. **Analyze File Overlap Patterns**: Identify potential conflicts.
87+
- Direct overlaps: Same files mentioned in multiple issues
88+
- Indirect overlaps: Related files in same modules/components
89+
- Test file conflicts: Shared test utilities and fixtures
90+
- Configuration conflicts: Shared config files and schemas
91+
92+
4. **Assess Conflict Severity**: Rate the likelihood and impact of conflicts.
93+
- High risk: Direct file overlaps with complex changes
94+
- Medium risk: Related files in same component
95+
- Low risk: Independent files with minimal interaction
96+
- No risk: Completely separate file sets
97+
98+
5. **Generate File Conflict Matrix**: Create a comprehensive conflict map.
99+
- Matrix showing file overlap between all issue pairs
100+
- Conflict severity ratings and explanations
101+
- Recommendations for conflict resolution strategies
102+
</instructions>
103+
</step>
104+
105+
<step number="4">
106+
<name>Apply Parallelizability Heuristics</name>
107+
<instructions>
108+
Apply sophisticated heuristics and rules to determine parallelizability.
109+
110+
1. **Load Analysis Rules**: Apply configurable analysis rules.
111+
- Load default heuristics for common conflict patterns
112+
- Apply repository-specific rules if configured
113+
- Consider project-specific architectural constraints
114+
- Factor in team workflow and review processes
115+
116+
2. **Analyze Issue Characteristics**: Evaluate individual issue properties.
117+
- Issue complexity and estimated effort
118+
- Required expertise and team member assignments
119+
- Breaking change potential and backward compatibility
120+
- Testing requirements and validation complexity
121+
122+
3. **Evaluate Team Constraints**: Consider human resource factors.
123+
- Assignee conflicts and expertise overlap
124+
- Review capacity and approval workflows
125+
- Communication overhead for related changes
126+
- Merge conflict resolution capabilities
127+
128+
4. **Apply Temporal Constraints**: Consider timing and sequencing factors.
129+
- Milestone deadlines and release schedules
130+
- Dependency ordering requirements
131+
- Testing and validation timelines
132+
- Integration and deployment constraints
133+
134+
5. **Calculate Parallelizability Scores**: Generate quantitative assessments.
135+
- Individual issue parallelizability ratings
136+
- Pairwise conflict probability scores
137+
- Group parallelizability confidence levels
138+
- Risk-adjusted parallel work recommendations
139+
</instructions>
140+
</step>
141+
142+
<step number="5">
143+
<name>Generate Analysis Report</name>
144+
<instructions>
145+
Create comprehensive reports on parallelizability analysis results.
146+
147+
1. **Prepare Report Structure**: Organize findings into clear sections.
148+
- Executive summary with key recommendations
149+
- Detailed analysis methodology and assumptions
150+
- Individual issue assessments and characteristics
151+
- Pairwise conflict analysis and risk ratings
152+
- Group parallelizability recommendations
153+
154+
2. **Create Visualizations**: Generate helpful visual representations.
155+
- Dependency graph diagrams
156+
- File overlap heat maps
157+
- Parallelizability matrices
158+
- Risk assessment charts
159+
- Timeline and scheduling recommendations
160+
161+
3. **Provide Actionable Recommendations**: Offer specific guidance.
162+
- Optimal parallel work groupings
163+
- Sequential work ordering for conflicting issues
164+
- Risk mitigation strategies for parallel work
165+
- Monitoring and coordination recommendations
166+
- Fallback plans for conflict resolution
167+
168+
4. **Format for Different Audiences**: Create multiple report formats.
169+
- Technical report with detailed analysis
170+
- Management summary with key decisions
171+
- Developer guide with practical recommendations
172+
- API response format for automated systems
173+
174+
5. **Save Analysis Results**: Store all outputs for future reference.
175+
- Save reports in multiple formats (JSON, Markdown, HTML)
176+
- Store raw analysis data for audit trails
177+
- Create shareable links and summaries
178+
- Archive results with timestamp and configuration
179+
</instructions>
180+
</step>
181+
182+
<step number="6">
183+
<name>Present Results and Recommendations</name>
184+
<instructions>
185+
Present the analysis results to the user with clear recommendations.
186+
187+
1. **Read Analysis Results**: Load the generated reports and data.
188+
<read_file>
189+
<args>
190+
<file>
191+
<path>.roo/temp/parallelizability-analyzer/[SESSION_ID]/analysis_report.md</path>
192+
</file>
193+
</args>
194+
</read_file>
195+
196+
2. **Present Executive Summary**: Show key findings and recommendations.
197+
<ask_followup_question>
198+
<question>
199+
Parallelizability analysis complete! Here are the key findings:
200+
201+
**Issues Analyzed:** [Number] issues across [repositories]
202+
**Overall Parallelizability:** [High/Medium/Low] confidence
203+
204+
**Recommended Parallel Groups:**
205+
[List of issue groups that can be worked on in parallel]
206+
207+
**Sequential Dependencies:**
208+
[List of issues that must be done in sequence]
209+
210+
**High-Risk Conflicts:**
211+
[List of issue pairs with significant conflict potential]
212+
213+
**Detailed Analysis:**
214+
[Summary of methodology and key findings]
215+
216+
Would you like to see the detailed analysis, export results, or take action on these recommendations?
217+
</question>
218+
<follow_up>
219+
<suggest>Show me the detailed technical analysis</suggest>
220+
<suggest>Export results for task management integration</suggest>
221+
<suggest>Create work assignments based on recommendations</suggest>
222+
<suggest>Analyze a different set of issues</suggest>
223+
</follow_up>
224+
</ask_followup_question>
225+
226+
3. **Handle User Requests**: Respond to user choices for additional information or actions.
227+
- Provide detailed technical reports
228+
- Export data in various formats
229+
- Integrate with task management systems
230+
- Prepare work assignment recommendations
231+
232+
4. **Offer Integration Options**: Provide ways to act on the analysis.
233+
- Generate GitHub project board configurations
234+
- Create team assignment recommendations
235+
- Export to external project management tools
236+
- Set up monitoring for parallel work coordination
237+
</instructions>
238+
</step>
239+
240+
<step number="7">
241+
<name>Integration and Export</name>
242+
<instructions>
243+
Provide integration capabilities for acting on analysis results.
244+
245+
1. **Export Formats**: Support multiple output formats for different tools.
246+
- JSON for API integration
247+
- CSV for spreadsheet analysis
248+
- Markdown for documentation
249+
- YAML for configuration management
250+
- XML for enterprise systems
251+
252+
2. **Task Management Integration**: Connect with popular project management tools.
253+
- GitHub Projects integration
254+
- Jira ticket organization
255+
- Trello board setup
256+
- Asana task grouping
257+
- Custom API endpoints
258+
259+
3. **Team Coordination**: Provide tools for team communication and coordination.
260+
- Generate team assignment recommendations
261+
- Create communication templates
262+
- Set up conflict monitoring alerts
263+
- Provide progress tracking mechanisms
264+
265+
4. **Monitoring and Updates**: Enable ongoing parallelizability monitoring.
266+
- Set up automated re-analysis triggers
267+
- Monitor for new dependencies or conflicts
268+
- Track parallel work progress and outcomes
269+
- Learn from results to improve future analysis
270+
271+
5. **Documentation and Sharing**: Make results accessible and shareable.
272+
- Generate shareable report URLs
273+
- Create presentation-ready summaries
274+
- Provide audit trails and methodology documentation
275+
- Enable collaborative review and feedback
276+
</instructions>
277+
</step>
278+
</workflow>

0 commit comments

Comments
 (0)