Skip to content

Consolidate Multiple Chat/Conversation Workflow Implementations #40

@mrveiss

Description

@mrveiss

Problem

7 different chat/conversation implementations exist (~5,000 duplicate lines), causing confusion about which to use and feature fragmentation.

Files Affected

  1. src/chat_workflow_manager.py (67,537 bytes) - Main chat workflow
  2. src/chat_workflow_consolidated.py (35,730 bytes) - Consolidated attempt
  3. src/async_chat_workflow.py (13,090 bytes) - Async workflow
  4. src/simple_chat_workflow.py (12,608 bytes) - Simplified workflow
  5. src/conversation.py (29,403 bytes) - Conversation management
  6. src/conversation_performance_optimized.py (39,933 bytes) - Performance-optimized
  7. src/conversation_file_manager.py (36,061 bytes) - File-based storage

⚠️ CRITICAL: Feature Preservation Required

MUST audit ALL 7 chat/conversation implementations:

  • Main workflow (67KB) likely has features not in smaller versions
  • Performance-optimized (40KB) may have critical performance improvements
  • File-based manager (36KB) may have unique persistence capabilities
  • Consolidated (36KB) may have been attempt to merge features already
  • Simple (13KB) may have cleaner patterns despite being smaller
  • CANNOT assume biggest = best - each evolved for different use cases

Recommended Approach

  1. AUDIT: Compare all 7 implementations for unique workflows, features, optimizations
  2. ANALYZE: What makes performance-optimized version faster? What's in file-based that others lack?
  3. Identify active/primary BASE implementation (likely chat_workflow_manager.py)
  4. MERGE: Best features from all 7 (workflows from main, optimizations from performance, persistence from file-based)
  5. DOCUMENT: Feature matrix showing what came from where
  6. Create migration guide
  7. Deprecate old implementations
  8. Update all consumers

Benefits

  • Single chat workflow API
  • Consistent conversation handling
  • Easier to add new features
  • Reduced confusion for developers

Acceptance Criteria

  • Feature comparison across all 7 implementations
  • Performance analysis (why is performance-optimized version 40KB?)
  • Persistence analysis (what's unique in file-based manager?)
  • Team decides on primary BASE implementation
  • Best features from all 7 merged
  • Feature provenance documented (workflows, optimizations, persistence)
  • Migration guide created
  • All consumers updated
  • Old implementations deprecated
  • Tests passing
  • Documentation updated

Estimated Effort

8-10 hours

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions