diff --git a/conductor/tracks/mma_implementation_20260224/migration_epics.md b/conductor/tracks/mma_implementation_20260224/migration_epics.md index 32ec26e..d6b35be 100644 --- a/conductor/tracks/mma_implementation_20260224/migration_epics.md +++ b/conductor/tracks/mma_implementation_20260224/migration_epics.md @@ -101,3 +101,28 @@ ### 3. Acceptance Testing Criteria - **Unit Tests:** Verify that massive error outputs never leak uncompressed into the main history logs. - **Integration Test:** Purposely introduce a syntax error in a local script. Ensure the orchestrator catches it, pings the mock/cheap API, and the history log receives the 20-word hint instead of the 200-line stack trace. + +## Track 5: UI Decoupling & Tier 1/2 Routing (The Final Boss) + +**Goal:** Bring the whole system online by letting Tier 1 and Tier 2 generate Tickets dynamically, managed via an asynchronous Event Bus. + +### 1. TDD Approach for \gui_2.py\ Decoupling +- Create \ ests/test_gui_decoupling.py\. +- Write tests that instantiate a mocked GUI instance listening to an \syncio.Queue\. +- Mock pushing \TrackStateUpdated\ and \TicketStarted\ events into the queue and ensure the GUI updates its view state rather than calling LLM endpoints directly. +- **Red Phase:** Failure occurs because \gui_2.py\ is tightly coupled with \i_client.py\ logic. +- **Green Phase:** Implement the \AgentBus\ messaging system linking \multi_agent_conductor.py\ to \gui_2.py\. + +### 2. Tier 1/2 Routing Tasks +- **Task 5.1: The Event Bus** + - Implement an \syncio.Queue\ in \multi_agent_conductor.py\. +- **Task 5.2: Tier 1 & 2 System Prompts** + - Define system prompts that force the 3.1 Pro/3.5 Sonnet models to output strict JSON arrays defining the Tracks and Tickets (utilizing native Structured Outputs). +- **Task 5.3: The Dispatcher** + - Write an async loop that reads JSON from Tier 2, converts them into \Ticket\ objects, and pushes them onto the queue. + - Implement the Stub Resolver to enforce \contract_stubber\ dependent execution flow. +- **Task 5.4: UI Component Update** + - Remove direct LLM calls from \gui_2.py\. Wire user inputs into \UserRequestEvents\ for the Orchestrator's queue. + +### 3. Acceptance Testing Criteria +- **Integration Test:** Execute the full app stack in simulation. Issue a vague prompt ("Refactor the config system"). Ensure Tier 1 outputs a Track. Tier 2 breaks it into an interface stub Ticket and an implementation Ticket. The system executes the stub, updates the AST, and finishes the implementation automatically or allows step-through in Linear mode.