conductor(checkpoint): Checkpoint end of Phase 1 (Directory Migration)

This commit is contained in:
2026-05-07 21:37:58 -04:00
parent 49acb884e1
commit 2065dd8559
119 changed files with 3 additions and 3 deletions
@@ -0,0 +1,17 @@
{
"name": "aggregation_smarter_summaries",
"created": "2026-03-22",
"status": "future",
"priority": "medium",
"affected_files": [
"src/aggregate.py",
"src/file_cache.py",
"src/ai_client.py",
"src/models.py"
],
"related_tracks": [
"discussion_hub_panel_reorganization (in_progress)",
"system_context_exposure (future)"
],
"notes": "Deferred from discussion_hub_panel_reorganization planning. Improves aggregation with sub-agent summarization and hash-based caching."
}
@@ -0,0 +1,49 @@
# 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
@@ -0,0 +1,103 @@
# Specification: Smarter Aggregation with Sub-Agent Summarization
## 1. Overview
This track improves the context aggregation system to use sub-agent passes for intelligent summarization and hash-based caching to avoid redundant work.
**Current Problem:**
- Aggregation is a simple pass that either injects full file content or a basic skeleton
- No intelligence applied to determine what level of detail is needed
- Same files get re-summarized on every discussion start even if unchanged
**Goal:**
- Use a sub-agent during aggregation pass for high-tier agents to generate succinct summaries
- Cache summaries based on file hash - only re-summarize if file changed
- Smart outline generation for code files, summary for text files
## 2. Current State Audit
### Existing Aggregation Behavior
- `aggregate.py` handles context aggregation
- `file_cache.py` provides AST parsing and skeleton generation
- Per-file flags: `Auto-Aggregate` (summarize), `Force Full` (inject raw)
- No caching of summarization results
### Provider API Considerations
- Different providers have different prompt/caching mechanisms
- Need to verify how each provider handles system context and caching
- May need provider-specific aggregation strategies
## 3. Functional Requirements
### 3.1 Hash-Based Summary Cache
- Generate SHA256 hash of file content
- Store summaries in a cache (file-based or in project state)
- Before summarizing, check if file hash matches cached summary
- Cache invalidation when file content changes
### 3.2 Sub-Agent Summarization Pass
- During aggregation, optionally invoke sub-agent for summarization
- Sub-agent generates concise summary of file purpose and key points
- Different strategies for:
- Code files: AST-based outline + key function signatures
- Text files: Paragraph-level summary
- Config files: Key-value extraction
### 3.3 Tiered Aggregation Strategy
- Tier 3/4 workers: Get skeleton outlines (fast, cheap)
- Tier 2 (Tech Lead): Get summaries with key details
- Tier 1 (Orchestrator): May get full content or enhanced summaries
- Configurable per-agent via Persona
### 3.4 Cache Persistence
- Summaries persist across sessions
- Stored in project directory or centralized cache location
- Manual cache clear option in UI
## 4. Data Model
### 4.1 Summary Cache Entry
```python
{
"file_path": str,
"file_hash": str, # SHA256 of content
"summary": str,
"outline": str, # For code files
"generated_at": str, # ISO timestamp
"generator_tier": str, # Which tier generated it
}
```
### 4.2 Aggregation Config
```toml
[aggregation]
default_mode = "summarize" # "full", "summarize", "outline"
cache_enabled = true
cache_dir = ".slop_cache"
```
## 5. UI Changes
- Add "Clear Summary Cache" button in Files & Media or Context Composition
- Show cached status indicator on files (similar to AST cache indicator)
- Configuration in AI Settings or Project Settings
## 6. Acceptance Criteria
- [ ] File hash computed before summarization
- [ ] Summary cache persists across app restarts
- [ ] Sub-agent generates better summaries than basic skeleton
- [ ] Aggregation respects tier-level configuration
- [ ] Cache can be manually cleared
- [ ] Provider APIs handle aggregated context correctly
## 7. Out of Scope
- Changes to provider API internals
- Vector store / embeddings for RAG (separate track)
- Changes to Session Hub / Discussion Hub layout
## 8. Dependencies
- `aggregate.py` - main aggregation logic
- `file_cache.py` - AST parsing and caching
- `ai_client.py` - sub-agent invocation
- `models.py` - may need new config structures