Feature: A2A Module Imports Audit and Rename per ADR-047
  As a developer
  I want to ensure all ACP module imports are renamed to A2A
  So that the codebase follows ADR-047 standard adoption

  Background:
    Given the cleveragents-core repository is initialized
    And the A2A module is available at src/cleveragents/a2a/

  Scenario: Verify A2A module exists and is properly structured
    When I check the A2A module structure
    Then the module should contain the following files:
      | __init__.py       |
      | asgi.py           |
      | cli_bootstrap.py  |
      | clients.py        |
      | errors.py         |
      | events.py         |
      | facade.py         |
      | models.py         |
      | server_config.py  |
      | transport.py      |
      | versioning.py     |

  Scenario: Verify no ACP module directory exists in source code
    When I search for ACP module directory in src/cleveragents/
    Then no acp directory should be found
    And the deprecated acp reference should only exist in .gitignore

  Scenario: Verify all A2A exports are properly defined
    When I import the A2A module
    Then the following classes should be exported:
      | A2aError                      |
      | A2aErrorDetail                |
      | A2aEvent                      |
      | A2aEventQueue                 |
      | A2aHttpTransport              |
      | A2aLocalFacade                |
      | A2aNotAvailableError          |
      | A2aOperationNotFoundError     |
      | A2aRequest                    |
      | A2aResponse                   |
      | A2aVersion                    |
      | A2aVersionMismatchError       |
      | A2aVersionNegotiator          |
      | AuthClient                    |
      | RemoteExecutionClient         |
      | ServerClient                  |
      | ServerConnectionConfig        |
      | StubAuthClient                |
      | StubRemoteExecutionClient     |
      | StubServerClient              |

  Scenario: Verify no ACP imports exist in Python source files
    When I search for ACP imports in all Python source files
    Then no "from.*acp" or "import.*acp" patterns should be found
    And all imports should use the a2a namespace

  Scenario: Verify A2A module is properly integrated with application
    When I check the application container
    Then the A2A facade should be properly wired
    And the A2A event queue should be available
    And the A2A transport should be configured

  Scenario: Verify A2A clients are properly implemented
    When I inspect the A2A clients module
    Then the following client classes should be defined:
      | ServerClient                |
      | RemoteExecutionClient       |
      | AuthClient                  |
      | StubServerClient            |
      | StubRemoteExecutionClient   |
      | StubAuthClient              |

  Scenario: Verify A2A error handling is complete
    When I inspect the A2A errors module
    Then the following error classes should be defined:
      | A2aError                    |
      | A2aNotAvailableError        |
      | A2aOperationNotFoundError   |
      | A2aVersionMismatchError     |

  Scenario: Verify A2A models are properly typed
    When I inspect the A2A models module
    Then the following model classes should be defined:
      | A2aRequest                  |
      | A2aResponse                 |
      | A2aEvent                    |
      | A2aErrorDetail              |
      | A2aVersion                  |

  Scenario: Verify A2A facade provides local mode support
    When I inspect the A2A facade module
    Then the A2aLocalFacade class should be defined
    And it should implement the extension method dispatch mechanism
    And it should support both standard and custom A2A operations

  Scenario: Verify A2A versioning is properly implemented
    When I inspect the A2A versioning module
    Then the A2aVersionNegotiator class should be defined
    And it should support protocol version negotiation
    And it should handle backward compatibility

  Scenario: Verify A2A transport is properly configured
    When I inspect the A2A transport module
    Then the A2aHttpTransport class should be defined
    And it should support JSON-RPC 2.0 wire format
    And it should handle SSE streaming for events

  Scenario: Verify A2A events are properly structured
    When I inspect the A2A events module
    Then the A2aEventQueue class should be defined
    And it should support task status update events
    And it should support task artifact update events

  Scenario: Verify no deprecated ACP references in documentation
    When I search for ACP references in documentation files
    Then only ADR-026 and ADR-047 should reference ACP for historical context
    And all other documentation should use A2A terminology

  Scenario: Verify .gitignore properly marks ACP as deprecated
    When I check the .gitignore file
    Then it should contain the deprecated ACP module path
    And the comment should indicate ACP is deprecated in favor of A2A

  Scenario: Verify test coverage for A2A module imports
    When I run the A2A module tests
    Then all tests should pass
    And test coverage should be >= 97%
    And no ACP-related test code should exist

  Scenario: Verify A2A module is importable from main package
    When I import cleveragents.a2a
    Then the import should succeed
    And all exported classes should be accessible
    And no import errors should occur
