Claude/implement cortex workflow 016c v bki ft pg9 v273 v2 sc hrj#1
Open
Claude/implement cortex workflow 016c v bki ft pg9 v273 v2 sc hrj#1
Conversation
Adds a sophisticated AI orchestration system that separates context management from task execution using two concurrent models: - Model A (Context Manager): Orchestrates context, manages memory graphs, selects relevant tools, and prepares curated input for the worker model - Model B (Worker Model): Executes tasks with a clean, focused context containing only necessary tools and information Key components: - CortexTypes: Comprehensive type definitions for the system - MemoryGraph: In-memory graph database for context storage and retrieval - ToolSelector: Intelligent tool selection algorithm based on intent analysis - CortexWorker: Worker execution wrapper for Model B - CortexOrchestrator: Core orchestration logic for Model A - CortexSession: Integration with OpenCode session system - cortex agent: New agent configuration for Cortex mode - CortexStatus UI: TUI component showing workflow state and metrics Features: - Intent analysis with capability detection - Semantic memory search with relevance scoring - Automatic tool dependency resolution - Multiple operational modes (single-task, multi-task, iterative) - Memory graph pruning and persistence - Real-time progress events and metrics Tests: - Memory graph unit tests - Tool selector unit tests - Orchestrator and type validation tests
…ibility - Add comprehensive token tracking with cache read/write and reasoning tokens - Integrate with Permission system for recoverable error handling - Add extensive Bus events for real-time UI updates: - PhaseChanged with previousPhase tracking - TaskStarted/TaskCompleted with task counts - TaskProgress for real-time tool call visibility - MetricsUpdated for live cost/token tracking - MemoryUpdated for entity count tracking - OrchestrationComplete with full summary - Error events with recovery information - Add performance utilities: - getPerformanceMetrics for detailed analysis - getStatus for real-time orchestration status - subscribe() for convenient event listening - Enhance UI component: - Display cache tokens (read/write) - Display reasoning tokens - Show per-task cost - Improved token row styling - Add comprehensive documentation (README.md) - Update tests for new token structure Integrates with Decimal.js for precise cost calculation and follows existing Session.getUsage patterns for token/cost tracking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.