From d53f0e44ee79c4be171d104a9eeb932315acad51 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 23 Feb 2026 11:45:26 -0500 Subject: [PATCH] chore(conductor): Add new track 'Review vendor api usage in regards to conservative context handling' --- conductor/tracks.md | 7 +++++- .../tracks/api_metrics_20260223/index.md | 5 +++++ .../tracks/api_metrics_20260223/metadata.json | 8 +++++++ conductor/tracks/api_metrics_20260223/plan.md | 19 ++++++++++++++++ conductor/tracks/api_metrics_20260223/spec.md | 22 +++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 conductor/tracks/api_metrics_20260223/index.md create mode 100644 conductor/tracks/api_metrics_20260223/metadata.json create mode 100644 conductor/tracks/api_metrics_20260223/plan.md create mode 100644 conductor/tracks/api_metrics_20260223/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index 80c3d84..66fd218 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -5,4 +5,9 @@ This file tracks all major tracks for the project. Each track has its own detail --- - [x] **Track: Implement context visualization and memory management improvements** - *Link: [./tracks/context_management_20260223/](./tracks/context_management_20260223/)* \ No newline at end of file + *Link: [./tracks/context_management_20260223/](./tracks/context_management_20260223/)* + +--- + +- [ ] **Track: Review vendor api usage in regards to conservative context handling** + *Link: [./tracks/api_metrics_20260223/](./tracks/api_metrics_20260223/)* \ No newline at end of file diff --git a/conductor/tracks/api_metrics_20260223/index.md b/conductor/tracks/api_metrics_20260223/index.md new file mode 100644 index 0000000..4a848b5 --- /dev/null +++ b/conductor/tracks/api_metrics_20260223/index.md @@ -0,0 +1,5 @@ +# Track api_metrics_20260223 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) \ No newline at end of file diff --git a/conductor/tracks/api_metrics_20260223/metadata.json b/conductor/tracks/api_metrics_20260223/metadata.json new file mode 100644 index 0000000..596c954 --- /dev/null +++ b/conductor/tracks/api_metrics_20260223/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "api_metrics_20260223", + "type": "feature", + "status": "new", + "created_at": "2026-02-23T10:00:00Z", + "updated_at": "2026-02-23T10:00:00Z", + "description": "Review vendor api usage in regards to conservative context handling" +} \ No newline at end of file diff --git a/conductor/tracks/api_metrics_20260223/plan.md b/conductor/tracks/api_metrics_20260223/plan.md new file mode 100644 index 0000000..bb53df2 --- /dev/null +++ b/conductor/tracks/api_metrics_20260223/plan.md @@ -0,0 +1,19 @@ +# Implementation Plan + +## Phase 1: Metric Extraction and Logic Review +- [ ] Task: Extract explicit cache counts and lifecycle states from Gemini SDK + - [ ] Sub-task: Write Tests + - [ ] Sub-task: Implement Feature +- [ ] Task: Review and expose 'history bleed' (token limit proximity) flags + - [ ] Sub-task: Write Tests + - [ ] Sub-task: Implement Feature +- [ ] Task: Conductor - User Manual Verification 'Phase 1: Metric Extraction and Logic Review' (Protocol in workflow.md) + +## Phase 2: GUI Telemetry and Plotting +- [ ] Task: Implement token budget visualizer (e.g., Progress bars for limits) in Dear PyGui + - [ ] Sub-task: Write Tests + - [ ] Sub-task: Implement Feature +- [ ] Task: Implement active caches data display in Provider/Comms panel + - [ ] Sub-task: Write Tests + - [ ] Sub-task: Implement Feature +- [ ] Task: Conductor - User Manual Verification 'Phase 2: GUI Telemetry and Plotting' (Protocol in workflow.md) \ No newline at end of file diff --git a/conductor/tracks/api_metrics_20260223/spec.md b/conductor/tracks/api_metrics_20260223/spec.md new file mode 100644 index 0000000..d4f5643 --- /dev/null +++ b/conductor/tracks/api_metrics_20260223/spec.md @@ -0,0 +1,22 @@ +# Specification: Review vendor api usage in regards to conservative context handling + +## Overview +This track aims to optimize token efficiency and transparency by reviewing and improving how vendor APIs (Gemini and Anthropic) handle conservative context pruning. The primary focus is on extracting, plotting, and exposing deep metrics to the GUI so developers can intuit how close they are to API limits (e.g., token caps, cache counts, history bleed). + +## Scope +- **Gemini Hooks:** Review explicit context caching, cache invalidation, and tools declaration. +- **Global Orchestration:** Review global context boundaries within the main prompt lifecycle. +- **GUI Metrics:** Expose as much metric data as possible to the user interface (e.g., plotting token usage, visual indicators for when "history bleed" occurs, displaying the number of active caches). + +## Functional Requirements +- Implement extensive token and cache metric extraction from both Gemini and Anthropic API responses. +- Expose these metrics to the Dear PyGui frontend, potentially utilizing visual plots or progress bars to indicate token budget consumption. +- Implement tests to explicitly verify context rules, ensuring history pruning acts conservatively and predictable without data loss. + +## Non-Functional Requirements +- Ensure GUI rendering of new plots or dense metrics does not block the main thread. +- Adhere to the "Strict State Management" product guideline. + +## Out of Scope +- Major feature additions unrelated to context token management or telemetry. +- Expanding the AI's agentic capabilities (e.g., new tools). \ No newline at end of file