2.1 KiB
2.1 KiB
Specification: GUI 2.py Cleanup & Structural Awareness
Overview
This track focuses on studying recent manual cleanups performed on src/gui_2.py to derive best practices for maintaining the Python codebase. It aims to document these extracted conventions, apply them to remaining nitpicks, and significantly enhance the MCP tools' structural awareness of annotations and Python/ImGui conventions.
Functional Requirements
- Study & Documentation:
- Study the recent changes made to
gui_2.pyto identify conventions regarding type hints, state organization, and ImGui rendering patterns. - Update
conductor/product-guidelines.mdwith high-level maintenance strategies derived from the study. - Update
conductor/code_styleguides/python.mdwith explicit coding conventions discovered (e.g., annotation formatting, class layout).
- Study the recent changes made to
gui_2.pyCleanup (Nitpicks):- Apply the formalized conventions to any remaining unorganized sections of
gui_2.py(e.g., finishing__init__refactoring or scattered state).
- Apply the formalized conventions to any remaining unorganized sections of
- MCP Tools Enhancements:
- Enhance AST parsing logic (e.g., in Python outline/skeleton extraction) to properly parse and expose type annotations.
- Modify structural tools to recognize common ImGui/Dear PyGui patterns for better structural awareness and token efficiency.
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 files with AI.
Acceptance Criteria
- Both
conductor/product-guidelines.mdandconductor/code_styleguides/python.mdare updated with the newly derived insights. gui_2.pyis successfully refactored according to the formalized conventions.- MCP tools 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
AppControlleror DAG Engine logic. - Rewriting
gui_2.pyin a different UI framework.