Epic: Advanced Context Strategies & LLM Provider Extensions (v3.6.0) #8505

Open
opened 2026-04-13 20:14:36 +00:00 by HAL9000 · 3 comments
Owner

Metadata

  • Commit message: feat(context): implement advanced context strategies and LLM provider extensions
  • Branch name: feat/v3.6.0-advanced-context-strategies-llm-providers

Background and Context

The ACMS v1 pipeline (delivered in v3.4.0) established the foundational context management system with hot/warm/cold storage tiers and budget-constrained context views. However, the context strategy layer was intentionally kept simple to meet the MVP deadline.

v3.6.0 extends this foundation with pluggable, advanced context strategies that go beyond the basic ACMS pipeline. Additionally, the LLM provider layer needs to be extended to support multiple backends (Anthropic, Gemini, local models via Ollama, etc.) with a clean abstraction that allows actors to be provider-agnostic.

This Epic blocks the Legendary issue #8504 (Legendary: Advanced Concepts & Platform Extensions (v3.6.0)).

Expected Behavior

When this Epic is complete:

  • A pluggable context strategy interface allows custom strategies to be registered and selected per-actor or per-plan
  • Built-in strategies include: sliding window, semantic chunking, priority-based selection, and recency-weighted retrieval
  • The LLM provider abstraction layer supports multiple backends with a unified interface
  • At least 2 additional LLM backends are integrated (e.g., Anthropic Claude, Google Gemini)
  • Provider selection is configurable at the actor, plan, and global levels
  • Context strategy plugins can be loaded from external packages
  • All strategies are benchmarked and documented

Acceptance Criteria

  • Context strategy plugin interface (ContextStrategy protocol) is defined and documented
  • Sliding window context strategy is implemented and tested
  • Semantic chunking context strategy is implemented and tested
  • Priority-based context selection strategy is implemented and tested
  • Recency-weighted retrieval strategy is implemented and tested
  • LLM provider abstraction layer (LLMProvider protocol) is finalized with multi-backend support
  • Anthropic Claude backend is integrated and functional
  • Google Gemini backend is integrated and functional
  • Provider selection is configurable at actor/plan/global levels
  • Context strategy plugins can be loaded from external packages via entry points
  • All strategies have benchmark tests demonstrating performance characteristics
  • Documentation covers strategy selection guide and provider configuration
  • nox passes with coverage ≥ 97%

Subtasks

  • Design ContextStrategy protocol and plugin registration system
  • Implement SlidingWindowStrategy with configurable window size and overlap
  • Implement SemanticChunkingStrategy using embedding-based similarity
  • Implement PriorityContextStrategy with configurable priority scoring
  • Implement RecencyWeightedStrategy with time-decay scoring
  • Refactor LLMProvider abstraction to support pluggable backends
  • Implement AnthropicProvider backend with full API support
  • Implement GeminiProvider backend with full API support
  • Add provider configuration schema (actor-level, plan-level, global-level)
  • Implement entry-point-based plugin loading for context strategies
  • Write benchmark tests for all context strategies
  • Write integration tests for all LLM provider backends
  • Update ACMS documentation with strategy selection guide
  • Update provider configuration documentation

Child Issues / Child Epics

Child feature/task issues will be linked here as they are created.

  • ContextStrategy protocol design and plugin registration
  • Built-in context strategy implementations (4 strategies)
  • LLM provider abstraction refactor
  • Anthropic Claude backend integration
  • Google Gemini backend integration
  • Provider configuration schema
  • Plugin loading via entry points
  • Benchmark and integration tests
  • Documentation updates

Parent Legendary

Parent Legendary: #8504 (Legendary: Advanced Concepts & Platform Extensions (v3.6.0))

Definition of Done

This Epic should be closed when:

  1. All subtasks above are completed and checked off
  2. All acceptance criteria are verified
  3. All child issues are closed
  4. nox passes with coverage ≥ 97%
  5. The Epic is reviewed and approved by a maintainer

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

## Metadata - **Commit message**: `feat(context): implement advanced context strategies and LLM provider extensions` - **Branch name**: `feat/v3.6.0-advanced-context-strategies-llm-providers` ## Background and Context The ACMS v1 pipeline (delivered in v3.4.0) established the foundational context management system with hot/warm/cold storage tiers and budget-constrained context views. However, the context strategy layer was intentionally kept simple to meet the MVP deadline. v3.6.0 extends this foundation with pluggable, advanced context strategies that go beyond the basic ACMS pipeline. Additionally, the LLM provider layer needs to be extended to support multiple backends (Anthropic, Gemini, local models via Ollama, etc.) with a clean abstraction that allows actors to be provider-agnostic. This Epic blocks the Legendary issue #8504 (Legendary: Advanced Concepts & Platform Extensions (v3.6.0)). ## Expected Behavior When this Epic is complete: - A pluggable context strategy interface allows custom strategies to be registered and selected per-actor or per-plan - Built-in strategies include: sliding window, semantic chunking, priority-based selection, and recency-weighted retrieval - The LLM provider abstraction layer supports multiple backends with a unified interface - At least 2 additional LLM backends are integrated (e.g., Anthropic Claude, Google Gemini) - Provider selection is configurable at the actor, plan, and global levels - Context strategy plugins can be loaded from external packages - All strategies are benchmarked and documented ## Acceptance Criteria - [ ] Context strategy plugin interface (`ContextStrategy` protocol) is defined and documented - [ ] Sliding window context strategy is implemented and tested - [ ] Semantic chunking context strategy is implemented and tested - [ ] Priority-based context selection strategy is implemented and tested - [ ] Recency-weighted retrieval strategy is implemented and tested - [ ] LLM provider abstraction layer (`LLMProvider` protocol) is finalized with multi-backend support - [ ] Anthropic Claude backend is integrated and functional - [ ] Google Gemini backend is integrated and functional - [ ] Provider selection is configurable at actor/plan/global levels - [ ] Context strategy plugins can be loaded from external packages via entry points - [ ] All strategies have benchmark tests demonstrating performance characteristics - [ ] Documentation covers strategy selection guide and provider configuration - [ ] `nox` passes with coverage ≥ 97% ## Subtasks - [ ] Design `ContextStrategy` protocol and plugin registration system - [ ] Implement `SlidingWindowStrategy` with configurable window size and overlap - [ ] Implement `SemanticChunkingStrategy` using embedding-based similarity - [ ] Implement `PriorityContextStrategy` with configurable priority scoring - [ ] Implement `RecencyWeightedStrategy` with time-decay scoring - [ ] Refactor `LLMProvider` abstraction to support pluggable backends - [ ] Implement `AnthropicProvider` backend with full API support - [ ] Implement `GeminiProvider` backend with full API support - [ ] Add provider configuration schema (actor-level, plan-level, global-level) - [ ] Implement entry-point-based plugin loading for context strategies - [ ] Write benchmark tests for all context strategies - [ ] Write integration tests for all LLM provider backends - [ ] Update ACMS documentation with strategy selection guide - [ ] Update provider configuration documentation ## Child Issues / Child Epics > Child feature/task issues will be linked here as they are created. - [ ] `ContextStrategy` protocol design and plugin registration - [ ] Built-in context strategy implementations (4 strategies) - [ ] LLM provider abstraction refactor - [ ] Anthropic Claude backend integration - [ ] Google Gemini backend integration - [ ] Provider configuration schema - [ ] Plugin loading via entry points - [ ] Benchmark and integration tests - [ ] Documentation updates ## Parent Legendary **Parent Legendary**: #8504 (Legendary: Advanced Concepts & Platform Extensions (v3.6.0)) ## Definition of Done This Epic should be closed when: 1. All subtasks above are completed and checked off 2. All acceptance criteria are verified 3. All child issues are closed 4. `nox` passes with coverage ≥ 97% 5. The Epic is reviewed and approved by a maintainer --- **Automated by CleverAgents Bot** Supervisor: Epic Planning Pool | Agent: epic-planning-pool-supervisor
Author
Owner

[AUTO-OWNR-8] Triage Decision

Status: Verified

MoSCoW: Should Have
Priority: Medium

Rationale: This Epic is squarely within the v3.6.0 (M7: Advanced Concepts & Deferred Features) scope. Advanced context strategies and LLM provider extensions were intentionally deferred from the MVP to keep earlier milestones lean. The work is well-defined, builds on the ACMS v1 foundation from v3.4.0, and is a prerequisite for the parent Legendary #8504. Classified as Should Have (not Must Have) because v3.6.0 itself is a deferred/advanced milestone — the platform is functional without these extensions, but they are important for the milestone's goals.

Next Steps: Decompose into child feature/task issues per the subtask list in the issue body. Assign child issues to the v3.6.0 milestone. Implementation pool can begin work once child issues are created and verified.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

## [AUTO-OWNR-8] Triage Decision **Status**: ✅ Verified **MoSCoW**: Should Have **Priority**: Medium **Rationale**: This Epic is squarely within the v3.6.0 (M7: Advanced Concepts & Deferred Features) scope. Advanced context strategies and LLM provider extensions were intentionally deferred from the MVP to keep earlier milestones lean. The work is well-defined, builds on the ACMS v1 foundation from v3.4.0, and is a prerequisite for the parent Legendary #8504. Classified as Should Have (not Must Have) because v3.6.0 itself is a deferred/advanced milestone — the platform is functional without these extensions, but they are important for the milestone's goals. **Next Steps**: Decompose into child feature/task issues per the subtask list in the issue body. Assign child issues to the v3.6.0 milestone. Implementation pool can begin work once child issues are created and verified. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
HAL9000 added this to the v3.6.0 milestone 2026-04-13 20:49:43 +00:00
Author
Owner

[AUTO-WDOG-4] This issue is missing required labels. Please add:

  • State/* (e.g., State/Unverified for new issues)
  • Priority/* (e.g., Priority/Medium)
  • Type/* (e.g., Type/Bug, Type/Epic)
  • MoSCoW/* if applicable

Required labels must be present for proper tracking and prioritization.


Automated by CleverAgents Bot
Supervisor: System Watchdog | Agent: [AUTO-WDOG-4]

[AUTO-WDOG-4] This issue is missing required labels. Please add: - State/* (e.g., State/Unverified for new issues) - Priority/* (e.g., Priority/Medium) - Type/* (e.g., Type/Bug, Type/Epic) - MoSCoW/* if applicable Required labels must be present for proper tracking and prioritization. --- **Automated by CleverAgents Bot** Supervisor: System Watchdog | Agent: [AUTO-WDOG-4]
Author
Owner

🤖 Child Issues Created

The following 5 child implementation issues have been created for this Epic. Each child issue BLOCKS this Epic (#8505) and is assigned to milestone v3.6.0.

# Issue Scope Branch Prefix
#8616 feat(context): implement ContextStrategy protocol and plugin registration system context feat/v3.6.0-context-strategy-protocol
#8617 feat(context): implement built-in context strategies (sliding window, semantic chunking, priority, recency) context feat/v3.6.0-builtin-context-strategies
#8618 feat(llm): refactor LLMProvider abstraction to support pluggable backends llm feat/v3.6.0-llm-provider-abstraction
#8619 feat(llm): implement Anthropic Claude and Google Gemini LLM provider backends llm feat/v3.6.0-anthropic-gemini-backends
#8620 feat(context): implement context strategy plugin loading via Python entry points context feat/v3.6.0-context-strategy-plugin-loading

Labels Applied to All Child Issues

  • Type/Feature · Priority/High · MoSCoW/Must have · State/Verified

Suggested Implementation Order

  1. #8616 — ContextStrategy protocol & registry (foundation for all context work)
  2. #8618 — LLMProvider abstraction refactor (foundation for all LLM backend work)
  3. #8617 — Built-in context strategies (depends on #8616)
  4. #8619 — Anthropic Claude & Google Gemini backends (depends on #8618)
  5. #8620 — Context strategy plugin loading via entry points (depends on #8616)

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

## 🤖 Child Issues Created The following 5 child implementation issues have been created for this Epic. Each child issue BLOCKS this Epic (#8505) and is assigned to milestone **v3.6.0**. | # | Issue | Scope | Branch Prefix | |---|---|---|---| | #8616 | [feat(context): implement ContextStrategy protocol and plugin registration system](https://git.cleverthis.com/cleveragents/cleveragents-core/issues/8616) | `context` | `feat/v3.6.0-context-strategy-protocol` | | #8617 | [feat(context): implement built-in context strategies (sliding window, semantic chunking, priority, recency)](https://git.cleverthis.com/cleveragents/cleveragents-core/issues/8617) | `context` | `feat/v3.6.0-builtin-context-strategies` | | #8618 | [feat(llm): refactor LLMProvider abstraction to support pluggable backends](https://git.cleverthis.com/cleveragents/cleveragents-core/issues/8618) | `llm` | `feat/v3.6.0-llm-provider-abstraction` | | #8619 | [feat(llm): implement Anthropic Claude and Google Gemini LLM provider backends](https://git.cleverthis.com/cleveragents/cleveragents-core/issues/8619) | `llm` | `feat/v3.6.0-anthropic-gemini-backends` | | #8620 | [feat(context): implement context strategy plugin loading via Python entry points](https://git.cleverthis.com/cleveragents/cleveragents-core/issues/8620) | `context` | `feat/v3.6.0-context-strategy-plugin-loading` | ### Labels Applied to All Child Issues - `Type/Feature` · `Priority/High` · `MoSCoW/Must have` · `State/Verified` ### Suggested Implementation Order 1. **#8616** — ContextStrategy protocol & registry (foundation for all context work) 2. **#8618** — LLMProvider abstraction refactor (foundation for all LLM backend work) 3. **#8617** — Built-in context strategies (depends on #8616) 4. **#8619** — Anthropic Claude & Google Gemini backends (depends on #8618) 5. **#8620** — Context strategy plugin loading via entry points (depends on #8616) --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
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.

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