feat(cli): wire project context CLI stubs to ACMS pipeline #499

Closed
opened 2026-03-02 04:27:17 +00:00 by freemo · 3 comments
Owner

Metadata

  • Commit Message: feat(cli): wire project context CLI stubs to ACMS pipeline
  • Branch: feature/m5-context-cli-wiring

Background

The CLI currently has agents project context inspect and agents project context simulate commands that are explicit stubs raising "requires ACMS wiring and is not yet available." Once the ACMS pipeline (#188), CRP models (#190), and backend protocols are implemented, these commands need to be wired to the live ACMS services.

Acceptance Criteria

  • Wire agents project context inspect to query the ACMS pipeline and display current context state for a project.
  • Wire agents project context simulate to run a dry-run context assembly and display the assembled fragments, budget usage, and strategy selection.
  • Add agents project context set for configuring project-level context view overrides (tier weights, strategy preferences).
  • Add agents project context show for displaying current context configuration including effective pipeline config.
  • All commands respect output format flags (--format rich/plain/json/yaml).

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.

Subtasks

  • Wire agents project context inspect to live ACMS pipeline query.
  • Wire agents project context simulate to dry-run context assembly.
  • Implement agents project context set for config overrides.
  • Implement agents project context show for effective config display.
  • Add output formatting for all four commands.
  • Update docs/reference/project_context_cli.md with command examples.
  • Tests (Behave): Add features/context_cli_wiring.feature scenarios.
  • Tests (Robot): Add robot/context_cli_wiring.robot smoke tests.
  • Verify coverage >=97% via nox -s coverage_report.
  • Run nox (all default sessions), fix any errors.
## Metadata - **Commit Message**: `feat(cli): wire project context CLI stubs to ACMS pipeline` - **Branch**: `feature/m5-context-cli-wiring` ## Background The CLI currently has `agents project context inspect` and `agents project context simulate` commands that are explicit stubs raising "requires ACMS wiring and is not yet available." Once the ACMS pipeline (#188), CRP models (#190), and backend protocols are implemented, these commands need to be wired to the live ACMS services. ## Acceptance Criteria - [ ] Wire `agents project context inspect` to query the ACMS pipeline and display current context state for a project. - [ ] Wire `agents project context simulate` to run a dry-run context assembly and display the assembled fragments, budget usage, and strategy selection. - [ ] Add `agents project context set` for configuring project-level context view overrides (tier weights, strategy preferences). - [ ] Add `agents project context show` for displaying current context configuration including effective pipeline config. - [ ] All commands respect output format flags (--format rich/plain/json/yaml). ## 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. ## Subtasks - [ ] Wire `agents project context inspect` to live ACMS pipeline query. - [ ] Wire `agents project context simulate` to dry-run context assembly. - [ ] Implement `agents project context set` for config overrides. - [ ] Implement `agents project context show` for effective config display. - [ ] Add output formatting for all four commands. - [ ] Update `docs/reference/project_context_cli.md` with command examples. - [ ] Tests (Behave): Add `features/context_cli_wiring.feature` scenarios. - [ ] Tests (Robot): Add `robot/context_cli_wiring.robot` smoke tests. - [ ] Verify coverage >=97% via `nox -s coverage_report`. - [ ] Run `nox` (all default sessions), fix any errors.
freemo added this to the v3.4.0 milestone 2026-03-02 04:27:51 +00:00
Member

Implementation Complete — PR #534

All four project context CLI commands have been wired to live ACMS pipeline services:

Commands Wired

  1. context inspect — Queries ContextTierService for tier metrics (hot/warm/cold token counts, fragment counts, hit rates) and per-project fragments. Supports --strategy, --focus-area, --breadth, --depth filtering options.

  2. context simulate — Performs dry-run context assembly using CRP models (ContextRequest, ContextFragment, AssembledContext). Supports --budget (token limit) and --strategy (recency/relevance/balanced).

  3. context set — Enhanced with 12 new ACMS pipeline options:

    • --hot-max-tokens, --warm-max-decisions, --cold-max-decisions, --summary-max-tokens
    • --temporal-scope, --auto-refresh/--no-auto-refresh
    • --focus-area, --breadth, --depth
    • --assembly-strategy, --retrieval-strategy, --summary-strategy
  4. context show — Now displays ACMS pipeline configuration alongside context policy in all output formats.

Bug Fixes

  • Fixed redaction false positives for hot_max_tokens and summary_max_tokens keys in shared/redaction.py
  • Fixed Rich Console line-wrapping that broke JSON parsing in test output

Test Coverage

  • 28 new Behave BDD scenarios in context_cli_wiring.feature
  • Updated scenarios in project_context_cli.feature and m5_acms_smoke.feature
  • 5 Robot Framework integration test cases
  • All nox stages pass; 97% coverage maintained

Subtask Completion

  • Wire context inspect to ContextTierService
  • Wire context simulate to CRP assembly pipeline
  • Enhance context set with ACMS config options
  • Enhance context show to display pipeline config
  • Behave BDD scenarios for all wired commands
  • Robot Framework integration tests
  • Reference documentation updated
  • CHANGELOG updated
## Implementation Complete — PR #534 All four project context CLI commands have been wired to live ACMS pipeline services: ### Commands Wired 1. **`context inspect`** — Queries `ContextTierService` for tier metrics (hot/warm/cold token counts, fragment counts, hit rates) and per-project fragments. Supports `--strategy`, `--focus-area`, `--breadth`, `--depth` filtering options. 2. **`context simulate`** — Performs dry-run context assembly using CRP models (`ContextRequest`, `ContextFragment`, `AssembledContext`). Supports `--budget` (token limit) and `--strategy` (recency/relevance/balanced). 3. **`context set`** — Enhanced with 12 new ACMS pipeline options: - `--hot-max-tokens`, `--warm-max-decisions`, `--cold-max-decisions`, `--summary-max-tokens` - `--temporal-scope`, `--auto-refresh/--no-auto-refresh` - `--focus-area`, `--breadth`, `--depth` - `--assembly-strategy`, `--retrieval-strategy`, `--summary-strategy` 4. **`context show`** — Now displays ACMS pipeline configuration alongside context policy in all output formats. ### Bug Fixes - Fixed redaction false positives for `hot_max_tokens` and `summary_max_tokens` keys in `shared/redaction.py` - Fixed Rich Console line-wrapping that broke JSON parsing in test output ### Test Coverage - 28 new Behave BDD scenarios in `context_cli_wiring.feature` - Updated scenarios in `project_context_cli.feature` and `m5_acms_smoke.feature` - 5 Robot Framework integration test cases - All nox stages pass; 97% coverage maintained ### Subtask Completion - [x] Wire `context inspect` to `ContextTierService` - [x] Wire `context simulate` to CRP assembly pipeline - [x] Enhance `context set` with ACMS config options - [x] Enhance `context show` to display pipeline config - [x] Behave BDD scenarios for all wired commands - [x] Robot Framework integration tests - [x] Reference documentation updated - [x] CHANGELOG updated
Author
Owner

Closing: code merged to master via commit ff42d59d (feat(cli): wire project context CLI stubs to ACMS pipeline, 2026-03-03). Duplicate tracking issue #534 was also created and closed for this same work.

Closing: code merged to master via commit `ff42d59d` (feat(cli): wire project context CLI stubs to ACMS pipeline, 2026-03-03). Duplicate tracking issue #534 was also created and closed for this same work.
Author
Owner

Resolved by PR #534

Resolved by PR #534
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#499
No description provided.