Files
manual_slop/conductor/tracks/enhanced_context_control_20260307/plan.md

1.8 KiB

Implementation Plan: Enhanced Context Control & Cache Awareness (enhanced_context_control_20260307)

Reference: Spec | Architecture Guide

Phase 1: Data Model & Project Configuration

Focus: Update the underlying structures to support per-file flags.

  • Task 1.1: Update FileItem dataclass/model to include auto_aggregate and force_full flags. (d7a6ba7)
  • Task 1.2: Modify project_manager.py to parse and serialize these new flags. (d7a6ba7)

Phase 2: Context Builder Updates

Focus: Make the context aggregation logic respect the new flags.

  • Task 2.1: Update aggregate.py to filter out files where auto_aggregate is False. (d7a6ba7)
  • Task 2.2: Modify skeleton generation logic in aggregate.py to send full content when force_full is True. (d7a6ba7)
  • Task 2.3: Add support for manual 'Context' role injections. (d7a6ba7)

Phase 3: Gemini Cache Tracking

Focus: Track and expose API cache state.

  • Task 3.1: Modify ai_client.py's Gemini cache logic to record which file paths are in the active cache. (d7a6ba7)
  • Task 3.2: Create an event payload to push the active cache state to the GUI. (d7a6ba7)

Phase 4: UI Refactoring

Focus: Update the Files & Media panel and event handlers.

  • Task 4.1: Refactor the Files & Media panel in gui_2.py from a list to an ImGui table. (d7a6ba7)
  • Task 4.2: Implement handlers in _process_pending_gui_tasks to receive cache state updates. (d7a6ba7)
  • Task 4.3: Wire the table checkboxes to update models and trigger project saves. (d7a6ba7)

Phase 5: Testing & Verification

Focus: Ensure stability and adherence to the architecture.

  • Task 5.1: Write unit tests verifying configuration parsing, aggregate flags, and cache tracking. (d7a6ba7)
  • Task 5.2: Perform a manual UI walkthrough. (d7a6ba7)