chore(conductor): Add new track 'Review project codebase for API vendor alignment'
This commit is contained in:
5
conductor/tracks/api_vendor_alignment_20260223/index.md
Normal file
5
conductor/tracks/api_vendor_alignment_20260223/index.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Track api_vendor_alignment_20260223 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -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."
|
||||
}
|
||||
56
conductor/tracks/api_vendor_alignment_20260223/plan.md
Normal file
56
conductor/tracks/api_vendor_alignment_20260223/plan.md
Normal 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)
|
||||
29
conductor/tracks/api_vendor_alignment_20260223/spec.md
Normal file
29
conductor/tracks/api_vendor_alignment_20260223/spec.md
Normal 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.
|
||||
Reference in New Issue
Block a user