chore(cli): complete renderer migration for remaining command modules #813

Closed
opened 2026-03-13 14:45:48 +00:00 by brent.edwards · 2 comments
Member

Summary

PR #787 (feature/m6-cli-polish) introduced shared renderers in cleveragents/cli/renderers.py and migrated ~5 of ~13 command modules to use them (session, action, actor, project_context, plan — partially). The remaining modules still use module-level Console() objects and direct console.print() calls with inline Rich markup.

This ticket tracks completing the migration for the remaining command modules.

Modules to migrate

Module Has console = Console() Uses shared renderers
auto_debug.py Yes No
context.py Yes No
automation_profile.py Yes No
tool.py Yes No
project.py Yes No
config.py Yes No
resource.py Yes No
skill.py Yes No
plan.py Yes Partial — still uses module-level Console for streaming/Live displays
session.py Yes Partial — uses renderers for some, direct console for Rich panels

Work required per module

  1. Replace direct console.print(Panel(...)) / console.print(Table(...)) with appropriate render_detail(), render_list(), render_success(), etc.
  2. Remove module-level console = Console() and from rich.console import Console import
  3. Ensure all error paths pass fmt=output_format to render_error()
  4. Add/update Behave scenarios for any new renderer paths

Relates to

  • PR #787 review finding C2 (incomplete migration scope)
  • PR #787 review finding M9 (redundant module-level Console objects)
  • Issue #210 (CLI polish)
## Summary PR #787 (`feature/m6-cli-polish`) introduced shared renderers in `cleveragents/cli/renderers.py` and migrated ~5 of ~13 command modules to use them (session, action, actor, project_context, plan — partially). The remaining modules still use module-level `Console()` objects and direct `console.print()` calls with inline Rich markup. This ticket tracks completing the migration for the remaining command modules. ## Modules to migrate | Module | Has `console = Console()` | Uses shared renderers | |--------|---------------------------|----------------------| | `auto_debug.py` | Yes | No | | `context.py` | Yes | No | | `automation_profile.py` | Yes | No | | `tool.py` | Yes | No | | `project.py` | Yes | No | | `config.py` | Yes | No | | `resource.py` | Yes | No | | `skill.py` | Yes | No | | `plan.py` | Yes | Partial — still uses module-level Console for streaming/Live displays | | `session.py` | Yes | Partial — uses renderers for some, direct console for Rich panels | ## Work required per module 1. Replace direct `console.print(Panel(...))` / `console.print(Table(...))` with appropriate `render_detail()`, `render_list()`, `render_success()`, etc. 2. Remove module-level `console = Console()` and `from rich.console import Console` import 3. Ensure all error paths pass `fmt=output_format` to `render_error()` 4. Add/update Behave scenarios for any new renderer paths ## Relates to - PR #787 review finding C2 (incomplete migration scope) - PR #787 review finding M9 (redundant module-level Console objects) - Issue #210 (CLI polish)
freemo added this to the v3.5.0 milestone 2026-03-13 21:12:24 +00:00
Author
Member

Implementation Notes — #813

Branch: chore/m6-renderer-migration | Commit: 4795406d | PR: #1059

Design Decision: Module attribute name preserved

Each module-level console = Console() was replaced with console = _get_console(), keeping the attribute name console intact. This ensures backward compatibility with existing test patches like patch("cleveragents.cli.commands.resource.console", ...).

Modules migrated (8)

auto_debug.py, context.py, automation_profile.py, tool.py, project.py, config.py, resource.py, skill.py

Modules deferred (documented)

  • plan.py — uses streaming/Live display, too large for this scope
  • session.py, repl.py, lsp.py, server.py — specialized patterns

Quality Gates

  • Lint: PASS | Typecheck: PASS | Unit tests: All affected scenarios pass
## Implementation Notes — #813 **Branch:** `chore/m6-renderer-migration` | **Commit:** `4795406d` | **PR:** #1059 ### Design Decision: Module attribute name preserved Each module-level `console = Console()` was replaced with `console = _get_console()`, keeping the attribute name `console` intact. This ensures backward compatibility with existing test patches like `patch("cleveragents.cli.commands.resource.console", ...)`. ### Modules migrated (8) `auto_debug.py`, `context.py`, `automation_profile.py`, `tool.py`, `project.py`, `config.py`, `resource.py`, `skill.py` ### Modules deferred (documented) - `plan.py` — uses streaming/Live display, too large for this scope - `session.py`, `repl.py`, `lsp.py`, `server.py` — specialized patterns ### Quality Gates - Lint: PASS | Typecheck: PASS | Unit tests: All affected scenarios pass
freemo self-assigned this 2026-04-02 06:13:56 +00:00
Owner

Closing — work completed in PR #1059 (merged 2026-03-19). The renderer migration for remaining command modules was implemented and merged.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Closing — work completed in PR #1059 (merged 2026-03-19). The renderer migration for remaining command modules was implemented and merged. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#813
No description provided.