UAT: agents project context inspect output missing spec-required uko_graph, active_strategies, and detailed budget fields — returns tier metrics instead #2502

Open
opened 2026-04-03 18:40:24 +00:00 by freemo · 1 comment
Owner

Summary

agents project context inspect returns tier-based metrics (tier_metrics, tier_budget, project_fragments, actor_visibility, phase_analysis) instead of the spec-required ACMS inspection data (uko_graph, active_strategies, detailed budget with model window breakdown). The command's output structure is fundamentally different from what the spec defines.

What Was Tested

Code-level analysis of src/cleveragents/cli/commands/project_context.py (the context_inspect command, lines 918-1161) against docs/specification.md §4108-4256.

Expected Behavior (from spec §4210-4256)

The JSON output must contain:

{
  "command": "project context inspect",
  "status": "ok",
  "data": {
    "inspection": {
      "project": "local/api-service",
      "view": "execute",
      "focus": ["uko-py:module/src.auth"],
      "breadth": 2,
      "depth": 3,
      "depth_name": "MEMBER_SUMMARY"
    },
    "uko_graph": {
      "root": "uko-py:module/src.auth",
      "root_depth": 9,
      "root_depth_name": "FULL_SOURCE",
      "root_tokens": 1240,
      "edges": [
        { "relation": "contains", "target": "uko-py:class/AuthHandler", "depth": 3, "tokens": 320 },
        ...
      ]
    },
    "active_strategies": [
      { "name": "breadth-depth-navigator", "quality": 0.85, "budget_pct": 0.45, "fragments": 4 },
      { "name": "semantic-embedding", "quality": 0.60, "budget_pct": 0.35, "fragments": 6 },
      { "name": "simple-keyword", "quality": 0.30, "budget_pct": 0.20, "fragments": 3 }
    ],
    "budget": {
      "model_window": 128000,
      "response_reserve": 4096,
      "tool_definitions": 2400,
      "system_prompt": 1200,
      "skeleton_reserve": 18046,
      "skeleton_ratio": 0.15,
      "available_budget": 102258,
      "used": 1990,
      "utilization": 0.019
    }
  }
}

The Rich output must show:

  • UKO Graph (N-hop neighborhood) with node hierarchy and edge relations
  • Active Strategies panel with quality scores and budget percentages
  • Budget panel with model window, response reserve, tool definitions, system prompt, skeleton reserve, available budget, and utilization

Actual Behavior

The command returns:

{
  "project": "...",
  "view": "all",
  "tier_metrics": { "hot_count": ..., "warm_count": ..., "cold_count": ... },
  "tier_budget": { "max_tokens_hot": ..., "max_decisions_warm": ..., "max_decisions_cold": ... },
  "project_fragments": { "total": ..., "by_tier": { "hot": ..., "warm": ..., "cold": ... } },
  "actor_visibility": { "strategize": ..., "execute": ..., "apply": ... },
  "acms_config": { ... },
  "phase_analysis": { ... },
  "fragments": [ ... ]
}

The Rich output shows tier metrics, tier budget, project fragments, actor visibility, and phase analysis — none of which are in the spec.

Missing from output:

  • inspection object with focus, breadth, depth, depth_name
  • uko_graph with root node, depth, tokens, and edges with relations
  • active_strategies with quality scores and budget percentages
  • budget with model window breakdown (model_window, response_reserve, tool_definitions, system_prompt, skeleton_reserve, skeleton_ratio, available_budget, used, utilization)

Code Location

src/cleveragents/cli/commands/project_context.py lines 918-1161 (context_inspect function)

Steps to Reproduce

  1. Create a project: agents project add local/test-project
  2. Run: agents project context inspect --format json local/test-project
  3. Observe the output lacks uko_graph, active_strategies, and detailed budget fields

Severity

High — The command's output structure is completely different from the spec. Users and tooling expecting the spec-documented output will receive incompatible data. The UKO graph visualization (the primary debugging tool for context quality) is entirely absent.

Metadata

  • Branch: fix/context-inspect-output-structure
  • Commit Message: fix(cli): align context inspect output with spec — add uko_graph, active_strategies, budget fields
  • Parent Epic: #396

Subtasks

  • Add inspection object to output with focus, breadth, depth, depth_name
  • Add uko_graph to output: query UKO graph for focus nodes and return root + edges with relations
  • Add active_strategies to output: query strategy registry for enabled strategies with quality scores and budget percentages
  • Add detailed budget to output: include model_window, response_reserve, tool_definitions, system_prompt, skeleton_reserve, skeleton_ratio, available_budget, used, utilization
  • Update Rich output to show UKO Graph panel, Active Strategies panel, and detailed Budget panel
  • Add unit tests for the corrected output structure

Definition of Done

  • agents project context inspect --format json returns inspection, uko_graph, active_strategies, and budget fields matching the spec
  • Rich output shows UKO Graph, Active Strategies, and Budget panels
  • All tests pass with ≥97% coverage

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

## Summary `agents project context inspect` returns tier-based metrics (`tier_metrics`, `tier_budget`, `project_fragments`, `actor_visibility`, `phase_analysis`) instead of the spec-required ACMS inspection data (`uko_graph`, `active_strategies`, detailed `budget` with model window breakdown). The command's output structure is fundamentally different from what the spec defines. ## What Was Tested Code-level analysis of `src/cleveragents/cli/commands/project_context.py` (the `context_inspect` command, lines 918-1161) against `docs/specification.md` §4108-4256. ## Expected Behavior (from spec §4210-4256) The JSON output must contain: ```json { "command": "project context inspect", "status": "ok", "data": { "inspection": { "project": "local/api-service", "view": "execute", "focus": ["uko-py:module/src.auth"], "breadth": 2, "depth": 3, "depth_name": "MEMBER_SUMMARY" }, "uko_graph": { "root": "uko-py:module/src.auth", "root_depth": 9, "root_depth_name": "FULL_SOURCE", "root_tokens": 1240, "edges": [ { "relation": "contains", "target": "uko-py:class/AuthHandler", "depth": 3, "tokens": 320 }, ... ] }, "active_strategies": [ { "name": "breadth-depth-navigator", "quality": 0.85, "budget_pct": 0.45, "fragments": 4 }, { "name": "semantic-embedding", "quality": 0.60, "budget_pct": 0.35, "fragments": 6 }, { "name": "simple-keyword", "quality": 0.30, "budget_pct": 0.20, "fragments": 3 } ], "budget": { "model_window": 128000, "response_reserve": 4096, "tool_definitions": 2400, "system_prompt": 1200, "skeleton_reserve": 18046, "skeleton_ratio": 0.15, "available_budget": 102258, "used": 1990, "utilization": 0.019 } } } ``` The Rich output must show: - UKO Graph (N-hop neighborhood) with node hierarchy and edge relations - Active Strategies panel with quality scores and budget percentages - Budget panel with model window, response reserve, tool definitions, system prompt, skeleton reserve, available budget, and utilization ## Actual Behavior The command returns: ```json { "project": "...", "view": "all", "tier_metrics": { "hot_count": ..., "warm_count": ..., "cold_count": ... }, "tier_budget": { "max_tokens_hot": ..., "max_decisions_warm": ..., "max_decisions_cold": ... }, "project_fragments": { "total": ..., "by_tier": { "hot": ..., "warm": ..., "cold": ... } }, "actor_visibility": { "strategize": ..., "execute": ..., "apply": ... }, "acms_config": { ... }, "phase_analysis": { ... }, "fragments": [ ... ] } ``` The Rich output shows tier metrics, tier budget, project fragments, actor visibility, and phase analysis — none of which are in the spec. **Missing from output:** - `inspection` object with `focus`, `breadth`, `depth`, `depth_name` - `uko_graph` with root node, depth, tokens, and edges with relations - `active_strategies` with quality scores and budget percentages - `budget` with model window breakdown (model_window, response_reserve, tool_definitions, system_prompt, skeleton_reserve, skeleton_ratio, available_budget, used, utilization) ## Code Location `src/cleveragents/cli/commands/project_context.py` lines 918-1161 (`context_inspect` function) ## Steps to Reproduce 1. Create a project: `agents project add local/test-project` 2. Run: `agents project context inspect --format json local/test-project` 3. Observe the output lacks `uko_graph`, `active_strategies`, and detailed `budget` fields ## Severity **High** — The command's output structure is completely different from the spec. Users and tooling expecting the spec-documented output will receive incompatible data. The UKO graph visualization (the primary debugging tool for context quality) is entirely absent. ## Metadata - **Branch**: `fix/context-inspect-output-structure` - **Commit Message**: `fix(cli): align context inspect output with spec — add uko_graph, active_strategies, budget fields` - **Parent Epic**: #396 ## Subtasks - [ ] Add `inspection` object to output with `focus`, `breadth`, `depth`, `depth_name` - [ ] Add `uko_graph` to output: query UKO graph for focus nodes and return root + edges with relations - [ ] Add `active_strategies` to output: query strategy registry for enabled strategies with quality scores and budget percentages - [ ] Add detailed `budget` to output: include model_window, response_reserve, tool_definitions, system_prompt, skeleton_reserve, skeleton_ratio, available_budget, used, utilization - [ ] Update Rich output to show UKO Graph panel, Active Strategies panel, and detailed Budget panel - [ ] Add unit tests for the corrected output structure ## Definition of Done - `agents project context inspect --format json` returns `inspection`, `uko_graph`, `active_strategies`, and `budget` fields matching the spec - Rich output shows UKO Graph, Active Strategies, and Budget panels - All tests pass with ≥97% coverage --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.7.0 milestone 2026-04-05 05:07:07 +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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#2502
No description provided.