conductor(archive): move 39 completed tracks (2026-05 to 2026-06) to archive/

This commit is contained in:
ed
2026-06-03 00:09:52 -04:00
parent 0ffeccc7d3
commit 594f14f943
160 changed files with 94 additions and 21 deletions
@@ -0,0 +1,5 @@
# Track discussion_metrics_and_compression_20260601 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
@@ -0,0 +1,8 @@
{
"track_id": "discussion_metrics_and_compression_20260601",
"type": "feature",
"status": "new",
"created_at": "2026-06-01T00:00:00Z",
"updated_at": "2026-06-01T00:00:00Z",
"description": "Add per-response token metrics and AI-assisted history compression"
}
@@ -0,0 +1,19 @@
# Implementation Plan: Discussion Metrics and Compression
## Phase 1: Metrics Visibility
- [x] Task: Update UI for Token Metrics
- [x] Modify `_render_comms_history_panel` and `render_discussion_entry` in `src/gui_2.py` to extract and prominently display `usage` stats (input, output, cache) from the entry payloads.
## Phase 2: Compression Helper Agent
- [x] Task: Implement Compression Agent
- [x] Create a new agent definition or function in `src/ai_client.py` (or a dedicated module) capable of receiving a discussion history and a system prompt instructing it to summarize and compact the history.
- [x] Task: Implement UI Triggers
- [x] Add a "Compress Discussion" button to the Discussion Hub UI.
- [x] Wire the button to dispatch the compression task to the background executor and display a loading indicator.
- [x] Upon completion, replace the older entries with the generated summary block.
## Phase 3: Verification
- [x] Task: Verification
- [x] Verify token metrics are visible per response.
- [x] Run the "Compress Discussion" tool on a heavy discussion and verify the history is successfully summarized without losing core context.
- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)
@@ -0,0 +1,21 @@
# Specification: Discussion Metrics and Compression
## 1. Overview
The user requested better visibility into token usage on a per-response and per-discussion basis, rather than just session-wide totals. Additionally, the current history truncation is deemed too naive. The user wants a smarter compression strategy utilizing a helper agent to summarize, categorize, and compact discussion entries (especially tool/vendor logs) when the token limit is approached.
## 2. Functional Requirements
* **Per-Response Metrics:** Update the Comms History and Discussion Hub panels to display token usage (input/output/cache) and remaining quota for each specific response.
* **Discussion-Level Metrics:** Add a summary of total token usage for the active discussion.
* **Helper Agent Compression:**
* Implement an asynchronous helper agent capable of analyzing a `discussion`'s history.
* The agent should categorize entries (e.g., tool calls, user prompts, AI thinking) and generate a compacted summary.
* Provide UI options to trigger this compression manually or set thresholds for automatic suggestions.
* **New Session Prompt:** Allow the AI to generate a "summary prompt" and "target prompt" to effortlessly transition a heavy, exhausted discussion into a fresh session with adjusted context.
## 3. Non-Functional Requirements
* **Performance:** The helper agent must run asynchronously to avoid blocking the main GUI thread.
## 4. Acceptance Criteria
* Token metrics are clearly visible per entry in the Comms History.
* A new "Compress Discussion" button triggers the helper agent, which successfully produces a compacted history.
* The system can transition an exhausted discussion into a new one using an AI-generated summary.