# 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 [checkpoint: 7efcc7c]
Focus: Implement sub-agent summarization during aggregation

- [x] Task: Audit current aggregate.py flow 3218104
- [x] Task: Define summarization prompt strategy for code vs text files 3218104
- [x] Task: Implement sub-agent invocation during aggregation 3218104
- [x] Task: Handle provider-specific differences in sub-agent calls 3218104
- [x] Task: Write tests for sub-agent summarization 3218104
- [x] Task: Conductor - User Manual Verification 'Phase 2: Sub-Agent Summarization' 7efcc7c

## Phase 3: Tiered Aggregation Strategy [checkpoint: fa00a84]
Focus: Respect tier-level aggregation configuration

- [x] Task: Audit how tiers receive context currently 628b580
- [x] Task: Implement tier-level aggregation strategy selection 628b580
- [x] Task: Connect tier strategy to Persona configuration 628b580
- [x] Task: Write tests for tiered aggregation 628b580
- [x] Task: Conductor - User Manual Verification 'Phase 3: Tiered Aggregation Strategy' fa00a84

## Phase 4: UI Integration [checkpoint: a1c204f]
Focus: Expose cache status and controls in UI

- [x] Task: Add cache status indicator to Files & Media panel 6bf6c79
- [x] Task: Add "Clear Summary Cache" button 6bf6c79
- [x] Task: Add aggregation configuration to Project Settings or AI Settings 6bf6c79
- [x] Task: Write tests for UI integration 6bf6c79
- [x] Task: Conductor - User Manual Verification 'Phase 4: UI Integration' a1c204f

## Phase 5: Cache Persistence & Optimization [checkpoint: e0737dc]
Focus: Ensure cache persists and is performant

- [x] Task: Implement persistent cache storage to disk fb2df2a
- [x] Task: Add cache size management (max entries, LRU) fb2df2a
- [x] Task: Performance testing with large codebases fb2df2a
- [x] Task: Write tests for persistence fb2df2a
- [x] Task: Conductor - User Manual Verification 'Phase 5: Cache Persistence & Optimization' e0737dc
