[BUG] agents validation attach --project has undocumented -p shorthand not in spec #9388

Closed
opened 2026-04-14 16:28:39 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(cli): remove undocumented -p shorthand from agents validation attach --project
  • Branch: fix/validation-attach-remove-p-shorthand

Background and Context

The agents validation attach command in src/cleveragents/cli/commands/validation.py defines the --project option with an undocumented -p shorthand:

project: Annotated[
    str | None,
    typer.Option("--project", "-p", help="Project scope"),
] = None,

The specification (docs/specification.md, §agents validation attach, line 9539) defines the command signature as:

agents validation attach [--project <PROJECT>|--plan <PLAN_ID>]
    <RESOURCE> <VALIDATION> [--<key> <value> ...]

No -p shorthand is listed anywhere in the spec for this option. The -p shorthand is also not documented in the CLI reference or any user-facing documentation. This creates an undocumented interface that users may inadvertently rely on, making it harder to remove later, and it conflicts with the specification-first development principle.

Expected Behavior

The --project option in agents validation attach should have no shorthand alias. The correct definition per the spec is:

project: Annotated[
    str | None,
    typer.Option("--project", help="Project scope"),
] = None,

Acceptance Criteria

  • Running agents validation attach --help does not show a -p shorthand for --project
  • The typer.Option definition for project in src/cleveragents/cli/commands/validation.py uses only "--project" (no "-p")
  • All existing tests pass after the change
  • No test or documentation references -p as a shorthand for --project in agents validation attach

Subtasks

  • Remove "-p" from typer.Option("--project", "-p", help="Project scope") in src/cleveragents/cli/commands/validation.py (line 278)
  • Search for any test scenarios or step definitions that use -p as a shorthand for --project in agents validation attach and update them to use --project
  • Run nox -s unit_tests to verify all tests pass
  • Verify coverage ≥97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Supporting Information

  • File: src/cleveragents/cli/commands/validation.py, line 278 — typer.Option("--project", "-p", help="Project scope")
  • Spec reference: docs/specification.md §agents validation attach (line 9539) — no -p shorthand defined
  • The --format / -f shorthand is intentional and present in the spec; only -p for --project is undocumented
  • The bug was introduced during the original implementation of agents validation attach (issue #280)

Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit Message**: `fix(cli): remove undocumented -p shorthand from agents validation attach --project` - **Branch**: `fix/validation-attach-remove-p-shorthand` ## Background and Context The `agents validation attach` command in `src/cleveragents/cli/commands/validation.py` defines the `--project` option with an undocumented `-p` shorthand: ```python project: Annotated[ str | None, typer.Option("--project", "-p", help="Project scope"), ] = None, ``` The specification (`docs/specification.md`, §agents validation attach, line 9539) defines the command signature as: ``` agents validation attach [--project <PROJECT>|--plan <PLAN_ID>] <RESOURCE> <VALIDATION> [--<key> <value> ...] ``` No `-p` shorthand is listed anywhere in the spec for this option. The `-p` shorthand is also not documented in the CLI reference or any user-facing documentation. This creates an undocumented interface that users may inadvertently rely on, making it harder to remove later, and it conflicts with the specification-first development principle. ## Expected Behavior The `--project` option in `agents validation attach` should have no shorthand alias. The correct definition per the spec is: ```python project: Annotated[ str | None, typer.Option("--project", help="Project scope"), ] = None, ``` ## Acceptance Criteria - [ ] Running `agents validation attach --help` does not show a `-p` shorthand for `--project` - [ ] The `typer.Option` definition for `project` in `src/cleveragents/cli/commands/validation.py` uses only `"--project"` (no `"-p"`) - [ ] All existing tests pass after the change - [ ] No test or documentation references `-p` as a shorthand for `--project` in `agents validation attach` ## Subtasks - [ ] Remove `"-p"` from `typer.Option("--project", "-p", help="Project scope")` in `src/cleveragents/cli/commands/validation.py` (line 278) - [ ] Search for any test scenarios or step definitions that use `-p` as a shorthand for `--project` in `agents validation attach` and update them to use `--project` - [ ] Run `nox -s unit_tests` to verify all tests pass - [ ] Verify coverage ≥97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Supporting Information - File: `src/cleveragents/cli/commands/validation.py`, line 278 — `typer.Option("--project", "-p", help="Project scope")` - Spec reference: `docs/specification.md` §agents validation attach (line 9539) — no `-p` shorthand defined - The `--format` / `-f` shorthand is intentional and present in the spec; only `-p` for `--project` is undocumented - The bug was introduced during the original implementation of `agents validation attach` (issue #280) --- **Automated by CleverAgents Bot** Agent: new-issue-creator
HAL9000 2026-04-14 16:34:26 +00:00
Author
Owner

🔁 Triage: Duplicate [AUTO-OWNR-1]

This is a duplicate of #9359 (same issue: undocumented -p shorthand on agents validation attach --project). This is the fifth report of the same issue. Please track progress on #9359.


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

🔁 **Triage: Duplicate** [AUTO-OWNR-1] This is a duplicate of #9359 (same issue: undocumented `-p` shorthand on `agents validation attach --project`). This is the fifth report of the same issue. Please track progress on #9359. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#9388
No description provided.