UAT: agents project create JSON/YAML output missing spec-required envelope and sections #6301

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

Summary

The agents project create command's non-rich output format does not match the spec. The implementation emits a flat dict built by _project_spec_dict() instead of the spec-required structured envelope with command, status, exit_code, data, timing, and messages fields, and the data object is missing three required sub-objects: paths, defaults, and resources.

Spec Reference

docs/specification.md lines 2611–2675 (agents project create JSON/YAML example).

Expected JSON output:

{
  "command": "agents project create --description \"Backend API\" local/api-service",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "project": {
      "name": "local/api-service",
      "description": "Backend API",
      "type": "local",
      "created": "2026-02-08T12:46:00Z"
    },
    "paths": {
      "root": "/repos/api-service",
      "data_dir": "/repos/api-service/.cleveragents"
    },
    "defaults": {
      "sandbox": "git_worktree",
      "validations": 0,
      "context_filters": null,
      "automation_profile": null
    },
    "resources": {
      "total": 0,
      "indexed": 0,
      "sandboxable": 0
    }
  },
  "timing": { "duration_ms": 85 },
  "messages": [{ "level": "ok", "text": "Project created" }]
}

Code Location

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

  • _project_spec_dict() (lines 137–168) — returns only namespaced_name, namespace, name, description, linked_resources, created_at, updated_at
  • create() command (lines 534–645) — line 632: data = _project_spec_dict(created); line 645: console.print(format_output(data, output_format)) — passes the flat dict directly to format_output with no envelope wrapping

Actual Behavior

The non-rich output (JSON/YAML) is a flat project dict:

{
  "namespaced_name": "local/api-service",
  "namespace": "local",
  "name": "api-service",
  "description": "Backend API",
  "linked_resources": [],
  "created_at": "2026-02-08T12:46:00Z",
  "updated_at": "2026-02-08T12:46:00Z"
}

Missing: command, status, exit_code, data.project.type, data.paths, data.defaults, data.resources, timing, messages.

Also: the rich output is missing the Paths, Defaults, and Resources panels that the spec shows (lines 2561–2579); only a single Project Created panel is shown (line 640–643).

Steps to Reproduce

Inspect project.py lines 632–645 (create command, non-rich path).

Expected vs Actual

Field Expected Actual
Top-level structure {command, status, exit_code, data, timing, messages} Flat project dict
data.paths {root, data_dir} Absent
data.defaults {sandbox, validations, context_filters, automation_profile} Absent
data.resources {total, indexed, sandboxable} Absent
Rich panels Project / Paths / Defaults / Resources panels Single "Project Created" panel only

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

## Summary The `agents project create` command's non-rich output format does not match the spec. The implementation emits a flat dict built by `_project_spec_dict()` instead of the spec-required structured envelope with `command`, `status`, `exit_code`, `data`, `timing`, and `messages` fields, and the `data` object is missing three required sub-objects: `paths`, `defaults`, and `resources`. ## Spec Reference `docs/specification.md` lines 2611–2675 (`agents project create` JSON/YAML example). Expected JSON output: ```json { "command": "agents project create --description \"Backend API\" local/api-service", "status": "ok", "exit_code": 0, "data": { "project": { "name": "local/api-service", "description": "Backend API", "type": "local", "created": "2026-02-08T12:46:00Z" }, "paths": { "root": "/repos/api-service", "data_dir": "/repos/api-service/.cleveragents" }, "defaults": { "sandbox": "git_worktree", "validations": 0, "context_filters": null, "automation_profile": null }, "resources": { "total": 0, "indexed": 0, "sandboxable": 0 } }, "timing": { "duration_ms": 85 }, "messages": [{ "level": "ok", "text": "Project created" }] } ``` ## Code Location `src/cleveragents/cli/commands/project.py`: - `_project_spec_dict()` (lines 137–168) — returns only `namespaced_name`, `namespace`, `name`, `description`, `linked_resources`, `created_at`, `updated_at` - `create()` command (lines 534–645) — line 632: `data = _project_spec_dict(created)`; line 645: `console.print(format_output(data, output_format))` — passes the flat dict directly to `format_output` with no envelope wrapping ## Actual Behavior The non-rich output (JSON/YAML) is a flat project dict: ```json { "namespaced_name": "local/api-service", "namespace": "local", "name": "api-service", "description": "Backend API", "linked_resources": [], "created_at": "2026-02-08T12:46:00Z", "updated_at": "2026-02-08T12:46:00Z" } ``` Missing: `command`, `status`, `exit_code`, `data.project.type`, `data.paths`, `data.defaults`, `data.resources`, `timing`, `messages`. Also: the rich output is missing the `Paths`, `Defaults`, and `Resources` panels that the spec shows (lines 2561–2579); only a single `Project Created` panel is shown (line 640–643). ## Steps to Reproduce Inspect `project.py` lines 632–645 (create command, non-rich path). ## Expected vs Actual | Field | Expected | Actual | |-------|----------|--------| | Top-level structure | `{command, status, exit_code, data, timing, messages}` | Flat project dict | | `data.paths` | `{root, data_dir}` | Absent | | `data.defaults` | `{sandbox, validations, context_filters, automation_profile}` | Absent | | `data.resources` | `{total, indexed, sandboxable}` | Absent | | Rich panels | Project / Paths / Defaults / Resources panels | Single "Project Created" panel 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#6301
No description provided.