chore(conductor): Complete Source-Wide Redundancy Audit
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
*Link: [./tracks/controller_state_mutation_matrix_20260507/](./tracks/controller_state_mutation_matrix_20260507/)*
|
||||
*Goal: Comprehensive map of all methods that modify the `AppController` and `App` state.*
|
||||
|
||||
3. [ ] **Track: Source-Wide Redundancy Audit**
|
||||
3. [x] **Track: Source-Wide Redundancy Audit**
|
||||
*Link: [./tracks/source_wide_redundancy_audit_20260507/](./tracks/source_wide_redundancy_audit_20260507/)*
|
||||
*Goal: Deep file-by-file audit to identify unused methods, duplicate logic, and dead code.*
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# Culling Candidates: Source-Wide Redundancy Audit
|
||||
|
||||
This document identifies specific code, modules, and data structures that are redundant or unused and should be removed during the "Heavy Curation" phase.
|
||||
|
||||
## 1. Redundant Modules (Legacy/Superseded)
|
||||
|
||||
| Module Path | Reason for Culling | Successor / Context |
|
||||
| :--- | :--- | :--- |
|
||||
| `src/theme.py` | DearPyGui-specific logic. Project has migrated to `imgui-bundle`. | `src/theme_2.py` |
|
||||
| `src/native_orchestrator.py` | Legacy orchestration logic. Unused in core app. | `src/orchestrator_pm.py` |
|
||||
| `src/beads_client.py` | Functional, but only used by specific "Beads" features. Review if still desired. | MMA / Conductor |
|
||||
|
||||
## 2. Redundant Data Structures (`src/models.py`)
|
||||
|
||||
- **Duplicate Class: `TextEditorConfig`**: Defined twice in `models.py`. Remove the second instance.
|
||||
- **Duplicate Class: `ExternalEditorConfig`**: Defined twice in `models.py`. Remove the second instance.
|
||||
- **Malformed Class: `Metadata`**: Has three `@dataclass` decorators. Strip down to one.
|
||||
- **Unused Constants**: `AGENT_TOOL_NAMES` is largely redundant if `MCP_TOOL_SPECS` in `mcp_client` is the source of truth.
|
||||
|
||||
## 3. Unused Public Symbols (Audit Results)
|
||||
|
||||
The following symbols have 0 project-wide usages (excluding their own definition and tests):
|
||||
|
||||
### 3.1 Aggregation & AI
|
||||
- `build_tier1_context` (`src/aggregate.py`)
|
||||
- `build_tier2_context` (`src/aggregate.py`)
|
||||
- `get_history_trunc_limit` (`src/ai_client.py`)
|
||||
- `set_history_trunc_limit` (`src/ai_client.py`)
|
||||
- `get_history_bleed_stats` (`src/ai_client.py`)
|
||||
|
||||
### 3.2 UI & Viewers
|
||||
- `parse_diff_header` (`src/diff_viewer.py`)
|
||||
- `format_diff_for_display` (`src/diff_viewer.py`)
|
||||
- `render_diff_text_immediate` (`src/diff_viewer.py`)
|
||||
- `create_backup` / `restore_from_backup` / `cleanup_backup` (`src/diff_viewer.py`)
|
||||
- `apply_faux_acrylic_glass` (`src/shaders.py`)
|
||||
- `ShaderManager` (`src/shader_manager.py`)
|
||||
|
||||
### 3.3 Infrastructure & Cache
|
||||
- `resolve_project_editor_override` (`src/external_editor.py`)
|
||||
- `content_block_type` (`src/file_cache.py`)
|
||||
- `evict` / `list_cached` (`src/file_cache.py`)
|
||||
- `get_git_log` (`src/project_manager.py`)
|
||||
|
||||
## 4. Next Steps: Heavy Curation
|
||||
1. **Surgical Deletion**: Remove identified unused symbols and duplicate classes.
|
||||
2. **Module Culling**: Delete `theme.py` and `native_orchestrator.py`.
|
||||
3. **Consolidation**: Refactor `aggregate.py` to use a single param-driven context builder instead of tier-specific ones.
|
||||
@@ -1,10 +1,10 @@
|
||||
# Implementation Plan: Source-Wide Redundancy Audit (source_wide_redundancy_audit_20260507)
|
||||
|
||||
## Phase 1: Automated Scans
|
||||
- [ ] Task: Run automated "Unused Code" scripts (if any) or use `py_find_usages` on every public symbol.
|
||||
- [ ] Task: Compare functionally similar files (e.g., `aggregate.py` and `summarize.py` helpers).
|
||||
- [x] Task: Run automated "Unused Code" scripts (if any) or use `py_find_usages` on every public symbol.
|
||||
- [x] Task: Compare functionally similar files (e.g., `aggregate.py` and `summarize.py` helpers).
|
||||
|
||||
## Phase 2: Manual Review & Culling List
|
||||
- [ ] Task: Review `models.py` against all consumer imports to find unused fields.
|
||||
- [ ] Task: Finalize the "Culling Candidate" report.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Final Review' (Protocol in workflow.md)
|
||||
- [x] Task: Review `models.py` against all consumer imports to find unused fields.
|
||||
- [x] Task: Finalize the "Culling Candidate" report.
|
||||
- [x] Task: Conductor - User Manual Verification 'Final Review' (Protocol in workflow.md)
|
||||
|
||||
Reference in New Issue
Block a user