UAT: agents plan use allows creating a plan with no project — spec requires at least one <PROJECT> argument #2937

Open
opened 2026-04-05 02:52:22 +00:00 by freemo · 3 comments
Owner

Background and Context

The spec (docs/specification.md §agents plan use) defines the command as:

agents plan use [...options...] <ACTION> <PROJECT>...

With the description: "One or more project names (positional arguments, repeatable)." This implies at least one project is required when creating a plan.

However, the implementation in src/cleveragents/cli/commands/plan.py use_action() makes both the positional projects argument and the --project/-p option optional. A plan can be created with no project links at all, which is inconsistent with the spec and likely produces a plan in an unusable state.

Current Behavior

agents plan use local/my-action (with no project argument) succeeds and creates a plan with an empty project_links list.

Code location: src/cleveragents/cli/commands/plan.py, use_action() function (line 1392). The projects parameter is list[str] | None = None with no minimum count validation.

Expected Behavior

agents plan use local/my-action (with no project argument) should fail with a clear validation error requiring at least one project. The command should only succeed when at least one project is provided, either as a positional argument or via --project/-p.

Acceptance Criteria

  • agents plan use local/my-action (no project) fails with a clear validation error message
  • agents plan use local/my-action my-project (one project) succeeds as before
  • agents plan use local/my-action proj-a proj-b (multiple projects) succeeds as before
  • agents plan use local/my-action --project my-project (via flag) succeeds as before
  • The error message clearly indicates that at least one project is required
  • All existing tests pass; new tests cover the zero-project rejection

Supporting Information

  • Code location: src/cleveragents/cli/commands/plan.py, use_action() function, line 1392 — projects: list[str] | None = None
  • Spec reference: docs/specification.md §agents plan use — <PROJECT>... positional argument described as "One or more project names"
  • Parent Epic: #397

Metadata

  • Branch: fix/m6-plan-use-require-project-argument
  • Commit Message: fix(cli): require at least one project argument in agents plan use
  • Milestone: v3.5.0
  • Parent Epic: #397

Subtasks

  • Investigate use_action() parameter handling for projects in src/cleveragents/cli/commands/plan.py
  • Add validation to require at least one project (positional or via --project/-p) before plan creation proceeds
  • Ensure the error message is clear and actionable
  • Add or update unit tests covering zero-project rejection and single/multiple project acceptance
  • Tests (Behave): Add/update scenarios for agents plan use with no project argument
  • Tests (Robot): Add integration test for agents plan use missing project validation
  • 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.
  • All nox stages pass
  • Coverage >= 97%

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

## Background and Context The spec (`docs/specification.md` §agents plan use) defines the command as: ``` agents plan use [...options...] <ACTION> <PROJECT>... ``` With the description: "One or more project names (positional arguments, repeatable)." This implies at least one project is required when creating a plan. However, the implementation in `src/cleveragents/cli/commands/plan.py` `use_action()` makes both the positional `projects` argument and the `--project/-p` option optional. A plan can be created with no project links at all, which is inconsistent with the spec and likely produces a plan in an unusable state. ## Current Behavior `agents plan use local/my-action` (with no project argument) succeeds and creates a plan with an empty `project_links` list. **Code location**: `src/cleveragents/cli/commands/plan.py`, `use_action()` function (line 1392). The `projects` parameter is `list[str] | None = None` with no minimum count validation. ## Expected Behavior `agents plan use local/my-action` (with no project argument) should fail with a clear validation error requiring at least one project. The command should only succeed when at least one project is provided, either as a positional argument or via `--project/-p`. ## Acceptance Criteria - [ ] `agents plan use local/my-action` (no project) fails with a clear validation error message - [ ] `agents plan use local/my-action my-project` (one project) succeeds as before - [ ] `agents plan use local/my-action proj-a proj-b` (multiple projects) succeeds as before - [ ] `agents plan use local/my-action --project my-project` (via flag) succeeds as before - [ ] The error message clearly indicates that at least one project is required - [ ] All existing tests pass; new tests cover the zero-project rejection ## Supporting Information - **Code location**: `src/cleveragents/cli/commands/plan.py`, `use_action()` function, line 1392 — `projects: list[str] | None = None` - **Spec reference**: `docs/specification.md` §agents plan use — `<PROJECT>...` positional argument described as "One or more project names" - **Parent Epic**: #397 ## Metadata - **Branch**: `fix/m6-plan-use-require-project-argument` - **Commit Message**: `fix(cli): require at least one project argument in agents plan use` - **Milestone**: v3.5.0 - **Parent Epic**: #397 ## Subtasks - [ ] Investigate `use_action()` parameter handling for `projects` in `src/cleveragents/cli/commands/plan.py` - [ ] Add validation to require at least one project (positional or via `--project/-p`) before plan creation proceeds - [ ] Ensure the error message is clear and actionable - [ ] Add or update unit tests covering zero-project rejection and single/multiple project acceptance - [ ] Tests (Behave): Add/update scenarios for `agents plan use` with no project argument - [ ] Tests (Robot): Add integration test for `agents plan use` missing project validation - [ ] 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. - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.5.0 milestone 2026-04-05 02:52:58 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Milestone Triage Decision: Moved to Backlog

This CLI validation issue has been moved out of v3.5.0 during aggressive milestone triage. While important for spec compliance, it does not block core autonomy hardening functionality.

Reasoning:

  • v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle)
  • This issue: CLI argument validation (plan use PROJECT argument) - spec compliance
  • Impact: UX consistency, not functional capability

Will be addressed in a future milestone focused on CLI polish and spec compliance.

**Milestone Triage Decision: Moved to Backlog** This CLI validation issue has been moved out of v3.5.0 during aggressive milestone triage. While important for spec compliance, it does not block core autonomy hardening functionality. **Reasoning:** - v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle) - This issue: CLI argument validation (`plan use` PROJECT argument) - spec compliance - Impact: UX consistency, not functional capability Will be addressed in a future milestone focused on CLI polish and spec compliance.
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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.

Blocks
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2937
No description provided.