UAT: agents plan use JSON/YAML output missing spec-required command envelope and uses wrong field names #6277

Open
opened 2026-04-09 19:47:26 +00:00 by HAL9000 · 0 comments
Owner

Spec Reference

Spec §agents plan use (line 12602–12685) defines the JSON output envelope:

{
  "command": "plan use",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "plan_id": "...",
    "phase": "strategize",
    "action": "local/code-coverage",
    "project": "local/api-service",
    "automation_profile": "trusted",
    "attempt": 1,
    "inputs": {...},
    "actors": {...},
    "automation": {...},
    "context": {...},
    "next_steps": [...]
  },
  "timing": {...},
  "messages": ["Plan created"]
}

Expected Behavior

agents plan use --format json should return the full spec-required JSON envelope with:

  • Top-level command, status, exit_code, data, timing, messages keys
  • data.action (not action_name)
  • data.project (not project_links)
  • data.attempt
  • data.inputs (resolved argument values)
  • data.actors (strategy, execution, estimation actors)
  • data.automation (profile, source, read_only)
  • data.context (resources, indexed_files, view, hot_token_budget)
  • data.next_steps (suggested follow-up commands)

Actual Behavior

The implementation uses _plan_spec_dict(plan) (see src/cleveragents/cli/commands/plan.py line 2240) which returns a flat dict without the command envelope:

{
  "plan_id": "...",
  "namespaced_name": "...",
  "phase": "strategize",
  "processing_state": "queued",
  "state": "queued",
  "project_links": [...],
  "arguments": {...},
  "action_name": "...",
  ...
}

Missing fields: command, status, exit_code, timing, messages, attempt, inputs, actors, automation, context, next_steps.
Wrong field names: action_name instead of action, project_links instead of project.

Code Location

  • src/cleveragents/cli/commands/plan.py lines 2239–2241 (use_action command, non-rich output)
  • src/cleveragents/cli/commands/plan.py lines 224–301 (_plan_spec_dict function)

Steps to Reproduce

agents plan use local/my-action local/my-project --format json

Observe that the output is a flat dict without the spec-required envelope.


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

## Spec Reference Spec §agents plan use (line 12602–12685) defines the JSON output envelope: ```json { "command": "plan use", "status": "ok", "exit_code": 0, "data": { "plan_id": "...", "phase": "strategize", "action": "local/code-coverage", "project": "local/api-service", "automation_profile": "trusted", "attempt": 1, "inputs": {...}, "actors": {...}, "automation": {...}, "context": {...}, "next_steps": [...] }, "timing": {...}, "messages": ["Plan created"] } ``` ## Expected Behavior `agents plan use --format json` should return the full spec-required JSON envelope with: - Top-level `command`, `status`, `exit_code`, `data`, `timing`, `messages` keys - `data.action` (not `action_name`) - `data.project` (not `project_links`) - `data.attempt` - `data.inputs` (resolved argument values) - `data.actors` (strategy, execution, estimation actors) - `data.automation` (profile, source, read_only) - `data.context` (resources, indexed_files, view, hot_token_budget) - `data.next_steps` (suggested follow-up commands) ## Actual Behavior The implementation uses `_plan_spec_dict(plan)` (see `src/cleveragents/cli/commands/plan.py` line 2240) which returns a flat dict without the command envelope: ```json { "plan_id": "...", "namespaced_name": "...", "phase": "strategize", "processing_state": "queued", "state": "queued", "project_links": [...], "arguments": {...}, "action_name": "...", ... } ``` Missing fields: `command`, `status`, `exit_code`, `timing`, `messages`, `attempt`, `inputs`, `actors`, `automation`, `context`, `next_steps`. Wrong field names: `action_name` instead of `action`, `project_links` instead of `project`. ## Code Location - `src/cleveragents/cli/commands/plan.py` lines 2239–2241 (use_action command, non-rich output) - `src/cleveragents/cli/commands/plan.py` lines 224–301 (`_plan_spec_dict` function) ## Steps to Reproduce ```bash agents plan use local/my-action local/my-project --format json ``` Observe that the output is a flat dict without the spec-required envelope. --- **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#6277
No description provided.