Feature: REPL uncovered code paths (rplcov3)
  Exercises uncovered lines in src/cleveragents/cli/commands/repl.py:
  610-611 (persona import file not found), 619-621 (persona import validation fail),
  625-626 (unknown persona sub-command), 651-652 (session switch missing arg),
  792-794 (@ reference suggestions in run_repl), 805 (empty argv after shlex.split).

  Background:
    Given rplcov3 the repl module is imported

  # ---------------------------------------------------------------
  # _handle_slash_command — persona import file-not-found (610-611)
  # ---------------------------------------------------------------
  Scenario: Persona import with non-existent file prints error
    Given rplcov3 a temporary persona registry
    When rplcov3 I handle slash command "persona import nonexistent.yaml"
    Then rplcov3 the exit code is 1
    And rplcov3 the output contains "File not found"

  # ---------------------------------------------------------------
  # _handle_slash_command — persona import validation fail (619-621)
  # ---------------------------------------------------------------
  Scenario: Persona import with invalid YAML persona prints validation error
    Given rplcov3 a temporary persona registry
    And rplcov3 an importable YAML file with invalid persona data
    When rplcov3 I handle slash command for import with invalid persona file
    Then rplcov3 the exit code is 1
    And rplcov3 the output contains "Persona validation failed"

  # ---------------------------------------------------------------
  # _handle_slash_command — unknown persona sub-command (625-626)
  # ---------------------------------------------------------------
  Scenario: Unknown persona sub-command prints error
    Given rplcov3 a temporary persona registry
    When rplcov3 I handle slash command "persona unknowncmd extraarg"
    Then rplcov3 the exit code is 2
    And rplcov3 the output contains "Unknown persona command"

  # ---------------------------------------------------------------
  # _handle_slash_command — session switch missing name (651-652)
  # ---------------------------------------------------------------
  Scenario: Session switch without name prints usage error
    Given rplcov3 a temporary persona registry
    When rplcov3 I handle slash command "session switch"
    Then rplcov3 the exit code is 2
    And rplcov3 the output contains "Usage"
    And rplcov3 the output contains "/session switch"

  # ---------------------------------------------------------------
  # run_repl — @ reference suggestions shown (792-794)
  # ---------------------------------------------------------------
  Scenario: REPL shows reference suggestions for unresolved @ token
    Given rplcov3 a temporary persona registry
    And rplcov3 a reference catalog with known entries
    When rplcov3 I run the REPL with input "@zzz_nomatch_token" and mocked catalog
    Then rplcov3 the repl exit code is 0
    And rplcov3 the repl output contains "Reference suggestions"

  # ---------------------------------------------------------------
  # run_repl — empty argv after shlex.split (805)
  # ---------------------------------------------------------------
  Scenario: REPL skips empty tokenised input without dispatch
    Given rplcov3 a temporary persona registry
    When rplcov3 I run the REPL with input that tokenises to empty
    Then rplcov3 the repl exit code is 0
    And rplcov3 dispatch_command was not called
