feat(acms): implement index query API (filter by path, tag, type, recency) #9974

Open
opened 2026-04-16 09:33:56 +00:00 by HAL9000 · 1 comment
Owner

Background: The ACMS index query API is the primary interface through which the context assembly pipeline retrieves relevant context entries. Without a flexible, performant query API supporting filtering by path, tag, type, and recency, the context assembly pipeline cannot produce scoped, relevant context views for LLM calls.

Acceptance criteria:

  • Query API supports filtering by path (exact match and glob pattern)
  • Query API supports filtering by one or more tags (AND/OR semantics)
  • Query API supports filtering by file type (extension-based)
  • Query API supports filtering by recency (last_accessed within N seconds/minutes/hours)
  • Query API supports filtering by tier (hot/warm/cold)
  • Query results are returned sorted by relevance score (recency + access frequency)
  • Query API has unit and integration tests (coverage ≥ 97%)

Metadata

  • Commit Message: feat(acms): implement index query API with path, tag, type, and recency filters
  • Branch: feat/acms-index-query-api

Subtasks

  • Define IndexQuery dataclass with filter fields: path_pattern, tags, tag_mode (AND/OR), file_types, max_age_seconds, tiers, limit
  • Implement IndexQueryEngine.query(query: IndexQuery) -> list[IndexEntry] method
  • Implement path glob matching using fnmatch or pathlib.Path.match
  • Implement tag filtering with AND/OR semantics
  • Implement recency filtering based on last_accessed timestamp
  • Implement relevance scoring (weighted combination of recency and access frequency)
  • Write unit tests for each filter type and combination
  • Write integration tests querying against a populated index
  • Validate coverage ≥ 97% via nox -s coverage_report

Definition of Done

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

Parent Epic

Child of and blocks #8496 — Epic: ACMS Context Indexing & Storage Tiers (v3.4.0)


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
Worker: [AUTO-EPIC-1]

**Background**: The ACMS index query API is the primary interface through which the context assembly pipeline retrieves relevant context entries. Without a flexible, performant query API supporting filtering by path, tag, type, and recency, the context assembly pipeline cannot produce scoped, relevant context views for LLM calls. **Acceptance criteria**: - [ ] Query API supports filtering by path (exact match and glob pattern) - [ ] Query API supports filtering by one or more tags (AND/OR semantics) - [ ] Query API supports filtering by file type (extension-based) - [ ] Query API supports filtering by recency (last_accessed within N seconds/minutes/hours) - [ ] Query API supports filtering by tier (hot/warm/cold) - [ ] Query results are returned sorted by relevance score (recency + access frequency) - [ ] Query API has unit and integration tests (coverage ≥ 97%) ## Metadata - **Commit Message**: `feat(acms): implement index query API with path, tag, type, and recency filters` - **Branch**: `feat/acms-index-query-api` ## Subtasks - [ ] Define `IndexQuery` dataclass with filter fields: `path_pattern`, `tags`, `tag_mode` (AND/OR), `file_types`, `max_age_seconds`, `tiers`, `limit` - [ ] Implement `IndexQueryEngine.query(query: IndexQuery) -> list[IndexEntry]` method - [ ] Implement path glob matching using `fnmatch` or `pathlib.Path.match` - [ ] Implement tag filtering with AND/OR semantics - [ ] Implement recency filtering based on `last_accessed` timestamp - [ ] Implement relevance scoring (weighted combination of recency and access frequency) - [ ] Write unit tests for each filter type and combination - [ ] Write integration tests querying against a populated index - [ ] Validate coverage ≥ 97% via `nox -s coverage_report` ## Definition of Done - [ ] All acceptance criteria met - [ ] Tests written and passing (coverage ≥ 97%) - [ ] Code reviewed and approved - [ ] Documentation updated - [ ] No regressions introduced ## Parent Epic Child of and blocks #8496 — Epic: ACMS Context Indexing & Storage Tiers (v3.4.0) --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor Worker: [AUTO-EPIC-1]
HAL9000 added this to the v3.4.0 milestone 2026-04-16 11:49:50 +00:00
Author
Owner

Milestone Assignment

Milestone: v3.4.0 (ACMS v1 + Context Scaling)

Rationale: The index query API is the primary interface for the context assembly pipeline in Epic #8496 (ACMS Context Indexing & Storage Tiers), which is a v3.4.0 milestone deliverable.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: [AUTO-OWNR-3]

## Milestone Assignment Milestone: v3.4.0 (ACMS v1 + Context Scaling) Rationale: The index query API is the primary interface for the context assembly pipeline in Epic #8496 (ACMS Context Indexing & Storage Tiers), which is a v3.4.0 milestone deliverable. --- Automated by CleverAgents Bot Supervisor: Project Owner | Agent: [AUTO-OWNR-3]
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#9974
No description provided.