chore(conductor): Add new track 'Review project codebase for API vendor alignment'

This commit is contained in:
2026-02-23 16:56:46 -05:00
parent faa37928cd
commit 6287f24e51
8 changed files with 113 additions and 2 deletions

BIN
.coverage

Binary file not shown.

View File

@@ -7,6 +7,11 @@ This file tracks all major tracks for the project. Each track has its own detail
- [x] **Track: Implement context visualization and memory management improvements** - [x] **Track: Implement context visualization and memory management improvements**
*Link: [./tracks/context_management_20260223/](./tracks/context_management_20260223/)* *Link: [./tracks/context_management_20260223/](./tracks/context_management_20260223/)*
---
- [ ] **Track: Review project codebase, documentation related to project, and make sure agenti vendor apis are being used as properly stated by offical documentation from google for gemini and anthropic for claude.**
*Link: [./tracks/api_vendor_alignment_20260223/](./tracks/api_vendor_alignment_20260223/)*

View File

@@ -0,0 +1,5 @@
# Track api_vendor_alignment_20260223 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)

View File

@@ -0,0 +1,8 @@
{
"track_id": "api_vendor_alignment_20260223",
"type": "chore",
"status": "new",
"created_at": "2026-02-23T12:00:00Z",
"updated_at": "2026-02-23T12:00:00Z",
"description": "Review project codebase, documentation related to project, and make sure agenti vendor apis are being used as properly stated by offical documentation from google for gemini and anthropic for claude."
}

View File

@@ -0,0 +1,56 @@
# Implementation Plan: API Usage Audit and Alignment
## Phase 1: Research and Comprehensive Audit
Identify all points of interaction with AI SDKs and compare them with latest official documentation.
- [ ] Task: List and categorize all AI SDK usage in the project.
- [ ] Search for all imports of `google.genai` and `anthropic`.
- [ ] Document specific functions and methods being called.
- [ ] Task: Research latest official documentation for `google-genai` and `anthropic` Python SDKs.
- [ ] Verify latest patterns for Client initialization.
- [ ] Verify latest patterns for Context/Prompt caching.
- [ ] Verify latest patterns for Tool/Function calling.
- [ ] Task: Conductor - User Manual Verification 'Phase 1: Research and Comprehensive Audit' (Protocol in workflow.md)
## Phase 2: Gemini (google-genai) Alignment
Align Gemini integration with documented best practices.
- [ ] Task: Refactor Gemini Client and Chat initialization if needed.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Optimize Gemini Context Caching.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Align Gemini Tool Declaration and handling.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Gemini (google-genai) Alignment' (Protocol in workflow.md)
## Phase 3: Anthropic Alignment
Align Anthropic integration with documented best practices.
- [ ] Task: Refactor Anthropic Client and Message creation if needed.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Optimize Anthropic Prompt Caching (`cache_control`).
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Align Anthropic Tool Declaration and handling.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Anthropic Alignment' (Protocol in workflow.md)
## Phase 4: History and Token Management
Ensure accurate token estimation and robust history handling.
- [ ] Task: Review and align token estimation logic for both providers.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Audit message history truncation and context window management.
- [ ] Write Tests
- [ ] Implement Feature
- [ ] Task: Conductor - User Manual Verification 'Phase 4: History and Token Management' (Protocol in workflow.md)
## Phase 5: Final Validation and Cleanup
- [ ] Task: Perform a full test run using `run_tests.py` to ensure 100% pass rate.
- [ ] Task: Conductor - User Manual Verification 'Phase 5: Final Validation and Cleanup' (Protocol in workflow.md)

View File

@@ -0,0 +1,29 @@
# Specification: API Usage Audit and Alignment
## Overview
This track involves a comprehensive audit of the "Manual Slop" codebase to ensure that the integration with Google Gemini (`google-genai`) and Anthropic Claude (`anthropic`) SDKs aligns perfectly with their latest official documentation and best practices. The goal is to identify discrepancies, performance bottlenecks, or deprecated patterns and implement the necessary fixes.
## Scope
- **Target:** Full codebase audit, with primary focus on `ai_client.py`, `mcp_client.py`, and any other modules interacting with AI SDKs.
- **Key Areas:**
- **Caching Mechanisms:** Verify Gemini context caching and Anthropic prompt caching implementation.
- **Tool Calling:** Audit function declarations, parameter schemas, and result handling.
- **History & Tokens:** Review message history management, token estimation accuracy, and context window handling.
## Functional Requirements
1. **SDK Audit:** Compare existing code patterns against the latest official Python SDK documentation for Gemini and Anthropic.
2. **Feature Validation:**
- Ensure `google-genai` usage follows the latest `Client` and `types` patterns.
- Ensure `anthropic` usage utilizes `cache_control` correctly for optimal performance.
3. **Discrepancy Remediation:** Implement code changes to align the implementation with documented standards.
4. **Validation:** Execute tests to ensure that API interactions remain functional and improved.
## Acceptance Criteria
- Full audit completed for all AI SDK interactions.
- Identified discrepancies are documented and fixed.
- Caching, tool calling, and history management logic are verified against latest SDK standards.
- All existing and new tests pass successfully.
## Out of Scope
- Adding support for new AI providers not already in the project.
- Major UI refactoring unless directly required by API changes.

View File

@@ -165,7 +165,7 @@ history = [
[discussion.discussions."test for gemini conductor"] [discussion.discussions."test for gemini conductor"]
git_commit = "ccdba69214aea169a4e707da7b425ae0c6139fca" git_commit = "ccdba69214aea169a4e707da7b425ae0c6139fca"
last_updated = "2026-02-23T15:30:43" last_updated = "2026-02-23T16:40:30"
history = [ history = [
"User:\nadded a file to yoru exposed files read it.", "User:\nadded a file to yoru exposed files read it.",
"User:\nI have read the `MainContext.md` file. It contains extensive documentation about the \"Manual Slop\" project.\n\nWas `MainContext.md` the file you were referring to? If not, please specify the file's name or path.", "User:\nI have read the `MainContext.md` file. It contains extensive documentation about the \"Manual Slop\" project.\n\nWas `MainContext.md` the file you were referring to? If not, please specify the file's name or path.",
@@ -221,6 +221,14 @@ history = [
"@2026-02-23T15:29:20\nSystem:\n[PERFORMANCE ALERT] Frame time high: 266.8ms. Please consider optimizing recent changes or reducing load.", "@2026-02-23T15:29:20\nSystem:\n[PERFORMANCE ALERT] Frame time high: 266.8ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T15:29:48\nSystem:\n[PERFORMANCE ALERT] Frame time high: 734.8ms. Please consider optimizing recent changes or reducing load.", "@2026-02-23T15:29:48\nSystem:\n[PERFORMANCE ALERT] Frame time high: 734.8ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T15:30:27\nSystem:\n[PERFORMANCE ALERT] Frame time high: 160.9ms. Please consider optimizing recent changes or reducing load.", "@2026-02-23T15:30:27\nSystem:\n[PERFORMANCE ALERT] Frame time high: 160.9ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:03:29\nSystem:\n[PERFORMANCE ALERT] Frame time high: 862.8ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:04:08\nSystem:\n[PERFORMANCE ALERT] Frame time high: 146.3ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:17:39\nSystem:\n[PERFORMANCE ALERT] Frame time high: 790.9ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:18:19\nSystem:\n[PERFORMANCE ALERT] Frame time high: 170.3ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:18:49\nSystem:\n[PERFORMANCE ALERT] Frame time high: 371.8ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:19:29\nSystem:\n[PERFORMANCE ALERT] Frame time high: 158.2ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:19:59\nSystem:\n[PERFORMANCE ALERT] Frame time high: 221.8ms. Please consider optimizing recent changes or reducing load.",
"@2026-02-23T16:29:49\nSystem:\n[PERFORMANCE ALERT] Frame time high: 795.2ms. Please consider optimizing recent changes or reducing load.",
] ]
[agent.tools] [agent.tools]

View File

@@ -35,5 +35,5 @@ active = "main"
[discussion.discussions.main] [discussion.discussions.main]
git_commit = "" git_commit = ""
last_updated = "2026-02-23T15:34:25" last_updated = "2026-02-23T16:52:30"
history = [] history = []