How mockapapella/diffdev works
Main Components Identification
a) User Interface Layer:
• CLI Interface (cli.py)
• File Selector TUI (file_selector.py)
• Clipboard Handler (clipboard.py)
b) Core Processing Layer:
• Context Management (context.py)
• Patch Generation (patch.py)
• LLM Integration (llm.py)
c) Utility Layer:
• Configuration Management (config.py)
• Git Integration (gitignore.py)
• Tree Utilities (tree_utils.py)
External Dependencies
• Anthropic Claude API
• DeepSeek API (optional for FrankenClaude mode)
• Git System
Specific Component Relationships
User Input -> CLI -> File Selector
• > Context Manager -> LLM Integration -> AI APIs
• > Patch Generator -> Git System
Important Details
a) Process Flow:
• File selection flow
• Context building process
• AI interaction cycle
• Patch generation and application
• Undo/redo functionality
b) Configuration Elements:
• API key management
• Model selection
• Git integration points
Technical Details
• File formats (patches, context)
• API endpoints
• Configuration points
• Error handling paths