# Implementation Plan: MMA Orchestrator Integration

## Phase 1: Tier 1 Strategic PM Implementation
- [x] Task: PM Planning Hook
    - [x] Create `orchestrator_pm.py` to handle the Tier 1 Strategic prompt.
    - [x] Implement the `generate_tracks(user_request, repo_map)` function.
- [x] Task: Project History Aggregation
    - [x] Summarize past track results to provide context for new epics.

## Phase 2: Tier 2 Tactical Dispatcher Implementation
- [x] Task: Tech Lead Dispatcher Hook
    - [x] Create `conductor_tech_lead.py` to handle the Tier 2 Dispatcher prompt.
    - [x] Implement the `generate_tickets(track_brief, module_skeletons)` function.
- [x] Task: DAG Construction
    - [x] Build the topological dependency graph from the Tech Lead's ticket list.

## Phase 3: Guided Planning UX & Interaction
- [x] Task: Strategic Planning View
    - [x] Implement a "Track Proposal" modal in `gui_2.py` for reviewing Tier 1's plans.
    - [x] Allow manual editing of track goals and acceptance criteria (Manual Curation).
- [x] Task: Tactical Dispatcher View
    - [x] Implement a "Ticket DAG" visualization or interactive list in the MMA Dashboard.
    - [x] Allow manual "Skip", "Retry", or "Re-assign" actions on individual tickets.
- [x] Task: The Orchestrator Main Loop
    - [x] Implement the async state machine in `gui_2.py` that moves from Planning -> Dispatching -> Execution.
- [x] Task: Project Metadata Serialization
    - [x] Persist the active epic, tracks, and tickets to `manual_slop.toml`.

## Phase 4: Product Alignment & Refinement
- [x] Task: UX Differentiator Audit
    - [x] Ensure the UX prioritizes "Expert Oversight" over "Full Autonomy" (Manual Slop vs. Gemini CLI).
    - [x] Add detailed token metrics and Tier-specific latency indicators to the Dashboard.

## Phase 5: Exhaustive Testing & Regression
- [x] Task: Headless Engine Verification (d087a20)
    - [x] Create `tests/test_orchestration_logic.py` to verify Tier 1 -> Tier 2 -> Tier 3 flow without a GUI.
    - [x] Verify DAG resolution and error handling (e.g., blocked tickets).
- [x] Task: Visual Verification Suite (d087a20)
    - [x] Create `tests/visual_orchestration_verification.py` using `ApiHookClient`.
    - [x] Simulate a full "Epic" lifecycle: User Prompt -> Track Review -> Ticket Generation -> Execution.
- [x] Task: Core Regression Suite (d087a20)
    - [x] Run all existing MMA, Conductor, and GUI tests to ensure no regressions.
