UAT: agents project list JSON/YAML output missing summary section and uses wrong field names #6304

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

Summary

The agents project list command's non-rich output emits a raw list of flat project dicts (from _project_spec_dict()) rather than the spec-required structured envelope. The spec requires a data.projects array with per-project fields name, resources, remote, active_plans and a data.summary sub-object. Neither is present in the implementation.

Spec Reference

docs/specification.md lines 3115–3169 (agents project list JSON/YAML example).

Expected JSON output:

{
  "command": "agents --format table project list",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "projects": [
      { "name": "local/api-service", "resources": 2, "remote": false, "active_plans": 1 },
      { "name": "local/docs", "resources": 1, "remote": false, "active_plans": 0 }
    ],
    "summary": {
      "total": 2,
      "with_resources": 2,
      "remote": 0,
      "total_resources": 3,
      "indexed_files": 1247,
      "active_plans": 1
    }
  },
  "timing": { "duration_ms": 45 },
  "messages": [{ "level": "ok", "text": "2 projects listed" }]
}

Code Location

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

  • list_projects() command (lines 807–869) — line 868: data = [_project_spec_dict(p) for p in projects] followed by console.print(format_output(data, output_format))
  • _project_spec_dict() (lines 137–168) — returns namespaced_name, namespace, name, description, linked_resources, created_at, updated_at

Actual Behavior

Non-rich output is a raw JSON array of flat project dicts:

[
  {
    "namespaced_name": "local/api-service",
    "namespace": "local",
    "name": "api-service",
    "description": "...",
    "linked_resources": [...],
    "created_at": "...",
    "updated_at": "..."
  }
]

Missing:

  • Top-level envelope (command, status, exit_code, timing, messages)
  • data.projects wrapper (with remote, active_plans per project)
  • data.summary (total, with_resources, remote, total_resources, indexed_files, active_plans)

Also: the rich output (lines 844–866) shows a simple table but does not show the spec-required Summary panel (lines 3081–3088).

Steps to Reproduce

Inspect project.py lines 867–869 (list command, non-rich path).

Expected vs Actual

Field Expected Actual
Top-level {command, status, exit_code, data, timing, messages} Raw array
data.projects[].remote false / true Absent
data.projects[].active_plans integer Absent
data.summary Full summary object Absent
Rich output Projects table + Summary panel Projects table only

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

## Summary The `agents project list` command's non-rich output emits a raw list of flat project dicts (from `_project_spec_dict()`) rather than the spec-required structured envelope. The spec requires a `data.projects` array with per-project fields `name`, `resources`, `remote`, `active_plans` and a `data.summary` sub-object. Neither is present in the implementation. ## Spec Reference `docs/specification.md` lines 3115–3169 (`agents project list` JSON/YAML example). Expected JSON output: ```json { "command": "agents --format table project list", "status": "ok", "exit_code": 0, "data": { "projects": [ { "name": "local/api-service", "resources": 2, "remote": false, "active_plans": 1 }, { "name": "local/docs", "resources": 1, "remote": false, "active_plans": 0 } ], "summary": { "total": 2, "with_resources": 2, "remote": 0, "total_resources": 3, "indexed_files": 1247, "active_plans": 1 } }, "timing": { "duration_ms": 45 }, "messages": [{ "level": "ok", "text": "2 projects listed" }] } ``` ## Code Location `src/cleveragents/cli/commands/project.py`: - `list_projects()` command (lines 807–869) — line 868: `data = [_project_spec_dict(p) for p in projects]` followed by `console.print(format_output(data, output_format))` - `_project_spec_dict()` (lines 137–168) — returns `namespaced_name`, `namespace`, `name`, `description`, `linked_resources`, `created_at`, `updated_at` ## Actual Behavior Non-rich output is a raw JSON array of flat project dicts: ```json [ { "namespaced_name": "local/api-service", "namespace": "local", "name": "api-service", "description": "...", "linked_resources": [...], "created_at": "...", "updated_at": "..." } ] ``` Missing: - Top-level envelope (`command`, `status`, `exit_code`, `timing`, `messages`) - `data.projects` wrapper (with `remote`, `active_plans` per project) - `data.summary` (total, with_resources, remote, total_resources, indexed_files, active_plans) Also: the rich output (lines 844–866) shows a simple table but does not show the spec-required `Summary` panel (lines 3081–3088). ## Steps to Reproduce Inspect `project.py` lines 867–869 (list command, non-rich path). ## Expected vs Actual | Field | Expected | Actual | |-------|----------|--------| | Top-level | `{command, status, exit_code, data, timing, messages}` | Raw array | | `data.projects[].remote` | `false` / `true` | Absent | | `data.projects[].active_plans` | integer | Absent | | `data.summary` | Full summary object | Absent | | Rich output | Projects table + Summary panel | Projects table only | --- **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#6304
No description provided.