Patterns for effectively delegating analysis tasks to specialized modes while maintaining context and ensuring comprehensive review coverage. When PR contains new features or significant code changes code Analyze the following changed files for pattern consistency: [List of changed files] Please focus on: 1. Finding similar existing implementations in the codebase 2. Identifying established patterns for this type of feature 3. Checking if the new code follows these patterns 4. Looking for potential code redundancy 5. Verifying proper file organization Use codebase_search and search_files to find similar code. Document all findings with specific examples and file references. Save your analysis to: .roo/temp/pr-[PR_NUMBER]/pattern-analysis.md Format the output as: ## Pattern Analysis for PR #[PR_NUMBER] ### Similar Existing Implementations ### Established Patterns ### Pattern Deviations ### Redundancy Findings ### Organization Issues When PR modifies core modules, adds new modules, or changes dependencies architect Review the architectural implications of PR #[PR_NUMBER]: Changed files: [List of changed files] PR Description: [PR description] Please analyze: 1. Module boundary adherence 2. Dependency management (new dependencies, circular dependencies) 3. Separation of concerns 4. Impact on system architecture 5. Consistency with architectural patterns Save your findings to: .roo/temp/pr-[PR_NUMBER]/architecture-review.md Format as: ## Architecture Review for PR #[PR_NUMBER] ### Module Boundaries ### Dependency Analysis ### Architectural Concerns ### Recommendations When PR adds or modifies test files test Analyze test changes in PR #[PR_NUMBER]: Test files changed: [List of test files] Please review: 1. Test file organization and location 2. Test naming conventions 3. Coverage of edge cases 4. Mock usage patterns 5. Consistency with existing test patterns Compare with similar existing tests in the codebase. Save analysis to: .roo/temp/pr-[PR_NUMBER]/test-analysis.md Format as: ## Test Analysis for PR #[PR_NUMBER] ### Test Organization ### Coverage Assessment ### Pattern Consistency ### Recommendations When PR modifies UI components or adds new ones design-engineer Review UI changes in PR #[PR_NUMBER]: UI files changed: [List of UI files] Please analyze: 1. Component structure consistency 2. Styling approach (Tailwind usage) 3. Accessibility considerations 4. i18n implementation 5. Component reusability Save findings to: .roo/temp/pr-[PR_NUMBER]/ui-review.md Always save delegation results to temp files .roo/temp/pr-[PR_NUMBER]/[analysis-type].md Request structured markdown output from delegates - Easy to parse and combine - Consistent formatting - Clear section headers Include relevant context in delegation requests - PR number and description - List of changed files - Specific areas of concern - Output file location Delegate tasks one at a time, using results to inform next delegation 1. Pattern analysis first 2. If patterns violated, delegate architecture review 3. If tests affected, delegate test analysis Delegate multiple independent analyses simultaneously - Pattern analysis (code mode) - Test analysis (test mode) - UI review (design-engineer mode) Only delegate based on file types changed - If *.test.ts changed -> delegate to test mode - If src/components/* changed -> delegate to design-engineer - If package.json changed -> delegate to architect Read all analysis files from temp directory - pattern-analysis.md - architecture-review.md - test-analysis.md - ui-review.md Find common issues across analyses - Pattern violations mentioned multiple times - Redundancy identified by different modes - Organizational issues Categorize by severity - Critical (blocks PR) - Important (should fix) - Suggestions (nice to have) Combine all findings into final review ## PR Review Summary ### Critical Issues ### Pattern Inconsistencies ### Architecture Concerns ### Test Coverage ### Suggestions Continue with available analyses Document which analyses couldn't be completed Perform basic analysis in orchestrator mode Note limitations in final report Use completed analyses Set reasonable time limits for delegations