UAT: agents plan artifacts rich output missing spec-required panels — Artifacts table, Summary, and By Plan panels not rendered #3647

Open
opened 2026-04-05 21:05:06 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/plan-artifacts-rich-output-panels
  • Commit Message: fix(cli): render spec-required Artifacts table, Summary, and By Plan panels for plan artifacts rich output
  • Milestone: (none — backlog)
  • Parent Epic: #394

Backlog note: This issue was discovered during autonomous operation
on milestone v3.3.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Description

The agents plan artifacts <PLAN_ID> command's rich output does not render the spec-required structured panels. Instead, it outputs raw JSON via format_output(data, "json") even when --format rich (the default).

Expected behavior (per spec lines 15690–15718)

The rich output should render three panels:

  1. Artifacts table — columns: Path, Type, Size, Change, Child Plan — showing each file artifact with its operation type, size, diff stats, and which child plan produced it
  2. Summary panel — showing: Total, Writes (new), Edits (modified), Deletes, Total Size
  3. By Plan panel — showing artifact counts grouped by plan name (e.g. Root Plan: N artifacts, child-plan-name: N artifacts)
  4. Success message: ✓ OK N artifacts listed

Actual behavior

In artifacts() method in src/cleveragents/application/services/plan_apply_service.py (lines 330–353):

if fmt in ("json", "yaml", "plain", "table"):
    return format_output(data, fmt)
# Rich fallback: use json
return format_output(data, "json")  # ← outputs JSON even for rich format

The rich format falls through to format_output(data, "json"), outputting raw JSON instead of structured Rich panels.

Root cause

The artifacts() method in PlanApplyService has no rich rendering path — it always falls back to JSON output. The plan_artifacts() CLI command in plan.py (lines 2764–2794) simply calls service.artifacts(plan_id, fmt=fmt) and prints the result without any rich panel rendering.

Affected code

  • src/cleveragents/application/services/plan_apply_service.pyartifacts() method (lines 330–353)
  • src/cleveragents/cli/commands/plan.pyplan_artifacts() command (lines 2764–2794)

Steps to reproduce

  1. Create a plan and execute it
  2. Run agents plan artifacts <PLAN_ID> (default rich format)
  3. Observe that output is raw JSON instead of structured panels with Artifacts table, Summary, and By Plan sections

Subtasks

  • Add a rich rendering path in artifacts() in plan_apply_service.py (lines 330–353): when fmt == "rich", build and return a Rich Console/Group object (or rendered string) containing the three spec-required panels instead of falling back to format_output(data, "json")
  • Implement the Artifacts table panel using rich.table.Table with columns: Path, Type, Size, Change, Child Plan — one row per file artifact
  • Implement the Summary panel using rich.panel.Panel showing: Total, Writes, Edits, Deletes, Total Size
  • Implement the By Plan panel using rich.panel.Panel showing artifact counts grouped by child plan name
  • Emit the success message ✓ OK N artifacts listed after the panels
  • Update plan_artifacts() CLI command in plan.py (lines 2764–2794) to correctly pass fmt="rich" (the default) through to service.artifacts() and print the rich output
  • Write Behave unit test scenarios in features/ covering the rich output path: assert all three panels are rendered, correct column headers, correct summary counts, correct by-plan grouping, and correct success message
  • Write Robot Framework integration test in robot/ for agents plan artifacts <PLAN_ID> (default rich format) verifying the three panels appear in the terminal output
  • Verify nox -e typecheck passes (all new code fully statically typed, no # type: ignore)
  • Verify nox -e unit_tests passes
  • Verify nox -e coverage_report passes with coverage >= 97%
  • Run nox (all default sessions), fix any errors

Definition of Done

  • agents plan artifacts <PLAN_ID> (default --format rich) renders the Artifacts table with columns Path, Type, Size, Change, Child Plan
  • agents plan artifacts <PLAN_ID> renders the Summary panel with Total, Writes, Edits, Deletes, Total Size
  • agents plan artifacts <PLAN_ID> renders the By Plan panel grouping artifact counts by child plan name
  • Success message ✓ OK N artifacts listed is displayed after the panels
  • No raw JSON is emitted when --format rich (the default) is used
  • Behave unit tests cover all three panels, the success message, and edge cases (zero artifacts, multiple child plans)
  • Robot Framework integration test verifies rich panel output end-to-end
  • All nox stages pass
  • Coverage >= 97%
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/plan-artifacts-rich-output-panels` - **Commit Message**: `fix(cli): render spec-required Artifacts table, Summary, and By Plan panels for plan artifacts rich output` - **Milestone**: *(none — backlog)* - **Parent Epic**: #394 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.3.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Description The `agents plan artifacts <PLAN_ID>` command's rich output does not render the spec-required structured panels. Instead, it outputs raw JSON via `format_output(data, "json")` even when `--format rich` (the default). ### Expected behavior (per spec lines 15690–15718) The rich output should render three panels: 1. **Artifacts table** — columns: `Path`, `Type`, `Size`, `Change`, `Child Plan` — showing each file artifact with its operation type, size, diff stats, and which child plan produced it 2. **Summary panel** — showing: `Total`, `Writes` (new), `Edits` (modified), `Deletes`, `Total Size` 3. **By Plan panel** — showing artifact counts grouped by plan name (e.g. `Root Plan: N artifacts`, `child-plan-name: N artifacts`) 4. Success message: `✓ OK N artifacts listed` ### Actual behavior In `artifacts()` method in `src/cleveragents/application/services/plan_apply_service.py` (lines 330–353): ```python if fmt in ("json", "yaml", "plain", "table"): return format_output(data, fmt) # Rich fallback: use json return format_output(data, "json") # ← outputs JSON even for rich format ``` The rich format falls through to `format_output(data, "json")`, outputting raw JSON instead of structured Rich panels. ### Root cause The `artifacts()` method in `PlanApplyService` has no rich rendering path — it always falls back to JSON output. The `plan_artifacts()` CLI command in `plan.py` (lines 2764–2794) simply calls `service.artifacts(plan_id, fmt=fmt)` and prints the result without any rich panel rendering. ### Affected code - `src/cleveragents/application/services/plan_apply_service.py` — `artifacts()` method (lines 330–353) - `src/cleveragents/cli/commands/plan.py` — `plan_artifacts()` command (lines 2764–2794) ### Steps to reproduce 1. Create a plan and execute it 2. Run `agents plan artifacts <PLAN_ID>` (default rich format) 3. Observe that output is raw JSON instead of structured panels with Artifacts table, Summary, and By Plan sections ## Subtasks - [ ] Add a rich rendering path in `artifacts()` in `plan_apply_service.py` (lines 330–353): when `fmt == "rich"`, build and return a Rich `Console`/`Group` object (or rendered string) containing the three spec-required panels instead of falling back to `format_output(data, "json")` - [ ] Implement the **Artifacts table** panel using `rich.table.Table` with columns: `Path`, `Type`, `Size`, `Change`, `Child Plan` — one row per file artifact - [ ] Implement the **Summary panel** using `rich.panel.Panel` showing: `Total`, `Writes`, `Edits`, `Deletes`, `Total Size` - [ ] Implement the **By Plan panel** using `rich.panel.Panel` showing artifact counts grouped by child plan name - [ ] Emit the success message `✓ OK N artifacts listed` after the panels - [ ] Update `plan_artifacts()` CLI command in `plan.py` (lines 2764–2794) to correctly pass `fmt="rich"` (the default) through to `service.artifacts()` and print the rich output - [ ] Write Behave unit test scenarios in `features/` covering the rich output path: assert all three panels are rendered, correct column headers, correct summary counts, correct by-plan grouping, and correct success message - [ ] Write Robot Framework integration test in `robot/` for `agents plan artifacts <PLAN_ID>` (default rich format) verifying the three panels appear in the terminal output - [ ] Verify `nox -e typecheck` passes (all new code fully statically typed, no `# type: ignore`) - [ ] Verify `nox -e unit_tests` passes - [ ] Verify `nox -e coverage_report` passes with coverage >= 97% - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done - [ ] `agents plan artifacts <PLAN_ID>` (default `--format rich`) renders the **Artifacts table** with columns `Path`, `Type`, `Size`, `Change`, `Child Plan` - [ ] `agents plan artifacts <PLAN_ID>` renders the **Summary panel** with `Total`, `Writes`, `Edits`, `Deletes`, `Total Size` - [ ] `agents plan artifacts <PLAN_ID>` renders the **By Plan panel** grouping artifact counts by child plan name - [ ] Success message `✓ OK N artifacts listed` is displayed after the panels - [ ] No raw JSON is emitted when `--format rich` (the default) is used - [ ] Behave unit tests cover all three panels, the success message, and edge cases (zero artifacts, multiple child plans) - [ ] Robot Framework integration test verifies rich panel output end-to-end - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 21:07:12 +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.

Blocks
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3647
No description provided.