UAT: agents project context inspect rich output format does not match spec — missing UKO Graph, Active Strategies, and Budget panels #5065

Open
opened 2026-04-09 00:53:47 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: ACMS and Context Management — project context inspect command

Severity: Medium (output format deviation; functional data is present but structured differently)


What Was Tested

Code-level analysis of src/cleveragents/cli/commands/project_context.pycontext_inspect() function (lines 918–1161).


Expected Behavior (from spec)

The specification (§CLI Commands — agents project context inspect, lines 4131–4168) defines the following rich output format:

╭─ ACMS Context Inspection ────────────────────────────────────────╮
│ Project: local/api-service                                       │
│ View: execute                                                    │
│ Focus: uko-py:module/src.auth                                    │
│ Breadth: 2 hops  │  Depth: 3 (MEMBER_SUMMARY)                   │
╰──────────────────────────────────────────────────────────────────╯

╭─ UKO Graph (2-hop neighborhood) ─────────────────────────────────╮
│ uko-py:module/src.auth (depth 9/FULL_SOURCE, 1,240 tokens)       │
│   ├─ contains → uko-py:class/AuthHandler (depth 3, 320 tokens)   │
│   ├─ contains → uko-py:class/TokenValidator (depth 3, 280 tok)   │
│   ├─ imports  → uko-py:module/src.db (depth 0, 90 tokens)        │
│   └─ imports  → uko-py:module/src.config (depth 0, 60 tok)       │
╰──────────────────────────────────────────────────────────────────╯

╭─ Active Strategies ──────────────────────────────────────────────╮
│ breadth-depth-navigator  quality=0.85  budget=45%  4 fragments   │
│ semantic-embedding       quality=0.60  budget=35%  6 fragments   │
│ simple-keyword           quality=0.30  budget=20%  3 fragments   │
╰──────────────────────────────────────────────────────────────────╯

╭─ Budget ─────────────────────────────╮
│ Model Window: 128,000 tokens         │
│ Response Reserve: 4,096 tokens       │
│ Tool Definitions: 2,400 tokens       │
│ System Prompt: 1,200 tokens          │
│ Skeleton Reserve: 18,046 (15%)       │
│ Available Budget: 102,258 tokens     │
│ Used: 1,990 / 102,258 (1.9%)         │
╰──────────────────────────────────────╯

✓ OK Context inspection complete

The JSON output should have inspection, uko_graph, active_strategies, and budget keys.


Actual Behavior (bug)

The implementation renders completely different panels:

  1. Tier Metrics table (hot/warm/cold fragment counts and hit/miss counters)
  2. Tier Budget panel (max_tokens_hot, max_decisions_warm, max_decisions_cold)
  3. Project Fragments panel (total count by tier)
  4. Actor Visibility panel (fragment counts per actor role)
  5. Per-Phase Context Analysis table (strategize/execute/apply fragment/resource/byte/token counts)

While this data is useful for debugging, it does not match the spec's required output format. The spec-required panels are:

  • ACMS Context Inspection header panel (project, view, focus, breadth, depth)
  • UKO Graph panel (graph structure with hop relationships)
  • Active Strategies panel (strategy name, quality, budget %, fragment count)
  • Budget panel (model window, reserves, available budget, utilization)

The JSON output also uses a different structure (tier_metrics, tier_budget, project_fragments, actor_visibility, acms_config, phase_analysis) instead of the spec-required inspection, uko_graph, active_strategies, budget keys.


Code Location

src/cleveragents/cli/commands/project_context.pycontext_inspect() function, lines 918–1161


Fix Required

Update context_inspect() to render the spec-required output format:

  1. ACMS Context Inspection header panel with project, view, focus URIs, breadth, depth
  2. UKO Graph panel showing the graph structure rooted at focus nodes
  3. Active Strategies panel showing strategy name, quality score, budget allocation %, fragment count
  4. Budget panel showing model window, reserves, available budget, and utilization

The current tier metrics / phase analysis data can be retained as additional panels or moved to a --verbose mode, but the primary output must match the spec.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** ACMS and Context Management — `project context inspect` command **Severity:** Medium (output format deviation; functional data is present but structured differently) --- ## What Was Tested Code-level analysis of `src/cleveragents/cli/commands/project_context.py` — `context_inspect()` function (lines 918–1161). --- ## Expected Behavior (from spec) The specification (§CLI Commands — `agents project context inspect`, lines 4131–4168) defines the following rich output format: ``` ╭─ ACMS Context Inspection ────────────────────────────────────────╮ │ Project: local/api-service │ │ View: execute │ │ Focus: uko-py:module/src.auth │ │ Breadth: 2 hops │ Depth: 3 (MEMBER_SUMMARY) │ ╰──────────────────────────────────────────────────────────────────╯ ╭─ UKO Graph (2-hop neighborhood) ─────────────────────────────────╮ │ uko-py:module/src.auth (depth 9/FULL_SOURCE, 1,240 tokens) │ │ ├─ contains → uko-py:class/AuthHandler (depth 3, 320 tokens) │ │ ├─ contains → uko-py:class/TokenValidator (depth 3, 280 tok) │ │ ├─ imports → uko-py:module/src.db (depth 0, 90 tokens) │ │ └─ imports → uko-py:module/src.config (depth 0, 60 tok) │ ╰──────────────────────────────────────────────────────────────────╯ ╭─ Active Strategies ──────────────────────────────────────────────╮ │ breadth-depth-navigator quality=0.85 budget=45% 4 fragments │ │ semantic-embedding quality=0.60 budget=35% 6 fragments │ │ simple-keyword quality=0.30 budget=20% 3 fragments │ ╰──────────────────────────────────────────────────────────────────╯ ╭─ Budget ─────────────────────────────╮ │ Model Window: 128,000 tokens │ │ Response Reserve: 4,096 tokens │ │ Tool Definitions: 2,400 tokens │ │ System Prompt: 1,200 tokens │ │ Skeleton Reserve: 18,046 (15%) │ │ Available Budget: 102,258 tokens │ │ Used: 1,990 / 102,258 (1.9%) │ ╰──────────────────────────────────────╯ ✓ OK Context inspection complete ``` The JSON output should have `inspection`, `uko_graph`, `active_strategies`, and `budget` keys. --- ## Actual Behavior (bug) The implementation renders completely different panels: 1. **Tier Metrics** table (hot/warm/cold fragment counts and hit/miss counters) 2. **Tier Budget** panel (max_tokens_hot, max_decisions_warm, max_decisions_cold) 3. **Project Fragments** panel (total count by tier) 4. **Actor Visibility** panel (fragment counts per actor role) 5. **Per-Phase Context Analysis** table (strategize/execute/apply fragment/resource/byte/token counts) While this data is useful for debugging, it does not match the spec's required output format. The spec-required panels are: - **ACMS Context Inspection** header panel (project, view, focus, breadth, depth) - **UKO Graph** panel (graph structure with hop relationships) - **Active Strategies** panel (strategy name, quality, budget %, fragment count) - **Budget** panel (model window, reserves, available budget, utilization) The JSON output also uses a different structure (`tier_metrics`, `tier_budget`, `project_fragments`, `actor_visibility`, `acms_config`, `phase_analysis`) instead of the spec-required `inspection`, `uko_graph`, `active_strategies`, `budget` keys. --- ## Code Location `src/cleveragents/cli/commands/project_context.py` — `context_inspect()` function, lines 918–1161 --- ## Fix Required Update `context_inspect()` to render the spec-required output format: 1. **ACMS Context Inspection** header panel with project, view, focus URIs, breadth, depth 2. **UKO Graph** panel showing the graph structure rooted at focus nodes 3. **Active Strategies** panel showing strategy name, quality score, budget allocation %, fragment count 4. **Budget** panel showing model window, reserves, available budget, and utilization The current tier metrics / phase analysis data can be retained as additional panels or moved to a `--verbose` mode, but the primary output must match the spec. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:01:45 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — Spec compliance bug; deviates from documented behavior
  • Milestone: v3.2.0
  • Story Points: 3 — M
  • MoSCoW: Must Have — Spec compliance is required

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — Spec compliance bug; deviates from documented behavior - **Milestone**: v3.2.0 - **Story Points**: 3 — M - **MoSCoW**: Must Have — Spec compliance is required --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5065
No description provided.