UAT: agents project context inspect JSON/YAML output uses wrong structure — missing inspection, uko_graph, active_strategies, budget keys #6327

Open
opened 2026-04-09 20:10:44 +00:00 by HAL9000 · 0 comments
Owner

Summary

The agents project context inspect command's non-rich output does not match the spec. The implementation outputs tier_metrics, tier_budget, project_fragments, actor_visibility, acms_config, phase_analysis, and fragments as top-level keys, while the spec requires inspection, uko_graph, active_strategies, and budget as the four data sub-keys. The UKO graph tree structure, per-strategy quality/budget/fragment breakdown, and model-window budget breakdown are entirely absent.

Spec Reference

docs/specification.md lines 4207–4323 (agents project context inspect JSON/YAML example).

Expected JSON output structure:

{
  "command": "project context inspect",
  "status": "ok",
  "exit_code": 0,
  "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 },
      ...
    ],
    "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
    }
  },
  "timing": { "duration_ms": 185 },
  "messages": ["Context inspection complete"]
}

Code Location

src/cleveragents/cli/commands/project_context.py:

  • context_inspect() command (lines 918–1161)
  • Lines 1036–1064: non-rich data dict built with keys: project, view, tier_metrics, tier_budget, project_fragments, actor_visibility, acms_config, phase_analysis, fragments
  • Line 1161: console.print(format_output(data, output_format)) — passes internal structure

Actual Behavior

Non-rich output (abbreviated):

{
  "project": "local/api-service",
  "view": "all",
  "tier_metrics": { "hot_count": 0, "warm_count": 0, ... },
  "tier_budget": { "max_tokens_hot": 8000, ... },
  "project_fragments": { "total": 0, "by_tier": { "hot": 0, "warm": 0, "cold": 0 } },
  "actor_visibility": { ... },
  "acms_config": { ... },
  "phase_analysis": { ... },
  "fragments": []
}

Absent from output:

  • data.inspection (project, view, focus, breadth, depth, depth_name)
  • data.uko_graph (root node + edges from UKO knowledge graph — never queried)
  • data.active_strategies (per-strategy quality/budget_pct/fragments breakdown — never computed)
  • data.budget (model_window, response_reserve, tool_definitions, system_prompt, skeleton_reserve, available_budget, used, utilization — partially present in tier_budget but wrong structure/keys)

Steps to Reproduce

Inspect project_context.py lines 1036–1064 and lines 1066–1161 (context_inspect command, non-rich and rich paths).

Expected vs Actual

Field Expected Actual
data.inspection {project, view, focus, breadth, depth, depth_name} Absent
data.uko_graph UKO graph tree with root + edges Absent (no UKO query)
data.active_strategies Per-strategy {name, quality, budget_pct, fragments} Absent
data.budget Full model window budget breakdown Partial (tier_budget with different keys)
Rich UKO Graph panel Graph tree display Absent
Rich Active Strategies panel Strategy quality table Absent

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

## Summary The `agents project context inspect` command's non-rich output does not match the spec. The implementation outputs `tier_metrics`, `tier_budget`, `project_fragments`, `actor_visibility`, `acms_config`, `phase_analysis`, and `fragments` as top-level keys, while the spec requires `inspection`, `uko_graph`, `active_strategies`, and `budget` as the four `data` sub-keys. The UKO graph tree structure, per-strategy quality/budget/fragment breakdown, and model-window budget breakdown are entirely absent. ## Spec Reference `docs/specification.md` lines 4207–4323 (`agents project context inspect` JSON/YAML example). Expected JSON output structure: ```json { "command": "project context inspect", "status": "ok", "exit_code": 0, "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 }, ... ], "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 } }, "timing": { "duration_ms": 185 }, "messages": ["Context inspection complete"] } ``` ## Code Location `src/cleveragents/cli/commands/project_context.py`: - `context_inspect()` command (lines 918–1161) - Lines 1036–1064: non-rich data dict built with keys: `project`, `view`, `tier_metrics`, `tier_budget`, `project_fragments`, `actor_visibility`, `acms_config`, `phase_analysis`, `fragments` - Line 1161: `console.print(format_output(data, output_format))` — passes internal structure ## Actual Behavior Non-rich output (abbreviated): ```json { "project": "local/api-service", "view": "all", "tier_metrics": { "hot_count": 0, "warm_count": 0, ... }, "tier_budget": { "max_tokens_hot": 8000, ... }, "project_fragments": { "total": 0, "by_tier": { "hot": 0, "warm": 0, "cold": 0 } }, "actor_visibility": { ... }, "acms_config": { ... }, "phase_analysis": { ... }, "fragments": [] } ``` Absent from output: - `data.inspection` (project, view, focus, breadth, depth, depth_name) - `data.uko_graph` (root node + edges from UKO knowledge graph — never queried) - `data.active_strategies` (per-strategy quality/budget_pct/fragments breakdown — never computed) - `data.budget` (model_window, response_reserve, tool_definitions, system_prompt, skeleton_reserve, available_budget, used, utilization — partially present in `tier_budget` but wrong structure/keys) ## Steps to Reproduce Inspect `project_context.py` lines 1036–1064 and lines 1066–1161 (context_inspect command, non-rich and rich paths). ## Expected vs Actual | Field | Expected | Actual | |-------|----------|--------| | `data.inspection` | `{project, view, focus, breadth, depth, depth_name}` | Absent | | `data.uko_graph` | UKO graph tree with root + edges | Absent (no UKO query) | | `data.active_strategies` | Per-strategy `{name, quality, budget_pct, fragments}` | Absent | | `data.budget` | Full model window budget breakdown | Partial (`tier_budget` with different keys) | | Rich `UKO Graph` panel | Graph tree display | Absent | | Rich `Active Strategies` panel | Strategy quality table | Absent | --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
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#6327
No description provided.