chore(conductor): Add new track 'I started to do a large cleanup to gui_2.py...'

This commit is contained in:
2026-05-13 16:14:05 -04:00
parent ae063c77ed
commit 5ac7688e6c
5 changed files with 77 additions and 1 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
# Project Tracks # Project Tracks
This file tracks all major tracks for the project. Each track has its own detailed plan in its respective folder. This file tracks all major tracks for the project. Each track has its own detailed plan in its respective folder.
@@ -253,3 +253,6 @@ This file tracks all major tracks for the project. Each track has its own detail
- [x] **Track: Robust Live Simulation Verification** - [x] **Track: Robust Live Simulation Verification**
--- ---
- [ ] **Track: I started to do a large cleanup to ./src/gui_2.py. I want you to study it and derive more information on how to maintain and write code for the python codebase. Please update product guidlines or the python code_styleguidleines based on what you discover. Also we may need to make some changes the mcp_tools for better structural awareness of annotations or other conventions with these python files. There is still more orgnaizatoin to be done like annotation/organizing the __init__ method's declarations, among other nitpicks.**
*Link: [./tracks/gui_2_cleanup_20260513/](./tracks/gui_2_cleanup_20260513/)*
@@ -0,0 +1,5 @@
# Track gui_2_cleanup_20260513 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
@@ -0,0 +1,8 @@
{
"track_id": "gui_2_cleanup_20260513",
"type": "chore",
"status": "new",
"created_at": "2026-05-13T00:00:00Z",
"updated_at": "2026-05-13T00:00:00Z",
"description": "I started to do a large cleanup to ./src/gui_2.py. I want you to study it and derive more information on how to maintain and write code for the python codebase. Please update product guidlines or the python code_styleguidleines based on what you discover. Also we may need to make some changes the mcp_tools for better structural awareness of annotations or other conventions with these python files. There is still more orgnaizatoin to be done like annotation/organizing the __init__ method's declarations, among other nitpicks."
}
@@ -0,0 +1,26 @@
# Implementation Plan: GUI 2.py Cleanup & Structural Awareness
## Phase 1: `gui_2.py` Structural Analysis & Init Cleanup
- [ ] Task: Audit `gui_2.py` state variables and `__init__` declarations to identify redundancies or disorganization.
- [ ] Task: Refactor `gui_2.py`'s `__init__` method to group related state variables and improve clarity.
- [ ] Task: Verify GUI initialization functionality and ensure no regressions using manual/test hooks.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: `gui_2.py` Structural Analysis & Init Cleanup' (Protocol in workflow.md)
## Phase 2: Type Hints & Layout Refactoring in `gui_2.py`
- [ ] Task: Inject and validate Python type hints across `gui_2.py` methods and properties.
- [ ] Task: Refactor complex layout and rendering logic blocks within `gui_2.py` for better readability.
- [ ] Task: Run automated test suite to ensure structural changes haven't broken the rendering pipeline.
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Type Hints & Layout Refactoring in `gui_2.py`' (Protocol in workflow.md)
## Phase 3: MCP Tool Enhancements
- [ ] Task: Investigate existing MCP tools (e.g., `py_get_skeleton`, `py_get_code_outline`) for AST parsing logic.
- [ ] Task: Enhance AST parsing logic to better extract type annotations from Python source files.
- [ ] Task: Modify structural extraction tools to recognize and highlight common ImGui/Dear PyGui patterns.
- [ ] Task: Write/update tests for MCP tools to verify accurate annotation and pattern parsing.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: MCP Tool Enhancements' (Protocol in workflow.md)
## Phase 4: Documentation & Guidelines Update
- [ ] Task: Synthesize learnings from Phase 1 & 2 to define best practices for Python maintenance in this codebase.
- [ ] Task: Update `conductor/product-guidelines.md` with high-level structural and maintenance strategies.
- [ ] Task: Update `conductor/code_styleguides/python.md` with explicit coding conventions (e.g., 1-space indentation, ImGui patterns) derived from the cleanup.
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Documentation & Guidelines Update' (Protocol in workflow.md)
@@ -0,0 +1,34 @@
# Specification: GUI 2.py Cleanup & Structural Awareness
## Overview
This track focuses on a comprehensive cleanup of `src/gui_2.py`, deriving best practices for maintaining the Python codebase, and updating the relevant guidelines. It also includes enhancing the MCP tools to better understand Python structural conventions such as annotations.
## Functional Requirements
1. **`gui_2.py` Cleanup**:
- Reorganize the `__init__` method and object state.
- Improve type hints and annotations throughout the file.
- Refactor layout and rendering logic for better readability.
- Improve general code structure and maintainability.
2. **Guidelines Update**:
- Analyze the cleanup process to derive best practices.
- Update `conductor/product-guidelines.md` with high-level maintenance strategies.
- Update `conductor/code_styleguides/python.md` with specific coding conventions discovered during the cleanup.
3. **MCP Tools Enhancements**:
- Improve parsing of Python type annotations.
- Enhance the extraction of class and method outlines.
- Add support for recognizing specific ImGui/Dear PyGui patterns to improve structural awareness.
## Non-Functional Requirements
- Ensure changes do not break existing functionality or introduce regressions.
- Maintain the "1-space indentation" rule as strictly defined in the Python code styleguide.
- All refactoring should aim to reduce token consumption when analyzing the file with AI.
## Acceptance Criteria
- `gui_2.py` is successfully refactored, specifically focusing on `__init__` declarations and type hints.
- Both `conductor/product-guidelines.md` and `conductor/code_styleguides/python.md` are updated with the newly derived insights.
- MCP tools (e.g., `py_get_skeleton`, `py_get_code_outline`) exhibit improved awareness of annotations and GUI patterns.
- Automated tests pass and manual GUI verification confirms no regressions.
## Out of Scope
- Major architectural changes to the underlying `AppController` or DAG Engine logic.
- Rewriting `gui_2.py` in a different UI framework.