From 51b79d1ee2da0e3d87d791c16a774f51b481684e Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 7 Mar 2026 11:54:46 -0500 Subject: [PATCH] chore(conductor): Mark track 'Manual Skeleton Context Injection' as complete --- conductor/tracks.md | 2 +- .../plan.md | 129 ++---------------- 2 files changed, 12 insertions(+), 119 deletions(-) diff --git a/conductor/tracks.md b/conductor/tracks.md index d8c1b45..a76058a 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -56,7 +56,7 @@ This file tracks all major tracks for the project. Each track has its own detail 11. [x] **Track: Track Progress Visualization** *Link: [./tracks/track_progress_viz_20260306/](./tracks/track_progress_viz_20260306/)* -12. [~] **Track: Manual Skeleton Context Injection** +12. [x] **Track: Manual Skeleton Context Injection** *Link: [./tracks/manual_skeleton_injection_20260306/](./tracks/manual_skeleton_injection_20260306/)* 13. [ ] **Track: On-Demand Definition Lookup** diff --git a/conductor/tracks/manual_skeleton_injection_20260306/plan.md b/conductor/tracks/manual_skeleton_injection_20260306/plan.md index 9a2ed01..1561526 100644 --- a/conductor/tracks/manual_skeleton_injection_20260306/plan.md +++ b/conductor/tracks/manual_skeleton_injection_20260306/plan.md @@ -5,137 +5,30 @@ ## Phase 1: UI Foundation Focus: Add file injection button and state -- [x] Task 1.1: Initialize MMA Environment - - Run `activate_skill mma-orchestrator` before starting - -- [~] Task 1.2: Add injection state variables - - WHERE: `src/gui_2.py` `App.__init__` - - WHAT: State for injection UI - - HOW: - ```python - self._inject_file_path: str = "" - self._inject_mode: str = "skeleton" # "skeleton" | "full" - self._inject_preview: str = "" - self._show_inject_modal: bool = False - ``` - - CODE STYLE: 1-space indentation - -- [ ] Task 1.3: Add inject button to discussion panel - - WHERE: `src/gui_2.py` discussion panel - - WHAT: Button to open injection modal - - HOW: - ```python - if imgui.button("Inject File"): - self._show_inject_modal = True - ``` +- [x] Task 1.1: Initialize MMA Environment (fbe02eb) +- [x] Task 1.2: Add injection state variables (fbe02eb) +- [x] Task 1.3: Add inject button to discussion panel (fbe02eb) ## Phase 2: File Selection Focus: File picker and path validation -- [ ] Task 2.1: Create file selection modal - - WHERE: `src/gui_2.py` - - WHAT: Modal for selecting project file - - HOW: - ```python - if self._show_inject_modal: - imgui.open_popup("Inject File") - if imgui.begin_popup_modal("Inject File"): - # File list from project files - for file_path in self.project.get("files", {}).get("paths", []): - if imgui.selectable(file_path, self._inject_file_path == file_path): - self._inject_file_path = file_path - self._update_inject_preview() - imgui.end_popup() - ``` - -- [ ] Task 2.2: Validate selected path - - WHERE: `src/gui_2.py` - - WHAT: Ensure path is within project - - HOW: Check against `files.base_dir` +- [x] Task 2.1: Create file selection modal (fbe02eb) +- [x] Task 2.2: Validate selected path (fbe02eb) ## Phase 3: Preview Generation Focus: Generate and display skeleton/full preview -- [ ] Task 3.1: Implement preview update function - - WHERE: `src/gui_2.py` - - WHAT: Generate preview based on mode - - HOW: - ```python - def _update_inject_preview(self) -> None: - if not self._inject_file_path: - self._inject_preview = "" - return - base_dir = self.project.get("files", {}).get("base_dir", ".") - full_path = Path(base_dir) / self._inject_file_path - try: - content = full_path.read_text(encoding="utf-8") - if self._inject_mode == "skeleton": - parser = ASTParser("python") - self._inject_preview = parser.get_skeleton(content) - else: - self._inject_preview = content - # Truncate to 500 lines - lines = self._inject_preview.split("\n")[:500] - self._inject_preview = "\n".join(lines) - if len(lines) >= 500: - self._inject_preview += "\n... (truncated)" - except Exception as e: - self._inject_preview = f"Error reading file: {e}" - ``` - -- [ ] Task 3.2: Add mode toggle - - WHERE: `src/gui_2.py` inject modal - - WHAT: Radio buttons for skeleton/full - - HOW: - ```python - if imgui.radio_button("Skeleton", self._inject_mode == "skeleton"): - self._inject_mode = "skeleton" - self._update_inject_preview() - imgui.same_line() - if imgui.radio_button("Full File", self._inject_mode == "full"): - self._inject_mode = "full" - self._update_inject_preview() - ``` - -- [ ] Task 3.3: Display preview - - WHERE: `src/gui_2.py` inject modal - - WHAT: Scrollable preview area - - HOW: - ```python - imgui.begin_child("preview", height=300) - imgui.text_wrapped(self._inject_preview) - imgui.end_child() - ``` +- [x] Task 3.1: Implement preview update function (fbe02eb) +- [x] Task 3.2: Add mode toggle (fbe02eb) +- [x] Task 3.3: Display preview (fbe02eb) ## Phase 4: Inject Action Focus: Append to discussion input -- [ ] Task 4.1: Implement inject button - - WHERE: `src/gui_2.py` inject modal - - WHAT: Button to inject content - - HOW: - ```python - if imgui.button("Inject"): - formatted = f"\n## File: {self._inject_file_path}\n```python\n{self._inject_preview}\n```\n" - self.ui_input_text += formatted - self._show_inject_modal = False - imgui.close_current_popup() - imgui.same_line() - if imgui.button("Cancel"): - self._show_inject_modal = False - imgui.close_current_popup() - ``` +- [x] Task 4.1: Implement inject button (fbe02eb) ## Phase 5: Testing Focus: Verify all functionality -- [ ] Task 5.1: Write unit tests - - WHERE: `tests/test_skeleton_injection.py` (new file) - - WHAT: Test preview generation, truncation - - HOW: Create test files, verify skeleton output - -- [ ] Task 5.2: Conductor - Phase Verification - - Run: `uv run pytest tests/test_skeleton_injection.py -v` - - Manual: Verify inject modal works in GUI - # Footer - imgui.end_table() +- [x] Task 5.1: Write unit tests (fbe02eb) +- [x] Task 5.2: Conductor - Phase Verification (fbe02eb)