feat(context): implement built-in context strategies (sliding window, semantic chunking, priority, recency) #8617

Open
opened 2026-04-13 21:16:01 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit message type: feat
  • Scope: context
  • Branch name prefix: feat/v3.6.0-builtin-context-strategies

Background and Context

As part of Epic #8505 (Advanced Context Strategies & LLM Provider Extensions), four built-in context strategies must be implemented: sliding window, semantic chunking, priority-based selection, and recency-weighted retrieval.

This issue depends on the ContextStrategy protocol being implemented first.

This issue blocks Epic #8505.

Expected Behavior

  • SlidingWindowStrategy: selects context within a sliding window of recent content
  • SemanticChunkingStrategy: chunks content by semantic similarity using embeddings
  • PriorityContextStrategy: selects context based on configurable priority scores
  • RecencyWeightedStrategy: weights context by recency with time-decay scoring

Acceptance Criteria

  • SlidingWindowStrategy is implemented with configurable window size and overlap
  • SemanticChunkingStrategy is implemented using embedding-based similarity
  • PriorityContextStrategy is implemented with configurable priority scoring
  • RecencyWeightedStrategy is implemented with time-decay scoring
  • All strategies implement the ContextStrategy protocol
  • Benchmark tests demonstrate performance characteristics
  • Unit tests achieve >= 97% coverage

Subtasks

  • Implement SlidingWindowStrategy
  • Implement SemanticChunkingStrategy (with embedding model)
  • Implement PriorityContextStrategy
  • Implement RecencyWeightedStrategy
  • Write benchmark tests for all strategies
  • Write unit tests for all strategies

Definition of Done

  1. All 4 built-in context strategies are implemented
  2. Benchmark tests demonstrate performance
  3. Unit tests pass with >= 97% coverage
  4. Code reviewed and merged to main branch

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit message type**: `feat` - **Scope**: `context` - **Branch name prefix**: `feat/v3.6.0-builtin-context-strategies` ## Background and Context As part of Epic #8505 (Advanced Context Strategies & LLM Provider Extensions), four built-in context strategies must be implemented: sliding window, semantic chunking, priority-based selection, and recency-weighted retrieval. This issue depends on the ContextStrategy protocol being implemented first. This issue blocks Epic #8505. ## Expected Behavior - `SlidingWindowStrategy`: selects context within a sliding window of recent content - `SemanticChunkingStrategy`: chunks content by semantic similarity using embeddings - `PriorityContextStrategy`: selects context based on configurable priority scores - `RecencyWeightedStrategy`: weights context by recency with time-decay scoring ## Acceptance Criteria - [ ] `SlidingWindowStrategy` is implemented with configurable window size and overlap - [ ] `SemanticChunkingStrategy` is implemented using embedding-based similarity - [ ] `PriorityContextStrategy` is implemented with configurable priority scoring - [ ] `RecencyWeightedStrategy` is implemented with time-decay scoring - [ ] All strategies implement the `ContextStrategy` protocol - [ ] Benchmark tests demonstrate performance characteristics - [ ] Unit tests achieve >= 97% coverage ## Subtasks - [ ] Implement `SlidingWindowStrategy` - [ ] Implement `SemanticChunkingStrategy` (with embedding model) - [ ] Implement `PriorityContextStrategy` - [ ] Implement `RecencyWeightedStrategy` - [ ] Write benchmark tests for all strategies - [ ] Write unit tests for all strategies ## Definition of Done 1. All 4 built-in context strategies are implemented 2. Benchmark tests demonstrate performance 3. Unit tests pass with >= 97% coverage 4. Code reviewed and merged to main branch --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.6.0 milestone 2026-04-13 21:16:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#8617
No description provided.