Feature: Legacy plan persistence removal
  As a developer migrating to the v3 plan lifecycle,
  I want legacy plan paths to emit deprecation warnings,
  so that I know to use PlanLifecycleService instead.

  Background:
    Given a clean test environment for legacy removal

  # --- PlanService deprecation ---

  Scenario: PlanService emits deprecation warning on instantiation
    When I instantiate PlanService
    Then a DeprecationWarning mentioning "PlanService is deprecated" is raised

  Scenario: PlanService still functions after deprecation warning
    When I instantiate PlanService
    And I call create_plan on the legacy service
    Then the plan is created successfully

  # --- PlanRepository deprecation ---

  Scenario: PlanRepository emits deprecation warning on instantiation
    When I instantiate PlanRepository
    Then a DeprecationWarning mentioning "PlanRepository is deprecated" is raised

  # --- ChangeRepository deprecation ---

  Scenario: ChangeRepository emits deprecation warning on instantiation
    When I instantiate ChangeRepository
    Then a DeprecationWarning mentioning "ChangeRepository is deprecated" is raised

  # --- PlanLifecycleService is NOT deprecated ---

  Scenario: PlanLifecycleService does NOT emit deprecation warnings
    When I instantiate PlanLifecycleService
    Then no DeprecationWarning is raised

  # --- UnitOfWorkContext plans accessor is deprecated ---

  Scenario: UnitOfWorkContext plans property emits deprecation warning
    When I access the plans property on UnitOfWorkContext
    Then a DeprecationWarning mentioning "deprecated" is raised
