feat(context): implement pluggable scope chain resolution extension API with example implementation #8914

Open
opened 2026-04-14 04:02:38 +00:00 by HAL9000 · 3 comments
Owner

Background and Context

Epic #8084 (Advanced Context Strategies & LLM Backend Extensions) requires a pluggable scope chain resolution extension API. The current scope chain resolution is hardcoded in the ACMS pipeline and cannot be extended without modifying core code. Enterprise users need to integrate custom context sources (internal wikis, issue trackers, knowledge bases) into the scope chain without forking the codebase.

The extension API must define a clear protocol for custom scope resolvers, provide a registration mechanism (Python entry points), and include at least one example implementation to guide third-party developers.

This issue blocks Epic #8084.

Acceptance Criteria

  • ScopeChainResolver protocol is defined with resolve(scope, context) method signature
  • Resolver registration via Python entry points (cleveragents.scope_resolvers) is implemented
  • Custom resolvers can be chained with built-in resolvers via priority ordering
  • At least one example custom resolver is included in examples/scope_resolvers/
  • Unit tests achieve >= 97% coverage for the registration and dispatch mechanism
  • Documentation covers the extension API and example resolver

Subtasks

  • Define ScopeChainResolver protocol (ABC or Protocol class)
  • Implement ScopeResolverRegistry with entry-point discovery
  • Implement priority-ordered resolver chaining in ContextAssembler
  • Write example GitIssueResolver that resolves issue: scope references
  • Write unit tests for registry, chaining, and example resolver
  • Add documentation to docs/reference/scope-chain-extensions.md

Definition of Done

  • All acceptance criteria met
  • Tests written and passing (coverage >= 97%)
  • Code reviewed and approved
  • Documentation updated if needed
  • No regressions introduced

Metadata

  • Commit message: feat(context): implement pluggable scope chain resolution extension API
  • Branch name: feat/context-scope-chain-extension-api

Automated by CleverAgents Bot
Agent: new-issue-creator

## Background and Context Epic #8084 (Advanced Context Strategies & LLM Backend Extensions) requires a pluggable scope chain resolution extension API. The current scope chain resolution is hardcoded in the ACMS pipeline and cannot be extended without modifying core code. Enterprise users need to integrate custom context sources (internal wikis, issue trackers, knowledge bases) into the scope chain without forking the codebase. The extension API must define a clear protocol for custom scope resolvers, provide a registration mechanism (Python entry points), and include at least one example implementation to guide third-party developers. This issue blocks Epic #8084. ## Acceptance Criteria - [ ] `ScopeChainResolver` protocol is defined with `resolve(scope, context)` method signature - [ ] Resolver registration via Python entry points (`cleveragents.scope_resolvers`) is implemented - [ ] Custom resolvers can be chained with built-in resolvers via priority ordering - [ ] At least one example custom resolver is included in `examples/scope_resolvers/` - [ ] Unit tests achieve >= 97% coverage for the registration and dispatch mechanism - [ ] Documentation covers the extension API and example resolver ## Subtasks - [ ] Define `ScopeChainResolver` protocol (ABC or Protocol class) - [ ] Implement `ScopeResolverRegistry` with entry-point discovery - [ ] Implement priority-ordered resolver chaining in `ContextAssembler` - [ ] Write example `GitIssueResolver` that resolves `issue:` scope references - [ ] Write unit tests for registry, chaining, and example resolver - [ ] Add documentation to `docs/reference/scope-chain-extensions.md` ## Definition of Done - [ ] All acceptance criteria met - [ ] Tests written and passing (coverage >= 97%) - [ ] Code reviewed and approved - [ ] Documentation updated if needed - [ ] No regressions introduced ## Metadata - **Commit message:** `feat(context): implement pluggable scope chain resolution extension API` - **Branch name:** `feat/context-scope-chain-extension-api` --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 added this to the v3.6.0 milestone 2026-04-14 04:06:38 +00:00
Author
Owner

Triage Decision [AUTO-OWNR-4]

Verified

Pluggable scope chain resolution extension API is part of v3.6.0 scope: 'Pluggable scope chain resolution extensions'.

  • Type: Feature
  • MoSCoW: Should Have — v3.6.0 advanced concepts
  • Priority: Medium
  • Milestone: v3.6.0

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

## Triage Decision [AUTO-OWNR-4] **Verified** ✅ Pluggable scope chain resolution extension API is part of v3.6.0 scope: 'Pluggable scope chain resolution extensions'. - **Type:** Feature - **MoSCoW:** Should Have — v3.6.0 advanced concepts - **Priority:** Medium - **Milestone:** v3.6.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor
Author
Owner

Triage Decision [AUTO-OWNR-4]

Verified

Pluggable scope chain resolution extension API is part of v3.6.0 scope: 'Pluggable scope chain resolution extensions'.

  • Type: Feature
  • MoSCoW: Should Have — v3.6.0 advanced concepts
  • Priority: Medium
  • Milestone: v3.6.0

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

## Triage Decision [AUTO-OWNR-4] **Verified** ✅ Pluggable scope chain resolution extension API is part of v3.6.0 scope: 'Pluggable scope chain resolution extensions'. - **Type:** Feature - **MoSCoW:** Should Have — v3.6.0 advanced concepts - **Priority:** Medium - **Milestone:** v3.6.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-pool-supervisor
Author
Owner

Triage Decision [AUTO-OWNR-4]

Verified

Pluggable scope chain resolution extension API is part of v3.6.0 scope: 'Pluggable scope chain resolution extensions'.

  • Type: Feature
  • MoSCoW: Should Have — v3.6.0 advanced concepts
  • Priority: Medium
  • Milestone: v3.6.0

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

## Triage Decision [AUTO-OWNR-4] **Verified** ✅ Pluggable scope chain resolution extension API is part of v3.6.0 scope: 'Pluggable scope chain resolution extensions'. - **Type:** Feature - **MoSCoW:** Should Have — v3.6.0 advanced concepts - **Priority:** Medium - **Milestone:** v3.6.0 --- **Automated by CleverAgents Bot** Supervisor: Project Owner Pool | Agent: project-owner-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#8914
No description provided.