feat(context): implement index query API for context assembly (by path, extension, recency) #5238

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

Background

Part of Epic #5169 (Large Project Indexing). Implements the index query API that allows the ContextAssembler to efficiently query the project index for relevant files based on path patterns, file extensions, and recency.

Expected Behavior

  • IndexQuery.by_path(pattern) — find files matching glob pattern
  • IndexQuery.by_extension(ext) — find files with given extension
  • IndexQuery.by_recency(days) — find files modified within N days
  • IndexQuery.combine(*queries) — combine multiple queries with AND/OR
  • Results sorted by relevance score

Subtasks

  • Implement IndexQuery builder with path, extension, recency filters
  • Implement query execution against SQLite index
  • Implement relevance scoring for query results
  • Integrate IndexQuery into ContextAssembler for file selection
  • Write Behave unit tests for query operations

Definition of Done

  • All query types work correctly
  • Query results sorted by relevance
  • ContextAssembler uses index queries for file selection
  • All nox stages pass
  • Coverage >= 97%

Metadata

  • Branch: feat/v3.4.0/acms-index-query
  • Commit Message: feat(context): implement index query API for context assembly
  • Milestone: v3.4.0
  • Parent Epic: #5169
  • Depends on: #5237 (ProjectIndexer must exist first)

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

## Background Part of Epic #5169 (Large Project Indexing). Implements the index query API that allows the `ContextAssembler` to efficiently query the project index for relevant files based on path patterns, file extensions, and recency. ## Expected Behavior - `IndexQuery.by_path(pattern)` — find files matching glob pattern - `IndexQuery.by_extension(ext)` — find files with given extension - `IndexQuery.by_recency(days)` — find files modified within N days - `IndexQuery.combine(*queries)` — combine multiple queries with AND/OR - Results sorted by relevance score ## Subtasks - [ ] Implement `IndexQuery` builder with path, extension, recency filters - [ ] Implement query execution against SQLite index - [ ] Implement relevance scoring for query results - [ ] Integrate `IndexQuery` into `ContextAssembler` for file selection - [ ] Write Behave unit tests for query operations ## Definition of Done - [ ] All query types work correctly - [ ] Query results sorted by relevance - [ ] ContextAssembler uses index queries for file selection - [ ] All nox stages pass - [ ] Coverage >= 97% ## Metadata - **Branch**: `feat/v3.4.0/acms-index-query` - **Commit Message**: `feat(context): implement index query API for context assembly` - **Milestone**: v3.4.0 - **Parent Epic**: #5169 - **Depends on**: #5237 (ProjectIndexer must exist first) --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.4.0 milestone 2026-04-09 03:51:49 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — ACMS context implementation required for v3.4.0 milestone
  • Story Points: 5 (L) — substantial implementation work
  • MoSCoW: Must Have — context management is core ACMS functionality
  • 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 implementation required for v3.4.0 milestone - **Story Points**: 5 (L) — substantial implementation work - **MoSCoW**: Must Have — context management is core ACMS functionality - **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:53:28 +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#5238
No description provided.