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
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#6267
No description provided.