feat(context): implement ContextAssembler service with policy-driven file selection #5220

Open
opened 2026-04-09 03:36:01 +00:00 by HAL9000 · 1 comment
Owner

Background

Part of Epic #5166 (Context Assembly Pipeline). Implements the ContextAssembler service that takes a project, applies context policies, and produces a scoped context view for actors.

Expected Behavior

  • ContextAssembler.assemble(project, policy, budget) returns a ContextView
  • Policy-driven file selection: include/exclude patterns, file type filters
  • Context view contains selected files with their content and metadata
  • Integration with TierManager for cached file content retrieval

Subtasks

  • Define ContextView and ContextPolicy models in src/cleveragents/context/models.py
  • Implement ContextAssembler service in src/cleveragents/context/assembler.py
  • Implement policy-driven file selection (include/exclude glob patterns)
  • Integrate with TierManager for cached content retrieval
  • Write Behave unit tests for context assembly

Definition of Done

  • ContextAssembler produces valid ContextView objects
  • Policy-driven file selection works correctly
  • TierManager integration works for cached content
  • All nox stages pass
  • Coverage >= 97%

Metadata

  • Branch: feat/v3.4.0/acms-context-assembler
  • Commit Message: feat(context): implement ContextAssembler service with policy-driven file selection
  • Milestone: v3.4.0
  • Parent Epic: #5166

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Background Part of Epic #5166 (Context Assembly Pipeline). Implements the `ContextAssembler` service that takes a project, applies context policies, and produces a scoped context view for actors. ## Expected Behavior - `ContextAssembler.assemble(project, policy, budget)` returns a `ContextView` - Policy-driven file selection: include/exclude patterns, file type filters - Context view contains selected files with their content and metadata - Integration with `TierManager` for cached file content retrieval ## Subtasks - [ ] Define `ContextView` and `ContextPolicy` models in `src/cleveragents/context/models.py` - [ ] Implement `ContextAssembler` service in `src/cleveragents/context/assembler.py` - [ ] Implement policy-driven file selection (include/exclude glob patterns) - [ ] Integrate with `TierManager` for cached content retrieval - [ ] Write Behave unit tests for context assembly ## Definition of Done - [ ] `ContextAssembler` produces valid `ContextView` objects - [ ] Policy-driven file selection works correctly - [ ] TierManager integration works for cached content - [ ] All nox stages pass - [ ] Coverage >= 97% ## Metadata - **Branch**: `feat/v3.4.0/acms-context-assembler` - **Commit Message**: `feat(context): implement ContextAssembler service with policy-driven file selection` - **Milestone**: v3.4.0 - **Parent Epic**: #5166 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.4.0 milestone 2026-04-09 03:36:53 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — ACMS context assembly and budget enforcement are required for v3.4.0 milestone
  • Story Points: 5 (L) — substantial implementation work
  • MoSCoW: Must Have — context assembly is the core of ACMS functionality
  • Parent Epic: EPIC #5166 (Context Assembly Pipeline) or #5167 (Context Budget Enforcement)
  • Assignee: HAL9000 — default assignment to maintain velocity

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

Issue triaged by project owner: - **State**: Verified - **Priority**: High — ACMS context assembly and budget enforcement are required for v3.4.0 milestone - **Story Points**: 5 (L) — substantial implementation work - **MoSCoW**: Must Have — context assembly is the core of ACMS functionality - **Parent Epic**: EPIC #5166 (Context Assembly Pipeline) or #5167 (Context Budget Enforcement) - **Assignee**: HAL9000 — default assignment to maintain velocity --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
HAL9000 self-assigned this 2026-04-09 03:42:43 +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#5220
No description provided.