UAT: Spec-required built-in ACMS strategies not registered in BUILTIN_STRATEGIES — simple-keyword, semantic-embedding, breadth-depth-navigator, arce, temporal-archaeology, plan-decision-context unavailable by default #1430

Open
opened 2026-04-02 17:50:30 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/acms-builtin-strategies-registration
  • Commit Message: fix(acms): register spec-required built-in strategies in BUILTIN_STRATEGIES
  • Milestone: v3.4.0
  • Parent Epic: #935

Background and Context

ACMS v1 built-in context strategy registration in ACMSPipeline.BUILTIN_STRATEGIES was tested during UAT of v3.5.0 by instance uat-worker-acms-1. The specification (docs/specification.md) defines six named built-in strategies that must be available by default. The implementation registers three unrelated internal strategies instead, making the spec-required strategy names completely unavailable without manual register_strategy() calls.

Current Behavior

ACMSPipeline.BUILTIN_STRATEGIES only contains three internal strategies that are not in the spec's built-in list:

# src/cleveragents/application/services/acms_service.py line 632
BUILTIN_STRATEGIES: ClassVar[dict[str, type[ContextStrategy]]] = {
    "relevance": RelevanceStrategy,   # NOT in spec's built-in list
    "recency": RecencyStrategy,       # NOT in spec's built-in list
    "tiered": TieredStrategy,         # NOT in spec's built-in list
}

The spec-required strategies (SimpleKeywordStrategy, SemanticEmbeddingStrategy, BreadthDepthNavigatorStrategy, ArceStrategy, TemporalArchaeologyStrategy, PlanDecisionContextStrategy) are implemented in context_strategies.py and acms_advanced_strategies.py but are never registered in BUILTIN_STRATEGIES.

Steps to Reproduce

from cleveragents.application.services.acms_service import ACMSPipeline

print(list(ACMSPipeline.BUILTIN_STRATEGIES.keys()))
# Output: ['relevance', 'recency', 'tiered']
# Expected: should include 'simple-keyword', 'semantic-embedding', 'breadth-depth-navigator', etc.

# Trying to use a spec-required strategy fails:
try:
    pipeline = ACMSPipeline(default_strategy='simple-keyword')
except ValueError as e:
    print(e)
# Output: Unknown strategy 'simple-keyword'. Available: recency, relevance, tiered

Expected Behavior

Per docs/specification.md line 30590 and the strategy table at ~line 25540:

  • context.strategies.enabled default = ["simple-keyword", "semantic-embedding", "breadth-depth-navigator"]
  • All six built-in strategies should be available by default: simple-keyword, semantic-embedding, breadth-depth-navigator, arce, temporal-archaeology, plan-decision-context
  • The spec explicitly states these are "Built-in" strategies (line 3785)

Acceptance Criteria

  • ACMSPipeline.BUILTIN_STRATEGIES contains all six spec-required strategy keys: simple-keyword, semantic-embedding, breadth-depth-navigator, arce, temporal-archaeology, plan-decision-context
  • The three internal strategies (relevance, recency, tiered) are retained for backward compatibility
  • ACMSPipeline(default_strategy='simple-keyword') succeeds without raising ValueError
  • ACMSPipeline(default_strategy='semantic-embedding') succeeds without raising ValueError
  • ACMSPipeline(default_strategy='breadth-depth-navigator') succeeds without raising ValueError
  • The context.strategies.enabled config key resolves correctly with the spec-default value ["simple-keyword", "semantic-embedding", "breadth-depth-navigator"]
  • The --strategy CLI option for agents project context set accepts all six spec-documented built-in names
  • All nox stages pass
  • Coverage >= 97%

Supporting Information

Impact

  • The spec's default strategy list (["simple-keyword", "semantic-embedding", "breadth-depth-navigator"]) cannot be used without manual register_strategy() calls
  • Any code that relies on the spec-documented default strategies will fail with ValueError
  • The context.strategies.enabled config key is effectively non-functional for the spec-required strategy names
  • The --strategy CLI option for agents project context set (spec line 3785) cannot use the documented built-in names

Code Locations

  • src/cleveragents/application/services/acms_service.py line 632 — BUILTIN_STRATEGIES dict
  • src/cleveragents/application/services/context_strategies.py — strategies implemented but not registered
  • src/cleveragents/application/services/acms_advanced_strategies.py — strategies implemented but not registered

Proposed Fix

BUILTIN_STRATEGIES: ClassVar[dict[str, type[ContextStrategy]]] = {
    "simple-keyword": SimpleKeywordStrategy,
    "semantic-embedding": SemanticEmbeddingStrategy,
    "breadth-depth-navigator": BreadthDepthNavigatorStrategy,
    "arce": ArceStrategy,
    "temporal-archaeology": TemporalArchaeologyStrategy,
    "plan-decision-context": PlanDecisionContextStrategy,
    # Keep internal strategies for backward compatibility
    "relevance": RelevanceStrategy,
    "recency": RecencyStrategy,
    "tiered": TieredStrategy,
}

Found during UAT testing of ACMS v1 (v3.5.0) by instance uat-worker-acms-1.

Subtasks

  • Add imports for SimpleKeywordStrategy, SemanticEmbeddingStrategy, BreadthDepthNavigatorStrategy, ArceStrategy, TemporalArchaeologyStrategy, PlanDecisionContextStrategy in acms_service.py
  • Register all six spec-required strategies in ACMSPipeline.BUILTIN_STRATEGIES
  • Verify the three internal strategies (relevance, recency, tiered) are retained
  • Tests (Behave): Add/update scenarios asserting all six spec-required strategy names are present in BUILTIN_STRATEGIES
  • Tests (Behave): Add scenario asserting ACMSPipeline(default_strategy='simple-keyword') succeeds
  • Tests (Behave): Add scenario asserting ACMSPipeline(default_strategy='semantic-embedding') succeeds
  • Tests (Behave): Add scenario asserting ACMSPipeline(default_strategy='breadth-depth-navigator') succeeds
  • Tests (Robot): Add integration test verifying agents project context set --strategy simple-keyword succeeds
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (fix(acms): register spec-required built-in strategies in BUILTIN_STRATEGIES), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch fix/acms-builtin-strategies-registration.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.
## Metadata - **Branch**: `fix/acms-builtin-strategies-registration` - **Commit Message**: `fix(acms): register spec-required built-in strategies in BUILTIN_STRATEGIES` - **Milestone**: v3.4.0 - **Parent Epic**: #935 ## Background and Context ACMS v1 built-in context strategy registration in `ACMSPipeline.BUILTIN_STRATEGIES` was tested during UAT of v3.5.0 by instance `uat-worker-acms-1`. The specification (`docs/specification.md`) defines six named built-in strategies that must be available by default. The implementation registers three unrelated internal strategies instead, making the spec-required strategy names completely unavailable without manual `register_strategy()` calls. ## Current Behavior `ACMSPipeline.BUILTIN_STRATEGIES` only contains three internal strategies that are **not** in the spec's built-in list: ```python # src/cleveragents/application/services/acms_service.py line 632 BUILTIN_STRATEGIES: ClassVar[dict[str, type[ContextStrategy]]] = { "relevance": RelevanceStrategy, # NOT in spec's built-in list "recency": RecencyStrategy, # NOT in spec's built-in list "tiered": TieredStrategy, # NOT in spec's built-in list } ``` The spec-required strategies (`SimpleKeywordStrategy`, `SemanticEmbeddingStrategy`, `BreadthDepthNavigatorStrategy`, `ArceStrategy`, `TemporalArchaeologyStrategy`, `PlanDecisionContextStrategy`) are implemented in `context_strategies.py` and `acms_advanced_strategies.py` but are **never registered** in `BUILTIN_STRATEGIES`. ### Steps to Reproduce ```python from cleveragents.application.services.acms_service import ACMSPipeline print(list(ACMSPipeline.BUILTIN_STRATEGIES.keys())) # Output: ['relevance', 'recency', 'tiered'] # Expected: should include 'simple-keyword', 'semantic-embedding', 'breadth-depth-navigator', etc. # Trying to use a spec-required strategy fails: try: pipeline = ACMSPipeline(default_strategy='simple-keyword') except ValueError as e: print(e) # Output: Unknown strategy 'simple-keyword'. Available: recency, relevance, tiered ``` ## Expected Behavior Per `docs/specification.md` line 30590 and the strategy table at ~line 25540: - `context.strategies.enabled` default = `["simple-keyword", "semantic-embedding", "breadth-depth-navigator"]` - All six built-in strategies should be available by default: `simple-keyword`, `semantic-embedding`, `breadth-depth-navigator`, `arce`, `temporal-archaeology`, `plan-decision-context` - The spec explicitly states these are "Built-in" strategies (line 3785) ## Acceptance Criteria - [ ] `ACMSPipeline.BUILTIN_STRATEGIES` contains all six spec-required strategy keys: `simple-keyword`, `semantic-embedding`, `breadth-depth-navigator`, `arce`, `temporal-archaeology`, `plan-decision-context` - [ ] The three internal strategies (`relevance`, `recency`, `tiered`) are retained for backward compatibility - [ ] `ACMSPipeline(default_strategy='simple-keyword')` succeeds without raising `ValueError` - [ ] `ACMSPipeline(default_strategy='semantic-embedding')` succeeds without raising `ValueError` - [ ] `ACMSPipeline(default_strategy='breadth-depth-navigator')` succeeds without raising `ValueError` - [ ] The `context.strategies.enabled` config key resolves correctly with the spec-default value `["simple-keyword", "semantic-embedding", "breadth-depth-navigator"]` - [ ] The `--strategy` CLI option for `agents project context set` accepts all six spec-documented built-in names - [ ] All nox stages pass - [ ] Coverage >= 97% ## Supporting Information ### Impact - The spec's default strategy list (`["simple-keyword", "semantic-embedding", "breadth-depth-navigator"]`) cannot be used without manual `register_strategy()` calls - Any code that relies on the spec-documented default strategies will fail with `ValueError` - The `context.strategies.enabled` config key is effectively non-functional for the spec-required strategy names - The `--strategy` CLI option for `agents project context set` (spec line 3785) cannot use the documented built-in names ### Code Locations - `src/cleveragents/application/services/acms_service.py` line 632 — `BUILTIN_STRATEGIES` dict - `src/cleveragents/application/services/context_strategies.py` — strategies implemented but not registered - `src/cleveragents/application/services/acms_advanced_strategies.py` — strategies implemented but not registered ### Proposed Fix ```python BUILTIN_STRATEGIES: ClassVar[dict[str, type[ContextStrategy]]] = { "simple-keyword": SimpleKeywordStrategy, "semantic-embedding": SemanticEmbeddingStrategy, "breadth-depth-navigator": BreadthDepthNavigatorStrategy, "arce": ArceStrategy, "temporal-archaeology": TemporalArchaeologyStrategy, "plan-decision-context": PlanDecisionContextStrategy, # Keep internal strategies for backward compatibility "relevance": RelevanceStrategy, "recency": RecencyStrategy, "tiered": TieredStrategy, } ``` Found during UAT testing of ACMS v1 (v3.5.0) by instance `uat-worker-acms-1`. ## Subtasks - [ ] Add imports for `SimpleKeywordStrategy`, `SemanticEmbeddingStrategy`, `BreadthDepthNavigatorStrategy`, `ArceStrategy`, `TemporalArchaeologyStrategy`, `PlanDecisionContextStrategy` in `acms_service.py` - [ ] Register all six spec-required strategies in `ACMSPipeline.BUILTIN_STRATEGIES` - [ ] Verify the three internal strategies (`relevance`, `recency`, `tiered`) are retained - [ ] Tests (Behave): Add/update scenarios asserting all six spec-required strategy names are present in `BUILTIN_STRATEGIES` - [ ] Tests (Behave): Add scenario asserting `ACMSPipeline(default_strategy='simple-keyword')` succeeds - [ ] Tests (Behave): Add scenario asserting `ACMSPipeline(default_strategy='semantic-embedding')` succeeds - [ ] Tests (Behave): Add scenario asserting `ACMSPipeline(default_strategy='breadth-depth-navigator')` succeeds - [ ] Tests (Robot): Add integration test verifying `agents project context set --strategy simple-keyword` succeeds - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`fix(acms): register spec-required built-in strategies in BUILTIN_STRATEGIES`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch `fix/acms-builtin-strategies-registration`. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%.
Author
Owner

Dependency note: This issue is a child of Epic #935 (ACMS Context Assembly Pipeline — Functional CRP Handlers and Pipeline Components). It does not block the Epic directly, but it is a correctness gap that must be resolved for the Epic's acceptance criterion "At least 3 built-in strategies functional: simple-keyword, semantic-embedding, plan-decision-context" to be verifiable via the standard BUILTIN_STRATEGIES registration path.

Blocking relationship: This issue is independent of any currently open issue. It does not block any other tracked work at this time.

**Dependency note:** This issue is a child of Epic #935 (ACMS Context Assembly Pipeline — Functional CRP Handlers and Pipeline Components). It does **not** block the Epic directly, but it is a correctness gap that must be resolved for the Epic's acceptance criterion "At least 3 built-in strategies functional: simple-keyword, semantic-embedding, plan-decision-context" to be verifiable via the standard `BUILTIN_STRATEGIES` registration path. **Blocking relationship:** This issue is independent of any currently open issue. It does not block any other tracked work at this time.
freemo self-assigned this 2026-04-02 18:45:11 +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#1430
No description provided.