Avoid recreating scope plugins during selection
## Problem/motivation Follow-up to: #3586202 _**Verify this is still an issue and the solution approach before proceeding**_ `AiContextScopeManager::getScopePlugins()` creates every scope plugin instance each time it is called. The selection path calls this through `AiContextScopeResolver` during current-context filtering, auto-inclusion, and scope scoring. This creates repeated work proportional to: ```text published candidates examined * enabled scope plugins ``` This should be addressed before RC1 because it sits directly on `AiContextSelector::select()`, which is invoked during AI agent prompt generation. ## Solution - Memoize scope plugin instances per request/service instance, or - Pass a prepared, sorted plugin set through resolver operations, or - Split resolver methods so a caller can reuse the same plugin set across a selection run. ## Tasks - Check against other issues to make sure it wasn't separately reported - Verify this is still an issue before proceeding - Verify the solution approach before proceeding - Update code - Review and test ## AI usage disclosures - [x] AI Assisted Issue - [ ] AI Assisted Code - [ ] AI Generated Code
issue