UAT: agents invariant add/list --project is missing the -p short flag alias specified in spec #6799

Open
opened 2026-04-10 02:07:12 +00:00 by HAL9000 · 0 comments
Owner

What Was Tested

Code analysis of the add and list command option declarations in src/cleveragents/cli/commands/invariant.py.

Expected Behavior (From Spec)

Per docs/specification.md, both agents invariant add and agents invariant list show the project flag with a -p short alias in the command synopsis (lines 363, 365, 17886, 18062):

agents invariant add [--global] [(--project|-p) PROJECT] [--plan PLAN_ID]...
                     [--action ACTION]... <INVARIANT_TEXT>

agents invariant list [--global] [(--project|-p) PROJECT] [--plan PLAN_ID] [--action ACTION]
                     [--effective] [<REGEX>]

The argument description at line 17896 also confirms:

--project/-p PROJECT: Attach to a project (applies to all plans targeting this project).

And line 18071:

--project/-p PROJECT: List invariants attached to a project.

Actual Behavior

Both add and list commands only register --project without the -p short alias:

# src/cleveragents/cli/commands/invariant.py lines 118-120 (add command)
project: Annotated[
    str | None, typer.Option("--project", help="Project name")  # "-p" is missing!
] = None,

# lines 155-157 (list command)
project: Annotated[
    str | None, typer.Option("--project", help="Filter by project")  # "-p" is missing!
] = None,

With typer, adding a short alias requires passing both options: typer.Option("--project", "-p", ...).

Steps to Reproduce

# Should work per spec but currently fails:
agents invariant add -p myapp "All endpoints need auth"
# → Error: No such option: -p

agents invariant list -p myapp
# → Error: No such option: -p

Impact

Users following the documented spec cannot use the -p shorthand, which is a standard UX convention across all comparable CLI tools. This violates the public CLI contract as defined in the specification.


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

## What Was Tested Code analysis of the `add` and `list` command option declarations in `src/cleveragents/cli/commands/invariant.py`. ## Expected Behavior (From Spec) Per `docs/specification.md`, both `agents invariant add` and `agents invariant list` show the project flag with a `-p` short alias in the command synopsis (lines 363, 365, 17886, 18062): ``` agents invariant add [--global] [(--project|-p) PROJECT] [--plan PLAN_ID]... [--action ACTION]... <INVARIANT_TEXT> agents invariant list [--global] [(--project|-p) PROJECT] [--plan PLAN_ID] [--action ACTION] [--effective] [<REGEX>] ``` The argument description at line 17896 also confirms: > `--project/-p PROJECT`: Attach to a project (applies to all plans targeting this project). And line 18071: > `--project/-p PROJECT`: List invariants attached to a project. ## Actual Behavior Both `add` and `list` commands only register `--project` without the `-p` short alias: ```python # src/cleveragents/cli/commands/invariant.py lines 118-120 (add command) project: Annotated[ str | None, typer.Option("--project", help="Project name") # "-p" is missing! ] = None, # lines 155-157 (list command) project: Annotated[ str | None, typer.Option("--project", help="Filter by project") # "-p" is missing! ] = None, ``` With typer, adding a short alias requires passing both options: `typer.Option("--project", "-p", ...)`. ## Steps to Reproduce ```bash # Should work per spec but currently fails: agents invariant add -p myapp "All endpoints need auth" # → Error: No such option: -p agents invariant list -p myapp # → Error: No such option: -p ``` ## Impact Users following the documented spec cannot use the `-p` shorthand, which is a standard UX convention across all comparable CLI tools. This violates the public CLI contract as defined in the specification. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.4.0 milestone 2026-04-10 02:07:19 +00:00
HAL9000 self-assigned this 2026-04-10 06:06:46 +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.

Dependencies

No dependencies set.

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