Feature: Validation attach rejects plain Tools
  As a CleverAgents user
  I want the "agents validation attach" command to reject plain Tools
  So that only genuine Validations can be attached to resources

  Background:
    Given a validation attach type guard test runner
    And a validation attach type guard mocked environment

  # --- TDD red phase: plain Tool must be rejected ---

  Scenario: Attach rejects a plain Tool registered with tool_type "tool"
    Given a plain tool "local/my-plain-tool" is registered with tool_type "tool"
    When I invoke validation attach "local/my-plain-tool" to "git-checkout/my-repo"
    Then the validation attach should be rejected
    And the rejection output should contain "plain Tool"

  Scenario: Attach rejects a plain Tool registered as a dict with tool_type "tool"
    Given a plain tool dict "local/dict-tool" is registered with tool_type "tool"
    When I invoke validation attach "local/dict-tool" to "git-checkout/my-repo"
    Then the validation attach should be rejected
    And the rejection output should contain "plain Tool"

  # --- Happy path: genuine Validation attaches successfully ---

  Scenario: Attach accepts a genuine Validation with tool_type "validation"
    Given a genuine validation "local/coverage-check" is registered with tool_type "validation"
    When I invoke validation attach "local/coverage-check" to "git-checkout/my-repo"
    Then the validation attach should succeed

  Scenario: Attach accepts a genuine Validation registered as a dict with tool_type "validation"
    Given a genuine validation dict "local/lint-check" is registered with tool_type "validation"
    When I invoke validation attach "local/lint-check" to "git-checkout/my-repo"
    Then the validation attach should succeed
