UAT: Global -v repeatable verbosity flag missing from CLI — spec requires it on all commands #5510

Open
opened 2026-04-09 07:07:36 +00:00 by HAL9000 · 2 comments
Owner

Summary

The spec defines a global -v flag (repeatable) that controls log verbosity for any command invocation. This flag is not implemented as a global option in main_callback(). Only the build command has a local --verbose/-v flag, but it's a boolean (not a count) and only affects that one command.

Expected Behavior (from spec)

From docs/specification.md line 401:

-v: Increase log verbosity for a single invocation (repeatable).
  no -v = normal output only (logging suppressed)
  -v    = ERROR level
  -vv   = WARN level
  -vvv  = INFO level
  -vvvv = DEBUG level
  -vvvvv = TRACE level

The global signature shows:

agents|cleveragents  [--data-dir <DATA_PATH>] [--config-path <CONFIG_PATH>]
                     [--format (...)]
                     [--help|-h] [--version]
                     [-v...] <COMMAND> [<ARGS>...]

The -v flag should be available on ALL commands:

$ agents -vvv plan list
$ agents -v actor run local/reviewer "Summarize this"
$ agents -vvvv plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J

Actual Behavior

# src/cleveragents/cli/main.py lines 293-334
@app.callback()
def main_callback(
    ctx: typer.Context,
    version: bool = ...,
    show_secrets: bool = ...,
    fmt: Annotated[OutputFormat, ...] = OutputFormat.RICH,
) -> None:
    # No -v global verbosity option
    configure_structlog(log_level="WARNING")  # Always WARNING, no way to override globally

The build command has a local --verbose/-v boolean flag, but this is not the same as the global repeatable -v count flag.

Code Location

  • File: src/cleveragents/cli/main.py
  • Function: main_callback() at line 293
  • Missing: verbose: Annotated[int, typer.Option("-v", count=True)] = 0 parameter

Spec Reference

  • docs/specification.md lines 207-401: Global options section, -v flag description

Impact

  • Users cannot increase log verbosity for debugging without modifying config files
  • Debugging CLI issues requires editing config files instead of using -v flags
  • The spec example agents -vvv plan list fails with "Error: Invalid command '-vvv'"
  • The actor run command has its own -v count flag but it's not global

Subtasks

  • Add verbose: Annotated[int, typer.Option("-v", count=True)] = 0 to main_callback()
  • Map verbosity count to log levels: 0=WARNING, 1=ERROR, 2=WARN, 3=INFO, 4=DEBUG, 5=TRACE
  • Call configure_structlog(log_level=...) based on the count
  • Store verbosity level in ctx.obj["verbose"] for subcommands
  • Ensure -v doesn't conflict with local -v flags on individual commands
  • Add unit tests for each verbosity level

Definition of Done

  • agents -v plan list runs with ERROR log level
  • agents -vvv plan list runs with INFO log level
  • agents -vvvvv plan list runs with TRACE log level
  • -v is shown in agents --help output
  • Verbosity level is stored in ctx.obj for subcommands to access
  • Unit tests pass for each verbosity level

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

## Summary The spec defines a global `-v` flag (repeatable) that controls log verbosity for any command invocation. This flag is not implemented as a global option in `main_callback()`. Only the `build` command has a local `--verbose/-v` flag, but it's a boolean (not a count) and only affects that one command. ## Expected Behavior (from spec) From `docs/specification.md` line 401: ``` -v: Increase log verbosity for a single invocation (repeatable). no -v = normal output only (logging suppressed) -v = ERROR level -vv = WARN level -vvv = INFO level -vvvv = DEBUG level -vvvvv = TRACE level ``` The global signature shows: ``` agents|cleveragents [--data-dir <DATA_PATH>] [--config-path <CONFIG_PATH>] [--format (...)] [--help|-h] [--version] [-v...] <COMMAND> [<ARGS>...] ``` The `-v` flag should be available on ALL commands: ``` $ agents -vvv plan list $ agents -v actor run local/reviewer "Summarize this" $ agents -vvvv plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J ``` ## Actual Behavior ```python # src/cleveragents/cli/main.py lines 293-334 @app.callback() def main_callback( ctx: typer.Context, version: bool = ..., show_secrets: bool = ..., fmt: Annotated[OutputFormat, ...] = OutputFormat.RICH, ) -> None: # No -v global verbosity option configure_structlog(log_level="WARNING") # Always WARNING, no way to override globally ``` The `build` command has a local `--verbose/-v` boolean flag, but this is not the same as the global repeatable `-v` count flag. ## Code Location - **File**: `src/cleveragents/cli/main.py` - **Function**: `main_callback()` at line 293 - **Missing**: `verbose: Annotated[int, typer.Option("-v", count=True)] = 0` parameter ## Spec Reference - `docs/specification.md` lines 207-401: Global options section, `-v` flag description ## Impact - Users cannot increase log verbosity for debugging without modifying config files - Debugging CLI issues requires editing config files instead of using `-v` flags - The spec example `agents -vvv plan list` fails with "Error: Invalid command '-vvv'" - The `actor run` command has its own `-v` count flag but it's not global ## Subtasks - [ ] Add `verbose: Annotated[int, typer.Option("-v", count=True)] = 0` to `main_callback()` - [ ] Map verbosity count to log levels: 0=WARNING, 1=ERROR, 2=WARN, 3=INFO, 4=DEBUG, 5=TRACE - [ ] Call `configure_structlog(log_level=...)` based on the count - [ ] Store verbosity level in `ctx.obj["verbose"]` for subcommands - [ ] Ensure `-v` doesn't conflict with local `-v` flags on individual commands - [ ] Add unit tests for each verbosity level ## Definition of Done - `agents -v plan list` runs with ERROR log level - `agents -vvv plan list` runs with INFO log level - `agents -vvvvv plan list` runs with TRACE log level - `-v` is shown in `agents --help` output - Verbosity level is stored in `ctx.obj` for subcommands to access - Unit tests pass for each verbosity level --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 07:12:11 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

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

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — Global -v repeatable verbosity flag is a CLI consistency issue. Missing from spec-required CLI interface.
  • Milestone: v3.2.0 (already assigned)
  • Story Points: 2 — S — Adding a global verbosity flag to the CLI, 1-4 hours.
  • MoSCoW: MoSCoW/Should have — CLI consistency with the spec is important. The -v flag is a standard CLI convention.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — Global `-v` repeatable verbosity flag is a CLI consistency issue. Missing from spec-required CLI interface. - **Milestone**: v3.2.0 (already assigned) - **Story Points**: 2 — S — Adding a global verbosity flag to the CLI, 1-4 hours. - **MoSCoW**: MoSCoW/Should have — CLI consistency with the spec is important. The `-v` flag is a standard CLI convention. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5510
No description provided.