5380b7153d
Revised per user directive: 'if anything I want more unification. I only
want splitifcation if there is a good reason such as import load times.
If there isn't an import issue or definition pollution issue just keep
it in the same file.'
Decision rule (the user's principle):
- Split ONLY for: import load times OR definition pollution
- Otherwise: keep in same file
- No sub-directories; prefix naming only
Only TWO refactors justified:
1. MERGE 5 ImGui LEAKS into gui_2.py (user: 'all ImGui rendering should be
in gui_2.py; only exception imgui_scopes.py'):
- bg_shader.py, shaders.py, command_palette.py, diff_viewer.py,
patch_modal.py -> move content to gui_2.py, git rm originals
2. MERGE 2 vendor files into ai_client.py (user: 'vendor_capabilities.py
and vendor_state.py are related to ai_client.py'):
- vendor_capabilities.py, vendor_state.py -> move to ai_client.py
- ai_client.py grows 3147 -> ~3310 lines (justified: unified vendor layer)
3. SPLIT models.py (clear definition pollution: 36 classes, 5+ domains,
1044 lines):
- CREATE src/mma.py (MMA Core: ThinkingSegment, Ticket, Track,
WorkerContext, TrackState)
- CREATE src/project.py (ProjectContext + 5 sub + config IO +
parse_history_entries)
- CREATE src/project_files.py (FileItem, ContextPreset,
ContextFileEntry, NamedViewPreset, Preset)
- MERGE other classes into existing sub-system files:
- Persona -> personas.py
- Tool/ToolPreset -> tool_presets.py
- BiasProfile -> tool_bias.py
- TextEditorConfig/ExternalEditorConfig -> external_editor.py
- MCPServerConfig/MCPConfiguration/etc -> mcp_client.py
- WorkspaceProfile -> workspace_manager.py
- REDUCE models.py to ~60 lines (Pydantic proxies + AGENT_TOOL_NAMES only)
Everything else (52 files): KEEP AS-IS. No reason to split.
Renames (optional, deferred):
- multi_agent_conductor.py -> mma_conductor.py
- dag_engine.py -> mma_dag.py
- conductor_tech_lead.py -> mma_tech_lead.py
- orchestrator_pm.py -> mma_pm.py
(These are renames for prefix consistency, not strictly necessary)
Net scope: 17 file changes; -4 files (65 -> 61).
10 VCs. 5 phases. 1 atomic commit per file move.
User: 'I want more unification' -> only 1 split (models.py), 7 merges.