agents automation-profile add --update should warn (or more) if --update given but no existing automation profile. #8830

Closed
opened 2026-04-14 01:24:21 +00:00 by brent.edwards · 3 comments
Member

Background and Context

The agents automation-profile add --update command is designed to create a new automation profile or update an existing one. However, the --update flag's semantics are not clearly enforced: when --update is provided but no existing automation profile with the given name exists, the current implementation does not provide feedback to the user.

This inconsistency creates potential confusion in automated workflows where scripts may need to distinguish between "create or update" operations and explicit "update only" operations.

Current Behavior

When agents automation-profile add --update is called and no automation profile with the given name exists, the command:

  • May silently create the profile without warning
  • Does not indicate that the --update flag was provided but had no existing profile to update
  • Leaves ambiguity about whether the profile was created or updated

Expected Behavior

When agents automation-profile add --update is called and no automation profile of the given name exists, the system should:

  1. Minimum: Display a warning message informing the user that the profile did not exist and was created instead
  2. Optional: Alternatively, reject the command with a clear error message explaining that --update requires an existing profile, and suggest using agents automation-profile add (without --update) to create it

The behavior should allow automated scripts to:

  • Handle the warning/error appropriately
  • Distinguish between create and update operations
  • Make informed decisions in multi-step workflows

Acceptance Criteria

  • When --update is provided but the profile doesn't exist, feedback is provided to the user
  • The feedback is clear: either a warning explaining the behavior or an error requiring the user to remove --update
  • The decision on implementation approach is documented in the commit or a comment
  • Behavior is consistent with similar --update flags across other commands (agents tool add --update, agents skill add --update, etc.)
  • CLI output is tested via integration tests
  • Help text or documentation is updated to clarify --update semantics if needed

Supporting Information

  • Related Specification: See specification.md CLI Commands section for automation profile documentation
  • Similar Commands: Review how --update behaves for agents tool add, agents skill add, and agents actor add
  • Test Framework: Robot Framework integration tests for CLI behavior

Metadata

  • Commit Message: fix: warn when automation-profile add --update given but no existing profile
  • Branch: fix/automation-profile-update-warning

Subtasks

  • Research current behavior of similar --update flags across other add commands
  • Decide on implementation approach: warning vs. error
  • Implement feedback mechanism (warning or error) in the CLI layer
  • Update help text or inline documentation if necessary
  • Add Robot Framework integration test for this scenario
  • Test all related --update commands for consistency
  • Verify coverage remains >=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.
  • The agents automation-profile add --update command provides clear feedback when the profile doesn't exist:
    • Either a warning message is displayed, OR
    • An error message is displayed explaining the issue
  • The behavior is consistent with other similar --update flags in the codebase
  • Integration tests verify the warning/error appears in the expected scenarios
  • Integration tests verify normal behavior (create, update without --update, update with --update on existing profile) still works
  • Test coverage meets or exceeds 97% as verified by nox -s coverage_report
  • A single Git commit is created where the first line of the commit message is exactly:
    fix: warn when automation-profile add --update given but no existing profile
    
    followed by a blank line and additional lines describing the implementation approach and rationale.
  • The commit is pushed to the remote on the branch fix/automation-profile-update-warning
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked complete.
  • The issue is transitioned to State/Completed after the PR is merged.
## Background and Context The `agents automation-profile add --update` command is designed to create a new automation profile or update an existing one. However, the `--update` flag's semantics are not clearly enforced: when `--update` is provided but no existing automation profile with the given name exists, the current implementation does not provide feedback to the user. This inconsistency creates potential confusion in automated workflows where scripts may need to distinguish between "create or update" operations and explicit "update only" operations. ## Current Behavior When `agents automation-profile add --update` is called and no automation profile with the given name exists, the command: - May silently create the profile without warning - Does not indicate that the `--update` flag was provided but had no existing profile to update - Leaves ambiguity about whether the profile was created or updated ## Expected Behavior When `agents automation-profile add --update` is called and no automation profile of the given name exists, the system should: 1. **Minimum**: Display a warning message informing the user that the profile did not exist and was created instead 2. **Optional**: Alternatively, reject the command with a clear error message explaining that `--update` requires an existing profile, and suggest using `agents automation-profile add` (without `--update`) to create it The behavior should allow automated scripts to: - Handle the warning/error appropriately - Distinguish between create and update operations - Make informed decisions in multi-step workflows ## Acceptance Criteria - [ ] When `--update` is provided but the profile doesn't exist, feedback is provided to the user - [ ] The feedback is clear: either a warning explaining the behavior or an error requiring the user to remove `--update` - [ ] The decision on implementation approach is documented in the commit or a comment - [ ] Behavior is consistent with similar `--update` flags across other commands (`agents tool add --update`, `agents skill add --update`, etc.) - [ ] CLI output is tested via integration tests - [ ] Help text or documentation is updated to clarify `--update` semantics if needed ## Supporting Information - **Related Specification**: See `specification.md` CLI Commands section for automation profile documentation - **Similar Commands**: Review how `--update` behaves for `agents tool add`, `agents skill add`, and `agents actor add` - **Test Framework**: Robot Framework integration tests for CLI behavior ## Metadata - **Commit Message**: `fix: warn when automation-profile add --update given but no existing profile` - **Branch**: `fix/automation-profile-update-warning` ## Subtasks - [ ] Research current behavior of similar `--update` flags across other `add` commands - [ ] Decide on implementation approach: warning vs. error - [ ] Implement feedback mechanism (warning or error) in the CLI layer - [ ] Update help text or inline documentation if necessary - [ ] Add Robot Framework integration test for this scenario - [ ] Test all related `--update` commands for consistency - [ ] Verify coverage remains >=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. - The `agents automation-profile add --update` command provides clear feedback when the profile doesn't exist: - Either a warning message is displayed, OR - An error message is displayed explaining the issue - The behavior is consistent with other similar `--update` flags in the codebase - Integration tests verify the warning/error appears in the expected scenarios - Integration tests verify normal behavior (create, update without `--update`, update with `--update` on existing profile) still works - Test coverage meets or exceeds 97% as verified by `nox -s coverage_report` - A single Git commit is created where the **first line** of the commit message is exactly: ``` fix: warn when automation-profile add --update given but no existing profile ``` followed by a blank line and additional lines describing the implementation approach and rationale. - The commit is pushed to the remote on the branch `fix/automation-profile-update-warning` - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked complete. - The issue is transitioned to `State/Completed` after the PR is merged.
brent.edwards added this to the v3.2.0 milestone 2026-04-14 01:24:21 +00:00
Owner

Thank you for this well-structured issue, @brent.edwards.

Triage Summary — [AUTO-HUMAN-1]

This issue has been received and triaged. Here is a summary of the assessment:

Issue Quality: Exemplary. The issue includes clear background context, current and expected behavior, acceptance criteria, detailed subtasks, and a comprehensive Definition of Done. No description updates are needed.

Labels Applied:

  • Type/Bug — behavioral inconsistency in the CLI
  • Priority/Low — UX improvement, not a blocking defect
  • MoSCoW/Should have — improves CLI consistency and prevents user confusion in automated workflows
  • Points/1 — focused fix with test coverage
  • State/Unverified — pending developer verification

Milestone: Currently assigned to v3.2.0. Note that this milestone is overdue (due 2026-02-26). Please confirm whether this issue should remain in v3.2.0 or be deferred to v3.3.0 or later.

Implementation Decision: The issue presents two options — a warning message or an error message. Before implementation begins, please document the chosen approach in a comment here so the developer has clear direction. The consistency check with agents tool add --update, agents skill add --update, and agents actor add --update is a good starting point.

Next Steps:

  1. Confirm the milestone assignment
  2. Document the implementation approach (warning vs. error)
  3. A developer will be assigned once the issue is verified

Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison-pool-supervisor
Worker: [AUTO-HUMAN-1]

Thank you for this well-structured issue, @brent.edwards. ## Triage Summary — [AUTO-HUMAN-1] This issue has been received and triaged. Here is a summary of the assessment: **Issue Quality**: Exemplary. The issue includes clear background context, current and expected behavior, acceptance criteria, detailed subtasks, and a comprehensive Definition of Done. No description updates are needed. **Labels Applied**: - `Type/Bug` — behavioral inconsistency in the CLI - `Priority/Low` — UX improvement, not a blocking defect - `MoSCoW/Should have` — improves CLI consistency and prevents user confusion in automated workflows - `Points/1` — focused fix with test coverage - `State/Unverified` — pending developer verification **Milestone**: Currently assigned to `v3.2.0`. Note that this milestone is overdue (due 2026-02-26). Please confirm whether this issue should remain in `v3.2.0` or be deferred to `v3.3.0` or later. **Implementation Decision**: The issue presents two options — a warning message or an error message. Before implementation begins, please document the chosen approach in a comment here so the developer has clear direction. The consistency check with `agents tool add --update`, `agents skill add --update`, and `agents actor add --update` is a good starting point. **Next Steps**: 1. Confirm the milestone assignment 2. Document the implementation approach (warning vs. error) 3. A developer will be assigned once the issue is verified --- **Automated by CleverAgents Bot** Supervisor: Human Liaison | Agent: human-liaison-pool-supervisor Worker: [AUTO-HUMAN-1]
HAL9000 modified the milestone from v3.2.0 to v3.6.0 2026-04-14 02:55:44 +00:00
Owner

Triage Decision: VERIFIED — MoSCoW/Should Have

Valid UX improvement: --update with no arguments silently does nothing, which is confusing. A warning would improve usability. Low priority — not a blocker, just a quality-of-life improvement. Keeping existing MoSCoW/Should Have label as this is a user-facing consistency issue.


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

✅ **Triage Decision: VERIFIED — MoSCoW/Should Have** Valid UX improvement: `--update` with no arguments silently does nothing, which is confusing. A warning would improve usability. Low priority — not a blocker, just a quality-of-life improvement. Keeping existing MoSCoW/Should Have label as this is a user-facing consistency issue. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Owner

Implementation Attempt - Tier 3: Sonnet - Success

Implemented warning when --update flag is given but no existing automation profile exists.

Changes:

  1. automation_profile.py: Added warning when --update given but profile does not exist
  2. automation_profile_cli.feature: Added BDD scenario for warning behavior

Quality gates: lint passed, typecheck passed (0 errors), unit_tests passed (32 scenarios)

PR: #10666 - #10666


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** - Tier 3: Sonnet - Success Implemented warning when --update flag is given but no existing automation profile exists. **Changes:** 1. automation_profile.py: Added warning when --update given but profile does not exist 2. automation_profile_cli.feature: Added BDD scenario for warning behavior **Quality gates:** lint passed, typecheck passed (0 errors), unit_tests passed (32 scenarios) **PR:** #10666 - https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10666 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#8830
No description provided.