Private
Public Access
conductor(archive): move 39 completed tracks (2026-05 to 2026-06) to archive/
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
# AI Loop: Optimization & Consolidation Targets
|
||||
|
||||
Based on the technical trace and sequence mapping of the AI interaction loop, the following areas are identified as primary targets for "Heavy Curation".
|
||||
|
||||
### 1. Unified Provider Loop (`ai_client.py`)
|
||||
- **Observation:** `_send_anthropic`, `_send_gemini`, and `_send_gemini_cli` all implement their own `for r_idx in range(MAX_TOOL_ROUNDS + 2)` loops.
|
||||
- **Problem:** Significant boilerplate duplication for tool execution, error handling, and file re-reading.
|
||||
- **Curation Goal:** Refactor the multi-turn recursion into a single `_base_send_loop` method that takes a provider-specific `generate_turn` callback.
|
||||
|
||||
### 2. Threading Model Management (`app_controller.py`)
|
||||
- **Observation:** `_process_event_queue` spawns a new `threading.Thread` for every `user_request`.
|
||||
- **Problem:** Potential for thread explosion if multiple asynchronous requests are triggered rapidly (though rare in typical usage).
|
||||
- **Curation Goal:** Consolidate into a single dedicated "AI Worker" thread with a task queue, or use a small `ThreadPoolExecutor` to manage background lifetimes.
|
||||
|
||||
### 3. Redundant Context Markers
|
||||
- **Observation:** `_FILE_REFRESH_MARKER` and `_get_context_marker()` are used in multiple places to inject diffs.
|
||||
- **Problem:** String duplication and fragmented logic for deciding when to "refresh" the AI's file context.
|
||||
- **Curation Goal:** Centralize the context-refresh injection logic within the `aggregate` module or a dedicated `ContextRefresher` class.
|
||||
|
||||
### 4. Blocking Call Audit
|
||||
- **Observation:** `asyncio.run_coroutine_threadsafe(...).result()` is used to call async tool logic from the sync worker thread.
|
||||
- **Problem:** This bridge is technically correct but adds complexity.
|
||||
- **Curation Goal:** If possible, move more of the AI loop logic into a proper `async` context to avoid the `.result()` blocking pattern.
|
||||
@@ -1,86 +0,0 @@
|
||||
# AI Interaction Pipeline: Intensive Technical Trace
|
||||
|
||||
This document provides a low-level technical trace of the AI interaction loop, following a pipeline-oriented architectural model. It identifies thread context switches, data transformation overhead, and synchronization bottlenecks.
|
||||
|
||||
## 1. Sequence Diagram: Asynchronous Interaction Pipeline
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
autonumber
|
||||
participant UI as gui_2.py (Main/Render Thread)
|
||||
participant EV as app_controller.py (Event Dispatcher)
|
||||
participant WK as ai_client.py (Worker Thread Pool)
|
||||
participant AI as ai_client.py (Provider Pipeline)
|
||||
participant MCP as mcp_client.py (FileSystem Pipeline)
|
||||
participant SR as shell_runner.py (Subprocess Pipeline)
|
||||
|
||||
Note over UI, WK: [Phase A: Request Initiation]
|
||||
UI->>EV: SyncEventQueue.put("user_request", dict)
|
||||
Note right of UI: Data: Raw Prompt + Context Pointers
|
||||
EV->>EV: polling loop (event_queue.get())
|
||||
EV->>WK: threading.Thread(target=_handle_request_event).start()
|
||||
Note right of EV: Context Switch: Event Thread -> AI Worker Thread
|
||||
|
||||
Note over WK, AI: [Phase B: Context Synthesis & Generation]
|
||||
WK->>AI: ai_client.send(md_content, history)
|
||||
AI->>AI: _build_chunked_context_blocks()
|
||||
Note right of AI: Perf: O(N) string concatenation + regex scans
|
||||
AI->>Vendor: Provider API Request (HTTPS/JSON)
|
||||
Note right of AI: Bottleneck: Network Latency (1-30s)
|
||||
Vendor-->>AI: ToolCall(s) or StopReason
|
||||
|
||||
Note over AI, SR: [Phase C: Multi-Turn Tool Execution Loop]
|
||||
loop MAX_TOOL_ROUNDS (r_idx <= 10)
|
||||
alt Tool Use Detected
|
||||
AI->>WK: _execute_tool_calls_concurrently()
|
||||
|
||||
alt Read-Only (MCP)
|
||||
WK->>MCP: read_file / list_dir / search
|
||||
MCP-->>WK: stdout_string
|
||||
else Mutating (Shell)
|
||||
WK->>EV: _pending_gui_tasks.append(approval_modal)
|
||||
Note over UI: UI Polling Detects Task
|
||||
UI->>UI: Render ImGui Popup (Wait for HITL)
|
||||
Note over UI: User Approval Interaction
|
||||
UI-->>WK: threading.Condition.notify()
|
||||
Note right of WK: Resume AI Worker Thread
|
||||
WK->>SR: run_powershell(script)
|
||||
SR->>OS: Subprocess Spawn (powershell.exe)
|
||||
OS-->>SR: stdout/stderr (JSON-L Stream)
|
||||
SR-->>WK: COMBINED_OUTPUT_STRING
|
||||
end
|
||||
|
||||
WK-->>AI: Aggregate Tool Results
|
||||
AI->>AI: _reread_file_items() (Context Refresh)
|
||||
Note right of AI: Perf: IO Bound (File MTime Scans)
|
||||
AI->>Vendor: Follow-up Prompt (with Tool Result)
|
||||
else Terminal Text
|
||||
AI-->>WK: Final AI Response Text
|
||||
end
|
||||
end
|
||||
|
||||
Note over WK, UI: [Phase D: Result Synchronization]
|
||||
WK->>EV: SyncEventQueue.put("response", result)
|
||||
EV->>EV: _pending_gui_tasks.append(response_obj)
|
||||
loop Every Frame (~16.6ms)
|
||||
UI->>EV: _process_pending_gui_tasks()
|
||||
Note right of UI: Data Copy: Controller State -> UI History Buffer
|
||||
UI->>UI: Update Rendering State (Markdown/Syntax Highlight)
|
||||
end
|
||||
```
|
||||
|
||||
## 2. Technical Performance Audit
|
||||
|
||||
### 2.1 Threading & Synchronization
|
||||
- **Context Switches:** The pipeline traverses four distinct execution contexts: Main Thread -> Event Thread -> Daemon Worker -> Subprocess.
|
||||
- **Lock Contention:** `_pending_gui_tasks_lock` is acquired twice per AI response turn (once by background thread to append, once by UI thread to process).
|
||||
- **Blocking Sites:** `ai_client.send` blocks the dedicated `WK` thread. `_confirm_and_run` blocks the `WK` thread using a `Condition` variable waiting on UI input.
|
||||
|
||||
### 2.2 Data Transformation Costs
|
||||
- **Context Bloat:** `md_content` is a monolithic string. During synthesis, this string is often copied or chunked (`_chunk_text`), increasing memory pressure on the Python heap.
|
||||
- **Serialization Overhead:** Every tool call involves: Python dict -> JSON String -> Subprocess Stdin -> (Tools) -> Subprocess Stdout -> JSON String -> Python dict.
|
||||
|
||||
### 2.3 Curation Targets (Intensive)
|
||||
1. **Reduce Memory Copies:** The monolithic Markdown context should be handled as a stream or a shared buffer to avoid redundant copies between `aggregate` and `ai_client`.
|
||||
2. **Deterministic Status Polling:** Replace string-based status polling (`ai_status`) with an enum-based state machine to reduce regex comparisons in the simulator and UI.
|
||||
3. **Subprocess Pooling:** `shell_runner` spawns a new process for every script. For high-frequency tool use, a persistent PowerShell session could reduce overhead.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track ai_interaction_call_graph_20260507 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "ai_interaction_call_graph_20260507",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"created_at": "2026-05-07T16:00:00Z",
|
||||
"updated_at": "2026-05-07T16:00:00Z",
|
||||
"description": "Exhaustive function-to-function call graph tracing the AI loop from request to terminal execution."
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# Implementation Plan: AI Interaction Call Graph (ai_interaction_call_graph_20260507)
|
||||
|
||||
## Phase 1: Trace Mapping
|
||||
- [x] Task: Use `py_find_usages` to trace `ai_client.send` callers and callees.
|
||||
- [x] Task: Map the asynchronous hand-off from `AppController` to the AI worker threads.
|
||||
- [x] Task: Trace the recursion depth of the tool-call loop (`MAX_TOOL_ROUNDS`).
|
||||
|
||||
## Phase 2: Documentation & Synthesis
|
||||
- [x] Task: Create a high-fidelity Mermaid sequence diagram of the entire loop.
|
||||
- [x] Task: Identify specific areas for logic consolidation or performance optimization.
|
||||
|
||||
## Phase 3: Automated Path Derivation Tooling
|
||||
- [x] Task: Develop `derive_code_path` MCP tool using tree-sitter.
|
||||
- [~] Task: Implement cross-file call-chain tracing and data hand-off detection.
|
||||
- [ ] Task: Verify tool output against the manual AI Loop trace.
|
||||
|
||||
## Phase 4: Comprehensive Pipeline Mapping
|
||||
- [x] Task: Map the **Context Aggregation Pipeline** using the new tool.
|
||||
- [x] Task: Map the **GUI Event & State Synchronization** pipeline.
|
||||
- [x] Task: Map the **Simulation Lifecycle** and turn-loop.
|
||||
- [x] Task: Consolidate all intensive traces into a final Phase 5 Architectural Audit.
|
||||
- [x] Task: Conductor - User Manual Verification 'Final Audit' (Protocol in workflow.md)
|
||||
@@ -1,22 +0,0 @@
|
||||
# Specification: AI Interaction Call Graph (ai_interaction_call_graph_20260507)
|
||||
|
||||
## Overview
|
||||
A low-level technical trace of the AI interaction loop. The goal is to map every single function call and data hand-off from the moment a user message is sent to the final terminal execution of a PowerShell script or tool result.
|
||||
|
||||
## Scope
|
||||
- **Entry Point:** `src/gui_2.py:App._render_discussion_panel` (Send button action).
|
||||
- **Subsystems:** `ai_client.py`, `mcp_client.py`, `shell_runner.py`, `app_controller.py`.
|
||||
|
||||
## Functional Requirements
|
||||
1. **Call Graph Generation:**
|
||||
- Document the sequence of synchronous and asynchronous calls.
|
||||
- Identify thread boundaries (GUI thread vs. Background worker thread).
|
||||
2. **Data Transformation Trace:**
|
||||
- Track the transformation of a message: raw text -> GenerateRequest -> AI History -> Provider Prompt -> AI Response -> Tool Call -> PS Script.
|
||||
3. **Error & Retry Paths:**
|
||||
- Map how exceptions are caught, classified, and bubbled back to the UI.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Detailed call graph in Mermaid format.
|
||||
- [ ] List of all internal private methods involved in the loop.
|
||||
- [ ] Identification of any blocking calls in the async pipeline.
|
||||
@@ -1,64 +0,0 @@
|
||||
# AppController Extraction List
|
||||
|
||||
## 1. Move to `src/models.py`
|
||||
- `GenerateRequest` (BaseModel)
|
||||
- `ConfirmRequest` (BaseModel)
|
||||
|
||||
## 2. Extraction to Module Level (Functions taking `controller: AppController`)
|
||||
|
||||
### From `create_api`
|
||||
- `get_api_key`
|
||||
- `health`
|
||||
- `get_gui_state`
|
||||
- `get_mma_status`
|
||||
- `post_gui`
|
||||
- `get_api_session`
|
||||
- `post_api_session`
|
||||
- `get_api_project`
|
||||
- `get_performance`
|
||||
- `get_diagnostics`
|
||||
- `status`
|
||||
- `generate`
|
||||
- `stream`
|
||||
- `pending_actions`
|
||||
- `confirm_action`
|
||||
- `list_sessions`
|
||||
- `get_session`
|
||||
- `delete_session`
|
||||
- `get_context`
|
||||
- `token_stats`
|
||||
|
||||
### From `_process_pending_gui_tasks` (Handlers)
|
||||
- `_handle_refresh_api_metrics`
|
||||
- `_handle_set_ai_status`
|
||||
- `_handle_set_mma_status`
|
||||
- `_handle_ai_response`
|
||||
- `_handle_mma_state_update`
|
||||
- `_handle_set_value`
|
||||
- `_handle_click`
|
||||
- `_handle_drag`
|
||||
- `_handle_right_click`
|
||||
- `_handle_select_list_item`
|
||||
- `_handle_ask_dialog`
|
||||
- `_handle_custom_callback`
|
||||
- `_handle_mma_step_approval`
|
||||
- `_handle_mma_spawn_approval`
|
||||
- `_handle_ticket_started`
|
||||
- `_handle_ticket_completed`
|
||||
- `_handle_bead_updated`
|
||||
|
||||
### From `cb_load_prior_log`
|
||||
- `_resolve_log_ref`
|
||||
|
||||
## 3. Extraction to Module Level (Independent Utilities)
|
||||
- `parse_symbols` (Already module level)
|
||||
- `get_symbol_definition` (Already module level)
|
||||
- `_extract_tool_name`
|
||||
- `_offload_entry_payload`
|
||||
|
||||
## 4. Classes to Top-Level
|
||||
- `ConfirmDialog`
|
||||
- `MMAApprovalDialog`
|
||||
- `MMASpawnApprovalDialog`
|
||||
- `AutoStepDialog` (From `_process_pending_gui_tasks`)
|
||||
- `AutoSpawnDialog` (From `_process_pending_gui_tasks`)
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"track_id": "app_controller_curation_20260513",
|
||||
"title": "AppController Curation & Structural Alignment",
|
||||
"status": "in_progress",
|
||||
"initialized": "2026-05-13",
|
||||
"goal": "Curate src/app_controller.py to match gui_2.py organization and enforce Python style conventions."
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
# Implementation Plan: AppController Curation [checkpoint: fa4388b]
|
||||
|
||||
## Phase 1: Structural Audit & Conventions Update [checkpoint: 511aabb]
|
||||
- [x] Task: Audit `src/app_controller.py` against `gui_2.py` organization and the Python Style Guide. [511aabb]
|
||||
- [x] Task: Identify methods for extraction to module level (Anti-OOP enforcement). [511aabb]
|
||||
- [x] Task: Update `conductor/code_styleguides/python.md` or `product-guidelines.md` if any new nuances are discovered in `gui_2.py`. [511aabb]
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: Structural Audit' (Protocol in workflow.md) [511aabb]
|
||||
|
||||
## Phase 2: Refactoring & Curation [checkpoint: fa4388b]
|
||||
- [x] Task: Apply 1-space indentation and remove excessive blank lines in `src/app_controller.py`. [fa4388b]
|
||||
- [x] Task: Clean up and organize `AppController.__init__` state declarations. [fa4388b]
|
||||
- [x] Task: Implement missing type hints and SDM tags. [fa4388b]
|
||||
- [x] Task: Extract identified logic to module-level functions. [fa4388b]
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 2: Refactoring & Curation' (Protocol in workflow.md) [fa4388b]
|
||||
|
||||
## Phase 3: Validation & Regression Testing [checkpoint: fa4388b]
|
||||
- [x] Task: Run the full test suite in batches of 4 files per test run. [fa4388b]
|
||||
- [x] Task: Fix any regressions or type errors discovered during testing. [fa4388b]
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Validation & Regression Testing' (Protocol in workflow.md) [fa4388b]
|
||||
@@ -1,21 +0,0 @@
|
||||
# Specification: AppController Curation & Structural Alignment
|
||||
|
||||
## Context
|
||||
Following the successful cleanup and refactoring of `gui_2.py`, the same organizational patterns and AI-optimized coding conventions must be applied to `src/app_controller.py`. This module is a critical part of the Manual Slop architecture, acting as the bridge between the GUI and the underlying AI/MCP systems.
|
||||
|
||||
## Goals
|
||||
1. **Structural Parity:** Reorganize `src/app_controller.py` to match the structure and quality of `gui_2.py`.
|
||||
2. **Standardization:** Enforce the AI-Optimized Python Style Guide (1-space indent, minimal blank lines, type hints, SDM tags).
|
||||
3. **Refactoring:** Identify and extract logic that violates the 5-level nesting limit or is better suited as module-level functions.
|
||||
4. **Validation:** Ensure full system integrity via the comprehensive test suite, run in batches of 4.
|
||||
|
||||
## Scope
|
||||
- `src/app_controller.py`: Primary target for refactoring and curation.
|
||||
- `conductor/code_styleguides/python.md`: Potential updates if new nuances are found.
|
||||
- `conductor/product-guidelines.md`: Potential updates based on structural findings.
|
||||
|
||||
## Constraints
|
||||
- **Indentation:** Must be exactly 1 space.
|
||||
- **Scoping:** Use `imscope` for any ImGui-related calls if present (though `app_controller` should ideally be logic-focused, some status rendering might exist).
|
||||
- **Anti-OOP:** Move state-independent methods to module level.
|
||||
- **Type Safety:** 100% type hint coverage for all modified sections.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track approve_modal_ux_20260601 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "approve_modal_ux_20260601",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "Fix Approve Modal sizing and inline full preview"
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
# Implementation Plan: Approve Modal UX Fixes
|
||||
|
||||
## Phase 1: Modal Layout Updates
|
||||
- [ ] Task: Make Modal Resizable
|
||||
- [ ] In `src/gui_2.py` (`render_approve_script_modal`), set `imgui.set_next_window_size(imgui.ImVec2(800, 600), imgui.Cond_.first_use_ever)`.
|
||||
- [ ] Change `imgui.WindowFlags_.always_auto_resize` to `0` in `imgui.begin_popup_modal`.
|
||||
- [ ] Task: Fix Full Preview and Input Height
|
||||
- [ ] Add `ui_approve_modal_preview = False` to `App.__init__`.
|
||||
- [ ] Replace `app.show_windows["Text Viewer"]` checkbox logic in `render_approve_script_modal` with `app.ui_approve_modal_preview`.
|
||||
- [ ] When `app.ui_approve_modal_preview` is True, render the script in a read-only child or using `markdown_helper`.
|
||||
- [ ] When False, set the `imgui.input_text_multiline` height to dynamically fill the remaining space (`imgui.ImVec2(-1, -40)` or similar).
|
||||
|
||||
## Phase 2: Verification
|
||||
- [ ] Task: Verification
|
||||
- [ ] Trigger a script approval and resize the modal.
|
||||
- [ ] Toggle "Show Full Preview" and ensure it renders within the modal safely.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Verification' (Protocol in workflow.md)
|
||||
@@ -1,16 +0,0 @@
|
||||
# Specification: Approve Modal UX Fixes
|
||||
|
||||
## 1. Overview
|
||||
The "Approve PowerShell Command" modal is currently too small and cannot be resized. Additionally, the "Show Full Preview" option triggers the external "Text Viewer" window, which cannot be interacted with because the modal blocks all background UI inputs.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Resizable Modal:** The modal must allow user resizing and should have a larger default minimum size.
|
||||
* **Inline Preview:** The "Show Full Preview" option must render the full script *inside* the modal itself (e.g., as a read-only scrollable child or markdown block), rather than triggering an external window.
|
||||
* **Responsive Input:** The script input text area should expand to fill the available vertical space of the modal, rather than being fixed to 200px.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* The modal must continue to reliably block the execution thread until the user approves or rejects the script.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* The modal can be resized by dragging the corners.
|
||||
* Clicking "Show Full Preview" toggles an inline preview without locking the UI.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Track fix_imgui_keys_down_20260601 Context
|
||||
# Track archive_completed_tracks_20260603 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "archive_completed_tracks_20260603",
|
||||
"title": "Archive Completed Tracks (2026-05 to 2026-06)",
|
||||
"phase": null,
|
||||
"created": "2026-06-03",
|
||||
"status": "in_progress",
|
||||
"spec_file": "spec.md",
|
||||
"plan_file": "plan.md",
|
||||
"depends_on": [],
|
||||
"completion_checkpoints": []
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Implementation Plan: Archive Completed Tracks (2026-05 to 2026-06)
|
||||
|
||||
## Phase 1: Directory Migration
|
||||
Focus: Move 39 completed track directories from `conductor/tracks/` to `conductor/archive/` using `git mv`.
|
||||
|
||||
- [x] Task 1.1: Pre-checkpoint - `git add .`
|
||||
- [x] Task 1.2: Create `conductor/tracks/archive_completed_tracks_20260603/` (metadata, plan, spec, index)
|
||||
- [x] Task 1.3: `git mv` 39 directories (atomic single shell call)
|
||||
- [x] Task 1.4: Verify directory count drops from 55 to 16 in `tracks/`
|
||||
- [x] Task 1.N: Atomic commit with git note
|
||||
|
||||
## Phase 2: Registry Consolidation
|
||||
Focus: Update `conductor/tracks.md` to consolidate the 14 "Earlier Archives" entries into a new "Recent Completed Tracks (2026-05+)" section with `archive/` link paths.
|
||||
|
||||
- [ ] Task 2.1: Add new section header to `tracks.md`
|
||||
- [ ] Task 2.2: Move 14 entries from "Earlier Archives" into the new section
|
||||
- [ ] Task 2.3: Update all `./tracks/<name>` to `./archive/<name>` in those 14 entries
|
||||
- [ ] Task 2.4: Verify all 14 new links resolve
|
||||
- [ ] Task 2.N: Atomic commit with git note
|
||||
|
||||
## Phase 3: Final Verification
|
||||
- [ ] Task 3.1: Directory count check (16 in tracks, 39 new in archive this run + ~115 existing = 154)
|
||||
- [ ] Task 3.2: Link integrity check across full `tracks.md`
|
||||
- [ ] Task 3.N: Checkpoint commit with audit summary
|
||||
@@ -0,0 +1,33 @@
|
||||
# Archive Completed Tracks (2026-05 to 2026-06)
|
||||
|
||||
Move 39 completed track directories from `conductor/tracks/` to `conductor/archive/` and update `conductor/tracks.md` to reflect the consolidated archive state. Mirrors the pattern established by `archive_phase_4_tracks_20260507`.
|
||||
|
||||
## Scope
|
||||
|
||||
**In scope (39 dirs to move):**
|
||||
|
||||
Phase 6 (12): `granular_ast_control_20260510`, `context_snapshotting_takes_20260510`, `interactive_text_slice_highlighting_20260510`, `context_batch_operations_ux_20260510`, `gencpp_project_init_20260510`, `interactive_ast_tree_masking_20260510`, `phase6_review_20260510`, `context_comp_decouple_20260510`, `context_comp_slices_20260510`, `gui_refactor_stabilization_20260512`, `gui_2_cleanup_20260513`, `python_structural_mcp_tools_20260513`.
|
||||
|
||||
Hot Reload (1): `hot_reload_python_20260516`.
|
||||
|
||||
Phase 5 (12): `ai_interaction_call_graph_20260507`, `controller_state_mutation_matrix_20260507`, `source_wide_redundancy_audit_20260507`, `curate_provider_registries_20260507`, `encapsulate_appcontroller_status_20260507`, `decouple_gui_log_loading_20260507`, `refactor_context_aggregation_pipeline_20260507`, `cull_unused_symbols_20260507`, `sdm_docstrings_20260509`, `app_controller_curation_20260513`, `fix_test_suite_failures_20260514`, `fix_indentation_1space_20260516`.
|
||||
|
||||
Earlier Archives (14): `gui_crash_fixes_20260531`, `fix_imgui_keys_down_20260601`, `selectable_thinking_monologs_20260601`, `minimax_history_fix_20260601`, `context_preservation_and_warnings_20260601`, `text_viewer_and_tool_call_fixes_20260601`, `context_composition_ux_20260601`, `structural_file_editor_20260601`, `discussion_metrics_and_compression_20260601`, `approve_modal_ux_20260601`, `phase7_stabilization_and_polishing_20260601`, `phase7_monolithic_stabilization_20260602`, `command_palette_and_performance_20260602`, `documentation_refresh_comprehensive_20260602`.
|
||||
|
||||
**Out of scope (remain in `tracks/`):**
|
||||
- `context_preview_fixes_20260516` `[~]` in progress
|
||||
- `gencpp_dogfood_feedback_20260510` `[ ]` pending
|
||||
- 8 backlog tracks `[ ]` (gencpp bindings, tree-sitter lua, gdscript, c#, openai, zhipu, caching, manual UX)
|
||||
- 6 orphan dirs not in `tracks.md` (`conductor_path_configurable_20260306`, `hot_reload_python_20260510`, `test_harness_hardening_20260310`, `test_patch_fixes_20260513`, `fix_remaining_tests_20260513`, `gui_architecture_refinement_20260512`)
|
||||
|
||||
## Method
|
||||
|
||||
1. `git mv` each completed track directory from `conductor/tracks/<name>` to `conductor/archive/<name>`. Single atomic shell call.
|
||||
2. Verify: `ls conductor/tracks | wc -l` should drop from 55 to 16.
|
||||
3. Update `conductor/tracks.md`: add "Recent Completed Tracks (2026-05+)" section, move the 14 "Earlier Archives" entries there, update `./tracks/` links to `./archive/`.
|
||||
4. Verify link integrity.
|
||||
|
||||
## Risks
|
||||
|
||||
- `git mv` on a directory requires all files to be tracked. If a directory contains untracked files, the move will fail. Mitigation: pre-check with `git ls-files <dir>` before moving.
|
||||
- Atomic per-phase commits per workflow.md. If Phase 1 partial-fails, rollback via `git restore --staged` and re-run.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track command_palette_and_performance_20260602 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "command_palette_and_performance_20260602",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-02T00:00:00Z",
|
||||
"updated_at": "2026-06-02T00:00:00Z",
|
||||
"description": "Implement Async Context Preview to fix UI hangs and add an 'Everything' Command Palette."
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
# Implementation Plan: Command Palette & UI Performance Fixes
|
||||
|
||||
## Phase 1: Offloading Performance Fixes
|
||||
- [x] Task: Async Context Preview
|
||||
- [x] Add `self._is_generating_preview = False` to `App.__init__`.
|
||||
- [x] Modify `_check_auto_refresh_context_preview` in `src/gui_2.py` to use a background thread.
|
||||
- [ ] Task: Incremental AST Selection (Future/Nuance)
|
||||
- [ ] Investigate if `_do_generate` can accept a partial update flag to avoid full project re-render.
|
||||
|
||||
## Phase 2: Command Palette Implementation
|
||||
- [ ] Task: Define Command Registry
|
||||
- [ ] Create a list of dictionaries in `App` containing `name`, `desc`, and `callback`.
|
||||
- [ ] Task: Render Command Palette UI
|
||||
- [ ] Handle `Ctrl+P` (or `Cmd+P`) to toggle `self.show_command_palette`.
|
||||
- [ ] Use `imgui.begin_popup_modal` for the palette feel.
|
||||
- [ ] Task: Keyboard Interactivity
|
||||
- [ ] Implement fuzzy search and keyboard navigation.
|
||||
|
||||
|
||||
## Phase 3: Verification
|
||||
- [ ] Task: Verification
|
||||
- [ ] Verify no UI hang when toggling AST nodes.
|
||||
- [ ] Verify Command Palette opens, filters correctly, and executes actions.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
@@ -1,28 +0,0 @@
|
||||
# Specification: Command Palette & UI Performance Fixes
|
||||
|
||||
## 1. Overview
|
||||
This track addresses two distinct but critical areas:
|
||||
1. **UI Performance (Fix):** The application currently hangs when users adjust AST or slice configurations. This is because the context preview is regenerated synchronously on the GUI thread, blocking all interactions.
|
||||
2. **Command Palette (Feature):** A central, keyboard-driven interface for all application actions, similar to professional editors like VSCode or Sublime Text.
|
||||
|
||||
## 2. Functional Requirements
|
||||
### 2.1 Async Context Preview
|
||||
* **Background Generation:** The `_do_generate` call within `_check_auto_refresh_context_preview` must be offloaded to an asynchronous worker thread.
|
||||
* **State Locking:** Prevent multiple concurrent generation threads from running if a preview refresh is already in progress.
|
||||
* **Incremental Signaling:** (Optional future goal) Investigate ways to only re-parse the affected file, but offloading is the immediate priority.
|
||||
|
||||
### 2.2 Everything Command Palette
|
||||
* **Shortcut Trigger:** Triggered by `Ctrl+P` (global project context).
|
||||
* **Fuzzy Search:** An input field that filters a global list of available commands.
|
||||
* **Action Mapping:** Includes actions like "Generate Response", "Clear Discussion", "Toggle Diagnostics", "Add All Files to Context", etc.
|
||||
* **Keyboard Navigation:** Use Up/Down arrows to navigate results and Enter to select/execute.
|
||||
* **Modal UX:** A centered, floating popup that dismisses on selection or Escape.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Smooth GUI Loop:** Offloading the generation must eliminate the UI hang.
|
||||
* **Low Latency Palette:** Search and filtering must feel instantaneous.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* Toggling "Def", "Sig", or "Hide" on an AST node no longer causes the GUI to stutter or hang.
|
||||
* Pressing `Ctrl+P` opens the Command Palette.
|
||||
* Typing "Reset" shows "Reset Session" and executing it successfully resets the discussion.
|
||||
@@ -1,4 +0,0 @@
|
||||
# Track: Context Batch Operations UX
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"id": "context_batch_operations_ux_20260510",
|
||||
"title": "Context Batch Operations UX",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Implementation Plan: Context Batch Operations UX
|
||||
|
||||
## Phase 1: Selection State
|
||||
- [x] Introduce a `selected_files` set in the `AppController` state.
|
||||
- [x] Update `_render_context_panel` in `src/gui_2.py` to support clicking/checkboxes to modify the selection state.
|
||||
|
||||
## Phase 2: Batch Actions
|
||||
- [x] Add a 'Batch Actions' sub-menu or inline bar in the Context Panel.
|
||||
- [x] Implement controller methods to apply state changes to all items in `selected_files`.
|
||||
@@ -1,9 +0,0 @@
|
||||
# Specification: Context Batch Operations UX
|
||||
|
||||
## Overview
|
||||
Add multi-select and batch state modification capabilities to the Context Panel to allow rapid wrangling of large numbers of files (e.g., setting 20 C++ files to 'AST Signatures' at once).
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Context panel supports multi-select (Shift-click, Ctrl-click, or checkboxes).
|
||||
- [ ] A batch operations context menu or action bar allows applying states (Force Full, Summary, AST Signatures, Remove) to all selected items.
|
||||
- [ ] Selections persist correctly during UI refreshes.
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "context_comp_decouple_20260510",
|
||||
"title": "Context Composition Decoupling",
|
||||
"phase": 6,
|
||||
"created": "2026-05-10",
|
||||
"status": "pending",
|
||||
"spec_file": "spec.md",
|
||||
"plan_file": "plan.md",
|
||||
"depends_on": [],
|
||||
"completion_checkpoints": []
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Implementation Plan: Context Composition Decoupling
|
||||
|
||||
## Phase 1: Core Data Model Changes
|
||||
Focus: Add view_mode field to FileItem, understand current coupling
|
||||
|
||||
- [x] Task 1.1: Audit FileItem model in models.py - add view_mode and custom_slices fields [8addb97]
|
||||
- [x] Task 1.2: Audit _render_context_composition_panel() to understand current coupling [8addb97]
|
||||
- [x] Task 1.3: Audit _render_files_panel() to understand how Files & Media populates context [8addb97]
|
||||
- [x] Task 1.4: Write tests for FileItem with view_mode and custom_slices [8addb97]
|
||||
|
||||
## Phase 2: Decouple Context Composition from Files & Media
|
||||
Focus: Remove auto-population inheritance, make Context Composition independent
|
||||
|
||||
- [x] Task 2.1: Remove auto-population of context from Files & Media in context composition [9b3a4d6]
|
||||
- [x] Task 2.2: Add manual "Add Files" button to Context Composition (file picker from project whitelist) [9b3a4d6]
|
||||
- [x] Task 2.3: Implement "Add All" batch operation [9b3a4d6]
|
||||
- [x] Task 2.4: Write tests for decoupled context composition state [9b3a4d6]
|
||||
|
||||
## Phase 3: Directory Grouping + File Stats
|
||||
Focus: Compact file listing with stats
|
||||
|
||||
- [x] Task 3.1: Implement directory grouping helper to group files by relative path prefix [5112deb]
|
||||
- [x] Task 3.2: Add file stats computation (line count, AST element count) - async [5112deb]
|
||||
- [x] Task 3.3: Render file list with collapsible directory headers [5112deb]
|
||||
- [x] Task 3.4: Display aggregate stats (total files, lines, AST elements) [5112deb]
|
||||
- [x] Task 3.5: Write tests for directory grouping and stats [5112deb]
|
||||
|
||||
## Phase 4: View Mode Selection UI
|
||||
Focus: Per-file view mode dropdown (full/sig/def/custom)
|
||||
|
||||
- [x] Task 4.1: Add view_mode dropdown to each file entry in Context Composition [fb1b72c]
|
||||
- [x] Task 4.2: Implement custom view mode indicator (enabled when custom slices exist) [fb1b72c]
|
||||
- [x] Task 4.3: Batch view mode change operations [fb1b72c]
|
||||
- [x] Task 4.4: Write tests for view mode selection [fb1b72c]
|
||||
|
||||
## Phase 5: Context Presets Infrastructure
|
||||
Focus: Data structures for save/load (without UI)
|
||||
|
||||
- [x] Task 5.1: Create ContextPreset and FileViewPreset data models [78c009f]
|
||||
- [x] Task 5.2: Implement serialization for context presets (TOML) [78c009f]
|
||||
- [x] Task 5.3: Write tests for context preset models [78c009f]
|
||||
|
||||
## Phase 6: Integration + Bug Fixes
|
||||
Focus: Ensure aggregate respects new view modes, fix any issues
|
||||
|
||||
- [x] Task 6.1: Verify aggregate.py respects view_mode when composing context [4dc801e]
|
||||
- [x] Task 6.2: Test with gencpp project files [4dc801e]
|
||||
- [x] Task 6.3: Conductor - User Manual Verification [4dc801e]
|
||||
@@ -1,52 +0,0 @@
|
||||
# Track Specification: Context Composition Decoupling
|
||||
|
||||
## Overview
|
||||
Decouple Files & Media from Context Composition, add directory grouping, file stats, and view mode selection per file. This is Phase 1 of the Context Composition Redesign per spec at `docs/superpowers/specs/2026-05-10-context-composition-redesign-design.md`.
|
||||
|
||||
## Current State Audit (as of 2026-05-10)
|
||||
### Already Implemented
|
||||
- Files & Media panel lists project files with wildcards
|
||||
- Context Composition panel inherits files from Files & Media
|
||||
- View flags (agg/full/sig/def) sync visually between panels
|
||||
- `_render_context_composition_panel()` in gui_2.py:2794-2964
|
||||
|
||||
### Gaps to Fill (This Track's Scope)
|
||||
- Files & Media populates Context Composition automatically (coupled)
|
||||
- No directory grouping in file listings
|
||||
- No file stats (line count, AST element count)
|
||||
- View mode selection is limited (no custom view presets)
|
||||
- Context Composition is NOT independent selection - it's derived from Files & Media
|
||||
|
||||
## Goals
|
||||
1. Make Files & Media and Context Composition independent data sources
|
||||
2. Add directory grouping to file listings for compact display
|
||||
3. Add file stats per file and aggregate
|
||||
4. Implement proper view mode selection (full/sig/def/custom)
|
||||
5. User can add/remove files from Context Composition independently
|
||||
6. "Add all" and bulk add/remove operations
|
||||
|
||||
## Functional Requirements
|
||||
- Context Composition starts empty or from saved preset on discussion switch
|
||||
- User manually adds files FROM project whitelist (not auto-inherited)
|
||||
- Each file entry has: path, view_mode, custom_slices
|
||||
- Directory grouping with collapsible headers (`📁 relative/path/`)
|
||||
- File stats displayed: line count, AST element count per file
|
||||
- Aggregate stats for selection: total files, lines, AST elements
|
||||
- View mode dropdown per file: full, sig, def, custom
|
||||
- Batch operations: add all from whitelist, remove selected, etc.
|
||||
|
||||
## Non-Functional Requirements
|
||||
- No horizontal scrolling in file lists (directory grouping enables this)
|
||||
- Stats computed asynchronously to not block UI
|
||||
- FileItem model may need extension for view_mode field
|
||||
|
||||
## Architecture Reference
|
||||
- `src/gui_2.py:_render_context_composition_panel()` - main panel
|
||||
- `src/models.py:FileItem` - needs view_mode field extension
|
||||
- `src/aggregate.py` - respects view modes when composing context
|
||||
- `docs/superpowers/specs/2026-05-10-context-composition-redesign-design.md`
|
||||
|
||||
## Out of Scope
|
||||
- Slice visualization and annotations (Phase 2)
|
||||
- Context preset save/load (Phase 3)
|
||||
- Context preview before send (Phase 3)
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "context_comp_slices_20260510",
|
||||
"title": "Context Composition Slice Visualization",
|
||||
"phase": 6,
|
||||
"created": "2026-05-10",
|
||||
"status": "pending",
|
||||
"spec_file": "spec.md",
|
||||
"plan_file": "plan.md",
|
||||
"depends_on": ["context_comp_decouple_20260510"],
|
||||
"completion_checkpoints": []
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Implementation Plan: Context Composition Slice Visualization
|
||||
|
||||
## Phase 1: Slice Data Model Extension [checkpoint: 4a20489]
|
||||
Focus: Extend custom_slices to support tags and comments
|
||||
|
||||
- [x] Task 1.1: Extend custom_slices schema to include tag and comment fields [976879d]
|
||||
- [x] Task 1.2: Update FileItem.to_dict() and from_dict() for new fields [976879d]
|
||||
- [x] Task 1.3: Write tests for custom_slices with annotations [976879d]
|
||||
|
||||
## Phase 2: Slice Inspector Enhancement [checkpoint: 31ecbe5]
|
||||
Focus: Visual AST highlighting with file content
|
||||
|
||||
- [x] Task 2.1: Modify _render_ast_inspector_modal() to show file content with highlighted slices [976b241]
|
||||
- [x] Task 2.2: Add color coding for Sig vs Def elements in file content view [976b241]
|
||||
- [x] Task 2.3: Implement toggle buttons for each AST element in the content view [976b241]
|
||||
- [x] Task 2.4: Write tests for slice inspector rendering [976b241]
|
||||
|
||||
## Phase 3: Slice Editor Visual Enhancement [checkpoint: 4f0f436]
|
||||
Focus: Visual slice editor with colored overlays
|
||||
|
||||
- [x] Task 3.1: Enhance slice editor to show file content (not just line list) [3614e11]
|
||||
- [x] Task 3.2: Add colored overlays for custom slices on the content [3614e11]
|
||||
- [x] Task 3.3: Implement click-drag line range selection [3614e11]
|
||||
- [x] Task 3.4: Add tag/comment input for custom slices [3614e11]
|
||||
- [x] Task 3.5: Write tests for slice editor [3614e11]
|
||||
|
||||
## Phase 4: View Presets [checkpoint: 8073938]
|
||||
Focus: Named view configurations
|
||||
|
||||
- [x] Task 4.1: Create FileViewPreset model [cb0fa89]
|
||||
- [x] Task 4.2: Add preset selection dropdown to context composition [cb0fa89]
|
||||
- [x] Task 4.3: Implement preset save/load to project config [cb0fa89]
|
||||
- [x] Task 4.4: Write tests for view presets [cb0fa89]
|
||||
|
||||
## Phase 5: AST Slice Pre-population [checkpoint: 2ebe0c6]
|
||||
Focus: Show auto-resolved slices before user customizes
|
||||
|
||||
- [x] Task 5.1: On file add to context, compute AST slices automatically [a669f92]
|
||||
- [x] Task 5.2: Store pre-computed slices in FileItem for display [a669f92]
|
||||
- [x] Task 5.3: User can modify/remove auto-slices [a669f92]
|
||||
- [x] Task 5.4: Write tests for auto-slices [a669f92]
|
||||
|
||||
## Phase 6: Integration
|
||||
Focus: Connect all pieces together
|
||||
|
||||
- [x] Task 6.1: Verify slice data flows correctly through context composition [1303fc1]
|
||||
- [x] Task 6.2: Test with C++ files from gencpp [1303fc1]
|
||||
- [x] Task 6.3: Conductor - User Manual Verification [1303fc1]
|
||||
@@ -1,63 +0,0 @@
|
||||
# Track Specification: Context Composition Slice Visualization
|
||||
|
||||
## Overview
|
||||
Enhance slice visualization with visual editor, annotation support (tags/comments), and view presets. This is Phase 2 of the Context Composition Redesign per spec at `docs/superpowers/specs/2026-05-10-context-composition-redesign-design.md`.
|
||||
|
||||
## Current State Audit (as of 2026-05-10)
|
||||
### Already Implemented
|
||||
- [Inspect] button opens AST inspector modal showing AST tree with Def/Sig/Hide toggles
|
||||
- [Slices] button opens Text Viewer with file content for slice management
|
||||
- FileItem.ast_mask stores mask per AST path (Def/Sig/Hide)
|
||||
- FileItem.custom_slices stores user-defined slices with line ranges
|
||||
|
||||
### Gaps to Fill (This Track's Scope)
|
||||
- Inspect popup shows AST but doesn't show file content with highlighted slices
|
||||
- Slices editor is just a list of line ranges - no visual representation
|
||||
- No annotation support (tags/comments) for custom slices
|
||||
- No view presets (named combinations of view settings)
|
||||
- AST-derived slices not shown before user creates custom slice
|
||||
|
||||
## Goals
|
||||
1. Slice inspector shows file content with AST-derived slices visually highlighted
|
||||
2. Custom slices have visual representation (colored ranges) in slice editor
|
||||
3. Each slice can have optional tag and comment annotation
|
||||
4. View presets allow naming and reusing view configurations
|
||||
5. User can toggle which AST elements are included in each view
|
||||
|
||||
## Functional Requirements
|
||||
### Slice Inspector (replaces Inspect button)
|
||||
- Opens as popup showing full file content with line numbers
|
||||
- AST-derived slices highlighted with distinct colors:
|
||||
- Sig elements: one color
|
||||
- Def elements: another color
|
||||
- User can toggle visibility of each AST element (Def/Sig/Hide)
|
||||
- Changes persist to FileItem.ast_mask
|
||||
|
||||
### Slice Editor (extends Slices button)
|
||||
- Visual file content display (not just line number list)
|
||||
- Custom slices shown as colored overlays on the content
|
||||
- Click-drag to select line range for new slice
|
||||
- Each custom slice has:
|
||||
- Line range
|
||||
- Tag (optional, e.g., "performance", "api", "bug")
|
||||
- Comment (optional, free-text explanation)
|
||||
- Remove/edit existing custom slices
|
||||
|
||||
### View Presets
|
||||
- Named presets defining default view + default slices per file type
|
||||
- Examples:
|
||||
- "Debug View" = full text + error-prone line slices
|
||||
- "API Surface" = sig + public API function slices
|
||||
- Presets project-scoped, saved in project config
|
||||
- User can select preset, then override for specific file
|
||||
|
||||
## Architecture Reference
|
||||
- `src/gui_2.py:_render_ast_inspector_modal()` - needs enhancement
|
||||
- `src/models.py:FileItem.ast_mask` - existing mask storage
|
||||
- `src/models.py:FileItem.custom_slices` - needs tag/comment support
|
||||
- `docs/superpowers/specs/2026-05-10-context-composition-redesign-design.md`
|
||||
|
||||
## Out of Scope
|
||||
- Context preset save/load UI (Phase 3)
|
||||
- Context preview before send (Phase 3)
|
||||
- Changes to Files & Media panel (Phase 1)
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track context_composition_ux_20260601 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "context_composition_ux_20260601",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "UX Refinements for Context Composition and Discussion Entries"
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# Implementation Plan: Context Composition & UX Refinements
|
||||
|
||||
## Phase 1: Panel Cleanup and Addition
|
||||
- [x] Task: Clean up Files & Media Panel
|
||||
- [x] In `src/gui_2.py`, locate `_render_files_panel`. Remove the `imgui.checkbox` and `imgui.combo` (view mode) logic for each file row.
|
||||
- [x] Replace them with a simple `imgui.text` for the path, and optionally a `[+]` button to quickly add the file to the active context composition if it isn't already present.
|
||||
- [x] Task: Implement Add File Modal
|
||||
- [x] Add state `app.show_add_context_file_modal = False` to `App.__init__`.
|
||||
- [x] In `render_context_composition_panel`, update the `[+ Add File]` button to set `app.show_add_context_file_modal = True`.
|
||||
- [x] Create `render_add_context_file_modal(app: App)` and add it to `render_context_modals`. It should iterate over `app.files`, filter out those already in `app.context_files`, and provide clickable rows to append them to `app.context_files`.
|
||||
|
||||
## Phase 2: Discussion Tinting
|
||||
- [x] Task: Tint Discussion Entries
|
||||
- [x] In `render_discussion_entry`, apply `imscope.style_color(imgui.Col_.child_bg, ...)` based on `entry["role"]`.
|
||||
- [x] Define standard tints (e.g., `vec4(30, 40, 50, 255)` for User, `vec4(40, 30, 50, 255)` for AI, `vec4(20, 20, 20, 255)` for System/Context).
|
||||
|
||||
## Phase 3: Verification
|
||||
- [x] Task: Verification
|
||||
- [x] Verify Files & Media is clean.
|
||||
- [x] Verify Add File modal works and successfully moves a file into the composition.
|
||||
- [x] Verify discussion entries are correctly tinted based on role.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
@@ -1,23 +0,0 @@
|
||||
# Specification: Context Composition & UX Refinements
|
||||
|
||||
## 1. Overview
|
||||
The user requested several immediate refinements to the Context Composition and Files & Media panels to improve clarity and workflow:
|
||||
1. **Files & Media Cleanup:** The master "Files & Media" panel currently displays aggregation checkboxes and view mode dropdowns. These are legacy artifacts; this panel should only represent the totality of files in the project. State-specific controls belong exclusively in the "Context Composition" panel.
|
||||
2. **Add File UX:** The "Add File" button in the Context Composition panel is non-functional. It needs to open a filtered selection menu allowing users to add files from the master list into the active context.
|
||||
3. **Visual Entry Tinting:** To improve readability, User and AI messages in the Discussion entries list should be visually tinted, while cruft/system categories should be neutral or dimmed.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Remove Master Flags:** Modify `_render_files_panel` in `src/gui_2.py` to remove the `imgui.checkbox` and `view_mode` combo box. It should only display the file path and perhaps a button to "Send to Context" if not already there.
|
||||
* **Implement "Add File" Modal:**
|
||||
* Create a popup modal `Add Context File` triggered by the `[+ Add File]` button in `render_context_composition_panel`.
|
||||
* The modal should list all files in `app.files` that are NOT currently in `app.context_files`.
|
||||
* Selecting a file adds it to `app.context_files` (defaulting to `auto_aggregate=True`, `view_mode='summary'`).
|
||||
* **Discussion Entry Tinting:** Update `render_discussion_entry` to apply a subtle background tint or text color shift based on the entry's `role` (e.g., User = faint blue, AI = faint green/purple, System = dimmed gray).
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Clarity:** The separation of concerns between "Project Files" and "Active Context" must be visually obvious.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* The "Files & Media" panel shows a clean list of files without individual view/aggregation controls.
|
||||
* Clicking `[+ Add File]` in Context Composition opens a functional picker to add missing files.
|
||||
* The Discussion Hub entries list visually distinguishes User and AI messages via color.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track context_preservation_and_warnings_20260601 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "context_preservation_and_warnings_20260601",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "Preserve context selection on discussion switch and add empty context warning"
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# Implementation Plan: Context Preservation and Warnings
|
||||
|
||||
## Phase 1: Context Inheritance on Creation
|
||||
- [ ] Task: Update `_create_discussion`
|
||||
- [ ] In `src/app_controller.py`, modify `_create_discussion`. Before switching, capture the current `context_files` (with their current `auto_aggregate` states).
|
||||
- [ ] When initializing the new discussion via `project_manager.default_discussion()`, immediately set its `context_snapshot` to a serialization of the current `context_files`.
|
||||
|
||||
## Phase 2: Empty Context Warning Modal
|
||||
- [ ] Task: Implement Warning Logic in App
|
||||
- [ ] In `src/gui_2.py`, add `self.show_empty_context_modal = False` and `self._pending_generation_action = None` (to store whether 'generate' or 'md_only' was requested) to `App.__init__`.
|
||||
- [ ] In `App._handle_generate_send` and `App._handle_md_only`, check if `self.ui_selected_context_files` is empty.
|
||||
- [ ] If empty, set `self.show_empty_context_modal = True` and store the action type. If not empty, call the respective controller method directly.
|
||||
- [ ] Task: Render Modal
|
||||
- [ ] In `src/gui_2.py`, add a new function `render_empty_context_modal(app: App)`.
|
||||
- [ ] The modal should display a warning and have "Proceed Anyway" (which calls the controller based on `_pending_generation_action`) and "Cancel" buttons.
|
||||
- [ ] Call this new render function inside the main UI loop, likely near where `render_missing_files_modal` is called.
|
||||
|
||||
## Phase 3: Verification
|
||||
- [ ] Task: Manual Verification
|
||||
- [ ] Verify creating a new discussion preserves checked files.
|
||||
- [ ] Verify the warning modal appears when generating with no files, and that "Proceed Anyway" works correctly.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
@@ -1,18 +0,0 @@
|
||||
# Specification: Context Preservation and Warnings
|
||||
|
||||
## 1. Overview
|
||||
Currently, creating a new discussion drops all currently selected files because the new discussion is initialized without a `context_snapshot`. Additionally, attempting to generate a response without any selected context files provides no user feedback. We need to inherit the current context composition when a new discussion is created and add a warning mechanism for empty contexts.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Context Inheritance:** When a new discussion is created via `_create_discussion` in `src/app_controller.py`, the active discussion's `context_files` (or the current `ui_selected_context_files` state) MUST be saved into the new discussion's `context_snapshot`.
|
||||
* **Empty Context Warning:** When `_handle_generate_send` or `_handle_md_only` is triggered in `src/gui_2.py`, it must verify if `ui_selected_context_files` is empty. If empty, it MUST display a warning modal instead of immediately calling the controller.
|
||||
* **Modal Actions:** The warning modal should offer "Proceed Anyway" (which continues the generation) and "Cancel" buttons.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Consistency:** The new empty context modal must match the style of existing warnings (like `show_missing_files_modal`).
|
||||
* **ImGui Stability:** Ensure the modal rendering does not violate ImGui stack scoping.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* Creating a new discussion with 3 files checked results in the new discussion also having those 3 files checked.
|
||||
* Clicking "Generate Response" with 0 files checked opens a warning modal.
|
||||
* Clicking "Proceed Anyway" successfully generates the response (with 0 files).
|
||||
@@ -1,4 +0,0 @@
|
||||
# Track: Context Snapshotting per "Take"
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"id": "context_snapshotting_takes_20260510",
|
||||
"title": "Context Snapshotting per 'Take'",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Implementation Plan: Context Snapshotting per "Take"
|
||||
|
||||
## Phase 1: Snapshot Model
|
||||
- [x] Update `HistoryManager` and the `Take` model to store a `context_snapshot` (list of serialized file items). (Implemented via Discussion dict in project file).
|
||||
|
||||
## Phase 2: Save and Restore
|
||||
- [x] Modify `AppController` to save the current context state when a new Take is created.
|
||||
- [x] Modify the "Switch Take" logic in `AppController` to restore the context state from the `context_snapshot`.
|
||||
- [x] Ensure UI automatically refreshes the Context Panel upon Take switch. (Automatically handled via attribute delegation).
|
||||
@@ -1,8 +0,0 @@
|
||||
# Specification: Context Snapshotting per "Take"
|
||||
|
||||
## Overview
|
||||
When branching a discussion using the "Takes" system, snapshot the exact state of the Context Panel (active files, their aggregation flags, and RAG status). When switching between Takes, the UI must visually restore this context state so the user knows exactly what the agent "saw" during that timeline branch.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Modifying context (adding/removing files, changing AST/summary flags) creates a context delta tied to the active Take.
|
||||
- [ ] Switching Takes updates the Context panel to reflect the file list and states exactly as they were in that timeline branch.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track controller_state_mutation_matrix_20260507 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "controller_state_mutation_matrix_20260507",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"created_at": "2026-05-07T16:00:00Z",
|
||||
"updated_at": "2026-05-07T16:00:00Z",
|
||||
"description": "Comprehensive map of all methods that modify the AppController and App state."
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
# Implementation Plan: Controller State Mutation Matrix (controller_state_mutation_matrix_20260507)
|
||||
|
||||
## Phase 1: State Inventory
|
||||
- [x] Task: List all public and private properties in `AppController` and `App`.
|
||||
- [x] Task: Identify all threading locks and their current usage patterns.
|
||||
|
||||
## Phase 2: Mutation Mapping
|
||||
- [x] Task: Use grep/AST tools to find all assignments to identified state fields.
|
||||
- [x] Task: Populate the mutation matrix table.
|
||||
- [x] Task: Conductor - User Manual Verification 'Final Review' (Protocol in workflow.md)
|
||||
@@ -1,21 +0,0 @@
|
||||
# Specification: Controller State Mutation Matrix (controller_state_mutation_matrix_20260507)
|
||||
|
||||
## Overview
|
||||
Mapping the state landscape of the Manual Slop application. We need to know exactly which methods have the authority to change global state, especially within `AppController` and `App`.
|
||||
|
||||
## Scope
|
||||
- **Classes:** `App`, `AppController`.
|
||||
- **Target Fields:** `ai_status`, `mma_status`, `_pending_gui_tasks`, `disc_entries`, `config`, etc.
|
||||
|
||||
## Functional Requirements
|
||||
1. **Mutation Matrix:**
|
||||
- Create a table: [Method Name] x [State Field Modified].
|
||||
2. **Lock Ownership Audit:**
|
||||
- Document which locks (e.g., `_pending_gui_tasks_lock`) protect which fields.
|
||||
- Identify potential race conditions or unprotected mutations.
|
||||
3. **State Lifecycle:**
|
||||
- Document how state is flushed to disk (autosave) vs. held in memory.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Matrix table identifying every state mutation site.
|
||||
- [ ] Audit report of thread-safety and lock usage.
|
||||
@@ -1 +0,0 @@
|
||||
# Track cull_unused_symbols_20260507 Context\n\n- [Specification](./spec.md)\n- [Implementation Plan](./plan.md)\n- [Metadata](./metadata.json)\n
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"track_id": "cull_unused_symbols_20260507",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"description": "Safely remove the 27 dead symbols identified in the redundancy audit."
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# Implementation Plan: Cull Unused Symbols
|
||||
|
||||
## Phase 1: Execution
|
||||
- [x] Task: Remove unused aggregation and AI helpers (c888e78)
|
||||
- [x] Task: Remove unused UI and diff viewer helpers (8bb9287)
|
||||
- [x] Task: Remove unused infrastructure and file cache helpers (ff29e20)
|
||||
- [x] Task: Run full test suite (Verified in batches)
|
||||
- [x] Conductor - User Manual Verification (Protocol in workflow.md)
|
||||
@@ -1 +0,0 @@
|
||||
# Specification: Cull Unused Symbols\n\n## Overview\nSafely remove the 27 dead symbols identified in the redundancy audit.\n\n## Acceptance Criteria\n- [ ] All tasks completed without breaking the test suite.\n
|
||||
@@ -1 +0,0 @@
|
||||
# Track curate_provider_registries_20260507 Context\n\n- [Specification](./spec.md)\n- [Implementation Plan](./plan.md)\n- [Metadata](./metadata.json)\n
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"track_id": "curate_provider_registries_20260507",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"description": "Move the PROVIDERS list to models.py and update all references to use this single source of truth."
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# Implementation Plan: Curate Provider Registries
|
||||
|
||||
## Phase 1: Execution
|
||||
- [x] Task: Define PROVIDERS in models.py
|
||||
- [x] Task: Remove PROVIDERS list from AppController and App
|
||||
- [x] Task: Update all provider loop references in gui_2.py and app_controller.py
|
||||
- [x] Task: Run full test suite
|
||||
- [x] Conductor - User Manual Verification (Protocol in workflow.md)
|
||||
@@ -1 +0,0 @@
|
||||
# Specification: Curate Provider Registries\n\n## Overview\nMove the PROVIDERS list to models.py and update all references to use this single source of truth.\n\n## Acceptance Criteria\n- [ ] All tasks completed without breaking the test suite.\n
|
||||
@@ -1 +0,0 @@
|
||||
# Track decouple_gui_log_loading_20260507 Context\n\n- [Specification](./spec.md)\n- [Implementation Plan](./plan.md)\n- [Metadata](./metadata.json)\n
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"track_id": "decouple_gui_log_loading_20260507",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"description": "Move Tkinter directory selection out of AppController and into gui_2.py."
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# Implementation Plan: Decouple GUI Log Loading
|
||||
|
||||
## Phase 1: Execution
|
||||
- [x] Task: Remove Tkinter imports and hide_tk_root from app_controller.py [04ce727]
|
||||
- [x] Task: Remove Tkinter logic from AppController.cb_load_prior_log [04ce727]
|
||||
- [x] Task: Implement cb_load_prior_log wrapper in gui_2.py App class [7b7f53f]
|
||||
- [x] Task: Run full test suite [Verified 726/732 tests passed]
|
||||
- [x] Conductor - User Manual Verification (Protocol in workflow.md)
|
||||
@@ -1 +0,0 @@
|
||||
# Specification: Decouple GUI Log Loading\n\n## Overview\nMove Tkinter directory selection out of AppController and into gui_2.py.\n\n## Acceptance Criteria\n- [ ] All tasks completed without breaking the test suite.\n
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track discussion_metrics_and_compression_20260601 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "discussion_metrics_and_compression_20260601",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "Add per-response token metrics and AI-assisted history compression"
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
# Implementation Plan: Discussion Metrics and Compression
|
||||
|
||||
## Phase 1: Metrics Visibility
|
||||
- [x] Task: Update UI for Token Metrics
|
||||
- [x] Modify `_render_comms_history_panel` and `render_discussion_entry` in `src/gui_2.py` to extract and prominently display `usage` stats (input, output, cache) from the entry payloads.
|
||||
|
||||
## Phase 2: Compression Helper Agent
|
||||
- [x] Task: Implement Compression Agent
|
||||
- [x] Create a new agent definition or function in `src/ai_client.py` (or a dedicated module) capable of receiving a discussion history and a system prompt instructing it to summarize and compact the history.
|
||||
- [x] Task: Implement UI Triggers
|
||||
- [x] Add a "Compress Discussion" button to the Discussion Hub UI.
|
||||
- [x] Wire the button to dispatch the compression task to the background executor and display a loading indicator.
|
||||
- [x] Upon completion, replace the older entries with the generated summary block.
|
||||
|
||||
## Phase 3: Verification
|
||||
- [x] Task: Verification
|
||||
- [x] Verify token metrics are visible per response.
|
||||
- [x] Run the "Compress Discussion" tool on a heavy discussion and verify the history is successfully summarized without losing core context.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
|
||||
@@ -1,21 +0,0 @@
|
||||
# Specification: Discussion Metrics and Compression
|
||||
|
||||
## 1. Overview
|
||||
The user requested better visibility into token usage on a per-response and per-discussion basis, rather than just session-wide totals. Additionally, the current history truncation is deemed too naive. The user wants a smarter compression strategy utilizing a helper agent to summarize, categorize, and compact discussion entries (especially tool/vendor logs) when the token limit is approached.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Per-Response Metrics:** Update the Comms History and Discussion Hub panels to display token usage (input/output/cache) and remaining quota for each specific response.
|
||||
* **Discussion-Level Metrics:** Add a summary of total token usage for the active discussion.
|
||||
* **Helper Agent Compression:**
|
||||
* Implement an asynchronous helper agent capable of analyzing a `discussion`'s history.
|
||||
* The agent should categorize entries (e.g., tool calls, user prompts, AI thinking) and generate a compacted summary.
|
||||
* Provide UI options to trigger this compression manually or set thresholds for automatic suggestions.
|
||||
* **New Session Prompt:** Allow the AI to generate a "summary prompt" and "target prompt" to effortlessly transition a heavy, exhausted discussion into a fresh session with adjusted context.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Performance:** The helper agent must run asynchronously to avoid blocking the main GUI thread.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* Token metrics are clearly visible per entry in the Comms History.
|
||||
* A new "Compress Discussion" button triggers the helper agent, which successfully produces a compacted history.
|
||||
* The system can transition an exhausted discussion into a new one using an AI-generated summary.
|
||||
@@ -1,118 +0,0 @@
|
||||
# Docs Layer Gap Analysis
|
||||
|
||||
**Date:** 2026-06-02
|
||||
**Source of truth for features:** `conductor/product.md`, `src/` directory listing
|
||||
**Source of truth for guides:** `docs/Readme.md` and `docs/guide_*.md`
|
||||
|
||||
This analysis drives the Sub-Track 1 work in the parent track `documentation_refresh_comprehensive_20260602`.
|
||||
|
||||
---
|
||||
|
||||
## Existing Guides and Their Coverage
|
||||
|
||||
| Guide | Lines | Covers | Does NOT cover (gaps) |
|
||||
|---|---|---|---|
|
||||
| `docs/guide_architecture.md` | 824 | Threading model, events, AI client, HITL Execution Clutch, MMA Engine architecture, MCP allowlist, comms logging, telemetry, state machines | RAG integration with event system, Beads lifecycle hooks, Hot Reload interaction with threading model, Command Palette rendering details, NERV theme FX |
|
||||
| `docs/guide_mma.md` | 470 | 4-tier MMA, Ticket/Track data structures, DAG engine, WorkerPool, ConductorEngine, Tier 2 ticket generation, Tier 3 worker lifecycle, Tier 4 QA, abort propagation, pause/resume, model escalation | Persona assignment to tiers, RAG-augmented worker context, Beads-backed track state, Hot Reload interaction with worker spawning, workspace profile auto-switching |
|
||||
| `docs/guide_tools.md` | 489 | MCP Bridge 3-layer security, 26 native tools, Hook API endpoints, ApiHookClient, shell runner, parallel tool execution, session logging | New RAG tools, new Beads tools, new persona tools, new structural file editor tools, new cost tracker tools |
|
||||
| `docs/guide_simulations.md` | 395 | `live_gui` fixture, Puppeteer pattern (8 stages), mock provider strategy, visual verification, supporting analysis modules | Extended simulations (RAG, Beads, Hot Reload), async tool tests, discussion metrics tests, structural file editor tests, command palette tests |
|
||||
| `docs/guide_context_curation.md` | 273 | Granular AST control, fuzzy anchor slices, interactive AST tree masking, batch operations, context snapshotting, aggregation pipeline | Updates for new view modes (None, Outline, Sliced), updates for new Structural File Editor (unified AST inspector + slice editor), view presets |
|
||||
| `docs/guide_shaders_and_window.md` | 33 | Hybrid shader injection (ImDrawList + PyOpenGL FBO), pure ImGui borderless window, event metrics integration | NERV theme shader effects, CRT scanline implementation, status flickering, pywin32-specific code |
|
||||
| `docs/guide_meta_boundary.md` | 41 | Application domain vs Meta-Tooling domain, inter-domain bridges, `mcp_client.py` overlap, guidelines for future tiers | Whether `claude_mma_exec.py` is still in active use, whether `cli_tool_bridge.py` is still relevant, OpenCode and Gemini CLI superpowers/skills as meta-tooling |
|
||||
|
||||
---
|
||||
|
||||
## Subsystems Without Dedicated Guides
|
||||
|
||||
These subsystems are explicitly listed in `conductor/product.md` (or implied by major modules in `src/`) but lack dedicated guides:
|
||||
|
||||
| Subsystem | Primary module | Size | Recommendation |
|
||||
|---|---|---|---|
|
||||
| RAG | `src/rag_engine.py` | 10.9K | NEW: `docs/guide_rag.md` — substantial module, complex algorithms (vector store, chunking strategies, multi-provider search, ChromaDB integration) |
|
||||
| Beads | `src/beads_client.py` | 2.7K | NEW: `docs/guide_beads.md` — Dolt integration, JSON-RPC protocol, `bd` CLI interaction, context compaction |
|
||||
| Hot Reload | `src/hot_reloader.py` | 2.2K | NEW: `docs/guide_hot_reload.md` — state-preserving module reloading, UI delegation pattern, Ctrl+Alt+R trigger, error tint feedback |
|
||||
| Personas | `src/personas.py` | 4.6K | NEW: `docs/guide_personas.md` — unified profile model, MMA tier assignment, tool bias integration, persona editor modal |
|
||||
| NERV Theme | `src/theme_nerv.py`, `src/theme_nerv_fx.py` | 3K + 3.8K | NEW: `docs/guide_nerv_theme.md` — Black Void palette, CRT scanline implementation, status flickering, alert animations |
|
||||
| Workspace Profiles | `src/workspace_manager.py` | 2.9K | NEW: `docs/guide_workspace_profiles.md` — docking layouts, named profiles, global/project scope inheritance, contextual auto-switch |
|
||||
| Command Palette | `src/gui_2.py` (relevant section) | embedded | NEW: `docs/guide_command_palette.md` OR include in `guide_architecture.md` (Async Context Preview, fuzzy command resolution) |
|
||||
| Discussion Metrics & Compression | `src/ai_client.py` (relevant section) | embedded | INCLUDE in `guide_architecture.md` rewrite — per-response token tracking, history compression strategy |
|
||||
| Structural File Editor | `src/gui_2.py` (relevant section) | embedded | INCLUDE in `guide_context_curation.md` rewrite — unified AST inspector + slice editor |
|
||||
| Tree-sitter (Lua, GDScript, C#) | `src/mcp_client.py` (planned) | planned | OUT OF SCOPE — these are in the backlog, not yet implemented |
|
||||
|
||||
---
|
||||
|
||||
## Existing Guides That Are Stale
|
||||
|
||||
| Guide | Last meaningful update | Stale sections (to rewrite) |
|
||||
|---|---|---|
|
||||
| `docs/guide_architecture.md` | Likely Feb 2026 (last doc refresh) | "MMA Engine Architecture" section (WorkerPool + ConductorEngine) — does not include persona assignment, RAG integration, Beads hooks, Hot Reload. "AI Client: Multi-Provider Architecture" section — does not include MiniMax provider. "Anthropic Cache Strategy" — needs verification against current implementation. |
|
||||
| `docs/guide_mma.md` | Likely Feb 2026 | "Tier 3: Worker Lifecycle" — does not cover RAG-augmented context, persona-driven prompt construction, Beads track state. "ConductorEngine" — does not cover workspace profile auto-switching. |
|
||||
| `docs/guide_tools.md` | Likely Feb 2026 | "Native Tool Inventory" — current count is uncertain. Need to verify each tool is documented. New tools likely missing. |
|
||||
| `docs/guide_simulations.md` | Likely Feb 2026 | "Puppeteer Pattern" — may not include new test stages for RAG, Beads, Hot Reload. |
|
||||
| `docs/guide_context_curation.md` | Likely May 2026 (Phase 6 tracks) | Mostly current. Verify against latest Phase 6 implementation. |
|
||||
| `docs/guide_shaders_and_window.md` | Likely Feb 2026 | "Custom Shaders and Window Frame Architecture" — does not include NERV theme. |
|
||||
| `docs/guide_meta_boundary.md` | Likely Feb 2026 | "Meta-Tooling" section — does not include `.gemini/skills/`, `.opencode/skills/`, or `mma-orchestrator/SKILL.md`. |
|
||||
|
||||
---
|
||||
|
||||
## Cross-Cutting Issues
|
||||
|
||||
- **Files in `docs/MMA_Support/*` not linked from `docs/Readme.md`:** All 12 files. They're legacy MMA reference docs from a previous architecture. Decision: keep as a "Legacy MMA Reference (Deprecated)" section at the bottom of the index.
|
||||
|
||||
- **Guides that reference each other via broken links:** None found in the initial scan. Will re-verify during each per-file rewrite.
|
||||
|
||||
- **Symbols in docs that don't match current source:** Will be caught by symbol parity spot-checks during each rewrite.
|
||||
|
||||
- **Tech-stack drift:** `guide_architecture.md` mentions "Gemini API, Anthropic API, DeepSeek" but the project now also has MiniMax. Update needed.
|
||||
|
||||
- **Provider model names:** `guide_architecture.md` may have stale model names (e.g., `gemini-3.1-pro-preview`, `gemini-3-flash-preview`, `gemini-2.5-flash-lite` are mentioned in `conductor/tech-stack.md`; verify they're documented in the architecture guide).
|
||||
|
||||
---
|
||||
|
||||
## Recommended Task Order (for Sub-Track 1)
|
||||
|
||||
1. **Task 1 (this analysis)** — done
|
||||
2. **Task 2: Update `docs/Readme.md`** — link previously-unlinked guides, add legacy MMA section, add new guide placeholder rows
|
||||
3. **Task 3: Rewrite `docs/guide_architecture.md`** — main architecture guide
|
||||
4. **Task 4: Rewrite `docs/guide_mma.md`** — MMA guide
|
||||
5. **Task 5: Rewrite `docs/guide_tools.md`** — tools guide
|
||||
6. **Task 6: Rewrite `docs/guide_simulations.md`** — simulations guide
|
||||
7. **Task 7: Refresh `guide_context_curation.md` and `guide_shaders_and_window.md`** — in parallel since they're independent
|
||||
8. **Task 8: Refresh `docs/guide_meta_boundary.md`** — small file, do after the others
|
||||
9. **Task 9: Update `Readme.md`** — after all guides are updated, so the new Subsystem Index is accurate
|
||||
10. **Task 10: Write new guides** — RAG, Beads, Hot Reload, Personas, NERV Theme, Workspace Profiles, Command Palette. Per-guide atomic commits.
|
||||
11. **Task 11: Verification** — cross-link audit, symbol parity, subsystem coverage, Phase Completion checkpoint
|
||||
|
||||
---
|
||||
|
||||
## Estimated Effort
|
||||
|
||||
| Task | Estimated commits | Estimated time (single agent) |
|
||||
|---|---|---|
|
||||
| Task 1: Gap analysis | 1 | done |
|
||||
| Task 2: docs/Readme.md | 1 | 15-30 min |
|
||||
| Task 3: guide_architecture.md | 1 | 1-2 hours (largest file, most subsystems) |
|
||||
| Task 4: guide_mma.md | 1 | 45-60 min |
|
||||
| Task 5: guide_tools.md | 1 | 1-1.5 hours (26+ tools to document) |
|
||||
| Task 6: guide_simulations.md | 1 | 45-60 min |
|
||||
| Task 7: guide_context_curation.md + guide_shaders_and_window.md | 2 | 30-45 min |
|
||||
| Task 8: guide_meta_boundary.md | 1 | 15-30 min |
|
||||
| Task 9: Readme.md | 1-3 (per section) | 30-45 min |
|
||||
| Task 10: 7 new guides | 7-14 (per guide + index update) | 3-5 hours (textbook fidelity for new content) |
|
||||
| Task 11: Verification | 1 (checkpoint) | 30-45 min |
|
||||
|
||||
**Total estimated time:** 8-13 hours of focused single-agent work, spread across many per-file atomic commits.
|
||||
|
||||
---
|
||||
|
||||
## Risks
|
||||
|
||||
1. **Code evolution during the track:** Another agent is making code modifications. Each per-file rewrite starts with a `git add .` pre-edit checkpoint and reads the current source state. If a subsystem is restructured mid-track, the rewrite may need a follow-up commit.
|
||||
|
||||
2. **Textbook / purple-tomb fidelity target:** This is ambitious. If we run out of time, we can ship a "good enough" pass on the main guides (3-6) and defer the new guides (10) to a follow-up track.
|
||||
|
||||
3. **CLAUDE.md and AGENTS.md divergence:** This is Sub-Track 3 work, but if `AGENTS.md` and `docs/Readme.md` have conflicting pointer targets, the drift will be visible. Defer that conflict resolution to Sub-Track 3.
|
||||
|
||||
---
|
||||
|
||||
**Gap analysis complete. Ready for Task 2.**
|
||||
@@ -1 +0,0 @@
|
||||
# Track encapsulate_appcontroller_status_20260507 Context\n\n- [Specification](./spec.md)\n- [Implementation Plan](./plan.md)\n- [Metadata](./metadata.json)\n
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"track_id": "encapsulate_appcontroller_status_20260507",
|
||||
"type": "chore",
|
||||
"status": "new",
|
||||
"description": "Convert ai_status and mma_status to properties with thread-safe setters."
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
# Implementation Plan: Encapsulate AppController Status\n\n## Phase 1: Execution\n- [x] Task: Add private _ai_status and _mma_status to AppController.__init__ [04eff51]\n- [x] Task: Implement @property and @setter for ai_status and mma_status [6bec4b8]\n- [x] Task: Replace all legacy _set_status calls with direct property assignment [b3065b0]\n- [x] Task: Run full test suite [Verified 729 tests, resolved transient batch failures] [e313802]\n- [x] Conductor - User Manual Verification (Protocol in workflow.md) [Verified via simulations]\n
|
||||
@@ -1 +0,0 @@
|
||||
# Specification: Encapsulate AppController Status\n\n## Overview\nConvert ai_status and mma_status to properties with thread-safe setters.\n\n## Acceptance Criteria\n- [ ] All tasks completed without breaking the test suite.\n
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "fix_imgui_keys_down_20260601",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-06-01T00:00:00Z",
|
||||
"updated_at": "2026-06-01T00:00:00Z",
|
||||
"description": "Fix AttributeError: 'IO' object has no attribute 'keys_down' when pressing hotkeys"
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# Implementation Plan: Fix `keys_down` AttributeError
|
||||
|
||||
## Phase 1: Investigation and Implementation
|
||||
- [x] Task: Investigate ImGui API
|
||||
- [x] Identify the correct `imgui-bundle` equivalent for `io.keys_down` (e.g., `imgui.is_key_pressed(imgui.Key.r, False)`).
|
||||
- [x] Search the codebase for any other instances of `io.keys_down` that need updating.
|
||||
- [x] Task: Apply Fixes
|
||||
- [x] Modify `src/gui_2.py` (around line 695) to replace `io.keys_down[ord('R')]` with the modern API call.
|
||||
- [x] Apply the same fix to any other locations found during the codebase search.
|
||||
- [x] Task: Verification
|
||||
- [x] Start the application locally and trigger the `Ctrl+Alt+R` shortcut to confirm it no longer crashes.
|
||||
- [x] Ensure general application stability.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: Investigation and Implementation' (Protocol in workflow.md)
|
||||
@@ -1,20 +0,0 @@
|
||||
# Specification: Fix `keys_down` AttributeError in ImGui IO
|
||||
|
||||
## 1. Overview
|
||||
The application crashes with an `AttributeError: 'IO' object has no attribute 'keys_down'` in `src/gui_2.py` at line 695. This occurs when the application attempts to check if specific keys (like 'R' for the `Ctrl+Alt+R` hot-reload shortcut) are pressed using the legacy `io.keys_down` array, which is no longer available or supported in the current `imgui-bundle` version.
|
||||
|
||||
## 2. Functional Requirements
|
||||
* **Update Key State Queries:** Refactor the codebase (specifically `src/gui_2.py` and any other occurrences) to replace usages of `io.keys_down[ord('X')]` with the modern and correct ImGui API for querying key states (e.g., `imgui.is_key_down(imgui.Key.r)` or equivalent based on `imgui-bundle` specifications).
|
||||
* **Restore Hotkeys:** Ensure that the hot-reload shortcut (`Ctrl+Alt+R`) and any other affected shortcuts function correctly without crashing the application.
|
||||
|
||||
## 3. Non-Functional Requirements
|
||||
* **Maintain Compatibility:** The fix must be compatible with the currently installed version of `imgui-bundle` and Python 3.11+.
|
||||
|
||||
## 4. Acceptance Criteria
|
||||
* Pressing `Ctrl+Alt+R` triggers the hot-reload functionality (or handles the shortcut gracefully) without raising an `AttributeError`.
|
||||
* A codebase search confirms no remaining uses of `io.keys_down` exist.
|
||||
* The application starts and runs normally without immediate exceptions in the event loop.
|
||||
|
||||
## 5. Out of Scope
|
||||
* Adding new hotkeys.
|
||||
* Refactoring the entire hot-reload architecture (only fixing the input detection).
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "fix_indentation_1space_20260516",
|
||||
"title": "Fix Indentation 1-Space Convention",
|
||||
"type": "fix",
|
||||
"status": "planned",
|
||||
"priority": "high",
|
||||
"created": "2026-05-16",
|
||||
"depends_on": [],
|
||||
"blocks": []
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
# Implementation Plan: Fix Indentation 1-Space Convention
|
||||
|
||||
## Phase 1: Audit and Classification
|
||||
Focus: Identify all files requiring indentation correction
|
||||
|
||||
- [x] Task 1.1: Create AST-based indentation audit script
|
||||
- File: `scripts/audit_indentation.py`
|
||||
- Method: Use Python AST to track logical nesting depth
|
||||
- Output: Files with actual violations (not docstring false positives)
|
||||
|
||||
- [x] Task 1.2: Run audit across all directories
|
||||
- Result: 32 files with violations, 189 total violations
|
||||
|
||||
## Phase 2: Correct Indentation - src/ Files
|
||||
Focus: Fix identified files in src/ (2 files)
|
||||
|
||||
- [x] Task 2.1: Fix src/fuzzy_anchor.py (18 violations) - commit 31a8949
|
||||
- [x] Task 2.2: Fix src/patch_modal.py (14 violations) - commit 31a8949
|
||||
- [x] Task 2.3: Verify syntax after each fix
|
||||
- [x] Task 2.4: Commit each file individually
|
||||
|
||||
## Phase 3: Correct Indentation - scripts/ Files
|
||||
Focus: Fix identified files in scripts/ (2 files)
|
||||
|
||||
- [x] Task 3.1: Fix scripts/extract_symbols.py (4 violations) - commit 31a8949
|
||||
- [x] Task 3.2: Fix scripts/tasks/download_fonts.py (8 violations) - commit 31a8949
|
||||
- [x] Task 3.3: Verify syntax after each fix
|
||||
- [x] Task 3.4: Commit each file individually
|
||||
|
||||
## Phase 4: Correct Indentation - tests/ Files
|
||||
Focus: Fix identified files in tests/ (28 files)
|
||||
|
||||
- [x] Task 4.1: Fix tests/test_arch_boundary_phase1.py (9 violations) - commit 31a8949
|
||||
- [x] Task 4.2: Fix tests/test_arch_boundary_phase2.py (16 violations) - commit 31a8949
|
||||
- [x] Task 4.3: Fix tests/test_arch_boundary_phase3.py (7 violations) - commit 31a8949
|
||||
- [x] Task 4.4: Fix tests/test_external_editor.py (18 violations) - commit 31a8949
|
||||
- [x] Task 4.5: Fix tests/test_headless_service.py (19 violations) - PARTIAL - complex multi-line with statements
|
||||
- [x] Task 4.6: Fix remaining tests/ files (22 files with fewer violations) - commit 31a8949
|
||||
- [x] Task 4.7: Verify syntax after each fix
|
||||
- [x] Task 4.8: Commit each file individually
|
||||
|
||||
## Phase 5: Final Verification
|
||||
Focus: Ensure no regressions
|
||||
|
||||
- [x] Task 5.1: Re-run audit to confirm remaining violations
|
||||
- 4 files remain with complex multi-line with statements
|
||||
|
||||
## Checkpoint
|
||||
[checkpoint: 31a8949]
|
||||
|
||||
## Remaining Work
|
||||
4 files require manual correction due to complex multi-line with statements:
|
||||
- tests/test_api_events.py (7 violations)
|
||||
- tests/test_discussion_takes_gui.py (2 violations)
|
||||
- tests/test_gui_updates.py (1 violations)
|
||||
- tests/test_headless_service.py (19 violations)
|
||||
|
||||
These files have nested with statements spanning multiple lines where the indentation algorithm cannot determine the correct nesting depth from AST alone.
|
||||
@@ -1,51 +0,0 @@
|
||||
# Track Specification: Fix Indentation 1-Space Convention
|
||||
|
||||
## Overview
|
||||
|
||||
Standardize all Python files in the project to use exactly 1-space indentation per the AI-Optimized Python Style Guide. This is a remediation track to correct any files that have drifted from the convention, ensuring consistent formatting across the entire codebase without using auto-formatters (which risk corrupting non-indentation formatting).
|
||||
|
||||
## Current State Audit (as of 29244acc)
|
||||
|
||||
### Already Implemented (DO NOT re-implement)
|
||||
- **src/imgui_scopes.py:1-259** — Uses 1-space indentation correctly
|
||||
- **src/cost_tracker.py:1-64** — Uses 1-space indentation correctly
|
||||
- **src/paths.py:1-220** — Uses 1-space indentation correctly
|
||||
- **conductor/code_styleguides/python.md** — Documents the 1-space indentation requirement
|
||||
|
||||
### Gaps to Fill (This Track's Scope)
|
||||
- **src/ directory** — Need to audit all 51 Python files for compliance
|
||||
- **tests/ directory** — Need to audit test files for compliance
|
||||
- **scripts/ directory** — Need to audit utility scripts for compliance
|
||||
- **conductor/ directory** — Need to audit conductor Python files for compliance
|
||||
|
||||
## Goals
|
||||
|
||||
1. Identify all Python files not using 1-space indentation
|
||||
2. Correct indentation to 1-space in all non-compliant files
|
||||
3. Preserve all other formatting (comments, docstrings, alignment)
|
||||
4. Never use auto-formatters (ruff --fix, black, etc.)
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
- [ ] Audit every .py file in src/, tests/, scripts/, and conductor/
|
||||
- [ ] For each file, detect if it uses any indentation other than 1 space
|
||||
- [ ] For non-compliant files, surgically correct only the indentation
|
||||
- [ ] Preserve comment positioning, docstring formatting, and alignment
|
||||
- [ ] Commit each file correction individually
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
- **No Auto-Formatters:** User explicitly requested manual correction only
|
||||
- **Preservation Priority:** Other formatting must not be disturbed
|
||||
- **Atomic Commits:** Each file correction as a separate commit for safe rollback
|
||||
- **Syntax Safety:** Verify syntax after each file correction
|
||||
|
||||
## Architecture Reference
|
||||
|
||||
- conductor/code_styleguides/python.md#section-1 (Indentation and Whitespace)
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- Re-formatting code for any other style concerns
|
||||
- Auto-correction of any kind
|
||||
- Changes to .toml, .md, or non-Python files
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track fix_test_suite_failures_20260514 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "fix_test_suite_failures_20260514",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-05-14T00:00:00Z",
|
||||
"updated_at": "2026-05-14T00:00:00Z",
|
||||
"description": "Fix 45 failing test files across 12 batches"
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
# Implementation Plan: Fix All Remaining Test Failures
|
||||
|
||||
## Phase 1: GUI and Layout Tests [checkpoint: d66afeb]
|
||||
- [x] Task: Fix `test_gui_discussion_tabs.py` (`AssertionError: 'Original###main' in []`). c8e6a95
|
||||
- [x] Task: Fix `test_gui_window_controls.py` (`ValueError: not enough values to unpack`). c8545df
|
||||
- [x] Task: Fix `test_project_settings_rename.py` (Verify "Project Settings" rename in code). 7467725
|
||||
- [x] Task: Fix `test_session_hub_merge.py` (Add missing tabs Context Composition, Snapshot, Takes to Discussion Hub). 302faad
|
||||
- [x] Task: Fix `test_preset_windows_layout.py` (Address `None == 'ok'` and timeout issues). 0863559
|
||||
- [x] Task: Fix `test_shader_live_editor.py` (Ensure `imgui.begin` is called correctly). 5a8ca11
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: GUI and Layout Tests' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: RAG System Tests
|
||||
- [x] Task: Fix `test_rag_engine.py` (Resolve `SentenceTransformer` attribute error). 33e532a
|
||||
- [x] Task: Fix `test_rag_gui_presence.py` (Ensure `_render_rag_panel` is called in `_gui_func`). 1948062
|
||||
- [x] Task: Fix `test_rag_phase4_final_verify.py` (Address indexing timeout). 2d76381
|
||||
- [x] Task: Fix `test_rag_phase4_stress.py` (Optimize incremental indexing). 2d76381
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: RAG System Tests' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: MMA, Workflow, and Negative Flow Tests
|
||||
- [x] Task: Fix `test_auto_switch_sim.py` (`AttributeError: 'NoneType' object has no attribute 'get'`). c769a0e
|
||||
- [x] Task: Fix `test_mma_approval_indicators.py` (Ensure 'APPROVAL PENDING' badge is displayed correctly). c769a0e
|
||||
- [x] Task: Fix `test_history_manager.py` (Provide missing `context_files` argument to `UISnapshot.__init__`). c769a0e
|
||||
- [x] Task: Fix `test_z_negative_flows.py` (Fix response event and subprocess timeouts). c769a0e
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: MMA, Workflow, and Negative Flow Tests' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: Remaining Batched Failures
|
||||
- [x] Task: Run the test suite and verify if any remaining files from the 45 failed batches still have underlying issues not covered above. 45104af
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 4: Remaining Batched Failures' (Protocol in workflow.md)
|
||||
@@ -1,18 +0,0 @@
|
||||
# Specification: Fix All Remaining Test Failures
|
||||
|
||||
## 1. Overview
|
||||
The current test suite has 45 failing test files across 12 batches. The objective of this track is to systematically analyze and resolve all test failures, returning the test suite to a 100% passing state.
|
||||
|
||||
## 2. Scope
|
||||
- **In Scope:**
|
||||
- Analyzing the root cause of each failing test.
|
||||
- Modifying application code where bugs or regressions are identified.
|
||||
- Updating test code where tests are outdated, flaky, or no longer align with intentional architectural changes.
|
||||
- Using Tier 3/4 workers for deep diagnostics and targeted fixes as per MMA guidelines.
|
||||
- **Out of Scope:**
|
||||
- Adding new features.
|
||||
- Extensive refactoring of systems unrelated to the test failures.
|
||||
- Rewriting the test suite or testing framework.
|
||||
|
||||
## 3. Success Criteria
|
||||
- Running `uv run .\scripts\run_tests_batched.py` results in 0 failed batches and all tests passing.
|
||||
@@ -1,4 +0,0 @@
|
||||
# Track: GenCpp Project Initialization
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"id": "gencpp_project_init_20260510",
|
||||
"title": "GenCpp Project Initialization",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
# Implementation Plan: GenCpp Project Initialization
|
||||
|
||||
## Phase 1: Configuration Template
|
||||
- [x] Draft the exact `manual_slop.toml` structure required. (Created `gencpp_manual_slop_template.toml`).
|
||||
- [x] Implement project-level path isolation in `AppController`.
|
||||
- [x] Verify that opening Manual Slop and selecting the `gencpp` directory correctly initializes the isolated `.manual_slop` taxonomy.
|
||||
@@ -1,9 +0,0 @@
|
||||
# Specification: GenCpp Project Initialization
|
||||
|
||||
## Overview
|
||||
Configure `manual_slop.toml` in the `gencpp` repository to isolate conductor tracks, logs, and history. This ensures Manual Slop operates cleanly as an external tooling layer for the `gencpp` project without polluting its root directory.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] A `manual_slop.toml` template exists that configures `[conductor].dir` to `.manual_slop/conductor`.
|
||||
- [ ] Paths for logs and scripts are properly configured to stay within `.manual_slop/`.
|
||||
- [ ] Instructions are provided on how to run Manual Slop targeting this configuration.
|
||||
@@ -1,4 +0,0 @@
|
||||
# Track: Granular AST Control
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"id": "granular_ast_control_20260510",
|
||||
"title": "Granular AST Control (Signatures vs. Definitions)",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Implementation Plan: Granular AST Control
|
||||
|
||||
## Phase 1: Models & UI State
|
||||
- [x] Update `FileItem` model in `src/models.py` to support the new AST states.
|
||||
- [x] Update `src/gui_2.py` Context Panel to render toggle buttons/dropdowns for the new states.
|
||||
|
||||
## Phase 2: Aggregation Logic
|
||||
- [x] Modify `src/aggregate.py` to intercept files with these states and call the appropriate `tree-sitter` MCP tools.
|
||||
- [x] Ensure caching works for the new AST extraction states.
|
||||
@@ -1,9 +0,0 @@
|
||||
# Specification: Granular AST Control (Signatures vs. Definitions)
|
||||
|
||||
## Overview
|
||||
Introduce 'AST Signatures' and 'AST Definitions' states in the Context Panel for C/C++ files to allow granular control over context exposure without blowing up token limits.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Context panel file items support two new states: `AST Signatures` and `AST Definitions`.
|
||||
- [ ] `aggregate.py` respects these states by invoking the `ts_c_get_skeleton` / `ts_cpp_get_skeleton` tools accordingly.
|
||||
- [ ] Visual indicators in the UI clearly show the current aggregation state of each file.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track gui_2_cleanup_20260513 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"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."
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
# Implementation Plan: GUI 2.py Cleanup & Structural Awareness
|
||||
|
||||
## Phase 1: `gui_2.py` Structural Analysis & Init Cleanup
|
||||
- [x] Task: Audit `gui_2.py` state variables and `__init__` declarations to identify redundancies or disorganization.
|
||||
- [x] Task: Refactor `gui_2.py`'s `__init__` method to group related state variables and improve clarity.
|
||||
- [x] Task: Verify GUI initialization functionality and ensure no regressions using manual/test hooks.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: `gui_2.py` Structural Analysis & Init Cleanup' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Study & Document Codebase Conventions
|
||||
- [x] Task: Study recent changes to `gui_2.py` (via git diffs and current file state) to identify established conventions for type hints, layout logic, and ImGui scoping.
|
||||
- [x] Task: Synthesize learnings to update `conductor/code_styleguides/python.md` with specific, explicit coding conventions.
|
||||
- [x] Task: Update `conductor/product-guidelines.md` with high-level structural and maintenance strategies derived from the codebase study.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 2: Study & Document Codebase Conventions' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Apply Conventions & Finalize `gui_2.py` Nitpicks
|
||||
- [x] Task: Audit `gui_2.py` against the newly documented conventions to identify remaining structural nitpicks.
|
||||
- [x] Task: Apply formatting, type hint corrections, and layout refactoring to bring the rest of `gui_2.py` into alignment.
|
||||
- [x] Task: Run automated test suite to ensure structural changes haven't broken the rendering pipeline.
|
||||
- [x] Task: Conductor - User Manual Verification 'Phase 3: Apply Conventions & Finalize `gui_2.py` Nitpicks' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: MCP Tool Enhancements for Structural Awareness
|
||||
- [x] Task: Investigate existing Python MCP tool scripts (e.g., `py_get_skeleton`, `py_get_code_outline` implementations) for AST parsing logic.
|
||||
- [x] Task: Enhance AST parsing logic to better extract and expose type annotations from Python source files.
|
||||
- [x] Task: Modify structural extraction tools to recognize and highlight common ImGui/Dear PyGui patterns.
|
||||
- [x] Task: Write/update tests for MCP tools to verify accurate annotation and pattern parsing.
|
||||
- [~] Task: Conductor - User Manual Verification 'Phase 4: MCP Tool Enhancements for Structural Awareness' (Protocol in workflow.md)
|
||||
@@ -1,30 +0,0 @@
|
||||
# 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
|
||||
1. **Study & Documentation**:
|
||||
- Study the recent changes made to `gui_2.py` to identify conventions regarding type hints, state organization, and ImGui rendering patterns.
|
||||
- Update `conductor/product-guidelines.md` with high-level maintenance strategies derived from the study.
|
||||
- Update `conductor/code_styleguides/python.md` with explicit coding conventions discovered (e.g., annotation formatting, class layout).
|
||||
2. **`gui_2.py` Cleanup (Nitpicks)**:
|
||||
- Apply the formalized conventions to any remaining unorganized sections of `gui_2.py` (e.g., finishing `__init__` refactoring or scattered state).
|
||||
3. **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.md` and `conductor/code_styleguides/python.md` are updated with the newly derived insights.
|
||||
- `gui_2.py` is 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 `AppController` or DAG Engine logic.
|
||||
- Rewriting `gui_2.py` in a different UI framework.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track gui_crash_fixes_20260531 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "gui_crash_fixes_20260531",
|
||||
"type": "bug",
|
||||
"status": "new",
|
||||
"created_at": "2026-05-31T00:00:00Z",
|
||||
"updated_at": "2026-05-31T00:00:00Z",
|
||||
"description": "Fix GUI Crashes in Tool Preset Manager and Discussion Hub"
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
# Implementation Plan
|
||||
|
||||
## Phase 1: Fix Tool Preset Manager Crashes
|
||||
- [x] Task: Investigate `render_tool_preset_manager_content` in `src/gui_2.py` to identify the missing `current_cat_tools` initialization or scope.
|
||||
- [x] Task: Fix the `NameError` and ensure correct ImGui child window scoping (`EndChild` vs `End`) in the Tool Preset Manager.
|
||||
- [x] Task: Conductor - User Manual Verification 'Fix Tool Preset Manager Crashes' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Fix Discussion Hub Crashes
|
||||
- [x] Task: Investigate `render_discussion_entries` in `src/gui_2.py` to address the `IndexError` when deleting a discussion entry during rendering.
|
||||
- [x] Task: Fix the `IndexError` (e.g. by deferring deletion or copying the list) and associated ImGui scoping errors (`PopID() too many times!`).
|
||||
- [x] Task: Conductor - User Manual Verification 'Fix Discussion Hub Crashes' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Global Verification
|
||||
- [x] Task: Run `python scripts/check_imgui_scopes.py` to statically verify all ImGui scopes are correct across the codebase.
|
||||
- [x] Task: Run automated test suite to ensure no regressions were introduced.
|
||||
- [x] Task: Conductor - User Manual Verification 'Global Verification' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: Fix Take Tab Switching Bug
|
||||
- [x] Task: Investigate the logic that handles switching between Takes in the Discussion Hub (e.g. `render_takes_panel` or similar tab rendering function) to find why it reverts state.
|
||||
- [x] Task: Fix the state management bug causing the 1-frame flicker so the selected take persists.
|
||||
- [x] Task: Conductor - User Manual Verification 'Fix Take Tab Switching' (Protocol in workflow.md)
|
||||
@@ -1,28 +0,0 @@
|
||||
# Specification: Fix GUI Crashes in Tool Preset Manager and Discussion Hub
|
||||
|
||||
## Overview
|
||||
This track addresses several critical crashes in the immediate-mode GUI (`gui_2.py`) related to the Tool Preset Manager and the Discussion Hub. These issues include Python exceptions (`NameError`, `IndexError`) and underlying ImGui rendering assertion failures (`PopID() too many times`, `Must call EndChild() and not End()!`).
|
||||
|
||||
## Functional Requirements
|
||||
- **Tool Preset Manager Fixes:**
|
||||
- Resolve the `NameError: name 'current_cat_tools' is not defined` when interacting with or modifying tool preset entries (e.g., changing approval from "auto" to "ask").
|
||||
- Fix the ImGui scope mismatch (`Must call EndChild() and not End()!`) in the `tp_scroll_2FED8981` child window.
|
||||
- **Discussion Hub Fixes:**
|
||||
- Resolve the `IndexError: list index out of range` in `render_discussion_entries` that occurs when deleting a discussion entry.
|
||||
- Fix the associated ImGui scope mismatches (`Calling PopID() too many times!`) in the `HistoryChild_AB39D74A` window and tabs that trigger after the exception occurs.
|
||||
- **Take Management Fixes:**
|
||||
- Fix the bug where clicking a Take tab fails to switch the active take and falls back to the original take, causing a 1-frame flicker.
|
||||
|
||||
## Non-Functional Requirements
|
||||
- **ImGui Scope Safety:** Ensure all ImGui push/pop and begin/end pairs are correctly matched, even when exceptions are raised or lists are modified during rendering. The use of `imscope` context managers should be verified.
|
||||
- **Code Style:** Fixes must adhere to the 1-space indentation rule for Python code and follow the "ImGui Defer Patterns" described in the code style guides.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Modifying a tool preset (e.g., changing the approval status of `ts_cpp` tools) does not raise a `NameError` or crash the application.
|
||||
- [ ] Deleting a discussion entry removes the entry visually and does not raise an `IndexError`.
|
||||
- [ ] Both panels can be interacted with, opened, and closed without triggering ImGui assertion failures.
|
||||
- [ ] The `scripts/check_imgui_scopes.py` linter passes without new errors.
|
||||
|
||||
## Out of Scope
|
||||
- Adding new features to the Tool Preset Manager or Discussion Hub.
|
||||
- General refactoring of the GUI outside of fixing these specific crash points.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Track gui_refactor_stabilization_20260512 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "gui_refactor_stabilization_20260512",
|
||||
"type": "refactor",
|
||||
"status": "new",
|
||||
"created_at": "2026-05-12T00:00:00Z",
|
||||
"updated_at": "2026-05-12T00:00:00Z",
|
||||
"description": "Refactor gui_2.py to fix regressions and enforce better imgui scoping patterns using imgui_scopes.py."
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
# Implementation Plan: GUI Refactor & Stabilization
|
||||
|
||||
## Phase 1: Linting & Verification Foundations [checkpoint: 294217c]
|
||||
- [x] Task: Develop custom AST linter for ImGui scope/indentation in `scripts/check_imgui_scopes.py`. c359961
|
||||
- [x] Task: Write tests for the new AST linter to ensure it catches unclosed scopes and indentation mismatches. c359961
|
||||
- [x] Task: Expand API hooks in `src/api_hooks.py` to better simulate complex UI interactions (e.g., specific widget clicks, drag operations). a3b117d
|
||||
- [x] Task: Write tests for the new API hooks. a3b117d
|
||||
- [x] Task: Conductor - User Manual Verification 'Linting & Verification Foundations' (Protocol in workflow.md) 294217c
|
||||
|
||||
## Phase 2: Targeted Sub-agent Test Framework [checkpoint: 972ff1b]
|
||||
- [x] Task: Design and implement a focused test suite structure in `tests/` specifically for rapid sub-agent GUI verification without full E2E overhead. 7c0ce9d
|
||||
- [x] Task: Migrate or create at least 3 high-value tests for the main panel rendering paths into this new suite. 7c0ce9d
|
||||
- [x] Task: Verify the targeted suite runs quickly and reliably. 7c0ce9d
|
||||
- [x] Task: Conductor - User Manual Verification 'Targeted Sub-agent Test Framework' (Protocol in workflow.md) 972ff1b
|
||||
|
||||
## Phase 3: Piecemeal Refactoring - Main Panels (Part 1) [checkpoint: f3e307f]
|
||||
- [x] Task: Audit `gui_2.py` main panel rendering functions to identify the most critical scoping issues based on recent commits. 325970e
|
||||
- [x] Task: Refactor the first identified critical panel rendering path in `gui_2.py` to use `imgui_scopes.py` patterns. 325970e
|
||||
- [x] Task: Run targeted sub-agent tests and the custom AST linter against the modified panel. Fix any failures. 325970e
|
||||
- [x] Task: Conductor - User Manual Verification 'Piecemeal Refactoring - Main Panels (Part 1)' (Protocol in workflow.md) f3e307f
|
||||
|
||||
## Phase 4: Piecemeal Refactoring - Main Panels (Part 2) [checkpoint: f79cdb9]
|
||||
- [x] Task: Refactor the second identified critical panel rendering path in `gui_2.py` to use `imgui_scopes.py` patterns. dd44582
|
||||
- [x] Task: Run targeted sub-agent tests and the custom AST linter against the modified panel. Fix any failures. dd44582
|
||||
- [x] Task: Run the full E2E test suite to ensure no broad regressions were introduced. dd44582
|
||||
- [x] Task: Conductor - User Manual Verification 'Piecemeal Refactoring - Main Panels (Part 2)' (Protocol in workflow.md) f79cdb9
|
||||
@@ -1,30 +0,0 @@
|
||||
# Implementation Plan: Modular Context Composition UI
|
||||
|
||||
## Objective
|
||||
Refactor the monolithic `_render_context_composition_panel` in `src/gui_2.py` into smaller, semantic methods to improve readability, maintainability, and reduce the complexity of the main GUI orchestrator.
|
||||
|
||||
## Key Files & Context
|
||||
- `src/gui_2.py`: The target for refactoring.
|
||||
- `src/imgui_scopes.py`: Used for scoped ImGui blocks.
|
||||
|
||||
## Implementation Steps
|
||||
|
||||
### Phase 1: Infrastructure & Background Tasks
|
||||
- [ ] Task: Extract file stats background worker logic into `_update_context_file_stats()`.
|
||||
- [ ] Task: In `_render_context_composition_panel`, ensure state variables (`_file_stats_cache`, etc.) are initialized once.
|
||||
|
||||
### Phase 2: Extract Sub-Panels
|
||||
- [ ] Task: Extract the batch action bar logic into `_render_context_batch_actions()`.
|
||||
- [ ] Task: Extract the grouped files tree table logic into `_render_context_files_table()`.
|
||||
- [ ] Task: Extract the screenshots section into `_render_context_screenshots()`.
|
||||
- [ ] Task: Extract the context presets section into `_render_context_presets()`.
|
||||
|
||||
### Phase 3: Assembly & Verification
|
||||
- [x] Task: Reassemble `_render_context_composition_panel` by calling the new sub-methods.
|
||||
- [x] Task: Run the custom AST linter to ensure all scopes are correctly closed.
|
||||
- [x] Task: Run fast render tests to verify no regressions in the context panel.
|
||||
|
||||
## Verification & Testing
|
||||
- **AST Linting**: `uv run python scripts/check_imgui_scopes.py src/gui_2.py`
|
||||
- **Fast Render Tests**: `uv run pytest tests/test_gui_fast_render.py`
|
||||
- **Manual Verification**: Open the Context Composition panel, verify batch actions work, files are correctly grouped and listed, and presets can be saved/loaded.
|
||||
@@ -1,34 +0,0 @@
|
||||
# Implementation Plan: Clean Theme Abstraction
|
||||
|
||||
## Objective
|
||||
Decouple the NERV theme logic and FX from `src/gui_2.py` by introducing a semantic theme layer in `src/theme_2.py`. This will remove scattered `is_nerv_active()` checks and keep the ImGui hierarchy clean.
|
||||
|
||||
## Key Files & Context
|
||||
- `src/theme_2.py`: The primary theming interface.
|
||||
- `src/gui_2.py`: The main GUI module containing the "cruft".
|
||||
- `src/theme_nerv.py` & `src/theme_nerv_fx.py`: NERV-specific colors and effects.
|
||||
- `src/imgui_scopes.py`: Context managers for ImGui scopes.
|
||||
|
||||
## Implementation Steps
|
||||
|
||||
### Phase 1: Semantic Theme Layer Foundations
|
||||
- [ ] Task: In `src/theme_2.py`, define semantic color functions (e.g., `ai_text_color()`, `alert_color()`, `warning_color()`) that return theme-specific colors.
|
||||
- [ ] Task: In `src/theme_2.py`, implement context manager helpers (e.g., `ai_text_style()`, `alert_style()`) that wrap `imscope.style_color`.
|
||||
- [ ] Task: In `src/theme_2.py`, add a `render_post_fx(width, height, ai_status, crt_enabled)` hook that encapsulates CRT and Alert pulsing effects.
|
||||
- [ ] Task: Move `CRTFilter`, `AlertPulsing`, and `StatusFlicker` instances from `App` class to `src/theme_2.py` (private module state).
|
||||
|
||||
### Phase 2: Refactor `gui_2.py`
|
||||
- [ ] Task: In `gui_2.py`, remove all NERV-specific filter/flicker/alert instances from `__init__`.
|
||||
- [ ] Task: In `_gui_func`, replace the NERV FX rendering block with a single call to `theme.render_post_fx()`.
|
||||
- [ ] Task: Systematically replace scattered `if is_nerv_active(): push_style_color(...)` blocks with the new semantic style context managers.
|
||||
- [ ] Task: Standardize status indicators (e.g., "PIPELINE PAUSED", "LIVE") to use semantic theme colors rather than manual `vec4` overrides.
|
||||
|
||||
### Phase 3: Verification & Cleanup
|
||||
- [ ] Task: Run the custom AST linter to ensure no unclosed scopes were introduced during refactoring.
|
||||
- [ ] Task: Run fast render tests to ensure UI stability.
|
||||
- [ ] Task: Verify that both NERV and standard themes still render correctly (visual verification).
|
||||
|
||||
## Verification & Testing
|
||||
- **AST Linting**: `uv run python scripts/check_imgui_scopes.py src/gui_2.py`
|
||||
- **Fast Render Tests**: `uv run pytest tests/test_gui_fast_render.py`
|
||||
- **Manual Verification**: Toggle NERV theme and verify CRT filter, alert pulsing, and DATA highlights are still active and correctly colored.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user