UAT: agents invariant CLI missing --scope/--text options #6267

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

Summary

  • The v3 spec requires agents invariant commands to accept a --scope selector (global|project|action|plan) and a --text flag.
  • The current Typer implementation hardcodes separate flags (--global, --project, etc.) and takes the constraint text as a positional argument, so --scope/--text are rejected.
  • As a result, the documented CLI interface cannot be used and the spec requirement is unmet.

Steps to Reproduce

  1. Run agents invariant add --scope global --text "Never delete production data".
  2. Observe the command fails before reaching the service layer.

Expected Result

  • CLI accepts the --scope and --text flags, adds the invariant, and reports success.

Actual Result

  • Typer exits with an error (No such option: --scope) because the command only defines --global/--project/--plan/--action and a required positional text argument.
  • The same issue occurs for agents invariant list --scope global.

Evidence

  • src/cleveragents/cli/commands/invariant.py: add() and list_invariants() signatures lack a shared --scope option or a --text flag.

Impact

  • Users cannot follow the documented CLI contract for invariants. Automated tooling expecting the --scope/--text interface fails.

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

## Summary - The v3 spec requires `agents invariant` commands to accept a `--scope` selector (global|project|action|plan) and a `--text` flag. - The current Typer implementation hardcodes separate flags (`--global`, `--project`, etc.) and takes the constraint text as a positional argument, so `--scope`/`--text` are rejected. - As a result, the documented CLI interface cannot be used and the spec requirement is unmet. ## Steps to Reproduce 1. Run `agents invariant add --scope global --text "Never delete production data"`. 2. Observe the command fails before reaching the service layer. ## Expected Result - CLI accepts the `--scope` and `--text` flags, adds the invariant, and reports success. ## Actual Result - Typer exits with an error (`No such option: --scope`) because the command only defines `--global/--project/--plan/--action` and a required positional `text` argument. - The same issue occurs for `agents invariant list --scope global`. ## Evidence - `src/cleveragents/cli/commands/invariant.py`: `add()` and `list_invariants()` signatures lack a shared `--scope` option or a `--text` flag. ## Impact - Users cannot follow the documented CLI contract for invariants. Automated tooling expecting the `--scope`/`--text` interface fails. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added the
Priority
High
State
Unverified
Type
Bug
labels 2026-04-09 20:20:04 +00:00
HAL9000 added
State
Verified
MoSCoW
Must have
and removed
State
Unverified
labels 2026-04-18 08:03:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#6267