# Implementation Plan: Discussion Takes & Timeline Branching

## Phase 1: Backend Support for Timeline Branching [checkpoint: 4039589]
- [x] Task: Write failing tests for extending the session state model to support branching (tree-like history or parallel linear "takes" with a shared ancestor). [fefa06b]
- [x] Task: Implement backend logic to branch a session history at a specific message index into a new take ID. [fefa06b]
- [x] Task: Implement backend logic to promote a specific take ID into an independent, top-level session. [fefa06b]
- [x] Task: Conductor - User Manual Verification 'Phase 1: Backend Support for Timeline Branching' (Protocol in workflow.md)

## Phase 2: GUI Implementation for Tabbed Takes
- [ ] Task: Write GUI tests verifying the rendering and navigation of multiple tabs for a single session.
- [ ] Task: Implement a tabbed interface within the Discussion window to switch between different takes of the active session.
- [ ] Task: Add a "Split/Branch from here" action to individual message entries in the discussion history.
- [ ] Task: Add a UI button/action to promote the currently active take to a new separate session.
- [ ] Task: Conductor - User Manual Verification 'Phase 2: GUI Implementation for Tabbed Takes' (Protocol in workflow.md)

## Phase 3: Synthesis Workflow Formatting
- [ ] Task: Write tests for a new text formatting utility that takes multiple history sequences and generates a compressed, diff-like text representation.
- [ ] Task: Implement the sequence differencing and compression logic to clearly highlight variances between takes.
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Synthesis Workflow Formatting' (Protocol in workflow.md)

## Phase 4: Synthesis UI & Agent Integration
- [ ] Task: Write GUI tests for the multi-take selection interface and synthesis action.
- [ ] Task: Implement a UI mechanism allowing users to select multiple takes and provide a synthesis prompt.
- [ ] Task: Implement the execution pipeline to feed the compressed differences and user prompt to an AI agent, and route the generated synthesis to a new "take" tab.
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Synthesis UI & Agent Integration' (Protocol in workflow.md)