# Implementation Plan: Manual Block/Unblock Control (manual_block_control_20260306)

> **Reference:** [Spec](./spec.md) | [Architecture Guide](../../../docs/guide_architecture.md)

## Phase 1: Add Manual Block Fields
Focus: Add manual_block flag to Ticket

- [ ] Task 1.1: Initialize MMA Environment
- [ ] Task 1.2: Add manual_block field to Ticket
    - WHERE: `src/models.py` `Ticket` dataclass
    - WHAT: Add `manual_block: bool = False`
    - HOW:
      ```python
      manual_block: bool = False
      ```

- [ ] Task 1.3: Add mark_manual_block method
    - WHERE: `src/models.py` `Ticket`
    - WHAT: Method to set manual block with reason
    - HOW:
      ```python
      def mark_manual_block(self, reason: str) -> None:
       self.status = "blocked"
       self.blocked_reason = f"[MANUAL] {reason}"
       self.manual_block = True
      ```

## Phase 2: Block/Unblock UI
Focus: Add block buttons to ticket display

- [ ] Task 2.1: Add block button
    - WHERE: `src/gui_2.py` ticket rendering
    - WHAT: Button to block with reason input
    - HOW: Modal with text input for reason

- [ ] Task 2.2: Add unblock button
    - WHERE: `src/gui_2.py` ticket rendering
    - WHAT: Button to clear manual block
    - HOW:
      ```python
      if ticket.manual_block and ticket.status == "blocked":
       if imgui.button("Unblock"):
        ticket.status = "todo"
        ticket.blocked_reason = None
        ticket.manual_block = False
      ```

## Phase 3: Cascade Integration
Focus: Trigger cascade on block/unblock

- [ ] Task 3.1: Call cascade_blocks after manual block
    - WHERE: `src/gui_2.py` or `src/multi_agent_conductor.py`
    - WHAT: Update downstream tickets
    - HOW: `self.dag.cascade_blocks()`

## Phase 4: Testing
- [ ] Task 4.1: Write unit tests
- [ ] Task 4.2: Conductor - Phase Verification
