chore(conductor): Add 6 new tracks to the strict execution order queue

This commit is contained in:
2026-03-02 22:34:25 -05:00
parent 034acb0e54
commit 51939c430a
26 changed files with 262 additions and 20 deletions

View File

@@ -9,9 +9,27 @@ This file tracks all major tracks for the project. Each track has its own detail
- [ ] **Track: Test Suite Stabilization & Consolidation**
*Link: [./tracks/test_stabilization_20260302/](./tracks/test_stabilization_20260302/)*
- [ ] **Track: Strict Static Analysis & Type Safety**
*Link: [./tracks/strict_static_analysis_and_typing_20260302/](./tracks/strict_static_analysis_and_typing_20260302/)*
- [ ] **Track: Codebase Migration to `src` & Cleanup**
*Link: [./tracks/codebase_migration_20260302/](./tracks/codebase_migration_20260302/)*
- [ ] **Track: GUI Decoupling & Controller Architecture**
*Link: [./tracks/gui_decoupling_controller_20260302/](./tracks/gui_decoupling_controller_20260302/)*
- [ ] **Track: Hook API UI State Verification**
*Link: [./tracks/hook_api_ui_state_verification_20260302/](./tracks/hook_api_ui_state_verification_20260302/)*
- [ ] **Track: Robust JSON Parsing for Tech Lead**
*Link: [./tracks/robust_json_parsing_tech_lead_20260302/](./tracks/robust_json_parsing_tech_lead_20260302/)*
- [ ] **Track: Concurrent Tier Source Isolation**
*Link: [./tracks/concurrent_tier_source_tier_20260302/](./tracks/concurrent_tier_source_tier_20260302/)*
- [ ] **Track: Test Suite Performance & Flakiness**
*Link: [./tracks/test_suite_performance_and_flakiness_20260302/](./tracks/test_suite_performance_and_flakiness_20260302/)*
---
## Completed / Archived

View File

@@ -0,0 +1,5 @@
# Track concurrent_tier_source_tier_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "concurrent_tier_source_tier_20260302",
"type": "refactor",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Replace ai_client.current_tier global state with threading.local() for parallel agent safety."
}

View File

@@ -0,0 +1,10 @@
# Implementation Plan: Concurrent Tier Isolation
## Phase 1: Thread-Local Storage
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Replace `current_tier` with `threading.local()`.
- [ ] Task: Conductor - User Manual Verification 'Phase 1'
## Phase 2: Refactor & Test
- [ ] Task: Update loggers and test with mock concurrent threads.
- [ ] Task: Conductor - User Manual Verification 'Phase 2'

View File

@@ -0,0 +1,8 @@
# Track Specification: Concurrent Tier Source Isolation
## Overview
Prepares the architecture for parallel Tier 3/4 agents by replacing the global `ai_client.current_tier` with thread-safe `threading.local()` or explicit call signatures.
## Functional Requirements
- Refactor `current_tier` to be thread-safe.
- Update all logging calls to use the thread-safe context.

View File

@@ -0,0 +1,5 @@
# Track gui_decoupling_controller_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "gui_decoupling_controller_20260302",
"type": "refactor",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Extract the state machine and core lifecycle into a headless app_controller.py, leaving gui_2.py as a pure immediate-mode view."
}

View File

@@ -0,0 +1,18 @@
# Implementation Plan: GUI Decoupling
## Phase 1: Controller Skeleton
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Create `app_controller.py`.
- [ ] Task: Conductor - User Manual Verification 'Phase 1'
## Phase 2: State Migration
- [ ] Task: Move App state from `gui_2.py` to controller.
- [ ] Task: Conductor - User Manual Verification 'Phase 2'
## Phase 3: Logic Migration
- [ ] Task: Move non-rendering methods to controller.
- [ ] Task: Conductor - User Manual Verification 'Phase 3'
## Phase 4: Validation
- [ ] Task: Update all tests to mock/use the controller.
- [ ] Task: Conductor - User Manual Verification 'Phase 4'

View File

@@ -0,0 +1,9 @@
# Track Specification: GUI Decoupling & Controller Architecture
## Overview
`gui_2.py` is a monolithic God Object. This track extracts its business logic and state machine into `app_controller.py`, leaving the GUI as a pure immediate-mode view adhering to Data-Oriented Design.
## Functional Requirements
- Create `app_controller.py`.
- Migrate state variables and lifecycle methods from `gui_2.py` to the controller.
- Ensure `gui_2.py` only reads state and dispatches events.

View File

@@ -0,0 +1,5 @@
# Track hook_api_ui_state_verification_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "hook_api_ui_state_verification_20260302",
"type": "feature",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Add /api/gui/state GET endpoint and wire UI state variables for programmatic live_gui testing."
}

View File

@@ -0,0 +1,14 @@
# Implementation Plan: Hook API UI State
## Phase 1: API Endpoint
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Implement `/api/gui/state` GET endpoint.
- [ ] Task: Conductor - User Manual Verification 'Phase 1'
## Phase 2: State Wiring
- [ ] Task: Add UI state fields to `_settable_fields`.
- [ ] Task: Conductor - User Manual Verification 'Phase 2'
## Phase 3: Integration Tests
- [ ] Task: Write `live_gui` tests validating state retrieval.
- [ ] Task: Conductor - User Manual Verification 'Phase 3'

View File

@@ -0,0 +1,9 @@
# Track Specification: Hook API UI State Verification
## Overview
Adds an `/api/gui/state` endpoint to expose internal UI widget states (like `ui_focus_agent`) for reliable programmatic testing without user confirmation.
## Functional Requirements
- Add `/api/gui/state` endpoint to the HookServer.
- Wire UI state variables into `_settable_fields`.
- Write `live_gui` integration tests to assert widget states.

View File

@@ -0,0 +1,5 @@
# Track robust_json_parsing_tech_lead_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "robust_json_parsing_tech_lead_20260302",
"type": "bug",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Implement programmatic retry loop catching JSONDecodeError in Tier 2 ticket generation."
}

View File

@@ -0,0 +1,10 @@
# Implementation Plan: Robust JSON Parsing
## Phase 1: Retry Logic
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Implement retry loop in `conductor_tech_lead.py`.
- [ ] Task: Conductor - User Manual Verification 'Phase 1'
## Phase 2: Validation
- [ ] Task: Write unit tests simulating JSON hallucination.
- [ ] Task: Conductor - User Manual Verification 'Phase 2'

View File

@@ -0,0 +1,9 @@
# Track Specification: Robust JSON Parsing for Tech Lead
## Overview
`conductor_tech_lead.py` silently fails if Tier 2 outputs invalid JSON. This track adds an auto-retry loop that feeds tracebacks back to the LLM for self-correction.
## Functional Requirements
- Add retry loop in `generate_tickets`.
- Catch `JSONDecodeError` and reprompt the model.
- Abort after N failures.

View File

@@ -0,0 +1,5 @@
# Track strict_static_analysis_and_typing_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "strict_static_analysis_and_typing_20260302",
"type": "chore",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Resolve all mypy/ruff violations, enforce strict typing, and add pre-commit hooks."
}

View File

@@ -0,0 +1,18 @@
# Implementation Plan: Strict Static Analysis & Type Safety
## Phase 1: Configuration & Tooling
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Configure strict `mypy.ini` and update `pyproject.toml`.
- [ ] Task: Conductor - User Manual Verification 'Phase 1'
## Phase 2: Core Library Typing
- [ ] Task: Resolve typing in `api_hook_client.py` and models.
- [ ] Task: Conductor - User Manual Verification 'Phase 2'
## Phase 3: GUI Typing
- [ ] Task: Resolve typing in `gui_2.py`.
- [ ] Task: Conductor - User Manual Verification 'Phase 3'
## Phase 4: CI Integration
- [ ] Task: Implement pre-commit hooks for ruff and mypy.
- [ ] Task: Conductor - User Manual Verification 'Phase 4'

View File

@@ -0,0 +1,10 @@
# Track Specification: Strict Static Analysis & Type Safety
## Overview
The codebase suffers from massive type-safety debt (512+ mypy errors). This track resolves all violations, enforces strict typing across `gui_2.py` and `api_hook_client.py`, and integrates pre-commit checks.
## Functional Requirements
- Resolve all mypy errors.
- Resolve all remaining ruff violations.
- Enforce strict typing.
- Add CI/pre-commit hook for linting.

View File

@@ -0,0 +1,5 @@
# Track test_suite_performance_and_flakiness_20260302 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "test_suite_performance_and_flakiness_20260302",
"type": "chore",
"status": "new",
"created_at": "2026-03-02T22:30:00Z",
"updated_at": "2026-03-02T22:30:00Z",
"description": "Replace arbitrary time.sleep() calls with deterministic polling/Events and optimize test speed."
}

View File

@@ -0,0 +1,14 @@
# Implementation Plan: Test Suite Performance
## Phase 1: Audit & Polling Primitives
- [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator`
- [ ] Task: Create deterministic polling primitives in `conftest.py`.
- [ ] Task: Conductor - User Manual Verification 'Phase 1'
## Phase 2: Refactoring Sleeps
- [ ] Task: Replace `time.sleep` across integration tests.
- [ ] Task: Conductor - User Manual Verification 'Phase 2'
## Phase 3: Test Marking
- [ ] Task: Apply `@pytest.mark.slow` to long-running tests.
- [ ] Task: Conductor - User Manual Verification 'Phase 3'

View File

@@ -0,0 +1,9 @@
# Track Specification: Test Suite Performance & Flakiness
## Overview
The test suite is slow and flaky due to `time.sleep()`. This track replaces sleeps with deterministic polling (`threading.Event()`), aiming for a <10s core TDD loop.
## Functional Requirements
- Audit and remove `time.sleep()` in tests.
- Implement deterministic event polling.
- Mark slow integration tests with `@pytest.mark.slow`.