# Implementation Plan: Smarter Aggregation with Sub-Agent Summarization ## Phase 1: Hash-Based Summary Cache [checkpoint: e972cf4] Focus: Implement file hashing and cache storage - [x] Task: Research existing file hash implementations in codebase 3218104 - [x] Task: Design cache storage format (file-based vs project state) 3218104 - [x] Task: Implement hash computation for aggregation files 3218104 - [x] Task: Implement summary cache storage and retrieval 3218104 - [x] Task: Add cache invalidation when file content changes 3218104 - [x] Task: Write tests for hash computation and cache 3218104 - [x] Task: Conductor - User Manual Verification 'Phase 1: Hash-Based Summary Cache' e972cf4 ## Phase 2: Sub-Agent Summarization Focus: Implement sub-agent summarization during aggregation - [~] Task: Audit current aggregate.py flow - [~] Task: Define summarization prompt strategy for code vs text files - [~] Task: Implement sub-agent invocation during aggregation - [~] Task: Handle provider-specific differences in sub-agent calls - [ ] Task: Write tests for sub-agent summarization - [ ] Task: Conductor - User Manual Verification 'Phase 2: Sub-Agent Summarization' ## Phase 3: Tiered Aggregation Strategy Focus: Respect tier-level aggregation configuration - [ ] Task: Audit how tiers receive context currently - [ ] Task: Implement tier-level aggregation strategy selection - [ ] Task: Connect tier strategy to Persona configuration - [ ] Task: Write tests for tiered aggregation - [ ] Task: Conductor - User Manual Verification 'Phase 3: Tiered Aggregation Strategy' ## Phase 4: UI Integration Focus: Expose cache status and controls in UI - [ ] Task: Add cache status indicator to Files & Media panel - [ ] Task: Add "Clear Summary Cache" button - [ ] Task: Add aggregation configuration to Project Settings or AI Settings - [ ] Task: Write tests for UI integration - [ ] Task: Conductor - User Manual Verification 'Phase 4: UI Integration' ## Phase 5: Cache Persistence & Optimization Focus: Ensure cache persists and is performant - [ ] Task: Implement persistent cache storage to disk - [ ] Task: Add cache size management (max entries, LRU) - [ ] Task: Performance testing with large codebases - [ ] Task: Write tests for persistence - [ ] Task: Conductor - User Manual Verification 'Phase 5: Cache Persistence & Optimization'