@cli
Feature: CLI Command Processing

  Scenario: Convert integer exit codes
    When I convert exit code 0
    Then the result should be 0
    When I convert exit code 1
    Then the result should be 1
    When I convert exit code -1
    Then the result should be -1

  Scenario: Convert None exit code
    When I convert exit code None
    Then the result should be 0

  Scenario: Convert Click Exit exception
    When I convert a Click Exit exception with code 2
    Then the result should be 2

  Scenario: Handle invalid command
    When I run the CleverAgents CLI with "invalid-command-xyz"
    Then the CLI command should fail
    And the error should contain "invalid"

  Scenario: Main function handles arguments
    When I call main with arguments "--version"
    Then main should process the version flag

  Scenario: Main function handles no arguments
    When I call main with no arguments
    Then main should display help

  Scenario: Main function handles SystemExit
    When I call main and CLI raises SystemExit 1
    Then main should return 1
