feat(acms): implement ACMS pipeline core components — StrategySelector, BudgetAllocator, StrategyExecutor #7400

Open
opened 2026-04-10 19:02:04 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit Message: feat(acms): implement ACMS pipeline core components — StrategySelector, BudgetAllocator, StrategyExecutor
  • Branch: feature/m5-acms-pipeline-core
  • Milestone: v3.4.0
  • Parent Epic: #935

Background and Context

The ACMS Context Assembly Pipeline has 10 components. The first three are foundational — they select the strategy, allocate the budget, and execute the strategy to produce raw fragments. Without these, the pipeline cannot function.

Current state: ContextAssemblyPipeline exists but the component implementations are stubs or missing. The StrategyExecutor is incomplete; StrategySelector and BudgetAllocator need full implementation.

Expected Behavior

The pipeline's first three stages execute correctly:

  1. StrategySelector: Selects the appropriate context strategy based on the request type and actor configuration
  2. BudgetAllocator: Computes the context budget using the spec formula (available_tokens - preamble_reserve - skeleton_reserve)
  3. StrategyExecutor: Executes the selected strategy in parallel (if multiple strategies), producing raw ContextFragment objects

Acceptance Criteria

  • StrategySelector selects strategy based on request type and actor config — falls back to simple-keyword if no match
  • BudgetAllocator computes budget using spec formula — respects max_file_size and max_total_size constraints
  • StrategyExecutor executes strategies, supports parallel execution for multiple strategies
  • Pipeline scope resolution works: plan > project > global component overrides
  • At least simple-keyword strategy is functional end-to-end
  • BDD scenarios cover strategy selection, budget allocation, and strategy execution
  • Coverage >= 97%

Subtasks

  • Implement StrategySelector.select() with fallback to simple-keyword
  • Implement BudgetAllocator.allocate() with spec formula
  • Implement StrategyExecutor.execute() with parallel strategy support
  • Implement simple-keyword strategy as the default built-in strategy
  • Implement pipeline scope resolution (plan > project > global)
  • Tests (Behave): Add scenarios for StrategySelector
  • Tests (Behave): Add scenarios for BudgetAllocator
  • Tests (Behave): Add scenarios for StrategyExecutor
  • 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.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

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

## Metadata - **Commit Message**: `feat(acms): implement ACMS pipeline core components — StrategySelector, BudgetAllocator, StrategyExecutor` - **Branch**: `feature/m5-acms-pipeline-core` - **Milestone**: v3.4.0 - **Parent Epic**: #935 ## Background and Context The ACMS Context Assembly Pipeline has 10 components. The first three are foundational — they select the strategy, allocate the budget, and execute the strategy to produce raw fragments. Without these, the pipeline cannot function. Current state: `ContextAssemblyPipeline` exists but the component implementations are stubs or missing. The `StrategyExecutor` is incomplete; `StrategySelector` and `BudgetAllocator` need full implementation. ## Expected Behavior The pipeline's first three stages execute correctly: 1. **StrategySelector**: Selects the appropriate context strategy based on the request type and actor configuration 2. **BudgetAllocator**: Computes the context budget using the spec formula (available_tokens - preamble_reserve - skeleton_reserve) 3. **StrategyExecutor**: Executes the selected strategy in parallel (if multiple strategies), producing raw `ContextFragment` objects ## Acceptance Criteria - [ ] `StrategySelector` selects strategy based on request type and actor config — falls back to `simple-keyword` if no match - [ ] `BudgetAllocator` computes budget using spec formula — respects `max_file_size` and `max_total_size` constraints - [ ] `StrategyExecutor` executes strategies, supports parallel execution for multiple strategies - [ ] Pipeline scope resolution works: plan > project > global component overrides - [ ] At least `simple-keyword` strategy is functional end-to-end - [ ] BDD scenarios cover strategy selection, budget allocation, and strategy execution - [ ] Coverage >= 97% ## Subtasks - [ ] Implement `StrategySelector.select()` with fallback to `simple-keyword` - [ ] Implement `BudgetAllocator.allocate()` with spec formula - [ ] Implement `StrategyExecutor.execute()` with parallel strategy support - [ ] Implement `simple-keyword` strategy as the default built-in strategy - [ ] Implement pipeline scope resolution (plan > project > global) - [ ] Tests (Behave): Add scenarios for StrategySelector - [ ] Tests (Behave): Add scenarios for BudgetAllocator - [ ] Tests (Behave): Add scenarios for StrategyExecutor - [ ] 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. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: Epic Planner | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.4.0 milestone 2026-04-10 19:03:46 +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.

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