checkpoint: massive refactor

This commit is contained in:
2026-02-28 09:06:45 -05:00
parent f2512c30e9
commit d36632c21a
149 changed files with 16255 additions and 17722 deletions

View File

@@ -6,14 +6,18 @@
- [x] Task: Conductor - User Manual Verification 'Phase 1: Pilot and Tooling' (Protocol in workflow.md) [checkpoint: Phase1]
## Phase 2: Core Refactor - Indentation and Newlines
- [~] Task: Conductor - Refactor Primary Engine Modules (`ai_client.py`, `aggregate.py`, `mcp_client.py`, `shell_runner.py`).
- [ ] Task: Conductor - Refactor Project & Session Management Modules (`project_manager.py`, `session_logger.py`).
- [ ] Task: Conductor - Refactor UI Modules (`gui_2.py`, `gui_legacy.py`, `theme.py`, `theme_2.py`).
- [ ] Task: Conductor - Refactor Remaining Utility and Support Modules (`events.py`, `file_cache.py`, `models.py`, `mma_prompts.py`).
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Indentation and Newline Refactor' (Protocol in workflow.md)
- [x] Task: Conductor - Refactor Primary Engine Modules (`ai_client.py`, `aggregate.py`, `mcp_client.py`, `shell_runner.py`). [db65162]
- [x] Task: Conductor - Refactor Project & Session Management Modules (`project_manager.py`, `session_logger.py`). [db65162]
- [x] Task: Conductor - Refactor UI Modules (`gui_2.py`, `gui_legacy.py`, `theme.py`, `theme_2.py`). [db65162]
- [x] Task: Conductor - Refactor Remaining Utility and Support Modules (`events.py`, `file_cache.py`, `models.py`, `mma_prompts.py`). [db65162]
- [x] Task: Conductor - User Manual Verification 'Phase 2: Indentation and Newline Refactor' (Protocol in workflow.md) [checkpoint: Phase2]
## Phase 3: AI-Optimized Metadata and Final Cleanup
- [ ] Task: Conductor - Implement Strict Type Hinting and Compact Imports across the Entire Codebase.
- [~] Task: Conductor - Implement Strict Type Hinting across the Entire Codebase.
- [x] Engine Core (`ai_client.py`, `mcp_client.py`, `aggregate.py`, `shell_runner.py`)
- [x] Develop/Integrate Surgical AST Tools in `mcp_client.py` and `tools.json`.
- [x] Management Modules (project_manager.py, session_logger.py) [19c28a1]
- [~] UI Modules (`gui_2.py`, `gui_legacy.py`)
- [ ] Task: Conductor - Update `conductor/code_styleguides/python.md` with the new AI-optimized standard.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Metadata and Final Documentation' (Protocol in workflow.md)

View File

@@ -8,7 +8,6 @@ Refactor the Python codebase to a "Single-Space, Ultra-Compact" style specifical
- **Newlines (Ultra-Compact):**
- Maximum **one (1)** blank line between top-level definitions (classes, functions).
- **Zero (0)** blank lines inside function or method bodies.
- **Imports (Compact):** Consolidate imports into compact blocks to reduce vertical space.
- **Typing (Strict):** Ensure all function and method signatures include strict type hints for `Args` and `Returns`.
- **Scope:**
- Target: All `.py` files in the project root and subdirectories.
@@ -19,14 +18,22 @@ Refactor the Python codebase to a "Single-Space, Ultra-Compact" style specifical
- **AST Compatibility:** The style must not interfere with existing AST tools (`ast`, `tree-sitter`) used for interface extraction and code outlines.
- **Token Efficiency:** The primary goal is to reduce the total token count of the codebase.
## 4. Acceptance Criteria
- [ ] Codebase indentation is uniformly 1 space.
- [ ] No `.py` file contains consecutive blank lines.
- [ ] No `.py` file contains blank lines within function or method bodies.
- [ ] All functions/methods have complete type hints.
- [ ] Application remains functional and passes existing tests.
## 4. Current Status (Progress Checkpoint)
- **Phase 1: Completed.** Tooling developed (`scripts/ai_style_formatter.py`) and verified.
- **Phase 2: Completed.** Global codebase refactor for indentation and ultra-compact newlines (including 1-line gap before definitions) applied to all Python files.
- **Phase 3: In Progress.**
- **Surgical Tooling:** New tools added to `mcp_client.py` and `.gemini/tools.json`: `get_file_slice`, `set_file_slice`, `py_update_definition`, `py_get_signature`, `py_set_signature`, `py_get_class_summary`, `py_get_var_declaration`, `py_set_var_declaration`.
- **Core Typing:** `ai_client.py`, `mcp_client.py`, `aggregate.py`, `shell_runner.py` fully updated with strict type hints.
- **Remaining:** `project_manager.py`, `session_logger.py`, `gui_2.py`, `gui_legacy.py` need strict typing.
## 5. Out of Scope
## 5. Acceptance Criteria
- [x] Codebase indentation is uniformly 1 space.
- [x] No `.py` file contains consecutive blank lines.
- [x] No `.py` file contains blank lines within function or method bodies.
- [~] All functions/methods have complete type hints (Core Engine complete, UI/Manager pending).
- [x] Application remains functional and passes existing tests.
## 6. Out of Scope
- Architectural changes or logic refactoring.
- Modification of non-Python files (e.g., `.md`, `.toml`, `.ps1`).
- Breaking PEP 8 compliance where it's not strictly necessary for token reduction (though indentation and blank lines are explicitly targeted).
- Import compaction (discarded per user request).